@letscooee/web-sdk 9.6.9 → 9.6.11

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,10 +1,10 @@
1
- "use strict";(()=>{var VR=Object.create,Gh=Object.defineProperty,UR=Object.defineProperties,HR=Object.getOwnPropertyDescriptor,jR=Object.getOwnPropertyDescriptors,$R=Object.getOwnPropertyNames,zE=Object.getOwnPropertySymbols,WR=Object.getPrototypeOf,YE=Object.prototype.hasOwnProperty,GR=Object.prototype.propertyIsEnumerable,qE=(e,t,r)=>t in e?Gh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||={})YE.call(t,r)&&qE(e,r,t[r]);if(zE)for(var r of zE(t))GR.call(t,r)&&qE(e,r,t[r]);return e},re=(e,t)=>UR(e,jR(t)),Ic=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),$n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zR=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $R(t))!YE.call(e,i)&&i!==r&&Gh(e,i,{get:()=>t[i],enumerable:!(n=HR(t,i))||n.enumerable});return e},Pe=(e,t,r)=>(r=e!=null?VR(WR(e)):{},zR(t||!e||!e.__esModule?Gh(r,"default",{value:e,enumerable:!0}):r,e)),ls=$n((e,t)=>{"use strict";(function(r){"use strict";var n={};n.VERSION="1.6.1";var i,s={},o=function(d,f){return function(){return f.apply(d,arguments)}},a=function(){var d=arguments,f=d[0],g,m;for(m=1;m<d.length;m++)for(g in d[m])!(g in f)&&d[m].hasOwnProperty(g)&&(f[g]=d[m][g]);return f},l=function(d,f){return{value:d,name:f}};n.TRACE=l(1,"TRACE"),n.DEBUG=l(2,"DEBUG"),n.INFO=l(3,"INFO"),n.TIME=l(4,"TIME"),n.WARN=l(5,"WARN"),n.ERROR=l(8,"ERROR"),n.OFF=l(99,"OFF");var c=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};c.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var f=this.context.filterLevel;return d.value>=f.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(n.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(n.TIME,[d,"end"])},invoke:function(d,f){i&&this.enabledFor(d)&&i(f,a({level:d},this.context))}};var h=new c({filterLevel:n.OFF});(function(){var d=n;d.enabledFor=o(h,h.enabledFor),d.trace=o(h,h.trace),d.debug=o(h,h.debug),d.time=o(h,h.time),d.timeEnd=o(h,h.timeEnd),d.info=o(h,h.info),d.warn=o(h,h.warn),d.error=o(h,h.error),d.log=d.info})(),n.setHandler=function(d){i=d},n.setLevel=function(d){h.setLevel(d);for(var f in s)s.hasOwnProperty(f)&&s[f].setLevel(d)},n.getLevel=function(){return h.getLevel()},n.get=function(d){return s[d]||(s[d]=new c(a({name:d},h.context)))},n.createDefaultHandler=function(d){d=d||{},d.formatter=d.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,A;b.level===n.TIME?(A=(b.name?"["+b.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(A):f[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):g(I,[A+": "+(new Date().getTime()-f[A])+"ms"])):(b.level===n.WARN&&console.warn?I=console.warn:b.level===n.ERROR&&console.error?I=console.error:b.level===n.INFO&&console.info?I=console.info:b.level===n.DEBUG&&console.debug?I=console.debug:b.level===n.TRACE&&console.trace&&(I=console.trace),d.formatter(m,b),g(I,m))}},n.useDefaults=function(d){n.setLevel(d&&d.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(d))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof t<"u"&&t.exports?t.exports=n:(n._prevLogger=r.Logger,n.noConflict=function(){return r.Logger=n._prevLogger,n},r.Logger=n)})(e)}),Yn=$n(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={})),r=function(y){return y[y.ONE_TIME=1]="ONE_TIME",y[y.MULTIPLE=2]="MULTIPLE",y[y.RECURRING=3]="RECURRING",y}(r||(e.ScheduleFrequency=r={})),n=function(y){return y[y.NOW=1]="NOW",y[y.LATER=2]="LATER",y[y.NEVER=3]="NEVER",y}(n||(e.TimePreference=n={})),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={})),s=function(y){return y.CAMPAIGN="CAMPAIGN",y.NATIVE_AB="NATIVE_AB",y.CRO_COPILOT="CRO_COPILOT",y}(s||(e.EngagementType=s={})),o=function(y){return y[y.NONE=0]="NONE",y[y.RULE_BASED=1]="RULE_BASED",y[y.INTENT_BASED=2]="INTENT_BASED",y}(o||(e.TriggerType=o={})),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={})),h=function(y){return y.ALL="ALL",y.LOGGED_IN="LOGGED_IN",y.NON_LOGGED_IN="NON_LOGGED_IN",y}(h||(e.LoggedInVisitor=h={})),d=function(y){return y.ALL="ALL",y.PURCHASED="PURCHASED",y.NON_PURCHASED="NON_PURCHASED",y}(d||(e.PurchasedVisitor=d={})),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={})),A=function(y){return y[y.ALL=0]="ALL",y[y.INCLUDES=1]="INCLUDES",y[y.EXCLUDES=2]="EXCLUDES",y}(A||(e.CartCurrencyOperator=A={})),F=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}(F||(e.CartFilterEnum=F={})),V=function(y){return y[y.NONE=0]="NONE",y[y.ITEM=1]="ITEM",y[y.COLLECTION=2]="COLLECTION",y}(V||(e.PromotionType=V={})),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={})),Me=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}(Me||(e.RedirectBehaviour=Me={})),lt=function(y){return y.ONCE_IN_SESSION="ONCE_IN_SESSION",y.ACROSS_SESSIONS="ACROSS_SESSIONS",y}(lt||(e.FrequencyType=lt={})),j=function(y){return y.DAYS="DAYS",y.HOURS="HOURS",y.MINUTES="MINUTES",y.SECONDS="SECONDS",y}(j||(e.FrequencyGapUnit=j={})),fe=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}(fe||(e.ClickActionType=fe={})),te=function(y){return y.POPUP="POPUP",y.PAGE_EMBED="PAGE_EMBED",y.CART_EMBED="CART_EMBED",y.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",y}(te||(e.OnsiteDeliveryType=te={})),pe=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.EXPERIMENT="EXPERIMENT",y}(pe||(e.EngagementObjective=pe={})),Be=function(y){return y.COOEE="COOEE",y.KLAVIYO="KLAVIYO",y}(Be||(e.EngagementContentSource=Be={})),ct=function(y){return y.ICONS="ICONS",y.TILES="TILES",y}(ct||(e.ProgressBarLayout=ct={})),at=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}(at||(e.MilestoneRewardType=at={}))}),Sa=$n(e=>{"use strict";var t=e&&e.__awaiter||function(n,i,s,o){function a(l){return l instanceof s?l:new s(function(c){c(l)})}return new(s||(s=Promise))(function(l,c){function h(g){try{f(o.next(g))}catch(m){c(m)}}function d(g){try{f(o.throw(g))}catch(m){c(m)}}function f(g){g.done?l(g.value):a(g.value).then(h,d)}f((o=o.apply(n,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.JSUtils=void 0;var r=class{static isObject(n){return typeof n=="object"&&!Array.isArray(n)&&n!==null}static parseToAny(n){try{return JSON.parse(n.toString())}catch{}return n.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(n.toString()):n}static sleep(n){return t(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,n))})}static hasKeys(n){return n?Object.keys(n).length>=1:!1}static convertObjectToArray(n,i){return i.reduce((s,o)=>(n.hasOwnProperty(o)&&n[o]!=null&&s.push({[o]:n[o]}),s),[])}static removeNullUndefinedKeys(n){return Object.keys(n).reduce((i,s)=>(n[s]!==null&&n[s]!==void 0&&(i[s]=n[s]),i),{})}static stringify(n){return JSON.stringify(n,function(i,s){return s===void 0?null:s})}};e.JSUtils=r,r.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)/)}),QD=$n((e,t)=>{"use strict";(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){var r,n,i;return function s(o,a,l){function c(f,g){if(!a[f]){if(!o[f]){var m=typeof Ic=="function"&&Ic;if(!g&&m)return m(f,!0);if(h)return h(f,!0);var b=new Error("Cannot find module '"+f+"'");throw b.code="MODULE_NOT_FOUND",b}var I=a[f]={exports:{}};o[f][0].call(I.exports,function(A){var F=o[f][1][A];return c(F||A)},I,I.exports,s,o,a,l)}return a[f].exports}for(var h=typeof Ic=="function"&&Ic,d=0;d<l.length;d++)c(l[d]);return c}({1:[function(s,o,a){(function(l){"use strict";var c=l.MutationObserver||l.WebKitMutationObserver,h;if(c){var d=0,f=new c(A),g=l.document.createTextNode("");f.observe(g,{characterData:!0}),h=function(){g.data=d=++d%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var m=new l.MessageChannel;m.port1.onmessage=A,h=function(){m.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?h=function(){var V=l.document.createElement("script");V.onreadystatechange=function(){A(),V.onreadystatechange=null,V.parentNode.removeChild(V),V=null},l.document.documentElement.appendChild(V)}:h=function(){setTimeout(A,0)};var b,I=[];function A(){b=!0;for(var V,M,q=I.length;q;){for(M=I,I=[],V=-1;++V<q;)M[V]();q=I.length}b=!1}o.exports=F;function F(V){I.push(V)===1&&!b&&h()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,a){"use strict";var l=s(1);function c(){}var h={},d=["REJECTED"],f=["FULFILLED"],g=["PENDING"];o.exports=m;function m(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,j!==c&&F(this,j)}m.prototype.catch=function(j){return this.then(null,j)},m.prototype.then=function(j,fe){if(typeof j!="function"&&this.state===f||typeof fe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==g){var pe=this.state===f?j:fe;I(te,pe,this.outcome)}else this.queue.push(new b(te,j,fe));return te};function b(j,fe,te){this.promise=j,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(j){h.resolve(this.promise,j)},b.prototype.otherCallFulfilled=function(j){I(this.promise,this.onFulfilled,j)},b.prototype.callRejected=function(j){h.reject(this.promise,j)},b.prototype.otherCallRejected=function(j){I(this.promise,this.onRejected,j)};function I(j,fe,te){l(function(){var pe;try{pe=fe(te)}catch(Be){return h.reject(j,Be)}pe===j?h.reject(j,new TypeError("Cannot resolve promise with itself")):h.resolve(j,pe)})}h.resolve=function(j,fe){var te=V(A,fe);if(te.status==="error")return h.reject(j,te.value);var pe=te.value;if(pe)F(j,pe);else{j.state=f,j.outcome=fe;for(var Be=-1,ct=j.queue.length;++Be<ct;)j.queue[Be].callFulfilled(fe)}return j},h.reject=function(j,fe){j.state=d,j.outcome=fe;for(var te=-1,pe=j.queue.length;++te<pe;)j.queue[te].callRejected(fe);return j};function A(j){var fe=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof fe=="function")return function(){fe.apply(j,arguments)}}function F(j,fe){var te=!1;function pe(y){te||(te=!0,h.reject(j,y))}function Be(y){te||(te=!0,h.resolve(j,y))}function ct(){fe(Be,pe)}var at=V(ct);at.status==="error"&&pe(at.value)}function V(j,fe){var te={};try{te.value=j(fe),te.status="success"}catch(pe){te.status="error",te.value=pe}return te}m.resolve=M;function M(j){return j instanceof this?j:h.resolve(new this(c),j)}m.reject=q;function q(j){var fe=new this(c);return h.reject(fe,j)}m.all=Me;function Me(j){var fe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,pe=!1;if(!te)return this.resolve([]);for(var Be=new Array(te),ct=0,at=-1,y=new this(c);++at<te;)jt(j[at],at);return y;function jt(Ke,Qt){fe.resolve(Ke).then(Se,function(D){pe||(pe=!0,h.reject(y,D))});function Se(D){Be[Qt]=D,++ct===te&&!pe&&(pe=!0,h.resolve(y,Be))}}}m.race=lt;function lt(j){var fe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,pe=!1;if(!te)return this.resolve([]);for(var Be=-1,ct=new this(c);++Be<te;)at(j[Be]);return ct;function at(y){fe.resolve(y).then(function(jt){pe||(pe=!0,h.resolve(ct,jt))},function(jt){pe||(pe=!0,h.reject(ct,jt))})}}},{1:1}],3:[function(s,o,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,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 h(){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 d=h();function f(){try{if(!d||!d.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(P){if(P.name!=="TypeError")throw P;for(var S=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,R=new S,N=0;N<_.length;N+=1)R.append(_[N]);return R.getBlob(E.type)}}typeof Promise>"u"&&s(3);var m=Promise;function b(_,E){E&&_.then(function(S){E(null,S)},function(S){E(S)})}function I(_,E,S){typeof E=="function"&&_.then(E),typeof S=="function"&&_.catch(S)}function A(_){return typeof _!="string"&&(console.warn(_+" used as a key, but it is not a string."),_=String(_)),_}function F(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var V="local-forage-detect-blob-support",M=void 0,q={},Me=Object.prototype.toString,lt="readonly",j="readwrite";function fe(_){for(var E=_.length,S=new ArrayBuffer(E),R=new Uint8Array(S),N=0;N<E;N++)R[N]=_.charCodeAt(N);return S}function te(_){return new m(function(E){var S=_.transaction(V,j),R=g([""]);S.objectStore(V).put(R,"key"),S.onabort=function(N){N.preventDefault(),N.stopPropagation(),E(!1)},S.oncomplete=function(){var N=navigator.userAgent.match(/Chrome\/(\d+)/),P=navigator.userAgent.match(/Edge\//);E(P||!N||parseInt(N[1],10)>=43)}}).catch(function(){return!1})}function pe(_){return typeof M=="boolean"?m.resolve(M):te(_).then(function(E){return M=E,M})}function Be(_){var E=q[_.name],S={};S.promise=new m(function(R,N){S.resolve=R,S.reject=N}),E.deferredOperations.push(S),E.dbReady?E.dbReady=E.dbReady.then(function(){return S.promise}):E.dbReady=S.promise}function ct(_){var E=q[_.name],S=E.deferredOperations.pop();if(S)return S.resolve(),S.promise}function at(_,E){var S=q[_.name],R=S.deferredOperations.pop();if(R)return R.reject(E),R.promise}function y(_,E){return new m(function(S,R){if(q[_.name]=q[_.name]||Ee(),_.db)if(E)Be(_),_.db.close();else return S(_.db);var N=[_.name];E&&N.push(_.version);var P=d.open.apply(d,N);E&&(P.onupgradeneeded=function(U){var H=P.result;try{H.createObjectStore(_.storeName),U.oldVersion<=1&&H.createObjectStore(V)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+_.name+'" has been upgraded from version '+U.oldVersion+" to version "+U.newVersion+', but the storage "'+_.storeName+'" already exists.');else throw W}}),P.onerror=function(U){U.preventDefault(),R(P.error)},P.onsuccess=function(){var U=P.result;U.onversionchange=function(H){H.target.close()},S(U),ct(_)}})}function jt(_){return y(_,!1)}function Ke(_){return y(_,!0)}function Qt(_,E){if(!_.db)return!0;var S=!_.db.objectStoreNames.contains(_.storeName),R=_.version<_.db.version,N=_.version>_.db.version;if(R&&(_.version!==E&&console.warn('The database "'+_.name+`" can't be downgraded from version `+_.db.version+" to version "+_.version+"."),_.version=_.db.version),N||S){if(S){var P=_.db.version+1;P>_.version&&(_.version=P)}return!0}return!1}function Se(_){return new m(function(E,S){var R=new FileReader;R.onerror=S,R.onloadend=function(N){var P=btoa(N.target.result||"");E({__local_forage_encoded_blob:!0,data:P,type:_.type})},R.readAsBinaryString(_)})}function D(_){var E=fe(atob(_.data));return g([E],{type:_.type})}function x(_){return _&&_.__local_forage_encoded_blob}function Z(_){var E=this,S=E._initReady().then(function(){var R=q[E._dbInfo.name];if(R&&R.dbReady)return R.dbReady});return I(S,_,_),S}function ne(_){Be(_);for(var E=q[_.name],S=E.forages,R=0;R<S.length;R++){var N=S[R];N._dbInfo.db&&(N._dbInfo.db.close(),N._dbInfo.db=null)}return _.db=null,jt(_).then(function(P){return _.db=P,Qt(_)?Ke(_):P}).then(function(P){_.db=E.db=P;for(var U=0;U<S.length;U++)S[U]._dbInfo.db=P}).catch(function(P){throw at(_,P),P})}function ae(_,E,S,R){R===void 0&&(R=1);try{var N=_.db.transaction(_.storeName,E);S(null,N)}catch(P){if(R>0&&(!_.db||P.name==="InvalidStateError"||P.name==="NotFoundError"))return m.resolve().then(function(){if(!_.db||P.name==="NotFoundError"&&!_.db.objectStoreNames.contains(_.storeName)&&_.version<=_.db.version)return _.db&&(_.version=_.db.version+1),Ke(_)}).then(function(){return ne(_).then(function(){ae(_,E,S,R-1)})}).catch(S);S(P)}}function Ee(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ye(_){var E=this,S={db:null};if(_)for(var R in _)S[R]=_[R];var N=q[S.name];N||(N=Ee(),q[S.name]=N),N.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=Z);var P=[];function U(){return m.resolve()}for(var H=0;H<N.forages.length;H++){var W=N.forages[H];W!==E&&P.push(W._initReady().catch(U))}var z=N.forages.slice(0);return m.all(P).then(function(){return S.db=N.db,jt(S)}).then(function($){return S.db=$,Qt(S,E._defaultConfig.version)?Ke(S):$}).then(function($){S.db=N.db=$,E._dbInfo=S;for(var ce=0;ce<z.length;ce++){var Ye=z[ce];Ye!==E&&(Ye._dbInfo.db=S.db,Ye._dbInfo.version=S.version)}})}function de(_,E){var S=this;_=A(_);var R=new m(function(N,P){S.ready().then(function(){ae(S._dbInfo,lt,function(U,H){if(U)return P(U);try{var W=H.objectStore(S._dbInfo.storeName),z=W.get(_);z.onsuccess=function(){var $=z.result;$===void 0&&($=null),x($)&&($=D($)),N($)},z.onerror=function(){P(z.error)}}catch($){P($)}})}).catch(P)});return b(R,E),R}function Ce(_,E){var S=this,R=new m(function(N,P){S.ready().then(function(){ae(S._dbInfo,lt,function(U,H){if(U)return P(U);try{var W=H.objectStore(S._dbInfo.storeName),z=W.openCursor(),$=1;z.onsuccess=function(){var ce=z.result;if(ce){var Ye=ce.value;x(Ye)&&(Ye=D(Ye));var St=_(Ye,ce.key,$++);St!==void 0?N(St):ce.continue()}else N()},z.onerror=function(){P(z.error)}}catch(ce){P(ce)}})}).catch(P)});return b(R,E),R}function je(_,E,S){var R=this;_=A(_);var N=new m(function(P,U){var H;R.ready().then(function(){return H=R._dbInfo,Me.call(E)==="[object Blob]"?pe(H.db).then(function(W){return W?E:Se(E)}):E}).then(function(W){ae(R._dbInfo,j,function(z,$){if(z)return U(z);try{var ce=$.objectStore(R._dbInfo.storeName);W===null&&(W=void 0);var Ye=ce.put(W,_);$.oncomplete=function(){W===void 0&&(W=null),P(W)},$.onabort=$.onerror=function(){var St=Ye.error?Ye.error:Ye.transaction.error;U(St)}}catch(St){U(St)}})}).catch(U)});return b(N,S),N}function At(_,E){var S=this;_=A(_);var R=new m(function(N,P){S.ready().then(function(){ae(S._dbInfo,j,function(U,H){if(U)return P(U);try{var W=H.objectStore(S._dbInfo.storeName),z=W.delete(_);H.oncomplete=function(){N()},H.onerror=function(){P(z.error)},H.onabort=function(){var $=z.error?z.error:z.transaction.error;P($)}}catch($){P($)}})}).catch(P)});return b(R,E),R}function He(_){var E=this,S=new m(function(R,N){E.ready().then(function(){ae(E._dbInfo,j,function(P,U){if(P)return N(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.clear();U.oncomplete=function(){R()},U.onabort=U.onerror=function(){var z=W.error?W.error:W.transaction.error;N(z)}}catch(z){N(z)}})}).catch(N)});return b(S,_),S}function Je(_){var E=this,S=new m(function(R,N){E.ready().then(function(){ae(E._dbInfo,lt,function(P,U){if(P)return N(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.count();W.onsuccess=function(){R(W.result)},W.onerror=function(){N(W.error)}}catch(z){N(z)}})}).catch(N)});return b(S,_),S}function Lt(_,E){var S=this,R=new m(function(N,P){if(_<0){N(null);return}S.ready().then(function(){ae(S._dbInfo,lt,function(U,H){if(U)return P(U);try{var W=H.objectStore(S._dbInfo.storeName),z=!1,$=W.openKeyCursor();$.onsuccess=function(){var ce=$.result;if(!ce){N(null);return}_===0||z?N(ce.key):(z=!0,ce.advance(_))},$.onerror=function(){P($.error)}}catch(ce){P(ce)}})}).catch(P)});return b(R,E),R}function Oe(_){var E=this,S=new m(function(R,N){E.ready().then(function(){ae(E._dbInfo,lt,function(P,U){if(P)return N(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.openKeyCursor(),z=[];W.onsuccess=function(){var $=W.result;if(!$){R(z);return}z.push($.key),$.continue()},W.onerror=function(){N(W.error)}}catch($){N($)}})}).catch(N)});return b(S,_),S}function u(_,E){E=F.apply(this,arguments);var S=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||S.name,_.storeName=_.storeName||S.storeName);var R=this,N;if(!_.name)N=m.reject("Invalid arguments");else{var P=_.name===S.name&&R._dbInfo.db,U=P?m.resolve(R._dbInfo.db):jt(_).then(function(H){var W=q[_.name],z=W.forages;W.db=H;for(var $=0;$<z.length;$++)z[$]._dbInfo.db=H;return H});_.storeName?N=U.then(function(H){if(H.objectStoreNames.contains(_.storeName)){var W=H.version+1;Be(_);var z=q[_.name],$=z.forages;H.close();for(var ce=0;ce<$.length;ce++){var Ye=$[ce];Ye._dbInfo.db=null,Ye._dbInfo.version=W}var St=new m(function(Et,Kt){var Zt=d.open(_.name,W);Zt.onerror=function(On){var Uh=Zt.result;Uh.close(),Kt(On)},Zt.onupgradeneeded=function(){var On=Zt.result;On.deleteObjectStore(_.storeName)},Zt.onsuccess=function(){var On=Zt.result;On.close(),Et(On)}});return St.then(function(Et){z.db=Et;for(var Kt=0;Kt<$.length;Kt++){var Zt=$[Kt];Zt._dbInfo.db=Et,ct(Zt._dbInfo)}}).catch(function(Et){throw(at(_,Et)||m.resolve()).catch(function(){}),Et})}}):N=U.then(function(H){Be(_);var W=q[_.name],z=W.forages;H.close();for(var $=0;$<z.length;$++){var ce=z[$];ce._dbInfo.db=null}var Ye=new m(function(St,Et){var Kt=d.deleteDatabase(_.name);Kt.onerror=function(){var Zt=Kt.result;Zt&&Zt.close(),Et(Kt.error)},Kt.onblocked=function(){console.warn('dropInstance blocked for database "'+_.name+'" until all open connections are closed')},Kt.onsuccess=function(){var Zt=Kt.result;Zt&&Zt.close(),St(Zt)}});return Ye.then(function(St){W.db=St;for(var Et=0;Et<z.length;Et++){var Kt=z[Et];ct(Kt._dbInfo)}}).catch(function(St){throw(at(_,St)||m.resolve()).catch(function(){}),St})})}return b(N,E),N}var p={_driver:"asyncStorage",_initStorage:ye,_support:f(),iterate:Ce,getItem:de,setItem:je,removeItem:At,clear:He,length:Je,key:Lt,keys:Oe,dropInstance:u};function v(){return typeof openDatabase=="function"}var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L="~~local_forage_type~",B=/^~~local_forage_type~([^~]+)~/,K="__lfsc__:",et=K.length,qe="arbf",Fe="blob",ut="si08",J="ui08",De="uic8",me="si16",tt="si32",wn="ur16",lr="ui32",st="fl32",ve="fl64",En=et+qe.length,cs=Object.prototype.toString;function za(_){var E=_.length*.75,S=_.length,R,N=0,P,U,H,W;_[_.length-1]==="="&&(E--,_[_.length-2]==="="&&E--);var z=new ArrayBuffer(E),$=new Uint8Array(z);for(R=0;R<S;R+=4)P=T.indexOf(_[R]),U=T.indexOf(_[R+1]),H=T.indexOf(_[R+2]),W=T.indexOf(_[R+3]),$[N++]=P<<2|U>>4,$[N++]=(U&15)<<4|H>>2,$[N++]=(H&3)<<6|W&63;return z}function xh(_){var E=new Uint8Array(_),S="",R;for(R=0;R<E.length;R+=3)S+=T[E[R]>>2],S+=T[(E[R]&3)<<4|E[R+1]>>4],S+=T[(E[R+1]&15)<<2|E[R+2]>>6],S+=T[E[R+2]&63];return E.length%3===2?S=S.substring(0,S.length-1)+"=":E.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function GD(_,E){var S="";if(_&&(S=cs.call(_)),_&&(S==="[object ArrayBuffer]"||_.buffer&&cs.call(_.buffer)==="[object ArrayBuffer]")){var R,N=K;_ instanceof ArrayBuffer?(R=_,N+=qe):(R=_.buffer,S==="[object Int8Array]"?N+=ut:S==="[object Uint8Array]"?N+=J:S==="[object Uint8ClampedArray]"?N+=De:S==="[object Int16Array]"?N+=me:S==="[object Uint16Array]"?N+=wn:S==="[object Int32Array]"?N+=tt:S==="[object Uint32Array]"?N+=lr:S==="[object Float32Array]"?N+=st:S==="[object Float64Array]"?N+=ve:E(new Error("Failed to get type for BinaryArray"))),E(N+xh(R))}else if(S==="[object Blob]"){var P=new FileReader;P.onload=function(){var U=L+_.type+"~"+xh(this.result);E(K+Fe+U)},P.readAsArrayBuffer(_)}else try{E(JSON.stringify(_))}catch(U){console.error("Couldn't convert value into a JSON string: ",_),E(null,U)}}function zD(_){if(_.substring(0,et)!==K)return JSON.parse(_);var E=_.substring(En),S=_.substring(et,En),R;if(S===Fe&&B.test(E)){var N=E.match(B);R=N[1],E=E.substring(N[0].length)}var P=za(E);switch(S){case qe:return P;case Fe:return g([P],{type:R});case ut:return new Int8Array(P);case J:return new Uint8Array(P);case De:return new Uint8ClampedArray(P);case me:return new Int16Array(P);case wn:return new Uint16Array(P);case tt:return new Int32Array(P);case lr:return new Uint32Array(P);case st:return new Float32Array(P);case ve:return new Float64Array(P);default:throw new Error("Unkown type: "+S)}}var Nh={serialize:GD,deserialize:zD,stringToBuffer:za,bufferToString:xh};function jE(_,E,S,R){_.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],S,R)}function WD(_){var E=this,S={db:null};if(_)for(var R in _)S[R]=typeof _[R]!="string"?_[R].toString():_[R];var N=new m(function(P,U){try{S.db=openDatabase(S.name,String(S.version),S.description,S.size)}catch(H){return U(H)}S.db.transaction(function(H){jE(H,S,function(){E._dbInfo=S,P()},function(W,z){U(z)})},U)});return S.serializer=Nh,N}function Zi(_,E,S,R,N,P){_.executeSql(S,R,N,function(U,H){H.code===H.SYNTAX_ERR?U.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[E.storeName],function(W,z){z.rows.length?P(W,H):jE(W,E,function(){W.executeSql(S,R,N,P)},P)},P):P(U,H)},P)}function qD(_,E){var S=this;_=A(_);var R=new m(function(N,P){S.ready().then(function(){var U=S._dbInfo;U.db.transaction(function(H){Zi(H,U,"SELECT * FROM "+U.storeName+" WHERE key = ? LIMIT 1",[_],function(W,z){var $=z.rows.length?z.rows.item(0).value:null;$&&($=U.serializer.deserialize($)),N($)},function(W,z){P(z)})})}).catch(P)});return b(R,E),R}function YD(_,E){var S=this,R=new m(function(N,P){S.ready().then(function(){var U=S._dbInfo;U.db.transaction(function(H){Zi(H,U,"SELECT * FROM "+U.storeName,[],function(W,z){for(var $=z.rows,ce=$.length,Ye=0;Ye<ce;Ye++){var St=$.item(Ye),Et=St.value;if(Et&&(Et=U.serializer.deserialize(Et)),Et=_(Et,St.key,Ye+1),Et!==void 0){N(Et);return}}N()},function(W,z){P(z)})})}).catch(P)});return b(R,E),R}function HE(_,E,S,R){var N=this;_=A(_);var P=new m(function(U,H){N.ready().then(function(){E===void 0&&(E=null);var W=E,z=N._dbInfo;z.serializer.serialize(E,function($,ce){ce?H(ce):z.db.transaction(function(Ye){Zi(Ye,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[_,$],function(){U(W)},function(St,Et){H(Et)})},function(Ye){if(Ye.code===Ye.QUOTA_ERR){if(R>0){U(HE.apply(N,[_,W,S,R-1]));return}H(Ye)}})})}).catch(H)});return b(P,S),P}function XD(_,E,S){return HE.apply(this,[_,E,S,1])}function ZD(_,E){var S=this;_=A(_);var R=new m(function(N,P){S.ready().then(function(){var U=S._dbInfo;U.db.transaction(function(H){Zi(H,U,"DELETE FROM "+U.storeName+" WHERE key = ?",[_],function(){N()},function(W,z){P(z)})})}).catch(P)});return b(R,E),R}function KD(_){var E=this,S=new m(function(R,N){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Zi(U,P,"DELETE FROM "+P.storeName,[],function(){R()},function(H,W){N(W)})})}).catch(N)});return b(S,_),S}function JD(_){var E=this,S=new m(function(R,N){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Zi(U,P,"SELECT COUNT(key) as c FROM "+P.storeName,[],function(H,W){var z=W.rows.item(0).c;R(z)},function(H,W){N(W)})})}).catch(N)});return b(S,_),S}function fk(_,E){var S=this,R=new m(function(N,P){S.ready().then(function(){var U=S._dbInfo;U.db.transaction(function(H){Zi(H,U,"SELECT key FROM "+U.storeName+" WHERE id = ? LIMIT 1",[_+1],function(W,z){var $=z.rows.length?z.rows.item(0).key:null;N($)},function(W,z){P(z)})})}).catch(P)});return b(R,E),R}function Ek(_){var E=this,S=new m(function(R,N){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Zi(U,P,"SELECT key FROM "+P.storeName,[],function(H,W){for(var z=[],$=0;$<W.rows.length;$++)z.push(W.rows.item($).key);R(z)},function(H,W){N(W)})})}).catch(N)});return b(S,_),S}function jk(_){return new m(function(E,S){_.transaction(function(R){R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(N,P){for(var U=[],H=0;H<P.rows.length;H++)U.push(P.rows.item(H).name);E({db:_,storeNames:U})},function(N,P){S(P)})},function(R){S(R)})})}function $k(_,E){E=F.apply(this,arguments);var S=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||S.name,_.storeName=_.storeName||S.storeName);var R=this,N;return _.name?N=new m(function(P){var U;_.name===S.name?U=R._dbInfo.db:U=openDatabase(_.name,"","",0),_.storeName?P({db:U,storeNames:[_.storeName]}):P(jk(U))}).then(function(P){return new m(function(U,H){P.db.transaction(function(W){function z(St){return new m(function(Et,Kt){W.executeSql("DROP TABLE IF EXISTS "+St,[],function(){Et()},function(Zt,On){Kt(On)})})}for(var $=[],ce=0,Ye=P.storeNames.length;ce<Ye;ce++)$.push(z(P.storeNames[ce]));m.all($).then(function(){U()}).catch(function(St){H(St)})},function(W){H(W)})})}):N=m.reject("Invalid arguments"),b(N,E),N}var Wk={_driver:"webSQLStorage",_initStorage:WD,_support:v(),iterate:YD,getItem:qD,setItem:XD,removeItem:ZD,clear:KD,length:JD,key:fk,keys:Ek,dropInstance:$k};function tR(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function $E(_,E){var S=_.name+"/";return _.storeName!==E.storeName&&(S+=_.storeName+"/"),S}function rR(){var _="_localforage_support_test";try{return localStorage.setItem(_,!0),localStorage.removeItem(_),!1}catch{return!0}}function nR(){return!rR()||localStorage.length>0}function iR(_){var E=this,S={};if(_)for(var R in _)S[R]=_[R];return S.keyPrefix=$E(_,E._defaultConfig),nR()?(E._dbInfo=S,S.serializer=Nh,m.resolve()):m.reject()}function sR(_){var E=this,S=E.ready().then(function(){for(var R=E._dbInfo.keyPrefix,N=localStorage.length-1;N>=0;N--){var P=localStorage.key(N);P.indexOf(R)===0&&localStorage.removeItem(P)}});return b(S,_),S}function oR(_,E){var S=this;_=A(_);var R=S.ready().then(function(){var N=S._dbInfo,P=localStorage.getItem(N.keyPrefix+_);return P&&(P=N.serializer.deserialize(P)),P});return b(R,E),R}function aR(_,E){var S=this,R=S.ready().then(function(){for(var N=S._dbInfo,P=N.keyPrefix,U=P.length,H=localStorage.length,W=1,z=0;z<H;z++){var $=localStorage.key(z);if($.indexOf(P)===0){var ce=localStorage.getItem($);if(ce&&(ce=N.serializer.deserialize(ce)),ce=_(ce,$.substring(U),W++),ce!==void 0)return ce}}});return b(R,E),R}function lR(_,E){var S=this,R=S.ready().then(function(){var N=S._dbInfo,P;try{P=localStorage.key(_)}catch{P=null}return P&&(P=P.substring(N.keyPrefix.length)),P});return b(R,E),R}function cR(_){var E=this,S=E.ready().then(function(){for(var R=E._dbInfo,N=localStorage.length,P=[],U=0;U<N;U++){var H=localStorage.key(U);H.indexOf(R.keyPrefix)===0&&P.push(H.substring(R.keyPrefix.length))}return P});return b(S,_),S}function uR(_){var E=this,S=E.keys().then(function(R){return R.length});return b(S,_),S}function hR(_,E){var S=this;_=A(_);var R=S.ready().then(function(){var N=S._dbInfo;localStorage.removeItem(N.keyPrefix+_)});return b(R,E),R}function dR(_,E,S){var R=this;_=A(_);var N=R.ready().then(function(){E===void 0&&(E=null);var P=E;return new m(function(U,H){var W=R._dbInfo;W.serializer.serialize(E,function(z,$){if($)H($);else try{localStorage.setItem(W.keyPrefix+_,z),U(P)}catch(ce){(ce.name==="QuotaExceededError"||ce.name==="NS_ERROR_DOM_QUOTA_REACHED")&&H(ce),H(ce)}})})});return b(N,S),N}function pR(_,E){if(E=F.apply(this,arguments),_=typeof _!="function"&&_||{},!_.name){var S=this.config();_.name=_.name||S.name,_.storeName=_.storeName||S.storeName}var R=this,N;return _.name?N=new m(function(P){_.storeName?P($E(_,R._defaultConfig)):P(_.name+"/")}).then(function(P){for(var U=localStorage.length-1;U>=0;U--){var H=localStorage.key(U);H.indexOf(P)===0&&localStorage.removeItem(H)}}):N=m.reject("Invalid arguments"),b(N,E),N}var fR={_driver:"localStorageWrapper",_initStorage:iR,_support:tR(),iterate:aR,getItem:oR,setItem:dR,removeItem:hR,clear:sR,length:uR,key:lR,keys:cR,dropInstance:pR},gR=function(_,E){return _===E||typeof _=="number"&&typeof E=="number"&&isNaN(_)&&isNaN(E)},mR=function(_,E){for(var S=_.length,R=0;R<S;){if(gR(_[R],E))return!0;R++}return!1},GE=Array.isArray||function(_){return Object.prototype.toString.call(_)==="[object Array]"},Ml={},WE={},js={INDEXEDDB:p,WEBSQL:Wk,LOCALSTORAGE:fR},vR=[js.INDEXEDDB._driver,js.WEBSQL._driver,js.LOCALSTORAGE._driver],Dc=["dropInstance"],Rh=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Dc),_R={description:"",driver:vR.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function yR(_,E){_[E]=function(){var S=arguments;return _.ready().then(function(){return _[E].apply(_,S)})}}function Ah(){for(var _=1;_<arguments.length;_++){var E=arguments[_];if(E)for(var S in E)E.hasOwnProperty(S)&&(GE(E[S])?arguments[0][S]=E[S].slice():arguments[0][S]=E[S])}return arguments[0]}var wR=function(){function _(E){c(this,_);for(var S in js)if(js.hasOwnProperty(S)){var R=js[S],N=R._driver;this[S]=N,Ml[N]||this.defineDriver(R)}this._defaultConfig=Ah({},_R),this._config=Ah({},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 S in E){if(S==="storeName"&&(E[S]=E[S].replace(/\W/g,"_")),S==="version"&&typeof E[S]!="number")return new Error("Database version must be a number.");this._config[S]=E[S]}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,S,R){var N=new m(function(P,U){try{var H=E._driver,W=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!E._driver){U(W);return}for(var z=Rh.concat("_initStorage"),$=0,ce=z.length;$<ce;$++){var Ye=z[$],St=!mR(Dc,Ye);if((St||E[Ye])&&typeof E[Ye]!="function"){U(W);return}}var Et=function(){for(var Zt=function(ER){return function(){var SR=new Error("Method "+ER+" is not implemented by the current driver"),eI=m.reject(SR);return b(eI,arguments[arguments.length-1]),eI}},On=0,Uh=Dc.length;On<Uh;On++){var Vh=Dc[On];E[Vh]||(E[Vh]=Zt(Vh))}};Et();var Kt=function(Zt){Ml[H]&&console.info("Redefining LocalForage driver: "+H),Ml[H]=E,WE[H]=Zt,P()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(Kt,U):Kt(!!E._support):Kt(!0)}catch(Zt){U(Zt)}});return I(N,S,R),N},_.prototype.driver=function(){return this._driver||null},_.prototype.getDriver=function(E,S,R){var N=Ml[E]?m.resolve(Ml[E]):m.reject(new Error("Driver not found."));return I(N,S,R),N},_.prototype.getSerializer=function(E){var S=m.resolve(Nh);return I(S,E),S},_.prototype.ready=function(E){var S=this,R=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return I(R,E,E),R},_.prototype.setDriver=function(E,S,R){var N=this;GE(E)||(E=[E]);var P=this._getSupportedDrivers(E);function U(){N._config.driver=N.driver()}function H($){return N._extend($),U(),N._ready=N._initStorage(N._config),N._ready}function W($){return function(){var ce=0;function Ye(){for(;ce<$.length;){var St=$[ce];return ce++,N._dbInfo=null,N._ready=null,N.getDriver(St).then(H).catch(Ye)}U();var Et=new Error("No available storage method found.");return N._driverSet=m.reject(Et),N._driverSet}return Ye()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=z.then(function(){var $=P[0];return N._dbInfo=null,N._ready=null,N.getDriver($).then(function(ce){N._driver=ce._driver,U(),N._wrapLibraryMethodsWithReady(),N._initDriver=W(P)})}).catch(function(){U();var $=new Error("No available storage method found.");return N._driverSet=m.reject($),N._driverSet}),I(this._driverSet,S,R),this._driverSet},_.prototype.supports=function(E){return!!WE[E]},_.prototype._extend=function(E){Ah(this,E)},_.prototype._getSupportedDrivers=function(E){for(var S=[],R=0,N=E.length;R<N;R++){var P=E[R];this.supports(P)&&S.push(P)}return S},_.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,S=Rh.length;E<S;E++)yR(this,Rh[E])},_.prototype.createInstance=function(E){return new _(E)},_}(),bR=new wR;o.exports=bR},{3:3}]},{},[4])(4)})}),Lf=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class tI{static escapeHtml(n){return String(n).replace(/"/g,i=>tI.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"&quot;"}}),$_=$n((e,t)=>{"use strict";(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.fetchRetry=n())})(e,function(){"use strict";var r=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!n(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!n(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(a,o),function(l,c){var h=o.retries,d=o.retryDelay,f=o.retryOn;if(c&&c.retries!==void 0)if(n(c.retries))h=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(n(c.retryDelay)||typeof c.retryDelay=="function")d=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(A){var F=typeof Request<"u"&&l instanceof Request?l.clone():l;s(F,c).then(function(V){if(Array.isArray(f)&&f.indexOf(V.status)===-1)g(V);else if(typeof f=="function")try{return Promise.resolve(f(A,null,V)).then(function(M){M?I(A,null,V):g(V)}).catch(m)}catch(M){m(M)}else A<h?I(A,null,V):g(V)}).catch(function(V){if(typeof f=="function")try{Promise.resolve(f(A,V,null)).then(function(M){M?I(A,V,null):m(V)}).catch(function(M){m(M)})}catch(M){m(M)}else A<h?I(A,V,null):m(V)})};function I(A,F,V){var M=typeof d=="function"?d(A,F,V):d;setTimeout(function(){b(++A)},M)}b(0)})}};function n(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return r})}),dp=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PriceRuleType=e.DiscountType=void 0;var t=function(n){return n[n.NONE=0]="NONE",n[n.STATIC=1]="STATIC",n[n.UNIQUE_FLAT=2]="UNIQUE_FLAT",n[n.UNIQUE_FLAT_ITEMS=3]="UNIQUE_FLAT_ITEMS",n[n.UNIQUE_FIXED_ITEMS=4]="UNIQUE_FIXED_ITEMS",n[n.UNIQUE_CHEAPEST_ITEM_FREE=5]="UNIQUE_CHEAPEST_ITEM_FREE",n[n.BXGY=6]="BXGY",n}(t||(e.DiscountType=t={})),r=function(n){return n.FIXED_AMOUNT="fixed_amount",n.PERCENTAGE="percentage",n}(r||(e.PriceRuleType=r={}))}),W_=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLBuilder=void 0;var t=function(){function r(n){try{this.base=new URL(n),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return r.prototype.appendQueryParam=function(n,i){this.params.append(n,i?i.toString():"")},r.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},r.prototype.deleteQueryParam=function(n){this.params.delete(n)},r.prototype.getBase=function(){return this.base},r.prototype.getPath=function(){return this.base.pathname},r.prototype.getHostname=function(){return this.base.hostname},r.prototype.getParams=function(){return this.params},r.prototype.getQueryParam=function(n){if(!this.params)return"";var i=this.params.get(n);return!i||i==="undefined"||i==="null"?void 0:i},r.prototype.getQueryString=function(){return this.params.toString()},r.prototype.setPath=function(n){return this.base.pathname=n,this},r.prototype.setQueryParam=function(n,i){return this.params.set(n,i?i.toString():""),this},r.prototype.setQueryString=function(n){if(n)return n[0]==="?"&&(n=n.slice(1)),this.params=new URLSearchParams(n),this},r.prototype.toString=function(){var n=this.params.toString();return n===""?this.base.search="":this.base.search="?"+n,this.base.toString()},r}();e.URLBuilder=t}),Y_=$n((e,t)=>{"use strict";(function(r,n){"use strict";var i="1.0.40",s="",o="?",a="function",l="undefined",c="object",h="string",d="major",f="model",g="name",m="type",b="vendor",I="version",A="architecture",F="console",V="mobile",M="tablet",q="smarttv",Me="wearable",lt="embedded",j=500,fe="Amazon",te="Apple",pe="ASUS",Be="BlackBerry",ct="Browser",at="Chrome",y="Edge",jt="Firefox",Ke="Google",Qt="Huawei",Se="LG",D="Microsoft",x="Motorola",Z="Opera",ne="Samsung",ae="Sharp",Ee="Sony",ye="Xiaomi",de="Zebra",Ce="Facebook",je="Chromium OS",At="Mac OS",He=" Browser",Je=function(J,De){var me={};for(var tt in J)De[tt]&&De[tt].length%2===0?me[tt]=De[tt].concat(J[tt]):me[tt]=J[tt];return me},Lt=function(J){for(var De={},me=0;me<J.length;me++)De[J[me].toUpperCase()]=J[me];return De},Oe=function(J,De){return typeof J===h?u(De).indexOf(u(J))!==-1:!1},u=function(J){return J.toLowerCase()},p=function(J){return typeof J===h?J.replace(/[^\d\.]/g,s).split(".")[0]:n},v=function(J,De){if(typeof J===h)return J=J.replace(/^\s\s*/,s),typeof De===l?J:J.substring(0,j)},T=function(J,De){for(var me=0,tt,wn,lr,st,ve,En;me<De.length&&!ve;){var cs=De[me],za=De[me+1];for(tt=wn=0;tt<cs.length&&!ve&&cs[tt];)if(ve=cs[tt++].exec(J),ve)for(lr=0;lr<za.length;lr++)En=ve[++wn],st=za[lr],typeof st===c&&st.length>0?st.length===2?typeof st[1]==a?this[st[0]]=st[1].call(this,En):this[st[0]]=st[1]:st.length===3?typeof st[1]===a&&!(st[1].exec&&st[1].test)?this[st[0]]=En?st[1].call(this,En,st[2]):n:this[st[0]]=En?En.replace(st[1],st[2]):n:st.length===4&&(this[st[0]]=En?st[3].call(this,En.replace(st[1],st[2])):n):this[st]=En||n;me+=2}},L=function(J,De){for(var me in De)if(typeof De[me]===c&&De[me].length>0){for(var tt=0;tt<De[me].length;tt++)if(Oe(De[me][tt],J))return me===o?n:me}else if(Oe(De[me],J))return me===o?n:me;return De.hasOwnProperty("*")?De["*"]:J},B={"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,Z+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[I,[g,Z+" GX"]],[/\bopr\/([\w\.]+)/i],[I,[g,Z]],[/\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"+ct]],[/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 "+ct]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+ct],I],[/\bfocus\/([\w\.]+)/i],[I,[g,jt+" Focus"]],[/\bopt\/([\w\.]+)/i],[I,[g,Z+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[I,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[I,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[I,[g,Z+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[I,[g,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[I,[g,jt]],[/\bqihoobrowser\/?([\w\.]*)/i],[I,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],I],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+He],I],[/samsungbrowser\/([\w\.]+)/i],[I,[g,ne+" 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,Ce],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,at+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,at+" WebView"],I],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[I,[g,"Android "+ct]],[/(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,B]],[/(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,jt+" 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],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,u]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,s,u]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,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,ne],[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,ne],[m,V]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[b,te],[m,V]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[b,te],[m,M]],[/(macintosh);/i],[f,[b,te]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[b,ae],[m,V]],[/(?:honor)([-\w ]+)[;\)]/i],[f,[b,"Honor"],[m,V]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[b,Qt],[m,M]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[b,Qt],[m,V]],[/\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,ye],[m,V]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[b,ye],[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,V]],[/\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,V]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[b,"Realme"],[m,V]],[/\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,V]],[/\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,Se],[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,Se],[m,V]],[/(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,V]],[/(pixel c)\b/i],[f,[b,Ke],[m,M]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[b,Ke],[m,V]],[/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,Ee],[m,V]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[b,Ee],[m,M]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[b,"OnePlus"],[m,V]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[b,fe],[m,M]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[b,fe],[m,V]],[/(playbook);[-\w\),; ]+(rim)/i],[f,b,[m,M]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[b,Be],[m,V]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[b,pe],[m,M]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[b,pe],[m,V]],[/(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,V]],[/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,V]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[b,"Ulefone"],[m,V]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[b,"Energizer"],[m,V]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[b,"Cat"],[m,V]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[b,"Smartfren"],[m,V]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[b,"Nothing"],[m,V]],[/(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,V]],[/(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,V]],[/(u304aa)/i],[f,[b,"AT&T"],[m,V]],[/\bsie-(\w*)/i],[f,[b,"Siemens"],[m,V]],[/\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,V]],[/\b(gen\d{3}) b.+49h/i],[f,[b,"Swiss"],[m,V]],[/\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,V]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],f,[m,V]],[/\b(ph-1) /i],[f,[b,"Essential"],[m,V]],[/\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,V]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[b,D],[m,V]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[b,de],[m,M]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[b,de],[m,V]],[/smart-tv.+(samsung)/i],[b,[m,q]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[b,ne],[m,q]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Se],[m,q]],[/(apple) ?tv/i],[b,[f,te+" TV"],[m,q]],[/crkey/i],[[f,at+"cast"],[b,Ke],[m,q]],[/droid.+aft(\w+)( bui|\))/i],[f,[b,fe],[m,q]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[b,ae],[m,q]],[/(bravia[\w ]+)( bui|\))/i],[f,[b,Ee],[m,q]],[/(mitv-\w{5}) bui/i],[f,[b,ye],[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,F]],[/droid.+; (shield) bui/i],[f,[b,"Nvidia"],[m,F]],[/(playstation [345portablevi]+)/i],[f,[b,Ee],[m,F]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[b,D],[m,F]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[b,ne],[m,Me]],[/((pebble))app/i],[b,f,[m,Me]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[b,te],[m,Me]],[/droid.+; (glass) \d/i],[f,[b,Ke],[m,Me]],[/droid.+; (wt63?0{2,3})\)/i],[f,[b,de],[m,Me]],[/droid.+; (glass) \d/i],[f,[b,Ke],[m,Me]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,f,[m,Me]],[/; (quest( \d| pro)?)/i],[f,[b,Ce],[m,Me]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,lt]],[/(aeobc)\b/i],[f,[b,fe],[m,lt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[m,V]],[/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,V]],[/(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,At],[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,Be]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[I,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[I,[g,jt+" 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,at+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,je],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]]},qe=function(J,De){if(typeof J===c&&(De=J,J=n),!(this instanceof qe))return new qe(J,De).getResult();var me=typeof r!==l&&r.navigator?r.navigator:n,tt=J||(me&&me.userAgent?me.userAgent:s),wn=me&&me.userAgentData?me.userAgentData:n,lr=De?Je(et,De):et,st=me&&me.userAgent==tt;return this.getBrowser=function(){var ve={};return ve[g]=n,ve[I]=n,T.call(ve,tt,lr.browser),ve[d]=p(ve[I]),st&&me&&me.brave&&typeof me.brave.isBrave==a&&(ve[g]="Brave"),ve},this.getCPU=function(){var ve={};return ve[A]=n,T.call(ve,tt,lr.cpu),ve},this.getDevice=function(){var ve={};return ve[b]=n,ve[f]=n,ve[m]=n,T.call(ve,tt,lr.device),st&&!ve[m]&&wn&&wn.mobile&&(ve[m]=V),st&&ve[f]=="Macintosh"&&me&&typeof me.standalone!==l&&me.maxTouchPoints&&me.maxTouchPoints>2&&(ve[f]="iPad",ve[m]=M),ve},this.getEngine=function(){var ve={};return ve[g]=n,ve[I]=n,T.call(ve,tt,lr.engine),ve},this.getOS=function(){var ve={};return ve[g]=n,ve[I]=n,T.call(ve,tt,lr.os),st&&!ve[g]&&wn&&wn.platform&&wn.platform!="Unknown"&&(ve[g]=wn.platform.replace(/chrome os/i,je).replace(/macos/i,At)),ve},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(ve){return tt=typeof ve===h&&ve.length>j?v(ve,j):ve,this},this.setUA(tt),this};qe.VERSION=i,qe.BROWSER=Lt([g,I,d]),qe.CPU=Lt([A]),qe.DEVICE=Lt([f,b,m,F,V,q,M,Me,lt]),qe.ENGINE=qe.OS=Lt([g,I]),typeof e!==l?(typeof t!==l&&t.exports&&(e=t.exports=qe),e.UAParser=qe):typeof define===a&&define.amd?define(function(){return qe}):typeof r!==l&&(r.UAParser=qe);var Fe=typeof r!==l&&(r.jQuery||r.Zepto);if(Fe&&!Fe.ua){var ut=new qe;Fe.ua=ut.getResult(),Fe.ua.get=function(){return ut.getUA()},Fe.ua.set=function(J){ut.setUA(J);var De=ut.getResult();for(var me in De)Fe.ua[me]=De[me]}}})(typeof window=="object"?window:e)}),Z_=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayUtils=void 0;var t=class yT{static of(n,i){return i!==void 0?new Array(n).fill(i):Array.from({length:n},(s,o)=>o)}static remove(n,i){let s=n.indexOf(i);return s===-1?!1:(n.splice(s,1),!0)}static swap(n,i,s){[n[i],n[s]]=[n[s],n[i]]}static sum(n,i){return n.reduce((s,o)=>s+Math.max(i?i(o):+o,0),0)}static unique(n,i){return n.filter((s,o,a)=>a.findIndex(l=>l[i]===s[i])===o)}static shuffle(n){let i=n.length;for(;i!=0;){let s=Math.floor(Math.random()*i);i--,yT.swap(n,i,s)}}};e.ArrayUtils=t}),Ix=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssetType=void 0;var t=function(r){return r[r.IMAGE=1]="IMAGE",r[r.VIDEO=2]="VIDEO",r[r.GIF=3]="GIF",r[r.SCREENSHOT=4]="SCREENSHOT",r[r.THREE_D=5]="THREE_D",r[r.FONT=6]="FONT",r[r.TEXT=7]="TEXT",r[r.JSON=8]="JSON",r[r.SVG=9]="SVG",r[r.HTML=10]="HTML",r[r.LOGO=11]="LOGO",r[r.OTHERS=1e3]="OTHERS",r}(t||(e.AssetType=t={}))}),xx=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TemplateStatus=void 0;var t=function(r){return r[r.DRAFT=1]="DRAFT",r[r.PUBLISHED=2]="PUBLISHED",r[r.DISABLED=3]="DISABLED",r}(t||(e.TemplateStatus=t={}))}),Nx=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=void 0;var t=function(r){return r.VIEW_ITEM="VIEW_ITEM",r.ADD_TO_CART="ADD_TO_CART",r.VIEW_CATEGORY="VIEW_CATEGORY",r.VIEW_TAG="VIEW_TAG",r.SEARCH="SEARCH",r.APPLY_COUPON="APPLY_COUPON",r}(t||(e.ActionType=t={}))}),Ax=$n(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=e&&e.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(Ix(),e),r(xx(),e),r(Yn(),e),r(Nx(),e)});function qR(e,t){return Object.is(e,t)}var en=null,au=!1,zh=1,Ci=Symbol("SIGNAL");function $e(e){let t=en;return en=e,t}function ZE(){return en}var cu={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 XE(e){if(au)throw new Error("");if(en===null)return;en.consumerOnSignalRead(e);let t=en.nextProducerIndex++;if(uu(en),t<en.producerNode.length&&en.producerNode[t]!==e&&Tc(en)){let r=en.producerNode[t];lu(r,en.producerIndexOfThis[t])}en.producerNode[t]!==e&&(en.producerNode[t]=e,en.producerIndexOfThis[t]=Tc(en)?tw(e,en,t):0),en.producerLastReadVersion[t]=e.version}function YR(){zh++}function KR(e){if(!(Tc(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===zh)){if(!e.producerMustRecompute(e)&&!Yh(e)){KE(e);return}e.producerRecomputeValue(e),KE(e)}}function JE(e){if(e.liveConsumerNode===void 0)return;let t=au;au=!0;try{for(let r of e.liveConsumerNode)r.dirty||ZR(r)}finally{au=t}}function QE(){return en?.consumerAllowSignalWrites!==!1}function ZR(e){e.dirty=!0,JE(e),e.consumerMarkedDirty?.(e)}function KE(e){e.dirty=!1,e.lastCleanEpoch=zh}function qh(e){return e&&(e.nextProducerIndex=0),$e(e)}function ew(e,t){if($e(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(Tc(e))for(let r=e.nextProducerIndex;r<e.producerNode.length;r++)lu(e.producerNode[r],e.producerIndexOfThis[r]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Yh(e){uu(e);for(let t=0;t<e.producerNode.length;t++){let r=e.producerNode[t],n=e.producerLastReadVersion[t];if(n!==r.version||(KR(r),n!==r.version))return!0}return!1}function Kh(e){if(uu(e),Tc(e))for(let t=0;t<e.producerNode.length;t++)lu(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 tw(e,t,r){if(nw(e),e.liveConsumerNode.length===0&&rw(e))for(let n=0;n<e.producerNode.length;n++)e.producerIndexOfThis[n]=tw(e.producerNode[n],e,n);return e.liveConsumerIndexOfThis.push(r),e.liveConsumerNode.push(t)-1}function lu(e,t){if(nw(e),e.liveConsumerNode.length===1&&rw(e))for(let n=0;n<e.producerNode.length;n++)lu(e.producerNode[n],e.producerIndexOfThis[n]);let r=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[r],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[r],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let n=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];uu(i),i.producerIndexOfThis[n]=t}}function Tc(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function uu(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function nw(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function rw(e){return e.producerNode!==void 0}function XR(){throw new Error}var iw=XR;function ow(e){iw(e)}function sw(e){iw=e}var JR=null;function aw(e){let t=Object.create(lw);t.value=e;let r=()=>(XE(t),t.value);return r[Ci]=t,r}function Zh(e,t){QE()||ow(e),e.equal(e.value,t)||(e.value=t,QR(e))}function cw(e,t){QE()||ow(e),Zh(e,t(e.value))}var lw=re(w({},cu),{equal:qR,value:void 0,kind:"signal"});function QR(e){e.version++,YR(),JE(e),JR?.()}function Ie(e){return typeof e=="function"}function du(e){let t=e(r=>{Error.call(r),r.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var fu=du(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
1
+ "use strict";(()=>{var BR=Object.create,Wh=Object.defineProperty,VR=Object.defineProperties,UR=Object.getOwnPropertyDescriptor,HR=Object.getOwnPropertyDescriptors,jR=Object.getOwnPropertyNames,GE=Object.getOwnPropertySymbols,$R=Object.getPrototypeOf,qE=Object.prototype.hasOwnProperty,WR=Object.prototype.propertyIsEnumerable,zE=(e,t,r)=>t in e?Wh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||={})qE.call(t,r)&&zE(e,r,t[r]);if(GE)for(var r of GE(t))WR.call(t,r)&&zE(e,r,t[r]);return e},re=(e,t)=>VR(e,HR(t)),Ic=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),$n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),GR=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jR(t))!qE.call(e,i)&&i!==r&&Wh(e,i,{get:()=>t[i],enumerable:!(n=UR(t,i))||n.enumerable});return e},Pe=(e,t,r)=>(r=e!=null?BR($R(e)):{},GR(t||!e||!e.__esModule?Wh(r,"default",{value:e,enumerable:!0}):r,e)),ls=$n((e,t)=>{"use strict";(function(r){"use strict";var n={};n.VERSION="1.6.1";var i,s={},o=function(d,f){return function(){return f.apply(d,arguments)}},a=function(){var d=arguments,f=d[0],g,m;for(m=1;m<d.length;m++)for(g in d[m])!(g in f)&&d[m].hasOwnProperty(g)&&(f[g]=d[m][g]);return f},l=function(d,f){return{value:d,name:f}};n.TRACE=l(1,"TRACE"),n.DEBUG=l(2,"DEBUG"),n.INFO=l(3,"INFO"),n.TIME=l(4,"TIME"),n.WARN=l(5,"WARN"),n.ERROR=l(8,"ERROR"),n.OFF=l(99,"OFF");var c=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};c.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var f=this.context.filterLevel;return d.value>=f.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(n.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(n.TIME,[d,"end"])},invoke:function(d,f){i&&this.enabledFor(d)&&i(f,a({level:d},this.context))}};var h=new c({filterLevel:n.OFF});(function(){var d=n;d.enabledFor=o(h,h.enabledFor),d.trace=o(h,h.trace),d.debug=o(h,h.debug),d.time=o(h,h.time),d.timeEnd=o(h,h.timeEnd),d.info=o(h,h.info),d.warn=o(h,h.warn),d.error=o(h,h.error),d.log=d.info})(),n.setHandler=function(d){i=d},n.setLevel=function(d){h.setLevel(d);for(var f in s)s.hasOwnProperty(f)&&s[f].setLevel(d)},n.getLevel=function(){return h.getLevel()},n.get=function(d){return s[d]||(s[d]=new c(a({name:d},h.context)))},n.createDefaultHandler=function(d){d=d||{},d.formatter=d.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,A;b.level===n.TIME?(A=(b.name?"["+b.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(A):f[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):g(I,[A+": "+(new Date().getTime()-f[A])+"ms"])):(b.level===n.WARN&&console.warn?I=console.warn:b.level===n.ERROR&&console.error?I=console.error:b.level===n.INFO&&console.info?I=console.info:b.level===n.DEBUG&&console.debug?I=console.debug:b.level===n.TRACE&&console.trace&&(I=console.trace),d.formatter(m,b),g(I,m))}},n.useDefaults=function(d){n.setLevel(d&&d.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(d))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof t<"u"&&t.exports?t.exports=n:(n._prevLogger=r.Logger,n.noConflict=function(){return r.Logger=n._prevLogger,n},r.Logger=n)})(e)}),Yn=$n(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={})),r=function(y){return y[y.ONE_TIME=1]="ONE_TIME",y[y.MULTIPLE=2]="MULTIPLE",y[y.RECURRING=3]="RECURRING",y}(r||(e.ScheduleFrequency=r={})),n=function(y){return y[y.NOW=1]="NOW",y[y.LATER=2]="LATER",y[y.NEVER=3]="NEVER",y}(n||(e.TimePreference=n={})),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={})),s=function(y){return y.CAMPAIGN="CAMPAIGN",y.NATIVE_AB="NATIVE_AB",y.CRO_COPILOT="CRO_COPILOT",y}(s||(e.EngagementType=s={})),o=function(y){return y[y.NONE=0]="NONE",y[y.RULE_BASED=1]="RULE_BASED",y[y.INTENT_BASED=2]="INTENT_BASED",y}(o||(e.TriggerType=o={})),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={})),h=function(y){return y.ALL="ALL",y.LOGGED_IN="LOGGED_IN",y.NON_LOGGED_IN="NON_LOGGED_IN",y}(h||(e.LoggedInVisitor=h={})),d=function(y){return y.ALL="ALL",y.PURCHASED="PURCHASED",y.NON_PURCHASED="NON_PURCHASED",y}(d||(e.PurchasedVisitor=d={})),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={})),A=function(y){return y[y.ALL=0]="ALL",y[y.INCLUDES=1]="INCLUDES",y[y.EXCLUDES=2]="EXCLUDES",y}(A||(e.CartCurrencyOperator=A={})),F=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}(F||(e.CartFilterEnum=F={})),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={})),Me=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}(Me||(e.RedirectBehaviour=Me={})),lt=function(y){return y.ONCE_IN_SESSION="ONCE_IN_SESSION",y.ACROSS_SESSIONS="ACROSS_SESSIONS",y}(lt||(e.FrequencyType=lt={})),j=function(y){return y.DAYS="DAYS",y.HOURS="HOURS",y.MINUTES="MINUTES",y.SECONDS="SECONDS",y}(j||(e.FrequencyGapUnit=j={})),fe=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}(fe||(e.ClickActionType=fe={})),te=function(y){return y.POPUP="POPUP",y.PAGE_EMBED="PAGE_EMBED",y.CART_EMBED="CART_EMBED",y.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",y}(te||(e.OnsiteDeliveryType=te={})),pe=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.EXPERIMENT="EXPERIMENT",y}(pe||(e.EngagementObjective=pe={})),Be=function(y){return y.COOEE="COOEE",y.KLAVIYO="KLAVIYO",y}(Be||(e.EngagementContentSource=Be={})),ct=function(y){return y.ICONS="ICONS",y.TILES="TILES",y}(ct||(e.ProgressBarLayout=ct={})),at=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}(at||(e.MilestoneRewardType=at={}))}),Sa=$n(e=>{"use strict";var t=e&&e.__awaiter||function(n,i,s,o){function a(l){return l instanceof s?l:new s(function(c){c(l)})}return new(s||(s=Promise))(function(l,c){function h(g){try{f(o.next(g))}catch(m){c(m)}}function d(g){try{f(o.throw(g))}catch(m){c(m)}}function f(g){g.done?l(g.value):a(g.value).then(h,d)}f((o=o.apply(n,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.JSUtils=void 0;var r=class{static isObject(n){return typeof n=="object"&&!Array.isArray(n)&&n!==null}static parseToAny(n){try{return JSON.parse(n.toString())}catch{}return n.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(n.toString()):n}static sleep(n){return t(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,n))})}static hasKeys(n){return n?Object.keys(n).length>=1:!1}static convertObjectToArray(n,i){return i.reduce((s,o)=>(n.hasOwnProperty(o)&&n[o]!=null&&s.push({[o]:n[o]}),s),[])}static removeNullUndefinedKeys(n){return Object.keys(n).reduce((i,s)=>(n[s]!==null&&n[s]!==void 0&&(i[s]=n[s]),i),{})}static stringify(n){return JSON.stringify(n,function(i,s){return s===void 0?null:s})}};e.JSUtils=r,r.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)/)}),JD=$n((e,t)=>{"use strict";(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){var r,n,i;return function s(o,a,l){function c(f,g){if(!a[f]){if(!o[f]){var m=typeof Ic=="function"&&Ic;if(!g&&m)return m(f,!0);if(h)return h(f,!0);var b=new Error("Cannot find module '"+f+"'");throw b.code="MODULE_NOT_FOUND",b}var I=a[f]={exports:{}};o[f][0].call(I.exports,function(A){var F=o[f][1][A];return c(F||A)},I,I.exports,s,o,a,l)}return a[f].exports}for(var h=typeof Ic=="function"&&Ic,d=0;d<l.length;d++)c(l[d]);return c}({1:[function(s,o,a){(function(l){"use strict";var c=l.MutationObserver||l.WebKitMutationObserver,h;if(c){var d=0,f=new c(A),g=l.document.createTextNode("");f.observe(g,{characterData:!0}),h=function(){g.data=d=++d%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var m=new l.MessageChannel;m.port1.onmessage=A,h=function(){m.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?h=function(){var U=l.document.createElement("script");U.onreadystatechange=function(){A(),U.onreadystatechange=null,U.parentNode.removeChild(U),U=null},l.document.documentElement.appendChild(U)}:h=function(){setTimeout(A,0)};var b,I=[];function A(){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}o.exports=F;function F(U){I.push(U)===1&&!b&&h()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,a){"use strict";var l=s(1);function c(){}var h={},d=["REJECTED"],f=["FULFILLED"],g=["PENDING"];o.exports=m;function m(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,j!==c&&F(this,j)}m.prototype.catch=function(j){return this.then(null,j)},m.prototype.then=function(j,fe){if(typeof j!="function"&&this.state===f||typeof fe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==g){var pe=this.state===f?j:fe;I(te,pe,this.outcome)}else this.queue.push(new b(te,j,fe));return te};function b(j,fe,te){this.promise=j,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(j){h.resolve(this.promise,j)},b.prototype.otherCallFulfilled=function(j){I(this.promise,this.onFulfilled,j)},b.prototype.callRejected=function(j){h.reject(this.promise,j)},b.prototype.otherCallRejected=function(j){I(this.promise,this.onRejected,j)};function I(j,fe,te){l(function(){var pe;try{pe=fe(te)}catch(Be){return h.reject(j,Be)}pe===j?h.reject(j,new TypeError("Cannot resolve promise with itself")):h.resolve(j,pe)})}h.resolve=function(j,fe){var te=U(A,fe);if(te.status==="error")return h.reject(j,te.value);var pe=te.value;if(pe)F(j,pe);else{j.state=f,j.outcome=fe;for(var Be=-1,ct=j.queue.length;++Be<ct;)j.queue[Be].callFulfilled(fe)}return j},h.reject=function(j,fe){j.state=d,j.outcome=fe;for(var te=-1,pe=j.queue.length;++te<pe;)j.queue[te].callRejected(fe);return j};function A(j){var fe=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof fe=="function")return function(){fe.apply(j,arguments)}}function F(j,fe){var te=!1;function pe(y){te||(te=!0,h.reject(j,y))}function Be(y){te||(te=!0,h.resolve(j,y))}function ct(){fe(Be,pe)}var at=U(ct);at.status==="error"&&pe(at.value)}function U(j,fe){var te={};try{te.value=j(fe),te.status="success"}catch(pe){te.status="error",te.value=pe}return te}m.resolve=M;function M(j){return j instanceof this?j:h.resolve(new this(c),j)}m.reject=q;function q(j){var fe=new this(c);return h.reject(fe,j)}m.all=Me;function Me(j){var fe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,pe=!1;if(!te)return this.resolve([]);for(var Be=new Array(te),ct=0,at=-1,y=new this(c);++at<te;)$t(j[at],at);return y;function $t(Ke,Zt){fe.resolve(Ke).then(Se,function(D){pe||(pe=!0,h.reject(y,D))});function Se(D){Be[Zt]=D,++ct===te&&!pe&&(pe=!0,h.resolve(y,Be))}}}m.race=lt;function lt(j){var fe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,pe=!1;if(!te)return this.resolve([]);for(var Be=-1,ct=new this(c);++Be<te;)at(j[Be]);return ct;function at(y){fe.resolve(y).then(function($t){pe||(pe=!0,h.resolve(ct,$t))},function($t){pe||(pe=!0,h.reject(ct,$t))})}}},{1:1}],3:[function(s,o,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,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 h(){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 d=h();function f(){try{if(!d||!d.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(P){if(P.name!=="TypeError")throw P;for(var S=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,R=new S,N=0;N<_.length;N+=1)R.append(_[N]);return R.getBlob(E.type)}}typeof Promise>"u"&&s(3);var m=Promise;function b(_,E){E&&_.then(function(S){E(null,S)},function(S){E(S)})}function I(_,E,S){typeof E=="function"&&_.then(E),typeof S=="function"&&_.catch(S)}function A(_){return typeof _!="string"&&(console.warn(_+" used as a key, but it is not a string."),_=String(_)),_}function F(){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={},Me=Object.prototype.toString,lt="readonly",j="readwrite";function fe(_){for(var E=_.length,S=new ArrayBuffer(E),R=new Uint8Array(S),N=0;N<E;N++)R[N]=_.charCodeAt(N);return S}function te(_){return new m(function(E){var S=_.transaction(U,j),R=g([""]);S.objectStore(U).put(R,"key"),S.onabort=function(N){N.preventDefault(),N.stopPropagation(),E(!1)},S.oncomplete=function(){var N=navigator.userAgent.match(/Chrome\/(\d+)/),P=navigator.userAgent.match(/Edge\//);E(P||!N||parseInt(N[1],10)>=43)}}).catch(function(){return!1})}function pe(_){return typeof M=="boolean"?m.resolve(M):te(_).then(function(E){return M=E,M})}function Be(_){var E=q[_.name],S={};S.promise=new m(function(R,N){S.resolve=R,S.reject=N}),E.deferredOperations.push(S),E.dbReady?E.dbReady=E.dbReady.then(function(){return S.promise}):E.dbReady=S.promise}function ct(_){var E=q[_.name],S=E.deferredOperations.pop();if(S)return S.resolve(),S.promise}function at(_,E){var S=q[_.name],R=S.deferredOperations.pop();if(R)return R.reject(E),R.promise}function y(_,E){return new m(function(S,R){if(q[_.name]=q[_.name]||Ee(),_.db)if(E)Be(_),_.db.close();else return S(_.db);var N=[_.name];E&&N.push(_.version);var P=d.open.apply(d,N);E&&(P.onupgradeneeded=function(V){var H=P.result;try{H.createObjectStore(_.storeName),V.oldVersion<=1&&H.createObjectStore(U)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+_.name+'" has been upgraded from version '+V.oldVersion+" to version "+V.newVersion+', but the storage "'+_.storeName+'" already exists.');else throw W}}),P.onerror=function(V){V.preventDefault(),R(P.error)},P.onsuccess=function(){var V=P.result;V.onversionchange=function(H){H.target.close()},S(V),ct(_)}})}function $t(_){return y(_,!1)}function Ke(_){return y(_,!0)}function Zt(_,E){if(!_.db)return!0;var S=!_.db.objectStoreNames.contains(_.storeName),R=_.version<_.db.version,N=_.version>_.db.version;if(R&&(_.version!==E&&console.warn('The database "'+_.name+`" can't be downgraded from version `+_.db.version+" to version "+_.version+"."),_.version=_.db.version),N||S){if(S){var P=_.db.version+1;P>_.version&&(_.version=P)}return!0}return!1}function Se(_){return new m(function(E,S){var R=new FileReader;R.onerror=S,R.onloadend=function(N){var P=btoa(N.target.result||"");E({__local_forage_encoded_blob:!0,data:P,type:_.type})},R.readAsBinaryString(_)})}function D(_){var E=fe(atob(_.data));return g([E],{type:_.type})}function x(_){return _&&_.__local_forage_encoded_blob}function Z(_){var E=this,S=E._initReady().then(function(){var R=q[E._dbInfo.name];if(R&&R.dbReady)return R.dbReady});return I(S,_,_),S}function ne(_){Be(_);for(var E=q[_.name],S=E.forages,R=0;R<S.length;R++){var N=S[R];N._dbInfo.db&&(N._dbInfo.db.close(),N._dbInfo.db=null)}return _.db=null,$t(_).then(function(P){return _.db=P,Zt(_)?Ke(_):P}).then(function(P){_.db=E.db=P;for(var V=0;V<S.length;V++)S[V]._dbInfo.db=P}).catch(function(P){throw at(_,P),P})}function ae(_,E,S,R){R===void 0&&(R=1);try{var N=_.db.transaction(_.storeName,E);S(null,N)}catch(P){if(R>0&&(!_.db||P.name==="InvalidStateError"||P.name==="NotFoundError"))return m.resolve().then(function(){if(!_.db||P.name==="NotFoundError"&&!_.db.objectStoreNames.contains(_.storeName)&&_.version<=_.db.version)return _.db&&(_.version=_.db.version+1),Ke(_)}).then(function(){return ne(_).then(function(){ae(_,E,S,R-1)})}).catch(S);S(P)}}function Ee(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ye(_){var E=this,S={db:null};if(_)for(var R in _)S[R]=_[R];var N=q[S.name];N||(N=Ee(),q[S.name]=N),N.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=Z);var P=[];function V(){return m.resolve()}for(var H=0;H<N.forages.length;H++){var W=N.forages[H];W!==E&&P.push(W._initReady().catch(V))}var z=N.forages.slice(0);return m.all(P).then(function(){return S.db=N.db,$t(S)}).then(function($){return S.db=$,Zt(S,E._defaultConfig.version)?Ke(S):$}).then(function($){S.db=N.db=$,E._dbInfo=S;for(var ce=0;ce<z.length;ce++){var Ye=z[ce];Ye!==E&&(Ye._dbInfo.db=S.db,Ye._dbInfo.version=S.version)}})}function de(_,E){var S=this;_=A(_);var R=new m(function(N,P){S.ready().then(function(){ae(S._dbInfo,lt,function(V,H){if(V)return P(V);try{var W=H.objectStore(S._dbInfo.storeName),z=W.get(_);z.onsuccess=function(){var $=z.result;$===void 0&&($=null),x($)&&($=D($)),N($)},z.onerror=function(){P(z.error)}}catch($){P($)}})}).catch(P)});return b(R,E),R}function Ce(_,E){var S=this,R=new m(function(N,P){S.ready().then(function(){ae(S._dbInfo,lt,function(V,H){if(V)return P(V);try{var W=H.objectStore(S._dbInfo.storeName),z=W.openCursor(),$=1;z.onsuccess=function(){var ce=z.result;if(ce){var Ye=ce.value;x(Ye)&&(Ye=D(Ye));var St=_(Ye,ce.key,$++);St!==void 0?N(St):ce.continue()}else N()},z.onerror=function(){P(z.error)}}catch(ce){P(ce)}})}).catch(P)});return b(R,E),R}function je(_,E,S){var R=this;_=A(_);var N=new m(function(P,V){var H;R.ready().then(function(){return H=R._dbInfo,Me.call(E)==="[object Blob]"?pe(H.db).then(function(W){return W?E:Se(E)}):E}).then(function(W){ae(R._dbInfo,j,function(z,$){if(z)return V(z);try{var ce=$.objectStore(R._dbInfo.storeName);W===null&&(W=void 0);var Ye=ce.put(W,_);$.oncomplete=function(){W===void 0&&(W=null),P(W)},$.onabort=$.onerror=function(){var St=Ye.error?Ye.error:Ye.transaction.error;V(St)}}catch(St){V(St)}})}).catch(V)});return b(N,S),N}function Mt(_,E){var S=this;_=A(_);var R=new m(function(N,P){S.ready().then(function(){ae(S._dbInfo,j,function(V,H){if(V)return P(V);try{var W=H.objectStore(S._dbInfo.storeName),z=W.delete(_);H.oncomplete=function(){N()},H.onerror=function(){P(z.error)},H.onabort=function(){var $=z.error?z.error:z.transaction.error;P($)}}catch($){P($)}})}).catch(P)});return b(R,E),R}function He(_){var E=this,S=new m(function(R,N){E.ready().then(function(){ae(E._dbInfo,j,function(P,V){if(P)return N(P);try{var H=V.objectStore(E._dbInfo.storeName),W=H.clear();V.oncomplete=function(){R()},V.onabort=V.onerror=function(){var z=W.error?W.error:W.transaction.error;N(z)}}catch(z){N(z)}})}).catch(N)});return b(S,_),S}function Je(_){var E=this,S=new m(function(R,N){E.ready().then(function(){ae(E._dbInfo,lt,function(P,V){if(P)return N(P);try{var H=V.objectStore(E._dbInfo.storeName),W=H.count();W.onsuccess=function(){R(W.result)},W.onerror=function(){N(W.error)}}catch(z){N(z)}})}).catch(N)});return b(S,_),S}function Ft(_,E){var S=this,R=new m(function(N,P){if(_<0){N(null);return}S.ready().then(function(){ae(S._dbInfo,lt,function(V,H){if(V)return P(V);try{var W=H.objectStore(S._dbInfo.storeName),z=!1,$=W.openKeyCursor();$.onsuccess=function(){var ce=$.result;if(!ce){N(null);return}_===0||z?N(ce.key):(z=!0,ce.advance(_))},$.onerror=function(){P($.error)}}catch(ce){P(ce)}})}).catch(P)});return b(R,E),R}function Oe(_){var E=this,S=new m(function(R,N){E.ready().then(function(){ae(E._dbInfo,lt,function(P,V){if(P)return N(P);try{var H=V.objectStore(E._dbInfo.storeName),W=H.openKeyCursor(),z=[];W.onsuccess=function(){var $=W.result;if(!$){R(z);return}z.push($.key),$.continue()},W.onerror=function(){N(W.error)}}catch($){N($)}})}).catch(N)});return b(S,_),S}function u(_,E){E=F.apply(this,arguments);var S=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||S.name,_.storeName=_.storeName||S.storeName);var R=this,N;if(!_.name)N=m.reject("Invalid arguments");else{var P=_.name===S.name&&R._dbInfo.db,V=P?m.resolve(R._dbInfo.db):$t(_).then(function(H){var W=q[_.name],z=W.forages;W.db=H;for(var $=0;$<z.length;$++)z[$]._dbInfo.db=H;return H});_.storeName?N=V.then(function(H){if(H.objectStoreNames.contains(_.storeName)){var W=H.version+1;Be(_);var z=q[_.name],$=z.forages;H.close();for(var ce=0;ce<$.length;ce++){var Ye=$[ce];Ye._dbInfo.db=null,Ye._dbInfo.version=W}var St=new m(function(Et,lr){var Xt=d.open(_.name,W);Xt.onerror=function(On){var Vh=Xt.result;Vh.close(),lr(On)},Xt.onupgradeneeded=function(){var On=Xt.result;On.deleteObjectStore(_.storeName)},Xt.onsuccess=function(){var On=Xt.result;On.close(),Et(On)}});return St.then(function(Et){z.db=Et;for(var lr=0;lr<$.length;lr++){var Xt=$[lr];Xt._dbInfo.db=Et,ct(Xt._dbInfo)}}).catch(function(Et){throw(at(_,Et)||m.resolve()).catch(function(){}),Et})}}):N=V.then(function(H){Be(_);var W=q[_.name],z=W.forages;H.close();for(var $=0;$<z.length;$++){var ce=z[$];ce._dbInfo.db=null}var Ye=new m(function(St,Et){var lr=d.deleteDatabase(_.name);lr.onerror=function(){var Xt=lr.result;Xt&&Xt.close(),Et(lr.error)},lr.onblocked=function(){console.warn('dropInstance blocked for database "'+_.name+'" until all open connections are closed')},lr.onsuccess=function(){var Xt=lr.result;Xt&&Xt.close(),St(Xt)}});return Ye.then(function(St){W.db=St;for(var Et=0;Et<z.length;Et++){var lr=z[Et];ct(lr._dbInfo)}}).catch(function(St){throw(at(_,St)||m.resolve()).catch(function(){}),St})})}return b(N,E),N}var p={_driver:"asyncStorage",_initStorage:ye,_support:f(),iterate:Ce,getItem:de,setItem:je,removeItem:Mt,clear:He,length:Je,key:Ft,keys:Oe,dropInstance:u};function v(){return typeof openDatabase=="function"}var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L="~~local_forage_type~",B=/^~~local_forage_type~([^~]+)~/,K="__lfsc__:",et=K.length,qe="arbf",Fe="blob",ut="si08",J="ui08",De="uic8",me="si16",tt="si32",wn="ur16",en="ui32",st="fl32",ve="fl64",En=et+qe.length,cs=Object.prototype.toString;function za(_){var E=_.length*.75,S=_.length,R,N=0,P,V,H,W;_[_.length-1]==="="&&(E--,_[_.length-2]==="="&&E--);var z=new ArrayBuffer(E),$=new Uint8Array(z);for(R=0;R<S;R+=4)P=T.indexOf(_[R]),V=T.indexOf(_[R+1]),H=T.indexOf(_[R+2]),W=T.indexOf(_[R+3]),$[N++]=P<<2|V>>4,$[N++]=(V&15)<<4|H>>2,$[N++]=(H&3)<<6|W&63;return z}function Th(_){var E=new Uint8Array(_),S="",R;for(R=0;R<E.length;R+=3)S+=T[E[R]>>2],S+=T[(E[R]&3)<<4|E[R+1]>>4],S+=T[(E[R+1]&15)<<2|E[R+2]>>6],S+=T[E[R+2]&63];return E.length%3===2?S=S.substring(0,S.length-1)+"=":E.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function $D(_,E){var S="";if(_&&(S=cs.call(_)),_&&(S==="[object ArrayBuffer]"||_.buffer&&cs.call(_.buffer)==="[object ArrayBuffer]")){var R,N=K;_ instanceof ArrayBuffer?(R=_,N+=qe):(R=_.buffer,S==="[object Int8Array]"?N+=ut:S==="[object Uint8Array]"?N+=J:S==="[object Uint8ClampedArray]"?N+=De:S==="[object Int16Array]"?N+=me:S==="[object Uint16Array]"?N+=wn:S==="[object Int32Array]"?N+=tt:S==="[object Uint32Array]"?N+=en:S==="[object Float32Array]"?N+=st:S==="[object Float64Array]"?N+=ve:E(new Error("Failed to get type for BinaryArray"))),E(N+Th(R))}else if(S==="[object Blob]"){var P=new FileReader;P.onload=function(){var V=L+_.type+"~"+Th(this.result);E(K+Fe+V)},P.readAsArrayBuffer(_)}else try{E(JSON.stringify(_))}catch(V){console.error("Couldn't convert value into a JSON string: ",_),E(null,V)}}function GD(_){if(_.substring(0,et)!==K)return JSON.parse(_);var E=_.substring(En),S=_.substring(et,En),R;if(S===Fe&&B.test(E)){var N=E.match(B);R=N[1],E=E.substring(N[0].length)}var P=za(E);switch(S){case qe:return P;case Fe:return g([P],{type:R});case ut:return new Int8Array(P);case J:return new Uint8Array(P);case De:return new Uint8ClampedArray(P);case me:return new Int16Array(P);case wn:return new Uint16Array(P);case tt:return new Int32Array(P);case en:return new Uint32Array(P);case st:return new Float32Array(P);case ve:return new Float64Array(P);default:throw new Error("Unkown type: "+S)}}var xh={serialize:$D,deserialize:GD,stringToBuffer:za,bufferToString:Th};function VE(_,E,S,R){_.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],S,R)}function zD(_){var E=this,S={db:null};if(_)for(var R in _)S[R]=typeof _[R]!="string"?_[R].toString():_[R];var N=new m(function(P,V){try{S.db=openDatabase(S.name,String(S.version),S.description,S.size)}catch(H){return V(H)}S.db.transaction(function(H){VE(H,S,function(){E._dbInfo=S,P()},function(W,z){V(z)})},V)});return S.serializer=xh,N}function Zi(_,E,S,R,N,P){_.executeSql(S,R,N,function(V,H){H.code===H.SYNTAX_ERR?V.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[E.storeName],function(W,z){z.rows.length?P(W,H):VE(W,E,function(){W.executeSql(S,R,N,P)},P)},P):P(V,H)},P)}function WD(_,E){var S=this;_=A(_);var R=new m(function(N,P){S.ready().then(function(){var V=S._dbInfo;V.db.transaction(function(H){Zi(H,V,"SELECT * FROM "+V.storeName+" WHERE key = ? LIMIT 1",[_],function(W,z){var $=z.rows.length?z.rows.item(0).value:null;$&&($=V.serializer.deserialize($)),N($)},function(W,z){P(z)})})}).catch(P)});return b(R,E),R}function qD(_,E){var S=this,R=new m(function(N,P){S.ready().then(function(){var V=S._dbInfo;V.db.transaction(function(H){Zi(H,V,"SELECT * FROM "+V.storeName,[],function(W,z){for(var $=z.rows,ce=$.length,Ye=0;Ye<ce;Ye++){var St=$.item(Ye),Et=St.value;if(Et&&(Et=V.serializer.deserialize(Et)),Et=_(Et,St.key,Ye+1),Et!==void 0){N(Et);return}}N()},function(W,z){P(z)})})}).catch(P)});return b(R,E),R}function UE(_,E,S,R){var N=this;_=A(_);var P=new m(function(V,H){N.ready().then(function(){E===void 0&&(E=null);var W=E,z=N._dbInfo;z.serializer.serialize(E,function($,ce){ce?H(ce):z.db.transaction(function(Ye){Zi(Ye,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[_,$],function(){V(W)},function(St,Et){H(Et)})},function(Ye){if(Ye.code===Ye.QUOTA_ERR){if(R>0){V(UE.apply(N,[_,W,S,R-1]));return}H(Ye)}})})}).catch(H)});return b(P,S),P}function YD(_,E,S){return UE.apply(this,[_,E,S,1])}function XD(_,E){var S=this;_=A(_);var R=new m(function(N,P){S.ready().then(function(){var V=S._dbInfo;V.db.transaction(function(H){Zi(H,V,"DELETE FROM "+V.storeName+" WHERE key = ?",[_],function(){N()},function(W,z){P(z)})})}).catch(P)});return b(R,E),R}function ZD(_){var E=this,S=new m(function(R,N){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zi(V,P,"DELETE FROM "+P.storeName,[],function(){R()},function(H,W){N(W)})})}).catch(N)});return b(S,_),S}function KD(_){var E=this,S=new m(function(R,N){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zi(V,P,"SELECT COUNT(key) as c FROM "+P.storeName,[],function(H,W){var z=W.rows.item(0).c;R(z)},function(H,W){N(W)})})}).catch(N)});return b(S,_),S}function dk(_,E){var S=this,R=new m(function(N,P){S.ready().then(function(){var V=S._dbInfo;V.db.transaction(function(H){Zi(H,V,"SELECT key FROM "+V.storeName+" WHERE id = ? LIMIT 1",[_+1],function(W,z){var $=z.rows.length?z.rows.item(0).key:null;N($)},function(W,z){P(z)})})}).catch(P)});return b(R,E),R}function _k(_){var E=this,S=new m(function(R,N){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zi(V,P,"SELECT key FROM "+P.storeName,[],function(H,W){for(var z=[],$=0;$<W.rows.length;$++)z.push(W.rows.item($).key);R(z)},function(H,W){N(W)})})}).catch(N)});return b(S,_),S}function jk(_){return new m(function(E,S){_.transaction(function(R){R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(N,P){for(var V=[],H=0;H<P.rows.length;H++)V.push(P.rows.item(H).name);E({db:_,storeNames:V})},function(N,P){S(P)})},function(R){S(R)})})}function Hk(_,E){E=F.apply(this,arguments);var S=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||S.name,_.storeName=_.storeName||S.storeName);var R=this,N;return _.name?N=new m(function(P){var V;_.name===S.name?V=R._dbInfo.db:V=openDatabase(_.name,"","",0),_.storeName?P({db:V,storeNames:[_.storeName]}):P(jk(V))}).then(function(P){return new m(function(V,H){P.db.transaction(function(W){function z(St){return new m(function(Et,lr){W.executeSql("DROP TABLE IF EXISTS "+St,[],function(){Et()},function(Xt,On){lr(On)})})}for(var $=[],ce=0,Ye=P.storeNames.length;ce<Ye;ce++)$.push(z(P.storeNames[ce]));m.all($).then(function(){V()}).catch(function(St){H(St)})},function(W){H(W)})})}):N=m.reject("Invalid arguments"),b(N,E),N}var $k={_driver:"webSQLStorage",_initStorage:zD,_support:v(),iterate:qD,getItem:WD,setItem:YD,removeItem:XD,clear:ZD,length:KD,key:dk,keys:_k,dropInstance:Hk};function eR(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function jE(_,E){var S=_.name+"/";return _.storeName!==E.storeName&&(S+=_.storeName+"/"),S}function tR(){var _="_localforage_support_test";try{return localStorage.setItem(_,!0),localStorage.removeItem(_),!1}catch{return!0}}function rR(){return!tR()||localStorage.length>0}function nR(_){var E=this,S={};if(_)for(var R in _)S[R]=_[R];return S.keyPrefix=jE(_,E._defaultConfig),rR()?(E._dbInfo=S,S.serializer=xh,m.resolve()):m.reject()}function iR(_){var E=this,S=E.ready().then(function(){for(var R=E._dbInfo.keyPrefix,N=localStorage.length-1;N>=0;N--){var P=localStorage.key(N);P.indexOf(R)===0&&localStorage.removeItem(P)}});return b(S,_),S}function sR(_,E){var S=this;_=A(_);var R=S.ready().then(function(){var N=S._dbInfo,P=localStorage.getItem(N.keyPrefix+_);return P&&(P=N.serializer.deserialize(P)),P});return b(R,E),R}function oR(_,E){var S=this,R=S.ready().then(function(){for(var N=S._dbInfo,P=N.keyPrefix,V=P.length,H=localStorage.length,W=1,z=0;z<H;z++){var $=localStorage.key(z);if($.indexOf(P)===0){var ce=localStorage.getItem($);if(ce&&(ce=N.serializer.deserialize(ce)),ce=_(ce,$.substring(V),W++),ce!==void 0)return ce}}});return b(R,E),R}function aR(_,E){var S=this,R=S.ready().then(function(){var N=S._dbInfo,P;try{P=localStorage.key(_)}catch{P=null}return P&&(P=P.substring(N.keyPrefix.length)),P});return b(R,E),R}function lR(_){var E=this,S=E.ready().then(function(){for(var R=E._dbInfo,N=localStorage.length,P=[],V=0;V<N;V++){var H=localStorage.key(V);H.indexOf(R.keyPrefix)===0&&P.push(H.substring(R.keyPrefix.length))}return P});return b(S,_),S}function cR(_){var E=this,S=E.keys().then(function(R){return R.length});return b(S,_),S}function uR(_,E){var S=this;_=A(_);var R=S.ready().then(function(){var N=S._dbInfo;localStorage.removeItem(N.keyPrefix+_)});return b(R,E),R}function hR(_,E,S){var R=this;_=A(_);var N=R.ready().then(function(){E===void 0&&(E=null);var P=E;return new m(function(V,H){var W=R._dbInfo;W.serializer.serialize(E,function(z,$){if($)H($);else try{localStorage.setItem(W.keyPrefix+_,z),V(P)}catch(ce){(ce.name==="QuotaExceededError"||ce.name==="NS_ERROR_DOM_QUOTA_REACHED")&&H(ce),H(ce)}})})});return b(N,S),N}function dR(_,E){if(E=F.apply(this,arguments),_=typeof _!="function"&&_||{},!_.name){var S=this.config();_.name=_.name||S.name,_.storeName=_.storeName||S.storeName}var R=this,N;return _.name?N=new m(function(P){_.storeName?P(jE(_,R._defaultConfig)):P(_.name+"/")}).then(function(P){for(var V=localStorage.length-1;V>=0;V--){var H=localStorage.key(V);H.indexOf(P)===0&&localStorage.removeItem(H)}}):N=m.reject("Invalid arguments"),b(N,E),N}var pR={_driver:"localStorageWrapper",_initStorage:nR,_support:eR(),iterate:oR,getItem:sR,setItem:hR,removeItem:uR,clear:iR,length:cR,key:aR,keys:lR,dropInstance:dR},fR=function(_,E){return _===E||typeof _=="number"&&typeof E=="number"&&isNaN(_)&&isNaN(E)},gR=function(_,E){for(var S=_.length,R=0;R<S;){if(fR(_[R],E))return!0;R++}return!1},HE=Array.isArray||function(_){return Object.prototype.toString.call(_)==="[object Array]"},Ml={},$E={},js={INDEXEDDB:p,WEBSQL:$k,LOCALSTORAGE:pR},mR=[js.INDEXEDDB._driver,js.WEBSQL._driver,js.LOCALSTORAGE._driver],Dc=["dropInstance"],Nh=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Dc),vR={description:"",driver:mR.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function _R(_,E){_[E]=function(){var S=arguments;return _.ready().then(function(){return _[E].apply(_,S)})}}function Rh(){for(var _=1;_<arguments.length;_++){var E=arguments[_];if(E)for(var S in E)E.hasOwnProperty(S)&&(HE(E[S])?arguments[0][S]=E[S].slice():arguments[0][S]=E[S])}return arguments[0]}var yR=function(){function _(E){c(this,_);for(var S in js)if(js.hasOwnProperty(S)){var R=js[S],N=R._driver;this[S]=N,Ml[N]||this.defineDriver(R)}this._defaultConfig=Rh({},vR),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 S in E){if(S==="storeName"&&(E[S]=E[S].replace(/\W/g,"_")),S==="version"&&typeof E[S]!="number")return new Error("Database version must be a number.");this._config[S]=E[S]}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,S,R){var N=new m(function(P,V){try{var H=E._driver,W=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!E._driver){V(W);return}for(var z=Nh.concat("_initStorage"),$=0,ce=z.length;$<ce;$++){var Ye=z[$],St=!gR(Dc,Ye);if((St||E[Ye])&&typeof E[Ye]!="function"){V(W);return}}var Et=function(){for(var Xt=function(bR){return function(){var ER=new Error("Method "+bR+" is not implemented by the current driver"),WE=m.reject(ER);return b(WE,arguments[arguments.length-1]),WE}},On=0,Vh=Dc.length;On<Vh;On++){var Uh=Dc[On];E[Uh]||(E[Uh]=Xt(Uh))}};Et();var lr=function(Xt){Ml[H]&&console.info("Redefining LocalForage driver: "+H),Ml[H]=E,$E[H]=Xt,P()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(lr,V):lr(!!E._support):lr(!0)}catch(Xt){V(Xt)}});return I(N,S,R),N},_.prototype.driver=function(){return this._driver||null},_.prototype.getDriver=function(E,S,R){var N=Ml[E]?m.resolve(Ml[E]):m.reject(new Error("Driver not found."));return I(N,S,R),N},_.prototype.getSerializer=function(E){var S=m.resolve(xh);return I(S,E),S},_.prototype.ready=function(E){var S=this,R=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return I(R,E,E),R},_.prototype.setDriver=function(E,S,R){var N=this;HE(E)||(E=[E]);var P=this._getSupportedDrivers(E);function V(){N._config.driver=N.driver()}function H($){return N._extend($),V(),N._ready=N._initStorage(N._config),N._ready}function W($){return function(){var ce=0;function Ye(){for(;ce<$.length;){var St=$[ce];return ce++,N._dbInfo=null,N._ready=null,N.getDriver(St).then(H).catch(Ye)}V();var Et=new Error("No available storage method found.");return N._driverSet=m.reject(Et),N._driverSet}return Ye()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=z.then(function(){var $=P[0];return N._dbInfo=null,N._ready=null,N.getDriver($).then(function(ce){N._driver=ce._driver,V(),N._wrapLibraryMethodsWithReady(),N._initDriver=W(P)})}).catch(function(){V();var $=new Error("No available storage method found.");return N._driverSet=m.reject($),N._driverSet}),I(this._driverSet,S,R),this._driverSet},_.prototype.supports=function(E){return!!$E[E]},_.prototype._extend=function(E){Rh(this,E)},_.prototype._getSupportedDrivers=function(E){for(var S=[],R=0,N=E.length;R<N;R++){var P=E[R];this.supports(P)&&S.push(P)}return S},_.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,S=Nh.length;E<S;E++)_R(this,Nh[E])},_.prototype.createInstance=function(E){return new _(E)},_}(),wR=new yR;o.exports=wR},{3:3}]},{},[4])(4)})}),Lf=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class eI{static escapeHtml(n){return String(n).replace(/"/g,i=>eI.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"&quot;"}}),j_=$n((e,t)=>{"use strict";(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.fetchRetry=n())})(e,function(){"use strict";var r=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!n(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!n(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(a,o),function(l,c){var h=o.retries,d=o.retryDelay,f=o.retryOn;if(c&&c.retries!==void 0)if(n(c.retries))h=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(n(c.retryDelay)||typeof c.retryDelay=="function")d=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(A){var F=typeof Request<"u"&&l instanceof Request?l.clone():l;s(F,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(A,null,U)).then(function(M){M?I(A,null,U):g(U)}).catch(m)}catch(M){m(M)}else A<h?I(A,null,U):g(U)}).catch(function(U){if(typeof f=="function")try{Promise.resolve(f(A,U,null)).then(function(M){M?I(A,U,null):m(U)}).catch(function(M){m(M)})}catch(M){m(M)}else A<h?I(A,U,null):m(U)})};function I(A,F,U){var M=typeof d=="function"?d(A,F,U):d;setTimeout(function(){b(++A)},M)}b(0)})}};function n(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return r})}),dp=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PriceRuleType=e.DiscountType=void 0;var t=function(n){return n[n.NONE=0]="NONE",n[n.STATIC=1]="STATIC",n[n.UNIQUE_FLAT=2]="UNIQUE_FLAT",n[n.UNIQUE_FLAT_ITEMS=3]="UNIQUE_FLAT_ITEMS",n[n.UNIQUE_FIXED_ITEMS=4]="UNIQUE_FIXED_ITEMS",n[n.UNIQUE_CHEAPEST_ITEM_FREE=5]="UNIQUE_CHEAPEST_ITEM_FREE",n[n.BXGY=6]="BXGY",n}(t||(e.DiscountType=t={})),r=function(n){return n.FIXED_AMOUNT="fixed_amount",n.PERCENTAGE="percentage",n}(r||(e.PriceRuleType=r={}))}),$_=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLBuilder=void 0;var t=function(){function r(n){try{this.base=new URL(n),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return r.prototype.appendQueryParam=function(n,i){this.params.append(n,i?i.toString():"")},r.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},r.prototype.deleteQueryParam=function(n){this.params.delete(n)},r.prototype.getBase=function(){return this.base},r.prototype.getPath=function(){return this.base.pathname},r.prototype.getHostname=function(){return this.base.hostname},r.prototype.getParams=function(){return this.params},r.prototype.getQueryParam=function(n){if(!this.params)return"";var i=this.params.get(n);return!i||i==="undefined"||i==="null"?void 0:i},r.prototype.getQueryString=function(){return this.params.toString()},r.prototype.setPath=function(n){return this.base.pathname=n,this},r.prototype.setQueryParam=function(n,i){return this.params.set(n,i?i.toString():""),this},r.prototype.setQueryString=function(n){if(n)return n[0]==="?"&&(n=n.slice(1)),this.params=new URLSearchParams(n),this},r.prototype.toString=function(){var n=this.params.toString();return n===""?this.base.search="":this.base.search="?"+n,this.base.toString()},r}();e.URLBuilder=t}),q_=$n((e,t)=>{"use strict";(function(r,n){"use strict";var i="1.0.40",s="",o="?",a="function",l="undefined",c="object",h="string",d="major",f="model",g="name",m="type",b="vendor",I="version",A="architecture",F="console",U="mobile",M="tablet",q="smarttv",Me="wearable",lt="embedded",j=500,fe="Amazon",te="Apple",pe="ASUS",Be="BlackBerry",ct="Browser",at="Chrome",y="Edge",$t="Firefox",Ke="Google",Zt="Huawei",Se="LG",D="Microsoft",x="Motorola",Z="Opera",ne="Samsung",ae="Sharp",Ee="Sony",ye="Xiaomi",de="Zebra",Ce="Facebook",je="Chromium OS",Mt="Mac OS",He=" Browser",Je=function(J,De){var me={};for(var tt in J)De[tt]&&De[tt].length%2===0?me[tt]=De[tt].concat(J[tt]):me[tt]=J[tt];return me},Ft=function(J){for(var De={},me=0;me<J.length;me++)De[J[me].toUpperCase()]=J[me];return De},Oe=function(J,De){return typeof J===h?u(De).indexOf(u(J))!==-1:!1},u=function(J){return J.toLowerCase()},p=function(J){return typeof J===h?J.replace(/[^\d\.]/g,s).split(".")[0]:n},v=function(J,De){if(typeof J===h)return J=J.replace(/^\s\s*/,s),typeof De===l?J:J.substring(0,j)},T=function(J,De){for(var me=0,tt,wn,en,st,ve,En;me<De.length&&!ve;){var cs=De[me],za=De[me+1];for(tt=wn=0;tt<cs.length&&!ve&&cs[tt];)if(ve=cs[tt++].exec(J),ve)for(en=0;en<za.length;en++)En=ve[++wn],st=za[en],typeof st===c&&st.length>0?st.length===2?typeof st[1]==a?this[st[0]]=st[1].call(this,En):this[st[0]]=st[1]:st.length===3?typeof st[1]===a&&!(st[1].exec&&st[1].test)?this[st[0]]=En?st[1].call(this,En,st[2]):n:this[st[0]]=En?En.replace(st[1],st[2]):n:st.length===4&&(this[st[0]]=En?st[3].call(this,En.replace(st[1],st[2])):n):this[st]=En||n;me+=2}},L=function(J,De){for(var me in De)if(typeof De[me]===c&&De[me].length>0){for(var tt=0;tt<De[me].length;tt++)if(Oe(De[me][tt],J))return me===o?n:me}else if(Oe(De[me],J))return me===o?n:me;return De.hasOwnProperty("*")?De["*"]:J},B={"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,Z+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[I,[g,Z+" GX"]],[/\bopr\/([\w\.]+)/i],[I,[g,Z]],[/\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"+ct]],[/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 "+ct]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+ct],I],[/\bfocus\/([\w\.]+)/i],[I,[g,$t+" Focus"]],[/\bopt\/([\w\.]+)/i],[I,[g,Z+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[I,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[I,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[I,[g,Z+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[I,[g,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[I,[g,$t]],[/\bqihoobrowser\/?([\w\.]*)/i],[I,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],I],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+He],I],[/samsungbrowser\/([\w\.]+)/i],[I,[g,ne+" 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,Ce],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,at+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,at+" WebView"],I],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[I,[g,"Android "+ct]],[/(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,B]],[/(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,$t+" 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],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,u]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,s,u]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,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,ne],[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,ne],[m,U]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[b,te],[m,U]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[b,te],[m,M]],[/(macintosh);/i],[f,[b,te]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[b,ae],[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,Zt],[m,M]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[b,Zt],[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,ye],[m,U]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[b,ye],[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,Se],[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,Se],[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,Ke],[m,M]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[b,Ke],[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,Ee],[m,U]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[b,Ee],[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,fe],[m,M]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[b,fe],[m,U]],[/(playbook);[-\w\),; ]+(rim)/i],[f,b,[m,M]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[b,Be],[m,U]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[b,pe],[m,M]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[b,pe],[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,de],[m,M]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[b,de],[m,U]],[/smart-tv.+(samsung)/i],[b,[m,q]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[b,ne],[m,q]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Se],[m,q]],[/(apple) ?tv/i],[b,[f,te+" TV"],[m,q]],[/crkey/i],[[f,at+"cast"],[b,Ke],[m,q]],[/droid.+aft(\w+)( bui|\))/i],[f,[b,fe],[m,q]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[b,ae],[m,q]],[/(bravia[\w ]+)( bui|\))/i],[f,[b,Ee],[m,q]],[/(mitv-\w{5}) bui/i],[f,[b,ye],[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,F]],[/droid.+; (shield) bui/i],[f,[b,"Nvidia"],[m,F]],[/(playstation [345portablevi]+)/i],[f,[b,Ee],[m,F]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[b,D],[m,F]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[b,ne],[m,Me]],[/((pebble))app/i],[b,f,[m,Me]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[b,te],[m,Me]],[/droid.+; (glass) \d/i],[f,[b,Ke],[m,Me]],[/droid.+; (wt63?0{2,3})\)/i],[f,[b,de],[m,Me]],[/droid.+; (glass) \d/i],[f,[b,Ke],[m,Me]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,f,[m,Me]],[/; (quest( \d| pro)?)/i],[f,[b,Ce],[m,Me]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,lt]],[/(aeobc)\b/i],[f,[b,fe],[m,lt]],[/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,Mt],[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,Be]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[I,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[I,[g,$t+" 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,at+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,je],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]]},qe=function(J,De){if(typeof J===c&&(De=J,J=n),!(this instanceof qe))return new qe(J,De).getResult();var me=typeof r!==l&&r.navigator?r.navigator:n,tt=J||(me&&me.userAgent?me.userAgent:s),wn=me&&me.userAgentData?me.userAgentData:n,en=De?Je(et,De):et,st=me&&me.userAgent==tt;return this.getBrowser=function(){var ve={};return ve[g]=n,ve[I]=n,T.call(ve,tt,en.browser),ve[d]=p(ve[I]),st&&me&&me.brave&&typeof me.brave.isBrave==a&&(ve[g]="Brave"),ve},this.getCPU=function(){var ve={};return ve[A]=n,T.call(ve,tt,en.cpu),ve},this.getDevice=function(){var ve={};return ve[b]=n,ve[f]=n,ve[m]=n,T.call(ve,tt,en.device),st&&!ve[m]&&wn&&wn.mobile&&(ve[m]=U),st&&ve[f]=="Macintosh"&&me&&typeof me.standalone!==l&&me.maxTouchPoints&&me.maxTouchPoints>2&&(ve[f]="iPad",ve[m]=M),ve},this.getEngine=function(){var ve={};return ve[g]=n,ve[I]=n,T.call(ve,tt,en.engine),ve},this.getOS=function(){var ve={};return ve[g]=n,ve[I]=n,T.call(ve,tt,en.os),st&&!ve[g]&&wn&&wn.platform&&wn.platform!="Unknown"&&(ve[g]=wn.platform.replace(/chrome os/i,je).replace(/macos/i,Mt)),ve},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(ve){return tt=typeof ve===h&&ve.length>j?v(ve,j):ve,this},this.setUA(tt),this};qe.VERSION=i,qe.BROWSER=Ft([g,I,d]),qe.CPU=Ft([A]),qe.DEVICE=Ft([f,b,m,F,U,q,M,Me,lt]),qe.ENGINE=qe.OS=Ft([g,I]),typeof e!==l?(typeof t!==l&&t.exports&&(e=t.exports=qe),e.UAParser=qe):typeof define===a&&define.amd?define(function(){return qe}):typeof r!==l&&(r.UAParser=qe);var Fe=typeof r!==l&&(r.jQuery||r.Zepto);if(Fe&&!Fe.ua){var ut=new qe;Fe.ua=ut.getResult(),Fe.ua.get=function(){return ut.getUA()},Fe.ua.set=function(J){ut.setUA(J);var De=ut.getResult();for(var me in De)Fe.ua[me]=De[me]}}})(typeof window=="object"?window:e)}),K_=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayUtils=void 0;var t=class vT{static of(n,i){return i!==void 0?new Array(n).fill(i):Array.from({length:n},(s,o)=>o)}static remove(n,i){let s=n.indexOf(i);return s===-1?!1:(n.splice(s,1),!0)}static swap(n,i,s){[n[i],n[s]]=[n[s],n[i]]}static sum(n,i){return n.reduce((s,o)=>s+Math.max(i?i(o):+o,0),0)}static unique(n,i){return n.filter((s,o,a)=>a.findIndex(l=>l[i]===s[i])===o)}static shuffle(n){let i=n.length;for(;i!=0;){let s=Math.floor(Math.random()*i);i--,vT.swap(n,i,s)}}};e.ArrayUtils=t}),Dx=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssetType=void 0;var t=function(r){return r[r.IMAGE=1]="IMAGE",r[r.VIDEO=2]="VIDEO",r[r.GIF=3]="GIF",r[r.SCREENSHOT=4]="SCREENSHOT",r[r.THREE_D=5]="THREE_D",r[r.FONT=6]="FONT",r[r.TEXT=7]="TEXT",r[r.JSON=8]="JSON",r[r.SVG=9]="SVG",r[r.HTML=10]="HTML",r[r.LOGO=11]="LOGO",r[r.OTHERS=1e3]="OTHERS",r}(t||(e.AssetType=t={}))}),Tx=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TemplateStatus=void 0;var t=function(r){return r[r.DRAFT=1]="DRAFT",r[r.PUBLISHED=2]="PUBLISHED",r[r.DISABLED=3]="DISABLED",r}(t||(e.TemplateStatus=t={}))}),Rx=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=void 0;var t=function(r){return r.VIEW_ITEM="VIEW_ITEM",r.ADD_TO_CART="ADD_TO_CART",r.VIEW_CATEGORY="VIEW_CATEGORY",r.VIEW_TAG="VIEW_TAG",r.SEARCH="SEARCH",r.APPLY_COUPON="APPLY_COUPON",r}(t||(e.ActionType=t={}))}),Nx=$n(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=e&&e.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(Dx(),e),r(Tx(),e),r(Yn(),e),r(Rx(),e)});function zR(e,t){return Object.is(e,t)}var tn=null,au=!1,Gh=1,Ci=Symbol("SIGNAL");function $e(e){let t=tn;return tn=e,t}function KE(){return tn}var cu={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 ZE(e){if(au)throw new Error("");if(tn===null)return;tn.consumerOnSignalRead(e);let t=tn.nextProducerIndex++;if(uu(tn),t<tn.producerNode.length&&tn.producerNode[t]!==e&&Tc(tn)){let r=tn.producerNode[t];lu(r,tn.producerIndexOfThis[t])}tn.producerNode[t]!==e&&(tn.producerNode[t]=e,tn.producerIndexOfThis[t]=Tc(tn)?ew(e,tn,t):0),tn.producerLastReadVersion[t]=e.version}function qR(){Gh++}function YR(e){if(!(Tc(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Gh)){if(!e.producerMustRecompute(e)&&!qh(e)){YE(e);return}e.producerRecomputeValue(e),YE(e)}}function XE(e){if(e.liveConsumerNode===void 0)return;let t=au;au=!0;try{for(let r of e.liveConsumerNode)r.dirty||KR(r)}finally{au=t}}function JE(){return tn?.consumerAllowSignalWrites!==!1}function KR(e){e.dirty=!0,XE(e),e.consumerMarkedDirty?.(e)}function YE(e){e.dirty=!1,e.lastCleanEpoch=Gh}function zh(e){return e&&(e.nextProducerIndex=0),$e(e)}function QE(e,t){if($e(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(Tc(e))for(let r=e.nextProducerIndex;r<e.producerNode.length;r++)lu(e.producerNode[r],e.producerIndexOfThis[r]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function qh(e){uu(e);for(let t=0;t<e.producerNode.length;t++){let r=e.producerNode[t],n=e.producerLastReadVersion[t];if(n!==r.version||(YR(r),n!==r.version))return!0}return!1}function Yh(e){if(uu(e),Tc(e))for(let t=0;t<e.producerNode.length;t++)lu(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 ew(e,t,r){if(tw(e),e.liveConsumerNode.length===0&&nw(e))for(let n=0;n<e.producerNode.length;n++)e.producerIndexOfThis[n]=ew(e.producerNode[n],e,n);return e.liveConsumerIndexOfThis.push(r),e.liveConsumerNode.push(t)-1}function lu(e,t){if(tw(e),e.liveConsumerNode.length===1&&nw(e))for(let n=0;n<e.producerNode.length;n++)lu(e.producerNode[n],e.producerIndexOfThis[n]);let r=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[r],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[r],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let n=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];uu(i),i.producerIndexOfThis[n]=t}}function Tc(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function uu(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function tw(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function nw(e){return e.producerNode!==void 0}function ZR(){throw new Error}var rw=ZR;function iw(e){rw(e)}function ow(e){rw=e}var XR=null;function sw(e){let t=Object.create(cw);t.value=e;let r=()=>(ZE(t),t.value);return r[Ci]=t,r}function Kh(e,t){JE()||iw(e),e.equal(e.value,t)||(e.value=t,JR(e))}function aw(e,t){JE()||iw(e),Kh(e,t(e.value))}var cw=re(w({},cu),{equal:zR,value:void 0,kind:"signal"});function JR(e){e.version++,qR(),XE(e),XR?.()}function Ie(e){return typeof e=="function"}function du(e){let t=e(r=>{Error.call(r),r.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var fu=du(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
2
2
  ${t.map((r,n)=>`${n+1}) ${r.toString()}`).join(`
3
- `)}`:"",this.name="UnsubscriptionError",this.errors=t});function Ao(e,t){if(e){let r=e.indexOf(t);0<=r&&e.splice(r,1)}}var dt=class jh{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:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let s of r)s.remove(this);else r.remove(this);let{initialTeardown:n}=this;if(Ie(n))try{n()}catch(s){t=s instanceof fu?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{uw(s)}catch(o){t=t??[],o instanceof fu?t=[...t,...o.errors]:t.push(o)}}if(t)throw new fu(t)}}add(t){var r;if(t&&t!==this)if(this.closed)uw(t);else{if(t instanceof jh){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}}_hasParent(t){let{_parentage:r}=this;return r===t||Array.isArray(r)&&r.includes(t)}_addParent(t){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t}_removeParent(t){let{_parentage:r}=this;r===t?this._parentage=null:Array.isArray(r)&&Ao(r,t)}remove(t){let{_finalizers:r}=this;r&&Ao(r,t),t instanceof jh&&t._removeParent(this)}};dt.EMPTY=(()=>{let e=new dt;return e.closed=!0,e})();var Xh=dt.EMPTY;function pu(e){return e instanceof dt||e&&"closed"in e&&Ie(e.remove)&&Ie(e.add)&&Ie(e.unsubscribe)}function uw(e){Ie(e)?e():e.unsubscribe()}var Ir={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$s={setTimeout(e,t,...r){let{delegate:n}=$s;return n?.setTimeout?n.setTimeout(e,t,...r):setTimeout(e,t,...r)},clearTimeout(e){let{delegate:t}=$s;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function hu(e){$s.setTimeout(()=>{let{onUnhandledError:t}=Ir;if(t)t(e);else throw e})}function xc(){}var dw=Jh("C",void 0,void 0);function fw(e){return Jh("E",void 0,e)}function pw(e){return Jh("N",e,void 0)}function Jh(e,t,r){return{kind:e,value:t,error:r}}var Mo=null;function Ws(e){if(Ir.useDeprecatedSynchronousErrorHandling){let t=!Mo;if(t&&(Mo={errorThrown:!1,error:null}),e(),t){let{errorThrown:r,error:n}=Mo;if(Mo=null,r)throw n}}else e()}function hw(e){Ir.useDeprecatedSynchronousErrorHandling&&Mo&&(Mo.errorThrown=!0,Mo.error=e)}var Oo=class extends dt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,pu(e)&&e.add(this)):this.destination=nN}static create(e,t,r){return new Gs(e,t,r)}next(e){this.isStopped?em(pw(e),this):this._next(e)}error(e){this.isStopped?em(fw(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?em(dw,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()}}},eN=Function.prototype.bind;function Qh(e,t){return eN.call(e,t)}var tm=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(r){mu(r)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(r){mu(r)}else mu(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){mu(t)}}},Gs=class extends Oo{constructor(e,t,r){super();let n;if(Ie(e)||!e)n={next:e??void 0,error:t??void 0,complete:r??void 0};else{let i;this&&Ir.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),n={next:e.next&&Qh(e.next,i),error:e.error&&Qh(e.error,i),complete:e.complete&&Qh(e.complete,i)}):n=e}this.destination=new tm(n)}};function mu(e){Ir.useDeprecatedSynchronousErrorHandling?hw(e):hu(e)}function tN(e){throw e}function em(e,t){let{onStoppedNotification:r}=Ir;r&&$s.setTimeout(()=>r(e,t))}var nN={closed:!0,next:xc,error:tN,complete:xc},zs=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ji(e){return e}function mw(e){return e.length===0?Ji:e.length===1?e[0]:function(t){return e.reduce((r,n)=>n(r),t)}}var nt=(()=>{class e{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new e;return n.source=this,n.operator=r,n}subscribe(r,n,i){let s=iN(r)?r:new Gs(r,n,i);return Ws(()=>{let{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=gw(n),new n((i,s)=>{let o=new Gs({next:a=>{try{r(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[zs](){return this}pipe(...r){return mw(r)(this)}toPromise(r){return r=gw(r),new r((n,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>n(s))})}}return e.create=t=>new e(t),e})();function gw(e){var t;return(t=e??Ir.Promise)!==null&&t!==void 0?t:Promise}function rN(e){return e&&Ie(e.next)&&Ie(e.error)&&Ie(e.complete)}function iN(e){return e&&e instanceof Oo||rN(e)&&pu(e)}function oN(e){return Ie(e?.lift)}function Dt(e){return t=>{if(oN(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Rt(e,t,r,n,i){return new nm(e,t,r,n,i)}var nm=class extends Oo{constructor(e,t,r,n,i,s){super(e),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=t?function(o){try{t(o)}catch(a){e.error(a)}}:super._next,this._error=n?function(o){try{n(o)}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(o){e.error(o)}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))}}},qs={schedule(e){let t=requestAnimationFrame,r=cancelAnimationFrame,{delegate:n}=qs;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);let i=t(s=>{r=void 0,e(s)});return new dt(()=>r?.(i))},requestAnimationFrame(...e){let{delegate:t}=qs;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=qs;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},vw=du(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),ie=(()=>{class e extends nt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new gu(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new vw}next(r){Ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){Ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){Ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:i,observers:s}=this;return n||i?Xh:(this.currentObservers=null,s.push(r),new dt(()=>{this.currentObservers=null,Ao(s,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:i,isStopped:s}=this;n?r.error(i):s&&r.complete()}asObservable(){let r=new nt;return r.source=this,r}}return e.create=(t,r)=>new gu(t,r),e})(),gu=class extends ie{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.next)===null||r===void 0||r.call(t,e)}error(e){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.error)===null||r===void 0||r.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,r;return(r=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&r!==void 0?r:Xh}},Tr=class extends ie{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:r}=this;if(e)throw t;return this._throwIfClosed(),r}next(e){super.next(this._value=e)}},Rc={now(){return(Rc.delegate||Date).now()},delegate:void 0},Po=class extends ie{constructor(e=1/0,t=1/0,r=Rc){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=r,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:r,_infiniteTimeWindow:n,_timestampProvider:i,_windowTime:s}=this;t||(r.push(e),!n&&r.push(i.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:r,_buffer:n}=this,i=n.slice();for(let s=0;s<i.length&&!e.closed;s+=r?1:2)e.next(i[s]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:r,_infiniteTimeWindow:n}=this,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){let s=t.now(),o=0;for(let a=1;a<r.length&&r[a]<=s;a+=2)o=a;o&&r.splice(0,o+1)}}},vu=class extends dt{constructor(e,t){super()}schedule(e,t=0){return this}},Nc={setInterval(e,t,...r){let{delegate:n}=Nc;return n?.setInterval?n.setInterval(e,t,...r):setInterval(e,t,...r)},clearInterval(e){let{delegate:t}=Nc;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Ys=class extends vu{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var r;if(this.closed)return this;this.state=e;let n=this.id,i=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,r=0){return Nc.setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,t,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return t;t!=null&&Nc.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let r=this._execute(e,t);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let r=!1,n;try{this.work(e)}catch(i){r=!0,n=i||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:r}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Ao(r,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Ks=class wT{constructor(t,r=wT.now){this.schedulerActionCtor=t,this.now=r}schedule(t,r=0,n){return new this.schedulerActionCtor(this,t).schedule(n,r)}};Ks.now=Rc.now;var Zs=class extends Ks{constructor(e,t=Ks.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let r;this._active=!0;do if(r=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},ko=new Zs(Ys),yw=ko,yu=class extends Ys{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,r=0){return r!==null&&r>0?super.requestAsyncId(e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=qs.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,r=0){var n;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(e,t,r);let{actions:i}=e;t!=null&&((n=i[i.length-1])===null||n===void 0?void 0:n.id)!==t&&(qs.cancelAnimationFrame(t),e._scheduled=void 0)}},_u=class extends Zs{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:r}=this,n;e=e||r.shift();do if(n=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}}},Eu=new _u(yu),wu=new nt(e=>e.complete());function bu(e){return e&&Ie(e.schedule)}function _w(e){return e[e.length-1]}function Qi(e){return bu(_w(e))?e.pop():void 0}function Ew(e,t){return typeof _w(e)=="number"?e.pop():t}function bw(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(h){try{c(n.next(h))}catch(d){o(d)}}function l(h){try{c(n.throw(h))}catch(d){o(d)}}function c(h){h.done?s(h.value):i(h.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function ww(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Lo(e){return this instanceof Lo?(this.v=e,this):new Lo(e)}function Cw(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(g){return function(m){return Promise.resolve(m).then(g,d)}}function a(g,m){n[g]&&(i[g]=function(b){return new Promise(function(I,A){s.push([g,b,I,A])>1||l(g,b)})},m&&(i[g]=m(i[g])))}function l(g,m){try{c(n[g](m))}catch(b){f(s[0][3],b)}}function c(g){g.value instanceof Lo?Promise.resolve(g.value.v).then(h,d):f(s[0][2],g)}function h(g){l("next",g)}function d(g){l("throw",g)}function f(g,m){g(m),s.shift(),s.length&&l(s[0][0],s[0][1])}}function Sw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof ww=="function"?ww(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}var Xs=e=>e&&typeof e.length=="number"&&typeof e!="function";function Cu(e){return Ie(e?.then)}function Su(e){return Ie(e[zs])}function Du(e){return Symbol.asyncIterator&&Ie(e?.[Symbol.asyncIterator])}function Iu(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 sN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Tu=sN();function xu(e){return Ie(e?.[Tu])}function Ru(e){return Cw(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:r,done:n}=yield Lo(t.read());if(n)return yield Lo(void 0);yield yield Lo(r)}}finally{t.releaseLock()}})}function Nu(e){return Ie(e?.getReader)}function Vt(e){if(e instanceof nt)return e;if(e!=null){if(Su(e))return aN(e);if(Xs(e))return cN(e);if(Cu(e))return lN(e);if(Du(e))return Dw(e);if(xu(e))return uN(e);if(Nu(e))return dN(e)}throw Iu(e)}function aN(e){return new nt(t=>{let r=e[zs]();if(Ie(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function cN(e){return new nt(t=>{for(let r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function lN(e){return new nt(t=>{e.then(r=>{t.closed||(t.next(r),t.complete())},r=>t.error(r)).then(null,hu)})}function uN(e){return new nt(t=>{for(let r of e)if(t.next(r),t.closed)return;t.complete()})}function Dw(e){return new nt(t=>{fN(e,t).catch(r=>t.error(r))})}function dN(e){return Dw(Ru(e))}function fN(e,t){var r,n,i,s;return bw(this,void 0,void 0,function*(){try{for(r=Sw(e);n=yield r.next(),!n.done;){let o=n.value;if(t.next(o),t.closed)return}}catch(o){i={error:o}}finally{try{n&&!n.done&&(s=r.return)&&(yield s.call(r))}finally{if(i)throw i.error}}t.complete()})}function ur(e,t,r,n=0,i=!1){let s=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!i)return s}function Au(e,t=0){return Dt((r,n)=>{r.subscribe(Rt(n,i=>ur(n,e,()=>n.next(i),t),()=>ur(n,e,()=>n.complete(),t),i=>ur(n,e,()=>n.error(i),t)))})}function Mu(e,t=0){return Dt((r,n)=>{n.add(e.schedule(()=>r.subscribe(n),t))})}function Iw(e,t){return Vt(e).pipe(Mu(t),Au(t))}function Tw(e,t){return Vt(e).pipe(Mu(t),Au(t))}function xw(e,t){return new nt(r=>{let n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}function Rw(e,t){return new nt(r=>{let n;return ur(r,t,()=>{n=e[Tu](),ur(r,t,()=>{let i,s;try{({value:i,done:s}=n.next())}catch(o){r.error(o);return}s?r.complete():r.next(i)},0,!0)}),()=>Ie(n?.return)&&n.return()})}function Ou(e,t){if(!e)throw new Error("Iterable cannot be null");return new nt(r=>{ur(r,t,()=>{let n=e[Symbol.asyncIterator]();ur(r,t,()=>{n.next().then(i=>{i.done?r.complete():r.next(i.value)})},0,!0)})})}function Nw(e,t){return Ou(Ru(e),t)}function Aw(e,t){if(e!=null){if(Su(e))return Iw(e,t);if(Xs(e))return xw(e,t);if(Cu(e))return Tw(e,t);if(Du(e))return Ou(e,t);if(xu(e))return Rw(e,t);if(Nu(e))return Nw(e,t)}throw Iu(e)}function Js(e,t){return t?Aw(e,t):Vt(e)}function Fo(...e){let t=Qi(e);return Js(e,t)}function Mw(e){return e instanceof Date&&!isNaN(e)}function dr(e,t){return Dt((r,n)=>{let i=0;r.subscribe(Rt(n,s=>{n.next(e.call(t,s,i++))}))})}var{isArray:pN}=Array;function hN(e,t){return pN(t)?e(...t):e(t)}function Ow(e){return dr(t=>hN(e,t))}function Pw(e,t,r,n,i,s,o,a){let l=[],c=0,h=0,d=!1,f=()=>{d&&!l.length&&!c&&t.complete()},g=b=>c<n?m(b):l.push(b),m=b=>{s&&t.next(b),c++;let I=!1;Vt(r(b,h++)).subscribe(Rt(t,A=>{i?.(A),s?g(A):t.next(A)},()=>{I=!0},void 0,()=>{if(I)try{for(c--;l.length&&c<n;){let A=l.shift();o?ur(t,o,()=>m(A)):m(A)}f()}catch(A){t.error(A)}}))};return e.subscribe(Rt(t,g,()=>{d=!0,f()})),()=>{a?.()}}function Ac(e,t,r=1/0){return Ie(t)?Ac((n,i)=>dr((s,o)=>t(n,s,i,o))(Vt(e(n,i))),r):(typeof t=="number"&&(r=t),Dt((n,i)=>Pw(n,i,e,r)))}function Pu(e=1/0){return Ac(Ji,e)}function kw(){return Pu(1)}function rm(...e){return kw()(Js(e,Qi(e)))}function im(e){return new nt(t=>{Vt(e()).subscribe(t)})}var mN=["addListener","removeListener"],gN=["addEventListener","removeEventListener"],vN=["on","off"];function Bo(e,t,r,n){if(Ie(r)&&(n=r,r=void 0),n)return Bo(e,t,r).pipe(Ow(n));let[i,s]=EN(e)?gN.map(o=>a=>e[o](t,a,r)):yN(e)?mN.map(Lw(e,t)):_N(e)?vN.map(Lw(e,t)):[];if(!i&&Xs(e))return Ac(o=>Bo(o,t,r))(Vt(e));if(!i)throw new TypeError("Invalid event target");return new nt(o=>{let a=(...l)=>o.next(1<l.length?l:l[0]);return i(a),()=>s(a)})}function Lw(e,t){return r=>n=>e[r](t,n)}function yN(e){return Ie(e.addListener)&&Ie(e.removeListener)}function _N(e){return Ie(e.on)&&Ie(e.off)}function EN(e){return Ie(e.addEventListener)&&Ie(e.removeEventListener)}function ku(e=0,t,r=yw){let n=-1;return t!=null&&(bu(t)?r=t:n=t),new nt(i=>{let s=Mw(e)?+e-r.now():e;s<0&&(s=0);let o=0;return r.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},s)})}function om(e=0,t=ko){return e<0&&(e=0),ku(e,e,t)}function eo(...e){let t=Qi(e),r=Ew(e,1/0),n=e;return n.length?n.length===1?Vt(n[0]):Pu(r)(Js(n,t)):wu}function Vo(e,t){return Dt((r,n)=>{let i=0;r.subscribe(Rt(n,s=>e.call(t,s,i++)&&n.next(s)))})}function Fw(e){return Dt((t,r)=>{let n=!1,i=null,s=null,o=!1,a=()=>{if(s?.unsubscribe(),s=null,n){n=!1;let c=i;i=null,r.next(c)}o&&r.complete()},l=()=>{s=null,o&&r.complete()};t.subscribe(Rt(r,c=>{n=!0,i=c,s||Vt(e(c)).subscribe(s=Rt(r,a,l))},()=>{o=!0,(!n||!s||s.closed)&&r.complete()}))})}function Lu(e,t=ko){return Fw(()=>ku(e,t))}function xr(e,t=ko){return Dt((r,n)=>{let i=null,s=null,o=null,a=()=>{if(i){i.unsubscribe(),i=null;let c=s;s=null,n.next(c)}};function l(){let c=o+e,h=t.now();if(h<c){i=this.schedule(void 0,c-h),n.add(i);return}a()}r.subscribe(Rt(n,c=>{s=c,o=t.now(),i||(i=t.schedule(l,e),n.add(i))},()=>{a(),n.complete()},void 0,()=>{s=i=null}))})}function sm(e){return e<=0?()=>wu:Dt((t,r)=>{let n=0;t.subscribe(Rt(r,i=>{++n<=e&&(r.next(i),e<=n&&r.complete())}))})}function Fu(e,t=Ji){return e=e??wN,Dt((r,n)=>{let i,s=!0;r.subscribe(Rt(n,o=>{let a=t(o);(s||!e(i,a))&&(s=!1,i=a,n.next(o))}))})}function wN(e,t){return e===t}function am(e){return Vo((t,r)=>e<=r)}function Si(...e){let t=Qi(e);return Dt((r,n)=>{(t?rm(e,r,t):rm(e,r)).subscribe(n)})}function Qs(e,t){return Dt((r,n)=>{let i=null,s=0,o=!1,a=()=>o&&!i&&n.complete();r.subscribe(Rt(n,l=>{i?.unsubscribe();let c=0,h=s++;Vt(e(l,h)).subscribe(i=Rt(n,d=>n.next(t?t(l,d,h,c++):d),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function Wr(e){return Dt((t,r)=>{Vt(e).subscribe(Rt(r,()=>r.complete(),xc)),!r.closed&&t.subscribe(r)})}function cm(e,t,r){let n=Ie(e)||t||r?{next:e,error:t,complete:r}:e;return n?Dt((i,s)=>{var o;(o=n.subscribe)===null||o===void 0||o.call(n);let a=!0;i.subscribe(Rt(s,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),s.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),s.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),s.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Ji}var Db="https://g.co/ng/security#xss",Ge=class extends Error{code;constructor(e,t){super(Dg(e,t)),this.code=e}};function Dg(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function Ig(e){return{toString:e}.toString()}var Lc=globalThis;function Nt(e){for(let t in e)if(e[t]===Nt)return t;throw Error("Could not find renamed property on target object.")}function bN(e,t){for(let r in t)t.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function fr(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(fr).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let r=e.toString();if(r==null)return""+r;let n=r.indexOf(`
4
- `);return n>=0?r.slice(0,n):r}function Bw(e,t){return e?t?`${e} ${t}`:e:t||""}var CN=Nt({__forward_ref__:Nt});function Tg(e){return e.__forward_ref__=Tg,e.toString=function(){return fr(this())},e}function Pn(e){return Ib(e)?e():e}function Ib(e){return typeof e=="function"&&e.hasOwnProperty(CN)&&e.__forward_ref__===Tg}function oe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function xg(e){return Vw(e,Tb)||Vw(e,xb)}function Vw(e,t){return e.hasOwnProperty(t)?e[t]:null}function SN(e){return e&&(e[Tb]||e[xb])||null}function Uw(e){return e&&(e.hasOwnProperty(Hw)||e.hasOwnProperty(DN))?e[Hw]:null}var Tb=Nt({\u0275prov:Nt}),Hw=Nt({\u0275inj:Nt}),xb=Nt({ngInjectableDef:Nt}),DN=Nt({ngInjectorDef:Nt}),he=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=oe({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Rb(e){return e&&!!e.\u0275providers}var IN=Nt({\u0275cmp:Nt}),TN=Nt({\u0275dir:Nt}),xN=Nt({\u0275pipe:Nt}),Yu=Nt({\u0275fac:Nt}),kc=Nt({__NG_ELEMENT_ID__:Nt}),jw=Nt({__NG_ENV_ID__:Nt});function Kc(e){return typeof e=="string"?e:e==null?"":String(e)}function RN(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Kc(e)}function NN(e,t){throw new Ge(-200,e)}function Rg(e,t){throw new Ge(-201,!1)}var Ze=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}(Ze||{}),Cm;function Nb(){return Cm}function Wn(e){let t=Cm;return Cm=e,t}function Ab(e,t,r){let n=xg(e);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&Ze.Optional)return null;if(t!==void 0)return t;Rg(e,"Injector")}var AN={},Fc=AN,MN="__NG_DI_FLAG__",Ku="ngTempTokenPath",ON="ngTokenPath",PN=/\n/gm,kN="\u0275",$w="__source",ia;function LN(){return ia}function to(e){let t=ia;return ia=e,t}function FN(e,t=Ze.Default){if(ia===void 0)throw new Ge(-203,!1);return ia===null?Ab(e,void 0,t):ia.get(e,t&Ze.Optional?null:void 0,t)}function Xe(e,t=Ze.Default){return(Nb()||FN)(Pn(e),t)}function O(e,t=Ze.Default){return Xe(e,vd(t))}function vd(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Sm(e){let t=[];for(let r=0;r<e.length;r++){let n=Pn(e[r]);if(Array.isArray(n)){if(n.length===0)throw new Ge(900,!1);let i,s=Ze.Default;for(let o=0;o<n.length;o++){let a=n[o],l=BN(a);typeof l=="number"?l===-1?i=a.token:s|=l:i=a}t.push(Xe(i,s))}else t.push(Xe(n))}return t}function BN(e){return e[MN]}function VN(e,t,r,n){let i=e[Ku];throw t[$w]&&i.unshift(t[$w]),e.message=UN(`
5
- `+e.message,i,r,n),e[ON]=i,e[Ku]=null,e}function UN(e,t,r,n=null){e=e&&e.charAt(0)===`
6
- `&&e.charAt(1)==kN?e.slice(2):e;let i=fr(t);if(Array.isArray(t))i=t.map(fr).join(" -> ");else if(typeof t=="object"){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+(typeof a=="string"?JSON.stringify(a):fr(a)))}i=`{${s.join(", ")}}`}return`${r}${n?"("+n+")":""}[${i}]: ${e.replace(PN,`
7
- `)}`}function Ho(e,t){return e.hasOwnProperty(Yu)?e[Yu]:null}function HN(e,t,r){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],s=t[n];if(r&&(i=r(i),s=r(s)),s!==i)return!1}return!0}function jN(e){return e.flat(Number.POSITIVE_INFINITY)}function Ng(e,t){e.forEach(r=>Array.isArray(r)?Ng(r,t):t(r))}function Mb(e,t,r){t>=e.length?e.push(r):e.splice(t,0,r)}function Zu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function $N(e,t,r,n){let i=e.length;if(i==t)e.push(r,n);else if(i===1)e.push(n,e[0]),e[0]=r;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=r,e[t+1]=n}}function WN(e,t,r){let n=Zc(e,t);return n>=0?e[n|1]=r:(n=~n,$N(e,n,t,r)),n}function lm(e,t){let r=Zc(e,t);if(r>=0)return e[r|1]}function Zc(e,t){return GN(e,t,1)}function GN(e,t,r){let n=0,i=e.length>>r;for(;i!==n;){let s=n+(i-n>>1),o=e[s<<r];if(t===o)return s<<r;o>t?i=s:n=s+1}return~(i<<r)}var jo={},io=[],Bc=new he(""),Ob=new he("",-1),Pb=new he(""),Xu=class{get(e,t=Fc){if(t===Fc){let r=new Error(`NullInjectorError: No provider for ${fr(e)}!`);throw r.name="NullInjectorError",r}return t}};function $o(e){return e[IN]||null}function kb(e){return e[TN]||null}function Lb(e){return e[xN]||null}function zN(e){let t=$o(e)||kb(e)||Lb(e);return t!==null&&t.standalone}function Fb(e){return{\u0275providers:e}}function qN(...e){return{\u0275providers:Bb(!0,e),\u0275fromNgModule:!0}}function Bb(e,...t){let r=[],n=new Set,i,s=o=>{r.push(o)};return Ng(t,o=>{let a=o;Dm(a,s,[],n)&&(i||=[],i.push(a))}),i!==void 0&&Vb(i,s),r}function Vb(e,t){for(let r=0;r<e.length;r++){let{ngModule:n,providers:i}=e[r];Ag(i,s=>{t(s,n)})}}function Dm(e,t,r,n){if(e=Pn(e),!e)return!1;let i=null,s=Uw(e),o=!s&&$o(e);if(!s&&!o){let l=e.ngModule;if(s=Uw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=n.has(i);if(o){if(a)return!1;if(n.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)Dm(c,t,r,n)}}else if(s){if(s.imports!=null&&!a){n.add(i);let c;try{Ng(s.imports,h=>{Dm(h,t,r,n)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Vb(c,t)}if(!a){let c=Ho(i)||(()=>new i);t({provide:i,useFactory:c,deps:io},i),t({provide:Pb,useValue:i,multi:!0},i),t({provide:Bc,useValue:()=>Xe(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Ag(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Ag(e,t){for(let r of e)Rb(r)&&(r=r.\u0275providers),Array.isArray(r)?Ag(r,t):t(r)}var YN=Nt({provide:String,useValue:Nt});function Ub(e){return e!==null&&typeof e=="object"&&YN in e}function KN(e){return!!(e&&e.useExisting)}function ZN(e){return!!(e&&e.useFactory)}function aa(e){return typeof e=="function"}function XN(e){return!!e.useClass}var yd=new he(""),ju={},JN={},um;function _d(){return um===void 0&&(um=new Xu),um}var Gn=class{},Vc=class extends Gn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,r,n){super(),this.parent=t,this.source=r,this.scopes=n,Tm(e,s=>this.processProvider(s)),this.records.set(Ob,ea(void 0,this)),n.has("environment")&&this.records.set(Gn,ea(void 0,this));let i=this.records.get(yd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Pb,io,Ze.Self))}destroy(){Oc(this),this._destroyed=!0;let e=$e(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of t)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),$e(e)}}onDestroy(e){return Oc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Oc(this);let t=to(this),r=Wn(void 0),n;try{return e()}finally{to(t),Wn(r)}}get(e,t=Fc,r=Ze.Default){if(Oc(this),e.hasOwnProperty(jw))return e[jw](this);r=vd(r);let n,i=to(this),s=Wn(void 0);try{if(!(r&Ze.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=rA(e)&&xg(e);l&&this.injectableDefInScope(l)?a=ea(Im(e),ju):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=r&Ze.Self?_d():this.parent;return t=r&Ze.Optional&&t===Fc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ku]=o[Ku]||[]).unshift(fr(e)),i)throw o;return VN(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),to(i)}}resolveInjectorInitializers(){let e=$e(null),t=to(this),r=Wn(void 0),n;try{let i=this.get(Bc,io,Ze.Self);for(let s of i)s()}finally{to(t),Wn(r),$e(e)}}toString(){let e=[],t=this.records;for(let r of t.keys())e.push(fr(r));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Pn(e);let t=aa(e)?e:Pn(e&&e.provide),r=eA(e);if(!aa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=ea(void 0,ju,!0),n.factory=()=>Sm(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,r)}hydrate(e,t){let r=$e(null);try{return t.value===ju&&(t.value=JN,t.value=t.factory()),typeof t.value=="object"&&t.value&&nA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{$e(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Pn(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 Im(e){let t=xg(e),r=t!==null?t.factory:Ho(e);if(r!==null)return r;if(e instanceof he)throw new Ge(204,!1);if(e instanceof Function)return QN(e);throw new Ge(204,!1)}function QN(e){if(e.length>0)throw new Ge(204,!1);let t=SN(e);return t!==null?()=>t.factory(e):()=>new e}function eA(e){if(Ub(e))return ea(void 0,e.useValue);{let t=Hb(e);return ea(t,ju)}}function Hb(e,t,r){let n;if(aa(e)){let i=Pn(e);return Ho(i)||Im(i)}else if(Ub(e))n=()=>Pn(e.useValue);else if(ZN(e))n=()=>e.useFactory(...Sm(e.deps||[]));else if(KN(e))n=()=>Xe(Pn(e.useExisting));else{let i=Pn(e&&(e.useClass||e.provide));if(tA(e))n=()=>new i(...Sm(e.deps));else return Ho(i)||Im(i)}return n}function Oc(e){if(e.destroyed)throw new Ge(205,!1)}function ea(e,t,r=!1){return{factory:e,value:t,multi:r?[]:void 0}}function tA(e){return!!e.deps}function nA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function rA(e){return typeof e=="function"||typeof e=="object"&&e instanceof he}function Tm(e,t){for(let r of e)Array.isArray(r)?Tm(r,t):r&&Rb(r)?Tm(r.\u0275providers,t):t(r)}function jb(e,t){e instanceof Vc&&Oc(e);let r,n=to(e),i=Wn(void 0);try{return t()}finally{to(n),Wn(i)}}function $b(){return Nb()!==void 0||LN()!=null}function Wb(e){if(!$b())throw new Ge(-203,!1)}function iA(e){return typeof e=="function"}var Oi=0,Te=1,we=2,Tn=3,Nr=4,Or=5,Uc=6,Ju=7,tn=8,Hc=9,Di=10,nn=11,jc=12,Ww=13,fa=14,Ar=15,Wo=16,ta=17,Ii=18,Ed=19,Gb=20,no=21,dm=22,Qu=23,er=24,oa=25,rn=26,zb=1,Go=7,ed=8,ca=9,In=10;function ro(e){return Array.isArray(e)&&typeof e[zb]=="object"}function Pi(e){return Array.isArray(e)&&e[zb]===!0}function Mg(e){return(e.flags&4)!==0}function pa(e){return e.componentOffset>-1}function wd(e){return(e.flags&1)===1}function zr(e){return!!e.template}function td(e){return(e[we]&512)!==0}function Xc(e){return(e[we]&256)===256}var xm=class{previousValue;currentValue;firstChange;constructor(e,t,r){this.previousValue=e,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}};function qb(e,t,r,n){t!==null?t.applyValueToInputSignal(t,n):e[r]=n}var Xo=(()=>{let e=()=>Yb;return e.ngInherit=!0,e})();function Yb(e){return e.type.prototype.ngOnChanges&&(e.setInput=sA),oA}function oA(){let e=Zb(this),t=e?.current;if(t){let r=e.previous;if(r===jo)e.previous=t;else for(let n in t)r[n]=t[n];e.current=null,this.ngOnChanges(t)}}function sA(e,t,r,n,i){let s=this.declaredInputs[n],o=Zb(e)||aA(e,{previous:jo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new xm(c&&c.currentValue,r,l===jo),qb(e,t,i,r)}var Kb="__ngSimpleChanges__";function Zb(e){return e[Kb]||null}function aA(e,t){return e[Kb]=t}var Gw=null,gt=function(e,t=null,r){Gw?.(e,t,r)},Xb="svg",cA="math";function qr(e){for(;Array.isArray(e);)e=e[Oi];return e}function Jb(e,t){return qr(t[e])}function Zr(e,t){return qr(t[e.index])}function Og(e,t){return e.data[t]}function bd(e,t){return e[t]}function Yr(e,t){let r=t[e];return ro(r)?r:r[Oi]}function lA(e){return(e[we]&4)===4}function Pg(e){return(e[we]&128)===128}function uA(e){return Pi(e[Tn])}function oo(e,t){return t==null?null:e[t]}function Qb(e){e[ta]=0}function kg(e){e[we]&1024||(e[we]|=1024,Pg(e)&&Jc(e))}function dA(e,t){for(;e>0;)t=t[fa],e--;return t}function Cd(e){return!!(e[we]&9216||e[er]?.dirty)}function Rm(e){e[Di].changeDetectionScheduler?.notify(8),e[we]&64&&(e[we]|=1024),Cd(e)&&Jc(e)}function Jc(e){e[Di].changeDetectionScheduler?.notify(0);let t=zo(e);for(;t!==null&&!(t[we]&8192||(t[we]|=8192,!Pg(t)));)t=zo(t)}function eC(e,t){if(Xc(e))throw new Ge(911,!1);e[no]===null&&(e[no]=[]),e[no].push(t)}function fA(e,t){if(e[no]===null)return;let r=e[no].indexOf(t);r!==-1&&e[no].splice(r,1)}function zo(e){let t=e[Tn];return Pi(t)?t[Tn]:t}function tC(e){return e[Ju]??=[]}function nC(e){return e.cleanup??=[]}function pA(e,t,r,n){let i=tC(t);i.push(r),e.firstCreatePass&&nC(e).push(n,i.length-1)}var Re={lFrame:uC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Nm=!1;function hA(){return Re.lFrame.elementDepthCount}function mA(){Re.lFrame.elementDepthCount++}function gA(){Re.lFrame.elementDepthCount--}function Lg(){return Re.bindingsEnabled}function vA(){return Re.skipHydrationRootTNode!==null}function yA(e){return Re.skipHydrationRootTNode===e}function _A(){Re.skipHydrationRootTNode=null}function Ne(){return Re.lFrame.lView}function Xt(){return Re.lFrame.tView}function It(e){return Re.lFrame.contextLView=e,e[tn]}function Tt(e){return Re.lFrame.contextLView=null,e}function tr(){let e=rC();for(;e!==null&&e.type===64;)e=e.parent;return e}function rC(){return Re.lFrame.currentTNode}function EA(){let e=Re.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function ao(e,t){let r=Re.lFrame;r.currentTNode=e,r.isParent=t}function Fg(){return Re.lFrame.isParent}function iC(){Re.lFrame.isParent=!1}function oC(){return Re.lFrame.contextLView}function sC(){return Nm}function zw(e){let t=Nm;return Nm=e,t}function Qc(){let e=Re.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function wA(e){return Re.lFrame.bindingIndex=e}function el(){return Re.lFrame.bindingIndex++}function bA(e){let t=Re.lFrame,r=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,r}function CA(){return Re.lFrame.inI18n}function SA(e,t){let r=Re.lFrame;r.bindingIndex=r.bindingRootIndex=e,Am(t)}function DA(){return Re.lFrame.currentDirectiveIndex}function Am(e){Re.lFrame.currentDirectiveIndex=e}function IA(e){let t=Re.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function aC(){return Re.lFrame.currentQueryIndex}function Bg(e){Re.lFrame.currentQueryIndex=e}function TA(e){let t=e[Te];return t.type===2?t.declTNode:t.type===1?e[Or]:null}function cC(e,t,r){if(r&Ze.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(r&Ze.Host))&&(i=TA(s),!(i===null||(s=s[fa],i.type&10))););if(i===null)return!1;t=i,e=s}let n=Re.lFrame=lC();return n.currentTNode=t,n.lView=e,!0}function Vg(e){let t=lC(),r=e[Te];Re.lFrame=t,t.currentTNode=r.firstChild,t.lView=e,t.tView=r,t.contextLView=e,t.bindingIndex=r.bindingStartIndex,t.inI18n=!1}function lC(){let e=Re.lFrame,t=e===null?null:e.child;return t===null?uC(e):t}function uC(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 dC(){let e=Re.lFrame;return Re.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var fC=dC;function Ug(){let e=dC();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 xA(e){return(Re.lFrame.contextLView=dA(e,Re.lFrame.contextLView))[tn]}function co(){return Re.lFrame.selectedIndex}function qo(e){Re.lFrame.selectedIndex=e}function Hg(){let e=Re.lFrame;return Og(e.tView,e.selectedIndex)}function hr(){Re.lFrame.currentNamespace=Xb}function Jo(){RA()}function RA(){Re.lFrame.currentNamespace=null}function NA(){return Re.lFrame.currentNamespace}var pC=!0;function Sd(){return pC}function Dd(e){pC=e}function AA(e,t,r){let{ngOnChanges:n,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(n){let o=Yb(t);(r.preOrderHooks??=[]).push(e,o),(r.preOrderCheckHooks??=[]).push(e,o)}i&&(r.preOrderHooks??=[]).push(0-e,i),s&&((r.preOrderHooks??=[]).push(e,s),(r.preOrderCheckHooks??=[]).push(e,s))}function jg(e,t){for(let r=t.directiveStart,n=t.directiveEnd;r<n;r++){let i=e.data[r].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-r,s),o&&((e.contentHooks??=[]).push(r,o),(e.contentCheckHooks??=[]).push(r,o)),a&&(e.viewHooks??=[]).push(-r,a),l&&((e.viewHooks??=[]).push(r,l),(e.viewCheckHooks??=[]).push(r,l)),c!=null&&(e.destroyHooks??=[]).push(r,c)}}function $u(e,t,r){hC(e,t,3,r)}function Wu(e,t,r,n){(e[we]&3)===r&&hC(e,t,r,n)}function fm(e,t){let r=e[we];(r&3)===t&&(r&=16383,r+=1,e[we]=r)}function hC(e,t,r,n){let i=n!==void 0?e[ta]&65535:0,s=n??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],n!=null&&a>=n)break}else t[l]<0&&(e[ta]+=65536),(a<s||s==-1)&&(MA(e,r,t,l),e[ta]=(e[ta]&4294901760)+l+2),l++}function qw(e,t){gt(4,e,t);let r=$e(null);try{t.call(e)}finally{$e(r),gt(5,e,t)}}function MA(e,t,r,n){let i=r[n]<0,s=r[n+1],o=i?-r[n]:r[n],a=e[o];i?e[we]>>14<e[ta]>>16&&(e[we]&3)===t&&(e[we]+=16384,qw(a,s)):qw(a,s)}var sa=-1,Yo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,r){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=r}};function OA(e){return e instanceof Yo}function PA(e){return(e.flags&8)!==0}function kA(e){return(e.flags&16)!==0}function LA(e,t,r){let n=0;for(;n<r.length;){let i=r[n];if(typeof i=="number"){if(i!==0)break;n++;let s=r[n++],o=r[n++],a=r[n++];e.setAttribute(t,o,a,s)}else{let s=i,o=r[++n];BA(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),n++}}return n}function FA(e){return e===3||e===4||e===6}function BA(e){return e.charCodeAt(0)===64}function la(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let r=-1;for(let n=0;n<t.length;n++){let i=t[n];typeof i=="number"?r=i:r===0||(r===-1||r===2?Yw(e,r,i,null,t[++n]):Yw(e,r,i,null,null))}}return e}function Yw(e,t,r,n,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===r){if(n===null){i!==null&&(e[s+1]=i);return}else if(n===e[s+1]){e[s+2]=i;return}}s++,n!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,r),n!==null&&e.splice(s++,0,n),i!==null&&e.splice(s++,0,i)}var pm={},Mm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,r){r=vd(r);let n=this.injector.get(e,pm,r);return n!==pm||t===pm?n:this.parentInjector.get(e,t,r)}};function mC(e){return e!==sa}function nd(e){return e&32767}function VA(e){return e>>16}function rd(e,t){let r=VA(e),n=t;for(;r>0;)n=n[fa],r--;return n}var Om=!0;function id(e){let t=Om;return Om=e,t}var UA=256,gC=UA-1,vC=5,HA=0,Gr={};function jA(e,t,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(kc)&&(n=r[kc]),n==null&&(n=r[kc]=HA++);let i=n&gC,s=1<<i;t.data[e+(i>>vC)]|=s}function od(e,t){let r=yC(e,t);if(r!==-1)return r;let n=t[Te];n.firstCreatePass&&(e.injectorIndex=t.length,hm(n.data,e),hm(t,null),hm(n.blueprint,null));let i=$g(e,t),s=e.injectorIndex;if(mC(i)){let o=nd(i),a=rd(i,t),l=a[Te].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function hm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function yC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function $g(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let r=0,n=null,i=t;for(;i!==null;){if(n=CC(i),n===null)return sa;if(r++,i=i[fa],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return sa}function Pm(e,t,r){jA(e,t,r)}function _C(e,t,r){if(r&Ze.Optional||e!==void 0)return e;Rg(t,"NodeInjector")}function EC(e,t,r,n){if(r&Ze.Optional&&n===void 0&&(n=null),(r&(Ze.Self|Ze.Host))===0){let i=e[Hc],s=Wn(void 0);try{return i?i.get(t,n,r&Ze.Optional):Ab(t,n,r&Ze.Optional)}finally{Wn(s)}}return _C(n,t,r)}function wC(e,t,r,n=Ze.Default,i){if(e!==null){if(t[we]&2048&&!(n&Ze.Self)){let o=zA(e,t,r,n,Gr);if(o!==Gr)return o}let s=bC(e,t,r,n,Gr);if(s!==Gr)return s}return EC(t,r,n,i)}function bC(e,t,r,n,i){let s=WA(r);if(typeof s=="function"){if(!cC(t,e,n))return n&Ze.Host?_C(i,r,n):EC(t,r,n,i);try{let o;if(o=s(n),o==null&&!(n&Ze.Optional))Rg(r);else return o}finally{fC()}}else if(typeof s=="number"){let o=null,a=yC(e,t),l=sa,c=n&Ze.Host?t[Ar][Or]:null;for((a===-1||n&Ze.SkipSelf)&&(l=a===-1?$g(e,t):t[a+8],l===sa||!Zw(n,!1)?a=-1:(o=t[Te],a=nd(l),t=rd(l,t)));a!==-1;){let h=t[Te];if(Kw(s,a,h.data)){let d=$A(a,t,r,o,n,c);if(d!==Gr)return d}l=t[a+8],l!==sa&&Zw(n,t[Te].data[a+8]===c)&&Kw(s,a,t)?(o=h,a=nd(l),t=rd(l,t)):a=-1}}return i}function $A(e,t,r,n,i,s){let o=t[Te],a=o.data[e+8],l=n==null?pa(a)&&Om:n!=o&&(a.type&3)!==0,c=i&Ze.Host&&s===a,h=Gu(a,o,r,l,c);return h!==null?$c(t,o,h,a):Gr}function Gu(e,t,r,n,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=n?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&r===m||g>=l&&m.type===r)return g}if(i){let g=o[l];if(g&&zr(g)&&g.type===r)return l}return null}function $c(e,t,r,n){let i=e[r],s=t.data;if(OA(i)){let o=i;o.resolving&&NN(RN(s[r]));let a=id(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=cC(e,n,Ze.Default);try{i=e[r]=o.factory(void 0,s,e,n),t.firstCreatePass&&r>=n.directiveStart&&AA(r,s[r],t)}finally{c!==null&&Wn(c),id(a),o.resolving=!1,fC()}}return i}function WA(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(kc)?e[kc]:void 0;return typeof t=="number"?t>=0?t&gC:GA:t}function Kw(e,t,r){let n=1<<e;return!!(r[t+(e>>vC)]&n)}function Zw(e,t){return!(e&Ze.Self)&&!(e&Ze.Host&&t)}var Uo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,r){return wC(this._tNode,this._lView,e,vd(r),t)}};function GA(){return new Uo(tr(),Ne())}function Id(e){return Ig(()=>{let t=e.prototype.constructor,r=t[Yu]||km(t),n=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==n;){let s=i[Yu]||km(i);if(s&&s!==r)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function km(e){return Ib(e)?()=>{let t=km(Pn(e));return t&&t()}:Ho(e)}function zA(e,t,r,n,i){let s=e,o=t;for(;s!==null&&o!==null&&o[we]&2048&&!td(o);){let a=bC(s,o,r,n|Ze.Self,Gr);if(a!==Gr)return a;let l=s.parent;if(!l){let c=o[Gb];if(c){let h=c.get(r,Gr,n);if(h!==Gr)return h}l=CC(o),o=o[fa]}s=l}return i}function CC(e){let t=e[Te],r=t.type;return r===2?t.declTNode:r===1?e[Or]:null}function Xw(e,t=null,r=null,n){let i=qA(e,t,r,n);return i.resolveInjectorInitializers(),i}function qA(e,t=null,r=null,n,i=new Set){let s=[r||io,qN(e)];return n=n||(typeof e=="object"?void 0:fr(e)),new Vc(s,t||_d(),n||null,i)}var vt=class ET{static THROW_IF_NOT_FOUND=Fc;static NULL=new Xu;static create(t,r){if(Array.isArray(t))return Xw({name:""},r,t,"");{let n=t.name??"";return Xw({name:n},t.parent,t.providers,n)}}static \u0275prov=oe({token:ET,providedIn:"any",factory:()=>Xe(Ob)});static __NG_ELEMENT_ID__=-1},YA=new he("");YA.__NG_ELEMENT_ID__=e=>{let t=tr();if(t===null)throw new Ge(204,!1);if(t.type&2)return t.value;if(e&Ze.Optional)return null;throw new Ge(204,!1)};var SC=!1,Wg=(()=>{class e{static __NG_ELEMENT_ID__=KA;static __NG_ENV_ID__=r=>r}return e})(),Lm=class extends Wg{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return eC(this._lView,e),()=>fA(this._lView,e)}};function KA(){return new Lm(Ne())}var Ti=class{},Td=new he("",{providedIn:"root",factory:()=>!1}),DC=new he(""),Gg=new he(""),xd=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Tr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let r=this.taskId++;return this.pendingTasks.add(r),r}has(r){return this.pendingTasks.has(r)}remove(r){this.pendingTasks.delete(r),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Fm=class extends ie{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,$b()&&(this.destroyRef=O(Wg,{optional:!0})??void 0,this.pendingTasks=O(xd,{optional:!0})??void 0)}emit(e){let t=$e(null);try{super.next(e)}finally{$e(t)}}subscribe(e,t,r){let n=e,i=t||(()=>null),s=r;if(e&&typeof e=="object"){let a=e;n=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),n&&(n=this.wrapInTimeout(n)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:n,error:i,complete:s});return e instanceof dt&&e.add(o),o}wrapInTimeout(e){return t=>{let r=this.pendingTasks?.add();setTimeout(()=>{e(t),r!==void 0&&this.pendingTasks?.remove(r)})}}},We=Fm;function sd(...e){}function IC(e){let t,r;function n(){e=sd;try{r!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(r),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),n()}),typeof requestAnimationFrame=="function"&&(r=requestAnimationFrame(()=>{e(),n()})),()=>n()}function Jw(e){return queueMicrotask(()=>e()),()=>{e=sd}}var zg="isAngularZone",ad=zg+"_ID",ZA=0,Ve=class Hh{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new We(!1);onMicrotaskEmpty=new We(!1);onStable=new We(!1);onError=new We(!1);constructor(t){let{enableLongStackTrace:r=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=SC}=t;if(typeof Zone>"u")throw new Ge(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&n,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,QA(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(zg)===!0}static assertInAngularZone(){if(!Hh.isInAngularZone())throw new Ge(909,!1)}static assertNotInAngularZone(){if(Hh.isInAngularZone())throw new Ge(909,!1)}run(t,r,n){return this._inner.run(t,r,n)}runTask(t,r,n,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,XA,sd,sd);try{return s.runTask(o,r,n)}finally{s.cancelTask(o)}}runGuarded(t,r,n){return this._inner.runGuarded(t,r,n)}runOutsideAngular(t){return this._outer.run(t)}},XA={};function qg(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 JA(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){IC(()=>{e.callbackScheduled=!1,Bm(e),e.isCheckStableRunning=!0,qg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Bm(e)}function QA(e){let t=()=>{JA(e)},r=ZA++;e._inner=e._inner.fork({name:"angular",properties:{[zg]:!0,[ad]:r,[ad+r]:!0},onInvokeTask:(n,i,s,o,a,l)=>{if(eM(l))return n.invokeTask(s,o,a,l);try{return Qw(e),n.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),eb(e)}},onInvoke:(n,i,s,o,a,l,c)=>{try{return Qw(e),n.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!tM(l)&&t(),eb(e)}},onHasTask:(n,i,s,o)=>{n.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Bm(e),qg(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,i,s,o)=>(n.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Bm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Qw(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function eb(e){e._nesting--,qg(e)}var cd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new We;onMicrotaskEmpty=new We;onStable=new We;onError=new We;run(e,t,r){return e.apply(t,r)}runGuarded(e,t,r){return e.apply(t,r)}runOutsideAngular(e){return e()}runTask(e,t,r,n){return e.apply(t,r)}};function eM(e){return TC(e,"__ignore_ng_zone__")}function tM(e){return TC(e,"__scheduler_tick__")}function TC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var xi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},nM=new he("",{providedIn:"root",factory:()=>{let e=O(Ve),t=O(xi);return r=>e.runOutsideAngular(()=>t.handleError(r))}});function rM(){return ha(tr(),Ne())}function ha(e,t){return new Mt(Zr(e,t))}var Mt=(()=>{class e{nativeElement;constructor(r){this.nativeElement=r}static __NG_ELEMENT_ID__=rM}return e})();function iM(e){return e instanceof Mt?e.nativeElement:e}function ki(e,t){let r=aw(e),n=r[Ci];return t?.equal&&(n.equal=t.equal),r.set=i=>Zh(n,i),r.update=i=>cw(n,i),r.asReadonly=oM.bind(r),r}function oM(){let e=this[Ci];if(e.readonlyFn===void 0){let t=()=>this();t[Ci]=e,e.readonlyFn=t}return e.readonlyFn}function sM(){return this._results[Symbol.iterator]()}var Vm=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 ie}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 r=jN(e);(this._changesDetected=!HN(this._results,r,t))&&(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]=sM};function xC(e){return(e.flags&128)===128}var RC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(RC||{}),NC=new Map,aM=0;function cM(){return aM++}function lM(e){NC.set(e[Ed],e)}function Um(e){NC.delete(e[Ed])}var tb="__ngContext__";function ma(e,t){ro(t)?(e[tb]=t[Ed],lM(t)):e[tb]=t}function AC(e){return OC(e[jc])}function MC(e){return OC(e[Nr])}function OC(e){for(;e!==null&&!Pi(e);)e=e[Nr];return e}var Hm;function PC(e){Hm=e}function kC(){if(Hm!==void 0)return Hm;if(typeof document<"u")return document;throw new Ge(210,!1)}var tl=new he("",{providedIn:"root",factory:()=>uM}),uM="ng",Yg=new he(""),Qo=new he("",{providedIn:"platform",factory:()=>"unknown"}),LC=new he(""),Kg=new he("",{providedIn:"root",factory:()=>kC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),dM="h",fM="b",FC=!1,pM=new he("",{providedIn:"root",factory:()=>FC}),Zg=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(Zg||{}),ga=new he(""),nb=new Set;function lo(e){nb.has(e)||(nb.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var BC=(()=>{class e{view;node;constructor(r,n){this.view=r,this.node=n}static __NG_ELEMENT_ID__=hM}return e})();function hM(){return new BC(Ne(),tr())}var na=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(na||{}),VC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),mM=[na.EarlyRead,na.Write,na.MixedReadWrite,na.Read],gM=(()=>{class e{ngZone=O(Ve);scheduler=O(Ti);errorHandler=O(xi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(ga,{optional:!0})}execute(){let r=this.sequences.size>0;r&&gt(16),this.executing=!0;for(let n of mM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[n]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[n];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),r&&gt(17)}register(r){let{view:n}=r;n!==void 0?((n[oa]??=[]).push(r),Jc(n),n[we]|=8192):this.executing?this.deferredRegistrations.add(r):this.addSequence(r)}addSequence(r){this.sequences.add(r),this.scheduler.notify(7)}unregister(r){this.executing&&this.sequences.has(r)?(r.erroredOrDestroyed=!0,r.pipelinedValue=void 0,r.once=!0):(this.sequences.delete(r),this.deferredRegistrations.delete(r))}maybeTrace(r,n){return n?n.run(Zg.AFTER_NEXT_RENDER,r):r()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),jm=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,r,n,i,s=null){this.impl=e,this.hooks=t,this.view=r,this.once=n,this.snapshot=s,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?.[oa];e&&(this.view[oa]=e.filter(t=>t!==this))}};function Xg(e,t){!t?.injector&&Wb(Xg);let r=t?.injector??O(vt);return lo("NgAfterRender"),UC(e,r,t,!1)}function Xr(e,t){!t?.injector&&Wb(Xr);let r=t?.injector??O(vt);return lo("NgAfterNextRender"),UC(e,r,t,!0)}function vM(e,t){if(e instanceof Function){let r=[void 0,void 0,void 0,void 0];return r[t]=e,r}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function UC(e,t,r,n){let i=t.get(VC);i.impl??=t.get(gM);let s=t.get(ga,null,{optional:!0}),o=r?.phase??na.MixedReadWrite,a=r?.manualCleanup!==!0?t.get(Wg):null,l=t.get(BC,null,{optional:!0}),c=new jm(i.impl,vM(e,o),l?.view,n,a,s?.snapshot(null));return i.impl.register(c),c}var yM=()=>null;function HC(e,t,r=!1){return yM(e,t,r)}function jC(e,t){let r=e.contentQueries;if(r!==null){let n=$e(null);try{for(let i=0;i<r.length;i+=2){let s=r[i],o=r[i+1];if(o!==-1){let a=e.data[o];Bg(s),a.contentQueries(2,t[o],o)}}}finally{$e(n)}}}function $m(e,t,r){Bg(0);let n=$e(null);try{t(e,r)}finally{$e(n)}}function Jg(e,t,r){if(Mg(t)){let n=$e(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=r[o];a.contentQueries(1,l,o)}}}finally{$e(n)}}}var Kr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Kr||{}),Bu;function _M(){if(Bu===void 0&&(Bu=null,Lc.trustedTypes))try{Bu=Lc.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Bu}function Rd(e){return _M()?.createHTML(e)||e}var Vu;function EM(){if(Vu===void 0&&(Vu=null,Lc.trustedTypes))try{Vu=Lc.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Vu}function rb(e){return EM()?.createHTML(e)||e}var Ri=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Db})`}},Wm=class extends Ri{getTypeName(){return"HTML"}},Gm=class extends Ri{getTypeName(){return"Style"}},zm=class extends Ri{getTypeName(){return"Script"}},qm=class extends Ri{getTypeName(){return"URL"}},Ym=class extends Ri{getTypeName(){return"ResourceURL"}};function Jr(e){return e instanceof Ri?e.changingThisBreaksApplicationSecurity:e}function uo(e,t){let r=wM(e);if(r!=null&&r!==t){if(r==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${r} (see ${Db})`)}return r===t}function wM(e){return e instanceof Ri&&e.getTypeName()||null}function $C(e){return new Wm(e)}function WC(e){return new Gm(e)}function GC(e){return new zm(e)}function zC(e){return new qm(e)}function qC(e){return new Ym(e)}function bM(e){let t=new Zm(e);return CM()?new Km(t):t}var Km=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(Rd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Zm=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=Rd(e),t}};function CM(){try{return!!new window.DOMParser().parseFromString(Rd(""),"text/html")}catch{return!1}}var SM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Nd(e){return e=String(e),e.match(SM)?e:"unsafe:"+e}function Li(e){let t={};for(let r of e.split(","))t[r]=!0;return t}function nl(...e){let t={};for(let r of e)for(let n in r)r.hasOwnProperty(n)&&(t[n]=!0);return t}var YC=Li("area,br,col,hr,img,wbr"),KC=Li("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),ZC=Li("rp,rt"),DM=nl(ZC,KC),IM=nl(KC,Li("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")),TM=nl(ZC,Li("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")),ib=nl(YC,IM,TM,DM),XC=Li("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),xM=Li("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"),RM=Li("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"),NM=nl(XC,xM,RM),AM=Li("script,style,template"),Xm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,r=!0,n=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild){n.push(t),t=PM(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=OM(t);if(i){t=i;break}t=n.pop()}}return this.buf.join("")}startElement(e){let t=ob(e).toLowerCase();if(!ib.hasOwnProperty(t))return this.sanitizedSomething=!0,!AM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let r=e.attributes;for(let n=0;n<r.length;n++){let i=r.item(n),s=i.name,o=s.toLowerCase();if(!NM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;XC[o]&&(a=Nd(a)),this.buf.push(" ",s,'="',sb(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=ob(e).toLowerCase();ib.hasOwnProperty(t)&&!YC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(sb(e))}};function MM(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function OM(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw JC(t);return t}function PM(e){let t=e.firstChild;if(t&&MM(e,t))throw JC(t);return t}function ob(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function JC(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var kM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,LM=/([^\#-~ |!])/g;function sb(e){return e.replace(/&/g,"&amp;").replace(kM,function(t){let r=t.charCodeAt(0),n=t.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(LM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Uu;function Qg(e,t){let r=null;try{Uu=Uu||bM(e);let n=t?String(t):"";r=Uu.getInertBodyElement(n);let i=5,s=n;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,n=s,s=r.innerHTML,r=Uu.getInertBodyElement(n)}while(n!==s);let o=new Xm().sanitizeChildren(ab(r)||r);return Rd(o)}finally{if(r){let n=ab(r)||r;for(;n.firstChild;)n.firstChild.remove()}}}function ab(e){return"content"in e&&FM(e)?e.content:null}function FM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var Qr=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}(Qr||{});function Pr(e){let t=QC();return t?rb(t.sanitize(Qr.HTML,e)||""):uo(e,"HTML")?rb(Jr(e)):Qg(kC(),Kc(e))}function dn(e){let t=QC();return t?t.sanitize(Qr.URL,e)||"":uo(e,"URL")?Jr(e):Nd(Kc(e))}function QC(){let e=Ne();return e&&e[Di].sanitizer}var BM=/^>|^->|<!--|-->|--!>|<!-$/g,VM=/(<|>)/g,UM="\u200B$1\u200B";function HM(e){return e.replace(BM,t=>t.replace(VM,UM))}function eS(e){return e.ownerDocument.defaultView}function jM(e,t,r){let n=e.length;for(;;){let i=e.indexOf(t,r);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===n||e.charCodeAt(i+s)<=32)return i}r=i+1}}var tS="ng-template";function $M(e,t,r,n){let i=0;if(n){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&jM(t[i+1].toLowerCase(),r,0)!==-1)return!0}else if(ev(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===r)return!0}return!1}function ev(e){return e.type===4&&e.value!==tS}function WM(e,t,r){let n=e.type===4&&!r?tS:e.value;return t===n}function GM(e,t,r){let n=4,i=e.attrs,s=i!==null?YM(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Rr(n)&&!Rr(l))return!1;if(o&&Rr(l))continue;o=!1,n=l|n&1;continue}if(!o)if(n&4){if(n=2|n&1,l!==""&&!WM(e,l,r)||l===""&&t.length===1){if(Rr(n))return!1;o=!0}}else if(n&8){if(i===null||!$M(e,i,l,r)){if(Rr(n))return!1;o=!0}}else{let c=t[++a],h=zM(l,i,ev(e),r);if(h===-1){if(Rr(n))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),n&2&&c!==d){if(Rr(n))return!1;o=!0}}}}return Rr(n)||o}function Rr(e){return(e&1)===0}function zM(e,t,r,n){if(t===null)return-1;let i=0;if(n||!r){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return KM(t,e)}function qM(e,t,r=!1){for(let n=0;n<t.length;n++)if(GM(e,t[n],r))return!0;return!1}function YM(e){for(let t=0;t<e.length;t++){let r=e[t];if(FA(r))return t}return e.length}function KM(e,t){let r=e.indexOf(4);if(r>-1)for(r++;r<e.length;){let n=e[r];if(typeof n=="number")return-1;if(n===t)return r;r++}return-1}function cb(e,t){return e?":not("+t.trim()+")":t}function ZM(e){let t=e[0],r=1,n=2,i="",s=!1;for(;r<e.length;){let o=e[r];if(typeof o=="string")if(n&2){let a=e[++r];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else n&8?i+="."+o:n&4&&(i+=" "+o);else i!==""&&!Rr(o)&&(t+=cb(s,i),i=""),n=o,s=s||!Rr(n);r++}return i!==""&&(t+=cb(s,i)),t}function XM(e){return e.map(ZM).join(",")}function JM(e){let t=[],r=[],n=1,i=2;for(;n<e.length;){let s=e[n];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++n]):i===8&&r.push(s);else{if(!Rr(i))break;i=s}n++}return r.length&&t.push(1,...r),t}var ei={};function QM(e,t){return e.createText(t)}function eO(e,t,r){e.setValue(t,r)}function tO(e,t){return e.createComment(HM(t))}function nS(e,t,r){return e.createElement(t,r)}function ld(e,t,r,n,i){e.insertBefore(t,r,n,i)}function rS(e,t,r){e.appendChild(t,r)}function lb(e,t,r,n,i){n!==null?ld(e,t,r,n,i):rS(e,t,r)}function nO(e,t,r){e.removeChild(null,t,r)}function rO(e,t,r){e.setAttribute(t,"style",r)}function iO(e,t,r){r===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",r)}function iS(e,t,r){let{mergedAttrs:n,classes:i,styles:s}=r;n!==null&&LA(e,t,n),i!==null&&iO(e,t,i),s!==null&&rO(e,t,s)}function tv(e,t,r,n,i,s,o,a,l,c,h){let d=rn+n,f=d+i,g=oO(d,f),m=typeof c=="function"?c():c;return g[Te]={type:e,blueprint:g,template:r,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,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 s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function oO(e,t){let r=[];for(let n=0;n<t;n++)r.push(n<e?null:ei);return r}function sO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=tv(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function nv(e,t,r,n,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[Oi]=i,d[we]=n|4|128|8|64|1024,(c!==null||e&&e[we]&2048)&&(d[we]|=2048),Qb(d),d[Tn]=d[fa]=e,d[tn]=r,d[Di]=o||e&&e[Di],d[nn]=a||e&&e[nn],d[Hc]=l||e&&e[Hc]||null,d[Or]=s,d[Ed]=cM(),d[Uc]=h,d[Gb]=c,d[Ar]=t.type==2?e[Ar]:d,d}function aO(e,t,r){let n=Zr(t,e),i=sO(r),s=e[Di].rendererFactory,o=rv(e,nv(e,i,null,oS(r),n,t,null,s.createRenderer(n,r),null,null,null));return e[t.index]=o}function oS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function sS(e,t,r,n){if(r===0)return-1;let i=t.length;for(let s=0;s<r;s++)t.push(n),e.blueprint.push(n),e.data.push(null);return i}function rv(e,t){return e[jc]?e[Ww][Nr]=t:e[jc]=t,e[Ww]=t,t}function Y(e=1){aS(Xt(),Ne(),co()+e,!1)}function aS(e,t,r,n){if(!n)if((t[we]&3)===3){let i=e.preOrderCheckHooks;i!==null&&$u(t,i,r)}else{let i=e.preOrderHooks;i!==null&&Wu(t,i,0,r)}qo(r)}var Ad=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Ad||{});function Jm(e,t,r,n){let i=$e(null);try{let[s,o,a]=e.inputs[r],l=null;(o&Ad.SignalBased)!==0&&(l=t[s][Ci]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):a!==null&&(n=a.call(t,n)),e.setInput!==null?e.setInput(t,l,n,r,s):qb(t,l,s,n)}finally{$e(i)}}function cS(e,t,r,n,i){let s=co(),o=n&2;try{qo(-1),o&&t.length>rn&&aS(e,t,rn,!1),gt(o?2:0,i),r(n,i)}finally{qo(s),gt(o?3:1,i)}}function Md(e,t,r){pO(e,t,r),(r.flags&64)===64&&hO(e,t,r)}function iv(e,t,r=Zr){let n=t.localNames;if(n!==null){let i=t.index+1;for(let s=0;s<n.length;s+=2){let o=n[s+1],a=o===-1?r(t,e):e[o];e[i++]=a}}}function cO(e,t,r,n){let i=n.get(pM,FC)||r===Kr.ShadowDom,s=e.selectRootElement(t,i);return lO(s),s}function lO(e){uO(e)}var uO=()=>null;function dO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function lS(e,t,r,n,i,s,o,a){if(!a&&sv(t,e,r,n,i)){pa(t)&&fO(r,t.index);return}if(t.type&3){let l=Zr(t,r);n=dO(n),i=o!=null?o(i,t.value||"",n):i,s.setProperty(l,n,i)}else t.type&12}function fO(e,t){let r=Yr(t,e);r[we]&16||(r[we]|=64)}function pO(e,t,r){let n=r.directiveStart,i=r.directiveEnd;pa(r)&&aO(t,r,e.data[n+r.componentOffset]),e.firstCreatePass||od(r,t);let s=r.initialInputs;for(let o=n;o<i;o++){let a=e.data[o],l=$c(t,e,o,r);if(ma(l,t),s!==null&&yO(t,o-n,l,a,r,s),zr(a)){let c=Yr(r.index,t);c[tn]=$c(t,e,o,r)}}}function hO(e,t,r){let n=r.directiveStart,i=r.directiveEnd,s=r.index,o=DA();try{qo(s);for(let a=n;a<i;a++){let l=e.data[a],c=t[a];Am(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&mO(l,c)}}finally{qo(-1),Am(o)}}function mO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function ov(e,t){let r=e.directiveRegistry,n=null;if(r)for(let i=0;i<r.length;i++){let s=r[i];qM(t,s.selectors,!1)&&(n??=[],zr(s)?n.unshift(s):n.push(s))}return n}function gO(e,t,r,n,i,s){let o=Zr(e,t);vO(t[nn],o,s,e.value,r,n,i)}function vO(e,t,r,n,i,s,o){if(s==null)e.removeAttribute(t,i,r);else{let a=o==null?Kc(s):o(s,n||"",i);e.setAttribute(t,i,a,r)}}function yO(e,t,r,n,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];Jm(n,r,l,c)}}function uS(e,t){let r=e[Hc],n=r?r.get(xi,null):null;n&&n.handleError(t)}function sv(e,t,r,n,i){let s=e.inputs?.[n],o=e.hostDirectiveInputs?.[n],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];Jm(d,r[c],h,i),a=!0}if(s)for(let l of s){let c=r[l],h=t.data[l];Jm(h,c,n,i),a=!0}return a}function _O(e,t){let r=Yr(t,e),n=r[Te];EO(n,r);let i=r[Oi];i!==null&&r[Uc]===null&&(r[Uc]=HC(i,r[Hc])),gt(18),av(n,r,r[tn]),gt(19,r[tn])}function EO(e,t){for(let r=t.length;r<e.blueprint.length;r++)t.push(e.blueprint[r])}function av(e,t,r){Vg(t);try{let n=e.viewQuery;n!==null&&$m(1,n,r);let i=e.template;i!==null&&cS(e,t,i,1,r),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ii]?.finishViewCreation(e),e.staticContentQueries&&jC(e,t),e.staticViewQueries&&$m(2,e.viewQuery,r);let s=e.components;s!==null&&wO(t,s)}catch(n){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),n}finally{t[we]&=-5,Ug()}}function wO(e,t){for(let r=0;r<t.length;r++)_O(e,t[r])}function Od(e,t,r,n){let i=$e(null);try{let s=t.tView,o=e[we]&4096?4096:16,a=nv(e,s,r,o,null,t,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),l=e[t.index];a[Wo]=l;let c=e[Ii];return c!==null&&(a[Ii]=c.createEmbeddedView(s)),av(s,a,r),a}finally{$e(i)}}function Wc(e,t){return!t||t.firstChild===null||xC(e)}var bO;function cv(e,t){return bO(e,t)}var Ni=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Ni||{});function dS(e){return(e.flags&32)===32}function ra(e,t,r,n,i){if(n!=null){let s,o=!1;Pi(n)?s=n:ro(n)&&(o=!0,n=n[Oi]);let a=qr(n);e===0&&r!==null?i==null?rS(t,r,a):ld(t,r,a,i||null,!0):e===1&&r!==null?ld(t,r,a,i||null,!0):e===2?nO(t,a,o):e===3&&t.destroyNode(a),s!=null&&PO(t,e,s,r,i)}}function CO(e,t){fS(e,t),t[Oi]=null,t[Or]=null}function SO(e,t,r,n,i,s){n[Oi]=i,n[Or]=t,Ld(e,n,r,1,i,s)}function fS(e,t){t[Di].changeDetectionScheduler?.notify(9),Ld(e,t,t[nn],2,null,null)}function DO(e){let t=e[jc];if(!t)return mm(e[Te],e);for(;t;){let r=null;if(ro(t))r=t[jc];else{let n=t[In];n&&(r=n)}if(!r){for(;t&&!t[Nr]&&t!==e;)ro(t)&&mm(t[Te],t),t=t[Tn];t===null&&(t=e),ro(t)&&mm(t[Te],t),r=t&&t[Nr]}t=r}}function lv(e,t){let r=e[ca],n=r.indexOf(t);r.splice(n,1)}function Pd(e,t){if(Xc(t))return;let r=t[nn];r.destroyNode&&Ld(e,t,r,3,null,null),DO(t)}function mm(e,t){if(Xc(t))return;let r=$e(null);try{t[we]&=-129,t[we]|=256,t[er]&&Kh(t[er]),TO(e,t),IO(e,t),t[Te].type===1&&t[nn].destroy();let n=t[Wo];if(n!==null&&Pi(t[Tn])){n!==t[Tn]&&lv(n,t);let i=t[Ii];i!==null&&i.detachView(e)}Um(t)}finally{$e(r)}}function IO(e,t){let r=e.cleanup,n=t[Ju];if(r!==null)for(let o=0;o<r.length-1;o+=2)if(typeof r[o]=="string"){let a=r[o+3];a>=0?n[a]():n[-a].unsubscribe(),o+=2}else{let a=n[r[o+1]];r[o].call(a)}n!==null&&(t[Ju]=null);let i=t[no];if(i!==null){t[no]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[Qu];if(s!==null){t[Qu]=null;for(let o of s)o.destroy()}}function TO(e,t){let r;if(e!=null&&(r=e.destroyHooks)!=null)for(let n=0;n<r.length;n+=2){let i=t[r[n]];if(!(i instanceof Yo)){let s=r[n+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];gt(4,a,l);try{l.call(a)}finally{gt(5,a,l)}}else{gt(4,i,s);try{s.call(i)}finally{gt(5,i,s)}}}}}function xO(e,t,r){return RO(e,t.parent,r)}function RO(e,t,r){let n=t;for(;n!==null&&n.type&168;)t=n,n=t.parent;if(n===null)return r[Oi];if(pa(n)){let{encapsulation:i}=e.data[n.directiveStart+n.componentOffset];if(i===Kr.None||i===Kr.Emulated)return null}return Zr(n,r)}function NO(e,t,r){return MO(e,t,r)}function AO(e,t,r){return e.type&40?Zr(e,r):null}var MO=AO,ub;function kd(e,t,r,n){let i=xO(e,n,t),s=t[nn],o=n.parent||t[Or],a=NO(o,n,t);if(i!=null)if(Array.isArray(r))for(let l=0;l<r.length;l++)lb(s,i,r[l],a,!1);else lb(s,i,r,a,!1);ub!==void 0&&ub(s,n,t,r,i)}function Pc(e,t){if(t!==null){let r=t.type;if(r&3)return Zr(t,e);if(r&4)return Qm(-1,e[t.index]);if(r&8){let n=t.child;if(n!==null)return Pc(e,n);{let i=e[t.index];return Pi(i)?Qm(-1,i):qr(i)}}else{if(r&128)return Pc(e,t.next);if(r&32)return cv(t,e)()||qr(e[t.index]);{let n=pS(e,t);if(n!==null){if(Array.isArray(n))return n[0];let i=zo(e[Ar]);return Pc(i,n)}else return Pc(e,t.next)}}}return null}function pS(e,t){if(t!==null){let r=e[Ar][Or],n=t.projection;return r.projection[n]}return null}function Qm(e,t){let r=In+e+1;if(r<t.length){let n=t[r],i=n[Te].firstChild;if(i!==null)return Pc(n,i)}return t[Go]}function uv(e,t,r,n,i,s,o){for(;r!=null;){if(r.type===128){r=r.next;continue}let a=n[r.index],l=r.type;if(o&&t===0&&(a&&ma(qr(a),n),r.flags|=2),!dS(r))if(l&8)uv(e,t,r.child,n,i,s,!1),ra(t,e,i,a,s);else if(l&32){let c=cv(r,n),h;for(;h=c();)ra(t,e,i,h,s);ra(t,e,i,a,s)}else l&16?OO(e,t,n,r,i,s):ra(t,e,i,a,s);r=o?r.projectionNext:r.next}}function Ld(e,t,r,n,i,s){uv(r,n,e.firstChild,t,i,s,!1)}function OO(e,t,r,n,i,s){let o=r[Ar],a=o[Or].projection[n.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];ra(t,e,i,c,s)}else{let l=a,c=o[Tn];xC(n)&&(l.flags|=128),uv(e,t,l,c,i,s,!0)}}function PO(e,t,r,n,i){let s=r[Go],o=qr(r);s!==o&&ra(t,e,n,s,i);for(let a=In;a<r.length;a++){let l=r[a];Ld(l[Te],l,e,t,n,s)}}function kO(e,t,r,n,i){if(t)i?e.addClass(r,n):e.removeClass(r,n);else{let s=n.indexOf("-")===-1?void 0:Ni.DashCase;i==null?e.removeStyle(r,n,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Ni.Important),e.setStyle(r,n,i,s))}}function ud(e,t,r,n,i=!1){for(;r!==null;){if(r.type===128){r=i?r.projectionNext:r.next;continue}let s=t[r.index];s!==null&&n.push(qr(s)),Pi(s)&&LO(s,n);let o=r.type;if(o&8)ud(e,t,r.child,n);else if(o&32){let a=cv(r,t),l;for(;l=a();)n.push(l)}else if(o&16){let a=pS(t,r);if(Array.isArray(a))n.push(...a);else{let l=zo(t[Ar]);ud(l[Te],l,a,n,!0)}}r=i?r.projectionNext:r.next}return n}function LO(e,t){for(let r=In;r<e.length;r++){let n=e[r],i=n[Te].firstChild;i!==null&&ud(n[Te],n,i,t)}e[Go]!==e[Oi]&&t.push(e[Go])}function hS(e){if(e[oa]!==null){for(let t of e[oa])t.impl.addSequence(t);e[oa].length=0}}var mS=[];function FO(e){return e[er]??BO(e)}function BO(e){let t=mS.pop()??Object.create(UO);return t.lView=e,t}function VO(e){e.lView[er]!==e&&(e.lView=null,mS.push(e))}var UO=re(w({},cu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{Jc(e.lView)},consumerOnSignalRead(){this.lView[er]=this}});function HO(e){let t=e[er]??Object.create(jO);return t.lView=e,t}var jO=re(w({},cu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=zo(e.lView);for(;t&&!gS(t[Te]);)t=zo(t);t&&kg(t)},consumerOnSignalRead(){this.lView[er]=this}});function gS(e){return e.type!==2}function vS(e){if(e[Qu]===null)return;let t=!0;for(;t;){let r=!1;for(let n of e[Qu])n.dirty&&(r=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));t=r&&!!(e[we]&8192)}}var $O=100;function yS(e,t=!0,r=0){let n=e[Di].rendererFactory,i=!1;i||n.begin?.();try{WO(e,r)}catch(s){throw t&&uS(e,s),s}finally{i||n.end?.()}}function WO(e,t){let r=sC();try{zw(!0),eg(e,t);let n=0;for(;Cd(e);){if(n===$O)throw new Ge(103,!1);n++,eg(e,1)}}finally{zw(r)}}function GO(e,t,r,n){if(Xc(t))return;let i=t[we],s=!1,o=!1;Vg(t);let a=!0,l=null,c=null;s||(gS(e)?(c=FO(t),l=qh(c)):ZE()===null?(a=!1,c=HO(t),l=qh(c)):t[er]&&(Kh(t[er]),t[er]=null));try{Qb(t),wA(e.bindingStartIndex),r!==null&&cS(e,t,r,2,n);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&$u(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Wu(t,g,0,null),fm(t,0)}if(o||zO(t),vS(t),_S(t,0),e.contentQueries!==null&&jC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&$u(t,g)}else{let g=e.contentHooks;g!==null&&Wu(t,g,1),fm(t,1)}YO(e,t);let d=e.components;d!==null&&wS(t,d,0);let f=e.viewQuery;if(f!==null&&$m(2,f,n),!s)if(h){let g=e.viewCheckHooks;g!==null&&$u(t,g)}else{let g=e.viewHooks;g!==null&&Wu(t,g,2),fm(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[dm]){for(let g of t[dm])g();t[dm]=null}s||(hS(t),t[we]&=-73)}catch(h){throw s||Jc(t),h}finally{c!==null&&(ew(c,l),a&&VO(c)),Ug()}}function _S(e,t){for(let r=AC(e);r!==null;r=MC(r))for(let n=In;n<r.length;n++){let i=r[n];ES(i,t)}}function zO(e){for(let t=AC(e);t!==null;t=MC(t)){if(!(t[we]&2))continue;let r=t[ca];for(let n=0;n<r.length;n++){let i=r[n];kg(i)}}}function qO(e,t,r){gt(18);let n=Yr(t,e);ES(n,r),gt(19,n[tn])}function ES(e,t){Pg(e)&&eg(e,t)}function eg(e,t){let r=e[Te],n=e[we],i=e[er],s=!!(t===0&&n&16);if(s||=!!(n&64&&t===0),s||=!!(n&1024),s||=!!(i?.dirty&&Yh(i)),s||=!1,i&&(i.dirty=!1),e[we]&=-9217,s)GO(r,e,r.template,e[tn]);else if(n&8192){vS(e),_S(e,1);let o=r.components;o!==null&&wS(e,o,1),hS(e)}}function wS(e,t,r){for(let n=0;n<t.length;n++)qO(e,t[n],r)}function YO(e,t){let r=e.hostBindingOpCodes;if(r!==null)try{for(let n=0;n<r.length;n++){let i=r[n];if(i<0)qo(~i);else{let s=i,o=r[++n],a=r[++n];SA(o,s);let l=t[s];gt(24,l),a(2,l),gt(25,l)}}}finally{qo(-1)}}function dv(e,t){let r=sC()?64:1088;for(e[Di].changeDetectionScheduler?.notify(t);e;){e[we]|=r;let n=zo(e);if(td(e)&&!n)return e;e=n}return null}function bS(e,t,r,n){return[e,!0,0,t,null,n,null,r,null,null]}function CS(e,t){let r=In+t;if(r<e.length)return e[r]}function Fd(e,t,r,n=!0){let i=t[Te];if(KO(i,t,e,r),n){let o=Qm(r,e),a=t[nn],l=a.parentNode(e[Go]);l!==null&&SO(i,e[Or],a,t,l,o)}let s=t[Uc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function SS(e,t){let r=Gc(e,t);return r!==void 0&&Pd(r[Te],r),r}function Gc(e,t){if(e.length<=In)return;let r=In+t,n=e[r];if(n){let i=n[Wo];i!==null&&i!==e&&lv(i,n),t>0&&(e[r-1][Nr]=n[Nr]);let s=Zu(e,In+t);CO(n[Te],n);let o=s[Ii];o!==null&&o.detachView(s[Te]),n[Tn]=null,n[Nr]=null,n[we]&=-129}return n}function KO(e,t,r,n){let i=In+n,s=r.length;n>0&&(r[i-1][Nr]=t),n<s-In?(t[Nr]=r[i],Mb(r,In+n,t)):(r.push(t),t[Nr]=null),t[Tn]=r;let o=t[Wo];o!==null&&r!==o&&DS(o,t);let a=t[Ii];a!==null&&a.insertView(e),Rm(t),t[we]|=128}function DS(e,t){let r=e[ca],n=t[Tn];if(ro(n))e[we]|=2;else{let i=n[Tn][Ar];t[Ar]!==i&&(e[we]|=2)}r===null?e[ca]=[t]:r.push(t)}var Ko=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[Te];return ud(t,e,t.firstChild,[])}constructor(e,t,r=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=r}get context(){return this._lView[tn]}get dirty(){return!!(this._lView[we]&9280)||!!this._lView[er]?.dirty}set context(e){this._lView[tn]=e}get destroyed(){return Xc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Tn];if(Pi(e)){let t=e[ed],r=t?t.indexOf(this):-1;r>-1&&(Gc(e,r),Zu(t,r))}this._attachedToViewContainer=!1}Pd(this._lView[Te],this._lView)}onDestroy(e){eC(this._lView,e)}markForCheck(){dv(this._cdRefInjectingView||this._lView,4)}markForRefresh(){kg(this._cdRefInjectingView||this._lView)}detach(){this._lView[we]&=-129}reattach(){Rm(this._lView),this._lView[we]|=128}detectChanges(){this._lView[we]|=1024,yS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ge(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=td(this._lView),t=this._lView[Wo];t!==null&&!e&&lv(t,this._lView),fS(this._lView[Te],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ge(902,!1);this._appRef=e;let t=td(this._lView),r=this._lView[Wo];r!==null&&!t&&DS(r,this._lView),Rm(this._lView)}},Mr=(()=>{class e{static __NG_ELEMENT_ID__=JO}return e})(),ZO=Mr,XO=class extends ZO{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,r){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,r){let n=Od(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:r});return new Ko(n)}};function JO(){return Bd(tr(),Ne())}function Bd(e,t){return e.type&4?new XO(t,e,ha(e,t)):null}function rl(e,t,r,n,i){let s=e.data[t];if(s===null)s=QO(e,t,r,n,i),CA()&&(s.flags|=32);else if(s.type&64){s.type=r,s.value=n,s.attrs=i;let o=EA();s.injectorIndex=o===null?-1:o.injectorIndex}return ao(s,!0),s}function QO(e,t,r,n,i){let s=rC(),o=Fg(),a=o?s:s&&s.parent,l=e.data[t]=tP(e,a,r,t,n,i);return eP(e,l,s,o),l}function eP(e,t,r,n){e.firstChild===null&&(e.firstChild=t),r!==null&&(n?r.child==null&&t.parent!==null&&(r.child=t):r.next===null&&(r.next=t,t.prev=r))}function tP(e,t,r,n,i,s){let o=t?t.injectorIndex:-1,a=0;return vA()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,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 LW=new RegExp(`^(\\d+)*(${fM}|${dM})*(.*)`),nP=()=>null;function zc(e,t){return nP(e,t)}var tg=class{},dd=class{},ng=class{resolveComponentFactory(e){throw Error(`No component factory found for ${fr(e)}.`)}},so=class{static NULL=new ng},un=class{},va=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>rP()}return e})();function rP(){let e=Ne(),t=tr(),r=Yr(t.index,e);return(ro(r)?r:e)[nn]}var iP=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>null})}return e})();function rg(e,t,r){let n=r?e.styles:null,i=r?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Bw(i,a);else if(s==2){let l=a,c=t[++o];n=Bw(n,l+": "+c+";")}}r?e.styles=n:e.stylesWithoutHost=n,r?e.classes=i:e.classesWithoutHost=i}function Ut(e,t=Ze.Default){let r=Ne();if(r===null)return Xe(e,t);let n=tr();return wC(n,r,Pn(e),t)}function fv(e,t,r,n,i){let s=n===null?null:{"":-1},o=i(e,r);if(o!==null){let a,l=null,c=null,h=sP(o);h===null?a=o:[a,l,c]=h,lP(e,t,r,a,s,l,c)}s!==null&&n!==null&&oP(r,n,s)}function oP(e,t,r){let n=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=r[t[i+1]];if(s==null)throw new Ge(-301,!1);n.push(t[i],s)}}function sP(e){let t=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&zr(a)&&(t=a),a.findHostDirectiveDefs!==null){r=!0;break}}if(!r)return null;let n=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(n??=[],i??=new Map,s??=new Map,aP(o,n,s,i)),o===t&&(n??=[],n.push(o));return n!==null?(n.push(...t===null?e:e.slice(1)),[n,i,s]):null}function aP(e,t,r,n){let i=t.length;e.findHostDirectiveDefs(e,t,n),r.set(e,[i,t.length-1])}function cP(e,t,r){t.componentOffset=r,(e.components??=[]).push(t.index)}function lP(e,t,r,n,i,s,o){let a=n.length,l=!1;for(let f=0;f<a;f++){let g=n[f];!l&&zr(g)&&(l=!0,cP(e,r,f)),Pm(od(r,t),e,g.type)}mP(r,e.data.length,a);for(let f=0;f<a;f++){let g=n[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=sS(e,t,a,null);a>0&&(r.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=n[f];if(r.mergedAttrs=la(r.mergedAttrs,g.hostAttrs),dP(e,r,t,d,g),hP(d,g,i),o!==null&&o.has(g)){let[b,I]=o.get(g);r.directiveToIndex.set(g.type,[d,b+r.directiveStart,I+r.directiveStart])}else(s===null||!s.has(g))&&r.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(r.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(r.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(r.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(r.index),h=!0),d++}uP(e,r,s)}function uP(e,t,r){for(let n=t.directiveStart;n<t.directiveEnd;n++){let i=e.data[n];if(r===null||!r.has(i))db(0,t,i,n),db(1,t,i,n),pb(t,n,!1);else{let s=r.get(i);fb(0,t,s,n),fb(1,t,s,n),pb(t,n,!0)}}}function db(e,t,r,n){let i=e===0?r.inputs:r.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(n),IS(t,s)}}function fb(e,t,r,n){let i=e===0?r.inputs:r.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(n,s),IS(t,o)}}function IS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function pb(e,t,r){let{attrs:n,inputs:i,hostDirectiveInputs:s}=e;if(n===null||!r&&i===null||r&&s===null||ev(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<n.length;){let l=n[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!r&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,n[a+1]);break}}else if(r&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],n[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function dP(e,t,r,n,i){e.data[n]=i;let s=i.factory||(i.factory=Ho(i.type,!0)),o=new Yo(s,zr(i),Ut);e.blueprint[n]=o,r[n]=o,fP(e,t,n,sS(e,r,i.hostVars,ei),i)}function fP(e,t,r,n,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;pP(o)!=a&&o.push(a),o.push(r,n,s)}}function pP(e){let t=e.length;for(;t>0;){let r=e[--t];if(typeof r=="number"&&r<0)return r}return 0}function hP(e,t,r){if(r){if(t.exportAs)for(let n=0;n<t.exportAs.length;n++)r[t.exportAs[n]]=e;zr(t)&&(r[""]=e)}}function mP(e,t,r){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+r,e.providerIndexes=t}function TS(e,t,r,n,i,s,o,a){let l=t.consts,c=oo(l,o),h=rl(t,e,2,n,c);return s&&fv(t,r,h,oo(l,a),i),h.mergedAttrs=la(h.mergedAttrs,h.attrs),h.attrs!==null&&rg(h,h.attrs,!1),h.mergedAttrs!==null&&rg(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function xS(e,t){jg(e,t),Mg(t)&&e.queries.elementEnd(t)}var ig=class extends so{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=$o(e);return new qc(t,this.ngModule)}};function gP(e){return Object.keys(e).map(t=>{let[r,n,i]=e[t],s={propName:r,templateName:t,isSignal:(n&Ad.SignalBased)!==0};return i&&(s.transform=i),s})}function vP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function yP(e,t,r){let n=t instanceof Gn?t:t?.injector;return n&&e.getStandaloneInjector!==null&&(n=e.getStandaloneInjector(n)||n),n?new Mm(r,n):r}function _P(e){let t=e.get(un,null);if(t===null)throw new Ge(407,!1);let r=e.get(iP,null),n=e.get(Ti,null);return{rendererFactory:t,sanitizer:r,changeDetectionScheduler:n}}function EP(e,t){let r=(e.selectors[0][0]||"div").toLowerCase();return nS(t,r,r==="svg"?Xb:r==="math"?cA:null)}var qc=class extends dd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return gP(this.componentDef.inputs)}get outputs(){return vP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=XM(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,r,n){gt(22);let i=$e(null);try{let s=this.componentDef,o=r?["ng-version","19.2.0"]:JM(this.componentDef.selectors[0]),a=tv(0,null,null,1,0,null,null,null,null,[o],null),l=yP(s,n||this.ngModule,e),c=_P(l),h=c.rendererFactory.createRenderer(null,s),d=r?cO(h,r,s.encapsulation,l):EP(s,h),f=nv(null,a,null,512|oS(s),null,null,c,h,l,null,HC(d,l,!0));f[rn]=d,Vg(f);let g=null;try{let m=TS(rn,a,f,"#host",()=>[this.componentDef],!0,0);d&&(iS(h,d,m),ma(d,f)),Md(a,f,m),Jg(a,m,f),xS(a,m),t!==void 0&&wP(m,this.ngContentSelectors,t),g=Yr(m.index,f),f[tn]=g[tn],av(a,f,null)}catch(m){throw g!==null&&Um(g),Um(f),m}finally{gt(23),Ug()}return new og(this.componentType,f)}finally{$e(i)}}},og=class extends tg{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Og(t[Te],rn),this.location=ha(this._tNode,t),this.instance=Yr(this._tNode.index,t)[tn],this.hostView=this.changeDetectorRef=new Ko(t,void 0,!1),this.componentType=e}setInput(e,t){let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let n=this._rootLView,i=sv(r,n[Te],n,e,t);this.previousInputValues.set(e,t);let s=Yr(r.index,n);dv(s,1)}get injector(){return new Uo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function wP(e,t,r){let n=e.projection=[];for(let i=0;i<t.length;i++){let s=r[i];n.push(s!=null&&s.length?Array.from(s):null)}}var kr=(()=>{class e{static __NG_ELEMENT_ID__=bP}return e})();function bP(){let e=tr();return NS(e,Ne())}var CP=kr,RS=class extends CP{_lContainer;_hostTNode;_hostLView;constructor(e,t,r){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=r}get element(){return ha(this._hostTNode,this._hostLView)}get injector(){return new Uo(this._hostTNode,this._hostLView)}get parentInjector(){let e=$g(this._hostTNode,this._hostLView);if(mC(e)){let t=rd(e,this._hostLView),r=nd(e),n=t[Te].data[r+8];return new Uo(n,t)}else return new Uo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=hb(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-In}createEmbeddedView(e,t,r){let n,i;typeof r=="number"?n=r:r!=null&&(n=r.index,i=r.injector);let s=zc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,n,Wc(this._hostTNode,s)),o}createComponent(e,t,r,n,i){let s=e&&!iA(e),o;if(s)o=t;else{let g=t||{};o=g.index,r=g.injector,n=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new qc($o(e)),l=r||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=$o(a.componentType??{}),h=zc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,n,d,i);return this.insertImpl(f.hostView,o,Wc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,r){let n=e._lView;if(uA(n)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=n[Tn],l=new RS(a,a[Or],a[Tn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Fd(s,n,i,r),e.attachToViewContainerRef(),Mb(gm(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=hb(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),r=Gc(this._lContainer,t);r&&(Zu(gm(this._lContainer),t),Pd(r[Te],r))}detach(e){let t=this._adjustIndex(e,-1),r=Gc(this._lContainer,t);return r&&Zu(gm(this._lContainer),t)!=null?new Ko(r):null}_adjustIndex(e,t=0){return e??this.length+t}};function hb(e){return e[ed]}function gm(e){return e[ed]||(e[ed]=[])}function NS(e,t){let r,n=t[e.index];return Pi(n)?r=n:(r=bS(n,t,null,e),t[e.index]=r,rv(t,r)),DP(r,t,e,n),new RS(r,e,t)}function SP(e,t){let r=e[nn],n=r.createComment(""),i=Zr(t,e),s=r.parentNode(i);return ld(r,s,n,r.nextSibling(i),!1),n}var DP=xP,IP=()=>!1;function TP(e,t,r){return IP(e,t,r)}function xP(e,t,r,n){if(e[Go])return;let i;r.type&8?i=qr(n):i=SP(t,r),e[Go]=i}var sg=class Tx{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new Tx(this.queryList)}setDirty(){this.queryList.setDirty()}},ag=class Dx{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let r=t.queries;if(r!==null){let n=t.contentQueries!==null?t.contentQueries[0]:r.length,i=[];for(let s=0;s<n;s++){let o=r.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new Dx(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let r=0;r<this.queries.length;r++)pv(t,r).matches!==null&&this.queries[r].setDirty()}},cg=class{flags;read;predicate;constructor(e,t,r=null){this.flags=t,this.read=r,typeof e=="string"?this.predicate=LP(e):this.predicate=e}},lg=class Rx{queries;constructor(t=[]){this.queries=t}elementStart(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,r)}elementEnd(t){for(let r=0;r<this.queries.length;r++)this.queries[r].elementEnd(t)}embeddedTView(t){let r=null;for(let n=0;n<this.length;n++){let i=r!==null?r.length:0,s=this.getByIndex(n).embeddedTView(t,i);s&&(s.indexInDeclarationView=n,r!==null?r.push(s):r=[s])}return r!==null?new Rx(r):null}template(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,r)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},ug=class bD{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,r=-1){this.metadata=t,this._declarationNodeIndex=r}elementStart(t,r){this.isApplyingToNode(r)&&this.matchTNode(t,r)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,r){this.elementStart(t,r)}embeddedTView(t,r){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,r),new bD(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let r=this._declarationNodeIndex,n=t.parent;for(;n!==null&&n.type&8&&n.index!==r;)n=n.parent;return r===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(t,r){let n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){let s=n[i];this.matchTNodeWithReadOption(t,r,RP(r,s)),this.matchTNodeWithReadOption(t,r,Gu(r,t,s,!1,!1))}else n===Mr?r.type&4&&this.matchTNodeWithReadOption(t,r,-1):this.matchTNodeWithReadOption(t,r,Gu(r,t,n,!1,!1))}matchTNodeWithReadOption(t,r,n){if(n!==null){let i=this.metadata.read;if(i!==null)if(i===Mt||i===kr||i===Mr&&r.type&4)this.addMatch(r.index,-2);else{let s=Gu(r,t,i,!1,!1);s!==null&&this.addMatch(r.index,s)}else this.addMatch(r.index,n)}}addMatch(t,r){this.matches===null?this.matches=[t,r]:this.matches.push(t,r)}};function RP(e,t){let r=e.localNames;if(r!==null){for(let n=0;n<r.length;n+=2)if(r[n]===t)return r[n+1]}return null}function NP(e,t){return e.type&11?ha(e,t):e.type&4?Bd(e,t):null}function AP(e,t,r,n){return r===-1?NP(t,e):r===-2?MP(e,t,n):$c(e,e[Te],r,t)}function MP(e,t,r){if(r===Mt)return ha(t,e);if(r===Mr)return Bd(t,e);if(r===kr)return NS(t,e)}function AS(e,t,r,n){let i=t[Ii].queries[n];if(i.matches===null){let s=e.data,o=r.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(AP(t,h,o[l+1],r.metadata.read))}}i.matches=a}return i.matches}function dg(e,t,r,n){let i=e.queries.getByIndex(r),s=i.matches;if(s!==null){let o=AS(e,t,i,r);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)n.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=In;d<h.length;d++){let f=h[d];f[Wo]===f[Tn]&&dg(f[Te],f,c,n)}if(h[ca]!==null){let d=h[ca];for(let f=0;f<d.length;f++){let g=d[f];dg(g[Te],g,c,n)}}}}}return n}function OP(e,t){return e[Ii].queries[t].queryList}function PP(e,t,r){let n=new Vm((r&4)===4);return pA(e,t,n,n.destroy),(t[Ii]??=new ag).queries.push(new sg(n))-1}function kP(e,t,r){let n=Xt();return n.firstCreatePass&&(FP(n,new cg(e,t,r),-1),(t&2)===2&&(n.staticViewQueries=!0)),PP(n,Ne(),t)}function LP(e){return e.split(",").map(t=>t.trim())}function FP(e,t,r){e.queries===null&&(e.queries=new lg),e.queries.track(new ug(t,r))}function pv(e,t){return e.queries.getByIndex(t)}function BP(e,t){let r=e[Te],n=pv(r,t);return n.crossesNgTemplate?dg(r,e,t,[]):AS(r,e,n,t)}var Ai=class{},fd=class extends Ai{injector;componentFactoryResolver=new ig(this);instance=null;constructor(e){super();let t=new Vc([...e.providers,{provide:Ai,useValue:this},{provide:so,useValue:this.componentFactoryResolver}],e.parent||_d(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function VP(e,t,r=null){return new fd({providers:e,parent:t,debugName:r,runEnvironmentInitializers:!0}).injector}var UP=(()=>{class e{_injector;cachedInjectors=new Map;constructor(r){this._injector=r}getOrCreateStandaloneInjector(r){if(!r.standalone)return null;if(!this.cachedInjectors.has(r)){let n=Bb(!1,r.type),i=n.length>0?VP([n],this._injector,`Standalone[${r.type.name}]`):null;this.cachedInjectors.set(r,i)}return this.cachedInjectors.get(r)}ngOnDestroy(){try{for(let r of this.cachedInjectors.values())r!==null&&r.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=oe({token:e,providedIn:"environment",factory:()=>new e(Xe(Gn))})}return e})();function ft(e){return Ig(()=>{let t=MS(e),r=re(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===RC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(UP).getOrCreateStandaloneInjector(r):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Kr.Emulated,styles:e.styles||io,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&lo("NgStandalone"),OS(r);let n=e.dependencies;return r.directiveDefs=mb(n,!1),r.pipeDefs=mb(n,!0),r.id=GP(r),r})}function HP(e){return $o(e)||kb(e)}function jP(e){return e!==null}function $P(e,t){if(e==null)return jo;let r={};for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Ad.None,l=null),r[s]=[n,a,l],t[s]=o}return r}function WP(e){if(e==null)return jo;let t={};for(let r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Lr(e){return Ig(()=>{let t=MS(e);return OS(t),t})}function es(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 MS(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||jo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||io,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:$P(e.inputs,t),outputs:WP(e.outputs),debugInfo:null}}function OS(e){e.features?.forEach(t=>t(e))}function mb(e,t){if(!e)return null;let r=t?Lb:HP;return()=>(typeof e=="function"?e():e).map(n=>r(n)).filter(jP)}function GP(e){let t=0,r=typeof e.consts=="function"?"":e.consts,n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,r,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 n.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function zP(e){return Object.getPrototypeOf(e.prototype).constructor}function fo(e){let t=zP(e.type),r=!0,n=[e];for(;t;){let i;if(zr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Ge(903,!1);i=t.\u0275dir}if(i){if(r){n.push(i);let o=e;o.inputs=vm(e.inputs),o.declaredInputs=vm(e.declaredInputs),o.outputs=vm(e.outputs);let a=i.hostBindings;a&&XP(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&KP(e,l),c&&ZP(e,c),qP(e,i),bN(e.outputs,i.outputs),zr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===fo&&(r=!1)}}t=Object.getPrototypeOf(t)}YP(n)}function qP(e,t){for(let r in t.inputs){if(!t.inputs.hasOwnProperty(r)||e.inputs.hasOwnProperty(r))continue;let n=t.inputs[r];n!==void 0&&(e.inputs[r]=n,e.declaredInputs[r]=t.declaredInputs[r])}}function YP(e){let t=0,r=null;for(let n=e.length-1;n>=0;n--){let i=e[n];i.hostVars=t+=i.hostVars,i.hostAttrs=la(i.hostAttrs,r=la(r,i.hostAttrs))}}function vm(e){return e===jo?{}:e===io?[]:e}function KP(e,t){let r=e.viewQuery;r?e.viewQuery=(n,i)=>{t(n,i),r(n,i)}:e.viewQuery=t}function ZP(e,t){let r=e.contentQueries;r?e.contentQueries=(n,i,s)=>{t(n,i,s),r(n,i,s)}:e.contentQueries=t}function XP(e,t){let r=e.hostBindings;r?e.hostBindings=(n,i)=>{t(n,i),r(n,i)}:e.hostBindings=t}function hv(e,t,r){return e[t]=r}function JP(e,t){return e[t]}function Mi(e,t,r){let n=e[t];return Object.is(n,r)?!1:(e[t]=r,!0)}function QP(e,t,r,n){let i=Mi(e,t,r);return Mi(e,t+1,n)||i}function e1(e,t,r,n,i,s,o,a,l){let c=t.consts,h=rl(t,e,4,o||null,a||null);Lg()&&fv(t,r,h,oo(c,l),ov),h.mergedAttrs=la(h.mergedAttrs,h.attrs),jg(t,h);let d=h.tView=tv(2,h,n,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function fg(e,t,r,n,i,s,o,a,l,c){let h=r+rn,d=t.firstCreatePass?e1(h,t,e,n,i,s,o,a,l):t.data[h];ao(d,!1);let f=t1(t,e,d,r);Sd()&&kd(t,e,f,d),ma(f,e);let g=bS(f,e,f,d);return e[h]=g,rv(e,g),TP(g,d,e),wd(d)&&Md(t,e,d),l!=null&&iv(e,d,c),d}function pt(e,t,r,n,i,s,o,a){let l=Ne(),c=Xt(),h=oo(c.consts,s);return fg(l,c,e,t,r,n,i,h,o,a),pt}var t1=n1;function n1(e,t,r,n){return Dd(!0),t[nn].createComment("")}var PS=new he(""),r1=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new pg})}return e})(),pg=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,r=this.queues.get(t);r.has(e)&&(r.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let r=this.queues.get(t);r.has(e)||(this.queuedEffectCount++,r.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 mv(e){return!!e&&typeof e.then=="function"}function kS(e){return!!e&&typeof e.subscribe=="function"}var i1=new he(""),LS=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((r,n)=>{this.resolve=r,this.reject=n});appInits=O(i1,{optional:!0})??[];injector=O(vt);constructor(){}runInitializers(){if(this.initialized)return;let r=[];for(let i of this.appInits){let s=jb(this.injector,i);if(mv(s))r.push(s);else if(kS(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});r.push(o)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(r).then(()=>{n()}).catch(i=>{this.reject(i)}),r.length===0&&n(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),o1=new he("");function s1(){sw(()=>{throw new Ge(600,!1)})}function a1(e){return e.isBoundToModule}var c1=10,pr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(nM);afterRenderManager=O(VC);zonelessEnabled=O(Td);rootEffectScheduler=O(r1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new ie;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(xd).hasPendingTasks.pipe(dr(r=>!r));constructor(){O(ga,{optional:!0})}whenStable(){let r;return new Promise(n=>{r=this.isStable.subscribe({next:i=>{i&&n()}})}).finally(()=>{r.unsubscribe()})}_injector=O(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(r,n){gt(10);let i=r instanceof dd;if(!this._injector.get(LS).done){let d=!i&&zN(r),f=!1;throw new Ge(405,f)}let s;i?s=r:s=this._injector.get(so).resolveComponentFactory(r),this.componentTypes.push(s.componentType);let o=a1(s)?void 0:this._injector.get(Ai),a=n||s.selector,l=s.create(vt.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(PS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),zu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),gt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){gt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(Zg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Ge(101,!1);let r=$e(null);try{this._runningTick=!0,this.synchronize()}catch(n){this.internalErrorHandler(n)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,$e(r),this.afterTick.next(),gt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(un,null,{optional:!0}));let r=0;for(;this.dirtyFlags!==0&&r++<c1;)gt(14),this.synchronizeOnce(),gt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:n,notifyErrorHandler:i}of this.allViews)l1(n,i,r,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:r})=>Cd(r))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(r){let n=r;this._views.push(n),n.attachToAppRef(this)}detachView(r){let n=r;zu(this._views,n),n.detachFromAppRef()}_loadComponent(r){this.attachView(r.hostView),this.tick(),this.components.push(r),this._injector.get(o1,[]).forEach(n=>n(r))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(r=>r()),this._views.slice().forEach(r=>r.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(r){return this._destroyListeners.push(r),()=>zu(this._destroyListeners,r)}destroy(){if(this._destroyed)throw new Ge(406,!1);let r=this._injector;r.destroy&&!r.destroyed&&r.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zu(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function l1(e,t,r,n){!r&&!Cd(e)||yS(e,t,r&&!n?0:1)}function ts(e,t,r,n){let i=Ne(),s=el();if(Mi(i,s,t)){let o=Xt(),a=Hg();gO(a,i,e,t,r,n)}return ts}function FS(e,t,r,n){return Mi(e,el(),r)?t+Kc(r)+n:ei}function Hu(e,t){return e<<17|t<<2}function Zo(e){return e>>17&32767}function u1(e){return(e&2)==2}function d1(e,t){return e&131071|t<<17}function hg(e){return e|2}function ua(e){return(e&131068)>>2}function ym(e,t){return e&-131069|t<<2}function f1(e){return(e&1)===1}function mg(e){return e|1}function p1(e,t,r,n,i,s){let o=s?t.classBindings:t.styleBindings,a=Zo(o),l=ua(o);e[n]=r;let c=!1,h;if(Array.isArray(r)){let d=r;h=d[1],(h===null||Zc(d,h)>0)&&(c=!0)}else h=r;if(i)if(l!==0){let d=Zo(e[a+1]);e[n+1]=Hu(d,a),d!==0&&(e[d+1]=ym(e[d+1],n)),e[a+1]=d1(e[a+1],n)}else e[n+1]=Hu(a,0),a!==0&&(e[a+1]=ym(e[a+1],n)),a=n;else e[n+1]=Hu(l,0),a===0?a=n:e[l+1]=ym(e[l+1],n),l=n;c&&(e[n+1]=hg(e[n+1])),gb(e,h,n,!0),gb(e,h,n,!1),h1(t,h,e,n,s),o=Hu(a,l),s?t.classBindings=o:t.styleBindings=o}function h1(e,t,r,n,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Zc(s,t)>=0&&(r[n+1]=mg(r[n+1]))}function gb(e,t,r,n){let i=e[r+1],s=t===null,o=n?Zo(i):ua(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];m1(l,t)&&(a=!0,e[o+1]=n?mg(c):hg(c)),o=n?Zo(c):ua(c)}a&&(e[r+1]=n?hg(i):mg(i))}function m1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Zc(e,t)>=0:!1}function be(e,t,r){let n=Ne(),i=el();if(Mi(n,i,t)){let s=Xt(),o=Hg();lS(s,o,n,e,t,n[nn],r,!1)}return be}function vb(e,t,r,n,i){sv(t,e,r,i?"class":"style",n)}function po(e,t,r){return BS(e,t,r,!1),po}function ti(e,t){return BS(e,t,null,!0),ti}function BS(e,t,r,n){let i=Ne(),s=Xt(),o=bA(2);if(s.firstUpdatePass&&v1(s,e,o,n),t!==ei&&Mi(i,o,t)){let a=s.data[co()];b1(s,a,i,i[nn],e,i[o+1]=C1(t,r),n,o)}}function g1(e,t){return t>=e.expandoStartIndex}function v1(e,t,r,n){let i=e.data;if(i[r+1]===null){let s=i[co()],o=g1(e,r);S1(s,n)&&t===null&&!o&&(t=!1),t=y1(i,s,t,n),p1(i,s,t,r,o,n)}}function y1(e,t,r,n){let i=IA(e),s=n?t.residualClasses:t.residualStyles;if(i===null)(n?t.classBindings:t.styleBindings)===0&&(r=_m(null,e,t,r,n),r=Yc(r,t.attrs,n),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(r=_m(i,e,t,r,n),s===null){let a=_1(e,t,n);a!==void 0&&Array.isArray(a)&&(a=_m(null,e,t,a[1],n),a=Yc(a,t.attrs,n),E1(e,t,n,a))}else s=w1(e,t,n)}return s!==void 0&&(n?t.residualClasses=s:t.residualStyles=s),r}function _1(e,t,r){let n=r?t.classBindings:t.styleBindings;if(ua(n)!==0)return e[Zo(n)]}function E1(e,t,r,n){let i=r?t.classBindings:t.styleBindings;e[Zo(i)]=n}function w1(e,t,r){let n,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;n=Yc(n,o,r)}return Yc(n,t.attrs,r)}function _m(e,t,r,n,i){let s=null,o=r.directiveEnd,a=r.directiveStylingLast;for(a===-1?a=r.directiveStart:a++;a<o&&(s=t[a],n=Yc(n,s.hostAttrs,i),s!==e);)a++;return e!==null&&(r.directiveStylingLast=a),n}function Yc(e,t,r){let n=r?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===n&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),WN(e,o,r?!0:t[++s]))}return e===void 0?null:e}function b1(e,t,r,n,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=f1(c)?yb(l,t,r,i,ua(c),o):void 0;if(!pd(h)){pd(s)||u1(c)&&(s=yb(l,null,r,i,a,o));let d=Jb(co(),r);kO(n,o,d,i,s)}}function yb(e,t,r,n,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=r[i+1];f===ei&&(f=d?io:void 0);let g=d?lm(f,n):h===n?f:void 0;if(c&&!pd(g)&&(g=lm(l,n)),pd(g)&&(a=g,o))return a;let m=e[i+1];i=o?Zo(m):ua(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=lm(l,n))}return a}function pd(e){return e!==void 0}function C1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=fr(Jr(e)))),e}function S1(e,t){return(e.flags&(t?8:16))!==0}var gg=class{destroy(e){}updateValue(e,t){}swap(e,t){let r=Math.min(e,t),n=Math.max(e,t),i=this.detach(n);if(n-r>1){let s=this.detach(r);this.attach(r,i),this.attach(n,s)}else this.attach(r,i)}move(e,t){this.attach(t,this.detach(e))}};function Em(e,t,r,n,i){return e===r&&Object.is(t,n)?1:Object.is(i(e,t),i(r,n))?-1:0}function D1(e,t,r){let n,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=Em(s,c,s,h,r);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=Em(o,f,l,g,r);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=r(s,c),I=r(o,f),A=r(s,h);if(Object.is(A,I)){let F=r(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(n??=new hd,i??=Eb(e,s,o,r),vg(e,n,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))n.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)_b(e,n,r,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=Em(s,h,s,d,r);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{n??=new hd,i??=Eb(e,s,o,r);let g=r(s,d);if(vg(e,n,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=r(s,h);n.set(m,e.detach(s)),o--}}}for(;!c.done;)_b(e,n,r,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));n?.forEach(l=>{e.destroy(l)})}function vg(e,t,r,n){return t!==void 0&&t.has(n)?(e.attach(r,t.get(n)),t.delete(n),!0):!1}function _b(e,t,r,n,i){if(vg(e,t,n,r(n,i)))e.updateValue(n,i);else{let s=e.create(n,i);e.attach(n,s)}}function Eb(e,t,r,n){let i=new Set;for(let s=t;s<=r;s++)i.add(n(s,e.at(s)));return i}var hd=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 r=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let n=this._vMap;for(;n.has(r);)r=n.get(r);n.set(r,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,r]of this.kvMap)if(e(r,t),this._vMap!==void 0){let n=this._vMap;for(;n.has(r);)r=n.get(r),e(r,t)}}};function Ot(e,t){lo("NgControlFlow");let r=Ne(),n=el(),i=r[n]!==ei?r[n]:-1,s=i!==-1?md(r,rn+i):void 0,o=0;if(Mi(r,n,e)){let a=$e(null);try{if(s!==void 0&&SS(s,o),e!==-1){let l=rn+e,c=md(r,l),h=wg(r[Te],l),d=zc(c,h.tView.ssrId),f=Od(r,h,t,{dehydratedView:d});Fd(c,f,o,Wc(h,d))}}finally{$e(a)}}else if(s!==void 0){let a=CS(s,o);a!==void 0&&(a[tn]=t)}}var yg=class{lContainer;$implicit;$index;constructor(e,t,r){this.lContainer=e,this.$implicit=t,this.$index=r}get $count(){return this.lContainer.length-In}};function Fi(e,t){return t}var _g=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,r){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=r}};function $t(e,t,r,n,i,s,o,a,l,c,h,d,f){lo("NgControlFlow");let g=Ne(),m=Xt(),b=l!==void 0,I=Ne(),A=a?o.bind(I[Ar][tn]):o,F=new _g(b,A);I[rn+e]=F,fg(g,m,e+1,t,r,n,i,oo(m.consts,s)),b&&fg(g,m,e+2,l,c,h,d,oo(m.consts,f))}var Eg=class extends gg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,r){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=r}get length(){return this.lContainer.length-In}at(e){return this.getLView(e)[tn].$implicit}attach(e,t){let r=t[Uc];this.needsIndexUpdate||=e!==this.length,Fd(this.lContainer,t,e,Wc(this.templateTNode,r))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,I1(this.lContainer,e)}create(e,t){let r=zc(this.lContainer,this.templateTNode.tView.ssrId),n=Od(this.hostLView,this.templateTNode,new yg(this.lContainer,t,e),{dehydratedView:r});return this.operationsCounter?.recordCreate(),n}destroy(e){Pd(e[Te],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[tn].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[tn].$index=e}getLView(e){return T1(this.lContainer,e)}};function Wt(e){let t=$e(null),r=co();try{let n=Ne(),i=n[Te],s=n[r],o=r+1,a=md(n,o);if(s.liveCollection===void 0){let c=wg(i,o);s.liveCollection=new Eg(a,n,c)}else s.liveCollection.reset();let l=s.liveCollection;if(D1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=el(),h=l.length===0;if(Mi(n,c,h)){let d=r+2,f=md(n,d);if(h){let g=wg(i,d),m=zc(f,g.tView.ssrId),b=Od(n,g,void 0,{dehydratedView:m});Fd(f,b,0,Wc(g,m))}else SS(f,0)}}}finally{$e(t)}}function md(e,t){return e[t]}function I1(e,t){return Gc(e,t)}function T1(e,t){return CS(e,t)}function wg(e,t){return Og(e,t)}function Q(e,t,r,n){let i=Ne(),s=Xt(),o=rn+e,a=i[nn],l=s.firstCreatePass?TS(o,s,i,t,ov,Lg(),r,n):s.data[o],c=x1(s,i,l,a,t,e);i[o]=c;let h=wd(l);return ao(l,!0),iS(a,c,l),!dS(l)&&Sd()&&kd(s,i,c,l),(hA()===0||h)&&ma(c,i),mA(),h&&(Md(s,i,l),Jg(s,l,i)),n!==null&&iv(i,l),Q}function ee(){let e=tr();Fg()?iC():(e=e.parent,ao(e,!1));let t=e;yA(t)&&_A(),gA();let r=Xt();return r.firstCreatePass&&xS(r,t),t.classesWithoutHost!=null&&PA(t)&&vb(r,t,Ne(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&kA(t)&&vb(r,t,Ne(),t.stylesWithoutHost,!1),ee}function Ae(e,t,r,n){return Q(e,t,r,n),ee(),Ae}var x1=(e,t,r,n,i,s)=>(Dd(!0),nS(n,i,NA()));function R1(e,t,r,n,i){let s=t.consts,o=oo(s,n),a=rl(t,e,8,"ng-container",o);o!==null&&rg(a,o,!0);let l=oo(s,i);return Lg()&&fv(t,r,a,l,ov),a.mergedAttrs=la(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function VS(e,t,r){let n=Ne(),i=Xt(),s=e+rn,o=i.firstCreatePass?R1(s,i,n,t,r):i.data[s];ao(o,!0);let a=N1(i,n,o,e);return n[s]=a,Sd()&&kd(i,n,a,o),ma(a,n),wd(o)&&(Md(i,n,o),Jg(i,o,n)),r!=null&&iv(n,o),VS}function US(){let e=tr(),t=Xt();return Fg()?iC():(e=e.parent,ao(e,!1)),t.firstCreatePass&&(jg(t,e),Mg(e)&&t.queries.elementEnd(e)),US}function Vd(e,t,r){return VS(e,t,r),US(),Vd}var N1=(e,t,r,n)=>(Dd(!0),tO(t[nn],""));function zn(){return Ne()}var gd="en-US",A1=gd;function M1(e){typeof e=="string"&&(A1=e.toLowerCase().replace(/_/g,"-"))}var O1=(e,t,r)=>{};function ht(e,t,r,n){let i=Ne(),s=Xt(),o=tr();return k1(s,i,i[nn],o,e,t,n),ht}function P1(e,t,r,n){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===r&&i[s+1]===n){let a=t[Ju],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function k1(e,t,r,n,i,s,o){let a=wd(n),l=e.firstCreatePass?nC(e):null,c=t[tn],h=tC(t),d=!0;if(n.type&3||o){let f=Zr(n,t),g=o?o(f):f,m=h.length,b=o?A=>o(qr(A[n.index])):n.index,I=null;if(!o&&a&&(I=P1(e,t,i,n.index)),I!==null){let A=I.__ngLastListenerFn__||I;A.__ngNextListenerFn__=s,I.__ngLastListenerFn__=s,d=!1}else{s=Cb(n,t,c,s),O1(f,i,s);let A=r.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=Cb(n,t,c,s);if(d){let f=n.outputs?.[i],g=n.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],I=g[m+1];wb(n,e,t,b,I,i,s,h,l)}if(f&&f.length)for(let m of f)wb(n,e,t,m,i,i,s,h,l)}}function wb(e,t,r,n,i,s,o,a,l){let c=r[n],h=t.data[n].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function bb(e,t,r,n){let i=$e(null);try{return gt(6,t,r),r(n)!==!1}catch(s){return uS(e,s),!1}finally{gt(7,t,r),$e(i)}}function Cb(e,t,r,n){return function i(s){if(s===Function)return n;let o=pa(e)?Yr(e.index,t):t;dv(o,5);let a=bb(t,r,n,s),l=i.__ngNextListenerFn__;for(;l;)a=bb(t,r,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function X(e=1){return xA(e)}function qn(e,t,r){return Bi(e,"",t,"",r),qn}function Bi(e,t,r,n,i){let s=Ne(),o=FS(s,t,r,n);if(o!==ei){let a=Xt(),l=Hg();lS(a,l,s,e,o,s[nn],i,!1)}return Bi}function ns(e,t,r){kP(e,t,r)}function rs(e){let t=Ne(),r=Xt(),n=aC();Bg(n+1);let i=pv(r,n);if(e.dirty&&lA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=BP(t,n);e.reset(s,iM),e.notifyOnChanges()}return!0}return!1}function is(){return OP(Ne(),aC())}function gv(e,t,r,n){r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=n}function vv(e){let t=oC();return bd(t,rn+e)}function fn(e,t=""){let r=Ne(),n=Xt(),i=e+rn,s=n.firstCreatePass?rl(n,i,1,t,null):n.data[i],o=L1(n,r,s,t,e);r[i]=o,Sd()&&kd(n,r,o,s),ao(s,!1)}var L1=(e,t,r,n,i)=>(Dd(!0),QM(t[nn],n));function ya(e){return os("",e,""),ya}function os(e,t,r){let n=Ne(),i=FS(n,e,t,r);return i!==ei&&F1(n,co(),i),os}function F1(e,t,r){let n=Jb(t,e);eO(e[nn],n,r)}var HS={};function Fr(e){let t=Xt(),r=Ne(),n=e+rn,i=rl(t,n,128,null,null);return ao(i,!1),gv(t,r,n,HS),Fr}function ho(e){lo("NgLet");let t=Xt(),r=Ne(),n=co();return gv(t,r,n,e),e}function mr(e){let t=oC(),r=bd(t,rn+e);if(r===HS)throw new Ge(314,!1);return r}function B1(e,t,r){let n=Xt();if(n.firstCreatePass){let i=zr(e);bg(r,n.data,n.blueprint,i,!0),bg(t,n.data,n.blueprint,i,!1)}}function bg(e,t,r,n,i){if(e=Pn(e),Array.isArray(e))for(let s=0;s<e.length;s++)bg(e[s],t,r,n,i);else{let s=Xt(),o=Ne(),a=tr(),l=aa(e)?e:Pn(e.provide),c=Hb(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(aa(e)||!e.multi){let g=new Yo(c,i,Ut),m=bm(l,t,i?h:h+f,d);m===-1?(Pm(od(a,o),s,l),wm(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(g),o.push(g)):(r[m]=g,o[m]=g)}else{let g=bm(l,t,h+f,d),m=bm(l,t,h,h+f),b=g>=0&&r[g],I=m>=0&&r[m];if(i&&!I||!i&&!b){Pm(od(a,o),s,l);let A=H1(i?U1:V1,r.length,i,n,c);!i&&I&&(r[m].providerFactory=A),wm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(A),o.push(A)}else{let A=jS(r[i?m:g],c,!i&&n);wm(s,e,g>-1?g:m,A)}!i&&n&&I&&r[m].componentProviders++}}}function wm(e,t,r,n){let i=aa(t),s=XN(t);if(i||s){let o=(s?Pn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(r);l===-1?a.push(r,[n,o]):a[l+1].push(n,o)}else a.push(r,o)}}}function jS(e,t,r){return r&&e.componentProviders++,e.multi.push(t)-1}function bm(e,t,r,n){for(let i=r;i<n;i++)if(t[i]===e)return i;return-1}function V1(e,t,r,n){return Cg(this.multi,[])}function U1(e,t,r,n){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=$c(r,r[Te],this.providerFactory.index,n);s=a.slice(0,o),Cg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Cg(i,s);return s}function Cg(e,t){for(let r=0;r<e.length;r++){let n=e[r];t.push(n())}return t}function H1(e,t,r,n,i){let s=new Yo(e,r,Ut);return s.multi=[],s.index=t,s.componentProviders=0,jS(s,i,n&&!r),s}function Ud(e,t=[]){return r=>{r.providersResolver=(n,i)=>B1(n,i?i(e):e,t)}}function yv(e,t,r){let n=Qc()+e,i=Ne();return i[n]===ei?hv(i,n,r?t.call(r):t()):JP(i,n)}function Ea(e,t,r,n){return WS(Ne(),Qc(),e,t,r,n)}function _v(e,t,r,n,i){return GS(Ne(),Qc(),e,t,r,n,i)}function $S(e,t){let r=e[t];return r===ei?void 0:r}function WS(e,t,r,n,i,s){let o=t+r;return Mi(e,o,i)?hv(e,o+1,s?n.call(s,i):n(i)):$S(e,o+1)}function GS(e,t,r,n,i,s,o){let a=t+r;return QP(e,a,i,s)?hv(e,a+2,o?n.call(o,i,s):n(i,s)):$S(e,a+2)}function bn(e,t){let r=Xt(),n,i=e+rn;r.firstCreatePass?(n=j1(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks??=[]).push(i,n.onDestroy)):n=r.data[i];let s=n.factory||(n.factory=Ho(n.type,!0)),o,a=Wn(Ut);try{let l=id(!1),c=s();return id(l),gv(r,Ne(),i,c),c}finally{Wn(a)}}function j1(e,t){if(t)for(let r=t.length-1;r>=0;r--){let n=t[r];if(e===n.name)return n}}function xn(e,t,r){let n=e+rn,i=Ne(),s=bd(i,n);return qS(i,n)?WS(i,Qc(),t,s.transform,r,s):s.transform(r)}function zS(e,t,r,n){let i=e+rn,s=Ne(),o=bd(s,i);return qS(s,i)?GS(s,Qc(),t,o.transform,r,n,o):o.transform(r,n)}function qS(e,t){return e[Te].data[t].pure}function YS(e,t){return Bd(e,t)}var da=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(".")}},Ev=new da("19.2.0"),$1=(()=>{class e{zone=O(Ve);changeDetectionScheduler=O(Ti);applicationRef=O(pr);_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||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function W1({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:r}){return e??=()=>new Ve(re(w({},G1()),{scheduleInRootZone:r})),[{provide:Ve,useFactory:e},{provide:Bc,multi:!0,useFactory:()=>{let n=O($1,{optional:!0});return()=>n.initialize()}},{provide:Bc,multi:!0,useFactory:()=>{let n=O(z1);return()=>{n.initialize()}}},t===!0?{provide:DC,useValue:!0}:[],{provide:Gg,useValue:r??SC}]}function G1(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var z1=(()=>{class e{subscription=new dt;initialized=!1;zone=O(Ve);pendingTasks=O(xd);initialize(){if(this.initialized)return;this.initialized=!0;let r=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(r=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ve.assertNotInAngularZone(),queueMicrotask(()=>{r!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(r),r=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ve.assertInAngularZone(),r??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),KS=(()=>{class e{appRef=O(pr);taskService=O(xd);ngZone=O(Ve);zonelessEnabled=O(Td);tracing=O(ga,{optional:!0});disableScheduling=O(DC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new dt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ad):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Gg,{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 cd||!this.zoneIsDefined)}notify(r){if(!this.zonelessEnabled&&r===5)return;let n=!1;switch(r){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,n=!0;break}case 12:{this.appRef.dirtyFlags|=16,n=!0;break}case 13:{this.appRef.dirtyFlags|=2,n=!0;break}case 11:{n=!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(n))return;let i=this.useMicrotaskScheduler?Jw:IC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(r){return!(this.disableScheduling&&!r||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ad+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 r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){throw this.taskService.remove(r),n}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Jw(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let r=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(r)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function ZS(){return lo("NgZoneless"),Fb([{provide:Ti,useExisting:KS},{provide:Ve,useClass:cd},{provide:Td,useValue:!0},{provide:Gg,useValue:!1},[]])}function q1(){return typeof $localize<"u"&&$localize.locale||gd}var wv=new he("",{providedIn:"root",factory:()=>O(wv,Ze.Optional|Ze.SkipSelf)||q1()}),Sg=new he(""),Y1=new he("");function Mc(e){return!e.moduleRef}function K1(e){let t=Mc(e)?e.r3Injector:e.moduleRef.injector,r=t.get(Ve);return r.run(()=>{Mc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let n=t.get(xi,null),i;if(r.runOutsideAngular(()=>{i=r.onError.subscribe({next:s=>{n.handleError(s)}})}),Mc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(Sg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(Sg);o.add(s),e.moduleRef.onDestroy(()=>{zu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return X1(n,r,()=>{let s=t.get(LS);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(wv,gd);if(M1(o||gd),!t.get(Y1,!0))return Mc(e)?t.get(pr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Mc(e)){let a=t.get(pr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return Z1(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function Z1(e,t){let r=e.injector.get(pr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(n=>r.bootstrap(n));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(r);else throw new Ge(-403,!1);t.push(e)}function X1(e,t,r){try{let n=r();return mv(n)?n.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):n}catch(n){throw t.runOutsideAngular(()=>e.handleError(n)),n}}var qu=null;function J1(e=[],t){return vt.create({name:t,providers:[{provide:yd,useValue:"platform"},{provide:Sg,useValue:new Set([()=>qu=null])},...e]})}function Q1(e=[]){if(qu)return qu;let t=J1(e);return qu=t,s1(),ek(t),t}function ek(e){let t=e.get(Yg,null);jb(e,()=>{t?.forEach(r=>r())})}var Br=(()=>{class e{static __NG_ELEMENT_ID__=tk}return e})();function tk(e){return nk(tr(),Ne(),(e&16)===16)}function nk(e,t,r){if(pa(e)&&!r){let n=Yr(e.index,t);return new Ko(n,n)}else if(e.type&175){let n=t[Ar];return new Ko(n,t)}return null}function XS(e){gt(8);try{let{rootComponent:t,appProviders:r,platformProviders:n}=e,i=Q1(n),s=[W1({}),{provide:Ti,useExisting:KS},...r||[]],o=new fd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return K1({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{gt(9)}}function wa(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function bv(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Cv(e){let t=$e(null);try{return e()}finally{$e(t)}}var Sb=class{[Ci];constructor(e){this[Ci]=e}destroy(){this[Ci].destroy()}};function Hd(e,t){let r=$o(e),n=t.elementInjector||_d();return new qc(r).create(n,t.projectableNodes,t.hostElement,t.environmentInjector)}var rk={schedule(e,t){let r=setTimeout(e,t);return()=>clearTimeout(r)}};function ik(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ok(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Sv;function sk(e,t){if(!Sv){let r=Element.prototype;Sv=r.matches||r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Sv.call(e,t):!1}function ak(e){let t={};return e.forEach(({propName:r,templateName:n,transform:i})=>{t[ik(n)]=[r,i]}),t}function ck(e,t){return t.get(so).resolveComponentFactory(e).inputs}function lk(e,t){let r=e.childNodes,n=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=r.length;s<o;++s){let a=r[s],l=uk(a,t,i);l!==-1&&n[l].push(a)}return n}function uk(e,t,r){let n=r;return ok(e)&&t.some((i,s)=>i!=="*"&&sk(e,i)?(n=s,!0):!1),n}var dk=10,Dv=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(so).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Iv(this.componentFactory,e,this.inputMap)}},Iv=class{componentFactory;injector;inputMap;eventEmitters=new Po(1);events=this.eventEmitters.pipe(Qs(e=>eo(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,r){this.componentFactory=e,this.injector=t,this.inputMap=r,this.ngZone=this.injector.get(Ve),this.appRef=this.injector.get(pr),this.cdScheduler=t.get(Ti),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=rk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},dk))})}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=vt.create({providers:[],parent:this.injector}),r=lk(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,r,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:r,templateName:n})=>{let i=e.instance[r];return new nt(s=>{let o=i.subscribe(a=>s.next({name:n,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Tv=class extends HTMLElement{ngElementEventsSubscription=null};function JS(e,t){let r=ck(e,t.injector),n=t.strategyFactory||new Dv(e,t.injector),i=ak(r);class s extends Tv{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=n.create(this.injector||t.injector);r.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,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 r.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var nD=null;function ba(){return nD}function rD(e){nD??=e}var jd=class{},Qe=new he(""),iD=(()=>{class e{historyGo(r){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>O(pk),providedIn:"platform"})}return e})(),pk=(()=>{class e extends iD{_location;_history;_doc=O(Qe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ba().getBaseHref(this._doc)}onPopState(r){let n=ba().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",r,!1),()=>n.removeEventListener("popstate",r)}onHashChange(r){let n=ba().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",r,!1),()=>n.removeEventListener("hashchange",r)}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(r){this._location.pathname=r}pushState(r,n,i){this._history.pushState(r,n,i)}replaceState(r,n,i){this._history.replaceState(r,n,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function oD(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function QS(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function ss(e){return e&&e[0]!=="?"?`?${e}`:e}var Rv=(()=>{class e{historyGo(r){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>O(mk),providedIn:"root"})}return e})(),hk=new he(""),mk=(()=>{class e extends Rv{_platformLocation;_baseHref;_removeListenerFns=[];constructor(r,n){super(),this._platformLocation=r,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??O(Qe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return oD(this._baseHref,r)}path(r=!1){let n=this._platformLocation.pathname+ss(this._platformLocation.search),i=this._platformLocation.hash;return i&&r?`${n}${i}`:n}pushState(r,n,i,s){let o=this.prepareExternalUrl(i+ss(s));this._platformLocation.pushState(r,n,o)}replaceState(r,n,i,s){let o=this.prepareExternalUrl(i+ss(s));this._platformLocation.replaceState(r,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}static \u0275fac=function(r){return new(r||e)(Xe(iD),Xe(hk,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Nv=(()=>{class e{_subject=new ie;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(r){this._locationStrategy=r;let n=this._locationStrategy.getBaseHref();this._basePath=yk(QS(eD(n))),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(r=!1){return this.normalize(this._locationStrategy.path(r))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(r,n=""){return this.path()==this.normalize(r+ss(n))}normalize(r){return e.stripTrailingSlash(vk(this._basePath,eD(r)))}prepareExternalUrl(r){return r&&r[0]!=="/"&&(r="/"+r),this._locationStrategy.prepareExternalUrl(r)}go(r,n="",i=null){this._locationStrategy.pushState(i,"",r,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+ss(n)),i)}replaceState(r,n="",i=null){this._locationStrategy.replaceState(i,"",r,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+ss(n)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(r=0){this._locationStrategy.historyGo?.(r)}onUrlChange(r){return this._urlChangeListeners.push(r),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(r="",n){this._urlChangeListeners.forEach(i=>i(r,n))}subscribe(r,n,i){return this._subject.subscribe({next:r,error:n??void 0,complete:i??void 0})}static normalizeQueryParams=ss;static joinWithSlash=oD;static stripTrailingSlash=QS;static \u0275fac=function(r){return new(r||e)(Xe(Rv))};static \u0275prov=oe({token:e,factory:()=>gk(),providedIn:"root"})}return e})();function gk(){return new Nv(Xe(Rv))}function vk(e,t){if(!e||!t.startsWith(e))return t;let r=t.substring(e.length);return r===""||["/",";","?","#"].includes(r[0])?r:t}function eD(e){return e.replace(/\/index.html$/,"")}function yk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function sD(e,t){t=encodeURIComponent(t);for(let r of e.split(";")){let n=r.indexOf("="),[i,s]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var xv=/\s+/,tD=[],Wd=(()=>{class e{_ngEl;_renderer;initialClasses=tD;rawClass;stateMap=new Map;constructor(r,n){this._ngEl=r,this._renderer=n}set klass(r){this.initialClasses=r!=null?r.trim().split(xv):tD}set ngClass(r){this.rawClass=typeof r=="string"?r.trim().split(xv):r}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let r=this.rawClass;if(Array.isArray(r)||r instanceof Set)for(let n of r)this._updateState(n,!0);else if(r!=null)for(let n of Object.keys(r))this._updateState(n,!!r[n]);this._applyStateDiff()}_updateState(r,n){let i=this.stateMap.get(r);i!==void 0?(i.enabled!==n&&(i.changed=!0,i.enabled=n),i.touched=!0):this.stateMap.set(r,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let r of this.stateMap){let n=r[0],i=r[1];i.changed?(this._toggleClass(n,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),i.touched=!1}}_toggleClass(r,n){r=r.trim(),r.length>0&&r.split(xv).forEach(i=>{n?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(r){return new(r||e)(Ut(Mt),Ut(va))};static \u0275dir=Lr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),aD=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(r){this._viewContainerRef=r}ngOnChanges(r){if(this._shouldRecreateView(r)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(r){return!!r.ngTemplateOutlet||!!r.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(r,n,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,i):!1,get:(r,n,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,i)}})}static \u0275fac=function(r){return new(r||e)(Ut(kr))};static \u0275dir=Lr({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Xo]})}return e})(),Av="browser",_k="server";function cD(e){return e===Av}function Mv(e){return e===_k}var $d=class{},Pv=class extends jd{supportsDOMEvents=!0},kv=class ED extends Pv{static makeCurrent(){rD(new ED)}onAndCancel(t,r,n,i){return t.addEventListener(r,n,i),()=>{t.removeEventListener(r,n,i)}}dispatchEvent(t,r){t.dispatchEvent(r)}remove(t){t.remove()}createElement(t,r){return r=r||this.getDefaultDocument(),r.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,r){return r==="window"?window:r==="document"?t:r==="body"?t.body:null}getBaseHref(t){let r=wk();return r==null?null:bk(r)}resetBaseElement(){il=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return sD(document.cookie,t)}},il=null;function wk(){return il=il||document.querySelector("base"),il?il.getAttribute("href"):null}function bk(e){return new URL(e,document.baseURI).pathname}var Ck=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Lv=new he(""),hD=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(r,n){this._zone=n,r.forEach(i=>{i.manager=this}),this._plugins=r.slice().reverse()}addEventListener(r,n,i,s){return this._findPluginFor(n).addEventListener(r,n,i,s)}getZone(){return this._zone}_findPluginFor(r){let n=this._eventNameToPlugin.get(r);if(n)return n;if(n=this._plugins.find(i=>i.supports(r)),!n)throw new Ge(5101,!1);return this._eventNameToPlugin.set(r,n),n}static \u0275fac=function(r){return new(r||e)(Xe(Lv),Xe(Ve))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),zd=class{_doc;constructor(e){this._doc=e}manager},Gd="ng-app-id";function lD(e){for(let t of e)t.remove()}function uD(e,t){let r=t.createElement("style");return r.textContent=e,r}function Sk(e,t,r,n){let i=e.head?.querySelectorAll(`style[${Gd}="${t}"],link[${Gd}="${t}"]`);if(i)for(let s of i)s.removeAttribute(Gd),s instanceof HTMLLinkElement?n.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&r.set(s.textContent,{usage:0,elements:[s]})}function Fv(e,t){let r=t.createElement("link");return r.setAttribute("rel","stylesheet"),r.setAttribute("href",e),r}var mD=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(r,n,i,s={}){this.doc=r,this.appId=n,this.nonce=i,this.isServer=Mv(s),Sk(r,n,this.inline,this.external),this.hosts.add(r.head)}addStyles(r,n){for(let i of r)this.addUsage(i,this.inline,uD);n?.forEach(i=>this.addUsage(i,this.external,Fv))}removeStyles(r,n){for(let i of r)this.removeUsage(i,this.inline);n?.forEach(i=>this.removeUsage(i,this.external))}addUsage(r,n,i){let s=n.get(r);s?s.usage++:n.set(r,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(r,this.doc)))})}removeUsage(r,n){let i=n.get(r);i&&(i.usage--,i.usage<=0&&(lD(i.elements),n.delete(r)))}ngOnDestroy(){for(let[,{elements:r}]of[...this.inline,...this.external])lD(r);this.hosts.clear()}addHost(r){this.hosts.add(r);for(let[n,{elements:i}]of this.inline)i.push(this.addElement(r,uD(n,this.doc)));for(let[n,{elements:i}]of this.external)i.push(this.addElement(r,Fv(n,this.doc)))}removeHost(r){this.hosts.delete(r)}addElement(r,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(Gd,this.appId),r.appendChild(n)}static \u0275fac=function(r){return new(r||e)(Xe(Qe),Xe(tl),Xe(Kg,8),Xe(Qo))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Ov={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"},Vv=/%COMP%/g,gD="%COMP%",Dk=`_nghost-${gD}`,Ik=`_ngcontent-${gD}`,Tk=!0,xk=new he("",{providedIn:"root",factory:()=>Tk});function Rk(e){return Ik.replace(Vv,e)}function Nk(e){return Dk.replace(Vv,e)}function vD(e,t){return t.map(r=>r.replace(Vv,e))}var dD=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(r,n,i,s,o,a,l,c=null,h=null){this.eventManager=r,this.sharedStylesHost=n,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Mv(a),this.defaultRenderer=new ol(r,o,l,this.platformIsServer,this.tracingService)}createRenderer(r,n){if(!r||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===Kr.ShadowDom&&(n=re(w({},n),{encapsulation:Kr.Emulated}));let i=this.getOrCreateRenderer(r,n);return i instanceof qd?i.applyToHost(r):i instanceof sl&&i.applyStyles(),i}getOrCreateRenderer(r,n){let i=this.rendererByCompId,s=i.get(n.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(n.encapsulation){case Kr.Emulated:s=new qd(l,c,n,this.appId,h,o,a,d,f);break;case Kr.ShadowDom:return new Bv(l,c,r,n,o,a,this.nonce,d,f);default:s=new sl(l,c,n,h,o,a,d,f);break}i.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(r){this.rendererByCompId.delete(r)}static \u0275fac=function(r){return new(r||e)(Xe(hD),Xe(mD),Xe(tl),Xe(xk),Xe(Qe),Xe(Qo),Xe(Ve),Xe(Kg),Xe(ga,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),ol=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,r,n,i){this.eventManager=e,this.doc=t,this.ngZone=r,this.platformIsServer=n,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Ov[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(fD(e)?e.content:e).appendChild(t)}insertBefore(e,t,r){e&&(fD(e)?e.content:e).insertBefore(t,r)}removeChild(e,t){t.remove()}selectRootElement(e,t){let r=typeof e=="string"?this.doc.querySelector(e):e;if(!r)throw new Ge(-5104,!1);return t||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,r,n){if(n){t=n+":"+t;let i=Ov[n];i?e.setAttributeNS(i,t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}removeAttribute(e,t,r){if(r){let n=Ov[r];n?e.removeAttributeNS(n,t):e.removeAttribute(`${r}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,r,n){n&(Ni.DashCase|Ni.Important)?e.style.setProperty(t,r,n&Ni.Important?"important":""):e.style[t]=r}removeStyle(e,t,r){r&Ni.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,r){e!=null&&(e[t]=r)}setValue(e,t){e.nodeValue=t}listen(e,t,r,n){if(typeof e=="string"&&(e=ba().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(r);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,n)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function fD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Bv=class extends ol{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,r,n,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=vD(n.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=n.getExternalStyles?.();if(h)for(let d of h){let f=Fv(d,i);o&&f.setAttribute("nonce",o),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,r){return super.insertBefore(this.nodeOrShadowRoot(e),t,r)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},sl=class extends ol{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,r,n,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=n;let c=r.styles;this.styles=l?vD(l,c):c,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},qd=class extends sl{contentAttr;hostAttr;constructor(e,t,r,n,i,s,o,a,l){let c=n+"-"+r.id;super(e,t,r,i,s,o,a,l,c),this.contentAttr=Rk(c),this.hostAttr=Nk(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let r=super.createElement(e,t);return super.setAttribute(r,this.contentAttr,""),r}},Ak=(()=>{class e extends zd{constructor(r){super(r)}supports(r){return!0}addEventListener(r,n,i,s){return r.addEventListener(n,i,s),()=>this.removeEventListener(r,n,i,s)}removeEventListener(r,n,i,s){return r.removeEventListener(n,i,s)}static \u0275fac=function(r){return new(r||e)(Xe(Qe))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),pD=["alt","control","meta","shift"],Mk={"\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"},Ok={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Pk=(()=>{class e extends zd{constructor(r){super(r)}supports(r){return e.parseEventName(r)!=null}addEventListener(r,n,i,s){let o=e.parseEventName(n),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ba().onAndCancel(r,o.domEventName,a,s))}static parseEventName(r){let n=r.toLowerCase().split("."),i=n.shift();if(n.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(n.pop()),o="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),o="code."),pD.forEach(c=>{let h=n.indexOf(c);h>-1&&(n.splice(h,1),o+=c+".")}),o+=s,n.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(r,n){let i=Mk[r.key]||r.key,s="";return n.indexOf("code.")>-1&&(i=r.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),pD.forEach(o=>{if(o!==i){let a=Ok[o];a(r)&&(s+=o+".")}}),s+=i,s===n)}static eventCallback(r,n,i){return s=>{e.matchEventFullKeyCode(s,r)&&i.runGuarded(()=>n(s))}}static _normalizeKey(r){return r==="esc"?"escape":r}static \u0275fac=function(r){return new(r||e)(Xe(Qe))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})();function yD(e){return XS(kk(e))}function kk(e){return{appProviders:[...Uk,...e?.providers??[]],platformProviders:Vk}}function Lk(){kv.makeCurrent()}function Fk(){return new xi}function Bk(){return PC(document),document}var Vk=[{provide:Qo,useValue:Av},{provide:Yg,useValue:Lk,multi:!0},{provide:Qe,useFactory:Bk,deps:[]}],Uk=[{provide:yd,useValue:"root"},{provide:xi,useFactory:Fk,deps:[]},{provide:Lv,useClass:Ak,multi:!0,deps:[Qe]},{provide:Lv,useClass:Pk,multi:!0,deps:[Qe]},dD,mD,hD,{provide:un,useExisting:dD},{provide:$d,useClass:Ck,deps:[]},[]],Uv=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:function(r){let n=null;return r?n=new(r||e):n=Xe(Hk),n},providedIn:"root"})}return e})(),Hk=(()=>{class e extends Uv{_doc;constructor(r){super(),this._doc=r}sanitize(r,n){if(n==null)return null;switch(r){case Qr.NONE:return n;case Qr.HTML:return uo(n,"HTML")?Jr(n):Qg(this._doc,String(n)).toString();case Qr.STYLE:return uo(n,"Style")?Jr(n):n;case Qr.SCRIPT:if(uo(n,"Script"))return Jr(n);throw new Ge(5200,!1);case Qr.URL:return uo(n,"URL")?Jr(n):Nd(String(n));case Qr.RESOURCE_URL:if(uo(n,"ResourceURL"))return Jr(n);throw new Ge(5201,!1);default:throw new Ge(5202,!1)}}bypassSecurityTrustHtml(r){return $C(r)}bypassSecurityTrustStyle(r){return WC(r)}bypassSecurityTrustScript(r){return GC(r)}bypassSecurityTrustUrl(r){return zC(r)}bypassSecurityTrustResourceUrl(r){return qC(r)}static \u0275fac=function(r){return new(r||e)(Xe(Qe))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),_D="9.6.9",k=class $h{static SDK_VERSION=_D;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_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";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 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=$h.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");$h.SDK_VERSION_CODE=parseInt(t,10)}},Rn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},nr=Pe(ls()),C=class{static log(...e){nr.default.info(...e)}static debug(...e){nr.default.debug(...e)}static error(...e){nr.default.error(...e)}static warn(...e){nr.default.warn(...e)}static info(...e){nr.default.info(...e)}static trace(...e){nr.default.trace(...e)}static configure(e=k.LOG_PREFIX){nr.default.useDefaults({formatter:function(r){r.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?nr.default.setLevel(nr.default[localStorage.cooeeLogLevel]):nr.default.setLevel(Rn.debug?nr.default.TRACE:nr.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
3
+ `)}`:"",this.name="UnsubscriptionError",this.errors=t});function Ao(e,t){if(e){let r=e.indexOf(t);0<=r&&e.splice(r,1)}}var dt=class Bh{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:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let s of r)s.remove(this);else r.remove(this);let{initialTeardown:n}=this;if(Ie(n))try{n()}catch(s){t=s instanceof fu?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{lw(s)}catch(o){t=t??[],o instanceof fu?t=[...t,...o.errors]:t.push(o)}}if(t)throw new fu(t)}}add(t){var r;if(t&&t!==this)if(this.closed)lw(t);else{if(t instanceof Bh){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}}_hasParent(t){let{_parentage:r}=this;return r===t||Array.isArray(r)&&r.includes(t)}_addParent(t){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t}_removeParent(t){let{_parentage:r}=this;r===t?this._parentage=null:Array.isArray(r)&&Ao(r,t)}remove(t){let{_finalizers:r}=this;r&&Ao(r,t),t instanceof Bh&&t._removeParent(this)}};dt.EMPTY=(()=>{let e=new dt;return e.closed=!0,e})();var Zh=dt.EMPTY;function pu(e){return e instanceof dt||e&&"closed"in e&&Ie(e.remove)&&Ie(e.add)&&Ie(e.unsubscribe)}function lw(e){Ie(e)?e():e.unsubscribe()}var Ir={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$s={setTimeout(e,t,...r){let{delegate:n}=$s;return n?.setTimeout?n.setTimeout(e,t,...r):setTimeout(e,t,...r)},clearTimeout(e){let{delegate:t}=$s;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function hu(e){$s.setTimeout(()=>{let{onUnhandledError:t}=Ir;if(t)t(e);else throw e})}function xc(){}var uw=Xh("C",void 0,void 0);function dw(e){return Xh("E",void 0,e)}function fw(e){return Xh("N",e,void 0)}function Xh(e,t,r){return{kind:e,value:t,error:r}}var Mo=null;function Ws(e){if(Ir.useDeprecatedSynchronousErrorHandling){let t=!Mo;if(t&&(Mo={errorThrown:!1,error:null}),e(),t){let{errorThrown:r,error:n}=Mo;if(Mo=null,r)throw n}}else e()}function pw(e){Ir.useDeprecatedSynchronousErrorHandling&&Mo&&(Mo.errorThrown=!0,Mo.error=e)}var Oo=class extends dt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,pu(e)&&e.add(this)):this.destination=tN}static create(e,t,r){return new Gs(e,t,r)}next(e){this.isStopped?Qh(fw(e),this):this._next(e)}error(e){this.isStopped?Qh(dw(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Qh(uw,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()}}},QR=Function.prototype.bind;function Jh(e,t){return QR.call(e,t)}var em=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(r){mu(r)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(r){mu(r)}else mu(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){mu(t)}}},Gs=class extends Oo{constructor(e,t,r){super();let n;if(Ie(e)||!e)n={next:e??void 0,error:t??void 0,complete:r??void 0};else{let i;this&&Ir.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),n={next:e.next&&Jh(e.next,i),error:e.error&&Jh(e.error,i),complete:e.complete&&Jh(e.complete,i)}):n=e}this.destination=new em(n)}};function mu(e){Ir.useDeprecatedSynchronousErrorHandling?pw(e):hu(e)}function eN(e){throw e}function Qh(e,t){let{onStoppedNotification:r}=Ir;r&&$s.setTimeout(()=>r(e,t))}var tN={closed:!0,next:xc,error:eN,complete:xc},zs=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ji(e){return e}function hw(e){return e.length===0?Ji:e.length===1?e[0]:function(t){return e.reduce((r,n)=>n(r),t)}}var nt=(()=>{class e{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new e;return n.source=this,n.operator=r,n}subscribe(r,n,i){let s=rN(r)?r:new Gs(r,n,i);return Ws(()=>{let{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=mw(n),new n((i,s)=>{let o=new Gs({next:a=>{try{r(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[zs](){return this}pipe(...r){return hw(r)(this)}toPromise(r){return r=mw(r),new r((n,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>n(s))})}}return e.create=t=>new e(t),e})();function mw(e){var t;return(t=e??Ir.Promise)!==null&&t!==void 0?t:Promise}function nN(e){return e&&Ie(e.next)&&Ie(e.error)&&Ie(e.complete)}function rN(e){return e&&e instanceof Oo||nN(e)&&pu(e)}function iN(e){return Ie(e?.lift)}function Dt(e){return t=>{if(iN(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Rt(e,t,r,n,i){return new tm(e,t,r,n,i)}var tm=class extends Oo{constructor(e,t,r,n,i,s){super(e),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=t?function(o){try{t(o)}catch(a){e.error(a)}}:super._next,this._error=n?function(o){try{n(o)}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(o){e.error(o)}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))}}},qs={schedule(e){let t=requestAnimationFrame,r=cancelAnimationFrame,{delegate:n}=qs;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);let i=t(s=>{r=void 0,e(s)});return new dt(()=>r?.(i))},requestAnimationFrame(...e){let{delegate:t}=qs;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=qs;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},gw=du(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),ie=(()=>{class e extends nt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new gu(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new gw}next(r){Ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){Ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){Ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:i,observers:s}=this;return n||i?Zh:(this.currentObservers=null,s.push(r),new dt(()=>{this.currentObservers=null,Ao(s,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:i,isStopped:s}=this;n?r.error(i):s&&r.complete()}asObservable(){let r=new nt;return r.source=this,r}}return e.create=(t,r)=>new gu(t,r),e})(),gu=class extends ie{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.next)===null||r===void 0||r.call(t,e)}error(e){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.error)===null||r===void 0||r.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,r;return(r=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&r!==void 0?r:Zh}},Tr=class extends ie{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:r}=this;if(e)throw t;return this._throwIfClosed(),r}next(e){super.next(this._value=e)}},Rc={now(){return(Rc.delegate||Date).now()},delegate:void 0},Po=class extends ie{constructor(e=1/0,t=1/0,r=Rc){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=r,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:r,_infiniteTimeWindow:n,_timestampProvider:i,_windowTime:s}=this;t||(r.push(e),!n&&r.push(i.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:r,_buffer:n}=this,i=n.slice();for(let s=0;s<i.length&&!e.closed;s+=r?1:2)e.next(i[s]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:r,_infiniteTimeWindow:n}=this,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){let s=t.now(),o=0;for(let a=1;a<r.length&&r[a]<=s;a+=2)o=a;o&&r.splice(0,o+1)}}},vu=class extends dt{constructor(e,t){super()}schedule(e,t=0){return this}},Nc={setInterval(e,t,...r){let{delegate:n}=Nc;return n?.setInterval?n.setInterval(e,t,...r):setInterval(e,t,...r)},clearInterval(e){let{delegate:t}=Nc;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Ys=class extends vu{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var r;if(this.closed)return this;this.state=e;let n=this.id,i=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,r=0){return Nc.setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,t,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return t;t!=null&&Nc.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let r=this._execute(e,t);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let r=!1,n;try{this.work(e)}catch(i){r=!0,n=i||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:r}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Ao(r,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Ks=class _T{constructor(t,r=_T.now){this.schedulerActionCtor=t,this.now=r}schedule(t,r=0,n){return new this.schedulerActionCtor(this,t).schedule(n,r)}};Ks.now=Rc.now;var Zs=class extends Ks{constructor(e,t=Ks.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let r;this._active=!0;do if(r=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},ko=new Zs(Ys),vw=ko,yu=class extends Ys{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,r=0){return r!==null&&r>0?super.requestAsyncId(e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=qs.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,r=0){var n;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(e,t,r);let{actions:i}=e;t!=null&&((n=i[i.length-1])===null||n===void 0?void 0:n.id)!==t&&(qs.cancelAnimationFrame(t),e._scheduled=void 0)}},_u=class extends Zs{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:r}=this,n;e=e||r.shift();do if(n=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}}},Eu=new _u(yu),wu=new nt(e=>e.complete());function bu(e){return e&&Ie(e.schedule)}function yw(e){return e[e.length-1]}function Qi(e){return bu(yw(e))?e.pop():void 0}function _w(e,t){return typeof yw(e)=="number"?e.pop():t}function ww(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(h){try{c(n.next(h))}catch(d){o(d)}}function l(h){try{c(n.throw(h))}catch(d){o(d)}}function c(h){h.done?s(h.value):i(h.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function Ew(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Lo(e){return this instanceof Lo?(this.v=e,this):new Lo(e)}function bw(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(g){return function(m){return Promise.resolve(m).then(g,d)}}function a(g,m){n[g]&&(i[g]=function(b){return new Promise(function(I,A){s.push([g,b,I,A])>1||l(g,b)})},m&&(i[g]=m(i[g])))}function l(g,m){try{c(n[g](m))}catch(b){f(s[0][3],b)}}function c(g){g.value instanceof Lo?Promise.resolve(g.value.v).then(h,d):f(s[0][2],g)}function h(g){l("next",g)}function d(g){l("throw",g)}function f(g,m){g(m),s.shift(),s.length&&l(s[0][0],s[0][1])}}function Cw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ew=="function"?Ew(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}var Xs=e=>e&&typeof e.length=="number"&&typeof e!="function";function Cu(e){return Ie(e?.then)}function Su(e){return Ie(e[zs])}function Du(e){return Symbol.asyncIterator&&Ie(e?.[Symbol.asyncIterator])}function Iu(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 oN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Tu=oN();function xu(e){return Ie(e?.[Tu])}function Ru(e){return bw(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:r,done:n}=yield Lo(t.read());if(n)return yield Lo(void 0);yield yield Lo(r)}}finally{t.releaseLock()}})}function Nu(e){return Ie(e?.getReader)}function Ut(e){if(e instanceof nt)return e;if(e!=null){if(Su(e))return sN(e);if(Xs(e))return aN(e);if(Cu(e))return cN(e);if(Du(e))return Sw(e);if(xu(e))return lN(e);if(Nu(e))return uN(e)}throw Iu(e)}function sN(e){return new nt(t=>{let r=e[zs]();if(Ie(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function aN(e){return new nt(t=>{for(let r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function cN(e){return new nt(t=>{e.then(r=>{t.closed||(t.next(r),t.complete())},r=>t.error(r)).then(null,hu)})}function lN(e){return new nt(t=>{for(let r of e)if(t.next(r),t.closed)return;t.complete()})}function Sw(e){return new nt(t=>{dN(e,t).catch(r=>t.error(r))})}function uN(e){return Sw(Ru(e))}function dN(e,t){var r,n,i,s;return ww(this,void 0,void 0,function*(){try{for(r=Cw(e);n=yield r.next(),!n.done;){let o=n.value;if(t.next(o),t.closed)return}}catch(o){i={error:o}}finally{try{n&&!n.done&&(s=r.return)&&(yield s.call(r))}finally{if(i)throw i.error}}t.complete()})}function ur(e,t,r,n=0,i=!1){let s=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!i)return s}function Au(e,t=0){return Dt((r,n)=>{r.subscribe(Rt(n,i=>ur(n,e,()=>n.next(i),t),()=>ur(n,e,()=>n.complete(),t),i=>ur(n,e,()=>n.error(i),t)))})}function Mu(e,t=0){return Dt((r,n)=>{n.add(e.schedule(()=>r.subscribe(n),t))})}function Dw(e,t){return Ut(e).pipe(Mu(t),Au(t))}function Iw(e,t){return Ut(e).pipe(Mu(t),Au(t))}function Tw(e,t){return new nt(r=>{let n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}function xw(e,t){return new nt(r=>{let n;return ur(r,t,()=>{n=e[Tu](),ur(r,t,()=>{let i,s;try{({value:i,done:s}=n.next())}catch(o){r.error(o);return}s?r.complete():r.next(i)},0,!0)}),()=>Ie(n?.return)&&n.return()})}function Ou(e,t){if(!e)throw new Error("Iterable cannot be null");return new nt(r=>{ur(r,t,()=>{let n=e[Symbol.asyncIterator]();ur(r,t,()=>{n.next().then(i=>{i.done?r.complete():r.next(i.value)})},0,!0)})})}function Rw(e,t){return Ou(Ru(e),t)}function Nw(e,t){if(e!=null){if(Su(e))return Dw(e,t);if(Xs(e))return Tw(e,t);if(Cu(e))return Iw(e,t);if(Du(e))return Ou(e,t);if(xu(e))return xw(e,t);if(Nu(e))return Rw(e,t)}throw Iu(e)}function Js(e,t){return t?Nw(e,t):Ut(e)}function Fo(...e){let t=Qi(e);return Js(e,t)}function Aw(e){return e instanceof Date&&!isNaN(e)}function dr(e,t){return Dt((r,n)=>{let i=0;r.subscribe(Rt(n,s=>{n.next(e.call(t,s,i++))}))})}var{isArray:fN}=Array;function pN(e,t){return fN(t)?e(...t):e(t)}function Mw(e){return dr(t=>pN(e,t))}function Ow(e,t,r,n,i,s,o,a){let l=[],c=0,h=0,d=!1,f=()=>{d&&!l.length&&!c&&t.complete()},g=b=>c<n?m(b):l.push(b),m=b=>{s&&t.next(b),c++;let I=!1;Ut(r(b,h++)).subscribe(Rt(t,A=>{i?.(A),s?g(A):t.next(A)},()=>{I=!0},void 0,()=>{if(I)try{for(c--;l.length&&c<n;){let A=l.shift();o?ur(t,o,()=>m(A)):m(A)}f()}catch(A){t.error(A)}}))};return e.subscribe(Rt(t,g,()=>{d=!0,f()})),()=>{a?.()}}function Ac(e,t,r=1/0){return Ie(t)?Ac((n,i)=>dr((s,o)=>t(n,s,i,o))(Ut(e(n,i))),r):(typeof t=="number"&&(r=t),Dt((n,i)=>Ow(n,i,e,r)))}function Pu(e=1/0){return Ac(Ji,e)}function Pw(){return Pu(1)}function nm(...e){return Pw()(Js(e,Qi(e)))}function rm(e){return new nt(t=>{Ut(e()).subscribe(t)})}var hN=["addListener","removeListener"],mN=["addEventListener","removeEventListener"],gN=["on","off"];function Bo(e,t,r,n){if(Ie(r)&&(n=r,r=void 0),n)return Bo(e,t,r).pipe(Mw(n));let[i,s]=_N(e)?mN.map(o=>a=>e[o](t,a,r)):vN(e)?hN.map(kw(e,t)):yN(e)?gN.map(kw(e,t)):[];if(!i&&Xs(e))return Ac(o=>Bo(o,t,r))(Ut(e));if(!i)throw new TypeError("Invalid event target");return new nt(o=>{let a=(...l)=>o.next(1<l.length?l:l[0]);return i(a),()=>s(a)})}function kw(e,t){return r=>n=>e[r](t,n)}function vN(e){return Ie(e.addListener)&&Ie(e.removeListener)}function yN(e){return Ie(e.on)&&Ie(e.off)}function _N(e){return Ie(e.addEventListener)&&Ie(e.removeEventListener)}function ku(e=0,t,r=vw){let n=-1;return t!=null&&(bu(t)?r=t:n=t),new nt(i=>{let s=Aw(e)?+e-r.now():e;s<0&&(s=0);let o=0;return r.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},s)})}function im(e=0,t=ko){return e<0&&(e=0),ku(e,e,t)}function eo(...e){let t=Qi(e),r=_w(e,1/0),n=e;return n.length?n.length===1?Ut(n[0]):Pu(r)(Js(n,t)):wu}function Vo(e,t){return Dt((r,n)=>{let i=0;r.subscribe(Rt(n,s=>e.call(t,s,i++)&&n.next(s)))})}function Lw(e){return Dt((t,r)=>{let n=!1,i=null,s=null,o=!1,a=()=>{if(s?.unsubscribe(),s=null,n){n=!1;let c=i;i=null,r.next(c)}o&&r.complete()},l=()=>{s=null,o&&r.complete()};t.subscribe(Rt(r,c=>{n=!0,i=c,s||Ut(e(c)).subscribe(s=Rt(r,a,l))},()=>{o=!0,(!n||!s||s.closed)&&r.complete()}))})}function Lu(e,t=ko){return Lw(()=>ku(e,t))}function xr(e,t=ko){return Dt((r,n)=>{let i=null,s=null,o=null,a=()=>{if(i){i.unsubscribe(),i=null;let c=s;s=null,n.next(c)}};function l(){let c=o+e,h=t.now();if(h<c){i=this.schedule(void 0,c-h),n.add(i);return}a()}r.subscribe(Rt(n,c=>{s=c,o=t.now(),i||(i=t.schedule(l,e),n.add(i))},()=>{a(),n.complete()},void 0,()=>{s=i=null}))})}function om(e){return e<=0?()=>wu:Dt((t,r)=>{let n=0;t.subscribe(Rt(r,i=>{++n<=e&&(r.next(i),e<=n&&r.complete())}))})}function Fu(e,t=Ji){return e=e??EN,Dt((r,n)=>{let i,s=!0;r.subscribe(Rt(n,o=>{let a=t(o);(s||!e(i,a))&&(s=!1,i=a,n.next(o))}))})}function EN(e,t){return e===t}function sm(e){return Vo((t,r)=>e<=r)}function Si(...e){let t=Qi(e);return Dt((r,n)=>{(t?nm(e,r,t):nm(e,r)).subscribe(n)})}function Qs(e,t){return Dt((r,n)=>{let i=null,s=0,o=!1,a=()=>o&&!i&&n.complete();r.subscribe(Rt(n,l=>{i?.unsubscribe();let c=0,h=s++;Ut(e(l,h)).subscribe(i=Rt(n,d=>n.next(t?t(l,d,h,c++):d),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function Wr(e){return Dt((t,r)=>{Ut(e).subscribe(Rt(r,()=>r.complete(),xc)),!r.closed&&t.subscribe(r)})}function am(e,t,r){let n=Ie(e)||t||r?{next:e,error:t,complete:r}:e;return n?Dt((i,s)=>{var o;(o=n.subscribe)===null||o===void 0||o.call(n);let a=!0;i.subscribe(Rt(s,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),s.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),s.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),s.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Ji}var Sb="https://g.co/ng/security#xss",Ge=class extends Error{code;constructor(e,t){super(Sg(e,t)),this.code=e}};function Sg(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function Dg(e){return{toString:e}.toString()}var Lc=globalThis;function Nt(e){for(let t in e)if(e[t]===Nt)return t;throw Error("Could not find renamed property on target object.")}function wN(e,t){for(let r in t)t.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function fr(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(fr).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let r=e.toString();if(r==null)return""+r;let n=r.indexOf(`
4
+ `);return n>=0?r.slice(0,n):r}function Fw(e,t){return e?t?`${e} ${t}`:e:t||""}var bN=Nt({__forward_ref__:Nt});function Ig(e){return e.__forward_ref__=Ig,e.toString=function(){return fr(this())},e}function Pn(e){return Db(e)?e():e}function Db(e){return typeof e=="function"&&e.hasOwnProperty(bN)&&e.__forward_ref__===Ig}function oe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Tg(e){return Bw(e,Ib)||Bw(e,Tb)}function Bw(e,t){return e.hasOwnProperty(t)?e[t]:null}function CN(e){return e&&(e[Ib]||e[Tb])||null}function Vw(e){return e&&(e.hasOwnProperty(Uw)||e.hasOwnProperty(SN))?e[Uw]:null}var Ib=Nt({\u0275prov:Nt}),Uw=Nt({\u0275inj:Nt}),Tb=Nt({ngInjectableDef:Nt}),SN=Nt({ngInjectorDef:Nt}),he=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=oe({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function xb(e){return e&&!!e.\u0275providers}var DN=Nt({\u0275cmp:Nt}),IN=Nt({\u0275dir:Nt}),TN=Nt({\u0275pipe:Nt}),Yu=Nt({\u0275fac:Nt}),kc=Nt({__NG_ELEMENT_ID__:Nt}),Hw=Nt({__NG_ENV_ID__:Nt});function Kc(e){return typeof e=="string"?e:e==null?"":String(e)}function xN(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Kc(e)}function RN(e,t){throw new Ge(-200,e)}function xg(e,t){throw new Ge(-201,!1)}var Ze=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}(Ze||{}),bm;function Rb(){return bm}function Wn(e){let t=bm;return bm=e,t}function Nb(e,t,r){let n=Tg(e);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&Ze.Optional)return null;if(t!==void 0)return t;xg(e,"Injector")}var NN={},Fc=NN,AN="__NG_DI_FLAG__",Ku="ngTempTokenPath",MN="ngTokenPath",ON=/\n/gm,PN="\u0275",jw="__source",ia;function kN(){return ia}function to(e){let t=ia;return ia=e,t}function LN(e,t=Ze.Default){if(ia===void 0)throw new Ge(-203,!1);return ia===null?Nb(e,void 0,t):ia.get(e,t&Ze.Optional?null:void 0,t)}function Xe(e,t=Ze.Default){return(Rb()||LN)(Pn(e),t)}function O(e,t=Ze.Default){return Xe(e,vd(t))}function vd(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Cm(e){let t=[];for(let r=0;r<e.length;r++){let n=Pn(e[r]);if(Array.isArray(n)){if(n.length===0)throw new Ge(900,!1);let i,s=Ze.Default;for(let o=0;o<n.length;o++){let a=n[o],l=FN(a);typeof l=="number"?l===-1?i=a.token:s|=l:i=a}t.push(Xe(i,s))}else t.push(Xe(n))}return t}function FN(e){return e[AN]}function BN(e,t,r,n){let i=e[Ku];throw t[jw]&&i.unshift(t[jw]),e.message=VN(`
5
+ `+e.message,i,r,n),e[MN]=i,e[Ku]=null,e}function VN(e,t,r,n=null){e=e&&e.charAt(0)===`
6
+ `&&e.charAt(1)==PN?e.slice(2):e;let i=fr(t);if(Array.isArray(t))i=t.map(fr).join(" -> ");else if(typeof t=="object"){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+(typeof a=="string"?JSON.stringify(a):fr(a)))}i=`{${s.join(", ")}}`}return`${r}${n?"("+n+")":""}[${i}]: ${e.replace(ON,`
7
+ `)}`}function Ho(e,t){return e.hasOwnProperty(Yu)?e[Yu]:null}function UN(e,t,r){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],s=t[n];if(r&&(i=r(i),s=r(s)),s!==i)return!1}return!0}function HN(e){return e.flat(Number.POSITIVE_INFINITY)}function Rg(e,t){e.forEach(r=>Array.isArray(r)?Rg(r,t):t(r))}function Ab(e,t,r){t>=e.length?e.push(r):e.splice(t,0,r)}function Zu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function jN(e,t,r,n){let i=e.length;if(i==t)e.push(r,n);else if(i===1)e.push(n,e[0]),e[0]=r;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=r,e[t+1]=n}}function $N(e,t,r){let n=Zc(e,t);return n>=0?e[n|1]=r:(n=~n,jN(e,n,t,r)),n}function cm(e,t){let r=Zc(e,t);if(r>=0)return e[r|1]}function Zc(e,t){return WN(e,t,1)}function WN(e,t,r){let n=0,i=e.length>>r;for(;i!==n;){let s=n+(i-n>>1),o=e[s<<r];if(t===o)return s<<r;o>t?i=s:n=s+1}return~(i<<r)}var jo={},io=[],Bc=new he(""),Mb=new he("",-1),Ob=new he(""),Xu=class{get(e,t=Fc){if(t===Fc){let r=new Error(`NullInjectorError: No provider for ${fr(e)}!`);throw r.name="NullInjectorError",r}return t}};function $o(e){return e[DN]||null}function Pb(e){return e[IN]||null}function kb(e){return e[TN]||null}function GN(e){let t=$o(e)||Pb(e)||kb(e);return t!==null&&t.standalone}function Lb(e){return{\u0275providers:e}}function zN(...e){return{\u0275providers:Fb(!0,e),\u0275fromNgModule:!0}}function Fb(e,...t){let r=[],n=new Set,i,s=o=>{r.push(o)};return Rg(t,o=>{let a=o;Sm(a,s,[],n)&&(i||=[],i.push(a))}),i!==void 0&&Bb(i,s),r}function Bb(e,t){for(let r=0;r<e.length;r++){let{ngModule:n,providers:i}=e[r];Ng(i,s=>{t(s,n)})}}function Sm(e,t,r,n){if(e=Pn(e),!e)return!1;let i=null,s=Vw(e),o=!s&&$o(e);if(!s&&!o){let l=e.ngModule;if(s=Vw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=n.has(i);if(o){if(a)return!1;if(n.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)Sm(c,t,r,n)}}else if(s){if(s.imports!=null&&!a){n.add(i);let c;try{Rg(s.imports,h=>{Sm(h,t,r,n)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Bb(c,t)}if(!a){let c=Ho(i)||(()=>new i);t({provide:i,useFactory:c,deps:io},i),t({provide:Ob,useValue:i,multi:!0},i),t({provide:Bc,useValue:()=>Xe(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Ng(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Ng(e,t){for(let r of e)xb(r)&&(r=r.\u0275providers),Array.isArray(r)?Ng(r,t):t(r)}var qN=Nt({provide:String,useValue:Nt});function Vb(e){return e!==null&&typeof e=="object"&&qN in e}function YN(e){return!!(e&&e.useExisting)}function KN(e){return!!(e&&e.useFactory)}function aa(e){return typeof e=="function"}function ZN(e){return!!e.useClass}var yd=new he(""),ju={},XN={},lm;function _d(){return lm===void 0&&(lm=new Xu),lm}var Gn=class{},Vc=class extends Gn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,r,n){super(),this.parent=t,this.source=r,this.scopes=n,Im(e,s=>this.processProvider(s)),this.records.set(Mb,ea(void 0,this)),n.has("environment")&&this.records.set(Gn,ea(void 0,this));let i=this.records.get(yd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Ob,io,Ze.Self))}destroy(){Oc(this),this._destroyed=!0;let e=$e(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of t)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),$e(e)}}onDestroy(e){return Oc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Oc(this);let t=to(this),r=Wn(void 0),n;try{return e()}finally{to(t),Wn(r)}}get(e,t=Fc,r=Ze.Default){if(Oc(this),e.hasOwnProperty(Hw))return e[Hw](this);r=vd(r);let n,i=to(this),s=Wn(void 0);try{if(!(r&Ze.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=nA(e)&&Tg(e);l&&this.injectableDefInScope(l)?a=ea(Dm(e),ju):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=r&Ze.Self?_d():this.parent;return t=r&Ze.Optional&&t===Fc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ku]=o[Ku]||[]).unshift(fr(e)),i)throw o;return BN(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),to(i)}}resolveInjectorInitializers(){let e=$e(null),t=to(this),r=Wn(void 0),n;try{let i=this.get(Bc,io,Ze.Self);for(let s of i)s()}finally{to(t),Wn(r),$e(e)}}toString(){let e=[],t=this.records;for(let r of t.keys())e.push(fr(r));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Pn(e);let t=aa(e)?e:Pn(e&&e.provide),r=QN(e);if(!aa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=ea(void 0,ju,!0),n.factory=()=>Cm(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,r)}hydrate(e,t){let r=$e(null);try{return t.value===ju&&(t.value=XN,t.value=t.factory()),typeof t.value=="object"&&t.value&&tA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{$e(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Pn(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 Dm(e){let t=Tg(e),r=t!==null?t.factory:Ho(e);if(r!==null)return r;if(e instanceof he)throw new Ge(204,!1);if(e instanceof Function)return JN(e);throw new Ge(204,!1)}function JN(e){if(e.length>0)throw new Ge(204,!1);let t=CN(e);return t!==null?()=>t.factory(e):()=>new e}function QN(e){if(Vb(e))return ea(void 0,e.useValue);{let t=Ub(e);return ea(t,ju)}}function Ub(e,t,r){let n;if(aa(e)){let i=Pn(e);return Ho(i)||Dm(i)}else if(Vb(e))n=()=>Pn(e.useValue);else if(KN(e))n=()=>e.useFactory(...Cm(e.deps||[]));else if(YN(e))n=()=>Xe(Pn(e.useExisting));else{let i=Pn(e&&(e.useClass||e.provide));if(eA(e))n=()=>new i(...Cm(e.deps));else return Ho(i)||Dm(i)}return n}function Oc(e){if(e.destroyed)throw new Ge(205,!1)}function ea(e,t,r=!1){return{factory:e,value:t,multi:r?[]:void 0}}function eA(e){return!!e.deps}function tA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function nA(e){return typeof e=="function"||typeof e=="object"&&e instanceof he}function Im(e,t){for(let r of e)Array.isArray(r)?Im(r,t):r&&xb(r)?Im(r.\u0275providers,t):t(r)}function Hb(e,t){e instanceof Vc&&Oc(e);let r,n=to(e),i=Wn(void 0);try{return t()}finally{to(n),Wn(i)}}function jb(){return Rb()!==void 0||kN()!=null}function $b(e){if(!jb())throw new Ge(-203,!1)}function rA(e){return typeof e=="function"}var Oi=0,Te=1,we=2,Tn=3,Nr=4,Or=5,Uc=6,Ju=7,nn=8,Hc=9,Di=10,rn=11,jc=12,$w=13,fa=14,Ar=15,Wo=16,ta=17,Ii=18,Ed=19,Wb=20,no=21,um=22,Qu=23,er=24,oa=25,on=26,Gb=1,Go=7,ed=8,ca=9,In=10;function ro(e){return Array.isArray(e)&&typeof e[Gb]=="object"}function Pi(e){return Array.isArray(e)&&e[Gb]===!0}function Ag(e){return(e.flags&4)!==0}function pa(e){return e.componentOffset>-1}function wd(e){return(e.flags&1)===1}function zr(e){return!!e.template}function td(e){return(e[we]&512)!==0}function Xc(e){return(e[we]&256)===256}var Tm=class{previousValue;currentValue;firstChange;constructor(e,t,r){this.previousValue=e,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}};function zb(e,t,r,n){t!==null?t.applyValueToInputSignal(t,n):e[r]=n}var Xo=(()=>{let e=()=>qb;return e.ngInherit=!0,e})();function qb(e){return e.type.prototype.ngOnChanges&&(e.setInput=oA),iA}function iA(){let e=Kb(this),t=e?.current;if(t){let r=e.previous;if(r===jo)e.previous=t;else for(let n in t)r[n]=t[n];e.current=null,this.ngOnChanges(t)}}function oA(e,t,r,n,i){let s=this.declaredInputs[n],o=Kb(e)||sA(e,{previous:jo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Tm(c&&c.currentValue,r,l===jo),zb(e,t,i,r)}var Yb="__ngSimpleChanges__";function Kb(e){return e[Yb]||null}function sA(e,t){return e[Yb]=t}var Ww=null,gt=function(e,t=null,r){Ww?.(e,t,r)},Zb="svg",aA="math";function qr(e){for(;Array.isArray(e);)e=e[Oi];return e}function Xb(e,t){return qr(t[e])}function Zr(e,t){return qr(t[e.index])}function Mg(e,t){return e.data[t]}function bd(e,t){return e[t]}function Yr(e,t){let r=t[e];return ro(r)?r:r[Oi]}function cA(e){return(e[we]&4)===4}function Og(e){return(e[we]&128)===128}function lA(e){return Pi(e[Tn])}function oo(e,t){return t==null?null:e[t]}function Jb(e){e[ta]=0}function Pg(e){e[we]&1024||(e[we]|=1024,Og(e)&&Jc(e))}function uA(e,t){for(;e>0;)t=t[fa],e--;return t}function Cd(e){return!!(e[we]&9216||e[er]?.dirty)}function xm(e){e[Di].changeDetectionScheduler?.notify(8),e[we]&64&&(e[we]|=1024),Cd(e)&&Jc(e)}function Jc(e){e[Di].changeDetectionScheduler?.notify(0);let t=zo(e);for(;t!==null&&!(t[we]&8192||(t[we]|=8192,!Og(t)));)t=zo(t)}function Qb(e,t){if(Xc(e))throw new Ge(911,!1);e[no]===null&&(e[no]=[]),e[no].push(t)}function dA(e,t){if(e[no]===null)return;let r=e[no].indexOf(t);r!==-1&&e[no].splice(r,1)}function zo(e){let t=e[Tn];return Pi(t)?t[Tn]:t}function eC(e){return e[Ju]??=[]}function tC(e){return e.cleanup??=[]}function fA(e,t,r,n){let i=eC(t);i.push(r),e.firstCreatePass&&tC(e).push(n,i.length-1)}var Re={lFrame:lC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Rm=!1;function pA(){return Re.lFrame.elementDepthCount}function hA(){Re.lFrame.elementDepthCount++}function mA(){Re.lFrame.elementDepthCount--}function kg(){return Re.bindingsEnabled}function gA(){return Re.skipHydrationRootTNode!==null}function vA(e){return Re.skipHydrationRootTNode===e}function yA(){Re.skipHydrationRootTNode=null}function Ne(){return Re.lFrame.lView}function Jt(){return Re.lFrame.tView}function It(e){return Re.lFrame.contextLView=e,e[nn]}function Tt(e){return Re.lFrame.contextLView=null,e}function tr(){let e=nC();for(;e!==null&&e.type===64;)e=e.parent;return e}function nC(){return Re.lFrame.currentTNode}function _A(){let e=Re.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function ao(e,t){let r=Re.lFrame;r.currentTNode=e,r.isParent=t}function Lg(){return Re.lFrame.isParent}function rC(){Re.lFrame.isParent=!1}function iC(){return Re.lFrame.contextLView}function oC(){return Rm}function Gw(e){let t=Rm;return Rm=e,t}function Qc(){let e=Re.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function EA(e){return Re.lFrame.bindingIndex=e}function el(){return Re.lFrame.bindingIndex++}function wA(e){let t=Re.lFrame,r=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,r}function bA(){return Re.lFrame.inI18n}function CA(e,t){let r=Re.lFrame;r.bindingIndex=r.bindingRootIndex=e,Nm(t)}function SA(){return Re.lFrame.currentDirectiveIndex}function Nm(e){Re.lFrame.currentDirectiveIndex=e}function DA(e){let t=Re.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function sC(){return Re.lFrame.currentQueryIndex}function Fg(e){Re.lFrame.currentQueryIndex=e}function IA(e){let t=e[Te];return t.type===2?t.declTNode:t.type===1?e[Or]:null}function aC(e,t,r){if(r&Ze.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(r&Ze.Host))&&(i=IA(s),!(i===null||(s=s[fa],i.type&10))););if(i===null)return!1;t=i,e=s}let n=Re.lFrame=cC();return n.currentTNode=t,n.lView=e,!0}function Bg(e){let t=cC(),r=e[Te];Re.lFrame=t,t.currentTNode=r.firstChild,t.lView=e,t.tView=r,t.contextLView=e,t.bindingIndex=r.bindingStartIndex,t.inI18n=!1}function cC(){let e=Re.lFrame,t=e===null?null:e.child;return t===null?lC(e):t}function lC(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 uC(){let e=Re.lFrame;return Re.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var dC=uC;function Vg(){let e=uC();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 TA(e){return(Re.lFrame.contextLView=uA(e,Re.lFrame.contextLView))[nn]}function co(){return Re.lFrame.selectedIndex}function qo(e){Re.lFrame.selectedIndex=e}function Ug(){let e=Re.lFrame;return Mg(e.tView,e.selectedIndex)}function hr(){Re.lFrame.currentNamespace=Zb}function Jo(){xA()}function xA(){Re.lFrame.currentNamespace=null}function RA(){return Re.lFrame.currentNamespace}var fC=!0;function Sd(){return fC}function Dd(e){fC=e}function NA(e,t,r){let{ngOnChanges:n,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(n){let o=qb(t);(r.preOrderHooks??=[]).push(e,o),(r.preOrderCheckHooks??=[]).push(e,o)}i&&(r.preOrderHooks??=[]).push(0-e,i),s&&((r.preOrderHooks??=[]).push(e,s),(r.preOrderCheckHooks??=[]).push(e,s))}function Hg(e,t){for(let r=t.directiveStart,n=t.directiveEnd;r<n;r++){let i=e.data[r].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-r,s),o&&((e.contentHooks??=[]).push(r,o),(e.contentCheckHooks??=[]).push(r,o)),a&&(e.viewHooks??=[]).push(-r,a),l&&((e.viewHooks??=[]).push(r,l),(e.viewCheckHooks??=[]).push(r,l)),c!=null&&(e.destroyHooks??=[]).push(r,c)}}function $u(e,t,r){pC(e,t,3,r)}function Wu(e,t,r,n){(e[we]&3)===r&&pC(e,t,r,n)}function dm(e,t){let r=e[we];(r&3)===t&&(r&=16383,r+=1,e[we]=r)}function pC(e,t,r,n){let i=n!==void 0?e[ta]&65535:0,s=n??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],n!=null&&a>=n)break}else t[l]<0&&(e[ta]+=65536),(a<s||s==-1)&&(AA(e,r,t,l),e[ta]=(e[ta]&4294901760)+l+2),l++}function zw(e,t){gt(4,e,t);let r=$e(null);try{t.call(e)}finally{$e(r),gt(5,e,t)}}function AA(e,t,r,n){let i=r[n]<0,s=r[n+1],o=i?-r[n]:r[n],a=e[o];i?e[we]>>14<e[ta]>>16&&(e[we]&3)===t&&(e[we]+=16384,zw(a,s)):zw(a,s)}var sa=-1,Yo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,r){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=r}};function MA(e){return e instanceof Yo}function OA(e){return(e.flags&8)!==0}function PA(e){return(e.flags&16)!==0}function kA(e,t,r){let n=0;for(;n<r.length;){let i=r[n];if(typeof i=="number"){if(i!==0)break;n++;let s=r[n++],o=r[n++],a=r[n++];e.setAttribute(t,o,a,s)}else{let s=i,o=r[++n];FA(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),n++}}return n}function LA(e){return e===3||e===4||e===6}function FA(e){return e.charCodeAt(0)===64}function la(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let r=-1;for(let n=0;n<t.length;n++){let i=t[n];typeof i=="number"?r=i:r===0||(r===-1||r===2?qw(e,r,i,null,t[++n]):qw(e,r,i,null,null))}}return e}function qw(e,t,r,n,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===r){if(n===null){i!==null&&(e[s+1]=i);return}else if(n===e[s+1]){e[s+2]=i;return}}s++,n!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,r),n!==null&&e.splice(s++,0,n),i!==null&&e.splice(s++,0,i)}var fm={},Am=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,r){r=vd(r);let n=this.injector.get(e,fm,r);return n!==fm||t===fm?n:this.parentInjector.get(e,t,r)}};function hC(e){return e!==sa}function nd(e){return e&32767}function BA(e){return e>>16}function rd(e,t){let r=BA(e),n=t;for(;r>0;)n=n[fa],r--;return n}var Mm=!0;function id(e){let t=Mm;return Mm=e,t}var VA=256,mC=VA-1,gC=5,UA=0,Gr={};function HA(e,t,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(kc)&&(n=r[kc]),n==null&&(n=r[kc]=UA++);let i=n&mC,s=1<<i;t.data[e+(i>>gC)]|=s}function od(e,t){let r=vC(e,t);if(r!==-1)return r;let n=t[Te];n.firstCreatePass&&(e.injectorIndex=t.length,pm(n.data,e),pm(t,null),pm(n.blueprint,null));let i=jg(e,t),s=e.injectorIndex;if(hC(i)){let o=nd(i),a=rd(i,t),l=a[Te].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function pm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function vC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function jg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let r=0,n=null,i=t;for(;i!==null;){if(n=bC(i),n===null)return sa;if(r++,i=i[fa],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return sa}function Om(e,t,r){HA(e,t,r)}function yC(e,t,r){if(r&Ze.Optional||e!==void 0)return e;xg(t,"NodeInjector")}function _C(e,t,r,n){if(r&Ze.Optional&&n===void 0&&(n=null),(r&(Ze.Self|Ze.Host))===0){let i=e[Hc],s=Wn(void 0);try{return i?i.get(t,n,r&Ze.Optional):Nb(t,n,r&Ze.Optional)}finally{Wn(s)}}return yC(n,t,r)}function EC(e,t,r,n=Ze.Default,i){if(e!==null){if(t[we]&2048&&!(n&Ze.Self)){let o=GA(e,t,r,n,Gr);if(o!==Gr)return o}let s=wC(e,t,r,n,Gr);if(s!==Gr)return s}return _C(t,r,n,i)}function wC(e,t,r,n,i){let s=$A(r);if(typeof s=="function"){if(!aC(t,e,n))return n&Ze.Host?yC(i,r,n):_C(t,r,n,i);try{let o;if(o=s(n),o==null&&!(n&Ze.Optional))xg(r);else return o}finally{dC()}}else if(typeof s=="number"){let o=null,a=vC(e,t),l=sa,c=n&Ze.Host?t[Ar][Or]:null;for((a===-1||n&Ze.SkipSelf)&&(l=a===-1?jg(e,t):t[a+8],l===sa||!Kw(n,!1)?a=-1:(o=t[Te],a=nd(l),t=rd(l,t)));a!==-1;){let h=t[Te];if(Yw(s,a,h.data)){let d=jA(a,t,r,o,n,c);if(d!==Gr)return d}l=t[a+8],l!==sa&&Kw(n,t[Te].data[a+8]===c)&&Yw(s,a,t)?(o=h,a=nd(l),t=rd(l,t)):a=-1}}return i}function jA(e,t,r,n,i,s){let o=t[Te],a=o.data[e+8],l=n==null?pa(a)&&Mm:n!=o&&(a.type&3)!==0,c=i&Ze.Host&&s===a,h=Gu(a,o,r,l,c);return h!==null?$c(t,o,h,a):Gr}function Gu(e,t,r,n,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=n?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&r===m||g>=l&&m.type===r)return g}if(i){let g=o[l];if(g&&zr(g)&&g.type===r)return l}return null}function $c(e,t,r,n){let i=e[r],s=t.data;if(MA(i)){let o=i;o.resolving&&RN(xN(s[r]));let a=id(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=aC(e,n,Ze.Default);try{i=e[r]=o.factory(void 0,s,e,n),t.firstCreatePass&&r>=n.directiveStart&&NA(r,s[r],t)}finally{c!==null&&Wn(c),id(a),o.resolving=!1,dC()}}return i}function $A(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(kc)?e[kc]:void 0;return typeof t=="number"?t>=0?t&mC:WA:t}function Yw(e,t,r){let n=1<<e;return!!(r[t+(e>>gC)]&n)}function Kw(e,t){return!(e&Ze.Self)&&!(e&Ze.Host&&t)}var Uo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,r){return EC(this._tNode,this._lView,e,vd(r),t)}};function WA(){return new Uo(tr(),Ne())}function Id(e){return Dg(()=>{let t=e.prototype.constructor,r=t[Yu]||Pm(t),n=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==n;){let s=i[Yu]||Pm(i);if(s&&s!==r)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Pm(e){return Db(e)?()=>{let t=Pm(Pn(e));return t&&t()}:Ho(e)}function GA(e,t,r,n,i){let s=e,o=t;for(;s!==null&&o!==null&&o[we]&2048&&!td(o);){let a=wC(s,o,r,n|Ze.Self,Gr);if(a!==Gr)return a;let l=s.parent;if(!l){let c=o[Wb];if(c){let h=c.get(r,Gr,n);if(h!==Gr)return h}l=bC(o),o=o[fa]}s=l}return i}function bC(e){let t=e[Te],r=t.type;return r===2?t.declTNode:r===1?e[Or]:null}function Zw(e,t=null,r=null,n){let i=zA(e,t,r,n);return i.resolveInjectorInitializers(),i}function zA(e,t=null,r=null,n,i=new Set){let s=[r||io,zN(e)];return n=n||(typeof e=="object"?void 0:fr(e)),new Vc(s,t||_d(),n||null,i)}var vt=class ET{static THROW_IF_NOT_FOUND=Fc;static NULL=new Xu;static create(t,r){if(Array.isArray(t))return Zw({name:""},r,t,"");{let n=t.name??"";return Zw({name:n},t.parent,t.providers,n)}}static \u0275prov=oe({token:ET,providedIn:"any",factory:()=>Xe(Mb)});static __NG_ELEMENT_ID__=-1},qA=new he("");qA.__NG_ELEMENT_ID__=e=>{let t=tr();if(t===null)throw new Ge(204,!1);if(t.type&2)return t.value;if(e&Ze.Optional)return null;throw new Ge(204,!1)};var CC=!1,$g=(()=>{class e{static __NG_ELEMENT_ID__=YA;static __NG_ENV_ID__=r=>r}return e})(),km=class extends $g{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return Qb(this._lView,e),()=>dA(this._lView,e)}};function YA(){return new km(Ne())}var Ti=class{},Td=new he("",{providedIn:"root",factory:()=>!1}),SC=new he(""),Wg=new he(""),xd=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Tr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let r=this.taskId++;return this.pendingTasks.add(r),r}has(r){return this.pendingTasks.has(r)}remove(r){this.pendingTasks.delete(r),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Lm=class extends ie{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,jb()&&(this.destroyRef=O($g,{optional:!0})??void 0,this.pendingTasks=O(xd,{optional:!0})??void 0)}emit(e){let t=$e(null);try{super.next(e)}finally{$e(t)}}subscribe(e,t,r){let n=e,i=t||(()=>null),s=r;if(e&&typeof e=="object"){let a=e;n=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),n&&(n=this.wrapInTimeout(n)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:n,error:i,complete:s});return e instanceof dt&&e.add(o),o}wrapInTimeout(e){return t=>{let r=this.pendingTasks?.add();setTimeout(()=>{e(t),r!==void 0&&this.pendingTasks?.remove(r)})}}},We=Lm;function sd(...e){}function DC(e){let t,r;function n(){e=sd;try{r!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(r),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),n()}),typeof requestAnimationFrame=="function"&&(r=requestAnimationFrame(()=>{e(),n()})),()=>n()}function Xw(e){return queueMicrotask(()=>e()),()=>{e=sd}}var Gg="isAngularZone",ad=Gg+"_ID",KA=0,Ve=class jh{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new We(!1);onMicrotaskEmpty=new We(!1);onStable=new We(!1);onError=new We(!1);constructor(t){let{enableLongStackTrace:r=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=CC}=t;if(typeof Zone>"u")throw new Ge(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&n,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,JA(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Gg)===!0}static assertInAngularZone(){if(!jh.isInAngularZone())throw new Ge(909,!1)}static assertNotInAngularZone(){if(jh.isInAngularZone())throw new Ge(909,!1)}run(t,r,n){return this._inner.run(t,r,n)}runTask(t,r,n,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,ZA,sd,sd);try{return s.runTask(o,r,n)}finally{s.cancelTask(o)}}runGuarded(t,r,n){return this._inner.runGuarded(t,r,n)}runOutsideAngular(t){return this._outer.run(t)}},ZA={};function zg(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 XA(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){DC(()=>{e.callbackScheduled=!1,Fm(e),e.isCheckStableRunning=!0,zg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Fm(e)}function JA(e){let t=()=>{XA(e)},r=KA++;e._inner=e._inner.fork({name:"angular",properties:{[Gg]:!0,[ad]:r,[ad+r]:!0},onInvokeTask:(n,i,s,o,a,l)=>{if(QA(l))return n.invokeTask(s,o,a,l);try{return Jw(e),n.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),Qw(e)}},onInvoke:(n,i,s,o,a,l,c)=>{try{return Jw(e),n.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!eM(l)&&t(),Qw(e)}},onHasTask:(n,i,s,o)=>{n.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Fm(e),zg(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,i,s,o)=>(n.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Fm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Jw(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Qw(e){e._nesting--,zg(e)}var cd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new We;onMicrotaskEmpty=new We;onStable=new We;onError=new We;run(e,t,r){return e.apply(t,r)}runGuarded(e,t,r){return e.apply(t,r)}runOutsideAngular(e){return e()}runTask(e,t,r,n){return e.apply(t,r)}};function QA(e){return IC(e,"__ignore_ng_zone__")}function eM(e){return IC(e,"__scheduler_tick__")}function IC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var xi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},tM=new he("",{providedIn:"root",factory:()=>{let e=O(Ve),t=O(xi);return r=>e.runOutsideAngular(()=>t.handleError(r))}});function nM(){return ha(tr(),Ne())}function ha(e,t){return new Ot(Zr(e,t))}var Ot=(()=>{class e{nativeElement;constructor(r){this.nativeElement=r}static __NG_ELEMENT_ID__=nM}return e})();function rM(e){return e instanceof Ot?e.nativeElement:e}function ki(e,t){let r=sw(e),n=r[Ci];return t?.equal&&(n.equal=t.equal),r.set=i=>Kh(n,i),r.update=i=>aw(n,i),r.asReadonly=iM.bind(r),r}function iM(){let e=this[Ci];if(e.readonlyFn===void 0){let t=()=>this();t[Ci]=e,e.readonlyFn=t}return e.readonlyFn}function oM(){return this._results[Symbol.iterator]()}var Bm=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 ie}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 r=HN(e);(this._changesDetected=!UN(this._results,r,t))&&(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]=oM};function TC(e){return(e.flags&128)===128}var xC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(xC||{}),RC=new Map,sM=0;function aM(){return sM++}function cM(e){RC.set(e[Ed],e)}function Vm(e){RC.delete(e[Ed])}var eb="__ngContext__";function ma(e,t){ro(t)?(e[eb]=t[Ed],cM(t)):e[eb]=t}function NC(e){return MC(e[jc])}function AC(e){return MC(e[Nr])}function MC(e){for(;e!==null&&!Pi(e);)e=e[Nr];return e}var Um;function OC(e){Um=e}function PC(){if(Um!==void 0)return Um;if(typeof document<"u")return document;throw new Ge(210,!1)}var tl=new he("",{providedIn:"root",factory:()=>lM}),lM="ng",qg=new he(""),Qo=new he("",{providedIn:"platform",factory:()=>"unknown"}),kC=new he(""),Yg=new he("",{providedIn:"root",factory:()=>PC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),uM="h",dM="b",LC=!1,fM=new he("",{providedIn:"root",factory:()=>LC}),Kg=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(Kg||{}),ga=new he(""),tb=new Set;function lo(e){tb.has(e)||(tb.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var FC=(()=>{class e{view;node;constructor(r,n){this.view=r,this.node=n}static __NG_ELEMENT_ID__=pM}return e})();function pM(){return new FC(Ne(),tr())}var na=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(na||{}),BC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),hM=[na.EarlyRead,na.Write,na.MixedReadWrite,na.Read],mM=(()=>{class e{ngZone=O(Ve);scheduler=O(Ti);errorHandler=O(xi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(ga,{optional:!0})}execute(){let r=this.sequences.size>0;r&&gt(16),this.executing=!0;for(let n of hM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[n]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[n];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),r&&gt(17)}register(r){let{view:n}=r;n!==void 0?((n[oa]??=[]).push(r),Jc(n),n[we]|=8192):this.executing?this.deferredRegistrations.add(r):this.addSequence(r)}addSequence(r){this.sequences.add(r),this.scheduler.notify(7)}unregister(r){this.executing&&this.sequences.has(r)?(r.erroredOrDestroyed=!0,r.pipelinedValue=void 0,r.once=!0):(this.sequences.delete(r),this.deferredRegistrations.delete(r))}maybeTrace(r,n){return n?n.run(Kg.AFTER_NEXT_RENDER,r):r()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Hm=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,r,n,i,s=null){this.impl=e,this.hooks=t,this.view=r,this.once=n,this.snapshot=s,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?.[oa];e&&(this.view[oa]=e.filter(t=>t!==this))}};function Zg(e,t){!t?.injector&&$b(Zg);let r=t?.injector??O(vt);return lo("NgAfterRender"),VC(e,r,t,!1)}function Xr(e,t){!t?.injector&&$b(Xr);let r=t?.injector??O(vt);return lo("NgAfterNextRender"),VC(e,r,t,!0)}function gM(e,t){if(e instanceof Function){let r=[void 0,void 0,void 0,void 0];return r[t]=e,r}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function VC(e,t,r,n){let i=t.get(BC);i.impl??=t.get(mM);let s=t.get(ga,null,{optional:!0}),o=r?.phase??na.MixedReadWrite,a=r?.manualCleanup!==!0?t.get($g):null,l=t.get(FC,null,{optional:!0}),c=new Hm(i.impl,gM(e,o),l?.view,n,a,s?.snapshot(null));return i.impl.register(c),c}var vM=()=>null;function UC(e,t,r=!1){return vM(e,t,r)}function HC(e,t){let r=e.contentQueries;if(r!==null){let n=$e(null);try{for(let i=0;i<r.length;i+=2){let s=r[i],o=r[i+1];if(o!==-1){let a=e.data[o];Fg(s),a.contentQueries(2,t[o],o)}}}finally{$e(n)}}}function jm(e,t,r){Fg(0);let n=$e(null);try{t(e,r)}finally{$e(n)}}function Xg(e,t,r){if(Ag(t)){let n=$e(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=r[o];a.contentQueries(1,l,o)}}}finally{$e(n)}}}var Kr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Kr||{}),Bu;function yM(){if(Bu===void 0&&(Bu=null,Lc.trustedTypes))try{Bu=Lc.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Bu}function Rd(e){return yM()?.createHTML(e)||e}var Vu;function _M(){if(Vu===void 0&&(Vu=null,Lc.trustedTypes))try{Vu=Lc.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Vu}function nb(e){return _M()?.createHTML(e)||e}var Ri=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Sb})`}},$m=class extends Ri{getTypeName(){return"HTML"}},Wm=class extends Ri{getTypeName(){return"Style"}},Gm=class extends Ri{getTypeName(){return"Script"}},zm=class extends Ri{getTypeName(){return"URL"}},qm=class extends Ri{getTypeName(){return"ResourceURL"}};function Jr(e){return e instanceof Ri?e.changingThisBreaksApplicationSecurity:e}function uo(e,t){let r=EM(e);if(r!=null&&r!==t){if(r==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${r} (see ${Sb})`)}return r===t}function EM(e){return e instanceof Ri&&e.getTypeName()||null}function jC(e){return new $m(e)}function $C(e){return new Wm(e)}function WC(e){return new Gm(e)}function GC(e){return new zm(e)}function zC(e){return new qm(e)}function wM(e){let t=new Km(e);return bM()?new Ym(t):t}var Ym=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(Rd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Km=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=Rd(e),t}};function bM(){try{return!!new window.DOMParser().parseFromString(Rd(""),"text/html")}catch{return!1}}var CM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Nd(e){return e=String(e),e.match(CM)?e:"unsafe:"+e}function Li(e){let t={};for(let r of e.split(","))t[r]=!0;return t}function nl(...e){let t={};for(let r of e)for(let n in r)r.hasOwnProperty(n)&&(t[n]=!0);return t}var qC=Li("area,br,col,hr,img,wbr"),YC=Li("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),KC=Li("rp,rt"),SM=nl(KC,YC),DM=nl(YC,Li("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")),IM=nl(KC,Li("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")),rb=nl(qC,DM,IM,SM),ZC=Li("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),TM=Li("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"),xM=Li("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"),RM=nl(ZC,TM,xM),NM=Li("script,style,template"),Zm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,r=!0,n=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild){n.push(t),t=OM(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=MM(t);if(i){t=i;break}t=n.pop()}}return this.buf.join("")}startElement(e){let t=ib(e).toLowerCase();if(!rb.hasOwnProperty(t))return this.sanitizedSomething=!0,!NM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let r=e.attributes;for(let n=0;n<r.length;n++){let i=r.item(n),s=i.name,o=s.toLowerCase();if(!RM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;ZC[o]&&(a=Nd(a)),this.buf.push(" ",s,'="',ob(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=ib(e).toLowerCase();rb.hasOwnProperty(t)&&!qC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(ob(e))}};function AM(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function MM(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw XC(t);return t}function OM(e){let t=e.firstChild;if(t&&AM(e,t))throw XC(t);return t}function ib(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function XC(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var PM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,kM=/([^\#-~ |!])/g;function ob(e){return e.replace(/&/g,"&amp;").replace(PM,function(t){let r=t.charCodeAt(0),n=t.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(kM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Uu;function Jg(e,t){let r=null;try{Uu=Uu||wM(e);let n=t?String(t):"";r=Uu.getInertBodyElement(n);let i=5,s=n;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,n=s,s=r.innerHTML,r=Uu.getInertBodyElement(n)}while(n!==s);let o=new Zm().sanitizeChildren(sb(r)||r);return Rd(o)}finally{if(r){let n=sb(r)||r;for(;n.firstChild;)n.firstChild.remove()}}}function sb(e){return"content"in e&&LM(e)?e.content:null}function LM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var Qr=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}(Qr||{});function Pr(e){let t=JC();return t?nb(t.sanitize(Qr.HTML,e)||""):uo(e,"HTML")?nb(Jr(e)):Jg(PC(),Kc(e))}function fn(e){let t=JC();return t?t.sanitize(Qr.URL,e)||"":uo(e,"URL")?Jr(e):Nd(Kc(e))}function JC(){let e=Ne();return e&&e[Di].sanitizer}var FM=/^>|^->|<!--|-->|--!>|<!-$/g,BM=/(<|>)/g,VM="\u200B$1\u200B";function UM(e){return e.replace(FM,t=>t.replace(BM,VM))}function QC(e){return e.ownerDocument.defaultView}function HM(e,t,r){let n=e.length;for(;;){let i=e.indexOf(t,r);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===n||e.charCodeAt(i+s)<=32)return i}r=i+1}}var eS="ng-template";function jM(e,t,r,n){let i=0;if(n){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&HM(t[i+1].toLowerCase(),r,0)!==-1)return!0}else if(Qg(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===r)return!0}return!1}function Qg(e){return e.type===4&&e.value!==eS}function $M(e,t,r){let n=e.type===4&&!r?eS:e.value;return t===n}function WM(e,t,r){let n=4,i=e.attrs,s=i!==null?qM(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Rr(n)&&!Rr(l))return!1;if(o&&Rr(l))continue;o=!1,n=l|n&1;continue}if(!o)if(n&4){if(n=2|n&1,l!==""&&!$M(e,l,r)||l===""&&t.length===1){if(Rr(n))return!1;o=!0}}else if(n&8){if(i===null||!jM(e,i,l,r)){if(Rr(n))return!1;o=!0}}else{let c=t[++a],h=GM(l,i,Qg(e),r);if(h===-1){if(Rr(n))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),n&2&&c!==d){if(Rr(n))return!1;o=!0}}}}return Rr(n)||o}function Rr(e){return(e&1)===0}function GM(e,t,r,n){if(t===null)return-1;let i=0;if(n||!r){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return YM(t,e)}function zM(e,t,r=!1){for(let n=0;n<t.length;n++)if(WM(e,t[n],r))return!0;return!1}function qM(e){for(let t=0;t<e.length;t++){let r=e[t];if(LA(r))return t}return e.length}function YM(e,t){let r=e.indexOf(4);if(r>-1)for(r++;r<e.length;){let n=e[r];if(typeof n=="number")return-1;if(n===t)return r;r++}return-1}function ab(e,t){return e?":not("+t.trim()+")":t}function KM(e){let t=e[0],r=1,n=2,i="",s=!1;for(;r<e.length;){let o=e[r];if(typeof o=="string")if(n&2){let a=e[++r];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else n&8?i+="."+o:n&4&&(i+=" "+o);else i!==""&&!Rr(o)&&(t+=ab(s,i),i=""),n=o,s=s||!Rr(n);r++}return i!==""&&(t+=ab(s,i)),t}function ZM(e){return e.map(KM).join(",")}function XM(e){let t=[],r=[],n=1,i=2;for(;n<e.length;){let s=e[n];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++n]):i===8&&r.push(s);else{if(!Rr(i))break;i=s}n++}return r.length&&t.push(1,...r),t}var ei={};function JM(e,t){return e.createText(t)}function QM(e,t,r){e.setValue(t,r)}function eO(e,t){return e.createComment(UM(t))}function tS(e,t,r){return e.createElement(t,r)}function ld(e,t,r,n,i){e.insertBefore(t,r,n,i)}function nS(e,t,r){e.appendChild(t,r)}function cb(e,t,r,n,i){n!==null?ld(e,t,r,n,i):nS(e,t,r)}function tO(e,t,r){e.removeChild(null,t,r)}function nO(e,t,r){e.setAttribute(t,"style",r)}function rO(e,t,r){r===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",r)}function rS(e,t,r){let{mergedAttrs:n,classes:i,styles:s}=r;n!==null&&kA(e,t,n),i!==null&&rO(e,t,i),s!==null&&nO(e,t,s)}function ev(e,t,r,n,i,s,o,a,l,c,h){let d=on+n,f=d+i,g=iO(d,f),m=typeof c=="function"?c():c;return g[Te]={type:e,blueprint:g,template:r,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,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 s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function iO(e,t){let r=[];for(let n=0;n<t;n++)r.push(n<e?null:ei);return r}function oO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=ev(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function tv(e,t,r,n,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[Oi]=i,d[we]=n|4|128|8|64|1024,(c!==null||e&&e[we]&2048)&&(d[we]|=2048),Jb(d),d[Tn]=d[fa]=e,d[nn]=r,d[Di]=o||e&&e[Di],d[rn]=a||e&&e[rn],d[Hc]=l||e&&e[Hc]||null,d[Or]=s,d[Ed]=aM(),d[Uc]=h,d[Wb]=c,d[Ar]=t.type==2?e[Ar]:d,d}function sO(e,t,r){let n=Zr(t,e),i=oO(r),s=e[Di].rendererFactory,o=nv(e,tv(e,i,null,iS(r),n,t,null,s.createRenderer(n,r),null,null,null));return e[t.index]=o}function iS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function oS(e,t,r,n){if(r===0)return-1;let i=t.length;for(let s=0;s<r;s++)t.push(n),e.blueprint.push(n),e.data.push(null);return i}function nv(e,t){return e[jc]?e[$w][Nr]=t:e[jc]=t,e[$w]=t,t}function Y(e=1){sS(Jt(),Ne(),co()+e,!1)}function sS(e,t,r,n){if(!n)if((t[we]&3)===3){let i=e.preOrderCheckHooks;i!==null&&$u(t,i,r)}else{let i=e.preOrderHooks;i!==null&&Wu(t,i,0,r)}qo(r)}var Ad=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Ad||{});function Xm(e,t,r,n){let i=$e(null);try{let[s,o,a]=e.inputs[r],l=null;(o&Ad.SignalBased)!==0&&(l=t[s][Ci]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):a!==null&&(n=a.call(t,n)),e.setInput!==null?e.setInput(t,l,n,r,s):zb(t,l,s,n)}finally{$e(i)}}function aS(e,t,r,n,i){let s=co(),o=n&2;try{qo(-1),o&&t.length>on&&sS(e,t,on,!1),gt(o?2:0,i),r(n,i)}finally{qo(s),gt(o?3:1,i)}}function Md(e,t,r){fO(e,t,r),(r.flags&64)===64&&pO(e,t,r)}function rv(e,t,r=Zr){let n=t.localNames;if(n!==null){let i=t.index+1;for(let s=0;s<n.length;s+=2){let o=n[s+1],a=o===-1?r(t,e):e[o];e[i++]=a}}}function aO(e,t,r,n){let i=n.get(fM,LC)||r===Kr.ShadowDom,s=e.selectRootElement(t,i);return cO(s),s}function cO(e){lO(e)}var lO=()=>null;function uO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function cS(e,t,r,n,i,s,o,a){if(!a&&ov(t,e,r,n,i)){pa(t)&&dO(r,t.index);return}if(t.type&3){let l=Zr(t,r);n=uO(n),i=o!=null?o(i,t.value||"",n):i,s.setProperty(l,n,i)}else t.type&12}function dO(e,t){let r=Yr(t,e);r[we]&16||(r[we]|=64)}function fO(e,t,r){let n=r.directiveStart,i=r.directiveEnd;pa(r)&&sO(t,r,e.data[n+r.componentOffset]),e.firstCreatePass||od(r,t);let s=r.initialInputs;for(let o=n;o<i;o++){let a=e.data[o],l=$c(t,e,o,r);if(ma(l,t),s!==null&&vO(t,o-n,l,a,r,s),zr(a)){let c=Yr(r.index,t);c[nn]=$c(t,e,o,r)}}}function pO(e,t,r){let n=r.directiveStart,i=r.directiveEnd,s=r.index,o=SA();try{qo(s);for(let a=n;a<i;a++){let l=e.data[a],c=t[a];Nm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&hO(l,c)}}finally{qo(-1),Nm(o)}}function hO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function iv(e,t){let r=e.directiveRegistry,n=null;if(r)for(let i=0;i<r.length;i++){let s=r[i];zM(t,s.selectors,!1)&&(n??=[],zr(s)?n.unshift(s):n.push(s))}return n}function mO(e,t,r,n,i,s){let o=Zr(e,t);gO(t[rn],o,s,e.value,r,n,i)}function gO(e,t,r,n,i,s,o){if(s==null)e.removeAttribute(t,i,r);else{let a=o==null?Kc(s):o(s,n||"",i);e.setAttribute(t,i,a,r)}}function vO(e,t,r,n,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];Xm(n,r,l,c)}}function lS(e,t){let r=e[Hc],n=r?r.get(xi,null):null;n&&n.handleError(t)}function ov(e,t,r,n,i){let s=e.inputs?.[n],o=e.hostDirectiveInputs?.[n],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];Xm(d,r[c],h,i),a=!0}if(s)for(let l of s){let c=r[l],h=t.data[l];Xm(h,c,n,i),a=!0}return a}function yO(e,t){let r=Yr(t,e),n=r[Te];_O(n,r);let i=r[Oi];i!==null&&r[Uc]===null&&(r[Uc]=UC(i,r[Hc])),gt(18),sv(n,r,r[nn]),gt(19,r[nn])}function _O(e,t){for(let r=t.length;r<e.blueprint.length;r++)t.push(e.blueprint[r])}function sv(e,t,r){Bg(t);try{let n=e.viewQuery;n!==null&&jm(1,n,r);let i=e.template;i!==null&&aS(e,t,i,1,r),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ii]?.finishViewCreation(e),e.staticContentQueries&&HC(e,t),e.staticViewQueries&&jm(2,e.viewQuery,r);let s=e.components;s!==null&&EO(t,s)}catch(n){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),n}finally{t[we]&=-5,Vg()}}function EO(e,t){for(let r=0;r<t.length;r++)yO(e,t[r])}function Od(e,t,r,n){let i=$e(null);try{let s=t.tView,o=e[we]&4096?4096:16,a=tv(e,s,r,o,null,t,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),l=e[t.index];a[Wo]=l;let c=e[Ii];return c!==null&&(a[Ii]=c.createEmbeddedView(s)),sv(s,a,r),a}finally{$e(i)}}function Wc(e,t){return!t||t.firstChild===null||TC(e)}var wO;function av(e,t){return wO(e,t)}var Ni=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Ni||{});function uS(e){return(e.flags&32)===32}function ra(e,t,r,n,i){if(n!=null){let s,o=!1;Pi(n)?s=n:ro(n)&&(o=!0,n=n[Oi]);let a=qr(n);e===0&&r!==null?i==null?nS(t,r,a):ld(t,r,a,i||null,!0):e===1&&r!==null?ld(t,r,a,i||null,!0):e===2?tO(t,a,o):e===3&&t.destroyNode(a),s!=null&&OO(t,e,s,r,i)}}function bO(e,t){dS(e,t),t[Oi]=null,t[Or]=null}function CO(e,t,r,n,i,s){n[Oi]=i,n[Or]=t,Ld(e,n,r,1,i,s)}function dS(e,t){t[Di].changeDetectionScheduler?.notify(9),Ld(e,t,t[rn],2,null,null)}function SO(e){let t=e[jc];if(!t)return hm(e[Te],e);for(;t;){let r=null;if(ro(t))r=t[jc];else{let n=t[In];n&&(r=n)}if(!r){for(;t&&!t[Nr]&&t!==e;)ro(t)&&hm(t[Te],t),t=t[Tn];t===null&&(t=e),ro(t)&&hm(t[Te],t),r=t&&t[Nr]}t=r}}function cv(e,t){let r=e[ca],n=r.indexOf(t);r.splice(n,1)}function Pd(e,t){if(Xc(t))return;let r=t[rn];r.destroyNode&&Ld(e,t,r,3,null,null),SO(t)}function hm(e,t){if(Xc(t))return;let r=$e(null);try{t[we]&=-129,t[we]|=256,t[er]&&Yh(t[er]),IO(e,t),DO(e,t),t[Te].type===1&&t[rn].destroy();let n=t[Wo];if(n!==null&&Pi(t[Tn])){n!==t[Tn]&&cv(n,t);let i=t[Ii];i!==null&&i.detachView(e)}Vm(t)}finally{$e(r)}}function DO(e,t){let r=e.cleanup,n=t[Ju];if(r!==null)for(let o=0;o<r.length-1;o+=2)if(typeof r[o]=="string"){let a=r[o+3];a>=0?n[a]():n[-a].unsubscribe(),o+=2}else{let a=n[r[o+1]];r[o].call(a)}n!==null&&(t[Ju]=null);let i=t[no];if(i!==null){t[no]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[Qu];if(s!==null){t[Qu]=null;for(let o of s)o.destroy()}}function IO(e,t){let r;if(e!=null&&(r=e.destroyHooks)!=null)for(let n=0;n<r.length;n+=2){let i=t[r[n]];if(!(i instanceof Yo)){let s=r[n+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];gt(4,a,l);try{l.call(a)}finally{gt(5,a,l)}}else{gt(4,i,s);try{s.call(i)}finally{gt(5,i,s)}}}}}function TO(e,t,r){return xO(e,t.parent,r)}function xO(e,t,r){let n=t;for(;n!==null&&n.type&168;)t=n,n=t.parent;if(n===null)return r[Oi];if(pa(n)){let{encapsulation:i}=e.data[n.directiveStart+n.componentOffset];if(i===Kr.None||i===Kr.Emulated)return null}return Zr(n,r)}function RO(e,t,r){return AO(e,t,r)}function NO(e,t,r){return e.type&40?Zr(e,r):null}var AO=NO,lb;function kd(e,t,r,n){let i=TO(e,n,t),s=t[rn],o=n.parent||t[Or],a=RO(o,n,t);if(i!=null)if(Array.isArray(r))for(let l=0;l<r.length;l++)cb(s,i,r[l],a,!1);else cb(s,i,r,a,!1);lb!==void 0&&lb(s,n,t,r,i)}function Pc(e,t){if(t!==null){let r=t.type;if(r&3)return Zr(t,e);if(r&4)return Jm(-1,e[t.index]);if(r&8){let n=t.child;if(n!==null)return Pc(e,n);{let i=e[t.index];return Pi(i)?Jm(-1,i):qr(i)}}else{if(r&128)return Pc(e,t.next);if(r&32)return av(t,e)()||qr(e[t.index]);{let n=fS(e,t);if(n!==null){if(Array.isArray(n))return n[0];let i=zo(e[Ar]);return Pc(i,n)}else return Pc(e,t.next)}}}return null}function fS(e,t){if(t!==null){let r=e[Ar][Or],n=t.projection;return r.projection[n]}return null}function Jm(e,t){let r=In+e+1;if(r<t.length){let n=t[r],i=n[Te].firstChild;if(i!==null)return Pc(n,i)}return t[Go]}function lv(e,t,r,n,i,s,o){for(;r!=null;){if(r.type===128){r=r.next;continue}let a=n[r.index],l=r.type;if(o&&t===0&&(a&&ma(qr(a),n),r.flags|=2),!uS(r))if(l&8)lv(e,t,r.child,n,i,s,!1),ra(t,e,i,a,s);else if(l&32){let c=av(r,n),h;for(;h=c();)ra(t,e,i,h,s);ra(t,e,i,a,s)}else l&16?MO(e,t,n,r,i,s):ra(t,e,i,a,s);r=o?r.projectionNext:r.next}}function Ld(e,t,r,n,i,s){lv(r,n,e.firstChild,t,i,s,!1)}function MO(e,t,r,n,i,s){let o=r[Ar],a=o[Or].projection[n.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];ra(t,e,i,c,s)}else{let l=a,c=o[Tn];TC(n)&&(l.flags|=128),lv(e,t,l,c,i,s,!0)}}function OO(e,t,r,n,i){let s=r[Go],o=qr(r);s!==o&&ra(t,e,n,s,i);for(let a=In;a<r.length;a++){let l=r[a];Ld(l[Te],l,e,t,n,s)}}function PO(e,t,r,n,i){if(t)i?e.addClass(r,n):e.removeClass(r,n);else{let s=n.indexOf("-")===-1?void 0:Ni.DashCase;i==null?e.removeStyle(r,n,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Ni.Important),e.setStyle(r,n,i,s))}}function ud(e,t,r,n,i=!1){for(;r!==null;){if(r.type===128){r=i?r.projectionNext:r.next;continue}let s=t[r.index];s!==null&&n.push(qr(s)),Pi(s)&&kO(s,n);let o=r.type;if(o&8)ud(e,t,r.child,n);else if(o&32){let a=av(r,t),l;for(;l=a();)n.push(l)}else if(o&16){let a=fS(t,r);if(Array.isArray(a))n.push(...a);else{let l=zo(t[Ar]);ud(l[Te],l,a,n,!0)}}r=i?r.projectionNext:r.next}return n}function kO(e,t){for(let r=In;r<e.length;r++){let n=e[r],i=n[Te].firstChild;i!==null&&ud(n[Te],n,i,t)}e[Go]!==e[Oi]&&t.push(e[Go])}function pS(e){if(e[oa]!==null){for(let t of e[oa])t.impl.addSequence(t);e[oa].length=0}}var hS=[];function LO(e){return e[er]??FO(e)}function FO(e){let t=hS.pop()??Object.create(VO);return t.lView=e,t}function BO(e){e.lView[er]!==e&&(e.lView=null,hS.push(e))}var VO=re(w({},cu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{Jc(e.lView)},consumerOnSignalRead(){this.lView[er]=this}});function UO(e){let t=e[er]??Object.create(HO);return t.lView=e,t}var HO=re(w({},cu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=zo(e.lView);for(;t&&!mS(t[Te]);)t=zo(t);t&&Pg(t)},consumerOnSignalRead(){this.lView[er]=this}});function mS(e){return e.type!==2}function gS(e){if(e[Qu]===null)return;let t=!0;for(;t;){let r=!1;for(let n of e[Qu])n.dirty&&(r=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));t=r&&!!(e[we]&8192)}}var jO=100;function vS(e,t=!0,r=0){let n=e[Di].rendererFactory,i=!1;i||n.begin?.();try{$O(e,r)}catch(s){throw t&&lS(e,s),s}finally{i||n.end?.()}}function $O(e,t){let r=oC();try{Gw(!0),Qm(e,t);let n=0;for(;Cd(e);){if(n===jO)throw new Ge(103,!1);n++,Qm(e,1)}}finally{Gw(r)}}function WO(e,t,r,n){if(Xc(t))return;let i=t[we],s=!1,o=!1;Bg(t);let a=!0,l=null,c=null;s||(mS(e)?(c=LO(t),l=zh(c)):KE()===null?(a=!1,c=UO(t),l=zh(c)):t[er]&&(Yh(t[er]),t[er]=null));try{Jb(t),EA(e.bindingStartIndex),r!==null&&aS(e,t,r,2,n);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&$u(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Wu(t,g,0,null),dm(t,0)}if(o||GO(t),gS(t),yS(t,0),e.contentQueries!==null&&HC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&$u(t,g)}else{let g=e.contentHooks;g!==null&&Wu(t,g,1),dm(t,1)}qO(e,t);let d=e.components;d!==null&&ES(t,d,0);let f=e.viewQuery;if(f!==null&&jm(2,f,n),!s)if(h){let g=e.viewCheckHooks;g!==null&&$u(t,g)}else{let g=e.viewHooks;g!==null&&Wu(t,g,2),dm(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[um]){for(let g of t[um])g();t[um]=null}s||(pS(t),t[we]&=-73)}catch(h){throw s||Jc(t),h}finally{c!==null&&(QE(c,l),a&&BO(c)),Vg()}}function yS(e,t){for(let r=NC(e);r!==null;r=AC(r))for(let n=In;n<r.length;n++){let i=r[n];_S(i,t)}}function GO(e){for(let t=NC(e);t!==null;t=AC(t)){if(!(t[we]&2))continue;let r=t[ca];for(let n=0;n<r.length;n++){let i=r[n];Pg(i)}}}function zO(e,t,r){gt(18);let n=Yr(t,e);_S(n,r),gt(19,n[nn])}function _S(e,t){Og(e)&&Qm(e,t)}function Qm(e,t){let r=e[Te],n=e[we],i=e[er],s=!!(t===0&&n&16);if(s||=!!(n&64&&t===0),s||=!!(n&1024),s||=!!(i?.dirty&&qh(i)),s||=!1,i&&(i.dirty=!1),e[we]&=-9217,s)WO(r,e,r.template,e[nn]);else if(n&8192){gS(e),yS(e,1);let o=r.components;o!==null&&ES(e,o,1),pS(e)}}function ES(e,t,r){for(let n=0;n<t.length;n++)zO(e,t[n],r)}function qO(e,t){let r=e.hostBindingOpCodes;if(r!==null)try{for(let n=0;n<r.length;n++){let i=r[n];if(i<0)qo(~i);else{let s=i,o=r[++n],a=r[++n];CA(o,s);let l=t[s];gt(24,l),a(2,l),gt(25,l)}}}finally{qo(-1)}}function uv(e,t){let r=oC()?64:1088;for(e[Di].changeDetectionScheduler?.notify(t);e;){e[we]|=r;let n=zo(e);if(td(e)&&!n)return e;e=n}return null}function wS(e,t,r,n){return[e,!0,0,t,null,n,null,r,null,null]}function bS(e,t){let r=In+t;if(r<e.length)return e[r]}function Fd(e,t,r,n=!0){let i=t[Te];if(YO(i,t,e,r),n){let o=Jm(r,e),a=t[rn],l=a.parentNode(e[Go]);l!==null&&CO(i,e[Or],a,t,l,o)}let s=t[Uc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function CS(e,t){let r=Gc(e,t);return r!==void 0&&Pd(r[Te],r),r}function Gc(e,t){if(e.length<=In)return;let r=In+t,n=e[r];if(n){let i=n[Wo];i!==null&&i!==e&&cv(i,n),t>0&&(e[r-1][Nr]=n[Nr]);let s=Zu(e,In+t);bO(n[Te],n);let o=s[Ii];o!==null&&o.detachView(s[Te]),n[Tn]=null,n[Nr]=null,n[we]&=-129}return n}function YO(e,t,r,n){let i=In+n,s=r.length;n>0&&(r[i-1][Nr]=t),n<s-In?(t[Nr]=r[i],Ab(r,In+n,t)):(r.push(t),t[Nr]=null),t[Tn]=r;let o=t[Wo];o!==null&&r!==o&&SS(o,t);let a=t[Ii];a!==null&&a.insertView(e),xm(t),t[we]|=128}function SS(e,t){let r=e[ca],n=t[Tn];if(ro(n))e[we]|=2;else{let i=n[Tn][Ar];t[Ar]!==i&&(e[we]|=2)}r===null?e[ca]=[t]:r.push(t)}var Ko=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[Te];return ud(t,e,t.firstChild,[])}constructor(e,t,r=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=r}get context(){return this._lView[nn]}get dirty(){return!!(this._lView[we]&9280)||!!this._lView[er]?.dirty}set context(e){this._lView[nn]=e}get destroyed(){return Xc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Tn];if(Pi(e)){let t=e[ed],r=t?t.indexOf(this):-1;r>-1&&(Gc(e,r),Zu(t,r))}this._attachedToViewContainer=!1}Pd(this._lView[Te],this._lView)}onDestroy(e){Qb(this._lView,e)}markForCheck(){uv(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Pg(this._cdRefInjectingView||this._lView)}detach(){this._lView[we]&=-129}reattach(){xm(this._lView),this._lView[we]|=128}detectChanges(){this._lView[we]|=1024,vS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ge(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=td(this._lView),t=this._lView[Wo];t!==null&&!e&&cv(t,this._lView),dS(this._lView[Te],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ge(902,!1);this._appRef=e;let t=td(this._lView),r=this._lView[Wo];r!==null&&!t&&SS(r,this._lView),xm(this._lView)}},Mr=(()=>{class e{static __NG_ELEMENT_ID__=XO}return e})(),KO=Mr,ZO=class extends KO{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,r){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,r){let n=Od(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:r});return new Ko(n)}};function XO(){return Bd(tr(),Ne())}function Bd(e,t){return e.type&4?new ZO(t,e,ha(e,t)):null}function rl(e,t,r,n,i){let s=e.data[t];if(s===null)s=JO(e,t,r,n,i),bA()&&(s.flags|=32);else if(s.type&64){s.type=r,s.value=n,s.attrs=i;let o=_A();s.injectorIndex=o===null?-1:o.injectorIndex}return ao(s,!0),s}function JO(e,t,r,n,i){let s=nC(),o=Lg(),a=o?s:s&&s.parent,l=e.data[t]=eP(e,a,r,t,n,i);return QO(e,l,s,o),l}function QO(e,t,r,n){e.firstChild===null&&(e.firstChild=t),r!==null&&(n?r.child==null&&t.parent!==null&&(r.child=t):r.next===null&&(r.next=t,t.prev=r))}function eP(e,t,r,n,i,s){let o=t?t.injectorIndex:-1,a=0;return gA()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,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 kW=new RegExp(`^(\\d+)*(${dM}|${uM})*(.*)`),tP=()=>null;function zc(e,t){return tP(e,t)}var eg=class{},dd=class{},tg=class{resolveComponentFactory(e){throw Error(`No component factory found for ${fr(e)}.`)}},so=class{static NULL=new tg},dn=class{},va=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>nP()}return e})();function nP(){let e=Ne(),t=tr(),r=Yr(t.index,e);return(ro(r)?r:e)[rn]}var rP=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>null})}return e})();function ng(e,t,r){let n=r?e.styles:null,i=r?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Fw(i,a);else if(s==2){let l=a,c=t[++o];n=Fw(n,l+": "+c+";")}}r?e.styles=n:e.stylesWithoutHost=n,r?e.classes=i:e.classesWithoutHost=i}function Ht(e,t=Ze.Default){let r=Ne();if(r===null)return Xe(e,t);let n=tr();return EC(n,r,Pn(e),t)}function dv(e,t,r,n,i){let s=n===null?null:{"":-1},o=i(e,r);if(o!==null){let a,l=null,c=null,h=oP(o);h===null?a=o:[a,l,c]=h,cP(e,t,r,a,s,l,c)}s!==null&&n!==null&&iP(r,n,s)}function iP(e,t,r){let n=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=r[t[i+1]];if(s==null)throw new Ge(-301,!1);n.push(t[i],s)}}function oP(e){let t=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&zr(a)&&(t=a),a.findHostDirectiveDefs!==null){r=!0;break}}if(!r)return null;let n=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(n??=[],i??=new Map,s??=new Map,sP(o,n,s,i)),o===t&&(n??=[],n.push(o));return n!==null?(n.push(...t===null?e:e.slice(1)),[n,i,s]):null}function sP(e,t,r,n){let i=t.length;e.findHostDirectiveDefs(e,t,n),r.set(e,[i,t.length-1])}function aP(e,t,r){t.componentOffset=r,(e.components??=[]).push(t.index)}function cP(e,t,r,n,i,s,o){let a=n.length,l=!1;for(let f=0;f<a;f++){let g=n[f];!l&&zr(g)&&(l=!0,aP(e,r,f)),Om(od(r,t),e,g.type)}hP(r,e.data.length,a);for(let f=0;f<a;f++){let g=n[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=oS(e,t,a,null);a>0&&(r.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=n[f];if(r.mergedAttrs=la(r.mergedAttrs,g.hostAttrs),uP(e,r,t,d,g),pP(d,g,i),o!==null&&o.has(g)){let[b,I]=o.get(g);r.directiveToIndex.set(g.type,[d,b+r.directiveStart,I+r.directiveStart])}else(s===null||!s.has(g))&&r.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(r.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(r.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(r.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(r.index),h=!0),d++}lP(e,r,s)}function lP(e,t,r){for(let n=t.directiveStart;n<t.directiveEnd;n++){let i=e.data[n];if(r===null||!r.has(i))ub(0,t,i,n),ub(1,t,i,n),fb(t,n,!1);else{let s=r.get(i);db(0,t,s,n),db(1,t,s,n),fb(t,n,!0)}}}function ub(e,t,r,n){let i=e===0?r.inputs:r.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(n),DS(t,s)}}function db(e,t,r,n){let i=e===0?r.inputs:r.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(n,s),DS(t,o)}}function DS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function fb(e,t,r){let{attrs:n,inputs:i,hostDirectiveInputs:s}=e;if(n===null||!r&&i===null||r&&s===null||Qg(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<n.length;){let l=n[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!r&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,n[a+1]);break}}else if(r&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],n[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function uP(e,t,r,n,i){e.data[n]=i;let s=i.factory||(i.factory=Ho(i.type,!0)),o=new Yo(s,zr(i),Ht);e.blueprint[n]=o,r[n]=o,dP(e,t,n,oS(e,r,i.hostVars,ei),i)}function dP(e,t,r,n,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;fP(o)!=a&&o.push(a),o.push(r,n,s)}}function fP(e){let t=e.length;for(;t>0;){let r=e[--t];if(typeof r=="number"&&r<0)return r}return 0}function pP(e,t,r){if(r){if(t.exportAs)for(let n=0;n<t.exportAs.length;n++)r[t.exportAs[n]]=e;zr(t)&&(r[""]=e)}}function hP(e,t,r){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+r,e.providerIndexes=t}function IS(e,t,r,n,i,s,o,a){let l=t.consts,c=oo(l,o),h=rl(t,e,2,n,c);return s&&dv(t,r,h,oo(l,a),i),h.mergedAttrs=la(h.mergedAttrs,h.attrs),h.attrs!==null&&ng(h,h.attrs,!1),h.mergedAttrs!==null&&ng(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function TS(e,t){Hg(e,t),Ag(t)&&e.queries.elementEnd(t)}var rg=class extends so{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=$o(e);return new qc(t,this.ngModule)}};function mP(e){return Object.keys(e).map(t=>{let[r,n,i]=e[t],s={propName:r,templateName:t,isSignal:(n&Ad.SignalBased)!==0};return i&&(s.transform=i),s})}function gP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function vP(e,t,r){let n=t instanceof Gn?t:t?.injector;return n&&e.getStandaloneInjector!==null&&(n=e.getStandaloneInjector(n)||n),n?new Am(r,n):r}function yP(e){let t=e.get(dn,null);if(t===null)throw new Ge(407,!1);let r=e.get(rP,null),n=e.get(Ti,null);return{rendererFactory:t,sanitizer:r,changeDetectionScheduler:n}}function _P(e,t){let r=(e.selectors[0][0]||"div").toLowerCase();return tS(t,r,r==="svg"?Zb:r==="math"?aA:null)}var qc=class extends dd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return mP(this.componentDef.inputs)}get outputs(){return gP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=ZM(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,r,n){gt(22);let i=$e(null);try{let s=this.componentDef,o=r?["ng-version","19.2.0"]:XM(this.componentDef.selectors[0]),a=ev(0,null,null,1,0,null,null,null,null,[o],null),l=vP(s,n||this.ngModule,e),c=yP(l),h=c.rendererFactory.createRenderer(null,s),d=r?aO(h,r,s.encapsulation,l):_P(s,h),f=tv(null,a,null,512|iS(s),null,null,c,h,l,null,UC(d,l,!0));f[on]=d,Bg(f);let g=null;try{let m=IS(on,a,f,"#host",()=>[this.componentDef],!0,0);d&&(rS(h,d,m),ma(d,f)),Md(a,f,m),Xg(a,m,f),TS(a,m),t!==void 0&&EP(m,this.ngContentSelectors,t),g=Yr(m.index,f),f[nn]=g[nn],sv(a,f,null)}catch(m){throw g!==null&&Vm(g),Vm(f),m}finally{gt(23),Vg()}return new ig(this.componentType,f)}finally{$e(i)}}},ig=class extends eg{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Mg(t[Te],on),this.location=ha(this._tNode,t),this.instance=Yr(this._tNode.index,t)[nn],this.hostView=this.changeDetectorRef=new Ko(t,void 0,!1),this.componentType=e}setInput(e,t){let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let n=this._rootLView,i=ov(r,n[Te],n,e,t);this.previousInputValues.set(e,t);let s=Yr(r.index,n);uv(s,1)}get injector(){return new Uo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function EP(e,t,r){let n=e.projection=[];for(let i=0;i<t.length;i++){let s=r[i];n.push(s!=null&&s.length?Array.from(s):null)}}var kr=(()=>{class e{static __NG_ELEMENT_ID__=wP}return e})();function wP(){let e=tr();return RS(e,Ne())}var bP=kr,xS=class extends bP{_lContainer;_hostTNode;_hostLView;constructor(e,t,r){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=r}get element(){return ha(this._hostTNode,this._hostLView)}get injector(){return new Uo(this._hostTNode,this._hostLView)}get parentInjector(){let e=jg(this._hostTNode,this._hostLView);if(hC(e)){let t=rd(e,this._hostLView),r=nd(e),n=t[Te].data[r+8];return new Uo(n,t)}else return new Uo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=pb(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-In}createEmbeddedView(e,t,r){let n,i;typeof r=="number"?n=r:r!=null&&(n=r.index,i=r.injector);let s=zc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,n,Wc(this._hostTNode,s)),o}createComponent(e,t,r,n,i){let s=e&&!rA(e),o;if(s)o=t;else{let g=t||{};o=g.index,r=g.injector,n=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new qc($o(e)),l=r||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=$o(a.componentType??{}),h=zc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,n,d,i);return this.insertImpl(f.hostView,o,Wc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,r){let n=e._lView;if(lA(n)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=n[Tn],l=new xS(a,a[Or],a[Tn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Fd(s,n,i,r),e.attachToViewContainerRef(),Ab(mm(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=pb(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),r=Gc(this._lContainer,t);r&&(Zu(mm(this._lContainer),t),Pd(r[Te],r))}detach(e){let t=this._adjustIndex(e,-1),r=Gc(this._lContainer,t);return r&&Zu(mm(this._lContainer),t)!=null?new Ko(r):null}_adjustIndex(e,t=0){return e??this.length+t}};function pb(e){return e[ed]}function mm(e){return e[ed]||(e[ed]=[])}function RS(e,t){let r,n=t[e.index];return Pi(n)?r=n:(r=wS(n,t,null,e),t[e.index]=r,nv(t,r)),SP(r,t,e,n),new xS(r,e,t)}function CP(e,t){let r=e[rn],n=r.createComment(""),i=Zr(t,e),s=r.parentNode(i);return ld(r,s,n,r.nextSibling(i),!1),n}var SP=TP,DP=()=>!1;function IP(e,t,r){return DP(e,t,r)}function TP(e,t,r,n){if(e[Go])return;let i;r.type&8?i=qr(n):i=CP(t,r),e[Go]=i}var og=class Sx{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new Sx(this.queryList)}setDirty(){this.queryList.setDirty()}},sg=class Ix{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let r=t.queries;if(r!==null){let n=t.contentQueries!==null?t.contentQueries[0]:r.length,i=[];for(let s=0;s<n;s++){let o=r.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new Ix(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let r=0;r<this.queries.length;r++)fv(t,r).matches!==null&&this.queries[r].setDirty()}},ag=class{flags;read;predicate;constructor(e,t,r=null){this.flags=t,this.read=r,typeof e=="string"?this.predicate=kP(e):this.predicate=e}},cg=class xx{queries;constructor(t=[]){this.queries=t}elementStart(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,r)}elementEnd(t){for(let r=0;r<this.queries.length;r++)this.queries[r].elementEnd(t)}embeddedTView(t){let r=null;for(let n=0;n<this.length;n++){let i=r!==null?r.length:0,s=this.getByIndex(n).embeddedTView(t,i);s&&(s.indexInDeclarationView=n,r!==null?r.push(s):r=[s])}return r!==null?new xx(r):null}template(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,r)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},lg=class _D{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,r=-1){this.metadata=t,this._declarationNodeIndex=r}elementStart(t,r){this.isApplyingToNode(r)&&this.matchTNode(t,r)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,r){this.elementStart(t,r)}embeddedTView(t,r){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,r),new _D(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let r=this._declarationNodeIndex,n=t.parent;for(;n!==null&&n.type&8&&n.index!==r;)n=n.parent;return r===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(t,r){let n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){let s=n[i];this.matchTNodeWithReadOption(t,r,xP(r,s)),this.matchTNodeWithReadOption(t,r,Gu(r,t,s,!1,!1))}else n===Mr?r.type&4&&this.matchTNodeWithReadOption(t,r,-1):this.matchTNodeWithReadOption(t,r,Gu(r,t,n,!1,!1))}matchTNodeWithReadOption(t,r,n){if(n!==null){let i=this.metadata.read;if(i!==null)if(i===Ot||i===kr||i===Mr&&r.type&4)this.addMatch(r.index,-2);else{let s=Gu(r,t,i,!1,!1);s!==null&&this.addMatch(r.index,s)}else this.addMatch(r.index,n)}}addMatch(t,r){this.matches===null?this.matches=[t,r]:this.matches.push(t,r)}};function xP(e,t){let r=e.localNames;if(r!==null){for(let n=0;n<r.length;n+=2)if(r[n]===t)return r[n+1]}return null}function RP(e,t){return e.type&11?ha(e,t):e.type&4?Bd(e,t):null}function NP(e,t,r,n){return r===-1?RP(t,e):r===-2?AP(e,t,n):$c(e,e[Te],r,t)}function AP(e,t,r){if(r===Ot)return ha(t,e);if(r===Mr)return Bd(t,e);if(r===kr)return RS(t,e)}function NS(e,t,r,n){let i=t[Ii].queries[n];if(i.matches===null){let s=e.data,o=r.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(NP(t,h,o[l+1],r.metadata.read))}}i.matches=a}return i.matches}function ug(e,t,r,n){let i=e.queries.getByIndex(r),s=i.matches;if(s!==null){let o=NS(e,t,i,r);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)n.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=In;d<h.length;d++){let f=h[d];f[Wo]===f[Tn]&&ug(f[Te],f,c,n)}if(h[ca]!==null){let d=h[ca];for(let f=0;f<d.length;f++){let g=d[f];ug(g[Te],g,c,n)}}}}}return n}function MP(e,t){return e[Ii].queries[t].queryList}function OP(e,t,r){let n=new Bm((r&4)===4);return fA(e,t,n,n.destroy),(t[Ii]??=new sg).queries.push(new og(n))-1}function PP(e,t,r){let n=Jt();return n.firstCreatePass&&(LP(n,new ag(e,t,r),-1),(t&2)===2&&(n.staticViewQueries=!0)),OP(n,Ne(),t)}function kP(e){return e.split(",").map(t=>t.trim())}function LP(e,t,r){e.queries===null&&(e.queries=new cg),e.queries.track(new lg(t,r))}function fv(e,t){return e.queries.getByIndex(t)}function FP(e,t){let r=e[Te],n=fv(r,t);return n.crossesNgTemplate?ug(r,e,t,[]):NS(r,e,n,t)}var Ai=class{},fd=class extends Ai{injector;componentFactoryResolver=new rg(this);instance=null;constructor(e){super();let t=new Vc([...e.providers,{provide:Ai,useValue:this},{provide:so,useValue:this.componentFactoryResolver}],e.parent||_d(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function BP(e,t,r=null){return new fd({providers:e,parent:t,debugName:r,runEnvironmentInitializers:!0}).injector}var VP=(()=>{class e{_injector;cachedInjectors=new Map;constructor(r){this._injector=r}getOrCreateStandaloneInjector(r){if(!r.standalone)return null;if(!this.cachedInjectors.has(r)){let n=Fb(!1,r.type),i=n.length>0?BP([n],this._injector,`Standalone[${r.type.name}]`):null;this.cachedInjectors.set(r,i)}return this.cachedInjectors.get(r)}ngOnDestroy(){try{for(let r of this.cachedInjectors.values())r!==null&&r.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=oe({token:e,providedIn:"environment",factory:()=>new e(Xe(Gn))})}return e})();function ft(e){return Dg(()=>{let t=AS(e),r=re(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===xC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(VP).getOrCreateStandaloneInjector(r):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Kr.Emulated,styles:e.styles||io,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&lo("NgStandalone"),MS(r);let n=e.dependencies;return r.directiveDefs=hb(n,!1),r.pipeDefs=hb(n,!0),r.id=WP(r),r})}function UP(e){return $o(e)||Pb(e)}function HP(e){return e!==null}function jP(e,t){if(e==null)return jo;let r={};for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Ad.None,l=null),r[s]=[n,a,l],t[s]=o}return r}function $P(e){if(e==null)return jo;let t={};for(let r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Lr(e){return Dg(()=>{let t=AS(e);return MS(t),t})}function es(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 AS(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||jo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||io,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:jP(e.inputs,t),outputs:$P(e.outputs),debugInfo:null}}function MS(e){e.features?.forEach(t=>t(e))}function hb(e,t){if(!e)return null;let r=t?kb:UP;return()=>(typeof e=="function"?e():e).map(n=>r(n)).filter(HP)}function WP(e){let t=0,r=typeof e.consts=="function"?"":e.consts,n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,r,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 n.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function GP(e){return Object.getPrototypeOf(e.prototype).constructor}function fo(e){let t=GP(e.type),r=!0,n=[e];for(;t;){let i;if(zr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Ge(903,!1);i=t.\u0275dir}if(i){if(r){n.push(i);let o=e;o.inputs=gm(e.inputs),o.declaredInputs=gm(e.declaredInputs),o.outputs=gm(e.outputs);let a=i.hostBindings;a&&ZP(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&YP(e,l),c&&KP(e,c),zP(e,i),wN(e.outputs,i.outputs),zr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===fo&&(r=!1)}}t=Object.getPrototypeOf(t)}qP(n)}function zP(e,t){for(let r in t.inputs){if(!t.inputs.hasOwnProperty(r)||e.inputs.hasOwnProperty(r))continue;let n=t.inputs[r];n!==void 0&&(e.inputs[r]=n,e.declaredInputs[r]=t.declaredInputs[r])}}function qP(e){let t=0,r=null;for(let n=e.length-1;n>=0;n--){let i=e[n];i.hostVars=t+=i.hostVars,i.hostAttrs=la(i.hostAttrs,r=la(r,i.hostAttrs))}}function gm(e){return e===jo?{}:e===io?[]:e}function YP(e,t){let r=e.viewQuery;r?e.viewQuery=(n,i)=>{t(n,i),r(n,i)}:e.viewQuery=t}function KP(e,t){let r=e.contentQueries;r?e.contentQueries=(n,i,s)=>{t(n,i,s),r(n,i,s)}:e.contentQueries=t}function ZP(e,t){let r=e.hostBindings;r?e.hostBindings=(n,i)=>{t(n,i),r(n,i)}:e.hostBindings=t}function pv(e,t,r){return e[t]=r}function XP(e,t){return e[t]}function Mi(e,t,r){let n=e[t];return Object.is(n,r)?!1:(e[t]=r,!0)}function JP(e,t,r,n){let i=Mi(e,t,r);return Mi(e,t+1,n)||i}function QP(e,t,r,n,i,s,o,a,l){let c=t.consts,h=rl(t,e,4,o||null,a||null);kg()&&dv(t,r,h,oo(c,l),iv),h.mergedAttrs=la(h.mergedAttrs,h.attrs),Hg(t,h);let d=h.tView=ev(2,h,n,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function dg(e,t,r,n,i,s,o,a,l,c){let h=r+on,d=t.firstCreatePass?QP(h,t,e,n,i,s,o,a,l):t.data[h];ao(d,!1);let f=e1(t,e,d,r);Sd()&&kd(t,e,f,d),ma(f,e);let g=wS(f,e,f,d);return e[h]=g,nv(e,g),IP(g,d,e),wd(d)&&Md(t,e,d),l!=null&&rv(e,d,c),d}function pt(e,t,r,n,i,s,o,a){let l=Ne(),c=Jt(),h=oo(c.consts,s);return dg(l,c,e,t,r,n,i,h,o,a),pt}var e1=t1;function t1(e,t,r,n){return Dd(!0),t[rn].createComment("")}var OS=new he(""),n1=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new fg})}return e})(),fg=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,r=this.queues.get(t);r.has(e)&&(r.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let r=this.queues.get(t);r.has(e)||(this.queuedEffectCount++,r.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 hv(e){return!!e&&typeof e.then=="function"}function PS(e){return!!e&&typeof e.subscribe=="function"}var r1=new he(""),kS=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((r,n)=>{this.resolve=r,this.reject=n});appInits=O(r1,{optional:!0})??[];injector=O(vt);constructor(){}runInitializers(){if(this.initialized)return;let r=[];for(let i of this.appInits){let s=Hb(this.injector,i);if(hv(s))r.push(s);else if(PS(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});r.push(o)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(r).then(()=>{n()}).catch(i=>{this.reject(i)}),r.length===0&&n(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),i1=new he("");function o1(){ow(()=>{throw new Ge(600,!1)})}function s1(e){return e.isBoundToModule}var a1=10,pr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(tM);afterRenderManager=O(BC);zonelessEnabled=O(Td);rootEffectScheduler=O(n1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new ie;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(xd).hasPendingTasks.pipe(dr(r=>!r));constructor(){O(ga,{optional:!0})}whenStable(){let r;return new Promise(n=>{r=this.isStable.subscribe({next:i=>{i&&n()}})}).finally(()=>{r.unsubscribe()})}_injector=O(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(r,n){gt(10);let i=r instanceof dd;if(!this._injector.get(kS).done){let d=!i&&GN(r),f=!1;throw new Ge(405,f)}let s;i?s=r:s=this._injector.get(so).resolveComponentFactory(r),this.componentTypes.push(s.componentType);let o=s1(s)?void 0:this._injector.get(Ai),a=n||s.selector,l=s.create(vt.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(OS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),zu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),gt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){gt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(Kg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Ge(101,!1);let r=$e(null);try{this._runningTick=!0,this.synchronize()}catch(n){this.internalErrorHandler(n)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,$e(r),this.afterTick.next(),gt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(dn,null,{optional:!0}));let r=0;for(;this.dirtyFlags!==0&&r++<a1;)gt(14),this.synchronizeOnce(),gt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:n,notifyErrorHandler:i}of this.allViews)c1(n,i,r,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:r})=>Cd(r))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(r){let n=r;this._views.push(n),n.attachToAppRef(this)}detachView(r){let n=r;zu(this._views,n),n.detachFromAppRef()}_loadComponent(r){this.attachView(r.hostView),this.tick(),this.components.push(r),this._injector.get(i1,[]).forEach(n=>n(r))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(r=>r()),this._views.slice().forEach(r=>r.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(r){return this._destroyListeners.push(r),()=>zu(this._destroyListeners,r)}destroy(){if(this._destroyed)throw new Ge(406,!1);let r=this._injector;r.destroy&&!r.destroyed&&r.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zu(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function c1(e,t,r,n){!r&&!Cd(e)||vS(e,t,r&&!n?0:1)}function ts(e,t,r,n){let i=Ne(),s=el();if(Mi(i,s,t)){let o=Jt(),a=Ug();mO(a,i,e,t,r,n)}return ts}function LS(e,t,r,n){return Mi(e,el(),r)?t+Kc(r)+n:ei}function Hu(e,t){return e<<17|t<<2}function Zo(e){return e>>17&32767}function l1(e){return(e&2)==2}function u1(e,t){return e&131071|t<<17}function pg(e){return e|2}function ua(e){return(e&131068)>>2}function vm(e,t){return e&-131069|t<<2}function d1(e){return(e&1)===1}function hg(e){return e|1}function f1(e,t,r,n,i,s){let o=s?t.classBindings:t.styleBindings,a=Zo(o),l=ua(o);e[n]=r;let c=!1,h;if(Array.isArray(r)){let d=r;h=d[1],(h===null||Zc(d,h)>0)&&(c=!0)}else h=r;if(i)if(l!==0){let d=Zo(e[a+1]);e[n+1]=Hu(d,a),d!==0&&(e[d+1]=vm(e[d+1],n)),e[a+1]=u1(e[a+1],n)}else e[n+1]=Hu(a,0),a!==0&&(e[a+1]=vm(e[a+1],n)),a=n;else e[n+1]=Hu(l,0),a===0?a=n:e[l+1]=vm(e[l+1],n),l=n;c&&(e[n+1]=pg(e[n+1])),mb(e,h,n,!0),mb(e,h,n,!1),p1(t,h,e,n,s),o=Hu(a,l),s?t.classBindings=o:t.styleBindings=o}function p1(e,t,r,n,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Zc(s,t)>=0&&(r[n+1]=hg(r[n+1]))}function mb(e,t,r,n){let i=e[r+1],s=t===null,o=n?Zo(i):ua(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];h1(l,t)&&(a=!0,e[o+1]=n?hg(c):pg(c)),o=n?Zo(c):ua(c)}a&&(e[r+1]=n?pg(i):hg(i))}function h1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Zc(e,t)>=0:!1}function be(e,t,r){let n=Ne(),i=el();if(Mi(n,i,t)){let s=Jt(),o=Ug();cS(s,o,n,e,t,n[rn],r,!1)}return be}function gb(e,t,r,n,i){ov(t,e,r,i?"class":"style",n)}function po(e,t,r){return FS(e,t,r,!1),po}function ti(e,t){return FS(e,t,null,!0),ti}function FS(e,t,r,n){let i=Ne(),s=Jt(),o=wA(2);if(s.firstUpdatePass&&g1(s,e,o,n),t!==ei&&Mi(i,o,t)){let a=s.data[co()];w1(s,a,i,i[rn],e,i[o+1]=b1(t,r),n,o)}}function m1(e,t){return t>=e.expandoStartIndex}function g1(e,t,r,n){let i=e.data;if(i[r+1]===null){let s=i[co()],o=m1(e,r);C1(s,n)&&t===null&&!o&&(t=!1),t=v1(i,s,t,n),f1(i,s,t,r,o,n)}}function v1(e,t,r,n){let i=DA(e),s=n?t.residualClasses:t.residualStyles;if(i===null)(n?t.classBindings:t.styleBindings)===0&&(r=ym(null,e,t,r,n),r=Yc(r,t.attrs,n),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(r=ym(i,e,t,r,n),s===null){let a=y1(e,t,n);a!==void 0&&Array.isArray(a)&&(a=ym(null,e,t,a[1],n),a=Yc(a,t.attrs,n),_1(e,t,n,a))}else s=E1(e,t,n)}return s!==void 0&&(n?t.residualClasses=s:t.residualStyles=s),r}function y1(e,t,r){let n=r?t.classBindings:t.styleBindings;if(ua(n)!==0)return e[Zo(n)]}function _1(e,t,r,n){let i=r?t.classBindings:t.styleBindings;e[Zo(i)]=n}function E1(e,t,r){let n,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;n=Yc(n,o,r)}return Yc(n,t.attrs,r)}function ym(e,t,r,n,i){let s=null,o=r.directiveEnd,a=r.directiveStylingLast;for(a===-1?a=r.directiveStart:a++;a<o&&(s=t[a],n=Yc(n,s.hostAttrs,i),s!==e);)a++;return e!==null&&(r.directiveStylingLast=a),n}function Yc(e,t,r){let n=r?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===n&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),$N(e,o,r?!0:t[++s]))}return e===void 0?null:e}function w1(e,t,r,n,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=d1(c)?vb(l,t,r,i,ua(c),o):void 0;if(!pd(h)){pd(s)||l1(c)&&(s=vb(l,null,r,i,a,o));let d=Xb(co(),r);PO(n,o,d,i,s)}}function vb(e,t,r,n,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=r[i+1];f===ei&&(f=d?io:void 0);let g=d?cm(f,n):h===n?f:void 0;if(c&&!pd(g)&&(g=cm(l,n)),pd(g)&&(a=g,o))return a;let m=e[i+1];i=o?Zo(m):ua(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=cm(l,n))}return a}function pd(e){return e!==void 0}function b1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=fr(Jr(e)))),e}function C1(e,t){return(e.flags&(t?8:16))!==0}var mg=class{destroy(e){}updateValue(e,t){}swap(e,t){let r=Math.min(e,t),n=Math.max(e,t),i=this.detach(n);if(n-r>1){let s=this.detach(r);this.attach(r,i),this.attach(n,s)}else this.attach(r,i)}move(e,t){this.attach(t,this.detach(e))}};function _m(e,t,r,n,i){return e===r&&Object.is(t,n)?1:Object.is(i(e,t),i(r,n))?-1:0}function S1(e,t,r){let n,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=_m(s,c,s,h,r);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=_m(o,f,l,g,r);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=r(s,c),I=r(o,f),A=r(s,h);if(Object.is(A,I)){let F=r(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(n??=new hd,i??=_b(e,s,o,r),gg(e,n,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))n.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)yb(e,n,r,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=_m(s,h,s,d,r);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{n??=new hd,i??=_b(e,s,o,r);let g=r(s,d);if(gg(e,n,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=r(s,h);n.set(m,e.detach(s)),o--}}}for(;!c.done;)yb(e,n,r,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));n?.forEach(l=>{e.destroy(l)})}function gg(e,t,r,n){return t!==void 0&&t.has(n)?(e.attach(r,t.get(n)),t.delete(n),!0):!1}function yb(e,t,r,n,i){if(gg(e,t,n,r(n,i)))e.updateValue(n,i);else{let s=e.create(n,i);e.attach(n,s)}}function _b(e,t,r,n){let i=new Set;for(let s=t;s<=r;s++)i.add(n(s,e.at(s)));return i}var hd=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 r=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let n=this._vMap;for(;n.has(r);)r=n.get(r);n.set(r,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,r]of this.kvMap)if(e(r,t),this._vMap!==void 0){let n=this._vMap;for(;n.has(r);)r=n.get(r),e(r,t)}}};function Pt(e,t){lo("NgControlFlow");let r=Ne(),n=el(),i=r[n]!==ei?r[n]:-1,s=i!==-1?md(r,on+i):void 0,o=0;if(Mi(r,n,e)){let a=$e(null);try{if(s!==void 0&&CS(s,o),e!==-1){let l=on+e,c=md(r,l),h=Eg(r[Te],l),d=zc(c,h.tView.ssrId),f=Od(r,h,t,{dehydratedView:d});Fd(c,f,o,Wc(h,d))}}finally{$e(a)}}else if(s!==void 0){let a=bS(s,o);a!==void 0&&(a[nn]=t)}}var vg=class{lContainer;$implicit;$index;constructor(e,t,r){this.lContainer=e,this.$implicit=t,this.$index=r}get $count(){return this.lContainer.length-In}};function Fi(e,t){return t}var yg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,r){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=r}};function Wt(e,t,r,n,i,s,o,a,l,c,h,d,f){lo("NgControlFlow");let g=Ne(),m=Jt(),b=l!==void 0,I=Ne(),A=a?o.bind(I[Ar][nn]):o,F=new yg(b,A);I[on+e]=F,dg(g,m,e+1,t,r,n,i,oo(m.consts,s)),b&&dg(g,m,e+2,l,c,h,d,oo(m.consts,f))}var _g=class extends mg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,r){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=r}get length(){return this.lContainer.length-In}at(e){return this.getLView(e)[nn].$implicit}attach(e,t){let r=t[Uc];this.needsIndexUpdate||=e!==this.length,Fd(this.lContainer,t,e,Wc(this.templateTNode,r))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,D1(this.lContainer,e)}create(e,t){let r=zc(this.lContainer,this.templateTNode.tView.ssrId),n=Od(this.hostLView,this.templateTNode,new vg(this.lContainer,t,e),{dehydratedView:r});return this.operationsCounter?.recordCreate(),n}destroy(e){Pd(e[Te],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[nn].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[nn].$index=e}getLView(e){return I1(this.lContainer,e)}};function Gt(e){let t=$e(null),r=co();try{let n=Ne(),i=n[Te],s=n[r],o=r+1,a=md(n,o);if(s.liveCollection===void 0){let c=Eg(i,o);s.liveCollection=new _g(a,n,c)}else s.liveCollection.reset();let l=s.liveCollection;if(S1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=el(),h=l.length===0;if(Mi(n,c,h)){let d=r+2,f=md(n,d);if(h){let g=Eg(i,d),m=zc(f,g.tView.ssrId),b=Od(n,g,void 0,{dehydratedView:m});Fd(f,b,0,Wc(g,m))}else CS(f,0)}}}finally{$e(t)}}function md(e,t){return e[t]}function D1(e,t){return Gc(e,t)}function I1(e,t){return bS(e,t)}function Eg(e,t){return Mg(e,t)}function Q(e,t,r,n){let i=Ne(),s=Jt(),o=on+e,a=i[rn],l=s.firstCreatePass?IS(o,s,i,t,iv,kg(),r,n):s.data[o],c=T1(s,i,l,a,t,e);i[o]=c;let h=wd(l);return ao(l,!0),rS(a,c,l),!uS(l)&&Sd()&&kd(s,i,c,l),(pA()===0||h)&&ma(c,i),hA(),h&&(Md(s,i,l),Xg(s,l,i)),n!==null&&rv(i,l),Q}function ee(){let e=tr();Lg()?rC():(e=e.parent,ao(e,!1));let t=e;vA(t)&&yA(),mA();let r=Jt();return r.firstCreatePass&&TS(r,t),t.classesWithoutHost!=null&&OA(t)&&gb(r,t,Ne(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&PA(t)&&gb(r,t,Ne(),t.stylesWithoutHost,!1),ee}function Ae(e,t,r,n){return Q(e,t,r,n),ee(),Ae}var T1=(e,t,r,n,i,s)=>(Dd(!0),tS(n,i,RA()));function x1(e,t,r,n,i){let s=t.consts,o=oo(s,n),a=rl(t,e,8,"ng-container",o);o!==null&&ng(a,o,!0);let l=oo(s,i);return kg()&&dv(t,r,a,l,iv),a.mergedAttrs=la(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function BS(e,t,r){let n=Ne(),i=Jt(),s=e+on,o=i.firstCreatePass?x1(s,i,n,t,r):i.data[s];ao(o,!0);let a=R1(i,n,o,e);return n[s]=a,Sd()&&kd(i,n,a,o),ma(a,n),wd(o)&&(Md(i,n,o),Xg(i,o,n)),r!=null&&rv(n,o),BS}function VS(){let e=tr(),t=Jt();return Lg()?rC():(e=e.parent,ao(e,!1)),t.firstCreatePass&&(Hg(t,e),Ag(e)&&t.queries.elementEnd(e)),VS}function Vd(e,t,r){return BS(e,t,r),VS(),Vd}var R1=(e,t,r,n)=>(Dd(!0),eO(t[rn],""));function zn(){return Ne()}var gd="en-US",N1=gd;function A1(e){typeof e=="string"&&(N1=e.toLowerCase().replace(/_/g,"-"))}var M1=(e,t,r)=>{};function ht(e,t,r,n){let i=Ne(),s=Jt(),o=tr();return P1(s,i,i[rn],o,e,t,n),ht}function O1(e,t,r,n){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===r&&i[s+1]===n){let a=t[Ju],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function P1(e,t,r,n,i,s,o){let a=wd(n),l=e.firstCreatePass?tC(e):null,c=t[nn],h=eC(t),d=!0;if(n.type&3||o){let f=Zr(n,t),g=o?o(f):f,m=h.length,b=o?A=>o(qr(A[n.index])):n.index,I=null;if(!o&&a&&(I=O1(e,t,i,n.index)),I!==null){let A=I.__ngLastListenerFn__||I;A.__ngNextListenerFn__=s,I.__ngLastListenerFn__=s,d=!1}else{s=bb(n,t,c,s),M1(f,i,s);let A=r.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=bb(n,t,c,s);if(d){let f=n.outputs?.[i],g=n.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],I=g[m+1];Eb(n,e,t,b,I,i,s,h,l)}if(f&&f.length)for(let m of f)Eb(n,e,t,m,i,i,s,h,l)}}function Eb(e,t,r,n,i,s,o,a,l){let c=r[n],h=t.data[n].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function wb(e,t,r,n){let i=$e(null);try{return gt(6,t,r),r(n)!==!1}catch(s){return lS(e,s),!1}finally{gt(7,t,r),$e(i)}}function bb(e,t,r,n){return function i(s){if(s===Function)return n;let o=pa(e)?Yr(e.index,t):t;uv(o,5);let a=wb(t,r,n,s),l=i.__ngNextListenerFn__;for(;l;)a=wb(t,r,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function X(e=1){return TA(e)}function qn(e,t,r){return Bi(e,"",t,"",r),qn}function Bi(e,t,r,n,i){let s=Ne(),o=LS(s,t,r,n);if(o!==ei){let a=Jt(),l=Ug();cS(a,l,s,e,o,s[rn],i,!1)}return Bi}function ns(e,t,r){PP(e,t,r)}function rs(e){let t=Ne(),r=Jt(),n=sC();Fg(n+1);let i=fv(r,n);if(e.dirty&&cA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=FP(t,n);e.reset(s,rM),e.notifyOnChanges()}return!0}return!1}function is(){return MP(Ne(),sC())}function mv(e,t,r,n){r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=n}function gv(e){let t=iC();return bd(t,on+e)}function pn(e,t=""){let r=Ne(),n=Jt(),i=e+on,s=n.firstCreatePass?rl(n,i,1,t,null):n.data[i],o=k1(n,r,s,t,e);r[i]=o,Sd()&&kd(n,r,o,s),ao(s,!1)}var k1=(e,t,r,n,i)=>(Dd(!0),JM(t[rn],n));function ya(e){return os("",e,""),ya}function os(e,t,r){let n=Ne(),i=LS(n,e,t,r);return i!==ei&&L1(n,co(),i),os}function L1(e,t,r){let n=Xb(t,e);QM(e[rn],n,r)}var US={};function Fr(e){let t=Jt(),r=Ne(),n=e+on,i=rl(t,n,128,null,null);return ao(i,!1),mv(t,r,n,US),Fr}function ho(e){lo("NgLet");let t=Jt(),r=Ne(),n=co();return mv(t,r,n,e),e}function mr(e){let t=iC(),r=bd(t,on+e);if(r===US)throw new Ge(314,!1);return r}function F1(e,t,r){let n=Jt();if(n.firstCreatePass){let i=zr(e);wg(r,n.data,n.blueprint,i,!0),wg(t,n.data,n.blueprint,i,!1)}}function wg(e,t,r,n,i){if(e=Pn(e),Array.isArray(e))for(let s=0;s<e.length;s++)wg(e[s],t,r,n,i);else{let s=Jt(),o=Ne(),a=tr(),l=aa(e)?e:Pn(e.provide),c=Ub(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(aa(e)||!e.multi){let g=new Yo(c,i,Ht),m=wm(l,t,i?h:h+f,d);m===-1?(Om(od(a,o),s,l),Em(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(g),o.push(g)):(r[m]=g,o[m]=g)}else{let g=wm(l,t,h+f,d),m=wm(l,t,h,h+f),b=g>=0&&r[g],I=m>=0&&r[m];if(i&&!I||!i&&!b){Om(od(a,o),s,l);let A=U1(i?V1:B1,r.length,i,n,c);!i&&I&&(r[m].providerFactory=A),Em(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(A),o.push(A)}else{let A=HS(r[i?m:g],c,!i&&n);Em(s,e,g>-1?g:m,A)}!i&&n&&I&&r[m].componentProviders++}}}function Em(e,t,r,n){let i=aa(t),s=ZN(t);if(i||s){let o=(s?Pn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(r);l===-1?a.push(r,[n,o]):a[l+1].push(n,o)}else a.push(r,o)}}}function HS(e,t,r){return r&&e.componentProviders++,e.multi.push(t)-1}function wm(e,t,r,n){for(let i=r;i<n;i++)if(t[i]===e)return i;return-1}function B1(e,t,r,n){return bg(this.multi,[])}function V1(e,t,r,n){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=$c(r,r[Te],this.providerFactory.index,n);s=a.slice(0,o),bg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],bg(i,s);return s}function bg(e,t){for(let r=0;r<e.length;r++){let n=e[r];t.push(n())}return t}function U1(e,t,r,n,i){let s=new Yo(e,r,Ht);return s.multi=[],s.index=t,s.componentProviders=0,HS(s,i,n&&!r),s}function Ud(e,t=[]){return r=>{r.providersResolver=(n,i)=>F1(n,i?i(e):e,t)}}function vv(e,t,r){let n=Qc()+e,i=Ne();return i[n]===ei?pv(i,n,r?t.call(r):t()):XP(i,n)}function Ea(e,t,r,n){return $S(Ne(),Qc(),e,t,r,n)}function yv(e,t,r,n,i){return WS(Ne(),Qc(),e,t,r,n,i)}function jS(e,t){let r=e[t];return r===ei?void 0:r}function $S(e,t,r,n,i,s){let o=t+r;return Mi(e,o,i)?pv(e,o+1,s?n.call(s,i):n(i)):jS(e,o+1)}function WS(e,t,r,n,i,s,o){let a=t+r;return JP(e,a,i,s)?pv(e,a+2,o?n.call(o,i,s):n(i,s)):jS(e,a+2)}function bn(e,t){let r=Jt(),n,i=e+on;r.firstCreatePass?(n=H1(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks??=[]).push(i,n.onDestroy)):n=r.data[i];let s=n.factory||(n.factory=Ho(n.type,!0)),o,a=Wn(Ht);try{let l=id(!1),c=s();return id(l),mv(r,Ne(),i,c),c}finally{Wn(a)}}function H1(e,t){if(t)for(let r=t.length-1;r>=0;r--){let n=t[r];if(e===n.name)return n}}function xn(e,t,r){let n=e+on,i=Ne(),s=bd(i,n);return zS(i,n)?$S(i,Qc(),t,s.transform,r,s):s.transform(r)}function GS(e,t,r,n){let i=e+on,s=Ne(),o=bd(s,i);return zS(s,i)?WS(s,Qc(),t,o.transform,r,n,o):o.transform(r,n)}function zS(e,t){return e[Te].data[t].pure}function qS(e,t){return Bd(e,t)}var da=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(".")}},_v=new da("19.2.0"),j1=(()=>{class e{zone=O(Ve);changeDetectionScheduler=O(Ti);applicationRef=O(pr);_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||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function $1({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:r}){return e??=()=>new Ve(re(w({},W1()),{scheduleInRootZone:r})),[{provide:Ve,useFactory:e},{provide:Bc,multi:!0,useFactory:()=>{let n=O(j1,{optional:!0});return()=>n.initialize()}},{provide:Bc,multi:!0,useFactory:()=>{let n=O(G1);return()=>{n.initialize()}}},t===!0?{provide:SC,useValue:!0}:[],{provide:Wg,useValue:r??CC}]}function W1(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var G1=(()=>{class e{subscription=new dt;initialized=!1;zone=O(Ve);pendingTasks=O(xd);initialize(){if(this.initialized)return;this.initialized=!0;let r=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(r=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ve.assertNotInAngularZone(),queueMicrotask(()=>{r!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(r),r=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ve.assertInAngularZone(),r??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),YS=(()=>{class e{appRef=O(pr);taskService=O(xd);ngZone=O(Ve);zonelessEnabled=O(Td);tracing=O(ga,{optional:!0});disableScheduling=O(SC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new dt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ad):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Wg,{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 cd||!this.zoneIsDefined)}notify(r){if(!this.zonelessEnabled&&r===5)return;let n=!1;switch(r){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,n=!0;break}case 12:{this.appRef.dirtyFlags|=16,n=!0;break}case 13:{this.appRef.dirtyFlags|=2,n=!0;break}case 11:{n=!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(n))return;let i=this.useMicrotaskScheduler?Xw:DC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(r){return!(this.disableScheduling&&!r||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ad+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 r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){throw this.taskService.remove(r),n}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Xw(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let r=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(r)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function KS(){return lo("NgZoneless"),Lb([{provide:Ti,useExisting:YS},{provide:Ve,useClass:cd},{provide:Td,useValue:!0},{provide:Wg,useValue:!1},[]])}function z1(){return typeof $localize<"u"&&$localize.locale||gd}var Ev=new he("",{providedIn:"root",factory:()=>O(Ev,Ze.Optional|Ze.SkipSelf)||z1()}),Cg=new he(""),q1=new he("");function Mc(e){return!e.moduleRef}function Y1(e){let t=Mc(e)?e.r3Injector:e.moduleRef.injector,r=t.get(Ve);return r.run(()=>{Mc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let n=t.get(xi,null),i;if(r.runOutsideAngular(()=>{i=r.onError.subscribe({next:s=>{n.handleError(s)}})}),Mc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(Cg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(Cg);o.add(s),e.moduleRef.onDestroy(()=>{zu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return Z1(n,r,()=>{let s=t.get(kS);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(Ev,gd);if(A1(o||gd),!t.get(q1,!0))return Mc(e)?t.get(pr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Mc(e)){let a=t.get(pr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return K1(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function K1(e,t){let r=e.injector.get(pr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(n=>r.bootstrap(n));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(r);else throw new Ge(-403,!1);t.push(e)}function Z1(e,t,r){try{let n=r();return hv(n)?n.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):n}catch(n){throw t.runOutsideAngular(()=>e.handleError(n)),n}}var qu=null;function X1(e=[],t){return vt.create({name:t,providers:[{provide:yd,useValue:"platform"},{provide:Cg,useValue:new Set([()=>qu=null])},...e]})}function J1(e=[]){if(qu)return qu;let t=X1(e);return qu=t,o1(),Q1(t),t}function Q1(e){let t=e.get(qg,null);Hb(e,()=>{t?.forEach(r=>r())})}var Br=(()=>{class e{static __NG_ELEMENT_ID__=ek}return e})();function ek(e){return tk(tr(),Ne(),(e&16)===16)}function tk(e,t,r){if(pa(e)&&!r){let n=Yr(e.index,t);return new Ko(n,n)}else if(e.type&175){let n=t[Ar];return new Ko(n,t)}return null}function ZS(e){gt(8);try{let{rootComponent:t,appProviders:r,platformProviders:n}=e,i=J1(n),s=[$1({}),{provide:Ti,useExisting:YS},...r||[]],o=new fd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return Y1({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{gt(9)}}function wa(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function wv(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function bv(e){let t=$e(null);try{return e()}finally{$e(t)}}var Cb=class{[Ci];constructor(e){this[Ci]=e}destroy(){this[Ci].destroy()}};function Hd(e,t){let r=$o(e),n=t.elementInjector||_d();return new qc(r).create(n,t.projectableNodes,t.hostElement,t.environmentInjector)}var nk={schedule(e,t){let r=setTimeout(e,t);return()=>clearTimeout(r)}};function rk(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ik(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Cv;function ok(e,t){if(!Cv){let r=Element.prototype;Cv=r.matches||r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Cv.call(e,t):!1}function sk(e){let t={};return e.forEach(({propName:r,templateName:n,transform:i})=>{t[rk(n)]=[r,i]}),t}function ak(e,t){return t.get(so).resolveComponentFactory(e).inputs}function ck(e,t){let r=e.childNodes,n=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=r.length;s<o;++s){let a=r[s],l=lk(a,t,i);l!==-1&&n[l].push(a)}return n}function lk(e,t,r){let n=r;return ik(e)&&t.some((i,s)=>i!=="*"&&ok(e,i)?(n=s,!0):!1),n}var uk=10,Sv=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(so).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Dv(this.componentFactory,e,this.inputMap)}},Dv=class{componentFactory;injector;inputMap;eventEmitters=new Po(1);events=this.eventEmitters.pipe(Qs(e=>eo(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,r){this.componentFactory=e,this.injector=t,this.inputMap=r,this.ngZone=this.injector.get(Ve),this.appRef=this.injector.get(pr),this.cdScheduler=t.get(Ti),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=nk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},uk))})}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=vt.create({providers:[],parent:this.injector}),r=ck(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,r,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:r,templateName:n})=>{let i=e.instance[r];return new nt(s=>{let o=i.subscribe(a=>s.next({name:n,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Iv=class extends HTMLElement{ngElementEventsSubscription=null};function XS(e,t){let r=ak(e,t.injector),n=t.strategyFactory||new Sv(e,t.injector),i=sk(r);class s extends Iv{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=n.create(this.injector||t.injector);r.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,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 r.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var tD=null;function ba(){return tD}function nD(e){tD??=e}var jd=class{},Qe=new he(""),rD=(()=>{class e{historyGo(r){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>O(fk),providedIn:"platform"})}return e})(),fk=(()=>{class e extends rD{_location;_history;_doc=O(Qe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ba().getBaseHref(this._doc)}onPopState(r){let n=ba().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",r,!1),()=>n.removeEventListener("popstate",r)}onHashChange(r){let n=ba().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",r,!1),()=>n.removeEventListener("hashchange",r)}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(r){this._location.pathname=r}pushState(r,n,i){this._history.pushState(r,n,i)}replaceState(r,n,i){this._history.replaceState(r,n,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function iD(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function JS(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function ss(e){return e&&e[0]!=="?"?`?${e}`:e}var xv=(()=>{class e{historyGo(r){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>O(hk),providedIn:"root"})}return e})(),pk=new he(""),hk=(()=>{class e extends xv{_platformLocation;_baseHref;_removeListenerFns=[];constructor(r,n){super(),this._platformLocation=r,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??O(Qe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return iD(this._baseHref,r)}path(r=!1){let n=this._platformLocation.pathname+ss(this._platformLocation.search),i=this._platformLocation.hash;return i&&r?`${n}${i}`:n}pushState(r,n,i,s){let o=this.prepareExternalUrl(i+ss(s));this._platformLocation.pushState(r,n,o)}replaceState(r,n,i,s){let o=this.prepareExternalUrl(i+ss(s));this._platformLocation.replaceState(r,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}static \u0275fac=function(r){return new(r||e)(Xe(rD),Xe(pk,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Rv=(()=>{class e{_subject=new ie;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(r){this._locationStrategy=r;let n=this._locationStrategy.getBaseHref();this._basePath=vk(JS(QS(n))),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(r=!1){return this.normalize(this._locationStrategy.path(r))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(r,n=""){return this.path()==this.normalize(r+ss(n))}normalize(r){return e.stripTrailingSlash(gk(this._basePath,QS(r)))}prepareExternalUrl(r){return r&&r[0]!=="/"&&(r="/"+r),this._locationStrategy.prepareExternalUrl(r)}go(r,n="",i=null){this._locationStrategy.pushState(i,"",r,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+ss(n)),i)}replaceState(r,n="",i=null){this._locationStrategy.replaceState(i,"",r,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+ss(n)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(r=0){this._locationStrategy.historyGo?.(r)}onUrlChange(r){return this._urlChangeListeners.push(r),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(r="",n){this._urlChangeListeners.forEach(i=>i(r,n))}subscribe(r,n,i){return this._subject.subscribe({next:r,error:n??void 0,complete:i??void 0})}static normalizeQueryParams=ss;static joinWithSlash=iD;static stripTrailingSlash=JS;static \u0275fac=function(r){return new(r||e)(Xe(xv))};static \u0275prov=oe({token:e,factory:()=>mk(),providedIn:"root"})}return e})();function mk(){return new Rv(Xe(xv))}function gk(e,t){if(!e||!t.startsWith(e))return t;let r=t.substring(e.length);return r===""||["/",";","?","#"].includes(r[0])?r:t}function QS(e){return e.replace(/\/index.html$/,"")}function vk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function oD(e,t){t=encodeURIComponent(t);for(let r of e.split(";")){let n=r.indexOf("="),[i,s]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Tv=/\s+/,eD=[],Wd=(()=>{class e{_ngEl;_renderer;initialClasses=eD;rawClass;stateMap=new Map;constructor(r,n){this._ngEl=r,this._renderer=n}set klass(r){this.initialClasses=r!=null?r.trim().split(Tv):eD}set ngClass(r){this.rawClass=typeof r=="string"?r.trim().split(Tv):r}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let r=this.rawClass;if(Array.isArray(r)||r instanceof Set)for(let n of r)this._updateState(n,!0);else if(r!=null)for(let n of Object.keys(r))this._updateState(n,!!r[n]);this._applyStateDiff()}_updateState(r,n){let i=this.stateMap.get(r);i!==void 0?(i.enabled!==n&&(i.changed=!0,i.enabled=n),i.touched=!0):this.stateMap.set(r,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let r of this.stateMap){let n=r[0],i=r[1];i.changed?(this._toggleClass(n,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),i.touched=!1}}_toggleClass(r,n){r=r.trim(),r.length>0&&r.split(Tv).forEach(i=>{n?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(r){return new(r||e)(Ht(Ot),Ht(va))};static \u0275dir=Lr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),sD=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(r){this._viewContainerRef=r}ngOnChanges(r){if(this._shouldRecreateView(r)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(r){return!!r.ngTemplateOutlet||!!r.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(r,n,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,i):!1,get:(r,n,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,i)}})}static \u0275fac=function(r){return new(r||e)(Ht(kr))};static \u0275dir=Lr({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Xo]})}return e})(),Nv="browser",yk="server";function aD(e){return e===Nv}function Av(e){return e===yk}var $d=class{},Ov=class extends jd{supportsDOMEvents=!0},Pv=class wD extends Ov{static makeCurrent(){nD(new wD)}onAndCancel(t,r,n,i){return t.addEventListener(r,n,i),()=>{t.removeEventListener(r,n,i)}}dispatchEvent(t,r){t.dispatchEvent(r)}remove(t){t.remove()}createElement(t,r){return r=r||this.getDefaultDocument(),r.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,r){return r==="window"?window:r==="document"?t:r==="body"?t.body:null}getBaseHref(t){let r=Ek();return r==null?null:wk(r)}resetBaseElement(){il=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return oD(document.cookie,t)}},il=null;function Ek(){return il=il||document.querySelector("base"),il?il.getAttribute("href"):null}function wk(e){return new URL(e,document.baseURI).pathname}var bk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),kv=new he(""),pD=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(r,n){this._zone=n,r.forEach(i=>{i.manager=this}),this._plugins=r.slice().reverse()}addEventListener(r,n,i,s){return this._findPluginFor(n).addEventListener(r,n,i,s)}getZone(){return this._zone}_findPluginFor(r){let n=this._eventNameToPlugin.get(r);if(n)return n;if(n=this._plugins.find(i=>i.supports(r)),!n)throw new Ge(5101,!1);return this._eventNameToPlugin.set(r,n),n}static \u0275fac=function(r){return new(r||e)(Xe(kv),Xe(Ve))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),zd=class{_doc;constructor(e){this._doc=e}manager},Gd="ng-app-id";function cD(e){for(let t of e)t.remove()}function lD(e,t){let r=t.createElement("style");return r.textContent=e,r}function Ck(e,t,r,n){let i=e.head?.querySelectorAll(`style[${Gd}="${t}"],link[${Gd}="${t}"]`);if(i)for(let s of i)s.removeAttribute(Gd),s instanceof HTMLLinkElement?n.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&r.set(s.textContent,{usage:0,elements:[s]})}function Lv(e,t){let r=t.createElement("link");return r.setAttribute("rel","stylesheet"),r.setAttribute("href",e),r}var hD=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(r,n,i,s={}){this.doc=r,this.appId=n,this.nonce=i,this.isServer=Av(s),Ck(r,n,this.inline,this.external),this.hosts.add(r.head)}addStyles(r,n){for(let i of r)this.addUsage(i,this.inline,lD);n?.forEach(i=>this.addUsage(i,this.external,Lv))}removeStyles(r,n){for(let i of r)this.removeUsage(i,this.inline);n?.forEach(i=>this.removeUsage(i,this.external))}addUsage(r,n,i){let s=n.get(r);s?s.usage++:n.set(r,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(r,this.doc)))})}removeUsage(r,n){let i=n.get(r);i&&(i.usage--,i.usage<=0&&(cD(i.elements),n.delete(r)))}ngOnDestroy(){for(let[,{elements:r}]of[...this.inline,...this.external])cD(r);this.hosts.clear()}addHost(r){this.hosts.add(r);for(let[n,{elements:i}]of this.inline)i.push(this.addElement(r,lD(n,this.doc)));for(let[n,{elements:i}]of this.external)i.push(this.addElement(r,Lv(n,this.doc)))}removeHost(r){this.hosts.delete(r)}addElement(r,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(Gd,this.appId),r.appendChild(n)}static \u0275fac=function(r){return new(r||e)(Xe(Qe),Xe(tl),Xe(Yg,8),Xe(Qo))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Mv={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"},Bv=/%COMP%/g,mD="%COMP%",Sk=`_nghost-${mD}`,Dk=`_ngcontent-${mD}`,Ik=!0,Tk=new he("",{providedIn:"root",factory:()=>Ik});function xk(e){return Dk.replace(Bv,e)}function Rk(e){return Sk.replace(Bv,e)}function gD(e,t){return t.map(r=>r.replace(Bv,e))}var uD=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(r,n,i,s,o,a,l,c=null,h=null){this.eventManager=r,this.sharedStylesHost=n,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Av(a),this.defaultRenderer=new ol(r,o,l,this.platformIsServer,this.tracingService)}createRenderer(r,n){if(!r||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===Kr.ShadowDom&&(n=re(w({},n),{encapsulation:Kr.Emulated}));let i=this.getOrCreateRenderer(r,n);return i instanceof qd?i.applyToHost(r):i instanceof sl&&i.applyStyles(),i}getOrCreateRenderer(r,n){let i=this.rendererByCompId,s=i.get(n.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(n.encapsulation){case Kr.Emulated:s=new qd(l,c,n,this.appId,h,o,a,d,f);break;case Kr.ShadowDom:return new Fv(l,c,r,n,o,a,this.nonce,d,f);default:s=new sl(l,c,n,h,o,a,d,f);break}i.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(r){this.rendererByCompId.delete(r)}static \u0275fac=function(r){return new(r||e)(Xe(pD),Xe(hD),Xe(tl),Xe(Tk),Xe(Qe),Xe(Qo),Xe(Ve),Xe(Yg),Xe(ga,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),ol=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,r,n,i){this.eventManager=e,this.doc=t,this.ngZone=r,this.platformIsServer=n,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Mv[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(dD(e)?e.content:e).appendChild(t)}insertBefore(e,t,r){e&&(dD(e)?e.content:e).insertBefore(t,r)}removeChild(e,t){t.remove()}selectRootElement(e,t){let r=typeof e=="string"?this.doc.querySelector(e):e;if(!r)throw new Ge(-5104,!1);return t||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,r,n){if(n){t=n+":"+t;let i=Mv[n];i?e.setAttributeNS(i,t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}removeAttribute(e,t,r){if(r){let n=Mv[r];n?e.removeAttributeNS(n,t):e.removeAttribute(`${r}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,r,n){n&(Ni.DashCase|Ni.Important)?e.style.setProperty(t,r,n&Ni.Important?"important":""):e.style[t]=r}removeStyle(e,t,r){r&Ni.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,r){e!=null&&(e[t]=r)}setValue(e,t){e.nodeValue=t}listen(e,t,r,n){if(typeof e=="string"&&(e=ba().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(r);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,n)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function dD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Fv=class extends ol{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,r,n,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=gD(n.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=n.getExternalStyles?.();if(h)for(let d of h){let f=Lv(d,i);o&&f.setAttribute("nonce",o),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,r){return super.insertBefore(this.nodeOrShadowRoot(e),t,r)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},sl=class extends ol{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,r,n,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=n;let c=r.styles;this.styles=l?gD(l,c):c,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},qd=class extends sl{contentAttr;hostAttr;constructor(e,t,r,n,i,s,o,a,l){let c=n+"-"+r.id;super(e,t,r,i,s,o,a,l,c),this.contentAttr=xk(c),this.hostAttr=Rk(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let r=super.createElement(e,t);return super.setAttribute(r,this.contentAttr,""),r}},Nk=(()=>{class e extends zd{constructor(r){super(r)}supports(r){return!0}addEventListener(r,n,i,s){return r.addEventListener(n,i,s),()=>this.removeEventListener(r,n,i,s)}removeEventListener(r,n,i,s){return r.removeEventListener(n,i,s)}static \u0275fac=function(r){return new(r||e)(Xe(Qe))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),fD=["alt","control","meta","shift"],Ak={"\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"},Mk={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Ok=(()=>{class e extends zd{constructor(r){super(r)}supports(r){return e.parseEventName(r)!=null}addEventListener(r,n,i,s){let o=e.parseEventName(n),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ba().onAndCancel(r,o.domEventName,a,s))}static parseEventName(r){let n=r.toLowerCase().split("."),i=n.shift();if(n.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(n.pop()),o="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),o="code."),fD.forEach(c=>{let h=n.indexOf(c);h>-1&&(n.splice(h,1),o+=c+".")}),o+=s,n.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(r,n){let i=Ak[r.key]||r.key,s="";return n.indexOf("code.")>-1&&(i=r.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),fD.forEach(o=>{if(o!==i){let a=Mk[o];a(r)&&(s+=o+".")}}),s+=i,s===n)}static eventCallback(r,n,i){return s=>{e.matchEventFullKeyCode(s,r)&&i.runGuarded(()=>n(s))}}static _normalizeKey(r){return r==="esc"?"escape":r}static \u0275fac=function(r){return new(r||e)(Xe(Qe))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})();function vD(e){return ZS(Pk(e))}function Pk(e){return{appProviders:[...Vk,...e?.providers??[]],platformProviders:Bk}}function kk(){Pv.makeCurrent()}function Lk(){return new xi}function Fk(){return OC(document),document}var Bk=[{provide:Qo,useValue:Nv},{provide:qg,useValue:kk,multi:!0},{provide:Qe,useFactory:Fk,deps:[]}],Vk=[{provide:yd,useValue:"root"},{provide:xi,useFactory:Lk,deps:[]},{provide:kv,useClass:Nk,multi:!0,deps:[Qe]},{provide:kv,useClass:Ok,multi:!0,deps:[Qe]},uD,hD,pD,{provide:dn,useExisting:uD},{provide:$d,useClass:bk,deps:[]},[]],Vv=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:function(r){let n=null;return r?n=new(r||e):n=Xe(Uk),n},providedIn:"root"})}return e})(),Uk=(()=>{class e extends Vv{_doc;constructor(r){super(),this._doc=r}sanitize(r,n){if(n==null)return null;switch(r){case Qr.NONE:return n;case Qr.HTML:return uo(n,"HTML")?Jr(n):Jg(this._doc,String(n)).toString();case Qr.STYLE:return uo(n,"Style")?Jr(n):n;case Qr.SCRIPT:if(uo(n,"Script"))return Jr(n);throw new Ge(5200,!1);case Qr.URL:return uo(n,"URL")?Jr(n):Nd(String(n));case Qr.RESOURCE_URL:if(uo(n,"ResourceURL"))return Jr(n);throw new Ge(5201,!1);default:throw new Ge(5202,!1)}}bypassSecurityTrustHtml(r){return jC(r)}bypassSecurityTrustStyle(r){return $C(r)}bypassSecurityTrustScript(r){return WC(r)}bypassSecurityTrustUrl(r){return GC(r)}bypassSecurityTrustResourceUrl(r){return zC(r)}static \u0275fac=function(r){return new(r||e)(Xe(Qe))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),yD="9.6.11",k=class Hh{static SDK_VERSION=yD;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_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";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 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=Hh.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");Hh.SDK_VERSION_CODE=parseInt(t,10)}},Rn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},nr=Pe(ls()),C=class{static log(...e){nr.default.info(...e)}static debug(...e){nr.default.debug(...e)}static error(...e){nr.default.error(...e)}static warn(...e){nr.default.warn(...e)}static info(...e){nr.default.info(...e)}static trace(...e){nr.default.trace(...e)}static configure(e=k.LOG_PREFIX){nr.default.useDefaults({formatter:function(r){r.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?nr.default.setLevel(nr.default[localStorage.cooeeLogLevel]):nr.default.setLevel(Rn.debug?nr.default.TRACE:nr.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%);
@@ -19,38 +19,38 @@ ${t.map((r,n)=>`${n+1}) ${r.toString()}`).join(`
19
19
  `,t+=`
20
20
 
21
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()}},wD={providers:[ZS()]},Vf=Pe(Yn()),wt=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}},Kd=class{static format(e,t){let r=/{{\s*(\w+)\s*}}/;return t.replace(r,(n,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 n}})}static formatWithDelimiters(e,t=2,r=",",n="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),o=i[1]?n+i[1]:"";return s+o}},pn=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}},ke=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;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 pn(e)}},EI=Pe(Sa()),jv=Pe(QD());function Da(e){return jv.default.createInstance({name:"lc",storeName:e,driver:jv.default.LOCALSTORAGE})}var mo=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}},rt=class extends mo{static storeName="usr";static{this.storage=Da(this.storeName)}},ge=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"},hn=class extends mo{static storeName="ses";static{this.storage=Da(this.storeName)}},e0=Object.prototype.toString;function us(e){switch(e0.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ni(e,Error)}}function Ia(e,t){return e0.call(e)===`[object ${t}]`}function Xd(e){return Ia(e,"ErrorEvent")}function Jd(e){return Ia(e,"DOMError")}function $v(e){return Ia(e,"DOMException")}function kn(e){return Ia(e,"String")}function Ta(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ds(e){return e===null||Ta(e)||typeof e!="object"&&typeof e!="function"}function Vr(e){return Ia(e,"Object")}function fs(e){return typeof Event<"u"&&ni(e,Event)}function Wv(e){return typeof Element<"u"&&ni(e,Element)}function Gv(e){return Ia(e,"RegExp")}function Vi(e){return!!(e&&e.then&&typeof e.then=="function")}function zv(e){return Vr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ni(e,t){try{return e instanceof t}catch{return!1}}function al(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ri(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Qd(e,t){if(!Array.isArray(e))return"";let r=[];for(let n=0;n<e.length;n++){let i=e[n];try{al(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function t0(e,t,r=!1){return kn(e)?Gv(t)?t.test(e):kn(t)?r?e===t:e.includes(t):!1:!1}function xa(e,t=[],r=!1){return t.some(n=>t0(e,n,r))}function Yv(e,t,r=250,n,i,s,o){if(!s.exception||!s.exception.values||!o||!ni(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=Gk(qv(e,t,i,o.originalException,n,s.exception.values,a,0),r))}function qv(e,t,r,n,i,s,o,a){if(s.length>=r+1)return s;let l=[...s];if(ni(n[i],Error)){n0(o,a);let c=e(t,n[i]),h=l.length;r0(c,i,h,a),l=qv(e,t,r,n[i],i,[c,...l],c,h)}return Array.isArray(n.errors)&&n.errors.forEach((c,h)=>{if(ni(c,Error)){n0(o,a);let d=e(t,c),f=l.length;r0(d,`errors[${h}]`,f,a),l=qv(e,t,r,c,i,[d,...l],d,f)}}),l}function n0(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function r0(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w({},e.mechanism),{type:"chained",source:t,exception_id:r,parent_id:n})}function Gk(e,t){return e.map(r=>(r.value&&(r.value=ri(r.value,t)),r))}var gr="8.18.0",_e=globalThis;function Ra(e,t,r){let n=r||_e,i=n.__SENTRY__=n.__SENTRY__||{},s=i[gr]=i[gr]||{};return s[e]||(s[e]=t())}var Kv=_e,zk=80;function cl(e,t={}){if(!e)return"<unknown>";try{let r=e,n=5,i=[],s=0,o=0,a=" > ",l=a.length,c,h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||zk;for(;r&&s++<n&&(c=qk(r,h),!(c==="html"||s>1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,r=r.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function qk(e,t){let r=e,n=[];if(!r||!r.tagName)return"";if(Kv.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let i=t&&t.length?t.filter(o=>r.getAttribute(o)).map(o=>[o,r.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let o=r.className;if(o&&kn(o)){let a=o.split(/\s+/);for(let l of a)n.push(`.${l}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let a=r.getAttribute(o);a&&n.push(`[${o}="${a}"]`)}return n.join("")}function Zv(){try{return Kv.document.location.href}catch{return""}}function Xv(e){if(!Kv.HTMLElement)return null;let t=e,r=5;for(let n=0;n<r;n++){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 ii=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yk="Sentry Logger ",ll=["debug","info","warn","error","log","assert","trace"],Na={};function Aa(e){if(!("console"in _e))return e();let t=_e.console,r={},n=Object.keys(Na);n.forEach(i=>{let s=Na[i];r[i]=t[i],t[i]=s});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function Kk(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ii?ll.forEach(r=>{t[r]=(...n)=>{e&&Aa(()=>{_e.console[r](`${Yk}[${r}]:`,...n)})}}):ll.forEach(r=>{t[r]=()=>{}}),t}var se=Kk(),Zk=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Xk(e){return e==="http"||e==="https"}function oi(e,t=!1){let{host:r,path:n,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${r}${s?`:${s}`:""}/${n&&`${n}/`}${o}`}function i0(e){let t=Zk.exec(e);if(!t){Aa(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[r,n,i="",s="",o="",a=""]=t.slice(1),l="",c=a,h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return o0({host:s,pass:i,path:l,projectId:c,port:o,protocol:r,publicKey:n})}function o0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Jk(e){if(!ii)return!0;let{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(se.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:r.match(/^\d+$/)?Xk(n)?t&&isNaN(parseInt(t,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function ef(e){let t=typeof e=="string"?i0(e):o0(e);if(!(!t||!Jk(t)))return t}var Nn=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 Pt(e,t,r){if(!(t in e))return;let n=e[t],i=r(n);typeof i=="function"&&tf(i,n),e[t]=i}function Ln(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{ii&&se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function tf(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,Ln(e,"__sentry_original__",t)}catch{}}function ps(e){return e.__sentry_original__}function Qv(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function nf(e){if(us(e))return w({message:e.message,name:e.name,stack:e.stack},a0(e));if(fs(e)){let t=w({type:e.type,target:s0(e.target),currentTarget:s0(e.currentTarget)},a0(e));return typeof CustomEvent<"u"&&ni(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function s0(e){try{return Wv(e)?cl(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function a0(e){if(typeof e=="object"&&e!==null){let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function ey(e,t=40){let r=Object.keys(nf(e));r.sort();let n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return ri(n,t);for(let i=r.length;i>0;i--){let s=r.slice(0,i).join(", ");if(!(s.length>t))return i===r.length?s:ri(s,t)}return""}function on(e){return Jv(e,new Map)}function Jv(e,t){if(Qk(e)){let r=t.get(e);if(r!==void 0)return r;let n={};t.set(e,n);for(let i of Object.keys(e))typeof e[i]<"u"&&(n[i]=Jv(e[i],t));return n}if(Array.isArray(e)){let r=t.get(e);if(r!==void 0)return r;let n=[];return t.set(e,n),e.forEach(i=>{n.push(Jv(i,t))}),n}return e}function Qk(e){if(!Vr(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var si="?",c0=/\(error: (.*)\)/,l0=/captureMessage|captureException/;function ny(...e){let t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,i=0)=>{let s=[],o=r.split(`
23
- `);for(let a=n;a<o.length;a++){let l=o[a];if(l.length>1024)continue;let c=c0.test(l)?l.replace(c0,"$1"):l;if(!c.match(/\S*Error: /)){for(let h of t){let d=h(c);if(d){s.push(d);break}}if(s.length>=50+i)break}}return u0(s.slice(i))}}function u0(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(rf(t).function||"")&&t.pop(),t.reverse(),l0.test(rf(t).function||"")&&(t.pop(),l0.test(rf(t).function||"")&&t.pop()),t.slice(0,50).map(r=>re(w({},r),{filename:r.filename||rf(t).filename,function:r.function||si}))}function rf(e){return e[e.length-1]||{}}var ty="<anonymous>";function vr(e){try{return!e||typeof e!="function"?ty:e.name||ty}catch{return ty}}function of(e){let t=e.exception;if(t){let r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}var sf={},d0={};function Fn(e,t){sf[e]=sf[e]||[],sf[e].push(t)}function Bn(e,t){d0[e]||(t(),d0[e]=!0)}function sn(e,t){let r=e&&sf[e];if(r)for(let n of r)try{n(t)}catch(i){ii&&se.error(`Error while triggering instrumentation handler.
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()}},ED={providers:[KS()]},Vf=Pe(Yn()),wt=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}},Kd=class{static format(e,t){let r=/{{\s*(\w+)\s*}}/;return t.replace(r,(n,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 n}})}static formatWithDelimiters(e,t=2,r=",",n="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),o=i[1]?n+i[1]:"";return s+o}},hn=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}},ke=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;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 hn(e)}},_I=Pe(Sa()),Hv=Pe(JD());function Da(e){return Hv.default.createInstance({name:"lc",storeName:e,driver:Hv.default.LOCALSTORAGE})}var mo=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}},rt=class extends mo{static storeName="usr";static{this.storage=Da(this.storeName)}},ge=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"},mn=class extends mo{static storeName="ses";static{this.storage=Da(this.storeName)}},QD=Object.prototype.toString;function us(e){switch(QD.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ni(e,Error)}}function Ia(e,t){return QD.call(e)===`[object ${t}]`}function Xd(e){return Ia(e,"ErrorEvent")}function Jd(e){return Ia(e,"DOMError")}function jv(e){return Ia(e,"DOMException")}function kn(e){return Ia(e,"String")}function Ta(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ds(e){return e===null||Ta(e)||typeof e!="object"&&typeof e!="function"}function Vr(e){return Ia(e,"Object")}function fs(e){return typeof Event<"u"&&ni(e,Event)}function $v(e){return typeof Element<"u"&&ni(e,Element)}function Wv(e){return Ia(e,"RegExp")}function Vi(e){return!!(e&&e.then&&typeof e.then=="function")}function Gv(e){return Vr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ni(e,t){try{return e instanceof t}catch{return!1}}function al(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ri(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Qd(e,t){if(!Array.isArray(e))return"";let r=[];for(let n=0;n<e.length;n++){let i=e[n];try{al(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function e0(e,t,r=!1){return kn(e)?Wv(t)?t.test(e):kn(t)?r?e===t:e.includes(t):!1:!1}function xa(e,t=[],r=!1){return t.some(n=>e0(e,n,r))}function qv(e,t,r=250,n,i,s,o){if(!s.exception||!s.exception.values||!o||!ni(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=Wk(zv(e,t,i,o.originalException,n,s.exception.values,a,0),r))}function zv(e,t,r,n,i,s,o,a){if(s.length>=r+1)return s;let l=[...s];if(ni(n[i],Error)){t0(o,a);let c=e(t,n[i]),h=l.length;n0(c,i,h,a),l=zv(e,t,r,n[i],i,[c,...l],c,h)}return Array.isArray(n.errors)&&n.errors.forEach((c,h)=>{if(ni(c,Error)){t0(o,a);let d=e(t,c),f=l.length;n0(d,`errors[${h}]`,f,a),l=zv(e,t,r,c,i,[d,...l],d,f)}}),l}function t0(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function n0(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w({},e.mechanism),{type:"chained",source:t,exception_id:r,parent_id:n})}function Wk(e,t){return e.map(r=>(r.value&&(r.value=ri(r.value,t)),r))}var gr="8.18.0",_e=globalThis;function Ra(e,t,r){let n=r||_e,i=n.__SENTRY__=n.__SENTRY__||{},s=i[gr]=i[gr]||{};return s[e]||(s[e]=t())}var Yv=_e,Gk=80;function cl(e,t={}){if(!e)return"<unknown>";try{let r=e,n=5,i=[],s=0,o=0,a=" > ",l=a.length,c,h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Gk;for(;r&&s++<n&&(c=zk(r,h),!(c==="html"||s>1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,r=r.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function zk(e,t){let r=e,n=[];if(!r||!r.tagName)return"";if(Yv.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let i=t&&t.length?t.filter(o=>r.getAttribute(o)).map(o=>[o,r.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let o=r.className;if(o&&kn(o)){let a=o.split(/\s+/);for(let l of a)n.push(`.${l}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let a=r.getAttribute(o);a&&n.push(`[${o}="${a}"]`)}return n.join("")}function Kv(){try{return Yv.document.location.href}catch{return""}}function Zv(e){if(!Yv.HTMLElement)return null;let t=e,r=5;for(let n=0;n<r;n++){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 ii=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qk="Sentry Logger ",ll=["debug","info","warn","error","log","assert","trace"],Na={};function Aa(e){if(!("console"in _e))return e();let t=_e.console,r={},n=Object.keys(Na);n.forEach(i=>{let s=Na[i];r[i]=t[i],t[i]=s});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function Yk(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ii?ll.forEach(r=>{t[r]=(...n)=>{e&&Aa(()=>{_e.console[r](`${qk}[${r}]:`,...n)})}}):ll.forEach(r=>{t[r]=()=>{}}),t}var se=Yk(),Kk=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Zk(e){return e==="http"||e==="https"}function oi(e,t=!1){let{host:r,path:n,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${r}${s?`:${s}`:""}/${n&&`${n}/`}${o}`}function r0(e){let t=Kk.exec(e);if(!t){Aa(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[r,n,i="",s="",o="",a=""]=t.slice(1),l="",c=a,h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return i0({host:s,pass:i,path:l,projectId:c,port:o,protocol:r,publicKey:n})}function i0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Xk(e){if(!ii)return!0;let{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(se.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:r.match(/^\d+$/)?Zk(n)?t&&isNaN(parseInt(t,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function ef(e){let t=typeof e=="string"?r0(e):i0(e);if(!(!t||!Xk(t)))return t}var Nn=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 kt(e,t,r){if(!(t in e))return;let n=e[t],i=r(n);typeof i=="function"&&tf(i,n),e[t]=i}function Ln(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{ii&&se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function tf(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,Ln(e,"__sentry_original__",t)}catch{}}function ps(e){return e.__sentry_original__}function Jv(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function nf(e){if(us(e))return w({message:e.message,name:e.name,stack:e.stack},s0(e));if(fs(e)){let t=w({type:e.type,target:o0(e.target),currentTarget:o0(e.currentTarget)},s0(e));return typeof CustomEvent<"u"&&ni(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function o0(e){try{return $v(e)?cl(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function s0(e){if(typeof e=="object"&&e!==null){let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function Qv(e,t=40){let r=Object.keys(nf(e));r.sort();let n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return ri(n,t);for(let i=r.length;i>0;i--){let s=r.slice(0,i).join(", ");if(!(s.length>t))return i===r.length?s:ri(s,t)}return""}function sn(e){return Xv(e,new Map)}function Xv(e,t){if(Jk(e)){let r=t.get(e);if(r!==void 0)return r;let n={};t.set(e,n);for(let i of Object.keys(e))typeof e[i]<"u"&&(n[i]=Xv(e[i],t));return n}if(Array.isArray(e)){let r=t.get(e);if(r!==void 0)return r;let n=[];return t.set(e,n),e.forEach(i=>{n.push(Xv(i,t))}),n}return e}function Jk(e){if(!Vr(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var si="?",a0=/\(error: (.*)\)/,c0=/captureMessage|captureException/;function ty(...e){let t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,i=0)=>{let s=[],o=r.split(`
23
+ `);for(let a=n;a<o.length;a++){let l=o[a];if(l.length>1024)continue;let c=a0.test(l)?l.replace(a0,"$1"):l;if(!c.match(/\S*Error: /)){for(let h of t){let d=h(c);if(d){s.push(d);break}}if(s.length>=50+i)break}}return l0(s.slice(i))}}function l0(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(rf(t).function||"")&&t.pop(),t.reverse(),c0.test(rf(t).function||"")&&(t.pop(),c0.test(rf(t).function||"")&&t.pop()),t.slice(0,50).map(r=>re(w({},r),{filename:r.filename||rf(t).filename,function:r.function||si}))}function rf(e){return e[e.length-1]||{}}var ey="<anonymous>";function vr(e){try{return!e||typeof e!="function"?ey:e.name||ey}catch{return ey}}function of(e){let t=e.exception;if(t){let r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}var sf={},u0={};function Fn(e,t){sf[e]=sf[e]||[],sf[e].push(t)}function Bn(e,t){u0[e]||(t(),u0[e]=!0)}function an(e,t){let r=e&&sf[e];if(r)for(let n of r)try{n(t)}catch(i){ii&&se.error(`Error while triggering instrumentation handler.
24
24
  Type: ${e}
25
25
  Name: ${vr(n)}
26
- Error:`,i)}}function ry(e){let t="console";Fn(t,e),Bn(t,eL)}function eL(){"console"in _e&&ll.forEach(function(e){e in _e.console&&Pt(_e.console,e,function(t){return Na[e]=t,function(...r){sn("console",{args:r,level:e});let n=Na[e];n&&n.apply(_e.console,r)}})})}var iy=_e;function f0(){if(!("fetch"in iy))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ul(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function oy(){if(typeof EdgeRuntime=="string")return!0;if(!f0())return!1;if(ul(iy.fetch))return!0;let e=!1,t=iy.document;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=ul(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){ii&&se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}var p0=1e3;function ai(){return Date.now()/p0}function tL(){let{performance:e}=_e;if(!e||!e.now)return ai;let t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/p0}var rr=tL(),dl,nL=(()=>{let{performance:e}=_e;if(!e||!e.now){dl="none";return}let t=3600*1e3,r=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,s=i<t,o=e.timing&&e.timing.navigationStart,a=typeof o=="number"?Math.abs(o+r-n):t,l=a<t;return s||l?i<=a?(dl="timeOrigin",e.timeOrigin):(dl="navigationStart",o):(dl="dateNow",n)})();function ay(e){let t="fetch";Fn(t,e),Bn(t,rL)}function rL(){oy()&&Pt(_e,"fetch",function(e){return function(...t){let{method:r,url:n}=iL(t),i={args:t,fetchData:{method:r,url:n},startTimestamp:rr()*1e3};sn("fetch",w({},i));let s=new Error().stack;return e.apply(_e,t).then(o=>{let a=re(w({},i),{endTimestamp:rr()*1e3,response:o});return sn("fetch",a),o},o=>{let a=re(w({},i),{endTimestamp:rr()*1e3,error:o});throw sn("fetch",a),us(o)&&o.stack===void 0&&(o.stack=s,Ln(o,"framesToPop",1)),o})}})}function sy(e,t){return!!e&&typeof e=="object"&&!!e[t]}function h0(e){return typeof e=="string"?e:e?sy(e,"url")?e.url:e.toString?e.toString():"":""}function iL(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[r,n]=e;return{url:h0(r),method:sy(n,"method")?String(n.method).toUpperCase():"GET"}}let t=e[0];return{url:h0(t),method:sy(t,"method")?String(t.method).toUpperCase():"GET"}}var af=null;function cy(e){let t="error";Fn(t,e),Bn(t,oL)}function oL(){af=_e.onerror,_e.onerror=function(e,t,r,n,i){return sn("error",{column:n,error:i,line:r,msg:e,url:t}),af&&!af.__SENTRY_LOADER__?af.apply(this,arguments):!1},_e.onerror.__SENTRY_INSTRUMENTED__=!0}var cf=null;function ly(e){let t="unhandledrejection";Fn(t,e),Bn(t,sL)}function sL(){cf=_e.onunhandledrejection,_e.onunhandledrejection=function(e){return sn("unhandledrejection",e),cf&&!cf.__SENTRY_LOADER__?cf.apply(this,arguments):!0},_e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function uy(){return"npm"}function m0(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let s=0;s<t.length;s++)if(t[s]===i)return!0;return t.push(i),!1}function n(i){if(e)t.delete(i);else for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}}return[r,n]}function mn(){let e=_e,t=e.crypto||e.msCrypto,r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{let n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function g0(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ur(e){let{message:t,event_id:r}=e;if(t)return t;let n=g0(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Ma(e,t,r){let n=e.exception=e.exception||{},i=n.values=n.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=r||"Error")}function Ui(e,t){let r=g0(e);if(!r)return;let n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism=w(w(w({},n),i),t),t&&"data"in t){let s=w(w({},i&&i.data),t.data);r.mechanism.data=s}}function lf(e){if(e&&e.__sentry_captured__)return!0;try{Ln(e,"__sentry_captured__",!0)}catch{}return!1}function uf(e){return Array.isArray(e)?e:[e]}function Hr(e,t=100,r=1/0){try{return dy("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function df(e,t=3,r=100*1024){let n=Hr(e,t);return uL(n)>r?df(e,t-1,r):n}function dy(e,t,r=1/0,n=1/0,i=m0()){let[s,o]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let a=aL(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__:r;if(l===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let c=t;if(c&&typeof c.toJSON=="function")try{let g=c.toJSON();return dy("",g,l-1,n,i)}catch{}let h=Array.isArray(t)?[]:{},d=0,f=nf(t);for(let g in f){if(!Object.prototype.hasOwnProperty.call(f,g))continue;if(d>=n){h[g]="[MaxProperties ~]";break}let m=f[g];h[g]=dy(g,m,l-1,n,i),d++}return o(t),h}function aL(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(al(t))return"[VueViewModel]";if(zv(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${vr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let r=cL(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function cL(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function lL(e){return~-encodeURI(e).split(/%..|./).length}function uL(e){return lL(JSON.stringify(e))}var Hi;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let r=2;e[e.REJECTED=r]="REJECTED"})(Hi||(Hi={}));function yr(e){return new jr(t=>{t(e)})}function go(e){return new jr((t,r)=>{r(e)})}var jr=class as{constructor(t){as.prototype.__init.call(this),as.prototype.__init2.call(this),as.prototype.__init3.call(this),as.prototype.__init4.call(this),this._state=Hi.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new as((n,i)=>{this._handlers.push([!1,s=>{if(!t)n(s);else try{n(t(s))}catch(o){i(o)}},s=>{if(!r)i(s);else try{n(r(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new as((r,n)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){n(i);return}r(i)})})}__init(){this._resolve=t=>{this._setResult(Hi.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Hi.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===Hi.PENDING){if(Vi(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Hi.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===Hi.RESOLVED&&r[1](this._value),this._state===Hi.REJECTED&&r[2](this._value),r[0]=!0)})}}};function fy(e){let t=[];function r(){return e===void 0||t.length<e}function n(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!r())return go(new Nn("Not adding Promise because buffer limit was reached."));let a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>n(a)).then(null,()=>n(a).then(null,()=>{})),a}function s(o){return new jr((a,l)=>{let c=t.length;if(!c)return a(!0);let h=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{yr(d).then(()=>{--c||(clearTimeout(h),a(!0))},l)})})}return{$:t,add:i,drain:s}}function fl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}var v0=["fatal","error","warning","log","info","debug"];function py(e){return e==="warn"?"warning":v0.includes(e)?e:"log"}var _0="sentry-",E0=/^sentry-/;function hy(e){let t=w0(e);if(!t)return;let r=Object.entries(t).reduce((n,[i,s])=>{if(i.match(E0)){let o=i.slice(_0.length);n[o]=s}return n},{});if(Object.keys(r).length>0)return r}function w0(e){if(!(!e||!kn(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{let n=y0(r);return Object.entries(n).forEach(([i,s])=>{t[i]=s}),t},{}):y0(e)}function y0(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}function ci(e,t=[]){return[e,t]}function gy(e,t){let[r,n]=e;return[r,[...n,t]]}function ff(e,t){let r=e[1];for(let n of r){let i=n[0].type;if(t(n,i))return!0}return!1}function my(e){return _e.__SENTRY__&&_e.__SENTRY__.encodePolyfill?_e.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function vy(e){let[t,r]=e,n=JSON.stringify(t);function i(s){typeof n=="string"?n=typeof s=="string"?n+s:[my(n),s]:n.push(typeof s=="string"?my(s):s)}for(let s of r){let[o,a]=s;if(i(`
26
+ Error:`,i)}}function ny(e){let t="console";Fn(t,e),Bn(t,Qk)}function Qk(){"console"in _e&&ll.forEach(function(e){e in _e.console&&kt(_e.console,e,function(t){return Na[e]=t,function(...r){an("console",{args:r,level:e});let n=Na[e];n&&n.apply(_e.console,r)}})})}var ry=_e;function d0(){if(!("fetch"in ry))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ul(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function iy(){if(typeof EdgeRuntime=="string")return!0;if(!d0())return!1;if(ul(ry.fetch))return!0;let e=!1,t=ry.document;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=ul(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){ii&&se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}var f0=1e3;function ai(){return Date.now()/f0}function eL(){let{performance:e}=_e;if(!e||!e.now)return ai;let t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/f0}var rr=eL(),dl,tL=(()=>{let{performance:e}=_e;if(!e||!e.now){dl="none";return}let t=3600*1e3,r=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,s=i<t,o=e.timing&&e.timing.navigationStart,a=typeof o=="number"?Math.abs(o+r-n):t,l=a<t;return s||l?i<=a?(dl="timeOrigin",e.timeOrigin):(dl="navigationStart",o):(dl="dateNow",n)})();function sy(e){let t="fetch";Fn(t,e),Bn(t,nL)}function nL(){iy()&&kt(_e,"fetch",function(e){return function(...t){let{method:r,url:n}=rL(t),i={args:t,fetchData:{method:r,url:n},startTimestamp:rr()*1e3};an("fetch",w({},i));let s=new Error().stack;return e.apply(_e,t).then(o=>{let a=re(w({},i),{endTimestamp:rr()*1e3,response:o});return an("fetch",a),o},o=>{let a=re(w({},i),{endTimestamp:rr()*1e3,error:o});throw an("fetch",a),us(o)&&o.stack===void 0&&(o.stack=s,Ln(o,"framesToPop",1)),o})}})}function oy(e,t){return!!e&&typeof e=="object"&&!!e[t]}function p0(e){return typeof e=="string"?e:e?oy(e,"url")?e.url:e.toString?e.toString():"":""}function rL(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[r,n]=e;return{url:p0(r),method:oy(n,"method")?String(n.method).toUpperCase():"GET"}}let t=e[0];return{url:p0(t),method:oy(t,"method")?String(t.method).toUpperCase():"GET"}}var af=null;function ay(e){let t="error";Fn(t,e),Bn(t,iL)}function iL(){af=_e.onerror,_e.onerror=function(e,t,r,n,i){return an("error",{column:n,error:i,line:r,msg:e,url:t}),af&&!af.__SENTRY_LOADER__?af.apply(this,arguments):!1},_e.onerror.__SENTRY_INSTRUMENTED__=!0}var cf=null;function cy(e){let t="unhandledrejection";Fn(t,e),Bn(t,oL)}function oL(){cf=_e.onunhandledrejection,_e.onunhandledrejection=function(e){return an("unhandledrejection",e),cf&&!cf.__SENTRY_LOADER__?cf.apply(this,arguments):!0},_e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ly(){return"npm"}function h0(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let s=0;s<t.length;s++)if(t[s]===i)return!0;return t.push(i),!1}function n(i){if(e)t.delete(i);else for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}}return[r,n]}function gn(){let e=_e,t=e.crypto||e.msCrypto,r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{let n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function m0(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ur(e){let{message:t,event_id:r}=e;if(t)return t;let n=m0(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Ma(e,t,r){let n=e.exception=e.exception||{},i=n.values=n.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=r||"Error")}function Ui(e,t){let r=m0(e);if(!r)return;let n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism=w(w(w({},n),i),t),t&&"data"in t){let s=w(w({},i&&i.data),t.data);r.mechanism.data=s}}function lf(e){if(e&&e.__sentry_captured__)return!0;try{Ln(e,"__sentry_captured__",!0)}catch{}return!1}function uf(e){return Array.isArray(e)?e:[e]}function Hr(e,t=100,r=1/0){try{return uy("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function df(e,t=3,r=100*1024){let n=Hr(e,t);return lL(n)>r?df(e,t-1,r):n}function uy(e,t,r=1/0,n=1/0,i=h0()){let[s,o]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let a=sL(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__:r;if(l===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let c=t;if(c&&typeof c.toJSON=="function")try{let g=c.toJSON();return uy("",g,l-1,n,i)}catch{}let h=Array.isArray(t)?[]:{},d=0,f=nf(t);for(let g in f){if(!Object.prototype.hasOwnProperty.call(f,g))continue;if(d>=n){h[g]="[MaxProperties ~]";break}let m=f[g];h[g]=uy(g,m,l-1,n,i),d++}return o(t),h}function sL(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(al(t))return"[VueViewModel]";if(Gv(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${vr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let r=aL(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function aL(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function cL(e){return~-encodeURI(e).split(/%..|./).length}function lL(e){return cL(JSON.stringify(e))}var Hi;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let r=2;e[e.REJECTED=r]="REJECTED"})(Hi||(Hi={}));function yr(e){return new jr(t=>{t(e)})}function go(e){return new jr((t,r)=>{r(e)})}var jr=class as{constructor(t){as.prototype.__init.call(this),as.prototype.__init2.call(this),as.prototype.__init3.call(this),as.prototype.__init4.call(this),this._state=Hi.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new as((n,i)=>{this._handlers.push([!1,s=>{if(!t)n(s);else try{n(t(s))}catch(o){i(o)}},s=>{if(!r)i(s);else try{n(r(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new as((r,n)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){n(i);return}r(i)})})}__init(){this._resolve=t=>{this._setResult(Hi.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Hi.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===Hi.PENDING){if(Vi(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Hi.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===Hi.RESOLVED&&r[1](this._value),this._state===Hi.REJECTED&&r[2](this._value),r[0]=!0)})}}};function dy(e){let t=[];function r(){return e===void 0||t.length<e}function n(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!r())return go(new Nn("Not adding Promise because buffer limit was reached."));let a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>n(a)).then(null,()=>n(a).then(null,()=>{})),a}function s(o){return new jr((a,l)=>{let c=t.length;if(!c)return a(!0);let h=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{yr(d).then(()=>{--c||(clearTimeout(h),a(!0))},l)})})}return{$:t,add:i,drain:s}}function fl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}var g0=["fatal","error","warning","log","info","debug"];function fy(e){return e==="warn"?"warning":g0.includes(e)?e:"log"}var y0="sentry-",_0=/^sentry-/;function py(e){let t=E0(e);if(!t)return;let r=Object.entries(t).reduce((n,[i,s])=>{if(i.match(_0)){let o=i.slice(y0.length);n[o]=s}return n},{});if(Object.keys(r).length>0)return r}function E0(e){if(!(!e||!kn(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{let n=v0(r);return Object.entries(n).forEach(([i,s])=>{t[i]=s}),t},{}):v0(e)}function v0(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}function ci(e,t=[]){return[e,t]}function my(e,t){let[r,n]=e;return[r,[...n,t]]}function ff(e,t){let r=e[1];for(let n of r){let i=n[0].type;if(t(n,i))return!0}return!1}function hy(e){return _e.__SENTRY__&&_e.__SENTRY__.encodePolyfill?_e.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function gy(e){let[t,r]=e,n=JSON.stringify(t);function i(s){typeof n=="string"?n=typeof s=="string"?n+s:[hy(n),s]:n.push(typeof s=="string"?hy(s):s)}for(let s of r){let[o,a]=s;if(i(`
27
27
  ${JSON.stringify(o)}
28
- `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Hr(a))}i(l)}}return typeof n=="string"?n:dL(n)}function dL(e){let t=e.reduce((i,s)=>i+s.length,0),r=new Uint8Array(t),n=0;for(let i of e)r.set(i,n),n+=i.length;return r}function yy(e){let t=typeof e.data=="string"?my(e.data):e.data;return[on({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var fL={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 pf(e){return fL[e]}function hf(e){if(!e||!e.sdk)return;let{name:t,version:r}=e.sdk;return{name:t,version:r}}function _y(e,t,r,n){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return w(w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!r&&n&&{dsn:oi(n)}),i&&{trace:on(w({},i))})}function Ey(e,t,r){let n=[{type:"client_report"},{timestamp:r||ai(),discarded_events:e}];return ci(t?{dsn:t}:{},[n])}function b0(e,t=Date.now()){let r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${e}`);return isNaN(n)?6e4:n-t}function C0(e,t){return e[t]||e.all||0}function wy(e,t,r=Date.now()){return C0(e,t)>r}function by(e,{statusCode:t,headers:r},n=Date.now()){let i=w({},e),s=r&&r["x-sentry-rate-limits"],o=r&&r["retry-after"];if(s)for(let a of s.trim().split(",")){let[l,c,,,h]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=n+f;else for(let g of c.split(";"))g==="metric_bucket"?(!h||h.split(";").includes("custom"))&&(i[g]=n+f):i[g]=n+f}else o?i.all=n+b0(o,n):t===429&&(i.all=n+60*1e3);return i}function mf(){return{traceId:mn(),spanId:mn().substring(16)}}var gf=_e;function Cy(){let e=gf.chrome,t=e&&e.app&&e.app.runtime,r="history"in gf&&!!gf.history.pushState&&!!gf.history.replaceState;return!t&&r}var mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function hs(){return pl(_e),_e}function pl(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||gr,t[gr]=t[gr]||{}}function hl(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||rr(),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:mn()),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 r=e.timestamp-e.started;e.duration=r>=0?r: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 Sy="_sentrySpan";function Dy(e,t){t?Ln(e,Sy,t):delete e[Sy]}function Iy(e){return e[Sy]}var mL=100,Ty=class SD{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=mf()}clone(){let t=new SD;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,Dy(t,Iy(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&&hl(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,r){return this._tags=re(w({},this._tags),{[t]:r}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=w(w({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,r){return this._extra=re(w({},this._extra),{[t]:r}),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,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,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 r=typeof t=="function"?t(this):t,[n,i]=r instanceof An?[r.getScopeData(),r.getRequestSession()]:Vr(r)?[t,t.requestSession]:[],{tags:s,extra:o,user:a,contexts:l,level:c,fingerprint:h=[],propagationContext:d}=n||{};return this._tags=w(w({},this._tags),s),this._extra=w(w({},this._extra),o),this._contexts=w(w({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),h.length&&(this._fingerprint=h),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,Dy(this,void 0),this._attachments=[],this._propagationContext=mf(),this._notifyScopeListeners(),this}addBreadcrumb(t,r){let n=typeof r=="number"?r:mL;if(n<=0)return this;let i=w({timestamp:ai()},t),s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>n?s.slice(-n):s,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:Iy(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,r){let n=r&&r.event_id?r.event_id:mn();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),n;let i=new Error("Sentry syntheticException");return this._client.captureException(t,re(w({originalException:t,syntheticException:i},r),{event_id:n}),this),n}captureMessage(t,r,n){let i=n&&n.event_id?n.event_id:mn();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let s=new Error(t);return this._client.captureMessage(t,r,re(w({originalException:t,syntheticException:s},n),{event_id:i}),this),i}captureEvent(t,r){let n=r&&r.event_id?r.event_id:mn();return this._client?(this._client.captureEvent(t,re(w({},r),{event_id:n}),this),n):(se.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},An=Ty;function S0(){return Ra("defaultCurrentScope",()=>new An)}function D0(){return Ra("defaultIsolationScope",()=>new An)}var xy=class{constructor(e,t){let r;e?r=e:r=new An;let n;t?n=t:n=new An,this._stack=[{scope:r}],this._isolationScope=n}withScope(e){let t=this._pushScope(),r;try{r=e(t)}catch(n){throw this._popScope(),n}return Vi(r)?r.then(n=>(this._popScope(),n),n=>{throw this._popScope(),n}):(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 Oa(){let e=hs(),t=pl(e);return t.stack=t.stack||new xy(S0(),D0())}function gL(e){return Oa().withScope(e)}function vL(e,t){let r=Oa();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function I0(e){return Oa().withScope(()=>e(Oa().getIsolationScope()))}function T0(){return{withIsolationScope:I0,withScope:gL,withSetScope:vL,withSetIsolationScope:(e,t)=>I0(t),getCurrentScope:()=>Oa().getScope(),getIsolationScope:()=>Oa().getIsolationScope()}}function vf(e){let t=pl(e);return t.acs?t.acs:T0()}function ms(){let e=hs();return vf(e).getCurrentScope()}function gs(){let e=hs();return vf(e).getIsolationScope()}function yf(){return Ra("globalScope",()=>new An)}function _f(...e){let t=hs(),r=vf(t);if(e.length===2){let[n,i]=e;return n?r.withSetScope(n,i):r.withScope(i)}return r.withScope(e[0])}function Ft(){return ms().getClient()}var yL="_sentryMetrics";function x0(e){let t=e[yL];if(!t)return;let r={};for(let[,[n,i]]of t)(r[n]||(r[n]=[])).push(on(i));return r}var Ry="sentry.source",Ny="sentry.sample_rate",Ay="sentry.op",My="sentry.origin",_L=1;function A0(e){let{spanId:t,traceId:r}=e.spanContext(),{parent_span_id:n}=vs(e);return on({parent_span_id:n,span_id:t,trace_id:r})}function R0(e){return typeof e=="number"?N0(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?N0(e.getTime()):rr()}function N0(e){return e>9999999999?e/1e3:e}function vs(e){if(wL(e))return e.getSpanJSON();try{let{spanId:t,traceId:r}=e.spanContext();if(EL(e)){let{attributes:n,startTime:i,name:s,endTime:o,parentSpanId:a,status:l}=e;return on({span_id:t,trace_id:r,data:n,description:s,parent_span_id:a,start_timestamp:R0(i),timestamp:R0(o)||void 0,status:bL(l),op:n[Ay],origin:n[My],_metrics_summary:x0(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function EL(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function wL(e){return typeof e.getSpanJSON=="function"}function M0(e){let{traceFlags:t}=e.spanContext();return t===_L}function bL(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var CL="_sentryRootSpan";function ml(e){return e[CL]||e}var Ef="production",SL="_frozenDsc";function Oy(e,t){let r=t.getOptions(),{publicKey:n}=t.getDsn()||{},i=on({environment:r.environment||Ef,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",i),i}function O0(e){let t=Ft();if(!t)return{};let r=Oy(vs(e).trace_id||"",t),n=ml(e),i=n[SL];if(i)return i;let s=n.spanContext().traceState,o=s&&s.get("sentry.dsc"),a=o&&hy(o);if(a)return a;let l=vs(n),c=l.data||{},h=c[Ny];h!=null&&(r.sample_rate=`${h}`);let d=c[Ry],f=l.description;return d!=="url"&&f&&(r.transaction=f),r.sampled=String(M0(n)),t.emit("createDsc",r,n),r}function P0(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){mt&&se.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 DL(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 k0(e,t,r,n){let i=hf(r),s=w(w({sent_at:new Date().toISOString()},i&&{sdk:i}),!!n&&t&&{dsn:oi(t)}),o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ci(s,[o])}function L0(e,t,r,n){let i=hf(r),s=e.type&&e.type!=="replay_event"?e.type:"event";DL(e,r&&r.sdk);let o=_y(e,i,n,t);return delete e.sdkProcessingMetadata,ci(o,[[{type:s},e]])}function wf(e,t,r,n=0){return new jr((i,s)=>{let o=e[n];if(t===null||typeof o!="function")i(t);else{let a=o(w({},t),r);mt&&o.id&&a===null&&se.log(`Event processor "${o.id}" dropped event`),Vi(a)?a.then(l=>wf(e,l,r,n+1).then(i)).then(null,s):wf(e,a,r,n+1).then(i).then(null,s)}})}function F0(e,t){let{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:s}=t;IL(e,t),n&&RL(e,n),NL(e,r),TL(e,i),xL(e,s)}function Py(e,t){let{extra:r,tags:n,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:f,transactionName:g,span:m}=t;gl(e,"extra",r),gl(e,"tags",n),gl(e,"user",i),gl(e,"contexts",s),gl(e,"sdkProcessingMetadata",a),o&&(e.level=o),g&&(e.transactionName=g),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext=w(w({},e.propagationContext),f)}function gl(e,t,r){if(r&&Object.keys(r).length){e[t]=w({},e[t]);for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[t][n]=r[n])}}function IL(e,t){let{extra:r,tags:n,user:i,contexts:s,level:o,transactionName:a}=t,l=on(r);l&&Object.keys(l).length&&(e.extra=w(w({},l),e.extra));let c=on(n);c&&Object.keys(c).length&&(e.tags=w(w({},c),e.tags));let h=on(i);h&&Object.keys(h).length&&(e.user=w(w({},h),e.user));let d=on(s);d&&Object.keys(d).length&&(e.contexts=w(w({},d),e.contexts)),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function TL(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function xL(e,t){e.sdkProcessingMetadata=w(w({},e.sdkProcessingMetadata),t)}function RL(e,t){e.contexts=w({trace:A0(t)},e.contexts),e.sdkProcessingMetadata=w({dynamicSamplingContext:O0(t)},e.sdkProcessingMetadata);let r=ml(t),n=vs(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function NL(e,t){e.fingerprint=e.fingerprint?uf(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function V0(e,t,r,n,i,s){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l=re(w({},t),{event_id:t.event_id||r.event_id||mn(),timestamp:t.timestamp||ai()}),c=r.integrations||e.integrations.map(b=>b.name);AL(l,e),PL(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&ML(l,e.stackParser);let h=LL(n,r.captureContext);r.mechanism&&Ui(l,r.mechanism);let d=i?i.getEventProcessors():[],f=yf().getScopeData();if(s){let b=s.getScopeData();Py(f,b)}if(h){let b=h.getScopeData();Py(f,b)}let g=[...r.attachments||[],...f.attachments];g.length&&(r.attachments=g),F0(l,f);let m=[...d,...f.eventProcessors];return wf(m,l,r).then(b=>(b&&OL(b),typeof o=="number"&&o>0?kL(b,o,a):b))}function AL(e,t){let{environment:r,release:n,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?r:Ef),e.release===void 0&&n!==void 0&&(e.release=n),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=ri(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=ri(o.value,s));let a=e.request;a&&a.url&&(a.url=ri(a.url,s))}var B0=new WeakMap;function ML(e,t){let r=_e._sentryDebugIds;if(!r)return;let n,i=B0.get(t);i?n=i:(n=new Map,B0.set(t,n));let s=Object.entries(r).reduce((o,[a,l])=>{let c,h=n.get(a);h?c=h:(c=t(a),n.set(a,c));for(let d=c.length-1;d>=0;d--){let f=c[d];if(f.filename){o[f.filename]=l;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=s[a.filename])})})}catch{}}function OL(e){let t={};try{e.exception.values.forEach(n=>{n.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 r=e.debug_meta.images;Object.entries(t).forEach(([n,i])=>{r.push({type:"sourcemap",code_file:n,debug_id:i})})}function PL(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function kL(e,t,r){if(!e)return null;let n=w(w(w(w(w({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>w(w({},i),i.data&&{data:Hr(i.data,t,r)}))}),e.user&&{user:Hr(e.user,t,r)}),e.contexts&&{contexts:Hr(e.contexts,t,r)}),e.extra&&{extra:Hr(e.extra,t,r)});return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=Hr(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(i=>w(w({},i),i.data&&{data:Hr(i.data,t,r)}))),n}function LL(e,t){if(!t)return e;let r=e?e.clone():new An;return r.update(t),r}function U0(e){if(e)return FL(e)?{captureContext:e}:VL(e)?{captureContext:e}:e}function FL(e){return e instanceof An||typeof e=="function"}var BL=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function VL(e){return Object.keys(e).some(t=>BL.includes(t))}function bf(e,t){return ms().captureException(e,U0(t))}function vl(e,t){return ms().captureEvent(e,t)}var UL="7";function HL(e){let t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function jL(e){return`${HL(e)}${e.projectId}/envelope/`}function $L(e,t){return Qv(w({sentry_key:e.publicKey,sentry_version:UL},t&&{sentry_client:`${t.name}/${t.version}`}))}function j0(e,t,r){return t||`${jL(e)}?${$L(e,r)}`}var $0=[];function W0(e,t){let r={};return t.forEach(n=>{n&&Ly(e,n,r)}),r}function ky(e,t){for(let r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function Ly(e,t,r){if(r[t.name]){mt&&se.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,$0.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),$0.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>n(i,s,e))}if(typeof t.processEvent=="function"){let n=t.processEvent.bind(t),i=Object.assign((s,o)=>n(s,o,e),{id:t.name});e.addEventProcessor(i)}mt&&se.log(`Integration installed: ${t.name}`)}var G0="Not capturing exception because it's already been captured.",yl=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=ef(e.dsn):mt&&se.warn("No DSN provided, client will not send events."),this._dsn){let t=j0(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(re(w({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,r){let n=mn();if(lf(e))return mt&&se.log(G0),n;let i=w({event_id:n},t);return this._process(this.eventFromException(e,i).then(s=>this._captureEvent(s,i,r))),i.event_id}captureMessage(e,t,r,n){let i=w({event_id:mn()},r),s=Ta(e)?e:String(e),o=ds(e)?this.eventFromMessage(s,t,i):this.eventFromException(e,i);return this._process(o.then(a=>this._captureEvent(a,i,n))),i.event_id}captureEvent(e,t,r){let n=mn();if(t&&t.originalException&&lf(t.originalException))return mt&&se.log(G0),n;let i=w({event_id:n},t),s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,s||r)),i.event_id}captureSession(e){typeof e.release!="string"?mt&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),hl(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(r=>t.flush(e).then(n=>r&&n))):yr(!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];Ly(this,e,this._integrations),t||ky(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let r=L0(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])r=gy(r,yy(i));let n=this.sendEnvelope(r);n&&n.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=k0(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,r){if(this._options.sendClientReports){let n=`${e}:${t}`;mt&&se.log(`Adding outcome: "${n}"`),this._outcomes[n]=(this._outcomes[n]||0)+1}}on(e,t){let r=this._hooks[e]=this._hooks[e]||[];return r.push(t),()=>{let n=r.indexOf(t);n>-1&&r.splice(n,1)}}emit(e,...t){let r=this._hooks[e];r&&r.forEach(n=>n(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(mt&&se.error("Error while sending event:",t),t)):(mt&&se.error("Transport disabled"),yr({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=W0(this,e),ky(this,e)}_updateSessionFromEvent(e,t){let r=!1,n=!1,i=t.exception&&t.exception.values;if(i){n=!0;for(let o of i){let a=o.mechanism;if(a&&a.handled===!1){r=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(hl(e,re(w({},r&&{status:"crashed"}),{errors:e.errors||Number(n||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new jr(t=>{let r=0,n=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(r+=n,e&&r>=e&&(clearInterval(i),t(!1)))},n)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,r,n=gs()){let i=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s.length>0&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||n.setLastEventId(e.event_id||t.event_id),V0(i,e,t,r,this,n).then(o=>{if(o===null)return o;let a=w(w({},n.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(o.contexts&&o.contexts.trace)&&a){let{traceId:l,spanId:c,parentSpanId:h,dsc:d}=a;o.contexts=w({trace:on({trace_id:l,span_id:c,parent_span_id:h})},o.contexts);let f=d||Oy(l,this);o.sdkProcessingMetadata=w({dynamicSamplingContext:f},o.sdkProcessingMetadata)}return o})}_captureEvent(e,t={},r){return this._processEvent(e,t,r).then(n=>n.event_id,n=>{if(mt){let i=n;i.logLevel==="log"?se.log(i.message):se.warn(i)}})}_processEvent(e,t,r){let n=this.getOptions(),{sampleRate:i}=n,s=Fy(e),o=z0(e),a=e.type||"error",l=`before send for type \`${a}\``,c=typeof i>"u"?void 0:P0(i);if(o&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),go(new Nn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let h=a==="replay_event"?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,r,d).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",h,e),new Nn("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return f;let g=GL(this,n,f,t);return WL(g,l)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",h,e),Fy(e)){let b=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+b}throw new Nn(`${l} returned \`null\`, will not send event.`,"log")}let g=r&&r.getSession();!s&&g&&this._updateSessionFromEvent(g,f);let m=f.transaction_info;if(s&&m&&f.transaction!==e.transaction){let b="custom";f.transaction_info=re(w({},m),{source:b})}return this.sendEvent(f,t),f}).then(null,f=>{throw f instanceof Nn?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Nn(`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,r])=>{let[n,i]=t.split(":");return{reason:n,category:i,quantity:r}})}};function WL(e,t){let r=`${t} must return \`null\` or a valid event.`;if(Vi(e))return e.then(n=>{if(!Vr(n)&&n!==null)throw new Nn(r);return n},n=>{throw new Nn(`${t} rejected with ${n}`)});if(!Vr(e)&&e!==null)throw new Nn(r);return e}function GL(e,t,r,n){let{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;if(z0(r)&&i)return i(r,n);if(Fy(r)){if(r.spans&&o){let a=[];for(let l of r.spans){let c=o(l);c?a.push(c):e.recordDroppedEvent("before_send","span")}r.spans=a}if(s)return s(r,n)}return r}function z0(e){return e.type===void 0}function Fy(e){return e.type==="transaction"}var zL=64;function Cf(e,t,r=fy(e.bufferSize||zL)){let n={},i=o=>r.drain(o);function s(o){let a=[];if(ff(o,(d,f)=>{let g=pf(f);if(wy(n,g)){let m=q0(d,f);e.recordDroppedEvent("ratelimit_backoff",g,m)}else a.push(d)}),a.length===0)return yr({});let l=ci(o[0],a),c=d=>{ff(l,(f,g)=>{let m=q0(f,g);e.recordDroppedEvent(d,pf(g),m)})},h=()=>t({body:vy(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&mt&&se.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=by(n,d),d),d=>{throw c("network_error"),d});return r.add(h).then(d=>d,d=>{if(d instanceof Nn)return mt&&se.error("Skipped sending event because buffer is full."),c("queue_overflow"),yr({});throw d})}return{send:s,flush:i}}function q0(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function By(e,t,r=[t],n="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:r.map(s=>({name:`${n}:@sentry/${s}`,version:gr})),version:gr}),e._metadata=i}var qL=100;function li(e,t){let r=Ft(),n=gs();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=qL}=r.getOptions();if(s<=0)return;let o=ai(),a=w({timestamp:o},e),l=i?Aa(()=>i(a,t)):a;l!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,s))}var Y0,YL="FunctionToString",K0=new WeakMap,KL=()=>({name:YL,setupOnce(){Y0=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=ps(this),r=K0.has(Ft())&&t!==void 0?t:this;return Y0.apply(r,e)}}catch{}},setup(e){K0.set(e,!0)}}),Sf=KL,ZL=[/^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"],XL="InboundFilters",JL=(e={})=>({name:XL,processEvent(t,r,n){let i=n.getOptions(),s=QL(e,i);return eF(t,s)?null:t}}),If=JL;function QL(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ZL],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function eF(e,t){return t.ignoreInternal&&sF(e)?(mt&&se.warn(`Event dropped due to being internal Sentry Error.
30
- Event: ${Ur(e)}`),!0):tF(e,t.ignoreErrors)?(mt&&se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
31
- Event: ${Ur(e)}`),!0):cF(e)?(mt&&se.warn(`Event dropped due to not having an error message, error type or stacktrace.
32
- Event: ${Ur(e)}`),!0):nF(e,t.ignoreTransactions)?(mt&&se.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
33
- Event: ${Ur(e)}`),!0):rF(e,t.denyUrls)?(mt&&se.warn(`Event dropped due to being matched by \`denyUrls\` option.
28
+ `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Hr(a))}i(l)}}return typeof n=="string"?n:uL(n)}function uL(e){let t=e.reduce((i,s)=>i+s.length,0),r=new Uint8Array(t),n=0;for(let i of e)r.set(i,n),n+=i.length;return r}function vy(e){let t=typeof e.data=="string"?hy(e.data):e.data;return[sn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var dL={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 pf(e){return dL[e]}function hf(e){if(!e||!e.sdk)return;let{name:t,version:r}=e.sdk;return{name:t,version:r}}function yy(e,t,r,n){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return w(w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!r&&n&&{dsn:oi(n)}),i&&{trace:sn(w({},i))})}function _y(e,t,r){let n=[{type:"client_report"},{timestamp:r||ai(),discarded_events:e}];return ci(t?{dsn:t}:{},[n])}function w0(e,t=Date.now()){let r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${e}`);return isNaN(n)?6e4:n-t}function b0(e,t){return e[t]||e.all||0}function Ey(e,t,r=Date.now()){return b0(e,t)>r}function wy(e,{statusCode:t,headers:r},n=Date.now()){let i=w({},e),s=r&&r["x-sentry-rate-limits"],o=r&&r["retry-after"];if(s)for(let a of s.trim().split(",")){let[l,c,,,h]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=n+f;else for(let g of c.split(";"))g==="metric_bucket"?(!h||h.split(";").includes("custom"))&&(i[g]=n+f):i[g]=n+f}else o?i.all=n+w0(o,n):t===429&&(i.all=n+60*1e3);return i}function mf(){return{traceId:gn(),spanId:gn().substring(16)}}var gf=_e;function by(){let e=gf.chrome,t=e&&e.app&&e.app.runtime,r="history"in gf&&!!gf.history.pushState&&!!gf.history.replaceState;return!t&&r}var mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function hs(){return pl(_e),_e}function pl(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||gr,t[gr]=t[gr]||{}}function hl(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||rr(),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:gn()),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 r=e.timestamp-e.started;e.duration=r>=0?r: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 Cy="_sentrySpan";function Sy(e,t){t?Ln(e,Cy,t):delete e[Cy]}function Dy(e){return e[Cy]}var hL=100,Iy=class bD{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=mf()}clone(){let t=new bD;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,Sy(t,Dy(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&&hl(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,r){return this._tags=re(w({},this._tags),{[t]:r}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=w(w({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,r){return this._extra=re(w({},this._extra),{[t]:r}),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,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,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 r=typeof t=="function"?t(this):t,[n,i]=r instanceof An?[r.getScopeData(),r.getRequestSession()]:Vr(r)?[t,t.requestSession]:[],{tags:s,extra:o,user:a,contexts:l,level:c,fingerprint:h=[],propagationContext:d}=n||{};return this._tags=w(w({},this._tags),s),this._extra=w(w({},this._extra),o),this._contexts=w(w({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),h.length&&(this._fingerprint=h),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,Sy(this,void 0),this._attachments=[],this._propagationContext=mf(),this._notifyScopeListeners(),this}addBreadcrumb(t,r){let n=typeof r=="number"?r:hL;if(n<=0)return this;let i=w({timestamp:ai()},t),s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>n?s.slice(-n):s,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:Dy(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,r){let n=r&&r.event_id?r.event_id:gn();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),n;let i=new Error("Sentry syntheticException");return this._client.captureException(t,re(w({originalException:t,syntheticException:i},r),{event_id:n}),this),n}captureMessage(t,r,n){let i=n&&n.event_id?n.event_id:gn();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let s=new Error(t);return this._client.captureMessage(t,r,re(w({originalException:t,syntheticException:s},n),{event_id:i}),this),i}captureEvent(t,r){let n=r&&r.event_id?r.event_id:gn();return this._client?(this._client.captureEvent(t,re(w({},r),{event_id:n}),this),n):(se.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},An=Iy;function C0(){return Ra("defaultCurrentScope",()=>new An)}function S0(){return Ra("defaultIsolationScope",()=>new An)}var Ty=class{constructor(e,t){let r;e?r=e:r=new An;let n;t?n=t:n=new An,this._stack=[{scope:r}],this._isolationScope=n}withScope(e){let t=this._pushScope(),r;try{r=e(t)}catch(n){throw this._popScope(),n}return Vi(r)?r.then(n=>(this._popScope(),n),n=>{throw this._popScope(),n}):(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 Oa(){let e=hs(),t=pl(e);return t.stack=t.stack||new Ty(C0(),S0())}function mL(e){return Oa().withScope(e)}function gL(e,t){let r=Oa();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function D0(e){return Oa().withScope(()=>e(Oa().getIsolationScope()))}function I0(){return{withIsolationScope:D0,withScope:mL,withSetScope:gL,withSetIsolationScope:(e,t)=>D0(t),getCurrentScope:()=>Oa().getScope(),getIsolationScope:()=>Oa().getIsolationScope()}}function vf(e){let t=pl(e);return t.acs?t.acs:I0()}function ms(){let e=hs();return vf(e).getCurrentScope()}function gs(){let e=hs();return vf(e).getIsolationScope()}function yf(){return Ra("globalScope",()=>new An)}function _f(...e){let t=hs(),r=vf(t);if(e.length===2){let[n,i]=e;return n?r.withSetScope(n,i):r.withScope(i)}return r.withScope(e[0])}function Bt(){return ms().getClient()}var vL="_sentryMetrics";function T0(e){let t=e[vL];if(!t)return;let r={};for(let[,[n,i]]of t)(r[n]||(r[n]=[])).push(sn(i));return r}var xy="sentry.source",Ry="sentry.sample_rate",Ny="sentry.op",Ay="sentry.origin",yL=1;function N0(e){let{spanId:t,traceId:r}=e.spanContext(),{parent_span_id:n}=vs(e);return sn({parent_span_id:n,span_id:t,trace_id:r})}function x0(e){return typeof e=="number"?R0(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?R0(e.getTime()):rr()}function R0(e){return e>9999999999?e/1e3:e}function vs(e){if(EL(e))return e.getSpanJSON();try{let{spanId:t,traceId:r}=e.spanContext();if(_L(e)){let{attributes:n,startTime:i,name:s,endTime:o,parentSpanId:a,status:l}=e;return sn({span_id:t,trace_id:r,data:n,description:s,parent_span_id:a,start_timestamp:x0(i),timestamp:x0(o)||void 0,status:wL(l),op:n[Ny],origin:n[Ay],_metrics_summary:T0(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function _L(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function EL(e){return typeof e.getSpanJSON=="function"}function A0(e){let{traceFlags:t}=e.spanContext();return t===yL}function wL(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var bL="_sentryRootSpan";function ml(e){return e[bL]||e}var Ef="production",CL="_frozenDsc";function My(e,t){let r=t.getOptions(),{publicKey:n}=t.getDsn()||{},i=sn({environment:r.environment||Ef,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",i),i}function M0(e){let t=Bt();if(!t)return{};let r=My(vs(e).trace_id||"",t),n=ml(e),i=n[CL];if(i)return i;let s=n.spanContext().traceState,o=s&&s.get("sentry.dsc"),a=o&&py(o);if(a)return a;let l=vs(n),c=l.data||{},h=c[Ry];h!=null&&(r.sample_rate=`${h}`);let d=c[xy],f=l.description;return d!=="url"&&f&&(r.transaction=f),r.sampled=String(A0(n)),t.emit("createDsc",r,n),r}function O0(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){mt&&se.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 SL(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 P0(e,t,r,n){let i=hf(r),s=w(w({sent_at:new Date().toISOString()},i&&{sdk:i}),!!n&&t&&{dsn:oi(t)}),o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ci(s,[o])}function k0(e,t,r,n){let i=hf(r),s=e.type&&e.type!=="replay_event"?e.type:"event";SL(e,r&&r.sdk);let o=yy(e,i,n,t);return delete e.sdkProcessingMetadata,ci(o,[[{type:s},e]])}function wf(e,t,r,n=0){return new jr((i,s)=>{let o=e[n];if(t===null||typeof o!="function")i(t);else{let a=o(w({},t),r);mt&&o.id&&a===null&&se.log(`Event processor "${o.id}" dropped event`),Vi(a)?a.then(l=>wf(e,l,r,n+1).then(i)).then(null,s):wf(e,a,r,n+1).then(i).then(null,s)}})}function L0(e,t){let{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:s}=t;DL(e,t),n&&xL(e,n),RL(e,r),IL(e,i),TL(e,s)}function Oy(e,t){let{extra:r,tags:n,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:f,transactionName:g,span:m}=t;gl(e,"extra",r),gl(e,"tags",n),gl(e,"user",i),gl(e,"contexts",s),gl(e,"sdkProcessingMetadata",a),o&&(e.level=o),g&&(e.transactionName=g),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext=w(w({},e.propagationContext),f)}function gl(e,t,r){if(r&&Object.keys(r).length){e[t]=w({},e[t]);for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[t][n]=r[n])}}function DL(e,t){let{extra:r,tags:n,user:i,contexts:s,level:o,transactionName:a}=t,l=sn(r);l&&Object.keys(l).length&&(e.extra=w(w({},l),e.extra));let c=sn(n);c&&Object.keys(c).length&&(e.tags=w(w({},c),e.tags));let h=sn(i);h&&Object.keys(h).length&&(e.user=w(w({},h),e.user));let d=sn(s);d&&Object.keys(d).length&&(e.contexts=w(w({},d),e.contexts)),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function IL(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function TL(e,t){e.sdkProcessingMetadata=w(w({},e.sdkProcessingMetadata),t)}function xL(e,t){e.contexts=w({trace:N0(t)},e.contexts),e.sdkProcessingMetadata=w({dynamicSamplingContext:M0(t)},e.sdkProcessingMetadata);let r=ml(t),n=vs(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function RL(e,t){e.fingerprint=e.fingerprint?uf(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function B0(e,t,r,n,i,s){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l=re(w({},t),{event_id:t.event_id||r.event_id||gn(),timestamp:t.timestamp||ai()}),c=r.integrations||e.integrations.map(b=>b.name);NL(l,e),OL(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&AL(l,e.stackParser);let h=kL(n,r.captureContext);r.mechanism&&Ui(l,r.mechanism);let d=i?i.getEventProcessors():[],f=yf().getScopeData();if(s){let b=s.getScopeData();Oy(f,b)}if(h){let b=h.getScopeData();Oy(f,b)}let g=[...r.attachments||[],...f.attachments];g.length&&(r.attachments=g),L0(l,f);let m=[...d,...f.eventProcessors];return wf(m,l,r).then(b=>(b&&ML(b),typeof o=="number"&&o>0?PL(b,o,a):b))}function NL(e,t){let{environment:r,release:n,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?r:Ef),e.release===void 0&&n!==void 0&&(e.release=n),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=ri(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=ri(o.value,s));let a=e.request;a&&a.url&&(a.url=ri(a.url,s))}var F0=new WeakMap;function AL(e,t){let r=_e._sentryDebugIds;if(!r)return;let n,i=F0.get(t);i?n=i:(n=new Map,F0.set(t,n));let s=Object.entries(r).reduce((o,[a,l])=>{let c,h=n.get(a);h?c=h:(c=t(a),n.set(a,c));for(let d=c.length-1;d>=0;d--){let f=c[d];if(f.filename){o[f.filename]=l;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=s[a.filename])})})}catch{}}function ML(e){let t={};try{e.exception.values.forEach(n=>{n.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 r=e.debug_meta.images;Object.entries(t).forEach(([n,i])=>{r.push({type:"sourcemap",code_file:n,debug_id:i})})}function OL(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function PL(e,t,r){if(!e)return null;let n=w(w(w(w(w({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>w(w({},i),i.data&&{data:Hr(i.data,t,r)}))}),e.user&&{user:Hr(e.user,t,r)}),e.contexts&&{contexts:Hr(e.contexts,t,r)}),e.extra&&{extra:Hr(e.extra,t,r)});return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=Hr(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(i=>w(w({},i),i.data&&{data:Hr(i.data,t,r)}))),n}function kL(e,t){if(!t)return e;let r=e?e.clone():new An;return r.update(t),r}function V0(e){if(e)return LL(e)?{captureContext:e}:BL(e)?{captureContext:e}:e}function LL(e){return e instanceof An||typeof e=="function"}var FL=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function BL(e){return Object.keys(e).some(t=>FL.includes(t))}function bf(e,t){return ms().captureException(e,V0(t))}function vl(e,t){return ms().captureEvent(e,t)}var VL="7";function UL(e){let t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function HL(e){return`${UL(e)}${e.projectId}/envelope/`}function jL(e,t){return Jv(w({sentry_key:e.publicKey,sentry_version:VL},t&&{sentry_client:`${t.name}/${t.version}`}))}function H0(e,t,r){return t||`${HL(e)}?${jL(e,r)}`}var j0=[];function $0(e,t){let r={};return t.forEach(n=>{n&&ky(e,n,r)}),r}function Py(e,t){for(let r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function ky(e,t,r){if(r[t.name]){mt&&se.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,j0.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),j0.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>n(i,s,e))}if(typeof t.processEvent=="function"){let n=t.processEvent.bind(t),i=Object.assign((s,o)=>n(s,o,e),{id:t.name});e.addEventProcessor(i)}mt&&se.log(`Integration installed: ${t.name}`)}var W0="Not capturing exception because it's already been captured.",yl=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=ef(e.dsn):mt&&se.warn("No DSN provided, client will not send events."),this._dsn){let t=H0(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(re(w({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,r){let n=gn();if(lf(e))return mt&&se.log(W0),n;let i=w({event_id:n},t);return this._process(this.eventFromException(e,i).then(s=>this._captureEvent(s,i,r))),i.event_id}captureMessage(e,t,r,n){let i=w({event_id:gn()},r),s=Ta(e)?e:String(e),o=ds(e)?this.eventFromMessage(s,t,i):this.eventFromException(e,i);return this._process(o.then(a=>this._captureEvent(a,i,n))),i.event_id}captureEvent(e,t,r){let n=gn();if(t&&t.originalException&&lf(t.originalException))return mt&&se.log(W0),n;let i=w({event_id:n},t),s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,s||r)),i.event_id}captureSession(e){typeof e.release!="string"?mt&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),hl(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(r=>t.flush(e).then(n=>r&&n))):yr(!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];ky(this,e,this._integrations),t||Py(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let r=k0(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])r=my(r,vy(i));let n=this.sendEnvelope(r);n&&n.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=P0(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,r){if(this._options.sendClientReports){let n=`${e}:${t}`;mt&&se.log(`Adding outcome: "${n}"`),this._outcomes[n]=(this._outcomes[n]||0)+1}}on(e,t){let r=this._hooks[e]=this._hooks[e]||[];return r.push(t),()=>{let n=r.indexOf(t);n>-1&&r.splice(n,1)}}emit(e,...t){let r=this._hooks[e];r&&r.forEach(n=>n(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(mt&&se.error("Error while sending event:",t),t)):(mt&&se.error("Transport disabled"),yr({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=$0(this,e),Py(this,e)}_updateSessionFromEvent(e,t){let r=!1,n=!1,i=t.exception&&t.exception.values;if(i){n=!0;for(let o of i){let a=o.mechanism;if(a&&a.handled===!1){r=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(hl(e,re(w({},r&&{status:"crashed"}),{errors:e.errors||Number(n||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new jr(t=>{let r=0,n=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(r+=n,e&&r>=e&&(clearInterval(i),t(!1)))},n)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,r,n=gs()){let i=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s.length>0&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||n.setLastEventId(e.event_id||t.event_id),B0(i,e,t,r,this,n).then(o=>{if(o===null)return o;let a=w(w({},n.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(o.contexts&&o.contexts.trace)&&a){let{traceId:l,spanId:c,parentSpanId:h,dsc:d}=a;o.contexts=w({trace:sn({trace_id:l,span_id:c,parent_span_id:h})},o.contexts);let f=d||My(l,this);o.sdkProcessingMetadata=w({dynamicSamplingContext:f},o.sdkProcessingMetadata)}return o})}_captureEvent(e,t={},r){return this._processEvent(e,t,r).then(n=>n.event_id,n=>{if(mt){let i=n;i.logLevel==="log"?se.log(i.message):se.warn(i)}})}_processEvent(e,t,r){let n=this.getOptions(),{sampleRate:i}=n,s=Ly(e),o=G0(e),a=e.type||"error",l=`before send for type \`${a}\``,c=typeof i>"u"?void 0:O0(i);if(o&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),go(new Nn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let h=a==="replay_event"?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,r,d).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",h,e),new Nn("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return f;let g=WL(this,n,f,t);return $L(g,l)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",h,e),Ly(e)){let b=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+b}throw new Nn(`${l} returned \`null\`, will not send event.`,"log")}let g=r&&r.getSession();!s&&g&&this._updateSessionFromEvent(g,f);let m=f.transaction_info;if(s&&m&&f.transaction!==e.transaction){let b="custom";f.transaction_info=re(w({},m),{source:b})}return this.sendEvent(f,t),f}).then(null,f=>{throw f instanceof Nn?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Nn(`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,r])=>{let[n,i]=t.split(":");return{reason:n,category:i,quantity:r}})}};function $L(e,t){let r=`${t} must return \`null\` or a valid event.`;if(Vi(e))return e.then(n=>{if(!Vr(n)&&n!==null)throw new Nn(r);return n},n=>{throw new Nn(`${t} rejected with ${n}`)});if(!Vr(e)&&e!==null)throw new Nn(r);return e}function WL(e,t,r,n){let{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;if(G0(r)&&i)return i(r,n);if(Ly(r)){if(r.spans&&o){let a=[];for(let l of r.spans){let c=o(l);c?a.push(c):e.recordDroppedEvent("before_send","span")}r.spans=a}if(s)return s(r,n)}return r}function G0(e){return e.type===void 0}function Ly(e){return e.type==="transaction"}var GL=64;function Cf(e,t,r=dy(e.bufferSize||GL)){let n={},i=o=>r.drain(o);function s(o){let a=[];if(ff(o,(d,f)=>{let g=pf(f);if(Ey(n,g)){let m=z0(d,f);e.recordDroppedEvent("ratelimit_backoff",g,m)}else a.push(d)}),a.length===0)return yr({});let l=ci(o[0],a),c=d=>{ff(l,(f,g)=>{let m=z0(f,g);e.recordDroppedEvent(d,pf(g),m)})},h=()=>t({body:gy(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&mt&&se.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=wy(n,d),d),d=>{throw c("network_error"),d});return r.add(h).then(d=>d,d=>{if(d instanceof Nn)return mt&&se.error("Skipped sending event because buffer is full."),c("queue_overflow"),yr({});throw d})}return{send:s,flush:i}}function z0(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Fy(e,t,r=[t],n="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:r.map(s=>({name:`${n}:@sentry/${s}`,version:gr})),version:gr}),e._metadata=i}var zL=100;function li(e,t){let r=Bt(),n=gs();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=zL}=r.getOptions();if(s<=0)return;let o=ai(),a=w({timestamp:o},e),l=i?Aa(()=>i(a,t)):a;l!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,s))}var q0,qL="FunctionToString",Y0=new WeakMap,YL=()=>({name:qL,setupOnce(){q0=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=ps(this),r=Y0.has(Bt())&&t!==void 0?t:this;return q0.apply(r,e)}}catch{}},setup(e){Y0.set(e,!0)}}),Sf=YL,KL=[/^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"],ZL="InboundFilters",XL=(e={})=>({name:ZL,processEvent(t,r,n){let i=n.getOptions(),s=JL(e,i);return QL(t,s)?null:t}}),If=XL;function JL(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:KL],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function QL(e,t){return t.ignoreInternal&&oF(e)?(mt&&se.warn(`Event dropped due to being internal Sentry Error.
30
+ Event: ${Ur(e)}`),!0):eF(e,t.ignoreErrors)?(mt&&se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
31
+ Event: ${Ur(e)}`),!0):aF(e)?(mt&&se.warn(`Event dropped due to not having an error message, error type or stacktrace.
32
+ Event: ${Ur(e)}`),!0):tF(e,t.ignoreTransactions)?(mt&&se.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
33
+ Event: ${Ur(e)}`),!0):nF(e,t.denyUrls)?(mt&&se.warn(`Event dropped due to being matched by \`denyUrls\` option.
34
34
  Event: ${Ur(e)}.
35
- Url: ${Df(e)}`),!0):iF(e,t.allowUrls)?!1:(mt&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
35
+ Url: ${Df(e)}`),!0):rF(e,t.allowUrls)?!1:(mt&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
36
36
  Event: ${Ur(e)}.
37
- Url: ${Df(e)}`),!0)}function tF(e,t){return e.type||!t||!t.length?!1:oF(e).some(r=>xa(r,t))}function nF(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let r=e.transaction;return r?xa(r,t):!1}function rF(e,t){if(!t||!t.length)return!1;let r=Df(e);return r?xa(r,t):!1}function iF(e,t){if(!t||!t.length)return!0;let r=Df(e);return r?xa(r,t):!0}function oF(e){let t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function sF(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function aF(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Df(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?aF(t):null}catch{return mt&&se.error(`Cannot extract url for event ${Ur(e)}`),null}}function cF(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 lF="Dedupe",uF=()=>{let e;return{name:lF,processEvent(t){if(t.type)return t;try{if(dF(t,e))return mt&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Tf=uF;function dF(e,t){return t?!!(fF(e,t)||pF(e,t)):!1}function fF(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!J0(e,t)||!X0(e,t))}function pF(e,t){let r=Z0(t),n=Z0(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!J0(e,t)||!X0(e,t))}function X0(e,t){let r=of(e),n=of(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){let s=n[i],o=r[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function J0(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Z0(e){return e.exception&&e.exception.values&&e.exception.values[0]}var Gt=_e,Vy=0;function Uy(){return Vy>0}function IF(){Vy++,setTimeout(()=>{Vy--})}function ys(e,t={},r){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(ps(e))return e}catch{return e}let n=function(){let i=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let s=i.map(o=>ys(o,t));return e.apply(this,s)}catch(s){throw IF(),_f(o=>{o.addEventProcessor(a=>(t.mechanism&&(Ma(a,void 0,void 0),Ui(a,t.mechanism)),a.extra=re(w({},a.extra),{arguments:i}),a)),bf(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}tf(n,e),Ln(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}var ji=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function xf(e,t){let r=$y(e,t),n={type:t&&t.name,value:AF(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function TF(e,t,r,n){let i=Ft(),s=i&&i.getOptions().normalizeDepth,o=PF(t),a={__serialized__:df(t,s)};if(o)return{exception:{values:[xf(e,o)]},extra:a};let l={exception:{values:[{type:fs(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:MF(t,{isUnhandledRejection:n})}]},extra:a};if(r){let c=$y(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function Hy(e,t){return{exception:{values:[xf(e,t)]}}}function $y(e,t){let r=t.stacktrace||t.stack||"",n=RF(t),i=NF(t);try{return e(r,n,i)}catch{}return[]}var xF=/Minified React error #\d+;/i;function RF(e){return e&&xF.test(e.message)?1:0}function NF(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function AF(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function nI(e,t,r,n){let i=r&&r.syntheticException||void 0,s=Rf(e,t,i,n);return Ui(s),s.level="error",r&&r.event_id&&(s.event_id=r.event_id),yr(s)}function rI(e,t,r="info",n,i){let s=n&&n.syntheticException||void 0,o=jy(e,t,s,i);return o.level=r,n&&n.event_id&&(o.event_id=n.event_id),yr(o)}function Rf(e,t,r,n,i){let s;if(Xd(t)&&t.error)return Hy(e,t.error);if(Jd(t)||$v(t)){let o=t;if("stack"in t)s=Hy(e,t);else{let a=o.name||(Jd(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=jy(e,l,r,n),Ma(s,l)}return"code"in o&&(s.tags=re(w({},s.tags),{"DOMException.code":`${o.code}`})),s}return us(t)?Hy(e,t):Vr(t)||fs(t)?(s=TF(e,t,r,i),Ui(s,{synthetic:!0}),s):(s=jy(e,t,r,n),Ma(s,`${t}`,void 0),Ui(s,{synthetic:!0}),s)}function jy(e,t,r,n){let i={};if(n&&r){let s=$y(e,r);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(Ta(t)){let{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function MF(e,{isUnhandledRejection:t}){let r=ey(e),n=t?"promise rejection":"exception";return Xd(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:fs(e)?`Event \`${OF(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function OF(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function PF(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(r instanceof Error)return r}}function iI(e,{metadata:t,tunnel:r,dsn:n}){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}}),!!r&&!!n&&{dsn:oi(n)}),s=kF(e);return ci(i,[s])}function kF(e){return[{type:"user_report"},e]}var _l=class extends yl{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),r=Gt.SENTRY_SDK_SOURCE||uy();By(t,"browser",["browser"],r),super(t),t.sendClientReports&&Gt.document&&Gt.document.addEventListener("visibilitychange",()=>{Gt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return nI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return rI(this._options.stackParser,e,t,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){ji&&se.warn("SDK not enabled, will not capture user feedback.");return}let t=iI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){ji&&se.log("No outcomes to send");return}if(!this._dsn){ji&&se.log("No dsn provided, will not send outcomes");return}ji&&se.log("Sending outcomes:",e);let t=Ey(e,this._options.tunnel&&oi(this._dsn));this.sendEnvelope(t)}},oI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Jt=_e,LF=1e3,sI,Wy,Gy;function zy(e){let t="dom";Fn(t,e),Bn(t,FF)}function FF(){if(!Jt.document)return;let e=sn.bind(null,"dom"),t=aI(e,!0);Jt.document.addEventListener("click",t,!1),Jt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let n=Jt[r]&&Jt[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Pt(n,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},h=c[s]=c[s]||{refCount:0};if(!h.handler){let d=aI(e);h.handler=d,i.call(this,s,d,a)}h.refCount++}catch{}return i.call(this,s,o,a)}}),Pt(n,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__||{},h=c[s];h&&(h.refCount--,h.refCount<=0&&(i.call(this,s,h.handler,a),h.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}function BF(e){if(e.type!==Wy)return!1;try{if(!e.target||e.target._sentryId!==Gy)return!1}catch{}return!0}function VF(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function aI(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=UF(r);if(VF(r.type,n))return;Ln(r,"_sentryCaptured",!0),n&&!n._sentryId&&Ln(n,"_sentryId",mn());let i=r.type==="keypress"?"input":r.type;BF(r)||(e({event:r,name:i,global:t}),Wy=r.type,Gy=n?n._sentryId:void 0),clearTimeout(sI),sI=Jt.setTimeout(()=>{Gy=void 0,Wy=void 0},LF)}}function UF(e){try{return e.target}catch{return null}}var Nf;function qy(e){let t="history";Fn(t,e),Bn(t,HF)}function HF(){if(!Cy())return;let e=Jt.onpopstate;Jt.onpopstate=function(...r){let n=Jt.location.href,i=Nf;if(Nf=n,sn("history",{from:i,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){let i=n.length>2?n[2]:void 0;if(i){let s=Nf,o=String(i);Nf=o,sn("history",{from:s,to:o})}return r.apply(this,n)}}Pt(Jt.history,"pushState",t),Pt(Jt.history,"replaceState",t)}var Af={};function Yy(e){let t=Af[e];if(t)return t;let r=Jt[e];if(ul(r))return Af[e]=r.bind(Jt);let n=Jt.document;if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch(i){oI&&se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return r&&(Af[e]=r.bind(Jt))}function Mf(e){Af[e]=void 0}var _s="__sentry_xhr_v3__";function Ky(e){let t="xhr";Fn(t,e),Bn(t,jF)}function jF(){if(!Jt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Pt(e,"open",function(t){return function(...r){let n=rr()*1e3,i=kn(r[0])?r[0].toUpperCase():void 0,s=$F(r[1]);if(!i||!s)return t.apply(this,r);this[_s]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[_s];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:rr()*1e3,startTimestamp:n,xhr:this};sn("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Pt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),Pt(this,"setRequestHeader",function(a){return function(...l){let[c,h]=l,d=this[_s];return d&&kn(c)&&kn(h)&&(d.request_headers[c.toLowerCase()]=h),a.apply(this,l)}}),t.apply(this,r)}}),Pt(e,"send",function(t){return function(...r){let n=this[_s];if(!n)return t.apply(this,r);r[0]!==void 0&&(n.body=r[0]);let i={startTimestamp:rr()*1e3,xhr:this};return sn("xhr",i),t.apply(this,r)}})}function $F(e){if(kn(e))return e;try{return e.toString()}catch{}}function Zy(e,t=Yy("fetch")){let r=0,n=0;function i(s){let o=s.body.length;r+=o,n++;let a=w({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15},e.fetchOptions);if(!t)return Mf("fetch"),go("No fetch implementation available");try{return t(e.url,a).then(l=>(r-=o,n--,{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 Mf("fetch"),r-=o,n--,go(l)}}return Cf(e,i)}var WF=30,GF=50;function Xy(e,t,r,n){let i={filename:e,function:t==="<anonymous>"?si:t,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}var zF=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,qF=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,YF=/\((\S*)(?::(\d+))(?::(\d+))\)/,KF=e=>{let t=zF.exec(e);if(t){let[,n,i,s]=t;return Xy(n,si,+i,+s)}let r=qF.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){let s=YF.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}let[n,i]=dI(r[1]||si,r[2]);return Xy(i,n,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},cI=[WF,KF],ZF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,XF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,JF=e=>{let t=ZF.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=XF.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],n=t[1]||si;return[n,r]=dI(n,r),Xy(r,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},lI=[GF,JF],uI=[cI,lI],Jy=ny(...uI),dI=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:si,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Of=1024,eB="Breadcrumbs",tB=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:eB,setup(r){t.console&&ry(iB(r)),t.dom&&zy(rB(r,t.dom)),t.xhr&&Ky(oB(r)),t.fetch&&ay(sB(r)),t.history&&qy(aB(r)),t.sentry&&r.on("beforeSendEvent",nB(r))}}},fI=tB;function nB(e){return function(t){Ft()===e&&li({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Ur(t)},{event:t})}}function rB(e,t){return function(r){if(Ft()!==e)return;let n,i,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Of&&(ji&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Of}, but a value of ${o} was configured. Sentry will use ${Of} instead.`),o=Of),typeof s=="string"&&(s=[s]);try{let l=r.event,c=cB(l)?l.target:l;n=cl(c,{keyAttrs:s,maxStringLength:o}),i=Xv(c)}catch{n="<unknown>"}if(n.length===0)return;let a={category:`ui.${r.name}`,message:n};i&&(a.data={"ui.component_name":i}),li(a,{event:r.event,name:r.name,global:r.global})}}function iB(e){return function(t){if(Ft()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:py(t.level),message:Qd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)r.message=`Assertion failed: ${Qd(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1);else return;li(r,{input:t.args,level:t.level})}}function oB(e){return function(t){if(Ft()!==e)return;let{startTimestamp:r,endTimestamp:n}=t,i=t.xhr[_s];if(!r||!n||!i)return;let{method:s,url:o,status_code:a,body:l}=i,c={method:s,url:o,status_code:a},h={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:n};li({category:"xhr",data:c,type:"http"},h)}}function sB(e){return function(t){if(Ft()!==e)return;let{startTimestamp:r,endTimestamp:n}=t;if(n&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,s={data:t.error,input:t.args,startTimestamp:r,endTimestamp:n};li({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=t.response,s=re(w({},t.fetchData),{status_code:i&&i.status}),o={input:t.args,response:i,startTimestamp:r,endTimestamp:n};li({category:"fetch",data:s,type:"http"},o)}}}function aB(e){return function(t){if(Ft()!==e)return;let r=t.from,n=t.to,i=fl(Gt.location.href),s=r?fl(r):void 0,o=fl(n);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),li({category:"navigation",data:{from:r,to:n}})}}function cB(e){return!!e&&!!e.target}var lB=["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"],uB="BrowserApiErrors",dB=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:uB,setupOnce(){t.setTimeout&&Pt(Gt,"setTimeout",pI),t.setInterval&&Pt(Gt,"setInterval",pI),t.requestAnimationFrame&&Pt(Gt,"requestAnimationFrame",fB),t.XMLHttpRequest&&"XMLHttpRequest"in Gt&&Pt(XMLHttpRequest.prototype,"send",pB);let r=t.eventTarget;r&&(Array.isArray(r)?r:lB).forEach(hB)}}},hI=dB;function pI(e){return function(...t){let r=t[0];return t[0]=ys(r,{mechanism:{data:{function:vr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function fB(e){return function(t){return e.apply(this,[ys(t,{mechanism:{data:{function:"requestAnimationFrame",handler:vr(e)},handled:!1,type:"instrument"}})])}}function pB(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in r&&typeof r[n]=="function"&&Pt(r,n,function(i){let s={mechanism:{data:{function:n,handler:vr(i)},handled:!1,type:"instrument"}},o=ps(i);return o&&(s.mechanism.data.handler=vr(o)),ys(i,s)})}),e.apply(this,t)}}function hB(e){let t=Gt,r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Pt(r,"addEventListener",function(n){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=ys(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:vr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,ys(s,{mechanism:{data:{function:"addEventListener",handler:vr(s),target:e},handled:!1,type:"instrument"}}),o])}}),Pt(r,"removeEventListener",function(n){return function(i,s,o){let a=s;try{let l=a&&a.__sentry_wrapped__;l&&n.call(this,i,l,o)}catch{}return n.call(this,i,a,o)}}))}var mB="GlobalHandlers",gB=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:mB,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(vB(r),mI("onerror")),t.onunhandledrejection&&(yB(r),mI("onunhandledrejection"))}}},gI=gB;function vB(e){cy(t=>{let{stackParser:r,attachStacktrace:n}=vI();if(Ft()!==e||Uy())return;let{msg:i,url:s,line:o,column:a,error:l}=t,c=wB(Rf(r,l||i,void 0,n,!1),s,o,a);c.level="error",vl(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function yB(e){ly(t=>{let{stackParser:r,attachStacktrace:n}=vI();if(Ft()!==e||Uy())return;let i=_B(t),s=ds(i)?EB(i):Rf(r,i,void 0,n,!0);s.level="error",vl(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function _B(e){if(ds(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 EB(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function wB(e,t,r,n){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(n,10))?void 0:n,h=isNaN(parseInt(r,10))?void 0:r,d=kn(t)&&t.length>0?t:Zv();return l.length===0&&l.push({colno:c,filename:d,function:si,in_app:!0,lineno:h}),e}function mI(e){ji&&se.log(`Global Handler attached: ${e}`)}function vI(){let e=Ft();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var yI=()=>({name:"HttpContext",preprocessEvent(e){if(!Gt.navigator&&!Gt.location&&!Gt.document)return;let t=e.request&&e.request.url||Gt.location&&Gt.location.href,{referrer:r}=Gt.document||{},{userAgent:n}=Gt.navigator||{},i=w(w(w({},e.request&&e.request.headers),r&&{Referer:r}),n&&{"User-Agent":n}),s=re(w(w({},e.request),t&&{url:t}),{headers:i});e.request=s}}),bB="cause",CB=5,SB="LinkedErrors",DB=(e={})=>{let t=e.limit||CB,r=e.key||bB;return{name:SB,preprocessEvent(n,i,s){let o=s.getOptions();Yv(xf,o.stackParser,o.maxValueLength,r,t,n,i)}}},_I=DB;function Qy(e){return[If(),Sf(),hI(),fI(),gI(),_I(),Tf(),yI()]}var e_=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},bt=class CD{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new CD),this.INSTANCE}captureException(t,r,n){C.error(t),this.getNewScope(r,n).captureException(t)}captureMessage(t,r,n,i){this.getNewScope(n,i).captureMessage(t,r??"error")}captureError(t,r,n,i){C.error(t,r);let s=this.getNewScope(n,i),o=new e_(t,r);s.captureException(o)}setGlobalContext(t,r){this.contexts[t]=w({context:r},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,r){let n=new An;if(n.setClient(this.client),n.setUser(this.user),t?.triggerContext){let i=t.triggerContext;n.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&n.setExtras(t),this.tags&&n.setTags(this.tags),r&&n.setTags(r),Object.keys(this.contexts).forEach(i=>{n.setContext(i,this.contexts[i])}),n.setTag("language",navigator.language),n.setTag("timezone",ue.getTimezone()),n}init(){let t=Qy({}).filter(r=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(r.name));this.client=new _l({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Zy,stackParser:Jy,integrations:t,environment:Rn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:Rn.debug}),this.client.init()}},ue=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 r=e.indexOf(t);return r===-1?!1:(e.splice(r,1),!0)}static formatCurrency(e,t){if(e==0&&t)return"Free";let r=ke.get(),n=wt.get(),i=r.shopCurrencyCode||n.currency,s=r.currencyCode;s||C.warn("Currency code is not set in RuntimeData");let o=n.money?.format??r.moneyFormat,a;if(o&&i===s)a=Kd.format(e*100,o);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(c){return bt.getInstance().captureException(c,{currentCurrency:s,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),n.money?.showCurrency&&s!=="INR"&&(a=a.concat(` ${s}`))}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,r=document){let n=0,i=document.querySelectorAll("nonexistent-tag");for(;n<t;){let s=Math.min(100*2**n,5e3);if(await EI.JSUtils.sleep(s),i=r.querySelectorAll(e),i.length)return C.debug(`Attempt ${n+1}: ${i.length} elements found with ${e}`),i;C.debug(`Attempt ${n+1}: Elements not found with ${e}. Retrying after ${s}ms.`),n++}return C.warn(`Max attempts reached. Element not found with ${e}.`),i}static async retrySelector(e,t=10,r=document){return(await this.retrySelectorForElements(e,t,r)).item(0)}static async retrySelectors(e,t=10,r=document){let n=await this.retrySelectorForElements(e,t,r);return Array.from(n)}static async getCartAttributes(){let e=await rt.get(ge.DEVICE_ID),t=await hn.get(ge.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,r=document.body){let n=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===e||o.contains(e))&&(t(),n.disconnect())})})});n.observe(r,{childList:!0})}};function Pa(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:r})}var ui=class Wh{transform(t){return t==null?null:ue.formatCurrency(t)}static \u0275fac=function(t){return new(t||Wh)};static \u0275pipe=es({name:"cooeeCurrency",type:Wh,pure:!0})},CI=Pe(Lf()),IB=Object.prototype.toString,La=Array.isArray||function(e){return IB.call(e)==="[object Array]"};function n_(e){return typeof e=="function"}function TB(e){return La(e)?"array":typeof e}function t_(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function wI(e,t){return e!=null&&typeof e=="object"&&t in e}function xB(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var RB=RegExp.prototype.test;function NB(e,t){return RB.call(e,t)}var AB=/\S/;function MB(e){return!NB(AB,e)}var OB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function PB(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return OB[t]})}var kB=/\s*/,LB=/\s+/,bI=/\s*=/,FB=/\s*\}/,BB=/#|\^|\/|>|\{|&|=|!/;function VB(e,t){if(!e)return[];var r=!1,n=[],i=[],s=[],o=!1,a=!1,l="",c=0;function h(){if(o&&!a)for(;s.length;)delete i[s.pop()];else s=[];o=!1,a=!1}var d,f,g;function m(j){if(typeof j=="string"&&(j=j.split(LB,2)),!La(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(t_(j[0])+"\\s*"),f=new RegExp("\\s*"+t_(j[1])),g=new RegExp("\\s*"+t_("}"+j[1]))}m(t||_r.tags);for(var b=new wl(e),I,A,F,V,M,q;!b.eos();){if(I=b.pos,F=b.scanUntil(d),F)for(var Me=0,lt=F.length;Me<lt;++Me)V=F.charAt(Me),MB(V)?(s.push(i.length),l+=V):(a=!0,r=!0,l+=" "),i.push(["text",V,I,I+1]),I+=1,V===`
38
- `&&(h(),l="",c=0,r=!1);if(!b.scan(d))break;if(o=!0,A=b.scan(BB)||"name",b.scan(kB),A==="="?(F=b.scanUntil(bI),b.scan(bI),b.scanUntil(f)):A==="{"?(F=b.scanUntil(g),b.scan(FB),b.scanUntil(f),A="&"):F=b.scanUntil(f),!b.scan(f))throw new Error("Unclosed tag at "+b.pos);if(A==">"?M=[A,F,I,b.pos,l,c,r]:M=[A,F,I,b.pos],c++,i.push(M),A==="#"||A==="^")n.push(M);else if(A==="/"){if(q=n.pop(),!q)throw new Error('Unopened section "'+F+'" at '+I);if(q[1]!==F)throw new Error('Unclosed section "'+q[1]+'" at '+I)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&m(F)}if(h(),q=n.pop(),q)throw new Error('Unclosed section "'+q[1]+'" at '+b.pos);return HB(UB(i))}function UB(e){for(var t=[],r,n,i=0,s=e.length;i<s;++i)r=e[i],r&&(r[0]==="text"&&n&&n[0]==="text"?(n[1]+=r[1],n[3]=r[3]):(t.push(r),n=r));return t}function HB(e){for(var t=[],r=t,n=[],i,s,o=0,a=e.length;o<a;++o)switch(i=e[o],i[0]){case"#":case"^":r.push(i),n.push(i),r=i[4]=[];break;case"/":s=n.pop(),s[5]=i[2],r=n.length>0?n[n.length-1][4]:t;break;default:r.push(i)}return t}function wl(e){this.string=e,this.tail=e,this.pos=0}wl.prototype.eos=function(){return this.tail===""};wl.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};wl.prototype.scanUntil=function(e){var t=this.tail.search(e),r;switch(t){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=r.length,r};function ka(e,t){this.view=e,this.cache={".":this.view},this.parent=t}ka.prototype.push=function(e){return new ka(e,this)};ka.prototype.lookup=function(e){var t=this.cache,r;if(t.hasOwnProperty(e))r=t[e];else{for(var n=this,i,s,o,a=!1;n;){if(e.indexOf(".")>0)for(i=n.view,s=e.split("."),o=0;i!=null&&o<s.length;)o===s.length-1&&(a=wI(i,s[o])||xB(i,s[o])),i=i[s[o++]];else i=n.view[e],a=wI(n.view,e);if(a){r=i;break}n=n.parent}t[e]=r}return n_(r)&&(r=r.call(this.view)),r};function Vn(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Vn.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Vn.prototype.parse=function(e,t){var r=this.templateCache,n=e+":"+(t||_r.tags).join(":"),i=typeof r<"u",s=i?r.get(n):void 0;return s==null&&(s=VB(e,t),i&&r.set(n,s)),s};Vn.prototype.render=function(e,t,r,n){var i=this.getConfigTags(n),s=this.parse(e,i),o=t instanceof ka?t:new ka(t,void 0);return this.renderTokens(s,o,r,e,n)};Vn.prototype.renderTokens=function(e,t,r,n,i){for(var s="",o,a,l,c=0,h=e.length;c<h;++c)l=void 0,o=e[c],a=o[0],a==="#"?l=this.renderSection(o,t,r,n,i):a==="^"?l=this.renderInverted(o,t,r,n,i):a===">"?l=this.renderPartial(o,t,r,i):a==="&"?l=this.unescapedValue(o,t):a==="name"?l=this.escapedValue(o,t,i):a==="text"&&(l=this.rawValue(o)),l!==void 0&&(s+=l);return s};Vn.prototype.renderSection=function(e,t,r,n,i){var s=this,o="",a=t.lookup(e[1]);function l(d){return s.render(d,t,r,i)}if(a){if(La(a))for(var c=0,h=a.length;c<h;++c)o+=this.renderTokens(e[4],t.push(a[c]),r,n,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")o+=this.renderTokens(e[4],t.push(a),r,n,i);else if(n_(a)){if(typeof n!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(t.view,n.slice(e[3],e[5]),l),a!=null&&(o+=a)}else o+=this.renderTokens(e[4],t,r,n,i);return o}};Vn.prototype.renderInverted=function(e,t,r,n,i){var s=t.lookup(e[1]);if(!s||La(s)&&s.length===0)return this.renderTokens(e[4],t,r,n,i)};Vn.prototype.indentPartial=function(e,t,r){for(var n=t.replace(/[^ \t]/g,""),i=e.split(`
37
+ Url: ${Df(e)}`),!0)}function eF(e,t){return e.type||!t||!t.length?!1:iF(e).some(r=>xa(r,t))}function tF(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let r=e.transaction;return r?xa(r,t):!1}function nF(e,t){if(!t||!t.length)return!1;let r=Df(e);return r?xa(r,t):!1}function rF(e,t){if(!t||!t.length)return!0;let r=Df(e);return r?xa(r,t):!0}function iF(e){let t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function oF(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function sF(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Df(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?sF(t):null}catch{return mt&&se.error(`Cannot extract url for event ${Ur(e)}`),null}}function aF(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 cF="Dedupe",lF=()=>{let e;return{name:cF,processEvent(t){if(t.type)return t;try{if(uF(t,e))return mt&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Tf=lF;function uF(e,t){return t?!!(dF(e,t)||fF(e,t)):!1}function dF(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!X0(e,t)||!Z0(e,t))}function fF(e,t){let r=K0(t),n=K0(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!X0(e,t)||!Z0(e,t))}function Z0(e,t){let r=of(e),n=of(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){let s=n[i],o=r[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function X0(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function K0(e){return e.exception&&e.exception.values&&e.exception.values[0]}var zt=_e,By=0;function Vy(){return By>0}function DF(){By++,setTimeout(()=>{By--})}function ys(e,t={},r){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(ps(e))return e}catch{return e}let n=function(){let i=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let s=i.map(o=>ys(o,t));return e.apply(this,s)}catch(s){throw DF(),_f(o=>{o.addEventProcessor(a=>(t.mechanism&&(Ma(a,void 0,void 0),Ui(a,t.mechanism)),a.extra=re(w({},a.extra),{arguments:i}),a)),bf(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}tf(n,e),Ln(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}var ji=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function xf(e,t){let r=jy(e,t),n={type:t&&t.name,value:NF(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function IF(e,t,r,n){let i=Bt(),s=i&&i.getOptions().normalizeDepth,o=OF(t),a={__serialized__:df(t,s)};if(o)return{exception:{values:[xf(e,o)]},extra:a};let l={exception:{values:[{type:fs(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:AF(t,{isUnhandledRejection:n})}]},extra:a};if(r){let c=jy(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function Uy(e,t){return{exception:{values:[xf(e,t)]}}}function jy(e,t){let r=t.stacktrace||t.stack||"",n=xF(t),i=RF(t);try{return e(r,n,i)}catch{}return[]}var TF=/Minified React error #\d+;/i;function xF(e){return e&&TF.test(e.message)?1:0}function RF(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function NF(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function tI(e,t,r,n){let i=r&&r.syntheticException||void 0,s=Rf(e,t,i,n);return Ui(s),s.level="error",r&&r.event_id&&(s.event_id=r.event_id),yr(s)}function nI(e,t,r="info",n,i){let s=n&&n.syntheticException||void 0,o=Hy(e,t,s,i);return o.level=r,n&&n.event_id&&(o.event_id=n.event_id),yr(o)}function Rf(e,t,r,n,i){let s;if(Xd(t)&&t.error)return Uy(e,t.error);if(Jd(t)||jv(t)){let o=t;if("stack"in t)s=Uy(e,t);else{let a=o.name||(Jd(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Hy(e,l,r,n),Ma(s,l)}return"code"in o&&(s.tags=re(w({},s.tags),{"DOMException.code":`${o.code}`})),s}return us(t)?Uy(e,t):Vr(t)||fs(t)?(s=IF(e,t,r,i),Ui(s,{synthetic:!0}),s):(s=Hy(e,t,r,n),Ma(s,`${t}`,void 0),Ui(s,{synthetic:!0}),s)}function Hy(e,t,r,n){let i={};if(n&&r){let s=jy(e,r);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(Ta(t)){let{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function AF(e,{isUnhandledRejection:t}){let r=Qv(e),n=t?"promise rejection":"exception";return Xd(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:fs(e)?`Event \`${MF(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function MF(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function OF(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(r instanceof Error)return r}}function rI(e,{metadata:t,tunnel:r,dsn:n}){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}}),!!r&&!!n&&{dsn:oi(n)}),s=PF(e);return ci(i,[s])}function PF(e){return[{type:"user_report"},e]}var _l=class extends yl{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),r=zt.SENTRY_SDK_SOURCE||ly();Fy(t,"browser",["browser"],r),super(t),t.sendClientReports&&zt.document&&zt.document.addEventListener("visibilitychange",()=>{zt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return tI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return nI(this._options.stackParser,e,t,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){ji&&se.warn("SDK not enabled, will not capture user feedback.");return}let t=rI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){ji&&se.log("No outcomes to send");return}if(!this._dsn){ji&&se.log("No dsn provided, will not send outcomes");return}ji&&se.log("Sending outcomes:",e);let t=_y(e,this._options.tunnel&&oi(this._dsn));this.sendEnvelope(t)}},iI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qt=_e,kF=1e3,oI,$y,Wy;function Gy(e){let t="dom";Fn(t,e),Bn(t,LF)}function LF(){if(!Qt.document)return;let e=an.bind(null,"dom"),t=sI(e,!0);Qt.document.addEventListener("click",t,!1),Qt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let n=Qt[r]&&Qt[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(kt(n,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},h=c[s]=c[s]||{refCount:0};if(!h.handler){let d=sI(e);h.handler=d,i.call(this,s,d,a)}h.refCount++}catch{}return i.call(this,s,o,a)}}),kt(n,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__||{},h=c[s];h&&(h.refCount--,h.refCount<=0&&(i.call(this,s,h.handler,a),h.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}function FF(e){if(e.type!==$y)return!1;try{if(!e.target||e.target._sentryId!==Wy)return!1}catch{}return!0}function BF(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function sI(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=VF(r);if(BF(r.type,n))return;Ln(r,"_sentryCaptured",!0),n&&!n._sentryId&&Ln(n,"_sentryId",gn());let i=r.type==="keypress"?"input":r.type;FF(r)||(e({event:r,name:i,global:t}),$y=r.type,Wy=n?n._sentryId:void 0),clearTimeout(oI),oI=Qt.setTimeout(()=>{Wy=void 0,$y=void 0},kF)}}function VF(e){try{return e.target}catch{return null}}var Nf;function zy(e){let t="history";Fn(t,e),Bn(t,UF)}function UF(){if(!by())return;let e=Qt.onpopstate;Qt.onpopstate=function(...r){let n=Qt.location.href,i=Nf;if(Nf=n,an("history",{from:i,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){let i=n.length>2?n[2]:void 0;if(i){let s=Nf,o=String(i);Nf=o,an("history",{from:s,to:o})}return r.apply(this,n)}}kt(Qt.history,"pushState",t),kt(Qt.history,"replaceState",t)}var Af={};function qy(e){let t=Af[e];if(t)return t;let r=Qt[e];if(ul(r))return Af[e]=r.bind(Qt);let n=Qt.document;if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch(i){iI&&se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return r&&(Af[e]=r.bind(Qt))}function Mf(e){Af[e]=void 0}var _s="__sentry_xhr_v3__";function Yy(e){let t="xhr";Fn(t,e),Bn(t,HF)}function HF(){if(!Qt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;kt(e,"open",function(t){return function(...r){let n=rr()*1e3,i=kn(r[0])?r[0].toUpperCase():void 0,s=jF(r[1]);if(!i||!s)return t.apply(this,r);this[_s]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[_s];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:rr()*1e3,startTimestamp:n,xhr:this};an("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?kt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),kt(this,"setRequestHeader",function(a){return function(...l){let[c,h]=l,d=this[_s];return d&&kn(c)&&kn(h)&&(d.request_headers[c.toLowerCase()]=h),a.apply(this,l)}}),t.apply(this,r)}}),kt(e,"send",function(t){return function(...r){let n=this[_s];if(!n)return t.apply(this,r);r[0]!==void 0&&(n.body=r[0]);let i={startTimestamp:rr()*1e3,xhr:this};return an("xhr",i),t.apply(this,r)}})}function jF(e){if(kn(e))return e;try{return e.toString()}catch{}}function Ky(e,t=qy("fetch")){let r=0,n=0;function i(s){let o=s.body.length;r+=o,n++;let a=w({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15},e.fetchOptions);if(!t)return Mf("fetch"),go("No fetch implementation available");try{return t(e.url,a).then(l=>(r-=o,n--,{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 Mf("fetch"),r-=o,n--,go(l)}}return Cf(e,i)}var $F=30,WF=50;function Zy(e,t,r,n){let i={filename:e,function:t==="<anonymous>"?si:t,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}var GF=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,zF=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qF=/\((\S*)(?::(\d+))(?::(\d+))\)/,YF=e=>{let t=GF.exec(e);if(t){let[,n,i,s]=t;return Zy(n,si,+i,+s)}let r=zF.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){let s=qF.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}let[n,i]=uI(r[1]||si,r[2]);return Zy(i,n,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},aI=[$F,YF],KF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ZF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,XF=e=>{let t=KF.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=ZF.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],n=t[1]||si;return[n,r]=uI(n,r),Zy(r,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},cI=[WF,XF],lI=[aI,cI],Xy=ty(...lI),uI=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:si,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Of=1024,QF="Breadcrumbs",eB=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:QF,setup(r){t.console&&ny(rB(r)),t.dom&&Gy(nB(r,t.dom)),t.xhr&&Yy(iB(r)),t.fetch&&sy(oB(r)),t.history&&zy(sB(r)),t.sentry&&r.on("beforeSendEvent",tB(r))}}},dI=eB;function tB(e){return function(t){Bt()===e&&li({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Ur(t)},{event:t})}}function nB(e,t){return function(r){if(Bt()!==e)return;let n,i,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Of&&(ji&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Of}, but a value of ${o} was configured. Sentry will use ${Of} instead.`),o=Of),typeof s=="string"&&(s=[s]);try{let l=r.event,c=aB(l)?l.target:l;n=cl(c,{keyAttrs:s,maxStringLength:o}),i=Zv(c)}catch{n="<unknown>"}if(n.length===0)return;let a={category:`ui.${r.name}`,message:n};i&&(a.data={"ui.component_name":i}),li(a,{event:r.event,name:r.name,global:r.global})}}function rB(e){return function(t){if(Bt()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:fy(t.level),message:Qd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)r.message=`Assertion failed: ${Qd(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1);else return;li(r,{input:t.args,level:t.level})}}function iB(e){return function(t){if(Bt()!==e)return;let{startTimestamp:r,endTimestamp:n}=t,i=t.xhr[_s];if(!r||!n||!i)return;let{method:s,url:o,status_code:a,body:l}=i,c={method:s,url:o,status_code:a},h={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:n};li({category:"xhr",data:c,type:"http"},h)}}function oB(e){return function(t){if(Bt()!==e)return;let{startTimestamp:r,endTimestamp:n}=t;if(n&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,s={data:t.error,input:t.args,startTimestamp:r,endTimestamp:n};li({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=t.response,s=re(w({},t.fetchData),{status_code:i&&i.status}),o={input:t.args,response:i,startTimestamp:r,endTimestamp:n};li({category:"fetch",data:s,type:"http"},o)}}}function sB(e){return function(t){if(Bt()!==e)return;let r=t.from,n=t.to,i=fl(zt.location.href),s=r?fl(r):void 0,o=fl(n);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),li({category:"navigation",data:{from:r,to:n}})}}function aB(e){return!!e&&!!e.target}var cB=["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"],lB="BrowserApiErrors",uB=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:lB,setupOnce(){t.setTimeout&&kt(zt,"setTimeout",fI),t.setInterval&&kt(zt,"setInterval",fI),t.requestAnimationFrame&&kt(zt,"requestAnimationFrame",dB),t.XMLHttpRequest&&"XMLHttpRequest"in zt&&kt(XMLHttpRequest.prototype,"send",fB);let r=t.eventTarget;r&&(Array.isArray(r)?r:cB).forEach(pB)}}},pI=uB;function fI(e){return function(...t){let r=t[0];return t[0]=ys(r,{mechanism:{data:{function:vr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function dB(e){return function(t){return e.apply(this,[ys(t,{mechanism:{data:{function:"requestAnimationFrame",handler:vr(e)},handled:!1,type:"instrument"}})])}}function fB(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in r&&typeof r[n]=="function"&&kt(r,n,function(i){let s={mechanism:{data:{function:n,handler:vr(i)},handled:!1,type:"instrument"}},o=ps(i);return o&&(s.mechanism.data.handler=vr(o)),ys(i,s)})}),e.apply(this,t)}}function pB(e){let t=zt,r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(kt(r,"addEventListener",function(n){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=ys(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:vr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,ys(s,{mechanism:{data:{function:"addEventListener",handler:vr(s),target:e},handled:!1,type:"instrument"}}),o])}}),kt(r,"removeEventListener",function(n){return function(i,s,o){let a=s;try{let l=a&&a.__sentry_wrapped__;l&&n.call(this,i,l,o)}catch{}return n.call(this,i,a,o)}}))}var hB="GlobalHandlers",mB=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:hB,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(gB(r),hI("onerror")),t.onunhandledrejection&&(vB(r),hI("onunhandledrejection"))}}},mI=mB;function gB(e){ay(t=>{let{stackParser:r,attachStacktrace:n}=gI();if(Bt()!==e||Vy())return;let{msg:i,url:s,line:o,column:a,error:l}=t,c=EB(Rf(r,l||i,void 0,n,!1),s,o,a);c.level="error",vl(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function vB(e){cy(t=>{let{stackParser:r,attachStacktrace:n}=gI();if(Bt()!==e||Vy())return;let i=yB(t),s=ds(i)?_B(i):Rf(r,i,void 0,n,!0);s.level="error",vl(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function yB(e){if(ds(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 _B(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function EB(e,t,r,n){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(n,10))?void 0:n,h=isNaN(parseInt(r,10))?void 0:r,d=kn(t)&&t.length>0?t:Kv();return l.length===0&&l.push({colno:c,filename:d,function:si,in_app:!0,lineno:h}),e}function hI(e){ji&&se.log(`Global Handler attached: ${e}`)}function gI(){let e=Bt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var vI=()=>({name:"HttpContext",preprocessEvent(e){if(!zt.navigator&&!zt.location&&!zt.document)return;let t=e.request&&e.request.url||zt.location&&zt.location.href,{referrer:r}=zt.document||{},{userAgent:n}=zt.navigator||{},i=w(w(w({},e.request&&e.request.headers),r&&{Referer:r}),n&&{"User-Agent":n}),s=re(w(w({},e.request),t&&{url:t}),{headers:i});e.request=s}}),wB="cause",bB=5,CB="LinkedErrors",SB=(e={})=>{let t=e.limit||bB,r=e.key||wB;return{name:CB,preprocessEvent(n,i,s){let o=s.getOptions();qv(xf,o.stackParser,o.maxValueLength,r,t,n,i)}}},yI=SB;function Jy(e){return[If(),Sf(),pI(),dI(),mI(),yI(),Tf(),vI()]}var Qy=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},bt=class SD{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new SD),this.INSTANCE}captureException(t,r,n){C.error(t),this.getNewScope(r,n).captureException(t)}captureMessage(t,r,n,i){this.getNewScope(n,i).captureMessage(t,r??"error")}captureError(t,r,n,i){C.error(t,r);let s=this.getNewScope(n,i),o=new Qy(t,r);s.captureException(o)}setGlobalContext(t,r){this.contexts[t]=w({context:r},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,r){let n=new An;if(n.setClient(this.client),n.setUser(this.user),t?.triggerContext){let i=t.triggerContext;n.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&n.setExtras(t),this.tags&&n.setTags(this.tags),r&&n.setTags(r),Object.keys(this.contexts).forEach(i=>{n.setContext(i,this.contexts[i])}),n.setTag("language",navigator.language),n.setTag("timezone",ue.getTimezone()),n}init(){let t=Jy({}).filter(r=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(r.name));this.client=new _l({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Ky,stackParser:Xy,integrations:t,environment:Rn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:Rn.debug}),this.client.init()}},ue=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 r=e.indexOf(t);return r===-1?!1:(e.splice(r,1),!0)}static formatCurrency(e,t){if(e==0&&t)return"Free";let r=ke.get(),n=wt.get(),i=r.shopCurrencyCode||n.currency,s=r.currencyCode;s||C.warn("Currency code is not set in RuntimeData");let o=n.money?.format??r.moneyFormat,a;if(o&&i===s)a=Kd.format(e*100,o);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(c){return bt.getInstance().captureException(c,{currentCurrency:s,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),n.money?.showCurrency&&s!=="INR"&&(a=a.concat(` ${s}`))}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,r=document){let n=0,i=document.querySelectorAll("nonexistent-tag");for(;n<t;){let s=Math.min(100*2**n,5e3);if(await _I.JSUtils.sleep(s),i=r.querySelectorAll(e),i.length)return C.debug(`Attempt ${n+1}: ${i.length} elements found with ${e}`),i;C.debug(`Attempt ${n+1}: Elements not found with ${e}. Retrying after ${s}ms.`),n++}return C.warn(`Max attempts reached. Element not found with ${e}.`),i}static async retrySelector(e,t=10,r=document){return(await this.retrySelectorForElements(e,t,r)).item(0)}static async retrySelectors(e,t=10,r=document){let n=await this.retrySelectorForElements(e,t,r);return Array.from(n)}static async getCartAttributes(){let e=await rt.get(ge.DEVICE_ID),t=await mn.get(ge.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,r=document.body){let n=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===e||o.contains(e))&&(t(),n.disconnect())})})});n.observe(r,{childList:!0})}};function Pa(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:r})}var ui=class $h{transform(t){return t==null?null:ue.formatCurrency(t)}static \u0275fac=function(t){return new(t||$h)};static \u0275pipe=es({name:"cooeeCurrency",type:$h,pure:!0})},bI=Pe(Lf()),DB=Object.prototype.toString,La=Array.isArray||function(e){return DB.call(e)==="[object Array]"};function t_(e){return typeof e=="function"}function IB(e){return La(e)?"array":typeof e}function e_(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function EI(e,t){return e!=null&&typeof e=="object"&&t in e}function TB(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var xB=RegExp.prototype.test;function RB(e,t){return xB.call(e,t)}var NB=/\S/;function AB(e){return!RB(NB,e)}var MB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function OB(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return MB[t]})}var PB=/\s*/,kB=/\s+/,wI=/\s*=/,LB=/\s*\}/,FB=/#|\^|\/|>|\{|&|=|!/;function BB(e,t){if(!e)return[];var r=!1,n=[],i=[],s=[],o=!1,a=!1,l="",c=0;function h(){if(o&&!a)for(;s.length;)delete i[s.pop()];else s=[];o=!1,a=!1}var d,f,g;function m(j){if(typeof j=="string"&&(j=j.split(kB,2)),!La(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(e_(j[0])+"\\s*"),f=new RegExp("\\s*"+e_(j[1])),g=new RegExp("\\s*"+e_("}"+j[1]))}m(t||_r.tags);for(var b=new wl(e),I,A,F,U,M,q;!b.eos();){if(I=b.pos,F=b.scanUntil(d),F)for(var Me=0,lt=F.length;Me<lt;++Me)U=F.charAt(Me),AB(U)?(s.push(i.length),l+=U):(a=!0,r=!0,l+=" "),i.push(["text",U,I,I+1]),I+=1,U===`
38
+ `&&(h(),l="",c=0,r=!1);if(!b.scan(d))break;if(o=!0,A=b.scan(FB)||"name",b.scan(PB),A==="="?(F=b.scanUntil(wI),b.scan(wI),b.scanUntil(f)):A==="{"?(F=b.scanUntil(g),b.scan(LB),b.scanUntil(f),A="&"):F=b.scanUntil(f),!b.scan(f))throw new Error("Unclosed tag at "+b.pos);if(A==">"?M=[A,F,I,b.pos,l,c,r]:M=[A,F,I,b.pos],c++,i.push(M),A==="#"||A==="^")n.push(M);else if(A==="/"){if(q=n.pop(),!q)throw new Error('Unopened section "'+F+'" at '+I);if(q[1]!==F)throw new Error('Unclosed section "'+q[1]+'" at '+I)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&m(F)}if(h(),q=n.pop(),q)throw new Error('Unclosed section "'+q[1]+'" at '+b.pos);return UB(VB(i))}function VB(e){for(var t=[],r,n,i=0,s=e.length;i<s;++i)r=e[i],r&&(r[0]==="text"&&n&&n[0]==="text"?(n[1]+=r[1],n[3]=r[3]):(t.push(r),n=r));return t}function UB(e){for(var t=[],r=t,n=[],i,s,o=0,a=e.length;o<a;++o)switch(i=e[o],i[0]){case"#":case"^":r.push(i),n.push(i),r=i[4]=[];break;case"/":s=n.pop(),s[5]=i[2],r=n.length>0?n[n.length-1][4]:t;break;default:r.push(i)}return t}function wl(e){this.string=e,this.tail=e,this.pos=0}wl.prototype.eos=function(){return this.tail===""};wl.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};wl.prototype.scanUntil=function(e){var t=this.tail.search(e),r;switch(t){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=r.length,r};function ka(e,t){this.view=e,this.cache={".":this.view},this.parent=t}ka.prototype.push=function(e){return new ka(e,this)};ka.prototype.lookup=function(e){var t=this.cache,r;if(t.hasOwnProperty(e))r=t[e];else{for(var n=this,i,s,o,a=!1;n;){if(e.indexOf(".")>0)for(i=n.view,s=e.split("."),o=0;i!=null&&o<s.length;)o===s.length-1&&(a=EI(i,s[o])||TB(i,s[o])),i=i[s[o++]];else i=n.view[e],a=EI(n.view,e);if(a){r=i;break}n=n.parent}t[e]=r}return t_(r)&&(r=r.call(this.view)),r};function Vn(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Vn.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Vn.prototype.parse=function(e,t){var r=this.templateCache,n=e+":"+(t||_r.tags).join(":"),i=typeof r<"u",s=i?r.get(n):void 0;return s==null&&(s=BB(e,t),i&&r.set(n,s)),s};Vn.prototype.render=function(e,t,r,n){var i=this.getConfigTags(n),s=this.parse(e,i),o=t instanceof ka?t:new ka(t,void 0);return this.renderTokens(s,o,r,e,n)};Vn.prototype.renderTokens=function(e,t,r,n,i){for(var s="",o,a,l,c=0,h=e.length;c<h;++c)l=void 0,o=e[c],a=o[0],a==="#"?l=this.renderSection(o,t,r,n,i):a==="^"?l=this.renderInverted(o,t,r,n,i):a===">"?l=this.renderPartial(o,t,r,i):a==="&"?l=this.unescapedValue(o,t):a==="name"?l=this.escapedValue(o,t,i):a==="text"&&(l=this.rawValue(o)),l!==void 0&&(s+=l);return s};Vn.prototype.renderSection=function(e,t,r,n,i){var s=this,o="",a=t.lookup(e[1]);function l(d){return s.render(d,t,r,i)}if(a){if(La(a))for(var c=0,h=a.length;c<h;++c)o+=this.renderTokens(e[4],t.push(a[c]),r,n,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")o+=this.renderTokens(e[4],t.push(a),r,n,i);else if(t_(a)){if(typeof n!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(t.view,n.slice(e[3],e[5]),l),a!=null&&(o+=a)}else o+=this.renderTokens(e[4],t,r,n,i);return o}};Vn.prototype.renderInverted=function(e,t,r,n,i){var s=t.lookup(e[1]);if(!s||La(s)&&s.length===0)return this.renderTokens(e[4],t,r,n,i)};Vn.prototype.indentPartial=function(e,t,r){for(var n=t.replace(/[^ \t]/g,""),i=e.split(`
39
39
  `),s=0;s<i.length;s++)i[s].length&&(s>0||!r)&&(i[s]=n+i[s]);return i.join(`
40
- `)};Vn.prototype.renderPartial=function(e,t,r,n){if(r){var i=this.getConfigTags(n),s=n_(r)?r(e[1]):r[e[1]];if(s!=null){var o=e[6],a=e[5],l=e[4],c=s;a==0&&l&&(c=this.indentPartial(s,l,o));var h=this.parse(c,i);return this.renderTokens(h,t,r,c,n)}}};Vn.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(r!=null)return r};Vn.prototype.escapedValue=function(e,t,r){var n=this.getConfigEscape(r)||_r.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&n===_r.escape?String(i):n(i)};Vn.prototype.rawValue=function(e){return e[1]};Vn.prototype.getConfigTags=function(e){return La(e)?e:e&&typeof e=="object"?e.tags:void 0};Vn.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!La(e))return e.escape};var _r={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){El.templateCache=e},get templateCache(){return El.templateCache}},El=new Vn;_r.clearCache=function(){return El.clearCache()};_r.parse=function(e,t){return El.parse(e,t)};_r.render=function(e,t,r,n){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+TB(e)+'" was given as the first argument for mustache#render(template, view, partials)');return El.render(e,t,r,n)};_r.escape=PB;_r.Scanner=wl;_r.Context=ka;_r.Writer=Vn;var gn=_r;gn.escape=CI.MustacheUtils.escapeHtml;var Ff=class Yd{transform(t,r){return t?gn.render(t,w({},r)):null}static \u0275fac=function(t){return new(t||Yd)};static \u0275pipe=es({name:"cooeeDynamicVariables",type:Yd,pure:!0})},r_={};(function e(t,r,n,i){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=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 Z=D.transferToImageBitmap();try{x.createPattern(Z,"no-repeat")}catch{return!1}return!0}();function l(){}function c(D){var x=r.exports.Promise,Z=x!==void 0?x:t.Promise;return typeof Z=="function"?new Z(D):(D(l,l),null)}var h=function(D,x){return{transform:function(Z){if(D)return Z;if(x.has(Z))return x.get(Z);var ne=new OffscreenCanvas(Z.width,Z.height),ae=ne.getContext("2d");return ae.drawImage(Z,0,0),x.set(Z,ne),ne},clear:function(){x.clear()}}}(a,new Map),d=function(){var D=Math.floor(16.666666666666668),x,Z,ne={},ae=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(x=function(Ee){var ye=Math.random();return ne[ye]=requestAnimationFrame(function de(Ce){ae===Ce||ae+D-1<Ce?(ae=Ce,delete ne[ye],Ee()):ne[ye]=requestAnimationFrame(de)}),ye},Z=function(Ee){ne[Ee]&&cancelAnimationFrame(ne[Ee])}):(x=function(Ee){return setTimeout(Ee,D)},Z=function(Ee){return clearTimeout(Ee)}),{frame:x,cancel:Z}}(),f=function(){var D,x,Z={};function ne(ae){function Ee(ye,de){ae.postMessage({options:ye||{},callback:de})}ae.init=function(ye){var de=ye.transferControlToOffscreen();ae.postMessage({canvas:de},[de])},ae.fire=function(ye,de,Ce){if(x)return Ee(ye,null),x;var je=Math.random().toString(36).slice(2);return x=c(function(At){function He(Je){Je.data.callback===je&&(delete Z[je],ae.removeEventListener("message",He),x=null,h.clear(),Ce(),At())}ae.addEventListener("message",He),Ee(ye,je),Z[je]=He.bind(null,{data:{callback:je}})}),x},ae.reset=function(){ae.postMessage({reset:!0});for(var ye in Z)Z[ye](),delete Z[ye]}}return function(){if(D)return D;if(!n&&s){var ae=["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([ae])))}catch(Ee){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",Ee),null}ne(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,Z){return m(D&&b(D[x])?D[x]:g[x],Z)}function A(D){return D<0?0:Math.floor(D)}function F(D,x){return Math.floor(Math.random()*(x-D))+D}function V(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:V(x.substring(0,2)),g:V(x.substring(2,4)),b:V(x.substring(4,6))}}function Me(D){var x=I(D,"origin",Object);return x.x=I(x,"x",Number),x.y=I(x,"y",Number),x}function lt(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function j(D){var x=D.getBoundingClientRect();D.width=x.width,D.height=x.height}function fe(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 te(D,x,Z,ne,ae,Ee,ye,de,Ce){D.save(),D.translate(x,Z),D.rotate(Ee),D.scale(ne,ae),D.arc(0,0,1,ye,de,Ce),D.restore()}function pe(D){var x=D.angle*(Math.PI/180),Z=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*Z-Math.random()*Z),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 Be(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 Z=x.tick++/x.totalTicks,ne=x.x+x.random*x.tiltCos,ae=x.y+x.random*x.tiltSin,Ee=x.wobbleX+x.random*x.tiltCos,ye=x.wobbleY+x.random*x.tiltSin;if(D.fillStyle="rgba("+x.color.r+", "+x.color.g+", "+x.color.b+", "+(1-Z)+")",D.beginPath(),o&&x.shape.type==="path"&&typeof x.shape.path=="string"&&Array.isArray(x.shape.matrix))D.fill(Ke(x.shape.path,x.shape.matrix,x.x,x.y,Math.abs(Ee-ne)*.1,Math.abs(ye-ae)*.1,Math.PI/10*x.wobble));else if(x.shape.type==="bitmap"){var de=Math.PI/10*x.wobble,Ce=Math.abs(Ee-ne)*.1,je=Math.abs(ye-ae)*.1,At=x.shape.bitmap.width*x.scalar,He=x.shape.bitmap.height*x.scalar,Je=new DOMMatrix([Math.cos(de)*Ce,Math.sin(de)*Ce,-Math.sin(de)*je,Math.cos(de)*je,x.x,x.y]);Je.multiplySelf(new DOMMatrix(x.shape.matrix));var Lt=D.createPattern(h.transform(x.shape.bitmap),"no-repeat");Lt.setTransform(Je),D.globalAlpha=1-Z,D.fillStyle=Lt,D.fillRect(x.x-At/2,x.y-He/2,At,He),D.globalAlpha=1}else if(x.shape==="circle")D.ellipse?D.ellipse(x.x,x.y,Math.abs(Ee-ne)*x.ovalScalar,Math.abs(ye-ae)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI):te(D,x.x,x.y,Math.abs(Ee-ne)*x.ovalScalar,Math.abs(ye-ae)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI);else if(x.shape==="star")for(var Oe=Math.PI/2*3,u=4*x.scalar,p=8*x.scalar,v=x.x,T=x.y,L=5,B=Math.PI/L;L--;)v=x.x+Math.cos(Oe)*p,T=x.y+Math.sin(Oe)*p,D.lineTo(v,T),Oe+=B,v=x.x+Math.cos(Oe)*u,T=x.y+Math.sin(Oe)*u,D.lineTo(v,T),Oe+=B;else D.moveTo(Math.floor(x.x),Math.floor(x.y)),D.lineTo(Math.floor(x.wobbleX),Math.floor(ae)),D.lineTo(Math.floor(Ee),Math.floor(ye)),D.lineTo(Math.floor(ne),Math.floor(x.wobbleY));return D.closePath(),D.fill(),x.tick<x.totalTicks}function ct(D,x,Z,ne,ae){var Ee=x.slice(),ye=D.getContext("2d"),de,Ce,je=c(function(At){function He(){de=Ce=null,ye.clearRect(0,0,ne.width,ne.height),h.clear(),ae(),At()}function Je(){n&&!(ne.width===i.width&&ne.height===i.height)&&(ne.width=D.width=i.width,ne.height=D.height=i.height),!ne.width&&!ne.height&&(Z(D),ne.width=D.width,ne.height=D.height),ye.clearRect(0,0,ne.width,ne.height),Ee=Ee.filter(function(Lt){return Be(ye,Lt)}),Ee.length?de=d.frame(Je):He()}de=d.frame(Je),Ce=He});return{addFettis:function(At){return Ee=Ee.concat(At),je},canvas:D,promise:je,reset:function(){de&&d.cancel(de),Ce&&Ce()}}}function at(D,x){var Z=!D,ne=!!I(x||{},"resize"),ae=!1,Ee=I(x,"disableForReducedMotion",Boolean),ye=s&&!!I(x||{},"useWorker"),de=ye?f():null,Ce=Z?lt:j,je=D&&de?!!D.__confetti_initialized:!1,At=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,He;function Je(Oe,u,p){for(var v=I(Oe,"particleCount",A),T=I(Oe,"angle",Number),L=I(Oe,"spread",Number),B=I(Oe,"startVelocity",Number),K=I(Oe,"decay",Number),et=I(Oe,"gravity",Number),qe=I(Oe,"drift",Number),Fe=I(Oe,"colors",M),ut=I(Oe,"ticks",Number),J=I(Oe,"shapes"),De=I(Oe,"scalar"),me=!!I(Oe,"flat"),tt=Me(Oe),wn=v,lr=[],st=D.width*tt.x,ve=D.height*tt.y;wn--;)lr.push(pe({x:st,y:ve,angle:T,spread:L,startVelocity:B,color:Fe[wn%Fe.length],shape:J[F(0,J.length)],ticks:ut,decay:K,gravity:et,drift:qe,scalar:De,flat:me}));return He?He.addFettis(lr):(He=ct(D,lr,Ce,u,p),He.promise)}function Lt(Oe){var u=Ee||I(Oe,"disableForReducedMotion",Boolean),p=I(Oe,"zIndex",Number);if(u&&At)return c(function(B){B()});Z&&He?D=He.canvas:Z&&!D&&(D=fe(p),document.body.appendChild(D)),ne&&!je&&Ce(D);var v={width:D.width,height:D.height};de&&!je&&de.init(D),je=!0,de&&(D.__confetti_initialized=!0);function T(){if(de){var B={getBoundingClientRect:function(){if(!Z)return D.getBoundingClientRect()}};Ce(B),de.postMessage({resize:{width:B.width,height:B.height}});return}v.width=v.height=null}function L(){He=null,ne&&(ae=!1,t.removeEventListener("resize",T)),Z&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,je=!1)}return ne&&!ae&&(ae=!0,t.addEventListener("resize",T,!1)),de?de.fire(Oe,v,L):Je(Oe,v,L)}return Lt.reset=function(){de&&de.reset(),He&&He.reset()},Lt}var y;function jt(){return y||(y=at(null,{useWorker:!0,resize:!0})),y}function Ke(D,x,Z,ne,ae,Ee,ye){var de=new Path2D(D),Ce=new Path2D;Ce.addPath(de,new DOMMatrix(x));var je=new Path2D;return je.addPath(Ce,new DOMMatrix([Math.cos(ye)*ae,Math.sin(ye)*ae,-Math.sin(ye)*Ee,Math.cos(ye)*Ee,Z,ne])),je}function Qt(D){if(!o)throw new Error("path confetti are not supported in this browser");var x,Z;typeof D=="string"?x=D:(x=D.path,Z=D.matrix);var ne=new Path2D(x),ae=document.createElement("canvas"),Ee=ae.getContext("2d");if(!Z){for(var ye=1e3,de=ye,Ce=ye,je=0,At=0,He,Je,Lt=0;Lt<ye;Lt+=2)for(var Oe=0;Oe<ye;Oe+=2)Ee.isPointInPath(ne,Lt,Oe,"nonzero")&&(de=Math.min(de,Lt),Ce=Math.min(Ce,Oe),je=Math.max(je,Lt),At=Math.max(At,Oe));He=je-de,Je=At-Ce;var u=10,p=Math.min(u/He,u/Je);Z=[p,0,0,p,-Math.round(He/2+de)*p,-Math.round(Je/2+Ce)*p]}return{type:"path",path:x,matrix:Z}}function Se(D){var x,Z=1,ne="#000000",ae='"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,Z="scalar"in D?D.scalar:Z,ae="fontFamily"in D?D.fontFamily:ae,ne="color"in D?D.color:ne);var Ee=10*Z,ye=""+Ee+"px "+ae,de=new OffscreenCanvas(Ee,Ee),Ce=de.getContext("2d");Ce.font=ye;var je=Ce.measureText(x),At=Math.ceil(je.actualBoundingBoxRight+je.actualBoundingBoxLeft),He=Math.ceil(je.actualBoundingBoxAscent+je.actualBoundingBoxDescent),Je=2,Lt=je.actualBoundingBoxLeft+Je,Oe=je.actualBoundingBoxAscent+Je;At+=Je+Je,He+=Je+Je,de=new OffscreenCanvas(At,He),Ce=de.getContext("2d"),Ce.font=ye,Ce.fillStyle=ne,Ce.fillText(x,Lt,Oe);var u=1/Z;return{type:"bitmap",bitmap:de.transferToImageBitmap(),matrix:[u,0,0,u,-At*u/2,-He*u/2]}}r.exports=function(){return jt().apply(this,arguments)},r.exports.reset=function(){jt().reset()},r.exports.create=at,r.exports.shapeFromPath=Qt,r.exports.shapeFromText=Se})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),r_,!1);var SI=r_.exports,J7=r_.exports.create,Bf=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=[],r=Date.now()+2e3,n=()=>{t.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(n),e--)};n(),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 SI(e)}static async realisticFire(e,t){let r={origin:{y:.7}};await this.fire(Object.assign({},r,t,{particleCount:Math.floor(200*e)}))}},di=class Zd{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||Zd)(Ut(Uv,16))};static \u0275pipe=es({name:"safeHtml",type:Zd,pure:!0})},jB=(e,t)=>t.minValue;function $B(e,t){if(e&1&&(Q(0,"li",6)(1,"div",7),Ae(2,"div",8),bn(3,"cooeeCurrency"),bn(4,"safeHtml"),Ae(5,"img",9),Q(6,"div",10),fn(7),ee()()()),e&2){let r=t.$implicit,n=X(2);po("left",r.calculatedAlignment+"%"),Y(2),be("innerHTML",xn(4,7,xn(3,5,r.minValue)),Pr),Y(3),be("src",n.getIconURL(r),dn),Y(2),ya(r.label)}}function WB(e,t){if(e&1&&(Fr(0)(1),Ae(2,"div",0),bn(3,"cooeeDynamicVariables"),bn(4,"safeHtml"),Q(5,"div",1)(6,"ul",2)(7,"div",3),Ae(8,"div",4),ee(),$t(9,$B,8,9,"li",5,jB),ee()()),e&2){let r=X(),n=r.calculatedState(),i=n.nextMilestone?n.nextMilestone.reachingText:n.lastMilestone.reachedText;Y(2),be("innerHTML",xn(4,6,zS(3,3,i,r.localDynamicVariables())),Pr),Y(6),po("width",n.cartValuePercentage+"%"),Y(),Wt(n.milestones)}}var Uf=class pp{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=ki({});calculatedState=ki({});_engagementTrigger=ki(null);set engagementTrigger(t){this._engagementTrigger.set(t)}ngOnInit(){C.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){C.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===Vf.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===Vf.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===Vf.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>C.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){C.warn("Milestones not available in progress bar config",t);return}let r=await this.cart.getNormalisedCart(),n=t.progressBarConfig,i=n.milestones.at(-1),s=i.minValue+Math.floor(i.minValue*5/100),o=r.originalAmount,a=Math.min(o,s),l=100/n.milestones.length,c=l;for(let g of n.milestones)g.calculatedAlignment=c,c+=l;let h=this.calculateTrackedProgress(a,n.milestones);C.debug("Cart value:",o,`, percentage: ${h}%`),this.celebrate(t,o);let d={milestonesReady:!0,cartValuePercentage:h,milestones:n.milestones},f=n.milestones.find(g=>g.minValue>o);if(f){this.localDynamicVariables.set({amount_left:ue.formatCurrency(f.minValue-o)}),d.nextMilestone=f,this.calculatedState.set(d);return}d.lastMilestone=i,this.calculatedState.set(d)}celebrate(t,r){let n=[...t.progressBarConfig.milestones].reverse().find(s=>s.minValue<r);if(!n)return;let i=`lc/en/${t.shortID}/${n.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),Bf.realistic())}calculateTrackedProgress(t,r){if(t<=r[0].minValue)return t/r[0].minValue*r[0].calculatedAlignment;if(t>=r[r.length-1].minValue)return 100;for(let n=0;n<r.length-1;n++){let i=r[n].minValue,s=r[n+1].minValue,o=r[n].calculatedAlignment,a=r[n+1].calculatedAlignment;if(t>=i&&t<=s)return(t-i)/(s-i)*(a-o)+o}return 0}static \u0275fac=function(t){return new(t||pp)(Ut(Mt))};static \u0275cmp=ft({type:pp,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,r){t&1&&pt(0,WB,11,8),t&2&&Ot(r.calculatedState().milestonesReady?0:-1)},dependencies:[Ff,di,ui],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 GB(e,t){return t={exports:{}},e(t,t.exports),t.exports}var zB=ZB,qB=JB,YB=t2,pi=[],wr=[],KB=typeof Uint8Array<"u"?Uint8Array:Array,i_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Es=0,DI=i_.length;Es<DI;++Es)pi[Es]=i_[Es],wr[i_.charCodeAt(Es)]=Es;var Es,DI;wr[45]=62;wr[95]=63;function HI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function ZB(e){var t=HI(e),r=t[0],n=t[1];return(r+n)*3/4-n}function XB(e,t,r){return(t+r)*3/4-r}function JB(e){var t,r=HI(e),n=r[0],i=r[1],s=new KB(XB(e,n,i)),o=0,a=i>0?n-4:n,l;for(l=0;l<a;l+=4)t=wr[e.charCodeAt(l)]<<18|wr[e.charCodeAt(l+1)]<<12|wr[e.charCodeAt(l+2)]<<6|wr[e.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=wr[e.charCodeAt(l)]<<2|wr[e.charCodeAt(l+1)]>>4,s[o++]=t&255),i===1&&(t=wr[e.charCodeAt(l)]<<10|wr[e.charCodeAt(l+1)]<<4|wr[e.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function QB(e){return pi[e>>18&63]+pi[e>>12&63]+pi[e>>6&63]+pi[e&63]}function e2(e,t,r){for(var n,i=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(QB(n));return i.join("")}function t2(e){for(var t,r=e.length,n=r%3,i=[],s=16383,o=0,a=r-n;o<a;o+=s)i.push(e2(e,o,o+s>a?a:o+s));return n===1?(t=e[r-1],i.push(pi[t>>2]+pi[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(pi[t>>10]+pi[t>>4&63]+pi[t<<2&63]+"=")),i.join("")}var o_={byteLength:zB,toByteArray:qB,fromByteArray:YB},n2=function(e,t,r,n,i){var s,o,a=i*8-n-1,l=(1<<a)-1,c=l>>1,h=-7,d=r?i-1:0,f=r?-1:1,g=e[t+d];for(d+=f,s=g&(1<<-h)-1,g>>=-h,h+=a;h>0;s=s*256+e[t+d],d+=f,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=o*256+e[t+d],d+=f,h-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(g?-1:1)*o*Math.pow(2,s-n)},r2=function(e,t,r,n,i,s){var o,a,l,c=s*8-i-1,h=(1<<c)-1,d=h>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,m=n?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,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=h?(a=0,o=h):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+g]=a&255,g+=m,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[r+g]=o&255,g+=m,o/=256,c-=8);e[r+g-m]|=b*128},Fa={read:n2,write:r2},$f=GB(function(e,t){var r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;var n=2147483647;t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=i(),!o.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(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(u){if(u>n)throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=new Uint8Array(u);return Object.setPrototypeOf(p,o.prototype),p}function o(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 h(u)}return a(u,p,v)}o.poolSize=8192;function a(u,p,v){if(typeof u=="string")return d(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(Je(u,ArrayBuffer)||u&&Je(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Je(u,SharedArrayBuffer)||u&&Je(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 o.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 o.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))}o.from=function(u,p,v){return a(u,p,v)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,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?s(u):p!==void 0?typeof v=="string"?s(u).fill(p,v):s(u).fill(p):s(u)}o.alloc=function(u,p,v){return c(u,p,v)};function h(u){return l(u),s(u<0?0:I(u)|0)}o.allocUnsafe=function(u){return h(u)},o.allocUnsafeSlow=function(u){return h(u)};function d(u,p){if((typeof p!="string"||p==="")&&(p="utf8"),!o.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var v=F(u,p)|0,T=s(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=s(p),T=0;T<p;T+=1)v[T]=u[T]&255;return v}function g(u){if(Je(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,o.prototype),T}function b(u){if(o.isBuffer(u)){var p=I(u.length)|0,v=s(p);return v.length===0||u.copy(v,0,0,p),v}if(u.length!==void 0)return typeof u.length!="number"||Lt(u.length)?s(0):f(u);if(u.type==="Buffer"&&Array.isArray(u.data))return f(u.data)}function I(u){if(u>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return u|0}function A(u){return+u!=u&&(u=0),o.alloc(+u)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,p){if(Je(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),Je(p,Uint8Array)&&(p=o.from(p,p.offset,p.byteLength)),!o.isBuffer(u)||!o.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,B=Math.min(v,T);L<B;++L)if(u[L]!==p[L]){v=u[L],T=p[L];break}return v<T?-1:T<v?1:0},o.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}},o.concat=function(u,p){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);var v;if(p===void 0)for(p=0,v=0;v<u.length;++v)p+=u[v].length;var T=o.allocUnsafe(p),L=0;for(v=0;v<u.length;++v){var B=u[v];if(Je(B,Uint8Array))L+B.length>T.length?o.from(B).copy(T,L):Uint8Array.prototype.set.call(T,B,L);else if(o.isBuffer(B))B.copy(T,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=B.length}return T};function F(u,p){if(o.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||Je(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 de(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return At(u).length;default:if(L)return T?-1:de(u).length;p=(""+p).toLowerCase(),L=!0}}o.byteLength=F;function V(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 Qt(this,p,v);case"utf8":case"utf-8":return ct(this,p,v);case"ascii":return jt(this,p,v);case"latin1":case"binary":return Ke(this,p,v);case"base64":return Be(this,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,p,v);default:if(T)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),T=!0}}o.prototype._isBuffer=!0;function M(u,p,v){var T=u[p];u[p]=u[v],u[v]=T}o.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},o.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},o.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},o.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?ct(this,0,u):V.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.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+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(u,p,v,T,L){if(Je(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.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 B=L-T,K=v-p,et=Math.min(B,K),qe=this.slice(T,L),Fe=u.slice(p,v),ut=0;ut<et;++ut)if(qe[ut]!==Fe[ut]){B=qe[ut],K=Fe[ut];break}return B<K?-1:K<B?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,Lt(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=o.from(p,T)),o.isBuffer(p))return p.length===0?-1:Me(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):Me(u,[p],v,T,L);throw new TypeError("val must be string, number or Buffer")}function Me(u,p,v,T,L){var B=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;B=2,K/=2,et/=2,v/=2}function qe(me,tt){return B===1?me[tt]:me.readUInt16BE(tt*B)}var Fe;if(L){var ut=-1;for(Fe=v;Fe<K;Fe++)if(qe(u,Fe)===qe(p,ut===-1?0:Fe-ut)){if(ut===-1&&(ut=Fe),Fe-ut+1===et)return ut*B}else ut!==-1&&(Fe-=Fe-ut),ut=-1}else for(v+et>K&&(v=K-et),Fe=v;Fe>=0;Fe--){for(var J=!0,De=0;De<et;De++)if(qe(u,Fe+De)!==qe(p,De)){J=!1;break}if(J)return Fe}return-1}o.prototype.includes=function(u,p,v){return this.indexOf(u,p,v)!==-1},o.prototype.indexOf=function(u,p,v){return q(this,u,p,v,!0)},o.prototype.lastIndexOf=function(u,p,v){return q(this,u,p,v,!1)};function lt(u,p,v,T){v=Number(v)||0;var L=u.length-v;T?(T=Number(T),T>L&&(T=L)):T=L;var B=p.length;T>B/2&&(T=B/2);for(var K=0;K<T;++K){var et=parseInt(p.substr(K*2,2),16);if(Lt(et))return K;u[v+K]=et}return K}function j(u,p,v,T){return He(de(p,u.length-v),u,v,T)}function fe(u,p,v,T){return He(Ce(p),u,v,T)}function te(u,p,v,T){return He(At(p),u,v,T)}function pe(u,p,v,T){return He(je(p,u.length-v),u,v,T)}o.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 B=!1;;)switch(T){case"hex":return lt(this,u,p,v);case"utf8":case"utf-8":return j(this,u,p,v);case"ascii":case"latin1":case"binary":return fe(this,u,p,v);case"base64":return te(this,u,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,u,p,v);default:if(B)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),B=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Be(u,p,v){return p===0&&v===u.length?o_.fromByteArray(u):o_.fromByteArray(u.slice(p,v))}function ct(u,p,v){v=Math.min(u.length,v);for(var T=[],L=p;L<v;){var B=u[L],K=null,et=B>239?4:B>223?3:B>191?2:1;if(L+et<=v){var qe,Fe,ut,J;switch(et){case 1:B<128&&(K=B);break;case 2:qe=u[L+1],(qe&192)===128&&(J=(B&31)<<6|qe&63,J>127&&(K=J));break;case 3:qe=u[L+1],Fe=u[L+2],(qe&192)===128&&(Fe&192)===128&&(J=(B&15)<<12|(qe&63)<<6|Fe&63,J>2047&&(J<55296||J>57343)&&(K=J));break;case 4:qe=u[L+1],Fe=u[L+2],ut=u[L+3],(qe&192)===128&&(Fe&192)===128&&(ut&192)===128&&(J=(B&15)<<18|(qe&63)<<12|(Fe&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 at=4096;function y(u){var p=u.length;if(p<=at)return String.fromCharCode.apply(String,u);for(var v="",T=0;T<p;)v+=String.fromCharCode.apply(String,u.slice(T,T+=at));return v}function jt(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 Ke(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 Qt(u,p,v){var T=u.length;(!p||p<0)&&(p=0),(!v||v<0||v>T)&&(v=T);for(var L="",B=p;B<v;++B)L+=Oe[u[B]];return L}function Se(u,p,v){for(var T=u.slice(p,v),L="",B=0;B<T.length-1;B+=2)L+=String.fromCharCode(T[B]+T[B+1]*256);return L}o.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,o.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")}o.prototype.readUintLE=o.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,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return T},o.prototype.readUintBE=o.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},o.prototype.readUint8=o.prototype.readUInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.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},o.prototype.readUint32BE=o.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])},o.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,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return L*=128,T>=L&&(T-=Math.pow(2,8*p)),T},o.prototype.readIntBE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=p,L=1,B=this[u+--T];T>0&&(L*=256);)B+=this[u+--T]*L;return L*=128,B>=L&&(B-=Math.pow(2,8*p)),B},o.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]},o.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},o.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},o.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},o.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]},o.prototype.readFloatLE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Fa.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Fa.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Fa.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Fa.read(this,u,!1,52,8)};function x(u,p,v,T,L,B){if(!o.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>L||p<B)throw new RangeError('"value" argument is out of bounds');if(v+T>u.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.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 B=1,K=0;for(this[p]=u&255;++K<v&&(B*=256);)this[p+K]=u/B&255;return p+v},o.prototype.writeUintBE=o.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 B=v-1,K=1;for(this[p+B]=u&255;--B>=0&&(K*=256);)this[p+B]=u/K&255;return p+v},o.prototype.writeUint8=o.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},o.prototype.writeUint16LE=o.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},o.prototype.writeUint16BE=o.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},o.prototype.writeUint32LE=o.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},o.prototype.writeUint32BE=o.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},o.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 B=0,K=1,et=0;for(this[p]=u&255;++B<v&&(K*=256);)u<0&&et===0&&this[p+B-1]!==0&&(et=1),this[p+B]=(u/K>>0)-et&255;return p+v},o.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 B=v-1,K=1,et=0;for(this[p+B]=u&255;--B>=0&&(K*=256);)u<0&&et===0&&this[p+B+1]!==0&&(et=1),this[p+B]=(u/K>>0)-et&255;return p+v},o.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},o.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},o.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},o.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},o.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 Z(u,p,v,T,L,B){if(v+T>u.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function ne(u,p,v,T,L){return p=+p,v=v>>>0,L||Z(u,p,v,4),Fa.write(u,p,v,T,23,4),v+4}o.prototype.writeFloatLE=function(u,p,v){return ne(this,u,p,!0,v)},o.prototype.writeFloatBE=function(u,p,v){return ne(this,u,p,!1,v)};function ae(u,p,v,T,L){return p=+p,v=v>>>0,L||Z(u,p,v,8),Fa.write(u,p,v,T,52,8),v+8}o.prototype.writeDoubleLE=function(u,p,v){return ae(this,u,p,!0,v)},o.prototype.writeDoubleBE=function(u,p,v){return ae(this,u,p,!1,v)},o.prototype.copy=function(u,p,v,T){if(!o.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},o.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"&&!o.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 B;if(typeof u=="number")for(B=p;B<v;++B)this[B]=u;else{var K=o.isBuffer(u)?u:o.from(u,T),et=K.length;if(et===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(B=0;B<v-p;++B)this[B+p]=K[B%et]}return this};var Ee=/[^+/0-9A-Za-z-_]/g;function ye(u){if(u=u.split("=")[0],u=u.trim().replace(Ee,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function de(u,p){p=p||1/0;for(var v,T=u.length,L=null,B=[],K=0;K<T;++K){if(v=u.charCodeAt(K),v>55295&&v<57344){if(!L){if(v>56319){(p-=3)>-1&&B.push(239,191,189);continue}else if(K+1===T){(p-=3)>-1&&B.push(239,191,189);continue}L=v;continue}if(v<56320){(p-=3)>-1&&B.push(239,191,189),L=v;continue}v=(L-55296<<10|v-56320)+65536}else L&&(p-=3)>-1&&B.push(239,191,189);if(L=null,v<128){if((p-=1)<0)break;B.push(v)}else if(v<2048){if((p-=2)<0)break;B.push(v>>6|192,v&63|128)}else if(v<65536){if((p-=3)<0)break;B.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((p-=4)<0)break;B.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return B}function Ce(u){for(var p=[],v=0;v<u.length;++v)p.push(u.charCodeAt(v)&255);return p}function je(u,p){for(var v,T,L,B=[],K=0;K<u.length&&!((p-=2)<0);++K)v=u.charCodeAt(K),T=v>>8,L=v%256,B.push(L),B.push(T);return B}function At(u){return o_.toByteArray(ye(u))}function He(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 Je(u,p){return u instanceof p||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===p.name}function Lt(u){return u!==u}var Oe=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}()}),ot=$f.Buffer;$f.SlowBuffer;$f.INSPECT_MAX_BYTES;$f.kMaxLength;var u_=function(e,t){return u_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},u_(e,t)};function Wf(e,t){u_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var bs=function(e){Wf(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),Ht=function(e){Wf(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}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 jI(){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 i2(){var e=jI();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var o2=function(e){var t=i2()?"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 r=ot.alloc(e),n=0;n<e;++n)r[n]=Math.floor(Math.random()*256);return r},s2=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(ot.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(ot.alloc(t))}:o2}},$I=s2();function a2(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function f_(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function c2(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function l2(e){return Dl(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Dl(e){return typeof e=="object"&&e!==null}function Gf(e,t){var r=!1;function n(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r||(console.warn(t),r=!0),e.apply(this,i)}return n}function jf(e){if(ArrayBuffer.isView(e))return ot.from(e.buffer,e.byteOffset,e.byteLength);if(a2(e))return ot.from(e);throw new Ht("Must use either Buffer or TypedArray")}var u2=/^(?:[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,WI=function(e){return typeof e=="string"&&u2.test(e)},d_=function(e){if(!WI(e))throw new Ht('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 ot.from(t,"hex")},II=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")},gK=Math.pow(2,63)-1,vK=-Math.pow(2,63),d2=Math.pow(2,53),f2=-Math.pow(2,53),GI=4,Cs=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new Ht("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=r??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=ot.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=ot.from(t,"binary"):Array.isArray(t)?this.buffer=ot.from(t):this.buffer=jf(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new Ht("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new Ht("only accepts single character Uint8Array or Array");var r;if(typeof t=="string"?r=t.charCodeAt(0):typeof t=="number"?r=t:r=t[0],r<0||r>255)throw new Ht("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=ot.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(t,r){if(r=typeof r=="number"?r:this.position,this.buffer.length<r+t.length){var n=ot.alloc(this.buffer.length+t.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(t)?(this.buffer.set(jf(t),r),this.position=r+t.byteLength>this.position?r+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,r,t.length,"binary"),this.position=r+t.length>this.position?r+t.length:this.position)},e.prototype.read=function(t,r){return r=r&&r>0?r:this.position,this.buffer.slice(t,t+r)},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 r=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return t.legacy?{$binary:r,$type:n.length===1?"0"+n:n}:{$binary:{base64:r,subType:n.length===1?"0"+n:n}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new TI(this.buffer.slice(0,this.position));throw new bs('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,r){r=r||{};var n,i;if("$binary"in t?r.legacy&&typeof t.$binary=="string"&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=ot.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=ot.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=d_(t.$uuid)),!n)throw new Ht("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===GI?new TI(n):new e(n,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(Cs.prototype,"_bsontype",{value:"Binary"});var s_=16,TI=function(e){Wf(t,e);function t(r){var n=this,i,s;if(r==null)i=t.generate();else if(r instanceof t)i=ot.from(r.buffer),s=r.__id;else if(ArrayBuffer.isView(r)&&r.byteLength===s_)i=jf(r);else if(typeof r=="string")i=d_(r);else throw new Ht("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 n=e.call(this,i,GI)||this,n.__id=s,n}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(r){this.buffer=r,t.cacheHexString&&(this.__id=II(r))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(r){if(r===void 0&&(r=!0),t.cacheHexString&&this.__id)return this.__id;var n=II(this.id,r);return t.cacheHexString&&(this.__id=n),n},t.prototype.toString=function(r){return r?this.id.toString(r):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(r){if(!r)return!1;if(r instanceof t)return r.id.equals(this.id);try{return new t(r).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new Cs(this.id,Cs.SUBTYPE_UUID)},t.generate=function(){var r=$I(s_);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,ot.from(r)},t.isValid=function(r){return r?r instanceof t?!0:typeof r=="string"?WI(r):f_(r)?r.length!==s_?!1:(r[6]&240)===64&&(r[8]&128)===128:!1:!1},t.createFromHexString=function(r){var n=d_(r);return new t(n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Cs),zf=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}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(zf.prototype,"_bsontype",{value:"Code"});function p2(e){return Dl(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Cl=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var s=t.split(".");s.length===2&&(n=s.shift(),t=s.shift()),this.collection=t,this.oid=r,this.db=n,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 r={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(r.$db=this.db),r=Object.assign(r,this.fields)),r},e.fromExtendedJSON=function(t){var r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},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(Cl.prototype,"_bsontype",{value:"DBRef"});var Er=void 0;try{Er=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 xI=65536,h2=1<<24,Va=xI*xI,zI=Va*Va,RI=zI/2,NI={},AI={},le=function(){function e(t,r,n){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,r,n);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!r)):typeof t=="string"?Object.assign(this,e.fromString(t,!!r)):(this.low=t|0,this.high=r|0,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,s;return r?(t>>>=0,(s=0<=t&&t<256)&&(i=AI[t],i)?i:(n=e.fromBits(t,(t|0)<0?-1:0,!0),s&&(AI[t]=n),n)):(t|=0,(s=-128<=t&&t<128)&&(i=NI[t],i)?i:(n=e.fromBits(t,t<0?-1:0,!1),s&&(NI[t]=n),n))},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=zI)return e.MAX_UNSIGNED_VALUE}else{if(t<=-RI)return e.MIN_VALUE;if(t+1>=RI)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%Va|0,t/Va|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof r=="number"?(n=r,r=!1):r=!!r,n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return e.fromString(t.substring(1),r,n).neg();for(var s=e.fromNumber(Math.pow(n,8)),o=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+l),n);if(l<8){var h=e.fromNumber(Math.pow(n,l));o=o.mul(h).add(e.fromNumber(c))}else o=o.mul(s),o=o.add(e.fromNumber(c))}return o.unsigned=r,o},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){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,r)},e.fromBytesBE=function(t,r){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],r)},e.isLong=function(t){return Dl(t)&&t.__isLong__===!0},e.fromValue=function(t,r){return typeof t=="number"?e.fromNumber(t,r):typeof t=="string"?e.fromString(t,r):e.fromBits(t.low,t.high,typeof r=="boolean"?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,s=this.low&65535,o=t.high>>>16,a=t.high&65535,l=t.low>>>16,c=t.low&65535,h=0,d=0,f=0,g=0;return g+=s+c,f+=g>>>16,g&=65535,f+=i+l,d+=f>>>16,f&=65535,d+=n+a,h+=d>>>16,d&=65535,h+=r+o,h&=65535,e.fromBits(f<<16|g,h<<16|d,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 r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?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(Er){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Er.div_u:Er.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Er.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;s=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 o=this.shr(1);return n=o.div(t).shl(1),n.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),s=n.add(i.div(t)),s)}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();s=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),c=e.fromNumber(n),h=c.mul(t);h.isNegative()||h.gt(i);)n-=l,c=e.fromNumber(n,this.unsigned),h=c.mul(t);c.isZero()&&(c=e.ONE),s=s.add(c),i=i.sub(h)}return s},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,r;for(r=31;r>0&&(t&1<<r)===0;r--);return this.high!==0?r+33:r+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)),Er){var r=(this.unsigned?Er.rem_u:Er.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Er.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)),Er){var r=Er.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,Er.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 n=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,a=t.high>>>16,l=t.high&65535,c=t.low>>>16,h=t.low&65535,d=0,f=0,g=0,m=0;return m+=o*h,g+=m>>>16,m&=65535,g+=s*h,f+=g>>>16,g&=65535,g+=o*c,f+=g>>>16,g&=65535,f+=i*h,d+=f>>>16,f&=65535,f+=s*c,d+=f>>>16,f&=65535,f+=o*l,d+=f>>>16,f&=65535,d+=n*h+i*c+s*l+o*a,d&=65535,e.fromBits(g<<16|m,d<<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 r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}else return t===32?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>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)*Va+(this.low>>>0):this.high*Va+(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,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&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 r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var s=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,a="";;){var l=o.div(s),c=o.sub(l.mul(s)).toInt()>>>0,h=c.toString(t);if(o=l,o.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+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,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},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(h2),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(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var m2=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,g2=/^(\+|-)?(Infinity|inf)$/i,v2=/^(\+|-)?NaN$/i,bl=6111,a_=-6176,MI=6176,y2=34,c_=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),OI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),PI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),_2=/^([-+])?(\d+)?$/,E2=31,kI=16383,w2=30,b2=31;function LI(e){return!isNaN(parseInt(e,10))}function C2(e){var t=le.fromNumber(1e9),r=le.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=r.shiftLeft(32),r=r.add(new le(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function S2(e,t){if(!e&&!t)return{high:le.fromNumber(0),low:le.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new le(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new le(t.getLowBits(),0),o=r.multiply(i),a=r.multiply(s),l=n.multiply(i),c=n.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new le(a.getLowBits(),0).add(l).add(c.shiftRightUnsigned(32)),o=o.add(a.shiftRightUnsigned(32)),c=a.shiftLeft(32).add(new le(c.getLowBits(),0)),{high:o,low:c}}function D2(e,t){var r=e.high>>>0,n=t.high>>>0;if(r<n)return!0;if(r===n){var i=e.low>>>0,s=t.low>>>0;if(i<s)return!0}return!1}function Ba(e,t){throw new Ht('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var p_=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(f_(t)){if(t.byteLength!==16)throw new Ht("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new Ht("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var r=!1,n=!1,i=!1,s=0,o=0,a=0,l=0,c=0,h=[0],d=0,f=0,g=0,m=0,b=0,I=0,A=new le(0,0),F=new le(0,0),V=0,M=0;if(t.length>=7e3)throw new Ht(""+t+" not a valid Decimal128 string");var q=t.match(m2),Me=t.match(g2),lt=t.match(v2);if(!q&&!Me&&!lt||t.length===0)throw new Ht(""+t+" not a valid Decimal128 string");if(q){var j=q[2],fe=q[4],te=q[5],pe=q[6];fe&&pe===void 0&&Ba(t,"missing exponent power"),fe&&j===void 0&&Ba(t,"missing exponent base"),fe===void 0&&(te||pe)&&Ba(t,"missing e before exponent")}if((t[M]==="+"||t[M]==="-")&&(r=t[M++]==="-"),!LI(t[M])&&t[M]!=="."){if(t[M]==="i"||t[M]==="I")return new e(ot.from(r?OI:PI));if(t[M]==="N")return new e(ot.from(c_))}for(;LI(t[M])||t[M]===".";){if(t[M]==="."){n&&Ba(t,"contains multiple periods"),n=!0,M=M+1;continue}d<34&&(t[M]!=="0"||i)&&(i||(c=o),i=!0,h[f++]=parseInt(t[M],10),d=d+1),i&&(a=a+1),n&&(l=l+1),o=o+1,M=M+1}if(n&&!o)throw new Ht(""+t+" not a valid Decimal128 string");if(t[M]==="e"||t[M]==="E"){var Be=t.substr(++M).match(_2);if(!Be||!Be[2])return new e(ot.from(c_));b=parseInt(Be[0],10),M=M+Be[0].length}if(t[M])return new e(ot.from(c_));if(g=0,!d)g=0,m=0,h[0]=0,a=1,d=1,s=0;else if(m=d-1,s=a,s!==1)for(;h[c+s-1]===0;)s=s-1;for(b<=l&&l-b>16384?b=a_:b=b-l;b>bl;){if(m=m+1,m-g>y2){var ct=h.join("");if(ct.match(/^0+$/)){b=bl;break}Ba(t,"overflow")}b=b-1}for(;b<a_||d<a;){if(m===0&&s<d){b=a_,s=0;break}if(d<a?a=a-1:m=m-1,b<bl)b=b+1;else{var ct=h.join("");if(ct.match(/^0+$/)){b=bl;break}Ba(t,"overflow")}}if(m-g+1<s){var at=o;n&&(c=c+1,at=at+1),r&&(c=c+1,at=at+1);var y=parseInt(t[c+m+1],10),jt=0;if(y>=5&&(jt=1,y===5)){for(jt=h[m]%2===1?1:0,I=c+m+2;I<at;I++)if(parseInt(t[I],10)){jt=1;break}}if(jt){for(var Ke=m;Ke>=0;Ke--)if(++h[Ke]>9&&(h[Ke]=0,Ke===0))if(b<bl)b=b+1,h[Ke]=1;else return new e(ot.from(r?OI:PI))}}if(A=le.fromNumber(0),F=le.fromNumber(0),s===0)A=le.fromNumber(0),F=le.fromNumber(0);else if(m-g<17){var Ke=g;for(F=le.fromNumber(h[Ke++]),A=new le(0,0);Ke<=m;Ke++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Ke]))}else{var Ke=g;for(A=le.fromNumber(h[Ke++]);Ke<=m-17;Ke++)A=A.multiply(le.fromNumber(10)),A=A.add(le.fromNumber(h[Ke]));for(F=le.fromNumber(h[Ke++]);Ke<=m;Ke++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Ke]))}var Qt=S2(A,le.fromString("100000000000000000"));Qt.low=Qt.low.add(F),D2(Qt.low,F)&&(Qt.high=Qt.high.add(le.fromNumber(1))),V=b+MI;var Se={low:le.fromNumber(0),high:le.fromNumber(0)};Qt.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(Se.high=Se.high.or(le.fromNumber(3).shiftLeft(61)),Se.high=Se.high.or(le.fromNumber(V).and(le.fromNumber(16383).shiftLeft(47))),Se.high=Se.high.or(Qt.high.and(le.fromNumber(0x7fffffffffff)))):(Se.high=Se.high.or(le.fromNumber(V&16383).shiftLeft(49)),Se.high=Se.high.or(Qt.high.and(le.fromNumber(562949953421311)))),Se.low=Qt.low,r&&(Se.high=Se.high.or(le.fromString("9223372036854775808")));var D=ot.alloc(16);return M=0,D[M++]=Se.low.low&255,D[M++]=Se.low.low>>8&255,D[M++]=Se.low.low>>16&255,D[M++]=Se.low.low>>24&255,D[M++]=Se.low.high&255,D[M++]=Se.low.high>>8&255,D[M++]=Se.low.high>>16&255,D[M++]=Se.low.high>>24&255,D[M++]=Se.high.low&255,D[M++]=Se.high.low>>8&255,D[M++]=Se.high.low>>16&255,D[M++]=Se.high.low>>24&255,D[M++]=Se.high.high&255,D[M++]=Se.high.high>>8&255,D[M++]=Se.high.high>>16&255,D[M++]=Se.high.high>>24&255,new e(D)},e.prototype.toString=function(){for(var t,r=0,n=new Array(36),i=0;i<n.length;i++)n[i]=0;var s=0,o=!1,a,l={parts:[0,0,0,0]},c,h,d=[];s=0;var f=this.bytes,g=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,m=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,b=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,I=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24;s=0;var A={low:new le(g,m),high:new le(b,I)};A.high.lessThan(le.ZERO)&&d.push("-");var F=I>>26&E2;if(F>>3===3){if(F===w2)return d.join("")+"Infinity";if(F===b2)return"NaN";t=I>>15&kI,a=8+(I>>14&1)}else a=I>>14&7,t=I>>17&kI;var V=t-MI;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)o=!0;else for(h=3;h>=0;h--){var M=0,q=C2(l);if(l=q.quotient,M=q.rem.low,!!M)for(c=8;c>=0;c--)n[h*9+c]=M%10,M=Math.floor(M/10)}if(o)r=1,n[s]=0;else for(r=36;!n[s];)r=r-1,s=s+1;var Me=r-1+V;if(Me>=34||Me<=-7||V>0){if(r>34)return d.push("".concat(0)),V>0?d.push("E+".concat(V)):V<0&&d.push("E".concat(V)),d.join("");d.push("".concat(n[s++])),r=r-1,r&&d.push(".");for(var i=0;i<r;i++)d.push("".concat(n[s++]));d.push("E"),Me>0?d.push("+".concat(Me)):d.push("".concat(Me))}else if(V>=0)for(var i=0;i<r;i++)d.push("".concat(n[s++]));else{var lt=r+V;if(lt>0)for(var i=0;i<lt;i++)d.push("".concat(n[s++]));else d.push("0");for(d.push(".");lt++<0;)d.push("0");for(var i=0;i<r-Math.max(lt-1,0);i++)d.push("".concat(n[s++]))}return d.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(p_.prototype,"_bsontype",{value:"Decimal128"});var qf=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,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},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(qf.prototype,"_bsontype",{value:"Double"});var Yf=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,r){return r&&r.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(Yf.prototype,"_bsontype",{value:"Int32"});var h_=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(h_.prototype,"_bsontype",{value:"MaxKey"});var m_=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(m_.prototype,"_bsontype",{value:"MinKey"});var I2=new RegExp("^[0-9a-fA-F]{24}$"),ws=null,fi=Symbol("id"),an=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new Ht("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?r=ot.from(t.toHexString(),"hex"):r=t.id}else r=t;if(r==null||typeof r=="number")this[fi]=e.generate(typeof r=="number"?r:void 0);else if(ArrayBuffer.isView(r)&&r.byteLength===12)this[fi]=r instanceof ot?r:jf(r);else if(typeof r=="string")if(r.length===12){var n=ot.from(r);if(n.byteLength===12)this[fi]=n;else throw new Ht("Argument passed in must be a string of 12 bytes")}else if(r.length===24&&I2.test(r))this[fi]=ot.from(r,"hex");else throw new Ht("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Ht("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[fi]},set:function(t){this[fi]=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 r=e.getInc(),n=ot.alloc(12);return n.writeUInt32BE(t,0),ws===null&&(ws=$I(5)),n[4]=ws[0],n[5]=ws[1],n[6]=ws[2],n[7]=ws[3],n[8]=ws[4],n[11]=r&255,n[10]=r>>8&255,n[9]=r>>16&255,n},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[fi][11]===t[fi][11]&&this[fi].equals(t[fi]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&f_(this.id))return t===ot.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 ot.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var r=t.toHexString(),n=this.toHexString().toLowerCase();return typeof r=="string"&&r.toLowerCase()===n}return!1},e.prototype.getTimestamp=function(){var t=new Date,r=this.id.readUInt32BE(0);return t.setTime(Math.floor(r)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var r=ot.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new Ht("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(ot.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(an.prototype,"generate",{value:Gf(function(e){return an.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(an.prototype,"getInc",{value:Gf(function(){return an.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(an.prototype,"get_inc",{value:Gf(function(){return an.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(an,"get_inc",{value:Gf(function(){return an.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(an.prototype,"_bsontype",{value:"ObjectID"});function T2(e){return e.split("").sort().join("")}var Sl=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=T2(r??""),this.pattern.indexOf("\0")!==-1)throw new bs("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new bs("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if(!(this.options[n]==="i"||this.options[n]==="m"||this.options[n]==="x"||this.options[n]==="l"||this.options[n]==="s"||this.options[n]==="u"))throw new bs("The regular expression option [".concat(this.options[n],"] 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 Ht("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(Sl.prototype,"_bsontype",{value:"BSONRegExp"});var g_=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(g_.prototype,"_bsontype",{value:"Symbol"});var x2=le,qI=function(e){Wf(t,e);function t(r,n){var i=this;return i instanceof t?(le.isLong(r)?i=e.call(this,r.low,r.high,!0)||this:Dl(r)&&typeof r.t<"u"&&typeof r.i<"u"?i=e.call(this,r.i,r.t,!0)||this:i=e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(r){return new t(le.fromInt(r,!0))},t.fromNumber=function(r){return new t(le.fromNumber(r,!0))},t.fromBits=function(r,n){return new t(r,n)},t.fromString=function(r,n){return new t(le.fromString(r,!0,n))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(r){return new t(r.$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=le.MAX_UNSIGNED_VALUE,t}(x2);function R2(e){return Dl(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var YI=2147483647,KI=-2147483648,ZI=9223372036854776e3,XI=-9223372036854776e3,N2={$oid:an,$binary:Cs,$uuid:Cs,$symbol:g_,$numberInt:Yf,$numberDecimal:p_,$numberDouble:qf,$numberLong:le,$minKey:m_,$maxKey:h_,$regex:Sl,$regularExpression:Sl,$timestamp:qI};function JI(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=KI&&e<=YI)return new Yf(e);if(e>=XI&&e<=ZI)return le.fromNumber(e)}return new qf(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter(function(d){return d.startsWith("$")&&e[d]!=null}),n=0;n<r.length;n++){var i=N2[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var s=e.$date,o=new Date;return t.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):le.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&t.relaxed&&o.setTime(s),o}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=JI(e.$scope)),zf.fromExtendedJSON(e)}if(p2(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof Cl)return l;var c=Object.keys(l).filter(function(d){return d.startsWith("$")}),h=!0;if(c.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(h=!1)}),h)return Cl.fromExtendedJSON(l)}return e}function A2(e,t){return e.map(function(r,n){t.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return vo(r,t)}finally{t.seenObjects.pop()}})}function FI(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function vo(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var r=t.seenObjects.findIndex(function(A){return A.obj===e});if(r!==-1){var n=t.seenObjects.map(function(A){return A.propertyName}),i=n.slice(0,r).map(function(A){return"".concat(A," -> ")}).join(""),s=n[r],o=" -> "+n.slice(r+1,n.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=n[n.length-1],l=" ".repeat(i.length+s.length/2),c="-".repeat(o.length+(s.length+a.length)/2-1);throw new Ht(`Converting circular structure to EJSON:
40
+ `)};Vn.prototype.renderPartial=function(e,t,r,n){if(r){var i=this.getConfigTags(n),s=t_(r)?r(e[1]):r[e[1]];if(s!=null){var o=e[6],a=e[5],l=e[4],c=s;a==0&&l&&(c=this.indentPartial(s,l,o));var h=this.parse(c,i);return this.renderTokens(h,t,r,c,n)}}};Vn.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(r!=null)return r};Vn.prototype.escapedValue=function(e,t,r){var n=this.getConfigEscape(r)||_r.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&n===_r.escape?String(i):n(i)};Vn.prototype.rawValue=function(e){return e[1]};Vn.prototype.getConfigTags=function(e){return La(e)?e:e&&typeof e=="object"?e.tags:void 0};Vn.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!La(e))return e.escape};var _r={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){El.templateCache=e},get templateCache(){return El.templateCache}},El=new Vn;_r.clearCache=function(){return El.clearCache()};_r.parse=function(e,t){return El.parse(e,t)};_r.render=function(e,t,r,n){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+IB(e)+'" was given as the first argument for mustache#render(template, view, partials)');return El.render(e,t,r,n)};_r.escape=OB;_r.Scanner=wl;_r.Context=ka;_r.Writer=Vn;var vn=_r;vn.escape=bI.MustacheUtils.escapeHtml;var Ff=class Yd{transform(t,r){return t?vn.render(t,w({},r)):null}static \u0275fac=function(t){return new(t||Yd)};static \u0275pipe=es({name:"cooeeDynamicVariables",type:Yd,pure:!0})},n_={};(function e(t,r,n,i){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=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 Z=D.transferToImageBitmap();try{x.createPattern(Z,"no-repeat")}catch{return!1}return!0}();function l(){}function c(D){var x=r.exports.Promise,Z=x!==void 0?x:t.Promise;return typeof Z=="function"?new Z(D):(D(l,l),null)}var h=function(D,x){return{transform:function(Z){if(D)return Z;if(x.has(Z))return x.get(Z);var ne=new OffscreenCanvas(Z.width,Z.height),ae=ne.getContext("2d");return ae.drawImage(Z,0,0),x.set(Z,ne),ne},clear:function(){x.clear()}}}(a,new Map),d=function(){var D=Math.floor(16.666666666666668),x,Z,ne={},ae=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(x=function(Ee){var ye=Math.random();return ne[ye]=requestAnimationFrame(function de(Ce){ae===Ce||ae+D-1<Ce?(ae=Ce,delete ne[ye],Ee()):ne[ye]=requestAnimationFrame(de)}),ye},Z=function(Ee){ne[Ee]&&cancelAnimationFrame(ne[Ee])}):(x=function(Ee){return setTimeout(Ee,D)},Z=function(Ee){return clearTimeout(Ee)}),{frame:x,cancel:Z}}(),f=function(){var D,x,Z={};function ne(ae){function Ee(ye,de){ae.postMessage({options:ye||{},callback:de})}ae.init=function(ye){var de=ye.transferControlToOffscreen();ae.postMessage({canvas:de},[de])},ae.fire=function(ye,de,Ce){if(x)return Ee(ye,null),x;var je=Math.random().toString(36).slice(2);return x=c(function(Mt){function He(Je){Je.data.callback===je&&(delete Z[je],ae.removeEventListener("message",He),x=null,h.clear(),Ce(),Mt())}ae.addEventListener("message",He),Ee(ye,je),Z[je]=He.bind(null,{data:{callback:je}})}),x},ae.reset=function(){ae.postMessage({reset:!0});for(var ye in Z)Z[ye](),delete Z[ye]}}return function(){if(D)return D;if(!n&&s){var ae=["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([ae])))}catch(Ee){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",Ee),null}ne(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,Z){return m(D&&b(D[x])?D[x]:g[x],Z)}function A(D){return D<0?0:Math.floor(D)}function F(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 Me(D){var x=I(D,"origin",Object);return x.x=I(x,"x",Number),x.y=I(x,"y",Number),x}function lt(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function j(D){var x=D.getBoundingClientRect();D.width=x.width,D.height=x.height}function fe(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 te(D,x,Z,ne,ae,Ee,ye,de,Ce){D.save(),D.translate(x,Z),D.rotate(Ee),D.scale(ne,ae),D.arc(0,0,1,ye,de,Ce),D.restore()}function pe(D){var x=D.angle*(Math.PI/180),Z=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*Z-Math.random()*Z),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 Be(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 Z=x.tick++/x.totalTicks,ne=x.x+x.random*x.tiltCos,ae=x.y+x.random*x.tiltSin,Ee=x.wobbleX+x.random*x.tiltCos,ye=x.wobbleY+x.random*x.tiltSin;if(D.fillStyle="rgba("+x.color.r+", "+x.color.g+", "+x.color.b+", "+(1-Z)+")",D.beginPath(),o&&x.shape.type==="path"&&typeof x.shape.path=="string"&&Array.isArray(x.shape.matrix))D.fill(Ke(x.shape.path,x.shape.matrix,x.x,x.y,Math.abs(Ee-ne)*.1,Math.abs(ye-ae)*.1,Math.PI/10*x.wobble));else if(x.shape.type==="bitmap"){var de=Math.PI/10*x.wobble,Ce=Math.abs(Ee-ne)*.1,je=Math.abs(ye-ae)*.1,Mt=x.shape.bitmap.width*x.scalar,He=x.shape.bitmap.height*x.scalar,Je=new DOMMatrix([Math.cos(de)*Ce,Math.sin(de)*Ce,-Math.sin(de)*je,Math.cos(de)*je,x.x,x.y]);Je.multiplySelf(new DOMMatrix(x.shape.matrix));var Ft=D.createPattern(h.transform(x.shape.bitmap),"no-repeat");Ft.setTransform(Je),D.globalAlpha=1-Z,D.fillStyle=Ft,D.fillRect(x.x-Mt/2,x.y-He/2,Mt,He),D.globalAlpha=1}else if(x.shape==="circle")D.ellipse?D.ellipse(x.x,x.y,Math.abs(Ee-ne)*x.ovalScalar,Math.abs(ye-ae)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI):te(D,x.x,x.y,Math.abs(Ee-ne)*x.ovalScalar,Math.abs(ye-ae)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI);else if(x.shape==="star")for(var Oe=Math.PI/2*3,u=4*x.scalar,p=8*x.scalar,v=x.x,T=x.y,L=5,B=Math.PI/L;L--;)v=x.x+Math.cos(Oe)*p,T=x.y+Math.sin(Oe)*p,D.lineTo(v,T),Oe+=B,v=x.x+Math.cos(Oe)*u,T=x.y+Math.sin(Oe)*u,D.lineTo(v,T),Oe+=B;else D.moveTo(Math.floor(x.x),Math.floor(x.y)),D.lineTo(Math.floor(x.wobbleX),Math.floor(ae)),D.lineTo(Math.floor(Ee),Math.floor(ye)),D.lineTo(Math.floor(ne),Math.floor(x.wobbleY));return D.closePath(),D.fill(),x.tick<x.totalTicks}function ct(D,x,Z,ne,ae){var Ee=x.slice(),ye=D.getContext("2d"),de,Ce,je=c(function(Mt){function He(){de=Ce=null,ye.clearRect(0,0,ne.width,ne.height),h.clear(),ae(),Mt()}function Je(){n&&!(ne.width===i.width&&ne.height===i.height)&&(ne.width=D.width=i.width,ne.height=D.height=i.height),!ne.width&&!ne.height&&(Z(D),ne.width=D.width,ne.height=D.height),ye.clearRect(0,0,ne.width,ne.height),Ee=Ee.filter(function(Ft){return Be(ye,Ft)}),Ee.length?de=d.frame(Je):He()}de=d.frame(Je),Ce=He});return{addFettis:function(Mt){return Ee=Ee.concat(Mt),je},canvas:D,promise:je,reset:function(){de&&d.cancel(de),Ce&&Ce()}}}function at(D,x){var Z=!D,ne=!!I(x||{},"resize"),ae=!1,Ee=I(x,"disableForReducedMotion",Boolean),ye=s&&!!I(x||{},"useWorker"),de=ye?f():null,Ce=Z?lt:j,je=D&&de?!!D.__confetti_initialized:!1,Mt=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,He;function Je(Oe,u,p){for(var v=I(Oe,"particleCount",A),T=I(Oe,"angle",Number),L=I(Oe,"spread",Number),B=I(Oe,"startVelocity",Number),K=I(Oe,"decay",Number),et=I(Oe,"gravity",Number),qe=I(Oe,"drift",Number),Fe=I(Oe,"colors",M),ut=I(Oe,"ticks",Number),J=I(Oe,"shapes"),De=I(Oe,"scalar"),me=!!I(Oe,"flat"),tt=Me(Oe),wn=v,en=[],st=D.width*tt.x,ve=D.height*tt.y;wn--;)en.push(pe({x:st,y:ve,angle:T,spread:L,startVelocity:B,color:Fe[wn%Fe.length],shape:J[F(0,J.length)],ticks:ut,decay:K,gravity:et,drift:qe,scalar:De,flat:me}));return He?He.addFettis(en):(He=ct(D,en,Ce,u,p),He.promise)}function Ft(Oe){var u=Ee||I(Oe,"disableForReducedMotion",Boolean),p=I(Oe,"zIndex",Number);if(u&&Mt)return c(function(B){B()});Z&&He?D=He.canvas:Z&&!D&&(D=fe(p),document.body.appendChild(D)),ne&&!je&&Ce(D);var v={width:D.width,height:D.height};de&&!je&&de.init(D),je=!0,de&&(D.__confetti_initialized=!0);function T(){if(de){var B={getBoundingClientRect:function(){if(!Z)return D.getBoundingClientRect()}};Ce(B),de.postMessage({resize:{width:B.width,height:B.height}});return}v.width=v.height=null}function L(){He=null,ne&&(ae=!1,t.removeEventListener("resize",T)),Z&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,je=!1)}return ne&&!ae&&(ae=!0,t.addEventListener("resize",T,!1)),de?de.fire(Oe,v,L):Je(Oe,v,L)}return Ft.reset=function(){de&&de.reset(),He&&He.reset()},Ft}var y;function $t(){return y||(y=at(null,{useWorker:!0,resize:!0})),y}function Ke(D,x,Z,ne,ae,Ee,ye){var de=new Path2D(D),Ce=new Path2D;Ce.addPath(de,new DOMMatrix(x));var je=new Path2D;return je.addPath(Ce,new DOMMatrix([Math.cos(ye)*ae,Math.sin(ye)*ae,-Math.sin(ye)*Ee,Math.cos(ye)*Ee,Z,ne])),je}function Zt(D){if(!o)throw new Error("path confetti are not supported in this browser");var x,Z;typeof D=="string"?x=D:(x=D.path,Z=D.matrix);var ne=new Path2D(x),ae=document.createElement("canvas"),Ee=ae.getContext("2d");if(!Z){for(var ye=1e3,de=ye,Ce=ye,je=0,Mt=0,He,Je,Ft=0;Ft<ye;Ft+=2)for(var Oe=0;Oe<ye;Oe+=2)Ee.isPointInPath(ne,Ft,Oe,"nonzero")&&(de=Math.min(de,Ft),Ce=Math.min(Ce,Oe),je=Math.max(je,Ft),Mt=Math.max(Mt,Oe));He=je-de,Je=Mt-Ce;var u=10,p=Math.min(u/He,u/Je);Z=[p,0,0,p,-Math.round(He/2+de)*p,-Math.round(Je/2+Ce)*p]}return{type:"path",path:x,matrix:Z}}function Se(D){var x,Z=1,ne="#000000",ae='"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,Z="scalar"in D?D.scalar:Z,ae="fontFamily"in D?D.fontFamily:ae,ne="color"in D?D.color:ne);var Ee=10*Z,ye=""+Ee+"px "+ae,de=new OffscreenCanvas(Ee,Ee),Ce=de.getContext("2d");Ce.font=ye;var je=Ce.measureText(x),Mt=Math.ceil(je.actualBoundingBoxRight+je.actualBoundingBoxLeft),He=Math.ceil(je.actualBoundingBoxAscent+je.actualBoundingBoxDescent),Je=2,Ft=je.actualBoundingBoxLeft+Je,Oe=je.actualBoundingBoxAscent+Je;Mt+=Je+Je,He+=Je+Je,de=new OffscreenCanvas(Mt,He),Ce=de.getContext("2d"),Ce.font=ye,Ce.fillStyle=ne,Ce.fillText(x,Ft,Oe);var u=1/Z;return{type:"bitmap",bitmap:de.transferToImageBitmap(),matrix:[u,0,0,u,-Mt*u/2,-He*u/2]}}r.exports=function(){return $t().apply(this,arguments)},r.exports.reset=function(){$t().reset()},r.exports.create=at,r.exports.shapeFromPath=Zt,r.exports.shapeFromText=Se})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),n_,!1);var CI=n_.exports,X7=n_.exports.create,Bf=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=[],r=Date.now()+2e3,n=()=>{t.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(n),e--)};n(),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 CI(e)}static async realisticFire(e,t){let r={origin:{y:.7}};await this.fire(Object.assign({},r,t,{particleCount:Math.floor(200*e)}))}},di=class Zd{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||Zd)(Ht(Vv,16))};static \u0275pipe=es({name:"safeHtml",type:Zd,pure:!0})},HB=(e,t)=>t.minValue;function jB(e,t){if(e&1&&(Q(0,"li",6)(1,"div",7),Ae(2,"div",8),bn(3,"cooeeCurrency"),bn(4,"safeHtml"),Ae(5,"img",9),Q(6,"div",10),pn(7),ee()()()),e&2){let r=t.$implicit,n=X(2);po("left",r.calculatedAlignment+"%"),Y(2),be("innerHTML",xn(4,7,xn(3,5,r.minValue)),Pr),Y(3),be("src",n.getIconURL(r),fn),Y(2),ya(r.label)}}function $B(e,t){if(e&1&&(Fr(0)(1),Ae(2,"div",0),bn(3,"cooeeDynamicVariables"),bn(4,"safeHtml"),Q(5,"div",1)(6,"ul",2)(7,"div",3),Ae(8,"div",4),ee(),Wt(9,jB,8,9,"li",5,HB),ee()()),e&2){let r=X(),n=r.calculatedState(),i=n.nextMilestone?n.nextMilestone.reachingText:n.lastMilestone.reachedText;Y(2),be("innerHTML",xn(4,6,GS(3,3,i,r.localDynamicVariables())),Pr),Y(6),po("width",n.cartValuePercentage+"%"),Y(),Gt(n.milestones)}}var Uf=class pp{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=ki({});calculatedState=ki({});_engagementTrigger=ki(null);set engagementTrigger(t){this._engagementTrigger.set(t)}ngOnInit(){C.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){C.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===Vf.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===Vf.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===Vf.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>C.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){C.warn("Milestones not available in progress bar config",t);return}let r=await this.cart.getNormalisedCart(),n=t.progressBarConfig,i=n.milestones.at(-1),s=i.minValue+Math.floor(i.minValue*5/100),o=r.originalAmount,a=Math.min(o,s),l=100/n.milestones.length,c=l;for(let g of n.milestones)g.calculatedAlignment=c,c+=l;let h=this.calculateTrackedProgress(a,n.milestones);C.debug("Cart value:",o,`, percentage: ${h}%`),this.celebrate(t,o);let d={milestonesReady:!0,cartValuePercentage:h,milestones:n.milestones},f=n.milestones.find(g=>g.minValue>o);if(f){this.localDynamicVariables.set({amount_left:ue.formatCurrency(f.minValue-o)}),d.nextMilestone=f,this.calculatedState.set(d);return}d.lastMilestone=i,this.calculatedState.set(d)}celebrate(t,r){let n=[...t.progressBarConfig.milestones].reverse().find(s=>s.minValue<r);if(!n)return;let i=`lc/en/${t.shortID}/${n.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),Bf.realistic())}calculateTrackedProgress(t,r){if(t<=r[0].minValue)return t/r[0].minValue*r[0].calculatedAlignment;if(t>=r[r.length-1].minValue)return 100;for(let n=0;n<r.length-1;n++){let i=r[n].minValue,s=r[n+1].minValue,o=r[n].calculatedAlignment,a=r[n+1].calculatedAlignment;if(t>=i&&t<=s)return(t-i)/(s-i)*(a-o)+o}return 0}static \u0275fac=function(t){return new(t||pp)(Ht(Ot))};static \u0275cmp=ft({type:pp,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,r){t&1&&pt(0,$B,11,8),t&2&&Pt(r.calculatedState().milestonesReady?0:-1)},dependencies:[Ff,di,ui],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 WB(e,t){return t={exports:{}},e(t,t.exports),t.exports}var GB=KB,zB=XB,qB=e2,pi=[],wr=[],YB=typeof Uint8Array<"u"?Uint8Array:Array,r_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Es=0,SI=r_.length;Es<SI;++Es)pi[Es]=r_[Es],wr[r_.charCodeAt(Es)]=Es;var Es,SI;wr[45]=62;wr[95]=63;function UI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function KB(e){var t=UI(e),r=t[0],n=t[1];return(r+n)*3/4-n}function ZB(e,t,r){return(t+r)*3/4-r}function XB(e){var t,r=UI(e),n=r[0],i=r[1],s=new YB(ZB(e,n,i)),o=0,a=i>0?n-4:n,l;for(l=0;l<a;l+=4)t=wr[e.charCodeAt(l)]<<18|wr[e.charCodeAt(l+1)]<<12|wr[e.charCodeAt(l+2)]<<6|wr[e.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=wr[e.charCodeAt(l)]<<2|wr[e.charCodeAt(l+1)]>>4,s[o++]=t&255),i===1&&(t=wr[e.charCodeAt(l)]<<10|wr[e.charCodeAt(l+1)]<<4|wr[e.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function JB(e){return pi[e>>18&63]+pi[e>>12&63]+pi[e>>6&63]+pi[e&63]}function QB(e,t,r){for(var n,i=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(JB(n));return i.join("")}function e2(e){for(var t,r=e.length,n=r%3,i=[],s=16383,o=0,a=r-n;o<a;o+=s)i.push(QB(e,o,o+s>a?a:o+s));return n===1?(t=e[r-1],i.push(pi[t>>2]+pi[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(pi[t>>10]+pi[t>>4&63]+pi[t<<2&63]+"=")),i.join("")}var i_={byteLength:GB,toByteArray:zB,fromByteArray:qB},t2=function(e,t,r,n,i){var s,o,a=i*8-n-1,l=(1<<a)-1,c=l>>1,h=-7,d=r?i-1:0,f=r?-1:1,g=e[t+d];for(d+=f,s=g&(1<<-h)-1,g>>=-h,h+=a;h>0;s=s*256+e[t+d],d+=f,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=o*256+e[t+d],d+=f,h-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(g?-1:1)*o*Math.pow(2,s-n)},n2=function(e,t,r,n,i,s){var o,a,l,c=s*8-i-1,h=(1<<c)-1,d=h>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,m=n?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,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=h?(a=0,o=h):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+g]=a&255,g+=m,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[r+g]=o&255,g+=m,o/=256,c-=8);e[r+g-m]|=b*128},Fa={read:t2,write:n2},$f=WB(function(e,t){var r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;var n=2147483647;t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=i(),!o.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(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(u){if(u>n)throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=new Uint8Array(u);return Object.setPrototypeOf(p,o.prototype),p}function o(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 h(u)}return a(u,p,v)}o.poolSize=8192;function a(u,p,v){if(typeof u=="string")return d(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(Je(u,ArrayBuffer)||u&&Je(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Je(u,SharedArrayBuffer)||u&&Je(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 o.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 o.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))}o.from=function(u,p,v){return a(u,p,v)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,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?s(u):p!==void 0?typeof v=="string"?s(u).fill(p,v):s(u).fill(p):s(u)}o.alloc=function(u,p,v){return c(u,p,v)};function h(u){return l(u),s(u<0?0:I(u)|0)}o.allocUnsafe=function(u){return h(u)},o.allocUnsafeSlow=function(u){return h(u)};function d(u,p){if((typeof p!="string"||p==="")&&(p="utf8"),!o.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var v=F(u,p)|0,T=s(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=s(p),T=0;T<p;T+=1)v[T]=u[T]&255;return v}function g(u){if(Je(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,o.prototype),T}function b(u){if(o.isBuffer(u)){var p=I(u.length)|0,v=s(p);return v.length===0||u.copy(v,0,0,p),v}if(u.length!==void 0)return typeof u.length!="number"||Ft(u.length)?s(0):f(u);if(u.type==="Buffer"&&Array.isArray(u.data))return f(u.data)}function I(u){if(u>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return u|0}function A(u){return+u!=u&&(u=0),o.alloc(+u)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,p){if(Je(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),Je(p,Uint8Array)&&(p=o.from(p,p.offset,p.byteLength)),!o.isBuffer(u)||!o.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,B=Math.min(v,T);L<B;++L)if(u[L]!==p[L]){v=u[L],T=p[L];break}return v<T?-1:T<v?1:0},o.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}},o.concat=function(u,p){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);var v;if(p===void 0)for(p=0,v=0;v<u.length;++v)p+=u[v].length;var T=o.allocUnsafe(p),L=0;for(v=0;v<u.length;++v){var B=u[v];if(Je(B,Uint8Array))L+B.length>T.length?o.from(B).copy(T,L):Uint8Array.prototype.set.call(T,B,L);else if(o.isBuffer(B))B.copy(T,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=B.length}return T};function F(u,p){if(o.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||Je(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 de(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return Mt(u).length;default:if(L)return T?-1:de(u).length;p=(""+p).toLowerCase(),L=!0}}o.byteLength=F;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 Zt(this,p,v);case"utf8":case"utf-8":return ct(this,p,v);case"ascii":return $t(this,p,v);case"latin1":case"binary":return Ke(this,p,v);case"base64":return Be(this,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,p,v);default:if(T)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),T=!0}}o.prototype._isBuffer=!0;function M(u,p,v){var T=u[p];u[p]=u[v],u[v]=T}o.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},o.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},o.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},o.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?ct(this,0,u):U.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.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+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(u,p,v,T,L){if(Je(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.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 B=L-T,K=v-p,et=Math.min(B,K),qe=this.slice(T,L),Fe=u.slice(p,v),ut=0;ut<et;++ut)if(qe[ut]!==Fe[ut]){B=qe[ut],K=Fe[ut];break}return B<K?-1:K<B?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,Ft(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=o.from(p,T)),o.isBuffer(p))return p.length===0?-1:Me(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):Me(u,[p],v,T,L);throw new TypeError("val must be string, number or Buffer")}function Me(u,p,v,T,L){var B=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;B=2,K/=2,et/=2,v/=2}function qe(me,tt){return B===1?me[tt]:me.readUInt16BE(tt*B)}var Fe;if(L){var ut=-1;for(Fe=v;Fe<K;Fe++)if(qe(u,Fe)===qe(p,ut===-1?0:Fe-ut)){if(ut===-1&&(ut=Fe),Fe-ut+1===et)return ut*B}else ut!==-1&&(Fe-=Fe-ut),ut=-1}else for(v+et>K&&(v=K-et),Fe=v;Fe>=0;Fe--){for(var J=!0,De=0;De<et;De++)if(qe(u,Fe+De)!==qe(p,De)){J=!1;break}if(J)return Fe}return-1}o.prototype.includes=function(u,p,v){return this.indexOf(u,p,v)!==-1},o.prototype.indexOf=function(u,p,v){return q(this,u,p,v,!0)},o.prototype.lastIndexOf=function(u,p,v){return q(this,u,p,v,!1)};function lt(u,p,v,T){v=Number(v)||0;var L=u.length-v;T?(T=Number(T),T>L&&(T=L)):T=L;var B=p.length;T>B/2&&(T=B/2);for(var K=0;K<T;++K){var et=parseInt(p.substr(K*2,2),16);if(Ft(et))return K;u[v+K]=et}return K}function j(u,p,v,T){return He(de(p,u.length-v),u,v,T)}function fe(u,p,v,T){return He(Ce(p),u,v,T)}function te(u,p,v,T){return He(Mt(p),u,v,T)}function pe(u,p,v,T){return He(je(p,u.length-v),u,v,T)}o.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 B=!1;;)switch(T){case"hex":return lt(this,u,p,v);case"utf8":case"utf-8":return j(this,u,p,v);case"ascii":case"latin1":case"binary":return fe(this,u,p,v);case"base64":return te(this,u,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,u,p,v);default:if(B)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),B=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Be(u,p,v){return p===0&&v===u.length?i_.fromByteArray(u):i_.fromByteArray(u.slice(p,v))}function ct(u,p,v){v=Math.min(u.length,v);for(var T=[],L=p;L<v;){var B=u[L],K=null,et=B>239?4:B>223?3:B>191?2:1;if(L+et<=v){var qe,Fe,ut,J;switch(et){case 1:B<128&&(K=B);break;case 2:qe=u[L+1],(qe&192)===128&&(J=(B&31)<<6|qe&63,J>127&&(K=J));break;case 3:qe=u[L+1],Fe=u[L+2],(qe&192)===128&&(Fe&192)===128&&(J=(B&15)<<12|(qe&63)<<6|Fe&63,J>2047&&(J<55296||J>57343)&&(K=J));break;case 4:qe=u[L+1],Fe=u[L+2],ut=u[L+3],(qe&192)===128&&(Fe&192)===128&&(ut&192)===128&&(J=(B&15)<<18|(qe&63)<<12|(Fe&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 at=4096;function y(u){var p=u.length;if(p<=at)return String.fromCharCode.apply(String,u);for(var v="",T=0;T<p;)v+=String.fromCharCode.apply(String,u.slice(T,T+=at));return v}function $t(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 Ke(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 Zt(u,p,v){var T=u.length;(!p||p<0)&&(p=0),(!v||v<0||v>T)&&(v=T);for(var L="",B=p;B<v;++B)L+=Oe[u[B]];return L}function Se(u,p,v){for(var T=u.slice(p,v),L="",B=0;B<T.length-1;B+=2)L+=String.fromCharCode(T[B]+T[B+1]*256);return L}o.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,o.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")}o.prototype.readUintLE=o.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,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return T},o.prototype.readUintBE=o.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},o.prototype.readUint8=o.prototype.readUInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.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},o.prototype.readUint32BE=o.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])},o.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,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return L*=128,T>=L&&(T-=Math.pow(2,8*p)),T},o.prototype.readIntBE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=p,L=1,B=this[u+--T];T>0&&(L*=256);)B+=this[u+--T]*L;return L*=128,B>=L&&(B-=Math.pow(2,8*p)),B},o.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]},o.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},o.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},o.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},o.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]},o.prototype.readFloatLE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Fa.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Fa.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Fa.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Fa.read(this,u,!1,52,8)};function x(u,p,v,T,L,B){if(!o.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>L||p<B)throw new RangeError('"value" argument is out of bounds');if(v+T>u.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.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 B=1,K=0;for(this[p]=u&255;++K<v&&(B*=256);)this[p+K]=u/B&255;return p+v},o.prototype.writeUintBE=o.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 B=v-1,K=1;for(this[p+B]=u&255;--B>=0&&(K*=256);)this[p+B]=u/K&255;return p+v},o.prototype.writeUint8=o.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},o.prototype.writeUint16LE=o.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},o.prototype.writeUint16BE=o.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},o.prototype.writeUint32LE=o.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},o.prototype.writeUint32BE=o.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},o.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 B=0,K=1,et=0;for(this[p]=u&255;++B<v&&(K*=256);)u<0&&et===0&&this[p+B-1]!==0&&(et=1),this[p+B]=(u/K>>0)-et&255;return p+v},o.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 B=v-1,K=1,et=0;for(this[p+B]=u&255;--B>=0&&(K*=256);)u<0&&et===0&&this[p+B+1]!==0&&(et=1),this[p+B]=(u/K>>0)-et&255;return p+v},o.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},o.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},o.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},o.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},o.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 Z(u,p,v,T,L,B){if(v+T>u.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function ne(u,p,v,T,L){return p=+p,v=v>>>0,L||Z(u,p,v,4),Fa.write(u,p,v,T,23,4),v+4}o.prototype.writeFloatLE=function(u,p,v){return ne(this,u,p,!0,v)},o.prototype.writeFloatBE=function(u,p,v){return ne(this,u,p,!1,v)};function ae(u,p,v,T,L){return p=+p,v=v>>>0,L||Z(u,p,v,8),Fa.write(u,p,v,T,52,8),v+8}o.prototype.writeDoubleLE=function(u,p,v){return ae(this,u,p,!0,v)},o.prototype.writeDoubleBE=function(u,p,v){return ae(this,u,p,!1,v)},o.prototype.copy=function(u,p,v,T){if(!o.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},o.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"&&!o.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 B;if(typeof u=="number")for(B=p;B<v;++B)this[B]=u;else{var K=o.isBuffer(u)?u:o.from(u,T),et=K.length;if(et===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(B=0;B<v-p;++B)this[B+p]=K[B%et]}return this};var Ee=/[^+/0-9A-Za-z-_]/g;function ye(u){if(u=u.split("=")[0],u=u.trim().replace(Ee,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function de(u,p){p=p||1/0;for(var v,T=u.length,L=null,B=[],K=0;K<T;++K){if(v=u.charCodeAt(K),v>55295&&v<57344){if(!L){if(v>56319){(p-=3)>-1&&B.push(239,191,189);continue}else if(K+1===T){(p-=3)>-1&&B.push(239,191,189);continue}L=v;continue}if(v<56320){(p-=3)>-1&&B.push(239,191,189),L=v;continue}v=(L-55296<<10|v-56320)+65536}else L&&(p-=3)>-1&&B.push(239,191,189);if(L=null,v<128){if((p-=1)<0)break;B.push(v)}else if(v<2048){if((p-=2)<0)break;B.push(v>>6|192,v&63|128)}else if(v<65536){if((p-=3)<0)break;B.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((p-=4)<0)break;B.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return B}function Ce(u){for(var p=[],v=0;v<u.length;++v)p.push(u.charCodeAt(v)&255);return p}function je(u,p){for(var v,T,L,B=[],K=0;K<u.length&&!((p-=2)<0);++K)v=u.charCodeAt(K),T=v>>8,L=v%256,B.push(L),B.push(T);return B}function Mt(u){return i_.toByteArray(ye(u))}function He(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 Je(u,p){return u instanceof p||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===p.name}function Ft(u){return u!==u}var Oe=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}()}),ot=$f.Buffer;$f.SlowBuffer;$f.INSPECT_MAX_BYTES;$f.kMaxLength;var l_=function(e,t){return l_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},l_(e,t)};function Wf(e,t){l_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var bs=function(e){Wf(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),jt=function(e){Wf(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}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 HI(){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 r2(){var e=HI();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var i2=function(e){var t=r2()?"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 r=ot.alloc(e),n=0;n<e;++n)r[n]=Math.floor(Math.random()*256);return r},o2=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(ot.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(ot.alloc(t))}:i2}},jI=o2();function s2(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function d_(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function a2(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function c2(e){return Dl(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Dl(e){return typeof e=="object"&&e!==null}function Gf(e,t){var r=!1;function n(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r||(console.warn(t),r=!0),e.apply(this,i)}return n}function jf(e){if(ArrayBuffer.isView(e))return ot.from(e.buffer,e.byteOffset,e.byteLength);if(s2(e))return ot.from(e);throw new jt("Must use either Buffer or TypedArray")}var l2=/^(?:[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,$I=function(e){return typeof e=="string"&&l2.test(e)},u_=function(e){if(!$I(e))throw new jt('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 ot.from(t,"hex")},DI=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")},mK=Math.pow(2,63)-1,gK=-Math.pow(2,63),u2=Math.pow(2,53),d2=-Math.pow(2,53),WI=4,Cs=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new jt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=r??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=ot.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=ot.from(t,"binary"):Array.isArray(t)?this.buffer=ot.from(t):this.buffer=jf(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new jt("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new jt("only accepts single character Uint8Array or Array");var r;if(typeof t=="string"?r=t.charCodeAt(0):typeof t=="number"?r=t:r=t[0],r<0||r>255)throw new jt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=ot.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(t,r){if(r=typeof r=="number"?r:this.position,this.buffer.length<r+t.length){var n=ot.alloc(this.buffer.length+t.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(t)?(this.buffer.set(jf(t),r),this.position=r+t.byteLength>this.position?r+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,r,t.length,"binary"),this.position=r+t.length>this.position?r+t.length:this.position)},e.prototype.read=function(t,r){return r=r&&r>0?r:this.position,this.buffer.slice(t,t+r)},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 r=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return t.legacy?{$binary:r,$type:n.length===1?"0"+n:n}:{$binary:{base64:r,subType:n.length===1?"0"+n:n}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new II(this.buffer.slice(0,this.position));throw new bs('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,r){r=r||{};var n,i;if("$binary"in t?r.legacy&&typeof t.$binary=="string"&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=ot.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=ot.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=u_(t.$uuid)),!n)throw new jt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===WI?new II(n):new e(n,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(Cs.prototype,"_bsontype",{value:"Binary"});var o_=16,II=function(e){Wf(t,e);function t(r){var n=this,i,s;if(r==null)i=t.generate();else if(r instanceof t)i=ot.from(r.buffer),s=r.__id;else if(ArrayBuffer.isView(r)&&r.byteLength===o_)i=jf(r);else if(typeof r=="string")i=u_(r);else throw new jt("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 n=e.call(this,i,WI)||this,n.__id=s,n}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(r){this.buffer=r,t.cacheHexString&&(this.__id=DI(r))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(r){if(r===void 0&&(r=!0),t.cacheHexString&&this.__id)return this.__id;var n=DI(this.id,r);return t.cacheHexString&&(this.__id=n),n},t.prototype.toString=function(r){return r?this.id.toString(r):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(r){if(!r)return!1;if(r instanceof t)return r.id.equals(this.id);try{return new t(r).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new Cs(this.id,Cs.SUBTYPE_UUID)},t.generate=function(){var r=jI(o_);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,ot.from(r)},t.isValid=function(r){return r?r instanceof t?!0:typeof r=="string"?$I(r):d_(r)?r.length!==o_?!1:(r[6]&240)===64&&(r[8]&128)===128:!1:!1},t.createFromHexString=function(r){var n=u_(r);return new t(n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Cs),zf=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}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(zf.prototype,"_bsontype",{value:"Code"});function f2(e){return Dl(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Cl=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var s=t.split(".");s.length===2&&(n=s.shift(),t=s.shift()),this.collection=t,this.oid=r,this.db=n,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 r={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(r.$db=this.db),r=Object.assign(r,this.fields)),r},e.fromExtendedJSON=function(t){var r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},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(Cl.prototype,"_bsontype",{value:"DBRef"});var Er=void 0;try{Er=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 TI=65536,p2=1<<24,Va=TI*TI,GI=Va*Va,xI=GI/2,RI={},NI={},le=function(){function e(t,r,n){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,r,n);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!r)):typeof t=="string"?Object.assign(this,e.fromString(t,!!r)):(this.low=t|0,this.high=r|0,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,s;return r?(t>>>=0,(s=0<=t&&t<256)&&(i=NI[t],i)?i:(n=e.fromBits(t,(t|0)<0?-1:0,!0),s&&(NI[t]=n),n)):(t|=0,(s=-128<=t&&t<128)&&(i=RI[t],i)?i:(n=e.fromBits(t,t<0?-1:0,!1),s&&(RI[t]=n),n))},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=GI)return e.MAX_UNSIGNED_VALUE}else{if(t<=-xI)return e.MIN_VALUE;if(t+1>=xI)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%Va|0,t/Va|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof r=="number"?(n=r,r=!1):r=!!r,n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return e.fromString(t.substring(1),r,n).neg();for(var s=e.fromNumber(Math.pow(n,8)),o=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+l),n);if(l<8){var h=e.fromNumber(Math.pow(n,l));o=o.mul(h).add(e.fromNumber(c))}else o=o.mul(s),o=o.add(e.fromNumber(c))}return o.unsigned=r,o},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){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,r)},e.fromBytesBE=function(t,r){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],r)},e.isLong=function(t){return Dl(t)&&t.__isLong__===!0},e.fromValue=function(t,r){return typeof t=="number"?e.fromNumber(t,r):typeof t=="string"?e.fromString(t,r):e.fromBits(t.low,t.high,typeof r=="boolean"?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,s=this.low&65535,o=t.high>>>16,a=t.high&65535,l=t.low>>>16,c=t.low&65535,h=0,d=0,f=0,g=0;return g+=s+c,f+=g>>>16,g&=65535,f+=i+l,d+=f>>>16,f&=65535,d+=n+a,h+=d>>>16,d&=65535,h+=r+o,h&=65535,e.fromBits(f<<16|g,h<<16|d,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 r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?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(Er){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Er.div_u:Er.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Er.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;s=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 o=this.shr(1);return n=o.div(t).shl(1),n.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),s=n.add(i.div(t)),s)}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();s=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),c=e.fromNumber(n),h=c.mul(t);h.isNegative()||h.gt(i);)n-=l,c=e.fromNumber(n,this.unsigned),h=c.mul(t);c.isZero()&&(c=e.ONE),s=s.add(c),i=i.sub(h)}return s},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,r;for(r=31;r>0&&(t&1<<r)===0;r--);return this.high!==0?r+33:r+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)),Er){var r=(this.unsigned?Er.rem_u:Er.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Er.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)),Er){var r=Er.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,Er.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 n=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,a=t.high>>>16,l=t.high&65535,c=t.low>>>16,h=t.low&65535,d=0,f=0,g=0,m=0;return m+=o*h,g+=m>>>16,m&=65535,g+=s*h,f+=g>>>16,g&=65535,g+=o*c,f+=g>>>16,g&=65535,f+=i*h,d+=f>>>16,f&=65535,f+=s*c,d+=f>>>16,f&=65535,f+=o*l,d+=f>>>16,f&=65535,d+=n*h+i*c+s*l+o*a,d&=65535,e.fromBits(g<<16|m,d<<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 r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}else return t===32?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>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)*Va+(this.low>>>0):this.high*Va+(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,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&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 r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var s=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,a="";;){var l=o.div(s),c=o.sub(l.mul(s)).toInt()>>>0,h=c.toString(t);if(o=l,o.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+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,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},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(p2),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(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var h2=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,m2=/^(\+|-)?(Infinity|inf)$/i,g2=/^(\+|-)?NaN$/i,bl=6111,s_=-6176,AI=6176,v2=34,a_=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),MI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),OI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),y2=/^([-+])?(\d+)?$/,_2=31,PI=16383,E2=30,w2=31;function kI(e){return!isNaN(parseInt(e,10))}function b2(e){var t=le.fromNumber(1e9),r=le.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=r.shiftLeft(32),r=r.add(new le(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function C2(e,t){if(!e&&!t)return{high:le.fromNumber(0),low:le.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new le(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new le(t.getLowBits(),0),o=r.multiply(i),a=r.multiply(s),l=n.multiply(i),c=n.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new le(a.getLowBits(),0).add(l).add(c.shiftRightUnsigned(32)),o=o.add(a.shiftRightUnsigned(32)),c=a.shiftLeft(32).add(new le(c.getLowBits(),0)),{high:o,low:c}}function S2(e,t){var r=e.high>>>0,n=t.high>>>0;if(r<n)return!0;if(r===n){var i=e.low>>>0,s=t.low>>>0;if(i<s)return!0}return!1}function Ba(e,t){throw new jt('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var f_=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(d_(t)){if(t.byteLength!==16)throw new jt("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new jt("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var r=!1,n=!1,i=!1,s=0,o=0,a=0,l=0,c=0,h=[0],d=0,f=0,g=0,m=0,b=0,I=0,A=new le(0,0),F=new le(0,0),U=0,M=0;if(t.length>=7e3)throw new jt(""+t+" not a valid Decimal128 string");var q=t.match(h2),Me=t.match(m2),lt=t.match(g2);if(!q&&!Me&&!lt||t.length===0)throw new jt(""+t+" not a valid Decimal128 string");if(q){var j=q[2],fe=q[4],te=q[5],pe=q[6];fe&&pe===void 0&&Ba(t,"missing exponent power"),fe&&j===void 0&&Ba(t,"missing exponent base"),fe===void 0&&(te||pe)&&Ba(t,"missing e before exponent")}if((t[M]==="+"||t[M]==="-")&&(r=t[M++]==="-"),!kI(t[M])&&t[M]!=="."){if(t[M]==="i"||t[M]==="I")return new e(ot.from(r?MI:OI));if(t[M]==="N")return new e(ot.from(a_))}for(;kI(t[M])||t[M]===".";){if(t[M]==="."){n&&Ba(t,"contains multiple periods"),n=!0,M=M+1;continue}d<34&&(t[M]!=="0"||i)&&(i||(c=o),i=!0,h[f++]=parseInt(t[M],10),d=d+1),i&&(a=a+1),n&&(l=l+1),o=o+1,M=M+1}if(n&&!o)throw new jt(""+t+" not a valid Decimal128 string");if(t[M]==="e"||t[M]==="E"){var Be=t.substr(++M).match(y2);if(!Be||!Be[2])return new e(ot.from(a_));b=parseInt(Be[0],10),M=M+Be[0].length}if(t[M])return new e(ot.from(a_));if(g=0,!d)g=0,m=0,h[0]=0,a=1,d=1,s=0;else if(m=d-1,s=a,s!==1)for(;h[c+s-1]===0;)s=s-1;for(b<=l&&l-b>16384?b=s_:b=b-l;b>bl;){if(m=m+1,m-g>v2){var ct=h.join("");if(ct.match(/^0+$/)){b=bl;break}Ba(t,"overflow")}b=b-1}for(;b<s_||d<a;){if(m===0&&s<d){b=s_,s=0;break}if(d<a?a=a-1:m=m-1,b<bl)b=b+1;else{var ct=h.join("");if(ct.match(/^0+$/)){b=bl;break}Ba(t,"overflow")}}if(m-g+1<s){var at=o;n&&(c=c+1,at=at+1),r&&(c=c+1,at=at+1);var y=parseInt(t[c+m+1],10),$t=0;if(y>=5&&($t=1,y===5)){for($t=h[m]%2===1?1:0,I=c+m+2;I<at;I++)if(parseInt(t[I],10)){$t=1;break}}if($t){for(var Ke=m;Ke>=0;Ke--)if(++h[Ke]>9&&(h[Ke]=0,Ke===0))if(b<bl)b=b+1,h[Ke]=1;else return new e(ot.from(r?MI:OI))}}if(A=le.fromNumber(0),F=le.fromNumber(0),s===0)A=le.fromNumber(0),F=le.fromNumber(0);else if(m-g<17){var Ke=g;for(F=le.fromNumber(h[Ke++]),A=new le(0,0);Ke<=m;Ke++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Ke]))}else{var Ke=g;for(A=le.fromNumber(h[Ke++]);Ke<=m-17;Ke++)A=A.multiply(le.fromNumber(10)),A=A.add(le.fromNumber(h[Ke]));for(F=le.fromNumber(h[Ke++]);Ke<=m;Ke++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Ke]))}var Zt=C2(A,le.fromString("100000000000000000"));Zt.low=Zt.low.add(F),S2(Zt.low,F)&&(Zt.high=Zt.high.add(le.fromNumber(1))),U=b+AI;var Se={low:le.fromNumber(0),high:le.fromNumber(0)};Zt.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(Se.high=Se.high.or(le.fromNumber(3).shiftLeft(61)),Se.high=Se.high.or(le.fromNumber(U).and(le.fromNumber(16383).shiftLeft(47))),Se.high=Se.high.or(Zt.high.and(le.fromNumber(0x7fffffffffff)))):(Se.high=Se.high.or(le.fromNumber(U&16383).shiftLeft(49)),Se.high=Se.high.or(Zt.high.and(le.fromNumber(562949953421311)))),Se.low=Zt.low,r&&(Se.high=Se.high.or(le.fromString("9223372036854775808")));var D=ot.alloc(16);return M=0,D[M++]=Se.low.low&255,D[M++]=Se.low.low>>8&255,D[M++]=Se.low.low>>16&255,D[M++]=Se.low.low>>24&255,D[M++]=Se.low.high&255,D[M++]=Se.low.high>>8&255,D[M++]=Se.low.high>>16&255,D[M++]=Se.low.high>>24&255,D[M++]=Se.high.low&255,D[M++]=Se.high.low>>8&255,D[M++]=Se.high.low>>16&255,D[M++]=Se.high.low>>24&255,D[M++]=Se.high.high&255,D[M++]=Se.high.high>>8&255,D[M++]=Se.high.high>>16&255,D[M++]=Se.high.high>>24&255,new e(D)},e.prototype.toString=function(){for(var t,r=0,n=new Array(36),i=0;i<n.length;i++)n[i]=0;var s=0,o=!1,a,l={parts:[0,0,0,0]},c,h,d=[];s=0;var f=this.bytes,g=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,m=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,b=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,I=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24;s=0;var A={low:new le(g,m),high:new le(b,I)};A.high.lessThan(le.ZERO)&&d.push("-");var F=I>>26&_2;if(F>>3===3){if(F===E2)return d.join("")+"Infinity";if(F===w2)return"NaN";t=I>>15&PI,a=8+(I>>14&1)}else a=I>>14&7,t=I>>17&PI;var U=t-AI;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)o=!0;else for(h=3;h>=0;h--){var M=0,q=b2(l);if(l=q.quotient,M=q.rem.low,!!M)for(c=8;c>=0;c--)n[h*9+c]=M%10,M=Math.floor(M/10)}if(o)r=1,n[s]=0;else for(r=36;!n[s];)r=r-1,s=s+1;var Me=r-1+U;if(Me>=34||Me<=-7||U>0){if(r>34)return d.push("".concat(0)),U>0?d.push("E+".concat(U)):U<0&&d.push("E".concat(U)),d.join("");d.push("".concat(n[s++])),r=r-1,r&&d.push(".");for(var i=0;i<r;i++)d.push("".concat(n[s++]));d.push("E"),Me>0?d.push("+".concat(Me)):d.push("".concat(Me))}else if(U>=0)for(var i=0;i<r;i++)d.push("".concat(n[s++]));else{var lt=r+U;if(lt>0)for(var i=0;i<lt;i++)d.push("".concat(n[s++]));else d.push("0");for(d.push(".");lt++<0;)d.push("0");for(var i=0;i<r-Math.max(lt-1,0);i++)d.push("".concat(n[s++]))}return d.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(f_.prototype,"_bsontype",{value:"Decimal128"});var qf=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,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},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(qf.prototype,"_bsontype",{value:"Double"});var Yf=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,r){return r&&r.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(Yf.prototype,"_bsontype",{value:"Int32"});var p_=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(p_.prototype,"_bsontype",{value:"MaxKey"});var h_=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(h_.prototype,"_bsontype",{value:"MinKey"});var D2=new RegExp("^[0-9a-fA-F]{24}$"),ws=null,fi=Symbol("id"),cn=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new jt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?r=ot.from(t.toHexString(),"hex"):r=t.id}else r=t;if(r==null||typeof r=="number")this[fi]=e.generate(typeof r=="number"?r:void 0);else if(ArrayBuffer.isView(r)&&r.byteLength===12)this[fi]=r instanceof ot?r:jf(r);else if(typeof r=="string")if(r.length===12){var n=ot.from(r);if(n.byteLength===12)this[fi]=n;else throw new jt("Argument passed in must be a string of 12 bytes")}else if(r.length===24&&D2.test(r))this[fi]=ot.from(r,"hex");else throw new jt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new jt("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[fi]},set:function(t){this[fi]=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 r=e.getInc(),n=ot.alloc(12);return n.writeUInt32BE(t,0),ws===null&&(ws=jI(5)),n[4]=ws[0],n[5]=ws[1],n[6]=ws[2],n[7]=ws[3],n[8]=ws[4],n[11]=r&255,n[10]=r>>8&255,n[9]=r>>16&255,n},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[fi][11]===t[fi][11]&&this[fi].equals(t[fi]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&d_(this.id))return t===ot.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 ot.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var r=t.toHexString(),n=this.toHexString().toLowerCase();return typeof r=="string"&&r.toLowerCase()===n}return!1},e.prototype.getTimestamp=function(){var t=new Date,r=this.id.readUInt32BE(0);return t.setTime(Math.floor(r)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var r=ot.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new jt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(ot.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(cn.prototype,"generate",{value:Gf(function(e){return cn.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(cn.prototype,"getInc",{value:Gf(function(){return cn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(cn.prototype,"get_inc",{value:Gf(function(){return cn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(cn,"get_inc",{value:Gf(function(){return cn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(cn.prototype,"_bsontype",{value:"ObjectID"});function I2(e){return e.split("").sort().join("")}var Sl=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=I2(r??""),this.pattern.indexOf("\0")!==-1)throw new bs("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new bs("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if(!(this.options[n]==="i"||this.options[n]==="m"||this.options[n]==="x"||this.options[n]==="l"||this.options[n]==="s"||this.options[n]==="u"))throw new bs("The regular expression option [".concat(this.options[n],"] 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 jt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(Sl.prototype,"_bsontype",{value:"BSONRegExp"});var m_=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(m_.prototype,"_bsontype",{value:"Symbol"});var T2=le,zI=function(e){Wf(t,e);function t(r,n){var i=this;return i instanceof t?(le.isLong(r)?i=e.call(this,r.low,r.high,!0)||this:Dl(r)&&typeof r.t<"u"&&typeof r.i<"u"?i=e.call(this,r.i,r.t,!0)||this:i=e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(r){return new t(le.fromInt(r,!0))},t.fromNumber=function(r){return new t(le.fromNumber(r,!0))},t.fromBits=function(r,n){return new t(r,n)},t.fromString=function(r,n){return new t(le.fromString(r,!0,n))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(r){return new t(r.$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=le.MAX_UNSIGNED_VALUE,t}(T2);function x2(e){return Dl(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var qI=2147483647,YI=-2147483648,KI=9223372036854776e3,ZI=-9223372036854776e3,R2={$oid:cn,$binary:Cs,$uuid:Cs,$symbol:m_,$numberInt:Yf,$numberDecimal:f_,$numberDouble:qf,$numberLong:le,$minKey:h_,$maxKey:p_,$regex:Sl,$regularExpression:Sl,$timestamp:zI};function XI(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=YI&&e<=qI)return new Yf(e);if(e>=ZI&&e<=KI)return le.fromNumber(e)}return new qf(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter(function(d){return d.startsWith("$")&&e[d]!=null}),n=0;n<r.length;n++){var i=R2[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var s=e.$date,o=new Date;return t.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):le.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&t.relaxed&&o.setTime(s),o}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=XI(e.$scope)),zf.fromExtendedJSON(e)}if(f2(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof Cl)return l;var c=Object.keys(l).filter(function(d){return d.startsWith("$")}),h=!0;if(c.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(h=!1)}),h)return Cl.fromExtendedJSON(l)}return e}function N2(e,t){return e.map(function(r,n){t.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return vo(r,t)}finally{t.seenObjects.pop()}})}function LI(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function vo(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var r=t.seenObjects.findIndex(function(A){return A.obj===e});if(r!==-1){var n=t.seenObjects.map(function(A){return A.propertyName}),i=n.slice(0,r).map(function(A){return"".concat(A," -> ")}).join(""),s=n[r],o=" -> "+n.slice(r+1,n.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=n[n.length-1],l=" ".repeat(i.length+s.length/2),c="-".repeat(o.length+(s.length+a.length)/2-1);throw new jt(`Converting circular structure to EJSON:
42
42
  `+" ".concat(i).concat(s).concat(o).concat(a,`
43
- `)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return A2(e,t);if(e===void 0)return null;if(e instanceof Date||l2(e)){var h=e.getTime(),d=h>-1&&h<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:FI(e)}:t.relaxed&&d?{$date:FI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=KI&&e<=YI,g=e>=XI&&e<=ZI;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||c2(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var I=new Sl(e.source,m);return I.toExtendedJSON(t)}return e!=null&&typeof e=="object"?O2(e,t):e}var M2={Binary:function(e){return new Cs(e.value(),e.sub_type)},Code:function(e){return new zf(e.code,e.scope)},DBRef:function(e){return new Cl(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new p_(e.bytes)},Double:function(e){return new qf(e.value)},Int32:function(e){return new Yf(e.value)},Long:function(e){return le.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 h_},MinKey:function(){return new m_},ObjectID:function(e){return new an(e)},ObjectId:function(e){return new an(e)},BSONRegExp:function(e){return new Sl(e.pattern,e.options)},Symbol:function(e){return new g_(e.value)},Timestamp:function(e){return qI.fromBits(e.low,e.high)}};function O2(e,t){if(e==null||typeof e!="object")throw new bs("not an object instance");var r=e._bsontype;if(typeof r>"u"){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=vo(e[i],t);i==="__proto__"?Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):n[i]=s}finally{t.seenObjects.pop()}}return n}else if(R2(e)){var o=e;if(typeof o.toExtendedJSON!="function"){var a=M2[e._bsontype];if(!a)throw new Ht("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return r==="Code"&&o.scope?o=new zf(o.code,vo(o.scope,t)):r==="DBRef"&&o.oid&&(o=new Cl(vo(o.collection,t),vo(o.oid,t),vo(o.db,t),vo(o.fields,t))),o.toExtendedJSON(t)}else throw new bs("_bsontype must be a string, but was: "+typeof r)}var BI;(function(e){function t(s,o){var a=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(s,function(l,c){if(l.indexOf("\0")!==-1)throw new bs("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return JI(c,a)})}e.parse=t;function r(s,o,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(l=o,o=void 0,a=0);var c=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),h=vo(s,c);return JSON.stringify(h,o,a)}e.stringify=r;function n(s,o){return o=o||{},JSON.parse(r(s,o))}e.serialize=n;function i(s,o){return o=o||{},t(JSON.stringify(s),o)}e.deserialize=i})(BI||(BI={}));var VI,UI=jI();UI.Map?VI=UI.Map:VI=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var r=0;r<t.length;r++)if(t[r]!=null){var n=t[r],i=n[0],s=n[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var r=this._values[t];return r==null?!1:(delete this._values[t],this._keys.splice(r.i,1),!0)},e.prototype.entries=function(){var t=this,r=0;return{next:function(){var n=t._keys[r++];return{value:n!==void 0?[n,t._values[n].v]:void 0,done:n===void 0}}}},e.prototype.forEach=function(t,r){r=r||this;for(var n=0;n<this._keys.length;n++){var i=this._keys[n];t.call(r,this._values[i].v,i,r)}},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,r=0;return{next:function(){var n=t._keys[r++];return{value:n!==void 0?n:void 0,done:n===void 0}}}},e.prototype.set=function(t,r){return this._values[t]?(this._values[t].v=r,this):(this._keys.push(t),this._values[t]={v:r,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,r=0;return{next:function(){var n=t._keys[r++];return{value:n!==void 0?t._values[n].v:void 0,done:n===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var yK=le.fromNumber(d2),_K=le.fromNumber(f2),l_=new Uint8Array(8),EK=new DataView(l_.buffer,l_.byteOffset,l_.byteLength),P2=1024*1024*17,wK=ot.alloc(P2),yo=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}},Le=class{constructor(e,t={},r,n){this.name=e,this.properties=t,this.id=n?new an(n):new an,this.occurred=new Date,r&&(this.trigger=new yo(r)),this.newEvent=!n}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Il=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}},Ua=class extends Il{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,r,n,i){super(),this.component=e,this.viewContainerRef=t,this.injector=r,this.projectableNodes=i}},Ha=class extends Il{templateRef;viewContainerRef;context;injector;constructor(e,t,r,n){super(),this.templateRef=e,this.viewContainerRef=t,this.context=r,this.injector=n}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()}},v_=class extends Il{element;constructor(e){super(),this.element=e instanceof Mt?e.nativeElement:e}},ja=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Ua)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Ha)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof v_)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)}},Kf=class extends ja{outletElement;_appRef;_defaultInjector;_document;constructor(e,t,r,n,i){super(),this.outletElement=e,this._appRef=r,this._defaultInjector=n,this._document=i}attachComponentPortal(e){let t;if(e.viewContainerRef){let r=e.injector||e.viewContainerRef.injector,n=r.get(Ai,null,{optional:!0})||void 0;t=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:r,ngModuleRef:n,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let r=this._appRef,n=e.injector||this._defaultInjector||vt.NULL,i=n.get(Gn,r.injector);t=Hd(e.component,{elementInjector:n,environmentInjector:i,projectableNodes:e.projectableNodes||void 0}),r.attachView(t.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=e,t}attachTemplatePortal(e){let t=e.viewContainerRef,r=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return r.rootNodes.forEach(n=>this.outletElement.appendChild(n)),r.detectChanges(),this.setDisposeFn(()=>{let n=t.indexOf(r);n!==-1&&t.remove(n)}),this._attachedPortal=e,r}attachDomPortal=e=>{let t=e.element;t.parentNode;let r=this._document.createComment("dom-portal");t.parentNode.insertBefore(r,t),this.outletElement.appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(t,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},y_=(()=>{class e extends ja{_moduleRef=O(Ai,{optional:!0});_document=O(Qe);_viewContainerRef=O(kr);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(r){this.hasAttached()&&!r&&!this._isInitialized||(this.hasAttached()&&super.detach(),r&&super.attach(r),this._attachedPortal=r||null)}attached=new We;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(r){r.setAttachedHost(this);let n=r.viewContainerRef!=null?r.viewContainerRef:this._viewContainerRef,i=n.createComponent(r.component,{index:n.length,injector:r.injector||n.injector,projectableNodes:r.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return n!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=r,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(r){r.setAttachedHost(this);let n=this._viewContainerRef.createEmbeddedView(r.templateRef,r.context,{injector:r.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=r,this._attachedRef=n,this.attached.emit(n),n}attachDomPortal=r=>{let n=r.element;n.parentNode;let i=this._document.createComment("dom-portal");r.setAttachedHost(this),n.parentNode.insertBefore(i,n),this._getRootNode().appendChild(n),this._attachedPortal=r,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(n,i)})};_getRootNode(){let r=this._viewContainerRef.element.nativeElement;return r.nodeType===r.ELEMENT_NODE?r:r.parentNode}static \u0275fac=function(r){return new(r||e)};static \u0275dir=Lr({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[fo]})}return e})();function Zf(e){return e.buttons===0||e.detail===0}function Xf(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 __;function k2(){if(__==null){let e=typeof document<"u"?document.head:null;__=!!(e&&(e.createShadowRoot||e.attachShadow))}return __}function $a(e){if(k2()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Jf(){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 Kn(e){return e.composedPath?e.composedPath()[0]:e.target}function Cn(e,t,r,n,i){let s=parseInt(Ev.major),o=parseInt(Ev.minor);return s>19||s===19&&o>0||s===0&&o===0?e.listen(t,r,n,i):(t.addEventListener(r,n,i),()=>{t.removeEventListener(r,n,i)})}var E_;try{E_=typeof Intl<"u"&&Intl.v8BreakIterator}catch{E_=!1}var Zn=(()=>{class e{_platformId=O(Qo);isBrowser=this._platformId?cD(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||E_)&&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||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Tl;function L2(){if(Tl==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Tl=!0}))}finally{Tl=Tl||!1}return Tl}function QI(e){return L2()?e:!!e.capture}function w_(e,t=0){return F2(e)?Number(e):arguments.length===2?t:0}function F2(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Xn(e){return e instanceof Mt?e.nativeElement:e}var B2=new he("cdk-input-modality-detector-options"),V2={ignoreKeys:[18,17,224,91,16]},eT=650,b_={passive:!0,capture:!0},U2=(()=>{class e{_platform=O(Zn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Tr(null);_options;_lastTouchMs=0;_onKeydown=r=>{this._options?.ignoreKeys?.some(n=>n===r.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Kn(r))};_onMousedown=r=>{Date.now()-this._lastTouchMs<eT||(this._modality.next(Zf(r)?"keyboard":"mouse"),this._mostRecentTarget=Kn(r))};_onTouchstart=r=>{if(Xf(r)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Kn(r)};constructor(){let r=O(Ve),n=O(Qe),i=O(B2,{optional:!0});if(this._options=w(w({},V2),i),this.modalityDetected=this._modality.pipe(am(1)),this.modalityChanged=this.modalityDetected.pipe(Fu()),this._platform.isBrowser){let s=O(un).createRenderer(null,null);this._listenerCleanups=r.runOutsideAngular(()=>[Cn(s,n,"keydown",this._onKeydown,b_),Cn(s,n,"mousedown",this._onMousedown,b_),Cn(s,n,"touchstart",this._onTouchstart,b_)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(r=>r())}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ep=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(ep||{}),H2=new he("cdk-focus-monitor-default-options"),Qf=QI({passive:!0,capture:!0}),tT=(()=>{class e{_ngZone=O(Ve);_platform=O(Zn);_inputModalityDetector=O(U2);_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=O(Qe,{optional:!0});_stopInputModalityDetector=new ie;constructor(){let r=O(H2,{optional:!0});this._detectionMode=r?.detectionMode||ep.IMMEDIATE}_rootNodeFocusAndBlurListener=r=>{let n=Kn(r);for(let i=n;i;i=i.parentElement)r.type==="focus"?this._onFocus(r,i):this._onBlur(r,i)};monitor(r,n=!1){let i=Xn(r);if(!this._platform.isBrowser||i.nodeType!==1)return Fo();let s=$a(i)||this._getDocument(),o=this._elementInfo.get(i);if(o)return n&&(o.checkChildren=!0),o.subject;let a={checkChildren:n,subject:new ie,rootNode:s};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(r){let n=Xn(r),i=this._elementInfo.get(n);i&&(i.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(i))}focusVia(r,n,i){let s=Xn(r),o=this._getDocument().activeElement;s===o?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,n,l)):(this._setOrigin(n),typeof s.focus=="function"&&s.focus(i))}ngOnDestroy(){this._elementInfo.forEach((r,n)=>this.stopMonitoring(n))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(r){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(r)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:r&&this._isLastInteractionFromInputLabel(r)?"mouse":"program"}_shouldBeAttributedToTouch(r){return this._detectionMode===ep.EVENTUAL||!!r?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(r,n){r.classList.toggle("cdk-focused",!!n),r.classList.toggle("cdk-touch-focused",n==="touch"),r.classList.toggle("cdk-keyboard-focused",n==="keyboard"),r.classList.toggle("cdk-mouse-focused",n==="mouse"),r.classList.toggle("cdk-program-focused",n==="program")}_setOrigin(r,n=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=r,this._originFromTouchInteraction=r==="touch"&&n,this._detectionMode===ep.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?eT:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(r,n){let i=this._elementInfo.get(n),s=Kn(r);!i||!i.checkChildren&&n!==s||this._originChanged(n,this._getFocusOrigin(s),i)}_onBlur(r,n){let i=this._elementInfo.get(n);!i||i.checkChildren&&r.relatedTarget instanceof Node&&n.contains(r.relatedTarget)||(this._setClasses(n),this._emitOrigin(i,null))}_emitOrigin(r,n){r.subject.observers.length&&this._ngZone.run(()=>r.subject.next(n))}_registerGlobalListeners(r){if(!this._platform.isBrowser)return;let n=r.rootNode,i=this._rootNodeFocusListenerCount.get(n)||0;i||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,Qf),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,Qf)}),this._rootNodeFocusListenerCount.set(n,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Wr(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(r){let n=r.rootNode;if(this._rootNodeFocusListenerCount.has(n)){let i=this._rootNodeFocusListenerCount.get(n);i>1?this._rootNodeFocusListenerCount.set(n,i-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Qf),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Qf),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(r,n,i){this._setClasses(r,n),this._emitOrigin(i,n),this._lastFocusOrigin=n}_getClosestElementsInfo(r){let n=[];return this._elementInfo.forEach((i,s)=>{(s===r||i.checkChildren&&s.contains(r))&&n.push([s,i])}),n}_isLastInteractionFromInputLabel(r){let{_mostRecentTarget:n,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!n||n===r||r.nodeName!=="INPUT"&&r.nodeName!=="TEXTAREA"||r.disabled)return!1;let s=r.labels;if(s){for(let o=0;o<s.length;o++)if(s[o].contains(n))return!0}return!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),tp=new WeakMap,Ss=(()=>{class e{_appRef;_injector=O(vt);_environmentInjector=O(Gn);load(r){let n=this._appRef=this._appRef||this._injector.get(pr),i=tp.get(n);i||(i={loaders:new Set,refs:[]},tp.set(n,i),n.onDestroy(()=>{tp.get(n)?.refs.forEach(s=>s.destroy()),tp.delete(n)})),i.loaders.has(r)||(i.loaders.add(r),i.refs.push(Hd(r,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),nT=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ft({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,n){},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 C_(e){return Array.isArray(e)?e:[e]}var D_=(()=>{class e{_platform=O(Zn);constructor(){}isDisabled(r){return r.hasAttribute("disabled")}isVisible(r){return $2(r)&&getComputedStyle(r).visibility==="visible"}isTabbable(r){if(!this._platform.isBrowser)return!1;let n=j2(X2(r));if(n&&(rT(n)===-1||!this.isVisible(n)))return!1;let i=r.nodeName.toLowerCase(),s=rT(r);return r.hasAttribute("contenteditable")?s!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!K2(r)?!1:i==="audio"?r.hasAttribute("controls")?s!==-1:!1:i==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||r.hasAttribute("controls"):r.tabIndex>=0}isFocusable(r,n){return Z2(r)&&!this.isDisabled(r)&&(n?.ignoreVisibility||this.isVisible(r))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function j2(e){try{return e.frameElement}catch{return null}}function $2(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function W2(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function G2(e){return q2(e)&&e.type=="hidden"}function z2(e){return Y2(e)&&e.hasAttribute("href")}function q2(e){return e.nodeName.toLowerCase()=="input"}function Y2(e){return e.nodeName.toLowerCase()=="a"}function iT(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function rT(e){if(!iT(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function K2(e){let t=e.nodeName.toLowerCase(),r=t==="input"&&e.type;return r==="text"||r==="password"||t==="select"||t==="textarea"}function Z2(e){return G2(e)?!1:W2(e)||z2(e)||e.hasAttribute("contenteditable")||iT(e)}function X2(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var S_=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,r,n,i=!1,s){this._element=e,this._checker=t,this._ngZone=r,this._document=n,this._injector=s,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 r=this._getFirstTabbableElement(t);return r?.focus(e),!!r}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 r=0;r<t.length;r++){let n=t[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[r]):null;if(n)return n}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let r=t.length-1;r>=0;r--){let n=t[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[r]):null;if(n)return n}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?Xr(e,{injector:this._injector}):setTimeout(e)}},oT=(()=>{class e{_checker=O(D_);_ngZone=O(Ve);_document=O(Qe);_injector=O(vt);constructor(){O(Ss).load(nT)}create(r,n=!1){return new S_(r,this._checker,this._ngZone,this._document,n,this._injector)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function I_(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function zt(e){return e==null?"":typeof e=="string"?e:`${e}px`}var J2=new he("cdk-dir-doc",{providedIn:"root",factory:Q2});function Q2(){return O(Qe)}var eV=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function tV(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?eV.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Ds=(()=>{class e{value="ltr";change=new We;constructor(){let r=O(J2,{optional:!0});if(r){let n=r.body?r.body.dir:null,i=r.documentElement?r.documentElement.dir:null;this.value=tV(n||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Is;function sT(){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 nV=20,T_=(()=>{class e{_ngZone=O(Ve);_platform=O(Zn);_renderer=O(un).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new ie;_scrolledCount=0;scrollContainers=new Map;register(r){this.scrollContainers.has(r)||this.scrollContainers.set(r,r.elementScrolled().subscribe(()=>this._scrolled.next(r)))}deregister(r){let n=this.scrollContainers.get(r);n&&(n.unsubscribe(),this.scrollContainers.delete(r))}scrolled(r=nV){return this._platform.isBrowser?new nt(n=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=r>0?this._scrolled.pipe(Lu(r)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):Fo()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((r,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(r,n){let i=this.getAncestorScrollContainers(r);return this.scrolled(n).pipe(Vo(s=>!s||i.indexOf(s)>-1))}getAncestorScrollContainers(r){let n=[];return this.scrollContainers.forEach((i,s)=>{this._scrollableContainsElement(s,r)&&n.push(s)}),n}_scrollableContainsElement(r,n){let i=Xn(n),s=r.getElementRef().nativeElement;do if(i==s)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),rV=20,xl=(()=>{class e{_platform=O(Zn);_listeners;_viewportSize;_change=new ie;_document=O(Qe,{optional:!0});constructor(){let r=O(Ve),n=O(un).createRenderer(null,null);r.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=s=>this._change.next(s);this._listeners=[n.listen("window","resize",i),n.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(r=>r()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let r={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),r}getViewportRect(){let r=this.getViewportScrollPosition(),{width:n,height:i}=this.getViewportSize();return{top:r.top,left:r.left,bottom:r.top+i,right:r.left+n,height:i,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let r=this._document,n=this._getWindow(),i=r.documentElement,s=i.getBoundingClientRect(),o=-s.top||r.body.scrollTop||n.scrollY||i.scrollTop||0,a=-s.left||r.body.scrollLeft||n.scrollX||i.scrollLeft||0;return{top:o,left:a}}change(r=rV){return r>0?this._change.pipe(Lu(r)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let r=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:r.innerWidth,height:r.innerHeight}:{width:0,height:0}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),x_={},np=(()=>{class e{_appId=O(tl);getId(r){return this._appId!=="ng"&&(r+=this._appId),x_.hasOwnProperty(r)||(x_[r]=0),`${r}${x_[r]++}`}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function aT(e,...t){return t.length?t.some(r=>e[r]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var cT=sT(),R_=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=zt(-this._previousScrollPosition.left),e.style.top=zt(-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,r=e.style,n=t.style,i=r.scrollBehavior||"",s=n.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),cT&&(r.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),cT&&(r.scrollBehavior=i,n.scrollBehavior=s)}}_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}},N_=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,t,r,n){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=r,this._config=n}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Vo(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())}},rp=class{enable(){}disable(){}attach(){}};function A_(e,t){return t.some(r=>{let n=e.bottom<r.top,i=e.top>r.bottom,s=e.right<r.left,o=e.left>r.right;return n||i||s||o})}function lT(e,t){return t.some(r=>{let n=e.top<r.top,i=e.bottom>r.bottom,s=e.left<r.left,o=e.right>r.right;return n||i||s||o})}var M_=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,t,r,n){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=r,this._config=n}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:r,height:n}=this._viewportRuler.getViewportSize();A_(t,[{width:r,height:n,bottom:n,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}},oV=(()=>{class e{_scrollDispatcher=O(T_);_viewportRuler=O(xl);_ngZone=O(Ve);_document=O(Qe);constructor(){}noop=()=>new rp;close=r=>new N_(this._scrollDispatcher,this._ngZone,this._viewportRuler,r);block=()=>new R_(this._viewportRuler,this._document);reposition=r=>new M_(this._scrollDispatcher,this._viewportRuler,this._ngZone,r);static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Rl=class{positionStrategy;scrollStrategy=new rp;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 r of t)e[r]!==void 0&&(this[r]=e[r])}}},O_=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},mT=(()=>{class e{_attachedOverlays=[];_document=O(Qe);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(r){this.remove(r),this._attachedOverlays.push(r)}remove(r){let n=this._attachedOverlays.indexOf(r);n>-1&&this._attachedOverlays.splice(n,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),sV=(()=>{class e extends mT{_ngZone=O(Ve);_renderer=O(un).createRenderer(null,null);_cleanupKeydown;add(r){super.add(r),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=r=>{let n=this._attachedOverlays;for(let i=n.length-1;i>-1;i--)if(n[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>n[i]._keydownEvents.next(r));break}};static \u0275fac=(()=>{let r;return function(n){return(r||(r=Id(e)))(n||e)}})();static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),aV=(()=>{class e extends mT{_platform=O(Zn);_ngZone=O(Ve);_renderer=O(un).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(r){if(super.add(r),!this._isAttached){let n=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Cn(this._renderer,n,"pointerdown",this._pointerDownListener,i),Cn(this._renderer,n,"click",this._clickListener,i),Cn(this._renderer,n,"auxclick",this._clickListener,i),Cn(this._renderer,n,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(r=>r()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=r=>{this._pointerDownEventTarget=Kn(r)};_clickListener=r=>{let n=Kn(r),i=r.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:n;this._pointerDownEventTarget=null;let s=this._attachedOverlays.slice();for(let o=s.length-1;o>-1;o--){let a=s[o];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(uT(a.overlayElement,n)||uT(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(r)):l.next(r)}};static \u0275fac=(()=>{let r;return function(n){return(r||(r=Id(e)))(n||e)}})();static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uT(e,t){let r=typeof ShadowRoot<"u"&&ShadowRoot,n=t;for(;n;){if(n===e)return!0;n=r&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var gT=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ft({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,n){},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})(),ip=(()=>{class e{_platform=O(Zn);_containerElement;_document=O(Qe);_styleLoader=O(Ss);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let r="cdk-overlay-container";if(this._platform.isBrowser||I_()){let i=this._document.querySelectorAll(`.${r}[platform="server"], .${r}[platform="test"]`);for(let s=0;s<i.length;s++)i[s].remove()}let n=this._document.createElement("div");n.classList.add(r),I_()?n.setAttribute("platform","test"):this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}_loadStyles(){this._styleLoader.load(gT)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),P_=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,t,r,n){this._renderer=t,this._ngZone=r,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",n)}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()}},Wa=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new ie;_attachments=new ie;_detachments=new ie;_positionStrategy;_scrollStrategy;_locationChanges=dt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new ie;_outsidePointerEvents=new ie;_renders=new ie;_afterRenderRef;_afterNextRenderRef;constructor(e,t,r,n,i,s,o,a,l,c=!1,h,d){this._portalOutlet=e,this._host=t,this._pane=r,this._config=n,this._ngZone=i,this._keyboardDispatcher=s,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=c,this._injector=h,this._renderer=d,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy,this._afterRenderRef=Cv(()=>Xg(()=>{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=Xr(()=>{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=re(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=zt(this._config.width),e.height=zt(this._config.height),e.minWidth=zt(this._config.minWidth),e.minHeight=zt(this._config.minHeight),e.maxWidth=zt(this._config.maxWidth),e.maxHeight=zt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new P_(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,r){let n=C_(t||[]).filter(i=>!!i);n.length&&(r?e.classList.add(...n):e.classList.remove(...n))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(Wr(eo(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?.()}},dT="cdk-overlay-connected-position-bounding-box",cV=/([A-Za-z%]+)$/,k_=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 ie;_resizeSubscription=dt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,t,r,n,i){this._viewportRuler=t,this._document=r,this._platform=n,this._overlayContainer=i,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(dT),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,r=this._viewportRect,n=this._containerRect,i=[],s;for(let o of this._preferredPositions){let a=this._getOriginPoint(e,n,o),l=this._getOverlayPoint(a,t,o),c=this._getOverlayFit(l,t,r,o);if(c.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(o,a);return}if(this._canFitWithFlexibleDimensions(c,l,r)){i.push({position:o,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,o)});continue}(!s||s.overlayFit.visibleArea<c.visibleArea)&&(s={overlayFit:c,overlayPoint:l,originPoint:a,position:o,overlayRect:t})}if(i.length){let o=null,a=-1;for(let l of i){let c=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);c>a&&(a=c,o=l)}this._isPushed=!1,this._applyPosition(o.position,o.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&&Ts(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(dT),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,r){let n;if(r.originX=="center")n=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,o=this._isRtl()?e.left:e.right;n=r.originX=="start"?s:o}t.left<0&&(n-=t.left);let i;return r.originY=="center"?i=e.top+e.height/2:i=r.originY=="top"?e.top:e.bottom,t.top<0&&(i-=t.top),{x:n,y:i}}_getOverlayPoint(e,t,r){let n;r.overlayX=="center"?n=-t.width/2:r.overlayX==="start"?n=this._isRtl()?-t.width:0:n=this._isRtl()?0:-t.width;let i;return r.overlayY=="center"?i=-t.height/2:i=r.overlayY=="top"?0:-t.height,{x:e.x+n,y:e.y+i}}_getOverlayFit(e,t,r,n){let i=pT(t),{x:s,y:o}=e,a=this._getOffset(n,"x"),l=this._getOffset(n,"y");a&&(s+=a),l&&(o+=l);let c=0-s,h=s+i.width-r.width,d=0-o,f=o+i.height-r.height,g=this._subtractOverflows(i.width,c,h),m=this._subtractOverflows(i.height,d,f),b=g*m;return{visibleArea:b,isCompletelyWithinViewport:i.width*i.height===b,fitsInViewportVertically:m===i.height,fitsInViewportHorizontally:g==i.width}}_canFitWithFlexibleDimensions(e,t,r){if(this._hasFlexibleDimensions){let n=r.bottom-t.y,i=r.right-t.x,s=fT(this._overlayRef.getConfig().minHeight),o=fT(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||s!=null&&s<=n,l=e.fitsInViewportHorizontally||o!=null&&o<=i;return a&&l}return!1}_pushOverlayOnScreen(e,t,r){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let n=pT(t),i=this._viewportRect,s=Math.max(e.x+n.width-i.width,0),o=Math.max(e.y+n.height-i.height,0),a=Math.max(i.top-r.top-e.y,0),l=Math.max(i.left-r.left-e.x,0),c=0,h=0;return n.width<=i.width?c=l||-s:c=e.x<this._viewportMargin?i.left-r.left-e.x:0,n.height<=i.height?h=a||-o:h=e.y<this._viewportMargin?i.top-r.top-e.y:0,this._previousPushAmount={x:c,y:h},{x:e.x+c,y:e.y+h}}_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 r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!lV(this._lastScrollVisibility,r)){let n=new O_(e,r);this._positionChanges.next(n)}this._lastScrollVisibility=r}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),r,n=e.overlayY;e.overlayX==="center"?r="center":this._isRtl()?r=e.overlayX==="start"?"right":"left":r=e.overlayX==="start"?"left":"right";for(let i=0;i<t.length;i++)t[i].style.transformOrigin=`${r} ${n}`}_calculateBoundingBoxRect(e,t){let r=this._viewportRect,n=this._isRtl(),i,s,o;if(t.overlayY==="top")s=e.y,i=r.height-s+this._viewportMargin;else if(t.overlayY==="bottom")o=r.height-e.y+this._viewportMargin*2,i=r.height-o+this._viewportMargin;else{let f=Math.min(r.bottom-e.y+r.top,e.y),g=this._lastBoundingBoxSize.height;i=f*2,s=e.y-f,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-g/2)}let a=t.overlayX==="start"&&!n||t.overlayX==="end"&&n,l=t.overlayX==="end"&&!n||t.overlayX==="start"&&n,c,h,d;if(l)d=r.width-e.x+this._viewportMargin*2,c=e.x-this._viewportMargin;else if(a)h=e.x,c=r.right-e.x;else{let f=Math.min(r.right-e.x+r.left,e.x),g=this._lastBoundingBoxSize.width;c=f*2,h=e.x-f,c>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-g/2)}return{top:s,left:h,bottom:o,right:d,width:c,height:i}}_setBoundingBoxStyles(e,t){let r=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;n.height=zt(r.height),n.top=zt(r.top),n.bottom=zt(r.bottom),n.width=zt(r.width),n.left=zt(r.left),n.right=zt(r.right),t.overlayX==="center"?n.alignItems="center":n.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?n.justifyContent="center":n.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(n.maxHeight=zt(i)),s&&(n.maxWidth=zt(s))}this._lastBoundingBoxSize=r,Ts(this._boundingBox.style,n)}_resetBoundingBoxStyles(){Ts(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ts(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let r={},n=this._hasExactPosition(),i=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(n){let c=this._viewportRuler.getViewportScrollPosition();Ts(r,this._getExactOverlayY(t,e,c)),Ts(r,this._getExactOverlayX(t,e,c))}else r.position="static";let o="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),r.transform=o.trim(),s.maxHeight&&(n?r.maxHeight=zt(s.maxHeight):i&&(r.maxHeight="")),s.maxWidth&&(n?r.maxWidth=zt(s.maxWidth):i&&(r.maxWidth="")),Ts(this._pane.style,r)}_getExactOverlayY(e,t,r){let n={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,r)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;n.bottom=`${s-(i.y+this._overlayRect.height)}px`}else n.top=zt(i.y);return n}_getExactOverlayX(e,t,r){let n={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,r));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let o=this._document.documentElement.clientWidth;n.right=`${o-(i.x+this._overlayRect.width)}px`}else n.left=zt(i.x);return n}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),r=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:lT(e,r),isOriginOutsideView:A_(e,r),isOverlayClipped:lT(t,r),isOverlayOutsideView:A_(t,r)}}_subtractOverflows(e,...t){return t.reduce((r,n)=>r-Math.max(n,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=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+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&&C_(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 Mt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,r=e.height||0;return{top:e.y,bottom:e.y+r,left:e.x,right:e.x+t,height:r,width:t}}};function Ts(e,t){for(let r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function fT(e){if(typeof e!="number"&&e!=null){let[t,r]=e.split(cV);return!r||r==="px"?parseFloat(t):null}return e||null}function pT(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 lV(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var hT="cdk-global-overlay-wrapper",L_=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(hT),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,r=this._overlayRef.getConfig(),{width:n,height:i,maxWidth:s,maxHeight:o}=r,a=(n==="100%"||n==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(i==="100%"||i==="100vh")&&(!o||o==="100%"||o==="100vh"),c=this._xPosition,h=this._xOffset,d=this._overlayRef.getConfig().direction==="rtl",f="",g="",m="";a?m="flex-start":c==="center"?(m="center",d?g=h:f=h):d?c==="left"||c==="end"?(m="flex-end",f=h):(c==="right"||c==="start")&&(m="flex-start",g=h):c==="left"||c==="start"?(m="flex-start",f=h):(c==="right"||c==="end")&&(m="flex-end",g=h),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,r=t.style;t.classList.remove(hT),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},uV=(()=>{class e{_viewportRuler=O(xl);_document=O(Qe);_platform=O(Zn);_overlayContainer=O(ip);constructor(){}global(){return new L_}flexibleConnectedTo(r){return new k_(r,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),F_=(()=>{class e{scrollStrategies=O(oV);_overlayContainer=O(ip);_positionBuilder=O(uV);_keyboardDispatcher=O(sV);_injector=O(vt);_ngZone=O(Ve);_document=O(Qe);_directionality=O(Ds);_location=O(Nv);_outsideClickDispatcher=O(aV);_animationsModuleType=O(LC,{optional:!0});_idGenerator=O(np);_renderer=O(un).createRenderer(null,null);_appRef;_styleLoader=O(Ss);constructor(){}create(r){this._styleLoader.load(gT);let n=this._createHostElement(),i=this._createPaneElement(n),s=this._createPortalOutlet(i),o=new Rl(r);return o.direction=o.direction||this._directionality.value,new Wa(s,n,i,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Gn),this._renderer)}position(){return this._positionBuilder}_createPaneElement(r){let n=this._document.createElement("div");return n.id=this._idGenerator.getId("cdk-overlay-"),n.classList.add("cdk-overlay-pane"),r.appendChild(n),n}_createHostElement(){let r=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(r),r}_createPortalOutlet(r){return this._appRef||(this._appRef=this._injector.get(pr)),new Kf(r,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function dV(e,t){}var Ga=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},fV=(()=>{class e extends ja{_elementRef=O(Mt);_focusTrapFactory=O(oT);_config;_interactivityChecker=O(D_);_ngZone=O(Ve);_overlayRef=O(Wa);_focusMonitor=O(tT);_renderer=O(va);_platform=O(Zn);_document=O(Qe,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=O(Br);_injector=O(vt);_isDestroyed=!1;constructor(){super(),this._config=O(Ga,{optional:!0})||new Ga,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(r){this._ariaLabelledByQueue.push(r),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(r){let n=this._ariaLabelledByQueue.indexOf(r);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(r){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachComponentPortal(r);return this._contentAttached(),n}attachTemplatePortal(r){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachTemplatePortal(r);return this._contentAttached(),n}attachDomPortal=r=>{this._portalOutlet.hasAttached();let n=this._portalOutlet.attachDomPortal(r);return this._contentAttached(),n};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(r,n){this._interactivityChecker.isFocusable(r)||(r.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{s(),o(),r.removeAttribute("tabindex")},s=this._renderer.listen(r,"blur",i),o=this._renderer.listen(r,"mousedown",i)})),r.focus(n)}_focusByCssSelector(r,n){let i=this._elementRef.nativeElement.querySelector(r);i&&this._forceFocus(i,n)}_trapFocus(r){this._isDestroyed||Xr(()=>{let n=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||n.focus(r);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(r)||this._focusDialogContainer(r);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',r);break;default:this._focusByCssSelector(this._config.autoFocus,r);break}},{injector:this._injector})}_restoreFocus(){let r=this._config.restoreFocus,n=null;if(typeof r=="string"?n=this._document.querySelector(r):typeof r=="boolean"?n=r?this._elementFocusedBeforeDialogWasOpened:null:r&&(n=r),this._config.restoreFocus&&n&&typeof n.focus=="function"){let i=Jf(),s=this._elementRef.nativeElement;(!i||i===this._document.body||i===s||s.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(r){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(r)}_containsFocus(){let r=this._elementRef.nativeElement,n=Jf();return r===n||r.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Jf()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ft({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,n){if(r&1&&ns(y_,7),r&2){let i;rs(i=is())&&(n._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,n){r&2&&ts("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[fo],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,n){r&1&&pt(0,dV,0,0,"ng-template",0)},dependencies:[y_],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
46
- `],encapsulation:2})}return e})(),xs=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new ie;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(r=>{r.keyCode===27&&!this.disableClose&&!aT(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(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let r=this.closed;this.containerInstance._closeInteractionType=t?.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="",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}},pV=new he("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=O(F_);return()=>e.scrollStrategies.block()}}),V_=new he("DialogData"),hV=new he("DefaultDialogConfig"),vT=(()=>{class e{_overlay=O(F_);_injector=O(vt);_defaultOptions=O(hV,{optional:!0});_parentDialog=O(e,{optional:!0,skipSelf:!0});_overlayContainer=O(ip);_idGenerator=O(np);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new ie;_afterOpenedAtThisLevel=new ie;_ariaHiddenElements=new Map;_scrollStrategy=O(pV);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=im(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Si(void 0)));constructor(){}open(r,n){let i=this._defaultOptions||new Ga;n=w(w({},i),n),n.id=n.id||this._idGenerator.getId("cdk-dialog-"),n.id&&this.getDialogById(n.id);let s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new xs(o,n),l=this._attachContainer(o,a,n);return a.containerInstance=l,this._attachDialogContent(r,a,l,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){B_(this.openDialogs,r=>r.close())}getDialogById(r){return this.openDialogs.find(n=>n.id===r)}ngOnDestroy(){B_(this._openDialogsAtThisLevel,r=>{r.config.closeOnDestroy===!1&&this._removeOpenDialog(r,!1)}),B_(this._openDialogsAtThisLevel,r=>r.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(r){let n=new Rl({positionStrategy:r.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:r.scrollStrategy||this._scrollStrategy(),panelClass:r.panelClass,hasBackdrop:r.hasBackdrop,direction:r.direction,minWidth:r.minWidth,minHeight:r.minHeight,maxWidth:r.maxWidth,maxHeight:r.maxHeight,width:r.width,height:r.height,disposeOnNavigation:r.closeOnNavigation});return r.backdropClass&&(n.backdropClass=r.backdropClass),n}_attachContainer(r,n,i){let s=i.injector||i.viewContainerRef?.injector,o=[{provide:Ga,useValue:i},{provide:xs,useValue:n},{provide:Wa,useValue:r}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,o.push(...i.container.providers(i))):a=fV;let l=new Ua(a,i.viewContainerRef,vt.create({parent:s||this._injector,providers:o}));return r.attach(l).instance}_attachDialogContent(r,n,i,s){if(r instanceof Mr){let o=this._createInjector(s,n,i,void 0),a={$implicit:s.data,dialogRef:n};s.templateContext&&(a=w(w({},a),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),i.attachTemplatePortal(new Ha(r,null,a,o))}else{let o=this._createInjector(s,n,i,this._injector),a=i.attachComponentPortal(new Ua(r,s.viewContainerRef,o));n.componentRef=a,n.componentInstance=a.instance}}_createInjector(r,n,i,s){let o=r.injector||r.viewContainerRef?.injector,a=[{provide:V_,useValue:r.data},{provide:xs,useValue:n}];return r.providers&&(typeof r.providers=="function"?a.push(...r.providers(n,r,i)):a.push(...r.providers)),r.direction&&(!o||!o.get(Ds,null,{optional:!0}))&&a.push({provide:Ds,useValue:{value:r.direction,change:Fo()}}),vt.create({parent:o||s,providers:a})}_removeOpenDialog(r,n){let i=this.openDialogs.indexOf(r);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let r=this._overlayContainer.getContainerElement();if(r.parentElement){let n=r.parentElement.children;for(let i=n.length-1;i>-1;i--){let s=n[i];s!==r&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let r=this._parentDialog;return r?r._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function B_(e,t){let r=e.length;for(;r--;)t(e[r])}var vn=class{static injectScriptURL(e,t){if(!e)return;let r=document.createElement("script");r.id=t??"",r.src=e,e.includes("localhost")&&(r.type="module"),document.head.appendChild(r)}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 r=document.createElement("style");r.textContent=e,t.appendChild(r)}static injectStylesheet(e,t=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=n=>{let i=n.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=e.split("/"),a=o.slice(0,o.length-1).join("/"),l=s.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(r)}},U_=Pe(Yn());function mV(e,t){if(e&1&&(Q(0,"div",12),fn(1,"OPEN CART "),ee()),e&2){let r=X(2);ti("animate-slide-up-enter",r.atcClicked)("hidden",!r.atcClicked)}}function gV(e,t){if(e&1&&(Q(0,"div",12),fn(1,"ADD TO CART "),ee()),e&2){let r=X(2);ti("animate-slide-up-exit",r.atcClicked)("hidden",r.atcClicked)}}function vV(e,t){if(e&1){let r=zn();Q(0,"div",3),ht("click",function(){let n=It(r).$implicit,i=X();return Tt(i.clicked.emit(n))})("keydown",function(){let n=It(r).$implicit,i=X();return Tt(i.clicked.emit(n))}),Q(1,"div",4),Ae(2,"img",5),Q(3,"div",6)(4,"span",7),fn(5),ee(),Ae(6,"span",8),bn(7,"cooeeCurrency"),bn(8,"safeHtml"),ee()(),Q(9,"div",9),ht("click",function(n){let i=It(r).$implicit,s=X();return Tt(s.clickAddToCart(n,i))})("keydown",function(n){let i=It(r).$implicit,s=X();return Tt(s.clickAddToCart(n,i))}),pt(10,mV,2,4,"div",10)(11,gV,2,4,"div",11),ee()()}if(e&2){let r=t.$implicit,n=X();Y(2),qn("alt",r.name),be("src",r.imageURL,dn),Y(3),os(" ",r.name," "),Y(),be("innerHTML",xn(8,11,xn(7,9,r.price)),Pr),Y(3),ti("lc:bg-pink-500",!n.atcClicked)("lc:bg-black",n.atcClicked),Y(),Ot(n.atcClicked?10:11)}}var op=class fp{items;clicked=new We;performCTA=new We;atcClicked=!1;clickAddToCart(t,r){t.stopPropagation(),this.performCTA.emit({item:r,cta:this.atcClicked?U_.ClickActionType.OPEN_CART:U_.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||fp)};static \u0275cmp=ft({type:fp,selectors:[["cooee-product-card"]],inputs:{items:"items"},outputs:{clicked:"clicked",performCTA:"performCTA"},decls:4,vars:0,consts:[[1,"lc:absolute","lc:flex","lc:bottom-2","lc:gap-2","lc:w-full","lc:z-10"],[1,"lc:flex","lc:px-12","lc:w-full","lc:gap-2","lc:overflow-x-auto"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-shrink-0","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"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-shrink-0","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","lc:items-center"],["id","lc-item-image",1,"lc:w-20","lc:h-20","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","lc:text-xl"],["id","lc-item-price",1,"lc:text-xl",3,"innerHTML"],["id","lc-cta-button","tabindex","{0}",1,"lc:py-4","lc:rounded","lc:w-full","lc:text-center","lc:font-normal","lc:cursor-pointer",3,"click","keydown"],[1,"lc:text-white","lc:text-xl","lc:font-bold",3,"animate-slide-up-enter","hidden"],[1,"lc:text-white","lc:text-xl","lc:font-bold",3,"animate-slide-up-exit","hidden"],[1,"lc:text-white","lc:text-xl","lc:font-bold"]],template:function(t,r){t&1&&(Q(0,"div",0)(1,"div",1),$t(2,vV,12,13,"div",2,Fi),ee()()),t&2&&(Y(2),Wt(r.items))},dependencies:[ui,di],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}"]})},xt=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}},_T=Pe($_()),yV=(0,_T.default)(fetch),sp=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let r,n=xt.getRootPrefix()+`products/${t}.js`;try{r=await(await yV(n)).json()}catch(i){C.error(`Failed to fetch ${n}`,i);let s=bt.getInstance();i instanceof Response?s.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:n}):s.captureException(i,{mID:e.mID,path:n});return}if(!r){C.error("Item not found after AJAX call for:",e.mID);return}return r}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}}},ap=Pe(Yn()),_V=(e,t)=>t.id;function EV(e,t){if(e&1&&Ae(0,"img",10),e&2){let r=t.$implicit,n=X(2);be("src",r,dn)("alt",n.item.name)}}function wV(e,t){if(e&1&&$t(0,EV,1,2,"img",10,Fi),e&2){let r=X();Wt(r.ajaxItem.images)}}function bV(e,t){if(e&1&&Ae(0,"img",10),e&2){let r=X();be("src",r.item.imageURL,dn)("alt",r.item.name)}}function CV(e,t){if(e&1&&(Ae(0,"span",13),bn(1,"cooeeCurrency"),bn(2,"safeHtml")),e&2){let r=X();be("innerHTML",xn(2,3,xn(1,1,(r.selectedVariant==null?null:r.selectedVariant.price)/100)),Pr)}}function SV(e,t){if(e&1&&(Ae(0,"span",13),bn(1,"cooeeCurrency"),bn(2,"safeHtml")),e&2){let r=X();be("innerHTML",xn(2,3,xn(1,1,r.item.price)),Pr)}}function DV(e,t){if(e&1){let r=zn();Q(0,"div",20),ht("click",function(){let n=It(r).$implicit,i=X();return Tt(i.selectedVariant=n)})("keydown",function(){let n=It(r).$implicit,i=X();return Tt(i.selectedVariant=n)}),Q(1,"span",21),fn(2),ee()()}if(e&2){let r=t.$implicit,n=X();ti("lc:bg-pink-100",(n.selectedVariant==null?null:n.selectedVariant.id)===r.id)("lc:border-pink-300",(n.selectedVariant==null?null:n.selectedVariant.id)===r.id)("lc:text-pink-700",(n.selectedVariant==null?null:n.selectedVariant.id)===r.id),Y(2),ya(r.title)}}function IV(e,t){if(e&1&&(Q(0,"div",16)(1,"h4",22),fn(2,"Description"),ee(),Ae(3,"div",23),bn(4,"safeHtml"),ee()),e&2){let r=X();Y(3),be("innerHTML",xn(4,1,r.ajaxItem==null?null:r.ajaxItem.description),Pr)}}function TV(e,t){e&1&&fn(0," OPEN CART ")}function xV(e,t){e&1&&fn(0," ADD TO CART ")}var cp=class vp{item;closeModel=new We;performCTA=new We;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=ap.ClickActionType;async ngOnInit(){this.ajaxItem=await sp.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?ap.ClickActionType.OPEN_CART:ap.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants.filter(t=>t.available&&t.title!=="Default Title")??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||vp)};static \u0275cmp=ft({type:vp,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:28,vars:5,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-4xl","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"],["id","lc-item-name",1,"lc:font-bold","lc:m-0","lc:text-3xl"],["id","lc-item-price",1,"lc:font-semibold","lc:text-2xl",3,"innerHTML"],["id","lc-variant-list",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"],["id","lc-description",1,"lc:mt-4","lc:border-t","lc:pt-4","lc:w-full"],["id","lc-modal-footer",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"],["id","lc-cta-button","tabindex","{0}",1,"lc:bg-black","lc:text-white","lc:p-4","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer","lc:text-2xl",3,"click","keydown"],["id","lc-more-info-button","tabindex","{0}",1,"lc:bg-pink-100","lc:text-pink-600","lc:p-4","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer","lc:text-2xl",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,r){t&1&&(Q(0,"div",0)(1,"div",1)(2,"h2",2),fn(3,"Shop Now"),ee(),Q(4,"button",3),ht("click",function(){return r.closeDialog()}),hr(),Q(5,"svg",4),Ae(6,"path",5)(7,"path",6),ee()()(),Jo(),Q(8,"div",7)(9,"div",8)(10,"div",9),pt(11,wV,2,0)(12,bV,1,2,"img",10),ee(),Q(13,"div",11)(14,"h3",12),fn(15),ee(),pt(16,CV,3,5,"span",13)(17,SV,3,5,"span",13),ee(),Q(18,"div",14),$t(19,DV,3,7,"div",15,_V),ee(),pt(21,IV,5,3,"div",16),ee()(),Q(22,"div",17)(23,"div",18),ht("click",function(){return r.clickAddToCart(r.item)})("keydown",function(){return r.clickAddToCart(r.item)}),pt(24,TV,1,0)(25,xV,1,0),ee(),Q(26,"div",19),ht("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})}),fn(27," MORE INFO "),ee()()()),t&2&&(Y(11),Ot(!(r.ajaxItem==null||r.ajaxItem.images==null)&&r.ajaxItem.images.length?11:12),Y(4),ya(r.item.name),Y(),Ot(r.selectedVariant!=null&&r.selectedVariant.price?16:17),Y(3),Wt(r.availableVariants),Y(2),Ot(r.ajaxItem!=null&&r.ajaxItem.description?21:-1),Y(3),Ot(r.atcClicked?24:25))},dependencies:[di,ui],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px;overflow:hidden}"]})};function RV(e,t){e&1&&(hr(),Q(0,"svg",1),Ae(1,"path",2)(2,"path",3),ee())}function NV(e,t){e&1&&(hr(),Q(0,"svg",1),Ae(1,"path",2)(2,"path",4),ee())}var lp=class Zp{muted;buttonClicked=new We;static \u0275fac=function(t){return new(t||Zp)};static \u0275cmp=ft({type:Zp,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,r){t&1&&(Q(0,"button",0),ht("click",function(){return r.buttonClicked.emit()}),pt(1,RV,3,0,":svg:svg",1)(2,NV,3,0,":svg:svg",1),ee()),t&2&&(Y(),Ot(r.muted?1:2))},encapsulation:2})},up=class kf{width;static \u0275fac=function(t){return new(t||kf)};static \u0275cmp=ft({type:kf,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,r){t&1&&(Q(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Ae(4,"div"),ee()()()()),t&2&&(Y(3),po("width",r.width,"%"))},encapsulation:2})},No=Pe(Yn()),wx=Pe(dp()),bx=Pe(ls()),AV=" 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",MV=/bot|crawl|http|lighthouse|scan|search|spider/i,Nl;function OV(){if(Nl instanceof RegExp)return Nl;try{Nl=new RegExp(AV,"i")}catch{Nl=MV}return Nl}function bT(e){return!!e&&OV().test(e)}var CT=Pe(W_()),Al=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 CT.URLBuilder(location.href)}catch{return{}}let t={};this.UTM_PARAMS.forEach(n=>{let i=e.getQueryParam(n);i&&(t[n]=i)});let r={};return Object.keys(this.TW_PARAMS).forEach(n=>{let i=e.getQueryParam(this.TW_PARAMS[n]);i&&(r[n]=i)}),w(w({},r),t)}},hi=class ID{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 ID(w({origin:location.origin,path:t,qs:location.search,referrer:Al.getReferrer(),name:ke.get().pageName},Al.getUTMParams()))}},xe=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},G_={d:(e,t)=>{for(var r in t)G_.o(t,r)&&!G_.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},z_={};G_.d(z_,{A:()=>FV,k:()=>q_});var kV=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(c){try{l(n.next(c))}catch(h){s(h)}}function a(c){try{l(n.throw(c))}catch(h){s(h)}}function l(c){var h;c.done?i(c.value):(h=c.value,h instanceof r?h:new r(function(d){d(h)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},LV=function(e,t){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return function(h){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,h[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&h[0]?n.return:h[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,h[1])).done)return i;switch(n=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,n=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){o.label=h[1];break}if(h[0]===6&&o.label<i[1]){o.label=i[1],i=h;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(h);break}i[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(e,o)}catch(d){h=[6,d],n=0}finally{r=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,c])}}};function q_(){return kV(this,void 0,Promise,function(){return LV(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 r,n,i=(r=t.target)===null||r===void 0?void 0:r.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(o){var s=o;return o instanceof Error&&(s=(n=o.message)!==null&&n!==void 0?n:o),typeof s!="string"?void __callback(!1):void __callback(s.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=q_);var FV=q_,ST=z_.A,HJ=z_.k,vx=Pe(ls()),DT=Pe(Y_()),ir=class $i{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new DT.default;constructor(){}static get(){return $i._instance||($i._instance=new $i),$i._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===$i.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===$i.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(t){let r=t.max,n=t.cont.w,i=t.cont.h,s=t.spc,o=$i.get().getWidth(),a=$i.get().getHeight();r&&(o=o?Math.min(o,r):r,a=a?Math.min(a,r):r),a&&(o-=s.getHorizontal(),a-=s.getVertical(),o/a<n/i?this.scalingFactor=o/n:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(t){return this.doc.createElement(t)}appendChild(t,r){t.appendChild(r)}setStyles(t,r){Object.assign(t.style,r)}setStyle(t,r,n){if(r){if(!n){t.style.removeProperty(r);return}t.style.setProperty(r,n,"important")}}setAttribute(t,r,n){t.setAttribute(r,n)}removeInApp(t){let r=document.querySelector(`.${t.rootClassName}`);r&&r.parentElement.removeChild(r)}setParentContainer(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},hp=class{parser;result={};constructor(){this.parser=ir.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,r=e.offsetWidth*t;return document.body.removeChild(e),r}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{}}},qa=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}},ze=class TD{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new qa;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new TD),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let r=this.convertToCooeeCart();return t&&await rt.set(ge.CURRENT_CART,r),r}async addCooeeAttributes(){await this.lock.acquire();let t=await hn.get(ge.ID),r=await rt.get(ge.DEVICE_ID);if(this.attributes?.letscooee_did===r&&this.attributes?.letscooee_sid===t){C.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let n={letscooee_did:r,letscooee_sid:t,__letscooee_time:new Date().toLocaleString()};C.debug("Updating Shopify cart with attributes:",n);let i=xt.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:n})})).json();C.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),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,ke.get().currencyCode=this.currency,C.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 C.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let r=[];for(let n of t){if(!n.id||!n.title){C.warn("Invalid item received",n);continue}let i={name:n.title,quantity:+n.quantity||1,mID:n.product_id?.toString(),vID:n.id.toString(),price:+n.price/100||0,properties:n.properties,key:n.key},s=n.selling_plan_allocation?.selling_plan;if(!s){r.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:s.fixed_selling_plan,id:s.id,name:s.name,recurringDeliveries:s.recurring_deliveries}},r.push(i)}return r}async fetchCartFromShopify(t){if(!t&&this.token){C.debug("Not fetching cart");return}C.debug("Fetching cart");let r=xt.getCartURL("cart.js"),n=await(await fetch(r)).json();this.update(n)}},Rs=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(Rs||{}),Ya=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=Rs[e]?.toLowerCase();t&&(C.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},br=class{static isOn=!1;static element;static watch(){let e=C.getDebugParam();(e==="1"||e==="on")&&Ue.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,r=0,n=0,i=a=>{a=a||window.event,a.preventDefault(),r=a.clientX,n=a.clientY,document.onmouseup=o,document.onmousemove=s},s=a=>{a=a||window.event,a.preventDefault(),e=r-a.clientX,t=n-a.clientY,r=a.clientX,n=a.clientY,this.element.style.top=this.element.offsetTop-t+"px",this.element.style.left=this.element.offsetLeft-e+"px"},o=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=i}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}},Ol=class extends mo{static storeName="app";static{this.storage=Da(this.storeName)}},mp=Pe(ls()),mi=class xD{static INSTANCE=new xD;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,r){this.topics[t]||(this.topics[t]=new ie),this.topics[t].next(r)}subscriber(t){return this.topics[t]||(this.topics[t]=new ie),this.topics[t].asObservable()}},qt=class bi{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=wt.get().website??{};currentState=!1;drawerSubject=new Tr({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=[bi.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 bi._instance||(bi._instance=new bi),bi._instance}static forceUpdate(){bi._instance=new bi}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return mp.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){C.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){C.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===bi.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(t,r=!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 n=t.items[0].id,i=t.items[0].quantity,s=t.items[0].price;window.cartGiftUpdate(n,s,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 n=document.querySelector('a[href="/cart"]');n&&n.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():C.info("No method found to update the cart without refreshing");document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),r&&mi.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let t=this.configWebsite.cartDrawerSelector;if(!t){await this.findCartDrawer();return}let r=t.split(k.SHADOW_SPLITTER);r.length===1?(this.selector=r[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=r[0]?.trim(),this.selector=r[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!xt.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await ue.retrySelector(t),!this.cartDrawerElement){mp.default.warn("Max attempts exhausted to find cart drawer");return}mp.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!xt.isShopify()||!this.shadowParentElementSelector)return;let t=(await ue.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;if(this.cartDrawerElement.tagName.toLowerCase()===bi.DEFAULT_SELECTOR&&this.cartDrawerElement.open)return!0;if(this.cartDrawerElement.id==="cart-drawer__container")return this.cartDrawerElement.classList.contains("cart-drawer-open");let t=this.cartDrawerElement.getBoundingClientRect(),r=(window.innerHeight||document.documentElement.clientHeight)+.5,n=(window.innerWidth||document.documentElement.clientWidth)+.5,i=t.top<=r&&t.bottom>=0,s=t.left<=n&&t.right>=0,o=i&&s,a=getComputedStyle(this.cartDrawerElement),l=a.display!=="none"&&a.visibility!=="hidden"&&parseFloat(a.opacity)>0,c=!this.cartDrawerElement.hidden,h=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,d=a.transform.match(/matrix\(([^)]+)\)/),f=0,g=0;if(d){let M=d[1].split(", ").map(parseFloat);f=M[4],g=M[5]}let m=f+t.left>n||f+t.right<0||g+t.top>r||g+t.bottom<0,b=Math.max(0,Math.min(t.right,n)-Math.max(t.left,0)),I=Math.max(0,Math.min(t.bottom,r)-Math.max(t.top,0)),A=b*I,F=t.width*t.height,V=F>0&&A/F>=.1;return(o||!m)&&l&&c&&h&&V}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(ue.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,r=new ie;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{r.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),r.pipe(xr(500)).subscribe(()=>{let n=this.isOpen();this.currentState!==n&&(this.currentState=n,this.drawerSubject.next({open:n,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 ze.getCurrent().getNormalisedCart(!0)).itemCount,r=document.querySelector(".cart-link__bubble");r&&(r.innerText=t+"")}},gp=class{static processConfiguration(){let e=wt.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Ue.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await rt.get(ge.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await rt.set(ge.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=wt.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",r=>{t(r)})})}},mx=Pe(Lf()),Un=Pe(Yn()),So=Pe(dp()),xE=Pe(Z_()),wp,it,NT,eE,Ns,IT,AT,X_,MT,tE,J_,Q_,BV,Pl={},OT=[],VV=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nE=Array.isArray;function _o(e,t){for(var r in t)e[r]=t[r];return e}function rE(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function iE(e,t,r){var n,i,s,o={};for(s in t)s=="key"?n=t[s]:s=="ref"?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?wp.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return _p(e,o,n,i,null)}function _p(e,t,r,n,i){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++NT,__i:-1,__u:0};return i==null&&it.vnode!=null&&it.vnode(s),s}function vi(e){return e.children}function gi(e,t){this.props=e,this.context=t}function Ka(e,t){if(t==null)return e.__?Ka(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Ka(e):null}function PT(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return PT(e)}}function TT(e){(!e.__d&&(e.__d=!0)&&Ns.push(e)&&!Ep.__r++||IT!==it.debounceRendering)&&((IT=it.debounceRendering)||AT)(Ep)}function Ep(){var e,t,r,n,i,s,o,a;for(Ns.sort(X_);e=Ns.shift();)e.__d&&(t=Ns.length,n=void 0,s=(i=(r=e).__v).__e,o=[],a=[],r.__P&&((n=_o({},i)).__v=i.__v+1,it.vnode&&it.vnode(n),oE(r.__P,n,i,r.__n,r.__P.namespaceURI,32&i.__u?[s]:null,o,s??Ka(i),!!(32&i.__u),a),n.__v=i.__v,n.__.__k[n.__i]=n,FT(o,n,a),n.__e!=s&&PT(n)),Ns.length>t&&Ns.sort(X_));Ep.__r=0}function kT(e,t,r,n,i,s,o,a,l,c,h){var d,f,g,m,b,I,A=n&&n.__k||OT,F=t.length;for(l=UV(r,t,A,l,F),d=0;d<F;d++)(g=r.__k[d])!=null&&(f=g.__i===-1?Pl:A[g.__i]||Pl,g.__i=d,I=oE(e,g,f,i,s,o,a,l,c,h),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&sE(f.ref,null,g),h.push(g.ref,g.__c||m,g)),b==null&&m!=null&&(b=m),4&g.__u||f.__k===g.__k?l=LT(g,l,e):typeof g.type=="function"&&I!==void 0?l=I:m&&(l=m.nextSibling),g.__u&=-7);return r.__e=b,l}function UV(e,t,r,n,i){var s,o,a,l,c,h=r.length,d=h,f=0;for(e.__k=new Array(i),s=0;s<i;s++)(o=t[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=s+f,(o=e.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?_p(null,o,null,null,null):nE(o)?_p(vi,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?_p(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=HV(o,r,l,d))!==-1&&(d--,(a=r[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&f--,typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<h;s++)(a=r[s])!=null&&(2&a.__u)==0&&(a.__e==n&&(n=Ka(a)),BT(a,a));return n}function LT(e,t,r){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=LT(n[i],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=Ka(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function HV(e,t,r,n){var i,s,o=e.key,a=e.type,l=t[r];if(l===null||l&&o==l.key&&a===l.type&&(2&l.__u)==0)return r;if(n>(l!=null&&(2&l.__u)==0?1:0))for(i=r-1,s=r+1;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&o==l.key&&a===l.type)return i;i--}if(s<t.length){if((l=t[s])&&(2&l.__u)==0&&o==l.key&&a===l.type)return s;s++}}return-1}function xT(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||VV.test(t)?r:r+"px"}function yp(e,t,r,n,i){var s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||xT(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||xT(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(MT,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=r,r?n?r.u=n.u:(r.u=tE,e.addEventListener(t,s?Q_:J_,s)):e.removeEventListener(t,s?Q_:J_,s);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]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function RT(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=tE++;else if(t.t<r.u)return;return r(it.event?it.event(t):t)}}}function oE(e,t,r,n,i,s,o,a,l,c){var h,d,f,g,m,b,I,A,F,V,M,q,Me,lt,j,fe,te,pe=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),s=[a=t.__e=r.__e]),(h=it.__b)&&h(t);e:if(typeof pe=="function")try{if(A=t.props,F="prototype"in pe&&pe.prototype.render,V=(h=pe.contextType)&&n[h.__c],M=h?V?V.props.value:h.__:n,r.__c?I=(d=t.__c=r.__c).__=d.__E:(F?t.__c=d=new pe(A,M):(t.__c=d=new gi(A,M),d.constructor=pe,d.render=$V),V&&V.sub(d),d.props=A,d.state||(d.state={}),d.context=M,d.__n=n,f=d.__d=!0,d.__h=[],d._sb=[]),F&&d.__s==null&&(d.__s=d.state),F&&pe.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=_o({},d.__s)),_o(d.__s,pe.getDerivedStateFromProps(A,d.__s))),g=d.props,m=d.state,d.__v=t,f)F&&pe.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),F&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F&&pe.getDerivedStateFromProps==null&&A!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,M)===!1||t.__v==r.__v)){for(t.__v!=r.__v&&(d.props=A,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(Be){Be&&(Be.__=t)}),q=0;q<d._sb.length;q++)d.__h.push(d._sb[q]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,M),F&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,m,b)})}if(d.context=M,d.props=A,d.__P=e,d.__e=!1,Me=it.__r,lt=0,F){for(d.state=d.__s,d.__d=!1,Me&&Me(t),h=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,Me&&Me(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++lt<25);d.state=d.__s,d.getChildContext!=null&&(n=_o(_o({},n),d.getChildContext())),F&&!f&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(g,m)),a=kT(e,nE(fe=h!=null&&h.type===vi&&h.key==null?h.props.children:h)?fe:[fe],t,r,n,i,s,o,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),I&&(d.__E=d.__=null)}catch(Be){if(t.__v=null,l||s!=null)if(Be.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(te=s.length;te--;)rE(s[te]);else t.__e=r.__e,t.__k=r.__k;it.__e(Be,t,r)}else s==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):a=t.__e=jV(r.__e,t,r,n,i,s,o,l,c);return(h=it.diffed)&&h(t),128&t.__u?void 0:a}function FT(e,t,r){for(var n=0;n<r.length;n++)sE(r[n],r[++n],r[++n]);it.__c&&it.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){it.__e(s,i.__v)}})}function jV(e,t,r,n,i,s,o,a,l){var c,h,d,f,g,m,b,I=r.props,A=t.props,F=t.type;if(F=="svg"?i="http://www.w3.org/2000/svg":F=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((g=s[c])&&"setAttribute"in g==!!F&&(F?g.localName==F:g.nodeType==3)){e=g,s[c]=null;break}}if(e==null){if(F==null)return document.createTextNode(A);e=document.createElementNS(i,F,A.is&&A),a&&(it.__m&&it.__m(t,s),a=!1),s=null}if(F===null)I===A||a&&e.data===A||(e.data=A);else{if(s=s&&wp.call(e.childNodes),I=r.props||Pl,!a&&s!=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")d=g;else if(!(c in A)){if(c=="value"&&"defaultValue"in A||c=="checked"&&"defaultChecked"in A)continue;yp(e,c,null,g,i)}}for(c in A)g=A[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?m=g:c=="checked"?b=g:a&&typeof g!="function"||I[c]===g||yp(e,c,g,I[c],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),kT(e,nE(f)?f:[f],t,r,n,F=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:r.__k&&Ka(r,0),a,l),s!=null)for(c=s.length;c--;)rE(s[c]);a||(c="value",F=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||F=="progress"&&!m||F=="option"&&m!==I[c])&&yp(e,c,m,I[c],i),c="checked",b!==void 0&&b!==e[c]&&yp(e,c,b,I[c],i))}return e}function sE(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(i){it.__e(i,r)}}function BT(e,t,r){var n,i;if(it.unmount&&it.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||sE(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(s){it.__e(s,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&BT(n[i],t,r||typeof e.type!="function");r||rE(e.__e),e.__c=e.__=e.__e=void 0}function $V(e,t,r){return this.constructor(e,r)}function VT(e,t,r){var n,i,s,o;t==document&&(t=document.documentElement),it.__&&it.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,s=[],o=[],oE(t,e=(!n&&r||t).__k=iE(vi,null,[e]),i||Pl,Pl,t.namespaceURI,!n&&r?[r]:i?null:t.firstChild?wp.call(t.childNodes):null,s,!n&&r?r:i?i.__e:t.firstChild,n,o),FT(s,e,o)}wp=OT.slice,it={__e:function(e,t,r,n){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(a){e=a}throw e}},NT=0,eE=function(e){return e!=null&&e.constructor==null},gi.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=_o({},this.state),typeof e=="function"&&(e=e(_o({},r),this.props)),e&&_o(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),TT(this))},gi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),TT(this))},gi.prototype.render=vi,Ns=[],AT=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,X_=function(e,t){return e.__v.__b-t.__v.__b},Ep.__r=0,MT=/(PointerCapture)$|Capture$/i,tE=0,J_=RT(!1),Q_=RT(!0),BV=0;var cE,or,aE,UT,HT=0,KT=[],cn=it,jT=cn.__b,$T=cn.__r,WT=cn.diffed,GT=cn.__c,zT=cn.unmount,qT=cn.__;function WV(e,t){cn.__h&&cn.__h(or,e,HT||t),HT=0;var r=or.__H||(or.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function uE(e,t){var r=WV(cE++,7);return qV(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function GV(){for(var e;e=KT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(bp),e.__H.__h.forEach(lE),e.__H.__h=[]}catch(t){e.__H.__h=[],cn.__e(t,e.__v)}}cn.__b=function(e){or=null,jT&&jT(e)},cn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),qT&&qT(e,t)},cn.__r=function(e){$T&&$T(e),cE=0;var t=(or=e.__c).__H;t&&(aE===or?(t.__h=[],or.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(bp),t.__h.forEach(lE),t.__h=[],cE=0)),aE=or},cn.diffed=function(e){WT&&WT(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(KT.push(t)!==1&&UT===cn.requestAnimationFrame||((UT=cn.requestAnimationFrame)||zV)(GV)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),aE=or=null},cn.__c=function(e,t){t.some(function(r){try{r.__h.forEach(bp),r.__h=r.__h.filter(function(n){return!n.__||lE(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],cn.__e(n,r.__v)}}),GT&&GT(e,t)},cn.unmount=function(e){zT&&zT(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{bp(n)}catch(i){t=i}}),r.__H=void 0,t&&cn.__e(t,r.__v))};var YT=typeof requestAnimationFrame=="function";function zV(e){var t,r=function(){clearTimeout(n),YT&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);YT&&(t=requestAnimationFrame(r))}function bp(e){var t=or,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),or=t}function lE(e){var t=or;e.__c=e.__(),or=t}function qV(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var YV=Symbol.for("preact-signals");function fE(){if(Za>1)Za--;else{for(var e,t=!1;kl!==void 0;){var r=kl;for(kl=void 0,dE++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&XT(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(dE=0,Za--,t)throw e}}var Ct=void 0,kl=void 0,Za=0,dE=0,Cp=0;function ZT(e){if(Ct!==void 0){var t=e.n;if(t===void 0||t.t!==Ct)return t={i:0,S:e,p:Ct.s,n:void 0,t:Ct,e:void 0,x:void 0,r:t},Ct.s!==void 0&&(Ct.s.n=t),Ct.s=t,e.n=t,32&Ct.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=Ct.s,t.n=void 0,Ct.s.n=t,Ct.s=t),t}}function ln(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ln.prototype.brand=YV;ln.prototype.h=function(){return!0};ln.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)};ln.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};ln.prototype.subscribe=function(e){var t=this;return Sn(function(){var r=t.value,n=Ct;Ct=void 0;try{e(r)}finally{Ct=n}})};ln.prototype.valueOf=function(){return this.value};ln.prototype.toString=function(){return this.value+""};ln.prototype.toJSON=function(){return this.value};ln.prototype.peek=function(){var e=Ct;Ct=void 0;try{return this.value}finally{Ct=e}};Object.defineProperty(ln.prototype,"value",{get:function(){var e=ZT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(dE>100)throw new Error("Cycle detected");this.v=e,this.i++,Cp++,Za++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{fE()}}}});function Cr(e){return new ln(e)}function XT(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 JT(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function QT(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Xa(e){ln.call(this,void 0),this.x=e,this.s=void 0,this.g=Cp-1,this.f=4}(Xa.prototype=new ln).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Cp))return!0;if(this.g=Cp,this.f|=1,this.i>0&&!XT(this))return this.f&=-2,!0;var e=Ct;try{JT(this),Ct=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Ct=e,QT(this),this.f&=-2,!0};Xa.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)}ln.prototype.S.call(this,e)};Xa.prototype.U=function(e){if(this.t!==void 0&&(ln.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)}};Xa.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(Xa.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ZT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function pE(e){return new Xa(e)}function ex(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Za++;var r=Ct;Ct=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,hE(e),n}finally{Ct=r,fE()}}}function hE(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ex(e)}function KV(e){if(Ct!==this)throw new Error("Out-of-order effect");QT(this),Ct=e,this.f&=-2,8&this.f&&hE(this),fE()}function Ll(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ll.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()}};Ll.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ex(this),JT(this),Za++;var e=Ct;return Ct=this,KV.bind(this,e)};Ll.prototype.N=function(){2&this.f||(this.f|=2,this.o=kl,kl=this)};Ll.prototype.d=function(){this.f|=8,1&this.f||hE(this)};function Sn(e){var t=new Ll(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var gE,mE;function Ja(e,t){it[e]=t.bind(null,it[e]||function(){})}function Sp(e){mE&&mE(),mE=e&&e.S()}function tx(e){var t=this,r=e.data,n=XV(r);n.value=r;var i=uE(function(){for(var s=t.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return t.__$u.c=function(){var o,a=t.__$u.S(),l=i.value;a(),eE(l)||((o=t.base)==null?void 0:o.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},pE(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}tx.displayName="_st";Object.defineProperties(ln.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:tx},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Ja("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var s=n[i];s instanceof ln&&(r||(t.__np=r={}),r[i]=s,n[i]=s.peek())}}e(t)});Ja("__r",function(e,t){Sp();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var s;return Sn(function(){s=this}),s.c=function(){n.__$f|=1,n.setState({})},s}())),gE=n,Sp(r),e(t)});Ja("__e",function(e,t,r,n){Sp(),gE=void 0,e(t,r,n)});Ja("diffed",function(e,t){Sp(),gE=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var s=r.U;if(s)for(var o in s){var a=s[o];a!==void 0&&!(o in n)&&(a.d(),s[o]=void 0)}else r.U=s={};for(var l in n){var c=s[l],h=n[l];c===void 0?(c=ZV(r,l,h,i),s[l]=c):c.o(h,i)}}}e(t)});function ZV(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,s=Cr(r);return{o:function(o,a){s.value=o,n=a},d:Sn(function(){var o=s.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Ja("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var s=n[i];s&&s.d()}}}}else{var o=t.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}e(t)});Ja("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});gi.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u,n=r&&r.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(n||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function XV(e){return uE(function(){return Cr(e)},[])}var Dp=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},Ip=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},vE=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}},yi=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 Dp(t))??[],this.link=e.link,this.price=new Ip(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=Cr(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=Cr(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let r=new vE(t);return r.isSelected&&(this.selectedSellingPlan.value=r),r})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Jn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Cr(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=Cr(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"),this.tags=e.tags,e.vars&&(this.vars=e.vars.map(t=>new yi(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new pn({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})}},Tp=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}},yE=class{enabled;constructor(e){this.enabled=e.enabled}},_E=class extends yE{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},xp=class{productQuantity;constructor(e){e??={},this.productQuantity=new _E(e.productQuantity)}},As=class{s;g;i;constructor(e){e.s&&(this.s=new Bt(e.s)),e.g&&(this.g=new Fl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},Bl="a-f\\d",JV=`#?[${Bl}]{3}[${Bl}]?`,QV=`#?[${Bl}]{6}([${Bl}]{2})?`,eU=new RegExp(`[^#${Bl}]`,"gi"),tU=new RegExp(`^${JV}$|^${QV}$`,"i");function EE(e,t={}){if(typeof e!="string"||eU.test(e)||!tU.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let r=1;e.length===8&&(r=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(r=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 n=Number.parseInt(e,16),i=n>>16,s=n>>8&255,o=n&255,a=typeof t.alpha=="number"?t.alpha:r;if(t.format==="array")return[i,s,o,a];if(t.format==="css"){let l=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:a}}var Bt=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 EE(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},Ms=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Bt(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return nx[this.s??1]}},nx=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(nx||{}),Fl=class DD{static DEFAULT_FALLBACK=new Bt({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new Bt(t.c)),t.fb&&(this.fb=new Bt(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??DD.DEFAULT_FALLBACK}},Vl=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 Bt(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},Wi=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`}},Os=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},sr=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new As(e.bg)),e.br&&(this.br=new Ms(e.br)),e.shd&&(this.shd=new Vl(e.shd)),e.spc&&(this.spc=new Wi(e.spc)),this.trf=new Os(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 kt[this.t]}get click(){return this.clc}},kt=(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))(kt||{}),Ps=class extends sr{constructor(e){super(e)}},Gi=class extends sr{src;constructor(e){super(e),this.src=e.src}},Qa=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(Qa||{}),Rp=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 wE(t))}},wE=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')`}},Dn=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return Qa[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 Bt(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Bt(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new Rp(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},_i=class extends sr{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 Dn(t)}get color(){return this.typography.tc}get typography(){return this.typo}},Eo=class extends _i{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},Np=class extends sr{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},ec=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 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 n=window.setInterval(()=>{let i=new Date().getTime(),s=r.getTime()-i;if(s<1){clearInterval(n);return}let o=Math.floor(s/(1e3*60*60*24)),a=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),c=Math.floor(s%(1e3*60)/1e3);t({days:o,hours:a,minutes:l,seconds:c})},1e3);return n}},tc=class extends _i{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new ec(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Ap=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Bt(e.c??{})}get text(){return this.txt}get color(){return this.c}},wo=class extends _i{ph;constructor(e){super(e),this.ph=new Ap(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},nc=class extends wo{constructor(e){e??={},super(e)}},rc=class extends wo{},ic=class extends wo{},oc=class extends Gi{},Mp=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[]}}},Ul=class extends sr{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 Mp(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new Wi({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}`}},Op=class extends Ul{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new Np(e.cont),this.mob=new Ul(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new Gi(t)):t.t===2?this.elems.push(new Eo(t)):t.t===3?this.elems.push(new Eo(t)):t.t===100?this.elems.push(new Ps(t)):t.t===51?this.elems.push(new rc(t)):t.t===52?this.elems.push(new ic(t)):t.t===61?this.elems.push(new tc(t)):t.t===15||t.t===16?this.elems.push(new nc(t)):t.t===13&&this.elems.push(new oc(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,r;return this.gvt===1?(t="flex-start",r="flex-start"):this.gvt===2?(t="center",r="flex-start"):this.gvt===3?(t="flex-end",r="flex-start"):this.gvt===4?(t="flex-start",r="center"):this.gvt===6?(t="flex-end",r="center"):this.gvt===7?(t="flex-start",r="flex-end"):this.gvt===8?(t="center",r="flex-end"):this.gvt===9?(t="flex-end",r="flex-end"):(t="center",r="center"),e.alignItems=r,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}},sc=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}},Pp=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}},kp=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}},Lp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new Wi(e.spc),e.size&&(this.size=new kp(e.size)),e.bg&&(this.bg=new As(e.bg)),e.br&&(this.br=new Ms(e.br)),e.typo&&(this.typo=new Dn(e.typo)),e.lout&&(this.lout=new Pp(e.lout)),e.flex&&(this.flex=new sc(e.flex))}},ac=class{sm;lg;constructor(e){e??={},this.sm=new Lp(e.sm),this.lg=new Lp(e.lg)}},yn=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new ac(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return kt[this.t]}},_n=class extends yn{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}},ks=class extends _n{constructor(e,t){super(e,t??3)}},cc=class extends yn{value;constructor(e){super(6,e),e??={},this.value=e.value}},lc=class extends _n{constructor(e=15,t){super(t,e)}},Fp=class extends yn{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Bt(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},rx=Pe(ls()),bE=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Bt(e.color)}},CE=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Bt(e.color)}},Hl=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new CE(e.navigation),this.pagination=new bE(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},Bp=class extends yn{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=ar.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Hl(e.conf),this.allowedTypes=e.allowedTypes}},Vp=class extends _n{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new ec(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},bo=class extends yn{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let r=ar.getParsedElement(t);r&&this.elems.push(r)})}},Ls=class extends yn{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}},ar=class OD{static getParsedElements(t){let r=[];return t?.forEach(n=>{let i=OD.getParsedElement(n);i&&r.push(i)}),r}static getParsedElement(t){switch(t.t){case 2:return new _n(t);case 3:return new ks(t);case 6:return new cc(t);case 11:return new Up(t);case 12:return new Co(t);case 61:return new Vp(t);case 4:return new bo(t);case 1:return new Ls(t);case 13:return new Ls(t,13);case 14:return new _n(t,14);case 15:case 16:return new lc(t.t,t);case 18:return new ks(t,18);case 62:return new Bp(t);case 19:return new Fp(t);default:rx.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"}}},Co=class extends yn{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=ar.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new cc(e.cBox)),this.elems.push(new Ls(e.img,13));let t=new _n(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let r=new _n(e.price);r.text="{{ product.price }}",r.hide=!e.show?.price;let n=new _n(e.compareAt);n.text="{{ product.compare_price }}",n.hide=!e.show?.price,e.compareAt||(n.style=new ac(r.style),n.style.lg.typo=new Dn(re(w({},n.style.lg.typo),{td:"line-through"})),n.style.sm.typo=new Dn(re(w({},n.style.sm.typo),{td:"line-through"})));let i=new bo({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:ar.parseAlignmentToJustifyContent(r.style.lg.typo?.ta)}}}});i.elems.push(n),i.elems.push(r),this.elems.push(i);let s=new lc(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let o=new ks(e.btn,18);o.hide=!e.show?.btn,this.elems.push(o)}}e.symbol&&(this.symbol=new _n(e.symbol))}},Up=class extends yn{conf;prod;constructor(e){super(11,e),e??={},this.conf=new SE(e.conf),this.prod=new Co(e.prod)}},Hp=class extends Hl{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},SE=class{lg;sm;constructor(e){e??={},this.lg=new Hp(e.lg),this.sm=new Hp(e.sm)}},jp=class extends bo{constructor(e){super(e)}},uc=class{cont;elems=[];constructor(e){e=e??{},this.cont=new jp(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=ar.getParsedElement(e);return t&&this.elems.push(t),t}},ix=Pe(Yn()),DE=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 pn(t))}},$p=class{layout;milestones;onlyLatestGift;constructor(e){this.layout=e.layout??ix.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new DE(t))??[],this.onlyLatestGift=e.onlyLatestGift}},Wp=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},Gp=class{id;alt;sources;items;durationMS;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.durationMS=e.durationMS,this.items=e.items?e.items.map(t=>new pn(t)):[]}},IE=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(IE||{}),TE=(e=>(e.SWIPER="SWIPER",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(TE||{}),zp=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(t=>new Gp(t))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}},RE=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===Un.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===Un.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===Un.EngagementContentType.SINGLE}},Hn=class kD extends RE{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;experiment;discountData=Cr({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=ke.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new uc(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(r=>new pn(r)),this.items=t.items?.map(r=>new Jn(r))??[],this.nonMutableItems=t.items?.map(r=>new Jn(r))??[],this.collections=t.collections?.map(r=>new Tp(r))??[],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 xp(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,this.experiment=t.experiment,t.progressBarConfig&&(this.progressBarConfig=new $p(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new Wp(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Jn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new zp(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===Un.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Un.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Un.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===Un.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===Un.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===Un.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===Un.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isBYOB(){return this.objective===Un.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===Un.EngagementObjective.SHOPPABLE_VIDEO}processPopup(t){let r=JSON.stringify(t),n=this.items[0],i={},s={};if(n){let l=n.selectedOrFirstVariant.value;i={name:n.name,id:n.mID,link:n.link,vID:l.mID,image:n.variantImage,price:ue.formatCurrency(l.price.d),comparePrice:ue.formatCurrency(l.price.cmp),quantity:n.quantity},s={quantity:l.quantity}}let o={productCount:ze.getCurrent().item_count},a=gn.render(r,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return n&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),n.variantImage??n.imageURL)),new Op(JSON.parse(a))}calculateDiscountData(t,r){let n=xE.ArrayUtils.sum(t,s=>s.selectedOrFirstVariant.value.price.d),i={actualPrice:n,discountAmount:0,discountPercentage:0,discountedPrice:n};if(!t?.length||!r||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if(So.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-xE.ArrayUtils.sum(t,s=>s.selectedOrFirstVariant.value.effectivePrice.value);else if([So.DiscountType.UNIQUE_FLAT_ITEMS,So.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===So.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===So.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((o,a)=>a.selectedOrFirstVariant.value.price.d-o.selectedOrFirstVariant.value.price.d);let s=t[t.length-1];s.selectedOrFirstVariant.value.effectivePrice.value=0,i.discountAmount=s.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 wt.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return wt.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[So.DiscountType.UNIQUE_FIXED_ITEMS,So.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(n=>kD.SWIPER_ELEMENTS.has(n.t));if(!t)return!1;if(t.t===62)return!0;let r=ir.get().isMobile()?"sm":"lg";return t.conf[r].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=ze.getCurrent();return{productCount:t.item_count,amount:ue.formatCurrency(t.total_price/100),originalAmount:ue.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,r,n=!1){let i=ke.get().getCurrentItem();t.forEach(s=>{let o=s.selectedOrFirstVariant.value,a=o.price;if(n&&s.mID===i.mID)o.effectivePrice.value=a.d;else{let l=a.d*r/100;o.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(t){if(!t)return{};let r={discountPercentage:ue.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice"].map(n=>{r[n]=ue.formatCurrency(t[n])}),r}},Xl=Pe(Yn()),lx=Pe(Z_()),ux=Pe(Sa()),dc=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 r=(new Date().getTime()-this.startTime.getTime())/1e3,n=w({eventName:e,duration:r},t);this.stopIntervals(),this.closeCallback&&this.closeCallback(n)}addInputField(e,t){this.inputFields.push({id:e,type:t,isValid:!1})}updateValidation(e,t){this.inputFields.forEach(r=>{if(r.id===e){r.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:r=100}=this.triggerData.manipulation.productQuantity;if(t>r)return C.error("Invalid range: min should be less than or equal to max."),e;if(e>=t&&e<=r)return e;let n=e%100;return n<t?t:n>r?r:n}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}},dx=Pe(ls()),ox=Pe($_()),Fs=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return xt.isShopify()}},rU=(0,ox.default)(fetch),iU={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(e,t,r)=>e>=k.API_CALL_MAX_ATTEMPTS?!1:!!(t!==null||r?.status&&r?.status>=500)},Mn=class ND{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new ND),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async r=>{C.log("Updated user profile"),await Bs.getInstance().storeAndPopulateAuthData(r)}).catch(r=>{C.error("Error saving user profile",r)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{C.log("Sent Order")}).catch(r=>{C.error("Error sending track order",r)})}generateDiscount(t){return this.post("/v1/event/generate-discount",t)}updateDeviceProps(t){this.put("/v1/device/update",t).then(()=>{C.log("Updated device property")}).catch(async r=>{C.error("Error saving device property",r)})}setAPIToken(t){this.apiToken=t??""}setFirstSeen(t){this.firstSeen=t?.toUTCString()??""}get(t){return this.requestBackend("GET",t)}post(t,r){return this.requestBackend("POST",t,r)}put(t,r){return this.requestBackend("PUT",t,r)}async requestBackend(t,r,n){if(!Fs.isECommerceApp()&&!Fs.getFlags().allowEvents)return C.log(`Rejecting ${t} ${r} as this is not e-commerce app`),Promise.reject();r.startsWith("http")||(r=Rn.apiURL+r);let i=this.getDefaultHeaders(),s="keepalive"in new Request("");if(n&&!s&&JSON.stringify(n).includes("CE App Background"))try{return this.performXMLHttpRequest(r,i,n)}catch(a){return bt.getInstance().captureException(a,{body:JSON.stringify(n)}),{}}let o={method:t,headers:i,keepalive:!0};return n&&(o.body=JSON.stringify(n)),this.request(r,o)}async request(t,r){let n=w(w({},iU),r),i=await rU(t,n);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(t,r,n){return new Promise((i,s)=>{let o=new XMLHttpRequest;o.open("POST",t,!0),r.forEach((a,l)=>{o.setRequestHeader(l,a)}),o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE)if(o.status>=200&&o.status<300)try{o.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(o.responseText)):s(new Error("Content-Type of response header is not json"))}catch(a){s(a)}else s(new Error(`Received status - ${o.status}(${o.statusText})`))},o.onerror=()=>{s(new Error("Network error occurred during the request."))},o.send(JSON.stringify(n))})}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),Rn.debug&&t.set("cooee-sdk-debug",String(1)),t}},fc=class{static sentryService=bt.getInstance();static httpApiService=Mn.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await ze.getCurrent().getNormalisedCart()).items.map(s=>s.mID);e.items=e.items.filter(s=>!i.includes(s.mID))}if(wt.get().currencyCount<=1)return e.items;let t=e.items.length,r=e.items.map(i=>this.updatedItem(i,e.engagementID)),n=(await Promise.all(r)).filter(i=>i!=null);if(t&&!n.length){let i="Failed to fetch any product from Ajax API",s=new Le(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Ue.getInstance().sendEvent(s),new Error(i)}if(e.isCartRecovery()){let i=ze.getCurrent().items,s=[];for(let o of n)for(let a of o.vars){if(!a.isAvailable)continue;let l=i.find(d=>d.variant_id.toString()===a.mID);if(!l)continue;let c=new Jn(o);c.name=l.title;let h=new yi(a);h.name=l.variant_title,h.price.d=l.discounted_price/100,c.variants=[h],s.push(c)}return s}return n}static async updatedItem(e,t){let r=e,n,i=`/products/${r.slug}.js`;try{n=await this.httpApiService.request(i)}catch(o){return C.error(`Failed to fetch ${i}`,o),o instanceof Response?this.sentryService.captureMessage(`Shopify product fetch failed ${o.status}`,"error",{item:r,path:i},{"engagement.id":t}):this.sentryService.captureException(o,{item:r,path:i},{"engagement.id":t}),null}if(!n)return C.error("Item not found after AJAX call for:",r),null;r.name=n.title,r.tags=n.tags;let s=r.selectedOrFirstVariant.value;return r.vars.map(o=>{let a=n.variants.find(l=>l.id===+o.mID);o.name=a.title,o.isAvailable=a.available,o.price.d=a.price?a.price/100:a.price,o.price.effective=o.price.d,o.price.cmp=a.compare_at_price?a.compare_at_price/100:a.compare_at_price,+s.mID===a.id&&(s.effectivePrice.value=o.price.d)}),r}},pc=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 r="backdrop-filter",n="-webkit-"+r,i=`blur(${e.glossy.radius}px)`;if(!CSS.supports(n,i)&&!CSS.supports(r,i))return{background:e.glossy.fallback.rgba};if(t[n]=i,t[r]=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 r=(e.img.a??0)/100;t.background=`linear-gradient(rgba(0, 0, 0, ${r}), rgba(0, 0, 0, ${r})),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,r){if(r??={},e.type==="LINEAR"){let n=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(n+=`, ${e.c3}`),n+=")",r[t]=n}return r}getColourStyles(e,t="color",r){return r??={},e?e.grad?this.getGradientStyles(e.grad,t,r):(e.hex&&(r[t]=e.rgba),r):r}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}},yt=class extends gi{stylesConverter=new pc(1);renderer=ir.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new Do(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(re(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:r}=e;switch(e.op){case"eq":return t===r;case"gt":return+t>+r;case"gte":return+t>=+r;case"lt":return+t<+r;case"lte":return+t<=+r;case"ne":return t!==r;case"null":return t==null;case"empty":return t.trim()==="";case"in":return new RegExp(`\\b${r}\\b`).test(t);case"nin":return!new RegExp(`\\b${r}\\b`).test(t);default:return C.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,t){e.stopPropagation(),await this.clickExecutor.execute(t)}},oU=0,Nie=Array.isArray;function G(e,t,r,n,i,s){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--oU,__i:-1,__u:0,__source:i,__self:s};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return it.vnode&&it.vnode(c),c}var cr=class extends yt{componentDidMount(){this.setState(()=>({text:this.props.element.text})),Sn(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=""),G("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:G("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()},r=gn.render(JSON.stringify(this.props.element),t),n=new _n(JSON.parse(r));if(!this.matchWhenCondition(n.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:n.text}))}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;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"}}},Vs=class extends cr{render(){return G("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:e=>this.onClick(e,{item:this.props.item}),children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return re(w({},super.getComponentStyles()),{cursor:"pointer"})}},NE=class extends gi{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{children:this.props.time}),G("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{style:this.getTimeLabelStyle(),children:this.props.label}),G("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}},jl=class extends cr{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return G("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>G(NE,{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))})}},$l=class extends yt{componentDidMount(){Sn(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return G("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:G("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 Dn;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return re(w({},this.getTypoStyles()),{display:"flex"})}},sx=Pe(Yn()),zi=class extends yt{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 G("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(e){this.props.element.clc?.at===sx.ClickActionType.ADD_TO_CART&&this.props.triggerContext.triggerData.items[0]&&this.onClick(e,{item:this.props.triggerContext.triggerData.items[0]}),this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex,cursor:this.props.element.clc?.at?"pointer":"auto"};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}},qi=class extends yt{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(Io,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new sc,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}},Wl=class extends qi{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(hc,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},Gl=class extends yt{render(){return G("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(){Sn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;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(G("option",{value:"",selected:!t.selectedSellingPlan,children:"One time purchase"}));for(let r of t.sellingPlans??[])e.push(G("option",{value:r.mID,selected:r.isSelected,children:r.name}));return e}onChange(e){let t=e.target.value;t?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(r=>r.mID===t):this.props.selectedVariant.selectedSellingPlan.value=void 0}},ax=Pe(Lf()),zl=class extends yt{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),gn.escape=ax.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),t=this.getRating();return t||(e.display="none",t=""),G("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:t}})}getRating(){let e=this.props.element.fullStar,t=this.props.element.halfStart,r={size:this.props.element.iconSize,color:this.props.element.c.hex};e=gn.render(e,{svg:r}),t=gn.render(t,{svg:r});let n=this.props.review;if(!n?.rating)return"";let i="";if(this.props.element.showSingleStar)i=e;else{let s=5,o=`${n.rating}`.split(".");for(let a=0;a<+o[0];a++)i+=e,s--;o[1]&&(i+=t,s--);for(let a=0;a<s;a++)i+=e.replace(this.colorRegex,'fill="#f1f1f1')}return i}getComponentStyles(){return{display:"flex",alignItems:"center"}}},ql=class extends yt{render(){return G("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(){Sn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;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(G("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(r=>r.mID===t)}},hc=class extends yt{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 G(Wl,{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()?G($l,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let t=e,r=this.props.item,n=r.variantImage??r.imageURL,i=r.variantSecondaryImage??r.secondaryImageURL;t.lg=t.sm={src:n,name:r.name,secondarySrc:i};let s=G(zi,{element:t,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?s:G("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 t=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:G(ql,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?G(Gl,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?G(zl,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?G(Vs,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):G(Io,{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=G(cr,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?t:G("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"}))}},cx=Pe(dp()),Us=class extends yt{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=gn.render(e,this.getProductData());if(this.productElement=new Co(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return G("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:G(hc,{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,r=this.props.item.name,n=this.props.item.category,i=ue.formatCurrency(t.d,!0),s=this.props.item.variantImage??this.props.item.imageURL,o=this.props.item.meta,a=this.props.item.tags?.join(",")??"",l=this.props.item.reviews?.rating,c=this.props.item.reviews?.totalReviews,h=t.cmp&&t.cmp>t.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,f={name:r,price:i,quantity:d,image_url:s,meta:o,category:n,rating:l,reviews:c,tags:a},g=e.effectivePrice.value!==t.d;g&&(f.effective_price=ue.formatCurrency(e.effectivePrice.value));let m=this.props.triggerContext.triggerData.discount.type===cx.DiscountType.BXGY;if(!g&&m&&(f.effective_price=ue.formatCurrency(e.effectivePrice.value),f.price=""),h){f.compare_price=ue.formatCurrency(t.cmp);let I=t.cmp-t.d;f.discount_percent=(I/t.cmp*100).toFixed(0),f.discount_price=ue.formatCurrency(I)}let b={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:f,variant:b,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function qp(){let e="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(t=>{if(window.Swiper){t();return}if(Array.from(document.scripts).some(n=>n.src.includes(e))){let n=setInterval(()=>{window.Swiper&&(clearInterval(n),t())},50)}let r=document.createElement("script");r.src=e,r.onload=()=>{t()},r.onerror=()=>{r.remove()},document.body.appendChild(r)})}function Yp(e,t){if(!e||!window.Swiper)return;let r=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:(n,i)=>`
43
+ `)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return N2(e,t);if(e===void 0)return null;if(e instanceof Date||c2(e)){var h=e.getTime(),d=h>-1&&h<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:LI(e)}:t.relaxed&&d?{$date:LI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=YI&&e<=qI,g=e>=ZI&&e<=KI;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||a2(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var I=new Sl(e.source,m);return I.toExtendedJSON(t)}return e!=null&&typeof e=="object"?M2(e,t):e}var A2={Binary:function(e){return new Cs(e.value(),e.sub_type)},Code:function(e){return new zf(e.code,e.scope)},DBRef:function(e){return new Cl(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new f_(e.bytes)},Double:function(e){return new qf(e.value)},Int32:function(e){return new Yf(e.value)},Long:function(e){return le.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 p_},MinKey:function(){return new h_},ObjectID:function(e){return new cn(e)},ObjectId:function(e){return new cn(e)},BSONRegExp:function(e){return new Sl(e.pattern,e.options)},Symbol:function(e){return new m_(e.value)},Timestamp:function(e){return zI.fromBits(e.low,e.high)}};function M2(e,t){if(e==null||typeof e!="object")throw new bs("not an object instance");var r=e._bsontype;if(typeof r>"u"){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=vo(e[i],t);i==="__proto__"?Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):n[i]=s}finally{t.seenObjects.pop()}}return n}else if(x2(e)){var o=e;if(typeof o.toExtendedJSON!="function"){var a=A2[e._bsontype];if(!a)throw new jt("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return r==="Code"&&o.scope?o=new zf(o.code,vo(o.scope,t)):r==="DBRef"&&o.oid&&(o=new Cl(vo(o.collection,t),vo(o.oid,t),vo(o.db,t),vo(o.fields,t))),o.toExtendedJSON(t)}else throw new bs("_bsontype must be a string, but was: "+typeof r)}var FI;(function(e){function t(s,o){var a=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(s,function(l,c){if(l.indexOf("\0")!==-1)throw new bs("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return XI(c,a)})}e.parse=t;function r(s,o,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(l=o,o=void 0,a=0);var c=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),h=vo(s,c);return JSON.stringify(h,o,a)}e.stringify=r;function n(s,o){return o=o||{},JSON.parse(r(s,o))}e.serialize=n;function i(s,o){return o=o||{},t(JSON.stringify(s),o)}e.deserialize=i})(FI||(FI={}));var BI,VI=HI();VI.Map?BI=VI.Map:BI=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var r=0;r<t.length;r++)if(t[r]!=null){var n=t[r],i=n[0],s=n[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var r=this._values[t];return r==null?!1:(delete this._values[t],this._keys.splice(r.i,1),!0)},e.prototype.entries=function(){var t=this,r=0;return{next:function(){var n=t._keys[r++];return{value:n!==void 0?[n,t._values[n].v]:void 0,done:n===void 0}}}},e.prototype.forEach=function(t,r){r=r||this;for(var n=0;n<this._keys.length;n++){var i=this._keys[n];t.call(r,this._values[i].v,i,r)}},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,r=0;return{next:function(){var n=t._keys[r++];return{value:n!==void 0?n:void 0,done:n===void 0}}}},e.prototype.set=function(t,r){return this._values[t]?(this._values[t].v=r,this):(this._keys.push(t),this._values[t]={v:r,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,r=0;return{next:function(){var n=t._keys[r++];return{value:n!==void 0?t._values[n].v:void 0,done:n===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var vK=le.fromNumber(u2),yK=le.fromNumber(d2),c_=new Uint8Array(8),_K=new DataView(c_.buffer,c_.byteOffset,c_.byteLength),O2=1024*1024*17,EK=ot.alloc(O2),yo=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}},Le=class{constructor(e,t={},r,n){this.name=e,this.properties=t,this.id=n?new cn(n):new cn,this.occurred=new Date,r&&(this.trigger=new yo(r)),this.newEvent=!n}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Il=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}},Ua=class extends Il{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,r,n,i){super(),this.component=e,this.viewContainerRef=t,this.injector=r,this.projectableNodes=i}},Ha=class extends Il{templateRef;viewContainerRef;context;injector;constructor(e,t,r,n){super(),this.templateRef=e,this.viewContainerRef=t,this.context=r,this.injector=n}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()}},g_=class extends Il{element;constructor(e){super(),this.element=e instanceof Ot?e.nativeElement:e}},ja=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Ua)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Ha)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof g_)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)}},Kf=class extends ja{outletElement;_appRef;_defaultInjector;_document;constructor(e,t,r,n,i){super(),this.outletElement=e,this._appRef=r,this._defaultInjector=n,this._document=i}attachComponentPortal(e){let t;if(e.viewContainerRef){let r=e.injector||e.viewContainerRef.injector,n=r.get(Ai,null,{optional:!0})||void 0;t=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:r,ngModuleRef:n,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let r=this._appRef,n=e.injector||this._defaultInjector||vt.NULL,i=n.get(Gn,r.injector);t=Hd(e.component,{elementInjector:n,environmentInjector:i,projectableNodes:e.projectableNodes||void 0}),r.attachView(t.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=e,t}attachTemplatePortal(e){let t=e.viewContainerRef,r=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return r.rootNodes.forEach(n=>this.outletElement.appendChild(n)),r.detectChanges(),this.setDisposeFn(()=>{let n=t.indexOf(r);n!==-1&&t.remove(n)}),this._attachedPortal=e,r}attachDomPortal=e=>{let t=e.element;t.parentNode;let r=this._document.createComment("dom-portal");t.parentNode.insertBefore(r,t),this.outletElement.appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(t,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},v_=(()=>{class e extends ja{_moduleRef=O(Ai,{optional:!0});_document=O(Qe);_viewContainerRef=O(kr);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(r){this.hasAttached()&&!r&&!this._isInitialized||(this.hasAttached()&&super.detach(),r&&super.attach(r),this._attachedPortal=r||null)}attached=new We;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(r){r.setAttachedHost(this);let n=r.viewContainerRef!=null?r.viewContainerRef:this._viewContainerRef,i=n.createComponent(r.component,{index:n.length,injector:r.injector||n.injector,projectableNodes:r.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return n!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=r,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(r){r.setAttachedHost(this);let n=this._viewContainerRef.createEmbeddedView(r.templateRef,r.context,{injector:r.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=r,this._attachedRef=n,this.attached.emit(n),n}attachDomPortal=r=>{let n=r.element;n.parentNode;let i=this._document.createComment("dom-portal");r.setAttachedHost(this),n.parentNode.insertBefore(i,n),this._getRootNode().appendChild(n),this._attachedPortal=r,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(n,i)})};_getRootNode(){let r=this._viewContainerRef.element.nativeElement;return r.nodeType===r.ELEMENT_NODE?r:r.parentNode}static \u0275fac=function(r){return new(r||e)};static \u0275dir=Lr({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[fo]})}return e})();function Zf(e){return e.buttons===0||e.detail===0}function Xf(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 y_;function P2(){if(y_==null){let e=typeof document<"u"?document.head:null;y_=!!(e&&(e.createShadowRoot||e.attachShadow))}return y_}function $a(e){if(P2()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Jf(){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 Kn(e){return e.composedPath?e.composedPath()[0]:e.target}function Cn(e,t,r,n,i){let s=parseInt(_v.major),o=parseInt(_v.minor);return s>19||s===19&&o>0||s===0&&o===0?e.listen(t,r,n,i):(t.addEventListener(r,n,i),()=>{t.removeEventListener(r,n,i)})}var __;try{__=typeof Intl<"u"&&Intl.v8BreakIterator}catch{__=!1}var Zn=(()=>{class e{_platformId=O(Qo);isBrowser=this._platformId?aD(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||__)&&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||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Tl;function k2(){if(Tl==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Tl=!0}))}finally{Tl=Tl||!1}return Tl}function JI(e){return k2()?e:!!e.capture}function E_(e,t=0){return L2(e)?Number(e):arguments.length===2?t:0}function L2(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Xn(e){return e instanceof Ot?e.nativeElement:e}var F2=new he("cdk-input-modality-detector-options"),B2={ignoreKeys:[18,17,224,91,16]},QI=650,w_={passive:!0,capture:!0},V2=(()=>{class e{_platform=O(Zn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Tr(null);_options;_lastTouchMs=0;_onKeydown=r=>{this._options?.ignoreKeys?.some(n=>n===r.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Kn(r))};_onMousedown=r=>{Date.now()-this._lastTouchMs<QI||(this._modality.next(Zf(r)?"keyboard":"mouse"),this._mostRecentTarget=Kn(r))};_onTouchstart=r=>{if(Xf(r)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Kn(r)};constructor(){let r=O(Ve),n=O(Qe),i=O(F2,{optional:!0});if(this._options=w(w({},B2),i),this.modalityDetected=this._modality.pipe(sm(1)),this.modalityChanged=this.modalityDetected.pipe(Fu()),this._platform.isBrowser){let s=O(dn).createRenderer(null,null);this._listenerCleanups=r.runOutsideAngular(()=>[Cn(s,n,"keydown",this._onKeydown,w_),Cn(s,n,"mousedown",this._onMousedown,w_),Cn(s,n,"touchstart",this._onTouchstart,w_)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(r=>r())}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ep=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(ep||{}),U2=new he("cdk-focus-monitor-default-options"),Qf=JI({passive:!0,capture:!0}),eT=(()=>{class e{_ngZone=O(Ve);_platform=O(Zn);_inputModalityDetector=O(V2);_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=O(Qe,{optional:!0});_stopInputModalityDetector=new ie;constructor(){let r=O(U2,{optional:!0});this._detectionMode=r?.detectionMode||ep.IMMEDIATE}_rootNodeFocusAndBlurListener=r=>{let n=Kn(r);for(let i=n;i;i=i.parentElement)r.type==="focus"?this._onFocus(r,i):this._onBlur(r,i)};monitor(r,n=!1){let i=Xn(r);if(!this._platform.isBrowser||i.nodeType!==1)return Fo();let s=$a(i)||this._getDocument(),o=this._elementInfo.get(i);if(o)return n&&(o.checkChildren=!0),o.subject;let a={checkChildren:n,subject:new ie,rootNode:s};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(r){let n=Xn(r),i=this._elementInfo.get(n);i&&(i.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(i))}focusVia(r,n,i){let s=Xn(r),o=this._getDocument().activeElement;s===o?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,n,l)):(this._setOrigin(n),typeof s.focus=="function"&&s.focus(i))}ngOnDestroy(){this._elementInfo.forEach((r,n)=>this.stopMonitoring(n))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(r){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(r)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:r&&this._isLastInteractionFromInputLabel(r)?"mouse":"program"}_shouldBeAttributedToTouch(r){return this._detectionMode===ep.EVENTUAL||!!r?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(r,n){r.classList.toggle("cdk-focused",!!n),r.classList.toggle("cdk-touch-focused",n==="touch"),r.classList.toggle("cdk-keyboard-focused",n==="keyboard"),r.classList.toggle("cdk-mouse-focused",n==="mouse"),r.classList.toggle("cdk-program-focused",n==="program")}_setOrigin(r,n=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=r,this._originFromTouchInteraction=r==="touch"&&n,this._detectionMode===ep.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?QI:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(r,n){let i=this._elementInfo.get(n),s=Kn(r);!i||!i.checkChildren&&n!==s||this._originChanged(n,this._getFocusOrigin(s),i)}_onBlur(r,n){let i=this._elementInfo.get(n);!i||i.checkChildren&&r.relatedTarget instanceof Node&&n.contains(r.relatedTarget)||(this._setClasses(n),this._emitOrigin(i,null))}_emitOrigin(r,n){r.subject.observers.length&&this._ngZone.run(()=>r.subject.next(n))}_registerGlobalListeners(r){if(!this._platform.isBrowser)return;let n=r.rootNode,i=this._rootNodeFocusListenerCount.get(n)||0;i||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,Qf),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,Qf)}),this._rootNodeFocusListenerCount.set(n,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Wr(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(r){let n=r.rootNode;if(this._rootNodeFocusListenerCount.has(n)){let i=this._rootNodeFocusListenerCount.get(n);i>1?this._rootNodeFocusListenerCount.set(n,i-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Qf),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Qf),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(r,n,i){this._setClasses(r,n),this._emitOrigin(i,n),this._lastFocusOrigin=n}_getClosestElementsInfo(r){let n=[];return this._elementInfo.forEach((i,s)=>{(s===r||i.checkChildren&&s.contains(r))&&n.push([s,i])}),n}_isLastInteractionFromInputLabel(r){let{_mostRecentTarget:n,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!n||n===r||r.nodeName!=="INPUT"&&r.nodeName!=="TEXTAREA"||r.disabled)return!1;let s=r.labels;if(s){for(let o=0;o<s.length;o++)if(s[o].contains(n))return!0}return!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),tp=new WeakMap,Ss=(()=>{class e{_appRef;_injector=O(vt);_environmentInjector=O(Gn);load(r){let n=this._appRef=this._appRef||this._injector.get(pr),i=tp.get(n);i||(i={loaders:new Set,refs:[]},tp.set(n,i),n.onDestroy(()=>{tp.get(n)?.refs.forEach(s=>s.destroy()),tp.delete(n)})),i.loaders.has(r)||(i.loaders.add(r),i.refs.push(Hd(r,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),tT=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ft({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,n){},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 b_(e){return Array.isArray(e)?e:[e]}var S_=(()=>{class e{_platform=O(Zn);constructor(){}isDisabled(r){return r.hasAttribute("disabled")}isVisible(r){return j2(r)&&getComputedStyle(r).visibility==="visible"}isTabbable(r){if(!this._platform.isBrowser)return!1;let n=H2(Z2(r));if(n&&(nT(n)===-1||!this.isVisible(n)))return!1;let i=r.nodeName.toLowerCase(),s=nT(r);return r.hasAttribute("contenteditable")?s!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Y2(r)?!1:i==="audio"?r.hasAttribute("controls")?s!==-1:!1:i==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||r.hasAttribute("controls"):r.tabIndex>=0}isFocusable(r,n){return K2(r)&&!this.isDisabled(r)&&(n?.ignoreVisibility||this.isVisible(r))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function H2(e){try{return e.frameElement}catch{return null}}function j2(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function $2(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function W2(e){return z2(e)&&e.type=="hidden"}function G2(e){return q2(e)&&e.hasAttribute("href")}function z2(e){return e.nodeName.toLowerCase()=="input"}function q2(e){return e.nodeName.toLowerCase()=="a"}function rT(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function nT(e){if(!rT(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function Y2(e){let t=e.nodeName.toLowerCase(),r=t==="input"&&e.type;return r==="text"||r==="password"||t==="select"||t==="textarea"}function K2(e){return W2(e)?!1:$2(e)||G2(e)||e.hasAttribute("contenteditable")||rT(e)}function Z2(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var C_=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,r,n,i=!1,s){this._element=e,this._checker=t,this._ngZone=r,this._document=n,this._injector=s,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 r=this._getFirstTabbableElement(t);return r?.focus(e),!!r}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 r=0;r<t.length;r++){let n=t[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[r]):null;if(n)return n}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let r=t.length-1;r>=0;r--){let n=t[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[r]):null;if(n)return n}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?Xr(e,{injector:this._injector}):setTimeout(e)}},iT=(()=>{class e{_checker=O(S_);_ngZone=O(Ve);_document=O(Qe);_injector=O(vt);constructor(){O(Ss).load(tT)}create(r,n=!1){return new C_(r,this._checker,this._ngZone,this._document,n,this._injector)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function D_(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function qt(e){return e==null?"":typeof e=="string"?e:`${e}px`}var X2=new he("cdk-dir-doc",{providedIn:"root",factory:J2});function J2(){return O(Qe)}var Q2=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function eV(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?Q2.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Ds=(()=>{class e{value="ltr";change=new We;constructor(){let r=O(X2,{optional:!0});if(r){let n=r.body?r.body.dir:null,i=r.documentElement?r.documentElement.dir:null;this.value=eV(n||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Is;function oT(){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 tV=20,I_=(()=>{class e{_ngZone=O(Ve);_platform=O(Zn);_renderer=O(dn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new ie;_scrolledCount=0;scrollContainers=new Map;register(r){this.scrollContainers.has(r)||this.scrollContainers.set(r,r.elementScrolled().subscribe(()=>this._scrolled.next(r)))}deregister(r){let n=this.scrollContainers.get(r);n&&(n.unsubscribe(),this.scrollContainers.delete(r))}scrolled(r=tV){return this._platform.isBrowser?new nt(n=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=r>0?this._scrolled.pipe(Lu(r)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):Fo()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((r,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(r,n){let i=this.getAncestorScrollContainers(r);return this.scrolled(n).pipe(Vo(s=>!s||i.indexOf(s)>-1))}getAncestorScrollContainers(r){let n=[];return this.scrollContainers.forEach((i,s)=>{this._scrollableContainsElement(s,r)&&n.push(s)}),n}_scrollableContainsElement(r,n){let i=Xn(n),s=r.getElementRef().nativeElement;do if(i==s)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),nV=20,xl=(()=>{class e{_platform=O(Zn);_listeners;_viewportSize;_change=new ie;_document=O(Qe,{optional:!0});constructor(){let r=O(Ve),n=O(dn).createRenderer(null,null);r.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=s=>this._change.next(s);this._listeners=[n.listen("window","resize",i),n.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(r=>r()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let r={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),r}getViewportRect(){let r=this.getViewportScrollPosition(),{width:n,height:i}=this.getViewportSize();return{top:r.top,left:r.left,bottom:r.top+i,right:r.left+n,height:i,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let r=this._document,n=this._getWindow(),i=r.documentElement,s=i.getBoundingClientRect(),o=-s.top||r.body.scrollTop||n.scrollY||i.scrollTop||0,a=-s.left||r.body.scrollLeft||n.scrollX||i.scrollLeft||0;return{top:o,left:a}}change(r=nV){return r>0?this._change.pipe(Lu(r)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let r=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:r.innerWidth,height:r.innerHeight}:{width:0,height:0}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),T_={},np=(()=>{class e{_appId=O(tl);getId(r){return this._appId!=="ng"&&(r+=this._appId),T_.hasOwnProperty(r)||(T_[r]=0),`${r}${T_[r]++}`}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function sT(e,...t){return t.length?t.some(r=>e[r]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var aT=oT(),x_=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=qt(-this._previousScrollPosition.left),e.style.top=qt(-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,r=e.style,n=t.style,i=r.scrollBehavior||"",s=n.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),aT&&(r.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),aT&&(r.scrollBehavior=i,n.scrollBehavior=s)}}_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}},R_=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,t,r,n){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=r,this._config=n}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Vo(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())}},rp=class{enable(){}disable(){}attach(){}};function N_(e,t){return t.some(r=>{let n=e.bottom<r.top,i=e.top>r.bottom,s=e.right<r.left,o=e.left>r.right;return n||i||s||o})}function cT(e,t){return t.some(r=>{let n=e.top<r.top,i=e.bottom>r.bottom,s=e.left<r.left,o=e.right>r.right;return n||i||s||o})}var A_=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,t,r,n){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=r,this._config=n}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:r,height:n}=this._viewportRuler.getViewportSize();N_(t,[{width:r,height:n,bottom:n,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}},iV=(()=>{class e{_scrollDispatcher=O(I_);_viewportRuler=O(xl);_ngZone=O(Ve);_document=O(Qe);constructor(){}noop=()=>new rp;close=r=>new R_(this._scrollDispatcher,this._ngZone,this._viewportRuler,r);block=()=>new x_(this._viewportRuler,this._document);reposition=r=>new A_(this._scrollDispatcher,this._viewportRuler,this._ngZone,r);static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Rl=class{positionStrategy;scrollStrategy=new rp;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 r of t)e[r]!==void 0&&(this[r]=e[r])}}},M_=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},hT=(()=>{class e{_attachedOverlays=[];_document=O(Qe);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(r){this.remove(r),this._attachedOverlays.push(r)}remove(r){let n=this._attachedOverlays.indexOf(r);n>-1&&this._attachedOverlays.splice(n,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),oV=(()=>{class e extends hT{_ngZone=O(Ve);_renderer=O(dn).createRenderer(null,null);_cleanupKeydown;add(r){super.add(r),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=r=>{let n=this._attachedOverlays;for(let i=n.length-1;i>-1;i--)if(n[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>n[i]._keydownEvents.next(r));break}};static \u0275fac=(()=>{let r;return function(n){return(r||(r=Id(e)))(n||e)}})();static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),sV=(()=>{class e extends hT{_platform=O(Zn);_ngZone=O(Ve);_renderer=O(dn).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(r){if(super.add(r),!this._isAttached){let n=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Cn(this._renderer,n,"pointerdown",this._pointerDownListener,i),Cn(this._renderer,n,"click",this._clickListener,i),Cn(this._renderer,n,"auxclick",this._clickListener,i),Cn(this._renderer,n,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(r=>r()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=r=>{this._pointerDownEventTarget=Kn(r)};_clickListener=r=>{let n=Kn(r),i=r.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:n;this._pointerDownEventTarget=null;let s=this._attachedOverlays.slice();for(let o=s.length-1;o>-1;o--){let a=s[o];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(lT(a.overlayElement,n)||lT(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(r)):l.next(r)}};static \u0275fac=(()=>{let r;return function(n){return(r||(r=Id(e)))(n||e)}})();static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function lT(e,t){let r=typeof ShadowRoot<"u"&&ShadowRoot,n=t;for(;n;){if(n===e)return!0;n=r&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var mT=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ft({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,n){},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})(),ip=(()=>{class e{_platform=O(Zn);_containerElement;_document=O(Qe);_styleLoader=O(Ss);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let r="cdk-overlay-container";if(this._platform.isBrowser||D_()){let i=this._document.querySelectorAll(`.${r}[platform="server"], .${r}[platform="test"]`);for(let s=0;s<i.length;s++)i[s].remove()}let n=this._document.createElement("div");n.classList.add(r),D_()?n.setAttribute("platform","test"):this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}_loadStyles(){this._styleLoader.load(mT)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),O_=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,t,r,n){this._renderer=t,this._ngZone=r,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",n)}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()}},Wa=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new ie;_attachments=new ie;_detachments=new ie;_positionStrategy;_scrollStrategy;_locationChanges=dt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new ie;_outsidePointerEvents=new ie;_renders=new ie;_afterRenderRef;_afterNextRenderRef;constructor(e,t,r,n,i,s,o,a,l,c=!1,h,d){this._portalOutlet=e,this._host=t,this._pane=r,this._config=n,this._ngZone=i,this._keyboardDispatcher=s,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=c,this._injector=h,this._renderer=d,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy,this._afterRenderRef=bv(()=>Zg(()=>{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=Xr(()=>{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=re(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=qt(this._config.width),e.height=qt(this._config.height),e.minWidth=qt(this._config.minWidth),e.minHeight=qt(this._config.minHeight),e.maxWidth=qt(this._config.maxWidth),e.maxHeight=qt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new O_(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,r){let n=b_(t||[]).filter(i=>!!i);n.length&&(r?e.classList.add(...n):e.classList.remove(...n))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(Wr(eo(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?.()}},uT="cdk-overlay-connected-position-bounding-box",aV=/([A-Za-z%]+)$/,P_=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 ie;_resizeSubscription=dt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,t,r,n,i){this._viewportRuler=t,this._document=r,this._platform=n,this._overlayContainer=i,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(uT),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,r=this._viewportRect,n=this._containerRect,i=[],s;for(let o of this._preferredPositions){let a=this._getOriginPoint(e,n,o),l=this._getOverlayPoint(a,t,o),c=this._getOverlayFit(l,t,r,o);if(c.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(o,a);return}if(this._canFitWithFlexibleDimensions(c,l,r)){i.push({position:o,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,o)});continue}(!s||s.overlayFit.visibleArea<c.visibleArea)&&(s={overlayFit:c,overlayPoint:l,originPoint:a,position:o,overlayRect:t})}if(i.length){let o=null,a=-1;for(let l of i){let c=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);c>a&&(a=c,o=l)}this._isPushed=!1,this._applyPosition(o.position,o.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&&Ts(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(uT),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,r){let n;if(r.originX=="center")n=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,o=this._isRtl()?e.left:e.right;n=r.originX=="start"?s:o}t.left<0&&(n-=t.left);let i;return r.originY=="center"?i=e.top+e.height/2:i=r.originY=="top"?e.top:e.bottom,t.top<0&&(i-=t.top),{x:n,y:i}}_getOverlayPoint(e,t,r){let n;r.overlayX=="center"?n=-t.width/2:r.overlayX==="start"?n=this._isRtl()?-t.width:0:n=this._isRtl()?0:-t.width;let i;return r.overlayY=="center"?i=-t.height/2:i=r.overlayY=="top"?0:-t.height,{x:e.x+n,y:e.y+i}}_getOverlayFit(e,t,r,n){let i=fT(t),{x:s,y:o}=e,a=this._getOffset(n,"x"),l=this._getOffset(n,"y");a&&(s+=a),l&&(o+=l);let c=0-s,h=s+i.width-r.width,d=0-o,f=o+i.height-r.height,g=this._subtractOverflows(i.width,c,h),m=this._subtractOverflows(i.height,d,f),b=g*m;return{visibleArea:b,isCompletelyWithinViewport:i.width*i.height===b,fitsInViewportVertically:m===i.height,fitsInViewportHorizontally:g==i.width}}_canFitWithFlexibleDimensions(e,t,r){if(this._hasFlexibleDimensions){let n=r.bottom-t.y,i=r.right-t.x,s=dT(this._overlayRef.getConfig().minHeight),o=dT(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||s!=null&&s<=n,l=e.fitsInViewportHorizontally||o!=null&&o<=i;return a&&l}return!1}_pushOverlayOnScreen(e,t,r){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let n=fT(t),i=this._viewportRect,s=Math.max(e.x+n.width-i.width,0),o=Math.max(e.y+n.height-i.height,0),a=Math.max(i.top-r.top-e.y,0),l=Math.max(i.left-r.left-e.x,0),c=0,h=0;return n.width<=i.width?c=l||-s:c=e.x<this._viewportMargin?i.left-r.left-e.x:0,n.height<=i.height?h=a||-o:h=e.y<this._viewportMargin?i.top-r.top-e.y:0,this._previousPushAmount={x:c,y:h},{x:e.x+c,y:e.y+h}}_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 r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!cV(this._lastScrollVisibility,r)){let n=new M_(e,r);this._positionChanges.next(n)}this._lastScrollVisibility=r}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),r,n=e.overlayY;e.overlayX==="center"?r="center":this._isRtl()?r=e.overlayX==="start"?"right":"left":r=e.overlayX==="start"?"left":"right";for(let i=0;i<t.length;i++)t[i].style.transformOrigin=`${r} ${n}`}_calculateBoundingBoxRect(e,t){let r=this._viewportRect,n=this._isRtl(),i,s,o;if(t.overlayY==="top")s=e.y,i=r.height-s+this._viewportMargin;else if(t.overlayY==="bottom")o=r.height-e.y+this._viewportMargin*2,i=r.height-o+this._viewportMargin;else{let f=Math.min(r.bottom-e.y+r.top,e.y),g=this._lastBoundingBoxSize.height;i=f*2,s=e.y-f,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-g/2)}let a=t.overlayX==="start"&&!n||t.overlayX==="end"&&n,l=t.overlayX==="end"&&!n||t.overlayX==="start"&&n,c,h,d;if(l)d=r.width-e.x+this._viewportMargin*2,c=e.x-this._viewportMargin;else if(a)h=e.x,c=r.right-e.x;else{let f=Math.min(r.right-e.x+r.left,e.x),g=this._lastBoundingBoxSize.width;c=f*2,h=e.x-f,c>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-g/2)}return{top:s,left:h,bottom:o,right:d,width:c,height:i}}_setBoundingBoxStyles(e,t){let r=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;n.height=qt(r.height),n.top=qt(r.top),n.bottom=qt(r.bottom),n.width=qt(r.width),n.left=qt(r.left),n.right=qt(r.right),t.overlayX==="center"?n.alignItems="center":n.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?n.justifyContent="center":n.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(n.maxHeight=qt(i)),s&&(n.maxWidth=qt(s))}this._lastBoundingBoxSize=r,Ts(this._boundingBox.style,n)}_resetBoundingBoxStyles(){Ts(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ts(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let r={},n=this._hasExactPosition(),i=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(n){let c=this._viewportRuler.getViewportScrollPosition();Ts(r,this._getExactOverlayY(t,e,c)),Ts(r,this._getExactOverlayX(t,e,c))}else r.position="static";let o="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),r.transform=o.trim(),s.maxHeight&&(n?r.maxHeight=qt(s.maxHeight):i&&(r.maxHeight="")),s.maxWidth&&(n?r.maxWidth=qt(s.maxWidth):i&&(r.maxWidth="")),Ts(this._pane.style,r)}_getExactOverlayY(e,t,r){let n={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,r)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;n.bottom=`${s-(i.y+this._overlayRect.height)}px`}else n.top=qt(i.y);return n}_getExactOverlayX(e,t,r){let n={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,r));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let o=this._document.documentElement.clientWidth;n.right=`${o-(i.x+this._overlayRect.width)}px`}else n.left=qt(i.x);return n}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),r=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:cT(e,r),isOriginOutsideView:N_(e,r),isOverlayClipped:cT(t,r),isOverlayOutsideView:N_(t,r)}}_subtractOverflows(e,...t){return t.reduce((r,n)=>r-Math.max(n,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=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+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&&b_(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 Ot)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,r=e.height||0;return{top:e.y,bottom:e.y+r,left:e.x,right:e.x+t,height:r,width:t}}};function Ts(e,t){for(let r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function dT(e){if(typeof e!="number"&&e!=null){let[t,r]=e.split(aV);return!r||r==="px"?parseFloat(t):null}return e||null}function fT(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 cV(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var pT="cdk-global-overlay-wrapper",k_=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(pT),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,r=this._overlayRef.getConfig(),{width:n,height:i,maxWidth:s,maxHeight:o}=r,a=(n==="100%"||n==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(i==="100%"||i==="100vh")&&(!o||o==="100%"||o==="100vh"),c=this._xPosition,h=this._xOffset,d=this._overlayRef.getConfig().direction==="rtl",f="",g="",m="";a?m="flex-start":c==="center"?(m="center",d?g=h:f=h):d?c==="left"||c==="end"?(m="flex-end",f=h):(c==="right"||c==="start")&&(m="flex-start",g=h):c==="left"||c==="start"?(m="flex-start",f=h):(c==="right"||c==="end")&&(m="flex-end",g=h),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,r=t.style;t.classList.remove(pT),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},lV=(()=>{class e{_viewportRuler=O(xl);_document=O(Qe);_platform=O(Zn);_overlayContainer=O(ip);constructor(){}global(){return new k_}flexibleConnectedTo(r){return new P_(r,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),L_=(()=>{class e{scrollStrategies=O(iV);_overlayContainer=O(ip);_positionBuilder=O(lV);_keyboardDispatcher=O(oV);_injector=O(vt);_ngZone=O(Ve);_document=O(Qe);_directionality=O(Ds);_location=O(Rv);_outsideClickDispatcher=O(sV);_animationsModuleType=O(kC,{optional:!0});_idGenerator=O(np);_renderer=O(dn).createRenderer(null,null);_appRef;_styleLoader=O(Ss);constructor(){}create(r){this._styleLoader.load(mT);let n=this._createHostElement(),i=this._createPaneElement(n),s=this._createPortalOutlet(i),o=new Rl(r);return o.direction=o.direction||this._directionality.value,new Wa(s,n,i,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Gn),this._renderer)}position(){return this._positionBuilder}_createPaneElement(r){let n=this._document.createElement("div");return n.id=this._idGenerator.getId("cdk-overlay-"),n.classList.add("cdk-overlay-pane"),r.appendChild(n),n}_createHostElement(){let r=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(r),r}_createPortalOutlet(r){return this._appRef||(this._appRef=this._injector.get(pr)),new Kf(r,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uV(e,t){}var Ga=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},dV=(()=>{class e extends ja{_elementRef=O(Ot);_focusTrapFactory=O(iT);_config;_interactivityChecker=O(S_);_ngZone=O(Ve);_overlayRef=O(Wa);_focusMonitor=O(eT);_renderer=O(va);_platform=O(Zn);_document=O(Qe,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=O(Br);_injector=O(vt);_isDestroyed=!1;constructor(){super(),this._config=O(Ga,{optional:!0})||new Ga,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(r){this._ariaLabelledByQueue.push(r),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(r){let n=this._ariaLabelledByQueue.indexOf(r);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(r){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachComponentPortal(r);return this._contentAttached(),n}attachTemplatePortal(r){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachTemplatePortal(r);return this._contentAttached(),n}attachDomPortal=r=>{this._portalOutlet.hasAttached();let n=this._portalOutlet.attachDomPortal(r);return this._contentAttached(),n};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(r,n){this._interactivityChecker.isFocusable(r)||(r.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{s(),o(),r.removeAttribute("tabindex")},s=this._renderer.listen(r,"blur",i),o=this._renderer.listen(r,"mousedown",i)})),r.focus(n)}_focusByCssSelector(r,n){let i=this._elementRef.nativeElement.querySelector(r);i&&this._forceFocus(i,n)}_trapFocus(r){this._isDestroyed||Xr(()=>{let n=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||n.focus(r);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(r)||this._focusDialogContainer(r);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',r);break;default:this._focusByCssSelector(this._config.autoFocus,r);break}},{injector:this._injector})}_restoreFocus(){let r=this._config.restoreFocus,n=null;if(typeof r=="string"?n=this._document.querySelector(r):typeof r=="boolean"?n=r?this._elementFocusedBeforeDialogWasOpened:null:r&&(n=r),this._config.restoreFocus&&n&&typeof n.focus=="function"){let i=Jf(),s=this._elementRef.nativeElement;(!i||i===this._document.body||i===s||s.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(r){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(r)}_containsFocus(){let r=this._elementRef.nativeElement,n=Jf();return r===n||r.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Jf()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ft({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,n){if(r&1&&ns(v_,7),r&2){let i;rs(i=is())&&(n._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,n){r&2&&ts("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[fo],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,n){r&1&&pt(0,uV,0,0,"ng-template",0)},dependencies:[v_],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
46
+ `],encapsulation:2})}return e})(),xs=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new ie;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(r=>{r.keyCode===27&&!this.disableClose&&!sT(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(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let r=this.closed;this.containerInstance._closeInteractionType=t?.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="",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}},fV=new he("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=O(L_);return()=>e.scrollStrategies.block()}}),B_=new he("DialogData"),pV=new he("DefaultDialogConfig"),gT=(()=>{class e{_overlay=O(L_);_injector=O(vt);_defaultOptions=O(pV,{optional:!0});_parentDialog=O(e,{optional:!0,skipSelf:!0});_overlayContainer=O(ip);_idGenerator=O(np);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new ie;_afterOpenedAtThisLevel=new ie;_ariaHiddenElements=new Map;_scrollStrategy=O(fV);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=rm(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Si(void 0)));constructor(){}open(r,n){let i=this._defaultOptions||new Ga;n=w(w({},i),n),n.id=n.id||this._idGenerator.getId("cdk-dialog-"),n.id&&this.getDialogById(n.id);let s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new xs(o,n),l=this._attachContainer(o,a,n);return a.containerInstance=l,this._attachDialogContent(r,a,l,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){F_(this.openDialogs,r=>r.close())}getDialogById(r){return this.openDialogs.find(n=>n.id===r)}ngOnDestroy(){F_(this._openDialogsAtThisLevel,r=>{r.config.closeOnDestroy===!1&&this._removeOpenDialog(r,!1)}),F_(this._openDialogsAtThisLevel,r=>r.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(r){let n=new Rl({positionStrategy:r.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:r.scrollStrategy||this._scrollStrategy(),panelClass:r.panelClass,hasBackdrop:r.hasBackdrop,direction:r.direction,minWidth:r.minWidth,minHeight:r.minHeight,maxWidth:r.maxWidth,maxHeight:r.maxHeight,width:r.width,height:r.height,disposeOnNavigation:r.closeOnNavigation});return r.backdropClass&&(n.backdropClass=r.backdropClass),n}_attachContainer(r,n,i){let s=i.injector||i.viewContainerRef?.injector,o=[{provide:Ga,useValue:i},{provide:xs,useValue:n},{provide:Wa,useValue:r}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,o.push(...i.container.providers(i))):a=dV;let l=new Ua(a,i.viewContainerRef,vt.create({parent:s||this._injector,providers:o}));return r.attach(l).instance}_attachDialogContent(r,n,i,s){if(r instanceof Mr){let o=this._createInjector(s,n,i,void 0),a={$implicit:s.data,dialogRef:n};s.templateContext&&(a=w(w({},a),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),i.attachTemplatePortal(new Ha(r,null,a,o))}else{let o=this._createInjector(s,n,i,this._injector),a=i.attachComponentPortal(new Ua(r,s.viewContainerRef,o));n.componentRef=a,n.componentInstance=a.instance}}_createInjector(r,n,i,s){let o=r.injector||r.viewContainerRef?.injector,a=[{provide:B_,useValue:r.data},{provide:xs,useValue:n}];return r.providers&&(typeof r.providers=="function"?a.push(...r.providers(n,r,i)):a.push(...r.providers)),r.direction&&(!o||!o.get(Ds,null,{optional:!0}))&&a.push({provide:Ds,useValue:{value:r.direction,change:Fo()}}),vt.create({parent:o||s,providers:a})}_removeOpenDialog(r,n){let i=this.openDialogs.indexOf(r);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let r=this._overlayContainer.getContainerElement();if(r.parentElement){let n=r.parentElement.children;for(let i=n.length-1;i>-1;i--){let s=n[i];s!==r&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let r=this._parentDialog;return r?r._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function F_(e,t){let r=e.length;for(;r--;)t(e[r])}var At=class{static injectScriptURL(e,t){if(!e)return;let r=document.createElement("script");r.id=t??"",r.src=e,e.includes("localhost")&&(r.type="module"),document.head.appendChild(r)}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 r=document.createElement("style");r.textContent=e,t.appendChild(r)}static injectStylesheet(e,t=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=n=>{let i=n.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=e.split("/"),a=o.slice(0,o.length-1).join("/"),l=s.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(r)}static loadSwiperScript(){let e="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(t=>{if(window.Swiper){t();return}if(Array.from(document.scripts).some(n=>n.src.includes(e))){let n=setInterval(()=>{window.Swiper&&(clearInterval(n),t())},50)}let r=document.createElement("script");r.src=e,r.onload=()=>{t()},r.onerror=()=>{r.remove()},document.body.appendChild(r)})}},V_=Pe(Yn());function hV(e,t){if(e&1&&(Q(0,"div",12),pn(1,"OPEN CART "),ee()),e&2){let r=X(2);ti("animate-slide-up-enter",r.atcClicked)("hidden",!r.atcClicked)}}function mV(e,t){if(e&1&&(Q(0,"div",12),pn(1,"ADD TO CART "),ee()),e&2){let r=X(2);ti("animate-slide-up-exit",r.atcClicked)("hidden",r.atcClicked)}}function gV(e,t){if(e&1){let r=zn();Q(0,"div",3),ht("click",function(){let n=It(r).$implicit,i=X();return Tt(i.clicked.emit(n))})("keydown",function(){let n=It(r).$implicit,i=X();return Tt(i.clicked.emit(n))}),Q(1,"div",4),Ae(2,"img",5),Q(3,"div",6)(4,"span",7),pn(5),ee(),Ae(6,"span",8),bn(7,"cooeeCurrency"),bn(8,"safeHtml"),ee()(),Q(9,"div",9),ht("click",function(n){let i=It(r).$implicit,s=X();return Tt(s.clickAddToCart(n,i))})("keydown",function(n){let i=It(r).$implicit,s=X();return Tt(s.clickAddToCart(n,i))}),pt(10,hV,2,4,"div",10)(11,mV,2,4,"div",11),ee()()}if(e&2){let r=t.$implicit,n=X();Y(2),qn("alt",r.name),be("src",r.imageURL,fn),Y(3),os(" ",r.name," "),Y(),be("innerHTML",xn(8,11,xn(7,9,r.price)),Pr),Y(3),ti("lc:bg-pink-500",!n.atcClicked)("lc:bg-black",n.atcClicked),Y(),Pt(n.atcClicked?10:11)}}var op=class fp{items;clicked=new We;performCTA=new We;atcClicked=!1;clickAddToCart(t,r){t.stopPropagation(),this.performCTA.emit({item:r,cta:this.atcClicked?V_.ClickActionType.OPEN_CART:V_.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||fp)};static \u0275cmp=ft({type:fp,selectors:[["cooee-product-card"]],inputs:{items:"items"},outputs:{clicked:"clicked",performCTA:"performCTA"},decls:4,vars:0,consts:[[1,"lc:absolute","lc:flex","lc:bottom-2","lc:gap-2","lc:w-full","lc:z-10"],["id","lc-card-scroll",1,"lc:flex","lc:px-12","lc:w-full","lc:gap-2","lc:overflow-x-auto"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-shrink-0","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"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-shrink-0","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","lc:items-center"],["id","lc-item-image",1,"lc:w-20","lc:h-20","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","lc:text-xl"],["id","lc-item-price",1,"lc:text-xl",3,"innerHTML"],["id","lc-cta-button","tabindex","{0}",1,"lc:py-4","lc:rounded","lc:w-full","lc:text-center","lc:font-normal","lc:cursor-pointer",3,"click","keydown"],[1,"lc:text-white","lc:text-xl","lc:font-bold",3,"animate-slide-up-enter","hidden"],[1,"lc:text-white","lc:text-xl","lc:font-bold",3,"animate-slide-up-exit","hidden"],[1,"lc:text-white","lc:text-xl","lc:font-bold"]],template:function(t,r){t&1&&(Q(0,"div",0)(1,"div",1),Wt(2,gV,12,13,"div",2,Fi),ee()()),t&2&&(Y(2),Gt(r.items))},dependencies:[ui,di],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}#lc-card-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}#lc-card-scroll[_ngcontent-%COMP%]{scrollbar-width:none}"]})},xt=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}},yT=Pe(j_()),vV=(0,yT.default)(fetch),sp=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let r,n=xt.getRootPrefix()+`products/${t}.js`;try{r=await(await vV(n)).json()}catch(i){C.error(`Failed to fetch ${n}`,i);let s=bt.getInstance();i instanceof Response?s.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:n}):s.captureException(i,{mID:e.mID,path:n});return}if(!r){C.error("Item not found after AJAX call for:",e.mID);return}return r}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}}},ap=Pe(Yn()),yV=(e,t)=>t.id;function _V(e,t){if(e&1&&Ae(0,"img",10),e&2){let r=t.$implicit,n=X(2);be("src",r,fn)("alt",n.item.name)}}function EV(e,t){if(e&1&&Wt(0,_V,1,2,"img",10,Fi),e&2){let r=X();Gt(r.ajaxItem.images)}}function wV(e,t){if(e&1&&Ae(0,"img",10),e&2){let r=X();be("src",r.item.imageURL,fn)("alt",r.item.name)}}function bV(e,t){if(e&1&&(Ae(0,"span",13),bn(1,"cooeeCurrency"),bn(2,"safeHtml")),e&2){let r=X();be("innerHTML",xn(2,3,xn(1,1,(r.selectedVariant==null?null:r.selectedVariant.price)/100)),Pr)}}function CV(e,t){if(e&1&&(Ae(0,"span",13),bn(1,"cooeeCurrency"),bn(2,"safeHtml")),e&2){let r=X();be("innerHTML",xn(2,3,xn(1,1,r.item.price)),Pr)}}function SV(e,t){if(e&1){let r=zn();Q(0,"div",20),ht("click",function(){let n=It(r).$implicit,i=X();return Tt(i.selectedVariant=n)})("keydown",function(){let n=It(r).$implicit,i=X();return Tt(i.selectedVariant=n)}),Q(1,"span",21),pn(2),ee()()}if(e&2){let r=t.$implicit,n=X();ti("lc:bg-pink-100",(n.selectedVariant==null?null:n.selectedVariant.id)===r.id)("lc:border-pink-300",(n.selectedVariant==null?null:n.selectedVariant.id)===r.id)("lc:text-pink-700",(n.selectedVariant==null?null:n.selectedVariant.id)===r.id),Y(2),ya(r.title)}}function DV(e,t){if(e&1&&(Q(0,"div",16)(1,"h4",22),pn(2,"Description"),ee(),Ae(3,"div",23),bn(4,"safeHtml"),ee()),e&2){let r=X();Y(3),be("innerHTML",xn(4,1,r.ajaxItem==null?null:r.ajaxItem.description),Pr)}}function IV(e,t){e&1&&pn(0," OPEN CART ")}function TV(e,t){e&1&&pn(0," ADD TO CART ")}var cp=class vp{item;closeModel=new We;performCTA=new We;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=ap.ClickActionType;async ngOnInit(){this.ajaxItem=await sp.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?ap.ClickActionType.OPEN_CART:ap.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants.filter(t=>t.available&&t.title!=="Default Title")??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||vp)};static \u0275cmp=ft({type:vp,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:28,vars:5,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-4xl","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"],["id","lc-item-name",1,"lc:font-bold","lc:m-0","lc:text-3xl"],["id","lc-item-price",1,"lc:font-semibold","lc:text-2xl",3,"innerHTML"],["id","lc-variant-list",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"],["id","lc-description",1,"lc:mt-4","lc:border-t","lc:pt-4","lc:w-full"],["id","lc-modal-footer",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"],["id","lc-cta-button","tabindex","{0}",1,"lc:bg-black","lc:text-white","lc:p-4","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer","lc:text-2xl",3,"click","keydown"],["id","lc-more-info-button","tabindex","{0}",1,"lc:bg-pink-100","lc:text-pink-600","lc:p-4","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer","lc:text-2xl",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,r){t&1&&(Q(0,"div",0)(1,"div",1)(2,"h2",2),pn(3,"Shop Now"),ee(),Q(4,"button",3),ht("click",function(){return r.closeDialog()}),hr(),Q(5,"svg",4),Ae(6,"path",5)(7,"path",6),ee()()(),Jo(),Q(8,"div",7)(9,"div",8)(10,"div",9),pt(11,EV,2,0)(12,wV,1,2,"img",10),ee(),Q(13,"div",11)(14,"h3",12),pn(15),ee(),pt(16,bV,3,5,"span",13)(17,CV,3,5,"span",13),ee(),Q(18,"div",14),Wt(19,SV,3,7,"div",15,yV),ee(),pt(21,DV,5,3,"div",16),ee()(),Q(22,"div",17)(23,"div",18),ht("click",function(){return r.clickAddToCart(r.item)})("keydown",function(){return r.clickAddToCart(r.item)}),pt(24,IV,1,0)(25,TV,1,0),ee(),Q(26,"div",19),ht("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})}),pn(27," MORE INFO "),ee()()()),t&2&&(Y(11),Pt(!(r.ajaxItem==null||r.ajaxItem.images==null)&&r.ajaxItem.images.length?11:12),Y(4),ya(r.item.name),Y(),Pt(r.selectedVariant!=null&&r.selectedVariant.price?16:17),Y(3),Gt(r.availableVariants),Y(2),Pt(r.ajaxItem!=null&&r.ajaxItem.description?21:-1),Y(3),Pt(r.atcClicked?24:25))},dependencies:[di,ui],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px;overflow:hidden}"]})};function xV(e,t){e&1&&(hr(),Q(0,"svg",1),Ae(1,"path",2)(2,"path",3),ee())}function RV(e,t){e&1&&(hr(),Q(0,"svg",1),Ae(1,"path",2)(2,"path",4),ee())}var lp=class Kp{muted;buttonClicked=new We;static \u0275fac=function(t){return new(t||Kp)};static \u0275cmp=ft({type:Kp,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,r){t&1&&(Q(0,"button",0),ht("click",function(){return r.buttonClicked.emit()}),pt(1,xV,3,0,":svg:svg",1)(2,RV,3,0,":svg:svg",1),ee()),t&2&&(Y(),Pt(r.muted?1:2))},encapsulation:2})},up=class kf{width;static \u0275fac=function(t){return new(t||kf)};static \u0275cmp=ft({type:kf,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,r){t&1&&(Q(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Ae(4,"div"),ee()()()()),t&2&&(Y(3),po("width",r.width,"%"))},encapsulation:2})},No=Pe(Yn()),Ex=Pe(dp()),wx=Pe(ls()),NV=" 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",AV=/bot|crawl|http|lighthouse|scan|search|spider/i,Nl;function MV(){if(Nl instanceof RegExp)return Nl;try{Nl=new RegExp(NV,"i")}catch{Nl=AV}return Nl}function wT(e){return!!e&&MV().test(e)}var bT=Pe($_()),Al=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 bT.URLBuilder(location.href)}catch{return{}}let t={};this.UTM_PARAMS.forEach(n=>{let i=e.getQueryParam(n);i&&(t[n]=i)});let r={};return Object.keys(this.TW_PARAMS).forEach(n=>{let i=e.getQueryParam(this.TW_PARAMS[n]);i&&(r[n]=i)}),w(w({},r),t)}},hi=class CD{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 CD(w({origin:location.origin,path:t,qs:location.search,referrer:Al.getReferrer(),name:ke.get().pageName},Al.getUTMParams()))}},xe=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},W_={d:(e,t)=>{for(var r in t)W_.o(t,r)&&!W_.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},G_={};W_.d(G_,{A:()=>LV,k:()=>z_});var PV=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(c){try{l(n.next(c))}catch(h){s(h)}}function a(c){try{l(n.throw(c))}catch(h){s(h)}}function l(c){var h;c.done?i(c.value):(h=c.value,h instanceof r?h:new r(function(d){d(h)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},kV=function(e,t){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return function(h){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,h[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&h[0]?n.return:h[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,h[1])).done)return i;switch(n=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,n=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){o.label=h[1];break}if(h[0]===6&&o.label<i[1]){o.label=i[1],i=h;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(h);break}i[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(e,o)}catch(d){h=[6,d],n=0}finally{r=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,c])}}};function z_(){return PV(this,void 0,Promise,function(){return kV(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 r,n,i=(r=t.target)===null||r===void 0?void 0:r.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(o){var s=o;return o instanceof Error&&(s=(n=o.message)!==null&&n!==void 0?n:o),typeof s!="string"?void __callback(!1):void __callback(s.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=z_);var LV=z_,CT=G_.A,UJ=G_.k,gx=Pe(ls()),ST=Pe(q_()),ir=class $i{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new ST.default;constructor(){}static get(){return $i._instance||($i._instance=new $i),$i._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===$i.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===$i.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(t){let r=t.max,n=t.cont.w,i=t.cont.h,s=t.spc,o=$i.get().getWidth(),a=$i.get().getHeight();r&&(o=o?Math.min(o,r):r,a=a?Math.min(a,r):r),a&&(o-=s.getHorizontal(),a-=s.getVertical(),o/a<n/i?this.scalingFactor=o/n:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(t){return this.doc.createElement(t)}appendChild(t,r){t.appendChild(r)}setStyles(t,r){Object.assign(t.style,r)}setStyle(t,r,n){if(r){if(!n){t.style.removeProperty(r);return}t.style.setProperty(r,n,"important")}}setAttribute(t,r,n){t.setAttribute(r,n)}removeInApp(t){let r=document.querySelector(`.${t.rootClassName}`);r&&r.parentElement.removeChild(r)}setParentContainer(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},hp=class{parser;result={};constructor(){this.parser=ir.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,r=e.offsetWidth*t;return document.body.removeChild(e),r}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{}}},qa=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}},ze=class ID{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new qa;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new ID),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let r=this.convertToCooeeCart();return t&&await rt.set(ge.CURRENT_CART,r),r}async addCooeeAttributes(){await this.lock.acquire();let t=await mn.get(ge.ID),r=await rt.get(ge.DEVICE_ID);if(this.attributes?.letscooee_did===r&&this.attributes?.letscooee_sid===t){C.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let n={letscooee_did:r,letscooee_sid:t,__letscooee_time:new Date().toLocaleString()};C.debug("Updating Shopify cart with attributes:",n);let i=xt.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:n})})).json();C.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),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,ke.get().currencyCode=this.currency,C.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 C.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let r=[];for(let n of t){if(!n.id||!n.title){C.warn("Invalid item received",n);continue}let i={name:n.title,quantity:+n.quantity||1,mID:n.product_id?.toString(),vID:n.id.toString(),price:+n.price/100||0,properties:n.properties,key:n.key},s=n.selling_plan_allocation?.selling_plan;if(!s){r.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:s.fixed_selling_plan,id:s.id,name:s.name,recurringDeliveries:s.recurring_deliveries}},r.push(i)}return r}async fetchCartFromShopify(t){if(!t&&this.token){C.debug("Not fetching cart");return}C.debug("Fetching cart");let r=xt.getCartURL("cart.js"),n=await(await fetch(r)).json();this.update(n)}},Rs=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(Rs||{}),Ya=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=Rs[e]?.toLowerCase();t&&(C.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},br=class{static isOn=!1;static element;static watch(){let e=C.getDebugParam();(e==="1"||e==="on")&&Ue.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,r=0,n=0,i=a=>{a=a||window.event,a.preventDefault(),r=a.clientX,n=a.clientY,document.onmouseup=o,document.onmousemove=s},s=a=>{a=a||window.event,a.preventDefault(),e=r-a.clientX,t=n-a.clientY,r=a.clientX,n=a.clientY,this.element.style.top=this.element.offsetTop-t+"px",this.element.style.left=this.element.offsetLeft-e+"px"},o=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=i}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}},Ol=class extends mo{static storeName="app";static{this.storage=Da(this.storeName)}},mp=Pe(ls()),mi=class TD{static INSTANCE=new TD;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,r){this.topics[t]||(this.topics[t]=new ie),this.topics[t].next(r)}subscriber(t){return this.topics[t]||(this.topics[t]=new ie),this.topics[t].asObservable()}},Yt=class bi{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=wt.get().website??{};currentState=!1;drawerSubject=new Tr({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=[bi.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 bi._instance||(bi._instance=new bi),bi._instance}static forceUpdate(){bi._instance=new bi}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return mp.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){C.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){C.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===bi.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(t,r=!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 n=t.items[0].id,i=t.items[0].quantity,s=t.items[0].price;window.cartGiftUpdate(n,s,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 n=document.querySelector('a[href="/cart"]');n&&n.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():(C.info("No method found to update the cart drawer. Blindly firing some events to try"),document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})));document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),r&&mi.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let t=this.configWebsite.cartDrawerSelector;if(!t){await this.findCartDrawer();return}let r=t.split(k.SHADOW_SPLITTER);r.length===1?(this.selector=r[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=r[0]?.trim(),this.selector=r[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!xt.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await ue.retrySelector(t),!this.cartDrawerElement){mp.default.warn("Max attempts exhausted to find cart drawer");return}mp.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!xt.isShopify()||!this.shadowParentElementSelector)return;let t=(await ue.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;if(this.cartDrawerElement.tagName.toLowerCase()===bi.DEFAULT_SELECTOR&&this.cartDrawerElement.open)return!0;if(this.cartDrawerElement.id==="cart-drawer__container")return this.cartDrawerElement.classList.contains("cart-drawer-open");let t=this.cartDrawerElement.getBoundingClientRect(),r=(window.innerHeight||document.documentElement.clientHeight)+.5,n=(window.innerWidth||document.documentElement.clientWidth)+.5,i=t.top<=r&&t.bottom>=0,s=t.left<=n&&t.right>=0,o=i&&s,a=getComputedStyle(this.cartDrawerElement),l=a.display!=="none"&&a.visibility!=="hidden"&&parseFloat(a.opacity)>0,c=!this.cartDrawerElement.hidden,h=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,d=a.transform.match(/matrix\(([^)]+)\)/),f=0,g=0;if(d){let M=d[1].split(", ").map(parseFloat);f=M[4],g=M[5]}let m=f+t.left>n||f+t.right<0||g+t.top>r||g+t.bottom<0,b=Math.max(0,Math.min(t.right,n)-Math.max(t.left,0)),I=Math.max(0,Math.min(t.bottom,r)-Math.max(t.top,0)),A=b*I,F=t.width*t.height,U=F>0&&A/F>=.1;return(o||!m)&&l&&c&&h&&U}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(ue.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,r=new ie;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{r.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),r.pipe(xr(500)).subscribe(()=>{let n=this.isOpen();this.currentState!==n&&(this.currentState=n,this.drawerSubject.next({open:n,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 ze.getCurrent().getNormalisedCart(!0)).itemCount,r=document.querySelector(".cart-link__bubble");r&&(r.innerText=t+"")}},gp=class{static processConfiguration(){let e=wt.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Ue.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await rt.get(ge.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await rt.set(ge.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=wt.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",r=>{t(r)})})}},hx=Pe(Lf()),Un=Pe(Yn()),So=Pe(dp()),TE=Pe(K_()),wp,it,RT,Q_,Ns,DT,NT,Z_,AT,eE,X_,J_,FV,Pl={},MT=[],BV=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,tE=Array.isArray;function _o(e,t){for(var r in t)e[r]=t[r];return e}function nE(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function rE(e,t,r){var n,i,s,o={};for(s in t)s=="key"?n=t[s]:s=="ref"?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?wp.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return _p(e,o,n,i,null)}function _p(e,t,r,n,i){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++RT,__i:-1,__u:0};return i==null&&it.vnode!=null&&it.vnode(s),s}function vi(e){return e.children}function gi(e,t){this.props=e,this.context=t}function Ka(e,t){if(t==null)return e.__?Ka(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Ka(e):null}function OT(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return OT(e)}}function IT(e){(!e.__d&&(e.__d=!0)&&Ns.push(e)&&!Ep.__r++||DT!==it.debounceRendering)&&((DT=it.debounceRendering)||NT)(Ep)}function Ep(){var e,t,r,n,i,s,o,a;for(Ns.sort(Z_);e=Ns.shift();)e.__d&&(t=Ns.length,n=void 0,s=(i=(r=e).__v).__e,o=[],a=[],r.__P&&((n=_o({},i)).__v=i.__v+1,it.vnode&&it.vnode(n),iE(r.__P,n,i,r.__n,r.__P.namespaceURI,32&i.__u?[s]:null,o,s??Ka(i),!!(32&i.__u),a),n.__v=i.__v,n.__.__k[n.__i]=n,LT(o,n,a),n.__e!=s&&OT(n)),Ns.length>t&&Ns.sort(Z_));Ep.__r=0}function PT(e,t,r,n,i,s,o,a,l,c,h){var d,f,g,m,b,I,A=n&&n.__k||MT,F=t.length;for(l=VV(r,t,A,l,F),d=0;d<F;d++)(g=r.__k[d])!=null&&(f=g.__i===-1?Pl:A[g.__i]||Pl,g.__i=d,I=iE(e,g,f,i,s,o,a,l,c,h),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&oE(f.ref,null,g),h.push(g.ref,g.__c||m,g)),b==null&&m!=null&&(b=m),4&g.__u||f.__k===g.__k?l=kT(g,l,e):typeof g.type=="function"&&I!==void 0?l=I:m&&(l=m.nextSibling),g.__u&=-7);return r.__e=b,l}function VV(e,t,r,n,i){var s,o,a,l,c,h=r.length,d=h,f=0;for(e.__k=new Array(i),s=0;s<i;s++)(o=t[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=s+f,(o=e.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?_p(null,o,null,null,null):tE(o)?_p(vi,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?_p(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=UV(o,r,l,d))!==-1&&(d--,(a=r[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&f--,typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<h;s++)(a=r[s])!=null&&(2&a.__u)==0&&(a.__e==n&&(n=Ka(a)),FT(a,a));return n}function kT(e,t,r){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=kT(n[i],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=Ka(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function UV(e,t,r,n){var i,s,o=e.key,a=e.type,l=t[r];if(l===null||l&&o==l.key&&a===l.type&&(2&l.__u)==0)return r;if(n>(l!=null&&(2&l.__u)==0?1:0))for(i=r-1,s=r+1;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&o==l.key&&a===l.type)return i;i--}if(s<t.length){if((l=t[s])&&(2&l.__u)==0&&o==l.key&&a===l.type)return s;s++}}return-1}function TT(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||BV.test(t)?r:r+"px"}function yp(e,t,r,n,i){var s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||TT(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||TT(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(AT,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=r,r?n?r.u=n.u:(r.u=eE,e.addEventListener(t,s?J_:X_,s)):e.removeEventListener(t,s?J_:X_,s);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]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function xT(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=eE++;else if(t.t<r.u)return;return r(it.event?it.event(t):t)}}}function iE(e,t,r,n,i,s,o,a,l,c){var h,d,f,g,m,b,I,A,F,U,M,q,Me,lt,j,fe,te,pe=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),s=[a=t.__e=r.__e]),(h=it.__b)&&h(t);e:if(typeof pe=="function")try{if(A=t.props,F="prototype"in pe&&pe.prototype.render,U=(h=pe.contextType)&&n[h.__c],M=h?U?U.props.value:h.__:n,r.__c?I=(d=t.__c=r.__c).__=d.__E:(F?t.__c=d=new pe(A,M):(t.__c=d=new gi(A,M),d.constructor=pe,d.render=jV),U&&U.sub(d),d.props=A,d.state||(d.state={}),d.context=M,d.__n=n,f=d.__d=!0,d.__h=[],d._sb=[]),F&&d.__s==null&&(d.__s=d.state),F&&pe.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=_o({},d.__s)),_o(d.__s,pe.getDerivedStateFromProps(A,d.__s))),g=d.props,m=d.state,d.__v=t,f)F&&pe.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),F&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F&&pe.getDerivedStateFromProps==null&&A!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,M)===!1||t.__v==r.__v)){for(t.__v!=r.__v&&(d.props=A,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(Be){Be&&(Be.__=t)}),q=0;q<d._sb.length;q++)d.__h.push(d._sb[q]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,M),F&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,m,b)})}if(d.context=M,d.props=A,d.__P=e,d.__e=!1,Me=it.__r,lt=0,F){for(d.state=d.__s,d.__d=!1,Me&&Me(t),h=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,Me&&Me(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++lt<25);d.state=d.__s,d.getChildContext!=null&&(n=_o(_o({},n),d.getChildContext())),F&&!f&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(g,m)),a=PT(e,tE(fe=h!=null&&h.type===vi&&h.key==null?h.props.children:h)?fe:[fe],t,r,n,i,s,o,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),I&&(d.__E=d.__=null)}catch(Be){if(t.__v=null,l||s!=null)if(Be.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(te=s.length;te--;)nE(s[te]);else t.__e=r.__e,t.__k=r.__k;it.__e(Be,t,r)}else s==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):a=t.__e=HV(r.__e,t,r,n,i,s,o,l,c);return(h=it.diffed)&&h(t),128&t.__u?void 0:a}function LT(e,t,r){for(var n=0;n<r.length;n++)oE(r[n],r[++n],r[++n]);it.__c&&it.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){it.__e(s,i.__v)}})}function HV(e,t,r,n,i,s,o,a,l){var c,h,d,f,g,m,b,I=r.props,A=t.props,F=t.type;if(F=="svg"?i="http://www.w3.org/2000/svg":F=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((g=s[c])&&"setAttribute"in g==!!F&&(F?g.localName==F:g.nodeType==3)){e=g,s[c]=null;break}}if(e==null){if(F==null)return document.createTextNode(A);e=document.createElementNS(i,F,A.is&&A),a&&(it.__m&&it.__m(t,s),a=!1),s=null}if(F===null)I===A||a&&e.data===A||(e.data=A);else{if(s=s&&wp.call(e.childNodes),I=r.props||Pl,!a&&s!=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")d=g;else if(!(c in A)){if(c=="value"&&"defaultValue"in A||c=="checked"&&"defaultChecked"in A)continue;yp(e,c,null,g,i)}}for(c in A)g=A[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?m=g:c=="checked"?b=g:a&&typeof g!="function"||I[c]===g||yp(e,c,g,I[c],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),PT(e,tE(f)?f:[f],t,r,n,F=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:r.__k&&Ka(r,0),a,l),s!=null)for(c=s.length;c--;)nE(s[c]);a||(c="value",F=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||F=="progress"&&!m||F=="option"&&m!==I[c])&&yp(e,c,m,I[c],i),c="checked",b!==void 0&&b!==e[c]&&yp(e,c,b,I[c],i))}return e}function oE(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(i){it.__e(i,r)}}function FT(e,t,r){var n,i;if(it.unmount&&it.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||oE(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(s){it.__e(s,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&FT(n[i],t,r||typeof e.type!="function");r||nE(e.__e),e.__c=e.__=e.__e=void 0}function jV(e,t,r){return this.constructor(e,r)}function BT(e,t,r){var n,i,s,o;t==document&&(t=document.documentElement),it.__&&it.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,s=[],o=[],iE(t,e=(!n&&r||t).__k=rE(vi,null,[e]),i||Pl,Pl,t.namespaceURI,!n&&r?[r]:i?null:t.firstChild?wp.call(t.childNodes):null,s,!n&&r?r:i?i.__e:t.firstChild,n,o),LT(s,e,o)}wp=MT.slice,it={__e:function(e,t,r,n){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(a){e=a}throw e}},RT=0,Q_=function(e){return e!=null&&e.constructor==null},gi.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=_o({},this.state),typeof e=="function"&&(e=e(_o({},r),this.props)),e&&_o(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),IT(this))},gi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),IT(this))},gi.prototype.render=vi,Ns=[],NT=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Z_=function(e,t){return e.__v.__b-t.__v.__b},Ep.__r=0,AT=/(PointerCapture)$|Capture$/i,eE=0,X_=xT(!1),J_=xT(!0),FV=0;var aE,or,sE,VT,UT=0,YT=[],ln=it,HT=ln.__b,jT=ln.__r,$T=ln.diffed,WT=ln.__c,GT=ln.unmount,zT=ln.__;function $V(e,t){ln.__h&&ln.__h(or,e,UT||t),UT=0;var r=or.__H||(or.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function lE(e,t){var r=$V(aE++,7);return zV(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function WV(){for(var e;e=YT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(bp),e.__H.__h.forEach(cE),e.__H.__h=[]}catch(t){e.__H.__h=[],ln.__e(t,e.__v)}}ln.__b=function(e){or=null,HT&&HT(e)},ln.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zT&&zT(e,t)},ln.__r=function(e){jT&&jT(e),aE=0;var t=(or=e.__c).__H;t&&(sE===or?(t.__h=[],or.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(bp),t.__h.forEach(cE),t.__h=[],aE=0)),sE=or},ln.diffed=function(e){$T&&$T(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(YT.push(t)!==1&&VT===ln.requestAnimationFrame||((VT=ln.requestAnimationFrame)||GV)(WV)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),sE=or=null},ln.__c=function(e,t){t.some(function(r){try{r.__h.forEach(bp),r.__h=r.__h.filter(function(n){return!n.__||cE(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],ln.__e(n,r.__v)}}),WT&&WT(e,t)},ln.unmount=function(e){GT&&GT(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{bp(n)}catch(i){t=i}}),r.__H=void 0,t&&ln.__e(t,r.__v))};var qT=typeof requestAnimationFrame=="function";function GV(e){var t,r=function(){clearTimeout(n),qT&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);qT&&(t=requestAnimationFrame(r))}function bp(e){var t=or,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),or=t}function cE(e){var t=or;e.__c=e.__(),or=t}function zV(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var qV=Symbol.for("preact-signals");function dE(){if(Za>1)Za--;else{for(var e,t=!1;kl!==void 0;){var r=kl;for(kl=void 0,uE++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ZT(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(uE=0,Za--,t)throw e}}var Ct=void 0,kl=void 0,Za=0,uE=0,Cp=0;function KT(e){if(Ct!==void 0){var t=e.n;if(t===void 0||t.t!==Ct)return t={i:0,S:e,p:Ct.s,n:void 0,t:Ct,e:void 0,x:void 0,r:t},Ct.s!==void 0&&(Ct.s.n=t),Ct.s=t,e.n=t,32&Ct.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=Ct.s,t.n=void 0,Ct.s.n=t,Ct.s=t),t}}function un(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}un.prototype.brand=qV;un.prototype.h=function(){return!0};un.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)};un.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};un.prototype.subscribe=function(e){var t=this;return Sn(function(){var r=t.value,n=Ct;Ct=void 0;try{e(r)}finally{Ct=n}})};un.prototype.valueOf=function(){return this.value};un.prototype.toString=function(){return this.value+""};un.prototype.toJSON=function(){return this.value};un.prototype.peek=function(){var e=Ct;Ct=void 0;try{return this.value}finally{Ct=e}};Object.defineProperty(un.prototype,"value",{get:function(){var e=KT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(uE>100)throw new Error("Cycle detected");this.v=e,this.i++,Cp++,Za++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{dE()}}}});function Cr(e){return new un(e)}function ZT(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 XT(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function JT(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Xa(e){un.call(this,void 0),this.x=e,this.s=void 0,this.g=Cp-1,this.f=4}(Xa.prototype=new un).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Cp))return!0;if(this.g=Cp,this.f|=1,this.i>0&&!ZT(this))return this.f&=-2,!0;var e=Ct;try{XT(this),Ct=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Ct=e,JT(this),this.f&=-2,!0};Xa.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)}un.prototype.S.call(this,e)};Xa.prototype.U=function(e){if(this.t!==void 0&&(un.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)}};Xa.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(Xa.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=KT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function fE(e){return new Xa(e)}function QT(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Za++;var r=Ct;Ct=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,pE(e),n}finally{Ct=r,dE()}}}function pE(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,QT(e)}function YV(e){if(Ct!==this)throw new Error("Out-of-order effect");JT(this),Ct=e,this.f&=-2,8&this.f&&pE(this),dE()}function Ll(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ll.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()}};Ll.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,QT(this),XT(this),Za++;var e=Ct;return Ct=this,YV.bind(this,e)};Ll.prototype.N=function(){2&this.f||(this.f|=2,this.o=kl,kl=this)};Ll.prototype.d=function(){this.f|=8,1&this.f||pE(this)};function Sn(e){var t=new Ll(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var mE,hE;function Ja(e,t){it[e]=t.bind(null,it[e]||function(){})}function Sp(e){hE&&hE(),hE=e&&e.S()}function ex(e){var t=this,r=e.data,n=ZV(r);n.value=r;var i=lE(function(){for(var s=t.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return t.__$u.c=function(){var o,a=t.__$u.S(),l=i.value;a(),Q_(l)||((o=t.base)==null?void 0:o.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},fE(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}ex.displayName="_st";Object.defineProperties(un.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ex},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Ja("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var s=n[i];s instanceof un&&(r||(t.__np=r={}),r[i]=s,n[i]=s.peek())}}e(t)});Ja("__r",function(e,t){Sp();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var s;return Sn(function(){s=this}),s.c=function(){n.__$f|=1,n.setState({})},s}())),mE=n,Sp(r),e(t)});Ja("__e",function(e,t,r,n){Sp(),mE=void 0,e(t,r,n)});Ja("diffed",function(e,t){Sp(),mE=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var s=r.U;if(s)for(var o in s){var a=s[o];a!==void 0&&!(o in n)&&(a.d(),s[o]=void 0)}else r.U=s={};for(var l in n){var c=s[l],h=n[l];c===void 0?(c=KV(r,l,h,i),s[l]=c):c.o(h,i)}}}e(t)});function KV(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,s=Cr(r);return{o:function(o,a){s.value=o,n=a},d:Sn(function(){var o=s.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Ja("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var s=n[i];s&&s.d()}}}}else{var o=t.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}e(t)});Ja("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});gi.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u,n=r&&r.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(n||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function ZV(e){return lE(function(){return Cr(e)},[])}var Dp=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},Ip=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},gE=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}},yi=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 Dp(t))??[],this.link=e.link,this.price=new Ip(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=Cr(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=Cr(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let r=new gE(t);return r.isSelected&&(this.selectedSellingPlan.value=r),r})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Jn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Cr(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=Cr(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"),this.tags=e.tags,e.vars&&(this.vars=e.vars.map(t=>new yi(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new hn({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})}},Tp=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}},vE=class{enabled;constructor(e){this.enabled=e.enabled}},yE=class extends vE{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},xp=class{productQuantity;constructor(e){e??={},this.productQuantity=new yE(e.productQuantity)}},As=class{s;g;i;constructor(e){e.s&&(this.s=new Vt(e.s)),e.g&&(this.g=new Fl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},Bl="a-f\\d",XV=`#?[${Bl}]{3}[${Bl}]?`,JV=`#?[${Bl}]{6}([${Bl}]{2})?`,QV=new RegExp(`[^#${Bl}]`,"gi"),eU=new RegExp(`^${XV}$|^${JV}$`,"i");function _E(e,t={}){if(typeof e!="string"||QV.test(e)||!eU.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let r=1;e.length===8&&(r=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(r=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 n=Number.parseInt(e,16),i=n>>16,s=n>>8&255,o=n&255,a=typeof t.alpha=="number"?t.alpha:r;if(t.format==="array")return[i,s,o,a];if(t.format==="css"){let l=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:a}}var Vt=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 _E(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},Ms=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Vt(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return tx[this.s??1]}},tx=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(tx||{}),Fl=class xD{static DEFAULT_FALLBACK=new Vt({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new Vt(t.c)),t.fb&&(this.fb=new Vt(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??xD.DEFAULT_FALLBACK}},Vl=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 Vt(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},Wi=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`}},Os=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},sr=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new As(e.bg)),e.br&&(this.br=new Ms(e.br)),e.shd&&(this.shd=new Vl(e.shd)),e.spc&&(this.spc=new Wi(e.spc)),this.trf=new Os(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 Lt[this.t]}get click(){return this.clc}},Lt=(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))(Lt||{}),Ps=class extends sr{constructor(e){super(e)}},Gi=class extends sr{src;constructor(e){super(e),this.src=e.src}},Qa=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(Qa||{}),Rp=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 EE(t))}},EE=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')`}},Dn=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return Qa[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 Vt(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Vt(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new Rp(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},_i=class extends sr{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 Dn(t)}get color(){return this.typography.tc}get typography(){return this.typo}},Eo=class extends _i{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},Np=class extends sr{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},ec=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 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 n=window.setInterval(()=>{let i=new Date().getTime(),s=r.getTime()-i;if(s<1){clearInterval(n);return}let o=Math.floor(s/(1e3*60*60*24)),a=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),c=Math.floor(s%(1e3*60)/1e3);t({days:o,hours:a,minutes:l,seconds:c})},1e3);return n}},tc=class extends _i{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new ec(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Ap=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Vt(e.c??{})}get text(){return this.txt}get color(){return this.c}},wo=class extends _i{ph;constructor(e){super(e),this.ph=new Ap(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},nc=class extends wo{constructor(e){e??={},super(e)}},rc=class extends wo{},ic=class extends wo{},oc=class extends Gi{},Mp=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[]}}},Ul=class extends sr{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 Mp(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new Wi({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}`}},Op=class extends Ul{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new Np(e.cont),this.mob=new Ul(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new Gi(t)):t.t===2?this.elems.push(new Eo(t)):t.t===3?this.elems.push(new Eo(t)):t.t===100?this.elems.push(new Ps(t)):t.t===51?this.elems.push(new rc(t)):t.t===52?this.elems.push(new ic(t)):t.t===61?this.elems.push(new tc(t)):t.t===15||t.t===16?this.elems.push(new nc(t)):t.t===13&&this.elems.push(new oc(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,r;return this.gvt===1?(t="flex-start",r="flex-start"):this.gvt===2?(t="center",r="flex-start"):this.gvt===3?(t="flex-end",r="flex-start"):this.gvt===4?(t="flex-start",r="center"):this.gvt===6?(t="flex-end",r="center"):this.gvt===7?(t="flex-start",r="flex-end"):this.gvt===8?(t="center",r="flex-end"):this.gvt===9?(t="flex-end",r="flex-end"):(t="center",r="center"),e.alignItems=r,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}},sc=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}},Pp=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}},kp=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}},Lp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new Wi(e.spc),e.size&&(this.size=new kp(e.size)),e.bg&&(this.bg=new As(e.bg)),e.br&&(this.br=new Ms(e.br)),e.typo&&(this.typo=new Dn(e.typo)),e.lout&&(this.lout=new Pp(e.lout)),e.flex&&(this.flex=new sc(e.flex))}},ac=class{sm;lg;constructor(e){e??={},this.sm=new Lp(e.sm),this.lg=new Lp(e.lg)}},yn=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new ac(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return Lt[this.t]}},_n=class extends yn{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}},ks=class extends _n{constructor(e,t){super(e,t??3)}},cc=class extends yn{value;constructor(e){super(6,e),e??={},this.value=e.value}},lc=class extends _n{constructor(e=15,t){super(t,e)}},Fp=class extends yn{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Vt(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},nx=Pe(ls()),wE=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Vt(e.color)}},bE=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Vt(e.color)}},Hl=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new bE(e.navigation),this.pagination=new wE(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},Bp=class extends yn{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=ar.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Hl(e.conf),this.allowedTypes=e.allowedTypes}},Vp=class extends _n{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new ec(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},bo=class extends yn{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let r=ar.getParsedElement(t);r&&this.elems.push(r)})}},Ls=class extends yn{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}},ar=class DD{static getParsedElements(t){let r=[];return t?.forEach(n=>{let i=DD.getParsedElement(n);i&&r.push(i)}),r}static getParsedElement(t){switch(t.t){case 2:return new _n(t);case 3:return new ks(t);case 6:return new cc(t);case 11:return new Up(t);case 12:return new Co(t);case 61:return new Vp(t);case 4:return new bo(t);case 1:return new Ls(t);case 13:return new Ls(t,13);case 14:return new _n(t,14);case 15:case 16:return new lc(t.t,t);case 18:return new ks(t,18);case 62:return new Bp(t);case 19:return new Fp(t);default:nx.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"}}},Co=class extends yn{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=ar.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new cc(e.cBox)),this.elems.push(new Ls(e.img,13));let t=new _n(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let r=new _n(e.price);r.text="{{ product.price }}",r.hide=!e.show?.price;let n=new _n(e.compareAt);n.text="{{ product.compare_price }}",n.hide=!e.show?.price,e.compareAt||(n.style=new ac(r.style),n.style.lg.typo=new Dn(re(w({},n.style.lg.typo),{td:"line-through"})),n.style.sm.typo=new Dn(re(w({},n.style.sm.typo),{td:"line-through"})));let i=new bo({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:ar.parseAlignmentToJustifyContent(r.style.lg.typo?.ta)}}}});i.elems.push(n),i.elems.push(r),this.elems.push(i);let s=new lc(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let o=new ks(e.btn,18);o.hide=!e.show?.btn,this.elems.push(o)}}e.symbol&&(this.symbol=new _n(e.symbol))}},Up=class extends yn{conf;prod;constructor(e){super(11,e),e??={},this.conf=new CE(e.conf),this.prod=new Co(e.prod)}},Hp=class extends Hl{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},CE=class{lg;sm;constructor(e){e??={},this.lg=new Hp(e.lg),this.sm=new Hp(e.sm)}},jp=class extends bo{constructor(e){super(e)}},uc=class{cont;elems=[];constructor(e){e=e??{},this.cont=new jp(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=ar.getParsedElement(e);return t&&this.elems.push(t),t}},rx=Pe(Yn()),SE=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 hn(t))}},$p=class{layout;milestones;onlyLatestGift;constructor(e){this.layout=e.layout??rx.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new SE(t))??[],this.onlyLatestGift=e.onlyLatestGift}},Wp=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},Gp=class{id;alt;sources;items;durationMS;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.durationMS=e.durationMS,this.items=e.items?e.items.map(t=>new hn(t)):[]}},DE=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(DE||{}),IE=(e=>(e.SWIPER="SWIPER",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(IE||{}),zp=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(t=>new Gp(t))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}},xE=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===Un.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===Un.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===Un.EngagementContentType.SINGLE}},Hn=class OD extends xE{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;experiment;discountData=Cr({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=ke.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new uc(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(r=>new hn(r)),this.items=t.items?.map(r=>new Jn(r))??[],this.nonMutableItems=t.items?.map(r=>new Jn(r))??[],this.collections=t.collections?.map(r=>new Tp(r))??[],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 xp(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,this.experiment=t.experiment,t.progressBarConfig&&(this.progressBarConfig=new $p(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new Wp(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Jn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new zp(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===Un.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Un.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Un.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===Un.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===Un.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===Un.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===Un.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isBYOB(){return this.objective===Un.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===Un.EngagementObjective.SHOPPABLE_VIDEO}processPopup(t){let r=JSON.stringify(t),n=this.items[0],i={},s={};if(n){let l=n.selectedOrFirstVariant.value;i={name:n.name,id:n.mID,link:n.link,vID:l.mID,image:n.variantImage,price:ue.formatCurrency(l.price.d),comparePrice:ue.formatCurrency(l.price.cmp),quantity:n.quantity},s={quantity:l.quantity}}let o={productCount:ze.getCurrent().item_count},a=vn.render(r,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return n&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),n.variantImage??n.imageURL)),new Op(JSON.parse(a))}calculateDiscountData(t,r){let n=TE.ArrayUtils.sum(t,s=>s.selectedOrFirstVariant.value.price.d),i={actualPrice:n,discountAmount:0,discountPercentage:0,discountedPrice:n};if(!t?.length||!r||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if(So.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-TE.ArrayUtils.sum(t,s=>s.selectedOrFirstVariant.value.effectivePrice.value);else if([So.DiscountType.UNIQUE_FLAT_ITEMS,So.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===So.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===So.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((o,a)=>a.selectedOrFirstVariant.value.price.d-o.selectedOrFirstVariant.value.price.d);let s=t[t.length-1];s.selectedOrFirstVariant.value.effectivePrice.value=0,i.discountAmount=s.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 wt.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return wt.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[So.DiscountType.UNIQUE_FIXED_ITEMS,So.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(n=>OD.SWIPER_ELEMENTS.has(n.t));if(!t)return!1;if(t.t===62)return!0;let r=ir.get().isMobile()?"sm":"lg";return t.conf[r].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=ze.getCurrent();return{productCount:t.item_count,amount:ue.formatCurrency(t.total_price/100),originalAmount:ue.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,r,n=!1){let i=ke.get().getCurrentItem();t.forEach(s=>{let o=s.selectedOrFirstVariant.value,a=o.price;if(n&&s.mID===i.mID)o.effectivePrice.value=a.d;else{let l=a.d*r/100;o.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(t){if(!t)return{};let r={discountPercentage:ue.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice"].map(n=>{r[n]=ue.formatCurrency(t[n])}),r}},Xl=Pe(Yn()),cx=Pe(K_()),lx=Pe(Sa()),dc=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 r=(new Date().getTime()-this.startTime.getTime())/1e3,n=w({eventName:e,duration:r},t);this.stopIntervals(),this.closeCallback&&this.closeCallback(n)}addInputField(e,t){this.inputFields.push({id:e,type:t,isValid:!1})}updateValidation(e,t){this.inputFields.forEach(r=>{if(r.id===e){r.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:r=100}=this.triggerData.manipulation.productQuantity;if(t>r)return C.error("Invalid range: min should be less than or equal to max."),e;if(e>=t&&e<=r)return e;let n=e%100;return n<t?t:n>r?r:n}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}},ux=Pe(ls()),ix=Pe(j_()),Fs=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return xt.isShopify()}},nU=(0,ix.default)(fetch),rU={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(e,t,r)=>e>=k.API_CALL_MAX_ATTEMPTS?!1:!!(t!==null||r?.status&&r?.status>=500)},Mn=class kD{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new kD),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async r=>{C.log("Updated user profile"),await Bs.getInstance().storeAndPopulateAuthData(r)}).catch(r=>{C.error("Error saving user profile",r)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{C.log("Sent Order")}).catch(r=>{C.error("Error sending track order",r)})}generateDiscount(t){return this.post("/v1/event/generate-discount",t)}updateDeviceProps(t){this.put("/v1/device/update",t).then(()=>{C.log("Updated device property")}).catch(async r=>{C.error("Error saving device property",r)})}setAPIToken(t){this.apiToken=t??""}setFirstSeen(t){this.firstSeen=t?.toUTCString()??""}get(t){return this.requestBackend("GET",t)}post(t,r){return this.requestBackend("POST",t,r)}put(t,r){return this.requestBackend("PUT",t,r)}async requestBackend(t,r,n){if(!Fs.isECommerceApp()&&!Fs.getFlags().allowEvents)return C.log(`Rejecting ${t} ${r} as this is not e-commerce app`),Promise.reject();r.startsWith("http")||(r=Rn.apiURL+r);let i=this.getDefaultHeaders(),s="keepalive"in new Request("");if(n&&!s&&JSON.stringify(n).includes("CE App Background"))try{return this.performXMLHttpRequest(r,i,n)}catch(a){return bt.getInstance().captureException(a,{body:JSON.stringify(n)}),{}}let o={method:t,headers:i,keepalive:!0};return n&&(o.body=JSON.stringify(n)),this.request(r,o)}async request(t,r){let n=w(w({},rU),r),i=await nU(t,n);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(t,r,n){return new Promise((i,s)=>{let o=new XMLHttpRequest;o.open("POST",t,!0),r.forEach((a,l)=>{o.setRequestHeader(l,a)}),o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE)if(o.status>=200&&o.status<300)try{o.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(o.responseText)):s(new Error("Content-Type of response header is not json"))}catch(a){s(a)}else s(new Error(`Received status - ${o.status}(${o.statusText})`))},o.onerror=()=>{s(new Error("Network error occurred during the request."))},o.send(JSON.stringify(n))})}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),Rn.debug&&t.set("cooee-sdk-debug",String(1)),t}},fc=class{static sentryService=bt.getInstance();static httpApiService=Mn.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await ze.getCurrent().getNormalisedCart()).items.map(s=>s.mID);e.items=e.items.filter(s=>!i.includes(s.mID))}if(wt.get().currencyCount<=1)return e.items;let t=e.items.length,r=e.items.map(i=>this.updatedItem(i,e.engagementID)),n=(await Promise.all(r)).filter(i=>i!=null);if(t&&!n.length){let i="Failed to fetch any product from Ajax API",s=new Le(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Ue.getInstance().sendEvent(s),new Error(i)}if(e.isCartRecovery()){let i=ze.getCurrent().items,s=[];for(let o of n)for(let a of o.vars){if(!a.isAvailable)continue;let l=i.find(d=>d.variant_id.toString()===a.mID);if(!l)continue;let c=new Jn(o);c.name=l.title;let h=new yi(a);h.name=l.variant_title,h.price.d=l.discounted_price/100,c.variants=[h],s.push(c)}return s}return n}static async updatedItem(e,t){let r=e,n,i=`/products/${r.slug}.js`;try{n=await this.httpApiService.request(i)}catch(o){return C.error(`Failed to fetch ${i}`,o),o instanceof Response?this.sentryService.captureMessage(`Shopify product fetch failed ${o.status}`,"error",{item:r,path:i},{"engagement.id":t}):this.sentryService.captureException(o,{item:r,path:i},{"engagement.id":t}),null}if(!n)return C.error("Item not found after AJAX call for:",r),null;r.name=n.title,r.tags=n.tags;let s=r.selectedOrFirstVariant.value;return r.vars.map(o=>{let a=n.variants.find(l=>l.id===+o.mID);o.name=a.title,o.isAvailable=a.available,o.price.d=a.price?a.price/100:a.price,o.price.effective=o.price.d,o.price.cmp=a.compare_at_price?a.compare_at_price/100:a.compare_at_price,+s.mID===a.id&&(s.effectivePrice.value=o.price.d)}),r}},pc=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 r="backdrop-filter",n="-webkit-"+r,i=`blur(${e.glossy.radius}px)`;if(!CSS.supports(n,i)&&!CSS.supports(r,i))return{background:e.glossy.fallback.rgba};if(t[n]=i,t[r]=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 r=(e.img.a??0)/100;t.background=`linear-gradient(rgba(0, 0, 0, ${r}), rgba(0, 0, 0, ${r})),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,r){if(r??={},e.type==="LINEAR"){let n=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(n+=`, ${e.c3}`),n+=")",r[t]=n}return r}getColourStyles(e,t="color",r){return r??={},e?e.grad?this.getGradientStyles(e.grad,t,r):(e.hex&&(r[t]=e.rgba),r):r}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}},yt=class extends gi{stylesConverter=new pc(1);renderer=ir.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new Do(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(re(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:r}=e;switch(e.op){case"eq":return t===r;case"gt":return+t>+r;case"gte":return+t>=+r;case"lt":return+t<+r;case"lte":return+t<=+r;case"ne":return t!==r;case"null":return t==null;case"empty":return t.trim()==="";case"in":return new RegExp(`\\b${r}\\b`).test(t);case"nin":return!new RegExp(`\\b${r}\\b`).test(t);default:return C.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,t){e.stopPropagation(),await this.clickExecutor.execute(t)}},iU=0,Rie=Array.isArray;function G(e,t,r,n,i,s){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--iU,__i:-1,__u:0,__source:i,__self:s};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return it.vnode&&it.vnode(c),c}var cr=class extends yt{componentDidMount(){this.setState(()=>({text:this.props.element.text})),Sn(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=""),G("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:G("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()},r=vn.render(JSON.stringify(this.props.element),t),n=new _n(JSON.parse(r));if(!this.matchWhenCondition(n.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:n.text}))}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;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"}}},Vs=class extends cr{render(){return G("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:e=>this.onClick(e,{item:this.props.item}),children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return re(w({},super.getComponentStyles()),{cursor:"pointer"})}},RE=class extends gi{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{children:this.props.time}),G("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{style:this.getTimeLabelStyle(),children:this.props.label}),G("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}},jl=class extends cr{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return G("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>G(RE,{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))})}},$l=class extends yt{componentDidMount(){Sn(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return G("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:G("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 Dn;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return re(w({},this.getTypoStyles()),{display:"flex"})}},ox=Pe(Yn()),zi=class extends yt{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 G("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(e){this.props.element.clc?.at===ox.ClickActionType.ADD_TO_CART&&this.props.triggerContext.triggerData.items[0]&&this.onClick(e,{item:this.props.triggerContext.triggerData.items[0]}),this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex,cursor:this.props.element.clc?.at?"pointer":"auto"};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}},qi=class extends yt{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(Io,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new sc,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}},Wl=class extends qi{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(hc,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},Gl=class extends yt{render(){return G("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(){Sn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;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(G("option",{value:"",selected:!t.selectedSellingPlan,children:"One time purchase"}));for(let r of t.sellingPlans??[])e.push(G("option",{value:r.mID,selected:r.isSelected,children:r.name}));return e}onChange(e){let t=e.target.value;t?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(r=>r.mID===t):this.props.selectedVariant.selectedSellingPlan.value=void 0}},sx=Pe(Lf()),zl=class extends yt{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),vn.escape=sx.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),t=this.getRating();return t||(e.display="none",t=""),G("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:t}})}getRating(){let e=this.props.element.fullStar,t=this.props.element.halfStart,r={size:this.props.element.iconSize,color:this.props.element.c.hex};e=vn.render(e,{svg:r}),t=vn.render(t,{svg:r});let n=this.props.review;if(!n?.rating)return"";let i="";if(this.props.element.showSingleStar)i=e;else{let s=5,o=`${n.rating}`.split(".");for(let a=0;a<+o[0];a++)i+=e,s--;o[1]&&(i+=t,s--);for(let a=0;a<s;a++)i+=e.replace(this.colorRegex,'fill="#f1f1f1')}return i}getComponentStyles(){return{display:"flex",alignItems:"center"}}},ql=class extends yt{render(){return G("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(){Sn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new Dn;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(G("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(r=>r.mID===t)}},hc=class extends yt{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 G(Wl,{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()?G($l,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let t=e,r=this.props.item,n=r.variantImage??r.imageURL,i=r.variantSecondaryImage??r.secondaryImageURL;t.lg=t.sm={src:n,name:r.name,secondarySrc:i};let s=G(zi,{element:t,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?s:G("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 t=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:G(ql,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?G(Gl,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?G(zl,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?G(Vs,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):G(Io,{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=G(cr,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?t:G("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"}))}},ax=Pe(dp()),Us=class extends yt{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=vn.render(e,this.getProductData());if(this.productElement=new Co(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return G("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:G(hc,{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,r=this.props.item.name,n=this.props.item.category,i=ue.formatCurrency(t.d,!0),s=this.props.item.variantImage??this.props.item.imageURL,o=this.props.item.meta,a=this.props.item.tags?.join(",")??"",l=this.props.item.reviews?.rating,c=this.props.item.reviews?.totalReviews,h=t.cmp&&t.cmp>t.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,f={name:r,price:i,quantity:d,image_url:s,meta:o,category:n,rating:l,reviews:c,tags:a},g=e.effectivePrice.value!==t.d;g&&(f.effective_price=ue.formatCurrency(e.effectivePrice.value));let m=this.props.triggerContext.triggerData.discount.type===ax.DiscountType.BXGY;if(!g&&m&&(f.effective_price=ue.formatCurrency(e.effectivePrice.value),f.price=""),h){f.compare_price=ue.formatCurrency(t.cmp);let I=t.cmp-t.d;f.discount_percent=(I/t.cmp*100).toFixed(0),f.discount_price=ue.formatCurrency(I)}let b={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:f,variant:b,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function qp(e,t){if(!e||!window.Swiper)return;let r=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:(n,i)=>`
47
47
  <span class="${i}"
48
48
  style="background-color: ${t.pagination.color?.rgba};"></span>
49
49
  `,renderProgressbar:n=>`
50
50
  <span class="${n}"
51
51
  style="background-color: ${t.pagination.color?.rgba};">
52
52
  </span>
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`),r}function Kp(e,t,r){let n={color:e.navigation.color?.rgba};return e.pagination.enabled&&(n.transform="translateY(-25%)"),G("div",{class:"swiper-container",ref:t,children:[G("div",{class:"swiper-wrapper",children:r()}),e.navigation.enabled&&G("div",{class:"swiper-button-next",style:n,children:G("span",{})}),e.navigation.enabled&&G("div",{class:"swiper-button-prev",style:n,children:G("span",{})}),e.pagination.enabled&&G("div",{className:"swiper-pagination",style:{bottom:0,top:"unset",position:"relative",color:e.pagination.color?.rgba}})]})}var Yl=class extends yt{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&&qp().then(()=>{this.swiperInstance=Yp(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 r=i=>{this.swiperRef=i},n=()=>e?.map(i=>G("div",{class:"swiper-slide",children:this.getProductFragment(i)}));t=G("div",{style:re(w({},this.getCompiledStyles()),{display:"block"}),class:"lc-product-swiper-list",children:Kp(this.configuration,r,n)})}else t=G("div",{style:this.getCompiledStyles(),class:"lc-product-list",children:e?.map((r,n)=>this.getProductFragment(r,n!==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 r=this.props.triggerContext.triggerData,n=r.items.length,i;r.isBundle()?i=this.props.element.prod.symbol?.hide!==!0?n*2-1:n:i=this.props.element.conf[this.deviceTypeKey].maxInRow,t.gridTemplateColumns=`repeat(${i}, auto)`}}return t}getProductFragment(e,t=!1){return G(vi,{children:[G(Us,{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&&G("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:G(cr,{element:this.props.element.prod.symbol,triggerContext:this.props.triggerContext})})]},e.mID)}},Kl=class extends yt{swiperRef=null;swiperInstance=null;constructor(e,t){super(e,t)}componentDidMount(){qp().then(()=>{this.swiperInstance=Yp(this.swiperRef,this.props.element.conf)})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.element,t=n=>{this.swiperRef=n},r=()=>e.values?.map(n=>G("div",{class:"swiper-slide",onClick:i=>this.onClick(i,{clickAction:this.getClickAction(n)}),children:this.renderElement(n)}));return Kp(e.conf,t,r)}getComponentStyles(){return{}}renderElement(e){let t=this.valueAddedSlide(this.props.element.slide,e);switch(t?.t){case 1:return G(zi,{element:t,triggerContext:this.props.triggerContext});case 4:return G(qi,{elements:t.elems,element:t,triggerContext:this.props.triggerContext});default:C.warn("Unknown slide type for carousal")}}valueAddedSlide(e,t){let r=JSON.stringify(e),n=gn.render(r,{form:t});return ar.getParsedElement(JSON.parse(n))}getClickAction(e){let t=w({},this.props.element.clc),r=JSON.stringify(t),n=gn.render(r,{form:e});return JSON.parse(n)}},Io=class extends yt{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"})),Sn(()=>{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 G(qi,{element:t,triggerContext:this.props.triggerContext,elements:t.elems})}if(e.t===61)return G(jl,{element:e,triggerContext:this.props.triggerContext});if(e.t===3)return this.state.showButton?G(Vs,{element:e,triggerContext:this.props.triggerContext}):void 0;if(e.t===2)return G(cr,{element:e,triggerContext:this.props.triggerContext});if(e.t===1)return G(zi,{element:e,triggerContext:this.props.triggerContext});if(e.t===11)return G(Yl,{element:e,triggerContext:this.props.triggerContext});if(e.t===12)return G(Us,{element:e,item:this.props.triggerContext.triggerData.items[0],triggerContext:this.props.triggerContext});if(e.t===62)return G(Kl,{element:e,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}},Zl=class extends yt{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(){Sn(()=>{let e=this.props.triggerContext.triggerData,t=this.props.triggerContext.selectedItems;e.calculateDiscountData(t,this.props.triggerContext.shouldGiveFBTDiscount)})}render(){return G(vi,{children:[G("div",{style:this.getCompiledStyles(),class:"lc-container",onClick:e=>{this.onClick(e,{clickAction:this.clickAction})},children:G(Io,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})}),this.props.triggerContext.triggerData.id==="preview"&&G("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,t){if(this.isClickable)return super.onClick(e,t)}},Qn=class Ca{constructor(t){this.engagementTrigger=t,this.triggerContext=new dc(new Date,this.engagementTrigger)}static renderedEngagements=[];static engagementIDsWithTrackedDisplay=new Set;static DEBOUNCE_TIME=1e3;rootContainer;widgetElement;widget;triggerContext;observers=[];runtimeData=ke.get();widgetAPIService=xe.get($r);safeHTTPService=xe.get(Ue);scrollSubscription;variation;isExclusionWithBVariation;renderSilently(){this.render().catch(t=>bt.getInstance().captureException(t,w({},this.engagementTrigger.sentryContext())))}destroy(){C.log(`${this.engagementTrigger} will be destroyed`),this.scrollSubscription?.unsubscribe(),this.observers.forEach(t=>{t?.disconnect&&t.disconnect()}),this.rootContainer?.remove(),Ca.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){C.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){dx.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){C.log(`${this.engagementTrigger} already has required data to render widget`);return}let t=await this.observeWidgetContainerInViewport();this.handleVariationResponse(t)}handleVariationResponse(t){t&&(C.log(`${this.engagementTrigger} visitor has been assigned to variation ${t.variation}`),t.items?.length&&(this.engagementTrigger.items=t.items.map(r=>new Jn(r)),this.engagementTrigger.nonMutableItems=t.items.map(r=>new Jn(r))),t.bundleFrom&&(this.engagementTrigger.bundleFrom=new Jn(t.bundleFrom)),t.discount&&(this.engagementTrigger.discount=t.discount),t.placement&&(this.triggerContext.triggerData.placement=t.placement),t.props&&ux.JSUtils.hasKeys(t.props)&&(this.engagementTrigger.props=w(w({},this.engagementTrigger.props),t.props)),this.triggerContext.triggerData.widget=this.widget=new uc(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.triggerContext.triggerData.content=t.content,this.isExclusionWithBVariation=this.engagementTrigger.isExclusionTesting()&&this.variation==="b",this.isExclusionWithBVariation&&(this.rootContainer.style.height="0.5px"))}addToRendered(){Ca.renderedEngagements.push(this)}async getVariation(){C.log(`${this.engagementTrigger} get variation`);let t={engagementID:this.engagementTrigger.engagementID,isPreview:this.engagementTrigger.id==="preview"};try{return await this.widgetAPIService.getVariation(t)}catch(r){C.error(`${this.engagementTrigger} unable to get the variation`,r);return}}async observeWidgetContainerInViewport(){if(!this.rootContainer){C.warn(`${this.engagementTrigger} No root container found to watch for viewport`);return}let t=window.innerHeight*.3,r={root:null,rootMargin:`-${t}px 0px ${t}px 0px`,threshold:0};return await this.isInViewport()?this.getVariation():new Promise(n=>{let i=new IntersectionObserver((s,o)=>{s.forEach(async a=>{if(a.isIntersecting){C.log(`${this.engagementTrigger} root container is near the viewport. Fetching variation`);let l=await this.getVariation();n(l),o.unobserve(this.rootContainer)}})},r);i.observe(this.rootContainer),this.observers.push(i)})}attachScroll(){this.scrollSubscription=Bo(window,"scroll").pipe(xr(Ca.DEBOUNCE_TIME)).subscribe(()=>{this.checkAndSendEvent()})}async checkAndSendEvent(){let t=this.engagementTrigger.shortID;if(Ca.engagementIDsWithTrackedDisplay.has(t)||!await this.isInViewport())return;let r={};this.triggerContext.triggerData.items?.length&&(r.promotedMIDs=this.engagementTrigger.items?.map(s=>s.mID));let n=this.isExclusionWithBVariation?k.EVENT_CAMPAIGN_HOLDOUT:k.EVENT_TRIGGER_DISPLAYED,i=new Le(n,r,this.engagementTrigger);i.name===k.EVENT_CAMPAIGN_HOLDOUT&&(i.trigger.holdout=!0),this.safeHTTPService.sendEvent(i),Ca.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 r=window.innerHeight||document.documentElement.clientHeight,n=(Math.min(t.bottom,r)-Math.max(t.top,0))*t.width,i=t.width*t.height,s=n/i*100;return this.engagementTrigger.isAnySplit()?s>0:s>=30}async getWidgetContainer(t){if(this.rootContainer?.isConnected)return this.rootContainer;let r=await this.createParentElementWithPlacement(t);if(r)return r;let n=`.letscooee[data-engagement-id="${this.triggerContext.triggerData.shortID}"]`;return document.querySelector(n)}async createParentElementWithPlacement(t){let r=this.engagementTrigger.placement;if(!r?.selector)return C.warn(`${this.engagementTrigger} does not have a selector`),null;let n=r.selector,i;if(n.includes(k.SHADOW_SPLITTER)){let l=n.split(k.SHADOW_SPLITTER);i=(await ue.retrySelector(l[0].trim()))?.shadowRoot,n=l[1].trim(),i&&vn.injectStylesheet(Rn.styleURL,i);let c=wt.get().website.commonCSS;i&&c&&vn.injectRawCSS(c,i)}C.debug(`${this.engagementTrigger} attempt to render ${r.position}-${n}`);let s=await ue.retrySelector(n,10,i??document);if(!s)return C.warn(`${this.engagementTrigger} no placement found with ${n}`),null;let o=this.generateParentElementID(),a=this.getParentElement(o);if(!t)return a;switch(r.position){case Xl.EngagementPlacementPosition.BEFORE:{s.parentElement?.insertBefore(a,s);break}case Xl.EngagementPlacementPosition.INSIDE_FIRST:{s.insertBefore(a,s.firstChild);break}case Xl.EngagementPlacementPosition.INSIDE_LAST:{s.appendChild(a);break}case Xl.EngagementPlacementPosition.AFTER:default:s.parentElement?.insertBefore(a,s.nextSibling)}return a}async startRendering(){let t;try{t=await fc.refreshItems(this.engagementTrigger)}catch(r){C.error(`${this.engagementTrigger} error refreshing the items`,r);return}if(!t?.length&&this.engagementTrigger.isProductPromoted()){C.warn(`${this.engagementTrigger} is of ${this.engagementTrigger.objective} but no product found`);return}this.engagementTrigger.items=t,this.renderContainer()}getParentElement(t,r=document){let n=r.getElementById(t);if(n)return n;let i=this.engagementTrigger.shortID;return n=document.createElement("div"),n.id=t,n.className=`letscooee letscooee-engagement engagement-${i}`,n.dataset.engagementId=i,this.engagementTrigger.id==="preview"&&(n.className+=" letscooee-preview"),n.style.display="block",n.style.minHeight="0.5px",n.style.minWidth="0.5px",n}renderContainer(){if(!this.widget)return;let t=this.rootContainer;if(this.triggerContext.triggerData.hasSwiperElement()){let r=this.rootContainer?.shadowRoot||this.rootContainer?.attachShadow({mode:"open"}),n=wt.get().website.commonCSS;n&&vn.injectRawCSS(n,r),vn.injectStylesheet(Rn.styleURL,r),vn.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",r),t=r}VT(iE(Zl,{element:this.widget.cont,triggerContext:this.triggerContext,elements:this.widget.elems}),t),this.addToRendered()}updateItems(t,r){let n=this.getItemDiff(t,r),i=this.getItemDiff(r,t);r.push(...n);for(let s of i)lx.ArrayUtils.remove(r,s)}getItemDiff(t,r){return t.filter(n=>!r.some(i=>i.selectedOrFirstVariant.value.mID===n.selectedOrFirstVariant.value.mID))}},Ei=class RD extends Qn{static renderedEngagements=[];constructor(t){super(t)}addToRendered(){RD.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(!qt.get().isOpen()&&this.runtimeData.pageName!=="cart"){C.log("Do not send display event as neither the cart drawer nor the cart page is open.");return}return super.checkAndSendEvent()}},Xp=class PD{constructor(t,r){this.engagementTrigger=t,this.element=r,this.cartItems=ze.getCurrent().items}cartItems;static renderCartUpsell(t){let r=t.placement;if(!r?.selector){C.warn(`No placement available for ${t.objective}`,t.shortID);return}let n=Array.from(document.querySelectorAll(r.selector));if(!n?.length){C.warn(`No placement found for ${t.objective}`,t.shortID);return}for(let i of n)new PD(t,i).render()}render(){let t=this.findCartItemFromHTMLElement();if(!t||this.engagementTrigger.skipSubscribedItems&&t.selling_plan_allocation)return;let r=this.engagementTrigger.items.find(h=>h.mID===t.product_id.toString());if(!r)return;let n=r.vars.find(h=>h.mID===t.id.toString());if(!n)return;let i=new yi(n),s=t.selling_plan_allocation?.selling_plan;if(s)for(let h of i.sellingPlans??[])h.mID===s.id.toString()&&(h.isSelected=!0,i.changeSellingPlan(h));let o=new Jn(r);o.vars=[i],o.selectedOrFirstVariant.value=i;let a=`lc-cart-item-${this.engagementTrigger.shortID}-${r.mID}`;this.element.classList.add(a);let l=new Hn(this.engagementTrigger);l.placement.selector=`.${a}`,l.items=[o];let c=new Ei(l);c.renderSilently(),this.watchForCartItemDeletion(c,a)}watchForCartItemDeletion(t,r){let n=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{o===this.element&&(C.debug(`${r} has been removed`),t.destroy(),n.disconnect())})})});n.observe(this.element.parentElement,{childList:!0,subtree:!0})}findCartItemFromHTMLElement(){let t=this.element.innerHTML;return this.cartItems.find(r=>{if(!(t.includes(r.url)||t.includes(r.variant_id))&&(!t.includes(r.product_title)||r.variant_title&&!t.includes(r.variant_title)))return!1;let n=r.selling_plan_allocation?.selling_plan?.name;return!(n&&!t.includes(n))})}},px=Pe(Yn()),Yi=Pe(Yn()),sU=`
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`),r}function Yp(e,t,r){let n={color:e.navigation.color?.rgba};return e.pagination.enabled&&(n.transform="translateY(-25%)"),G("div",{class:"swiper-container",ref:t,children:[G("div",{class:"swiper-wrapper",children:r()}),e.navigation.enabled&&G("div",{class:"swiper-button-next",style:n,children:G("span",{})}),e.navigation.enabled&&G("div",{class:"swiper-button-prev",style:n,children:G("span",{})}),e.pagination.enabled&&G("div",{className:"swiper-pagination",style:{bottom:0,top:"unset",position:"relative",color:e.pagination.color?.rgba}})]})}var Yl=class extends yt{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&&At.loadSwiperScript().then(()=>{this.swiperInstance=qp(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 r=i=>{this.swiperRef=i},n=()=>e?.map(i=>G("div",{class:"swiper-slide",children:this.getProductFragment(i)}));t=G("div",{style:re(w({},this.getCompiledStyles()),{display:"block"}),class:"lc-product-swiper-list",children:Yp(this.configuration,r,n)})}else t=G("div",{style:this.getCompiledStyles(),class:"lc-product-list",children:e?.map((r,n)=>this.getProductFragment(r,n!==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 r=this.props.triggerContext.triggerData,n=r.items.length,i;r.isBundle()?i=this.props.element.prod.symbol?.hide!==!0?n*2-1:n:i=this.props.element.conf[this.deviceTypeKey].maxInRow,t.gridTemplateColumns=`repeat(${i}, auto)`}}return t}getProductFragment(e,t=!1){return G(vi,{children:[G(Us,{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&&G("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:G(cr,{element:this.props.element.prod.symbol,triggerContext:this.props.triggerContext})})]},e.mID)}},Kl=class extends yt{swiperRef=null;swiperInstance=null;constructor(e,t){super(e,t)}componentDidMount(){At.loadSwiperScript().then(()=>{this.swiperInstance=qp(this.swiperRef,this.props.element.conf)})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.element,t=n=>{this.swiperRef=n},r=()=>e.values?.map(n=>G("div",{class:"swiper-slide",onClick:i=>this.onClick(i,{clickAction:this.getClickAction(n)}),children:this.renderElement(n)}));return Yp(e.conf,t,r)}getComponentStyles(){return{}}renderElement(e){let t=this.valueAddedSlide(this.props.element.slide,e);switch(t?.t){case 1:return G(zi,{element:t,triggerContext:this.props.triggerContext});case 4:return G(qi,{elements:t.elems,element:t,triggerContext:this.props.triggerContext});default:C.warn("Unknown slide type for carousal")}}valueAddedSlide(e,t){let r=JSON.stringify(e),n=vn.render(r,{form:t});return ar.getParsedElement(JSON.parse(n))}getClickAction(e){let t=w({},this.props.element.clc),r=JSON.stringify(t),n=vn.render(r,{form:e});return JSON.parse(n)}},Io=class extends yt{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"})),Sn(()=>{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 G(qi,{element:t,triggerContext:this.props.triggerContext,elements:t.elems})}if(e.t===61)return G(jl,{element:e,triggerContext:this.props.triggerContext});if(e.t===3)return this.state.showButton?G(Vs,{element:e,triggerContext:this.props.triggerContext}):void 0;if(e.t===2)return G(cr,{element:e,triggerContext:this.props.triggerContext});if(e.t===1)return G(zi,{element:e,triggerContext:this.props.triggerContext});if(e.t===11)return G(Yl,{element:e,triggerContext:this.props.triggerContext});if(e.t===12)return G(Us,{element:e,item:this.props.triggerContext.triggerData.items[0],triggerContext:this.props.triggerContext});if(e.t===62)return G(Kl,{element:e,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}},Zl=class extends yt{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(){Sn(()=>{let e=this.props.triggerContext.triggerData,t=this.props.triggerContext.selectedItems;e.calculateDiscountData(t,this.props.triggerContext.shouldGiveFBTDiscount)})}render(){return G(vi,{children:[G("div",{style:this.getCompiledStyles(),class:"lc-container",onClick:e=>{this.onClick(e,{clickAction:this.clickAction})},children:G(Io,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})}),this.props.triggerContext.triggerData.id==="preview"&&G("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,t){if(this.isClickable)return super.onClick(e,t)}},Qn=class Ca{constructor(t){this.engagementTrigger=t,this.triggerContext=new dc(new Date,this.engagementTrigger)}static renderedEngagements=[];static engagementIDsWithTrackedDisplay=new Set;static DEBOUNCE_TIME=1e3;rootContainer;widgetElement;widget;triggerContext;observers=[];runtimeData=ke.get();widgetAPIService=xe.get($r);safeHTTPService=xe.get(Ue);scrollSubscription;variation;isExclusionWithBVariation;renderSilently(){this.render().catch(t=>bt.getInstance().captureException(t,w({},this.engagementTrigger.sentryContext())))}destroy(){C.log(`${this.engagementTrigger} will be destroyed`),this.scrollSubscription?.unsubscribe(),this.observers.forEach(t=>{t?.disconnect&&t.disconnect()}),this.rootContainer?.remove(),Ca.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){C.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){ux.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){C.log(`${this.engagementTrigger} already has required data to render widget`);return}let t=await this.observeWidgetContainerInViewport();this.handleVariationResponse(t)}handleVariationResponse(t){t&&(C.log(`${this.engagementTrigger} visitor has been assigned to variation ${t.variation}`),t.items?.length&&(this.engagementTrigger.items=t.items.map(r=>new Jn(r)),this.engagementTrigger.nonMutableItems=t.items.map(r=>new Jn(r))),t.bundleFrom&&(this.engagementTrigger.bundleFrom=new Jn(t.bundleFrom)),t.discount&&(this.engagementTrigger.discount=t.discount),t.placement&&(this.triggerContext.triggerData.placement=t.placement),t.props&&lx.JSUtils.hasKeys(t.props)&&(this.engagementTrigger.props=w(w({},this.engagementTrigger.props),t.props)),this.triggerContext.triggerData.widget=this.widget=new uc(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.triggerContext.triggerData.content=t.content,this.isExclusionWithBVariation=this.engagementTrigger.isExclusionTesting()&&this.variation==="b",this.isExclusionWithBVariation&&(this.rootContainer.style.height="0.5px"))}addToRendered(){Ca.renderedEngagements.push(this)}async getVariation(){C.log(`${this.engagementTrigger} get variation`);let t={engagementID:this.engagementTrigger.engagementID,isPreview:this.engagementTrigger.id==="preview"};try{return await this.widgetAPIService.getVariation(t)}catch(r){C.error(`${this.engagementTrigger} unable to get the variation`,r);return}}async observeWidgetContainerInViewport(){if(!this.rootContainer){C.warn(`${this.engagementTrigger} No root container found to watch for viewport`);return}let t=window.innerHeight*.3,r={root:null,rootMargin:`-${t}px 0px ${t}px 0px`,threshold:0};return await this.isInViewport()?this.getVariation():new Promise(n=>{let i=new IntersectionObserver((s,o)=>{s.forEach(async a=>{if(a.isIntersecting){C.log(`${this.engagementTrigger} root container is near the viewport. Fetching variation`);let l=await this.getVariation();n(l),o.unobserve(this.rootContainer)}})},r);i.observe(this.rootContainer),this.observers.push(i)})}attachScroll(){this.scrollSubscription=Bo(window,"scroll").pipe(xr(Ca.DEBOUNCE_TIME)).subscribe(()=>{this.checkAndSendEvent()})}async checkAndSendEvent(){let t=this.engagementTrigger.shortID;if(Ca.engagementIDsWithTrackedDisplay.has(t)||!await this.isInViewport())return;let r={};this.triggerContext.triggerData.items?.length&&(r.promotedMIDs=this.engagementTrigger.items?.map(s=>s.mID));let n=this.isExclusionWithBVariation?k.EVENT_CAMPAIGN_HOLDOUT:k.EVENT_TRIGGER_DISPLAYED,i=new Le(n,r,this.engagementTrigger);i.name===k.EVENT_CAMPAIGN_HOLDOUT&&(i.trigger.holdout=!0),this.safeHTTPService.sendEvent(i),Ca.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 r=window.innerHeight||document.documentElement.clientHeight,n=(Math.min(t.bottom,r)-Math.max(t.top,0))*t.width,i=t.width*t.height,s=n/i*100;return this.engagementTrigger.isAnySplit()?s>0:s>=30}async getWidgetContainer(t){if(this.rootContainer?.isConnected)return this.rootContainer;let r=await this.createParentElementWithPlacement(t);if(r)return r;let n=`.letscooee[data-engagement-id="${this.triggerContext.triggerData.shortID}"]`;return document.querySelector(n)}async createParentElementWithPlacement(t){let r=this.engagementTrigger.placement;if(!r?.selector)return C.warn(`${this.engagementTrigger} does not have a selector`),null;let n=r.selector,i;if(n.includes(k.SHADOW_SPLITTER)){let l=n.split(k.SHADOW_SPLITTER);i=(await ue.retrySelector(l[0].trim()))?.shadowRoot,n=l[1].trim(),i&&At.injectStylesheet(Rn.styleURL,i);let c=wt.get().website.commonCSS;i&&c&&At.injectRawCSS(c,i)}C.debug(`${this.engagementTrigger} attempt to render ${r.position}-${n}`);let s=await ue.retrySelector(n,10,i??document);if(!s)return C.warn(`${this.engagementTrigger} no placement found with ${n}`),null;let o=this.generateParentElementID(),a=this.getParentElement(o);if(!t)return a;switch(r.position){case Xl.EngagementPlacementPosition.BEFORE:{s.parentElement?.insertBefore(a,s);break}case Xl.EngagementPlacementPosition.INSIDE_FIRST:{s.insertBefore(a,s.firstChild);break}case Xl.EngagementPlacementPosition.INSIDE_LAST:{s.appendChild(a);break}case Xl.EngagementPlacementPosition.AFTER:default:s.parentElement?.insertBefore(a,s.nextSibling)}return a}async startRendering(){let t;try{t=await fc.refreshItems(this.engagementTrigger)}catch(r){C.error(`${this.engagementTrigger} error refreshing the items`,r);return}if(!t?.length&&this.engagementTrigger.isProductPromoted()){C.warn(`${this.engagementTrigger} is of ${this.engagementTrigger.objective} but no product found`);return}this.engagementTrigger.items=t,this.renderContainer()}getParentElement(t,r=document){let n=r.getElementById(t);if(n)return n;let i=this.engagementTrigger.shortID;return n=document.createElement("div"),n.id=t,n.className=`letscooee letscooee-engagement engagement-${i}`,n.dataset.engagementId=i,this.engagementTrigger.id==="preview"&&(n.className+=" letscooee-preview"),n.style.display="block",n.style.minHeight="0.5px",n.style.minWidth="0.5px",n}renderContainer(){if(!this.widget)return;let t=this.rootContainer;if(this.triggerContext.triggerData.hasSwiperElement()){let r=this.rootContainer?.shadowRoot||this.rootContainer?.attachShadow({mode:"open"}),n=wt.get().website.commonCSS;n&&At.injectRawCSS(n,r),At.injectStylesheet(Rn.styleURL,r),At.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",r),t=r}BT(rE(Zl,{element:this.widget.cont,triggerContext:this.triggerContext,elements:this.widget.elems}),t),this.addToRendered()}updateItems(t,r){let n=this.getItemDiff(t,r),i=this.getItemDiff(r,t);r.push(...n);for(let s of i)cx.ArrayUtils.remove(r,s)}getItemDiff(t,r){return t.filter(n=>!r.some(i=>i.selectedOrFirstVariant.value.mID===n.selectedOrFirstVariant.value.mID))}},Ei=class ND extends Qn{static renderedEngagements=[];constructor(t){super(t)}addToRendered(){ND.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(!Yt.get().isOpen()&&this.runtimeData.pageName!=="cart"){C.log("Do not send display event as neither the cart drawer nor the cart page is open.");return}return super.checkAndSendEvent()}},Zp=class RD{constructor(t,r){this.engagementTrigger=t,this.element=r,this.cartItems=ze.getCurrent().items}cartItems;static renderCartUpsell(t){let r=t.placement;if(!r?.selector){C.warn(`No placement available for ${t.objective}`,t.shortID);return}let n=Array.from(document.querySelectorAll(r.selector));if(!n?.length){C.warn(`No placement found for ${t.objective}`,t.shortID);return}for(let i of n)new RD(t,i).render()}render(){let t=this.findCartItemFromHTMLElement();if(!t||this.engagementTrigger.skipSubscribedItems&&t.selling_plan_allocation)return;let r=this.engagementTrigger.items.find(h=>h.mID===t.product_id.toString());if(!r)return;let n=r.vars.find(h=>h.mID===t.id.toString());if(!n)return;let i=new yi(n),s=t.selling_plan_allocation?.selling_plan;if(s)for(let h of i.sellingPlans??[])h.mID===s.id.toString()&&(h.isSelected=!0,i.changeSellingPlan(h));let o=new Jn(r);o.vars=[i],o.selectedOrFirstVariant.value=i;let a=`lc-cart-item-${this.engagementTrigger.shortID}-${r.mID}`;this.element.classList.add(a);let l=new Hn(this.engagementTrigger);l.placement.selector=`.${a}`,l.items=[o];let c=new Ei(l);c.renderSilently(),this.watchForCartItemDeletion(c,a)}watchForCartItemDeletion(t,r){let n=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{o===this.element&&(C.debug(`${r} has been removed`),t.destroy(),n.disconnect())})})});n.observe(this.element.parentElement,{childList:!0,subtree:!0})}findCartItemFromHTMLElement(){let t=this.element.innerHTML;return this.cartItems.find(r=>{if(!(t.includes(r.url)||t.includes(r.variant_id))&&(!t.includes(r.product_title)||r.variant_title&&!t.includes(r.variant_title)))return!1;let n=r.selling_plan_allocation?.selling_plan?.name;return!(n&&!t.includes(n))})}},fx=Pe(Yn()),Yi=Pe(Yn()),oU=`
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
- `,To=class{static navigate(e,t,r){let n=`${location.origin}/discount/${e}`;switch(C.log(`Applying discount code ${e}`,t,r),t){case Yi.RedirectBehaviour.CART_PAGE:location.href=`${n}?redirect=/cart`;break;case Yi.RedirectBehaviour.CART_DRAWER:location.href=`${n}?redirect=${location.pathname}#${k.HASH_OPEN_CART_DRAWER}=1`;break;case Yi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href=`${n}?redirect=/checkout`;break;case Yi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`${n}?redirect=/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;default:location.href=`${n}?redirect=${r||location.pathname}`}}static navigateWithoutDiscount(e,t){let r=qt.get();switch(e){case Yi.RedirectBehaviour.CART_PAGE:location.href="/cart";break;case Yi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href="/checkout";break;case Yi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;case Yi.RedirectBehaviour.CART_DRAWER:{r.open();break}}t&&r.refreshUI(t)}static async applyWithStorefront(e){let t=wt.get().storefrontToken;if(!t)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",t);let n=JSON.stringify({query:sU,variables:{cartId:`gid://shopify/Cart/${ze.getCurrent().token}`,discountCodes:[e]}}),i={method:"POST",headers:r,body:n};await Mn.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}},fx=Pe(Sa()),aU=`
65
+ `,To=class{static navigate(e,t,r){let n=`${location.origin}/discount/${e}`;switch(C.log(`Applying discount code ${e}`,t,r),t){case Yi.RedirectBehaviour.CART_PAGE:location.href=`${n}?redirect=/cart`;break;case Yi.RedirectBehaviour.CART_DRAWER:location.href=`${n}?redirect=${location.pathname}#${k.HASH_OPEN_CART_DRAWER}=1`;break;case Yi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href=`${n}?redirect=/checkout`;break;case Yi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`${n}?redirect=/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;default:location.href=`${n}?redirect=${r||location.pathname}`}}static navigateWithoutDiscount(e,t){let r=Yt.get();switch(e){case Yi.RedirectBehaviour.CART_PAGE:location.href="/cart";break;case Yi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href="/checkout";break;case Yi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;case Yi.RedirectBehaviour.CART_DRAWER:{r.open();break}}t&&r.refreshUI(t)}static async applyWithStorefront(e){let t=wt.get().storefrontToken;if(!t)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",t);let n=JSON.stringify({query:oU,variables:{cartId:`gid://shopify/Cart/${ze.getCurrent().token}`,discountCodes:[e]}}),i={method:"POST",headers:r,body:n};await Mn.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}},dx=Pe(Sa()),sU=`
66
66
  mutation cartCreate($input: CartInput) {
67
67
  cartCreate(input: $input) {
68
68
  cart {
@@ -75,6 +75,6 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
75
75
  }
76
76
  }
77
77
  }
78
- `,xo=class{async performAddToCart(e,t){if(!e.length)return;let r=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),n=xt.getCartURL("cart/add.js"),i={items:r},s=qt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(n,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return C.log(`Added ${e.length} items to Cart`),ue.showSnackbar("Product added to your cart"),a.json()}catch(a){C.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!fx.JSUtils.hasKeys(t)){C.warn("No update fields provided");return}let r=xt.getCartURL("cart/change.js"),n=w({id:e.key},t),i=JSON.stringify(n);try{let s=await fetch(r,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(C.log(`Updated ${e}`),ze.getCurrent().update(s.json()))}catch(s){C.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),C.log(`Code-${e} copied`),ue.showSnackbar("Discount code copied")}catch(t){C.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=xt.getProductSlug(e.link);t&&(location.pathname=xt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){C.warn("Trying to upgrade to subscription with no item");return}let r=await ze.getCurrent().getNormalisedCart(),n=e.selectedOrFirstVariant.value,i=r.items.findIndex(c=>c.vID===n.mID),s=n.selectedSellingPlan.value,o=xt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){C.log(`Upgraded ${e} selling plan`),ue.showSnackbar("Line item updated");let h=await c.json();return ze.getCurrent().update(h),h}}catch(c){C.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,r){let n=wt.get().storefrontToken;if(!n)throw new Error("Storefront token not set for the store");if(!e?.vID){C.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:r.getKVFormatPrivateAttributesForLineItem()}],o=await ue.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",n);let l=JSON.stringify({query:aU,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await Mn.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e.clickAction,r=e.items,n=e.triggerData;if(t.at){let i=t;if(C.log(`Performing ${JSON.stringify(i)} action`),i.at===101)r?.length&&this.performGoToItem(r[0]);else if(i.at===102)r?.length&&await this.performAddToCart(r,n);else if(i.at===103)await this.performCopyCoupon(n.discount.code);else if(i.at===105)qt.get().open();else if(i.at===104){let s=e.collections;if(!s?.length)return;location.pathname=xt.getRootPrefix()+"collections/"+s[0].handle}}t.applyDiscount&&n.discount?.code&&To.navigate(n.discount.code,n.redirectBehaviour)}getVIDAndQuantity(e){let t,r;if(e instanceof pn)t=e.vID,r=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,r=1}return{vID:t,quantity:r}}},Jp=class extends Ei{ctaListener=new xo;constructor(e){super(e),mi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Si(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=ze.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await ze.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let r of t){if(e.amount<r.minValue)break;if(C.log("Current milestone",r),r.rewardType===px.MilestoneRewardType.FREE_AUTO_GIFT){let n=r.items[0],i=e.items.find(s=>s.vID===n.vID||s.mID===n.mID);if(i)C.log(`Item(vID:${n.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.performAddToCart([n],this.engagementTrigger);qt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await ze.getCurrent().getNormalisedCart()).items.filter(r=>r.vID!==e?.vID&&r.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let r of t)await this.ctaListener.performUpdate(r,{quantity:0})}},Qp=class extends Qn{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 r=t.detail;this.safeHTTPService.sendEvent(r)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},hx=Pe(Sa()),eh=class extends Qn{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,r=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,n=e.detail;if(!hx.JSUtils.hasKeys(n)){C.error(`No detail received for ${r}`);return}C.log("Detail received for BYOB",n);let i=n.campaignID??n.campaignId??n.campaign_id;if(i!==t.shortID&&i!==t.engagementID){C.warn(`Current ${r} is not BYOB. Received: ${i}`);return}let s=n.items;if(!s?.length)return;let o=s.map(a=>new pn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new Do(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},mc=class{runtimeData=ke.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ei.renderedEngagements];Ei.renderedEngagements.length=0;for(let r of e)C.log(`\u{1F4E3} ${r} received as cart embed`),!this.findAndUpdateCurrent(r,t)&&(C.log(`${r} is new`),r.isProgressBar()?new Jp(r).renderSilently():r.isSubscriptionUpsell()?Xp.renderCartUpsell(r):new Ei(r).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Qn.renderedEngagements];Qn.renderedEngagements.length=0;for(let r of e)C.log(`\u{1F4E3} ${r} received as page embed`),!this.findAndUpdateCurrent(r,t)&&(C.log(`${r} is new`),r.isShoppableVideo()?new Qp(r).renderSilently():r.isBYOB()?new eh(r).renderSilently():new Qn(r).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let r=t.findIndex(n=>n.isSameTrigger(e));return r<0||e.isSubscriptionUpsell()?!1:(t[r].update(e),t[r].renderSilently(),t.splice(r,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},gc=class{runtimeData=ke.get();httpService=xe.get(Mn);sessionManager=xe.get(Yt);constructor(){}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 ze.getCurrent().getNormalisedCart()}catch(i){C.error("Error fetching Shopify cart before sending widget call",i)}let t=new URLSearchParams(location.search),r=t.get("cooee-preview");r?e.previewIDs=r.trim().split(",").filter(i=>Number.isInteger(+i)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let n=t.get("cooee-variant");return n?e.previewVariant=n:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}async addSessionContext(e){let t=await this.sessionManager.checkSessionAndGetContext();e.sessionID=t[0],e.sessionNumber=t[1],e.landingPage=t[2],e.page=hi.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),t=[];return e.forEach(r=>{let n=r.dataset.engagementId;n&&+n&&t.push(n)}),t}},$r=class AD extends gc{static INSTANCE;loadWidgetsSubject=new ie;constructor(){super(),this.loadWidgetsSubject.pipe(xr(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>C.error("Unable to initiate page widgets",t))}),mi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new AD),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){Yt.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>C.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){Yt.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){Yt.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();C.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async r=>{let n=r.widgets.map(i=>new Hn(i));new mc().processPageWidgetResponse(n)}).catch(r=>{C.error("Error sending widget getter",r)})}async loadCartWidgets(){let t=await this.getWidgetProps();C.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async r=>{let n=r.widgets.map(i=>new Hn(i));new mc().processCartWidgetResponse(n)}).catch(r=>{C.error("Error sending widget getter",r)})}async getVariation(t){let r=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),r))}renderCachedCartWidgets(){new mc().processCartWidgetResponse(this.runtimeData.cartEngagements)}},th=class{eventAPIService;constructor(){this.eventAPIService=xe.get(Ro)}processResponse(e){for(let t of e)t.experiment?.cssSelector&&this.runExperiment(t)}async runExperiment(e){if(!e.experiment?.cssSelector){C.error("No CSS selector present in experiment",e.toString);return}let t;try{t=await ue.retrySelectors(e.experiment.cssSelector)}catch{C.error("Fail to get CSS selector for experiment",e.toString());return}if(t?.length){for(let r of t)if(e.experiment.op==="SHOW")r.style.display="block";else if(e.experiment.op==="HIDE")r.style.display="none";else{C.error("Invalid experiment operation",e.toString);return}this.eventAPIService.trackExperiment({name:k.EVENT_EXPERIMENT_START,experiment:new yo(e)}).catch(r=>{C.error("Fail to track experiment",r)})}}},Ro=class LD extends gc{static INSTANCE;constructor(){super()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new LD),this.INSTANCE}loadExperimentSilently(){rt.get(ge.SDK_TOKEN).then(t=>{t?this.loadExperiments().catch(r=>C.error("Unable to initiate experiment",r)):Yt.replaySubject.subscribe(async()=>{this.loadExperiments().catch(r=>C.error("Unable to initiate experiment",r))})})}async loadExperiments(){if(!this.runtimeData.activeExperiment)return;let t=await this.getWidgetProps();C.log("Load experiments",t),this.httpService.post("/v1/engagement/experiments",t).then(async r=>{let n=r.experiments.map(i=>new Hn(i));new th().processResponse(n)}).catch(r=>{C.error("Error sending experiment getter",r)})}async trackExperiment(t){await this.addSessionContext(t),await this.httpService.post("/v1/event/experiment",t)}},nh=class{runtimeData=ke.get();widgetAPIService=xe.get($r);experimentAPIService=xe.get(Ro);meddle(){let e=_t.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=_t.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.loadExperiments=()=>{this.experimentAPIService.loadExperimentSilently()},e.previewWidget=_t.previewWidget.bind(_t),e.previewPopup=_t.previewPopup.bind(_t)}overwritePush(e,t){Pa(e,"push",t)}meddleAccount(){this.overwritePush(_t.globalRef.account,(...e)=>{this.processAccount(e[0])}),_t.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(_t.globalRef.events,(...e)=>{this.processEvent(e[0])}),_t.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(_t.globalRef.profile,(...e)=>{this.processProfile(e[0])}),_t.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(_t.globalRef.screen,(...e)=>{this.processPageName(e[0])}),_t.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&_t.authenticate(e),e.flags&&Fs.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?_t.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):_t.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&_t.updateProfile(e)}processPageName(e){e&&_t.setPageName(e)}meddlePage(){this.overwritePush(_t.globalRef.page,(...e)=>{this.processPage(e[0])}),_t.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&&_t.setPageName(e.pageName),e.activeExperiment&&(this.runtimeData.activeExperiment=e.activeExperiment)}},vc=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))}},yc=class su{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=xe.get(Ue);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new su),this.INSTANCE}resetScrollID(t){vc.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)}ue.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Bo(window,"scroll").pipe(xr(su.DEBOUNCE_TIME),dr(()=>{let t=this.getPercentScrolledY();if(t>100){C.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)>=su.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let r={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let n=vc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new Le(k.EVENT_SCROLL,r,null,n);this.safeHttpService.sendEvent(i),vc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,r=window.innerHeight;return Math.ceil((window.scrollY+r)/t*100)}},rh=class MD{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=xe.get(Ue);runtimeData=ke.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){C.info("Not sending background event as user was inactive on website");return}C.info(`Sending background event with ${t} seconds`);let r={};r[MD.ACTIVE_DURATION]=t,this.apiService.sendEvent(new Le(k.EVENT_APP_BACKGROUND,r))}},ih=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof _i&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(r=>{if(r.url){let n=new FontFace(k.COOEE+e.name,r.getURL(),r.getFontDescriptor());t.push(n.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(r=>{document.fonts.add(r)})}},oh=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),C.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},sh=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ue.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&await this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:await this.collectFormData();break;case void 0:case 105:break;default:C.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;ue.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())}async closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),await this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){C.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)){C.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"),r=Notification.permission;return{camera:e,location:t,notification:r}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}async collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let r=document.getElementById(t.id).value;t.type===51?e.email=r:t.type===52&&(e.mobile=r)}await this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),ue.showSnackbar("Coupon applied on cart"),oh.updateIdentity(e)}async dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};await new xo().processEvent(t);let r={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}},Sr=class{renderer=ir.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,r){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=r,this.stylesConverter=new pc(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=re(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 Os(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 sh(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},wi=class extends Sr{constructor(e,t,r){super(e,t,r)}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 r=[];t.u&&r.push("underline"),t.st&&r.push("line-through"),r.length||r.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",r.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?Qa[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},Jl=class extends wi{constructor(e,t,r){super(e,t,r),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()}},Ql=class extends Sr{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},Hs=class extends Sr{constructor(e,t,r){super(e,t,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()}},eu=class UD extends Sr{constructor(t,r,n){super(t,r,n),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",UD.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 r=this.inappElement.spc,n=this.stylesConverter.getScaledSize(t.w)+r.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+r.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",n+"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(){}},ah=class extends Sr{constructor(e,t,r){super(e,t,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}},_c=class extends wi{borderColor="";constructor(e,t,r){super(e,t,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",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},ch=class VD extends _c{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,r,n){super(t,r,n)}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,r){t.addEventListener("keydown",n=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(VD.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(r,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(r,!1)),n.stopPropagation()})}},lh=class BD extends _c{static MOBILE_REGEX=/^\d+$/;constructor(t,r,n){super(t,r,n)}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,r){t.addEventListener("keydown",n=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(BD.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(r,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(r,!1)),n.stopPropagation()})}},uh=class Xi extends wi{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,r,n){super(t,r,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=re(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(r=>this.renderer.setStyles(r,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(Xi.DAYS)),t.hour&&this.elements.push(this.getChild(Xi.HOURS)),t.minute&&this.elements.push(this.getChild(Xi.MINUTES)),t.second&&this.elements.push(this.getChild(Xi.SECONDS)),this.elements.forEach(r=>this.inappHTMLEl.appendChild(r))}getChild(t){let r=this.renderer.createElement("div"),n=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,n.innerText="00",n.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(n,"text-align","center"),this.renderer.setStyle(n,"font-family","inherit"),this.inappElement.lblPos==="start"?(r.appendChild(i),r.appendChild(n)):(r.appendChild(n),r.appendChild(i)),this.renderer.setStyle(r,"display","flex"),this.renderer.setStyle(r,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(r,"justify-content","center"),this.renderer.setStyle(r,"align-items","center"),this.renderer.setStyle(r,"gap","5px"),this.spans.push(n),r}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,r=>{this.spans.forEach(n=>{n.id===`lc-${Xi.DAYS}`?n.innerText=String(r.days).padStart(2,"0"):n.id===`lc-${Xi.HOURS}`?n.innerText=String(r.hours).padStart(2,"0"):n.id===`lc-${Xi.MINUTES}`?n.innerText=String(r.minutes).padStart(2,"0"):n.id===`lc-${Xi.SECONDS}`&&(n.innerText=String(r.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},dh=class extends wi{constructor(e,t,r){super(e,t,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",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new yi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let r=this.parentHTMLEl.querySelector("#coo-13");if(!r)return;let n=e.imgs[0]??t.imgs?.at(0);n?.url&&r.setAttribute("src",n.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let r=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(n=>{t.add(this.createOption(n.name??"Default",n,n.mID===r?.vID))})}createOption(e,t,r){let n=this.renderer.createElement("option");return n.text=e,n.value=JSON.stringify(t),r&&(n.selected=!0),t||(n.disabled=!0),n}},fh=class extends Hs{constructor(e,t,r){super(e,t,r)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},Ec=class Sc{static ACTIVE_TRIGGER_DATA;renderer=ir.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ue.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 Hn(t))}async renderEngagement(t){if(this.triggerContext=new dc(new Date,t),this.triggerContext.onClose(r=>{this.closeInApp(r)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let r=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(r)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!qt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=qt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){Sc.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){bt.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&&Sc.ACTIVE_TRIGGER_DATA){let n={triggerShown:new yo(Sc.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,n),!0}if(ke.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let r=k.PAYMENT_MODAL_DETAILS.find(n=>!!document.querySelector(n.identifier));return r?(this.skipTrigger(t,{reason:`${r.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new eu(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw C.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let r=new Le(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(r);let n={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}sendTriggerClosed(t){let r=t.eventName;delete t.eventName;let n=new Le(r,t,this.triggerContext.triggerData);n.name===k.EVENT_TRIGGER_CLICKED&&(n.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(n)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,r,n){r instanceof rc?new ch(t,r,n).render():r instanceof ic?new lh(t,r,n).render():r instanceof Eo?new Jl(t,r,n).render():r instanceof oc?new fh(t,r,n).render():r instanceof Gi?new Hs(t,r,n).render():r instanceof Ps?new Ql(t,r,n).render():r instanceof tc?new uh(t,r,n).render():r instanceof nc?new dh(t,r,n).render():C.error("Unsupported element type- "+r.type)}renderContainer(t){let r=this.ian?.cont;r&&(this.containerHTMLElement=new ah(this.rootContainer,r,t).render().getHTMLElement(),new ih().loadAllFonts(this.ian),this.ian.elems?.forEach(async n=>{await this.renderElement(this.containerHTMLElement,n,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let r=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),Sc.ACTIVE_TRIGGER_DATA=void 0;let n=this.containerHTMLElement.animate(r,{duration:500,easing:"ease-in-out"});n.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){ir.get().removeInApp(this.triggerContext)}skipTrigger(t,r){let n=new Le(k.EVENT_CAMPAIGN_REJECTED,r,t);this.safeHTTP.sendEvent(n)}async preloadImages(t){let r=t.ian;if(!r)return;let n=[];r.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&n.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;n.push(this.getPromise(o))}}),r.bg?.img?.src&&n.push(this.getPromise(r.bg.img.src)),r.cont.bg?.img?.src&&n.push(this.getPromise(r.cont.bg.img.src)),await Promise.all(n)}getPromise(t){return new Promise(r=>{let n=new Image;n.onload=r,n.src=t,n.style.display="none"})}},ph=class{compareCartItemSubject=new ie;constructor(){this.compareCartItemSubject.pipe(xr(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(r=>C.error("Unable to process cart change in XMLHttpRequest",r))}),t.apply(this,arguments)},C.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(r){return t.apply(window,arguments).then(n=>(e.performEvent(r.toString()).catch(i=>C.error("Unable to process cart change in fetch",i)),n))},C.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(ke.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let r=e?.items,n=t.items,i=[],s=[];if(C.debug(`Comparing cart change with old count ${r?.length} to new count ${n.length}`),n?.forEach(o=>{let a=r?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=re(w({},o),{quantity:c});l?i.push(h):s.push(h)}r&&ue.removeFromArray(r,a)}else i.push(o)}),r)for(let o of r)s.push(o);C.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&mi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let r=new Le(e,t);xe.get(Ue).sendEvent(r)}async compareCartItems(){let e=await rt.get(ge.CURRENT_CART,{}),t=await ze.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},hh=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(r,n){try{await e.modifyRequest(r,n)}catch(i){bt.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(n?.body)})}return t(r,n)},C.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let r=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(r.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let n;if(typeof t.body=="string")try{n=JSON.parse(t.body)}catch{return}else n=t.body;C.debug("Intercepted fetch request of:",r),n?.query.includes("cartCreate")&&(t.body=await this.updatedBody(n),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],r=await ue.getCartAttributes();return e.variables.input.attributes=[...t,...r],JSON.stringify(e)}sendBuyNowEvent(){let e=ke.get().getCurrentItem();if(!e)return;let t=new Le(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ue.getInstance().sendEvent(t)}},wc=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,r=new Le(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ue.getInstance().sendEvent(r),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>C.error(e))}async listen(){this.elements=await ue.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},mh=class Pf extends wc{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(Pf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Pf),this.INSTANCE}},gh=class Hv extends wc{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(Hv.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Hv),this.INSTANCE}},vh=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(){ue.onDocumentLoaded(()=>{C.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){C.debug("No clickable cart checkout button found");return}C.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&qt.get().open()}},yh=class{trackSilently(){this.track().catch(e=>bt.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let r={};this.processSmallCheckout(e,r),this.processBigCheckout(t,r);let n=this.getTokenFromCurrentURLPath();if(n&&(r.urlToken=n),!Object.keys(r).length){C.warn("No processable data found in",e,t);return}r.referrer=document.referrer,r.url=location.href;let i=await xe.get(Yt).checkSessionAndGetContext();r.sessionID=i[0],this.trackOrder(r)}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){C.info("Found order to be send",e),Ue.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))}},tu=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await ze.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},r=new Le(k.EVENT_CHECKOUT_STARTED,t);Ue.getInstance().sendEvent(r)})}},_h=class{async migrate(){}};gn.escape=mx.MustacheUtils.escapeHtml;var _t=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new _h().migrate(),this.autoAuthenticate(),new nh().meddle(),xe.get(Ro).loadExperimentSilently(),new rh().listen(),new yh().trackSilently(),new ph().listen(),new hh().listen(),new vh().listen(),xe.get(yc).listen(),xe.get(gh).listenSilently(),xe.get(mh).listenSilently(),xe.get($r).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),br.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||Pa(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,Pa(this.globalRef,"config",new wt),Pa(this.globalRef,"runtimeData",new ke),C.debug("Global reference initialised")}static injectWidgetAssets(){vn.injectScriptURL(Rn.widgetURL,"cooee-widget-sdk"),vn.injectStylesheet(Rn.styleURL)}static autoAuthenticate(){let e=xt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),r=e.shopifyShop;if((ue.isNull(t)||t.length!==24)&&ue.isNull(r)){C.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,xe.get(Yt).init(e)}static sendEvent(e,t,r){for(let i in t)if(i.length>3&&i.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");let n=new Le(e,t,r?.triggerData);r?.occurred&&(n.occurred=r.occurred),xe.get(Ue).sendEvent(n)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");xe.get(Ue).updateProfile(e)}static setPageName(e){if(!e)return;let t=ke.get(),r=t.pageName;if(e===r)return;if(t.pageName=e,e==="cart"&&xe.get($r).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){xe.get(yc).resetScrollID();return}let n={};r&&(n.ps=r);let i=new Le(k.EVENT_SCREEN_VIEW,n);i.occurred=t.jsLoadTime,xe.get(Ue).sendEvent(i),xe.get(yc).resetScrollID(i.occurred)}static previewPopup(e,t){new Ec(t).render(e)}static previewWidget(e){new Qn(new Hn(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){C.error(e)}window.addEventListener("message",e=>{if(C.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=ke.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:r}=t.detail;r&&this.updateProfile({goKwikToken:r})}),window.gokwikSdk?tu.attachCheckoutListener():window.addEventListener("gokwikLoaded",tu.attachCheckoutListener)}static storePreviewParams(){let e=ke.get(),t=new URLSearchParams(location.search),r=t.get("cooee-preview");r&&(e.previewIDs=r.trim().split(",").filter(i=>Number.isInteger(+i)));let n=t.get("cooee-variant");n&&(e.previewVariant=n)}},Eh=class FD{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new FD),this.INSTANCE}init(){Ol.get(ge.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){C.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let r=this.updateGlobalConfig(t);Ol.set(ge.APP_CONFIG,r).catch(n=>C.error(n)),gp.processConfiguration(),r.website&&(vn.injectRawScript(r.website.commonJS),vn.injectRawCSS(r.website.commonCSS)),qt.get().onToggle().subscribe(async({open:n})=>{C.info("Cart drawer is now",n?"open":"closed"),n&&(xe.get($r).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let r=_t.globalRef.config.update(t);return qt.forceUpdate(),C.debug("App configurations",r),r}async trackViewCartEvent(){let t=await ze.getCurrent().getNormalisedCart(),r={value:t.amount,currency:t.currency},n={items:t.items,amount:r,drawer:!0};Ue.getInstance().sendEvent(new Le(k.EVENT_VIEW_CART,n))}},gx=Pe(W_()),wh=class j_{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 gx.URLBuilder(location.href)}catch{return{}}let r={};if(this.META_REQUIRED_FIELDS.every(n=>Array.from(t.getParams().keys()).includes(n)))return r={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new j_(r);if(this.GOOGLE_REQUIRED_FIELDS.every(n=>Array.from(t.getParams().keys()).includes(n)))return r={source:"GOOGLE"},new j_(r)}},Bs=class jD{static INSTANCE;httpAPIService=Mn.getInstance();coreService=Eh.getInstance();sentryService=bt.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new jD),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await rt.set(ge.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await rt.set(ge.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await rt.set(ge.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),C.log("Validating session with server");let r=await this.getSessionValidateData(t);try{let n=await this.httpAPIService.validateSession(r);C.log("Validating session Response",n),await this.coreService.processAppConfigurations(n.appSettings),await this.storeAndPopulateAuthData(n)}catch(n){throw C.error(n),n}}async populateUserDataFromStorage(){if(this.sdkToken=await rt.get(ge.SDK_TOKEN),!this.sdkToken){C.warn("No SDK token found in local storage");return}this.userID=await rt.get(ge.ID),this.deviceID=await rt.get(ge.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){C.debug("SDK Token:",this.sdkToken),C.log("Device ID:",this.deviceID),C.log("User ID:",this.userID),Ya.trackDeviceID(this.deviceID),br.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 r=await new hp().get();r.host=location.origin;try{(await ST())?.isPrivate&&(r.private=!0)}catch(i){vx.default.error("Unable to detect private/incognito window",i)}let n=await rt.get(ge.DEVICE_ID);return n||(n=new an().toHexString(),await rt.set(ge.DEVICE_ID,n)),re(w({deviceID:n,deviceProps:r,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:hi.parseFromCurrent(),ad:wh.getAdParams(),occurred:this.getSessionStartTime(ke.get().jsLoadTime),currentItem:ke.get().getCurrentItem(),cart:await ze.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await rt.get(ge.FIRST_SEEN),r=t?new Date(t):new Date;t||await rt.set(ge.FIRST_SEEN,r.toISOString()),this.httpAPIService.setFirstSeen(r),this.sentryService.setGlobalContext("Visitor Info",{first_seen:r.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},Yt=class Cc{static replaySubject=new Po(1);static INSTANCE;sentryService=xe.get(bt);lock=new qa;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Cc),this.INSTANCE}init(t){if(C.debug("Initialising SDK",t),bT(navigator.userAgent)){C.info("This seems to be a bot. Disabling SDK");return}Bs.getInstance().init(t),Cc.INSTANCE.checkForNewSession(!0).then(async()=>{Cc.replaySubject.next(!0),Cc.replaySubject.complete()}).catch(r=>C.error("Unable to perform device init",r))}getCurrentSessionID(){return hn.set(ge.SESSION_LAST_USED_TIME,new Date().getTime()),hn.get(ge.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 r=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,r=!0):await this.notSynced()&&(r=!0),t){let n=await this.getContext();await Bs.getInstance().validateSession({sessionID:n[0],sessionNumber:n[1],landingPage:n[2],newSession:r}),await hn.set(ge.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){C.debug("Starting new session"),await hn.clear(),C.debug("Cleared SessionStorage before starting new session");let t=new Date,r=new an().toHexString();C.debug("New session ID to be used",r);let n=await rt.get(ge.SESSION_NUMBER,0)+1;br.prepend(`New Session ID: <strong>${r}</strong> & number: ${n}`),await Promise.all([rt.set(ge.SESSION_NUMBER,n),hn.set(ge.ID,r),hn.set(ge.SESSION_LAST_USED_TIME,t.getTime()),hn.set(ge.SESSION_LANDING_PAGE,hi.parseFromCurrent())])}getLandingPage(){return hn.get(ge.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return rt.get(ge.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await hn.get(ge.ID))return!0;let t=await hn.get(ge.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await hn.get(ge.SESSION_SYNCED,!1)}},Ex=Pe(Yn()),yx=Pe(Yn()),_x=Pe(Sa()),bh=class{triggerData;safeHttpService=Ue.getInstance();render(e){e.contentSource===yx.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){C.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new Le(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let r=this.getFormDetails(t);this.safeHttpService.sendEvent(new Le(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 Le(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},r=e.metaData;if(_x.JSUtils.hasKeys(r)){let n=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(r).forEach(o=>{n.includes(o)||(t[o]=r[o])}),t.email=r.$email??r.email,t.mobile=r.$phone_number??r.phone_number;let i=r.$first_name??r.first_name,s=r.$last_name??r.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},Ch=class{static trackIntent(e){if(!this.isInstalled()){C.log("Facebook pixel not installed");return}if(!wt.get().pixelPush){C.log("Facebook pixel push not enabled");return}let t=Rs[e.intent]?.toLowerCase(),r=e.segmentName;!t&&!r||(C.debug(`Sending ${t} intent and ${r} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},Sh=class HD{static INSTANCE;httpService=xe.get(Mn);sentryService=xe.get(bt);sessionManager=xe.get(Yt);runtime=ke.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new HD),this.INSTANCE}sendSilently(t){this.send(t).catch(r=>C.error(`Failed to send ${t.name}`,r))}async send(t){if(C.debug(`Sending event ${t.name}`),br.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){C.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 r=>{C.log("\u2705 Event tracked:",t.name),br.prepend(`\u2705 Event <strong>${r.eventName}</strong> tracked`),this.processEventResponse(t,r)}).catch(r=>{C.error(`Error sending event ${t.name} to server`,r)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(C.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let r=await this.sessionManager.checkSessionAndGetContext();t.sessionID=r[0],t.sessionNumber=r[1],t.landingPage=r[2],t.page=hi.parseFromCurrent()}async addShopifyContext(t){if(xt.isShopify())try{t.cart=await ze.getCurrent().getNormalisedCart()}catch(r){C.error("Error fetching Shopify cart before sending the event",r)}}processEventResponse(t,r){this.renderWidgetIfAny(t,r).catch(n=>{C.error("Failed to display a campaign",n,t,r),this.sentryService.captureException(n,{event:t,response:r})}),this.utiliseIntentIfCalculated(r)}async renderWidgetIfAny(t,r){if(!r.triggerData){C.log(`Nothing to engage after ${t.name}`);return}C.log(`\u{1F4E3} Engagement(id=${r.triggerData.shortID}) will be shown`,r.triggerData);let n=new Hn(r.triggerData);n.occurred=t.occurred;let i;try{i=await fc.refreshItems(n)}catch(s){C.error("Failed to refresh the products",s);return}if(n.items=i,n.contentSource===Ex.EngagementContentSource.KLAVIYO){new bh().render(n);return}new Ec().renderEngagement(n).catch(s=>{C.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:n})})}utiliseIntentIfCalculated(t){t.intent&&(Ya.trackIntent(t.intent),Ch.trackIntent(t),br.prepend(`Intent is <strong>${Rs[t.intent]}</strong>`))}addShopifyAttributes(){xt.isShopify()&&ze.getCurrent().addCooeeAttributes().catch(t=>{C.error("Fail to add attributes in cart",t)})}},Ue=class $D{static INSTANCE;httpApiService=Mn.getInstance();eventAPIService=Sh.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new $D),this.INSTANCE}sendEvent(t){C.debug(`Waiting for auth to send event ${t.name}`),Yt.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){Yt.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){Yt.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){Yt.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},Do=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ue.getInstance();async execute(e){let t=ke.get().getCurrentItem(),r=e.clickAction||this.element?.clc;if(!r)return;let n=e.item,i=this.triggerContext,s=new xo,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!r?.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="",h=[],d=[];if(n?d=[n.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),r.at===108){let b=i.selectedItems;if(d=e.embeddedItems??b.map(I=>I.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let I;e.embeddedItems?I=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):I=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&(I.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),d.unshift(A.toEmbed())),l.selectedVariants=I,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??b}else if(r.at===107){let b=await ze.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(I=>({itemMID:I.mID,mID:I.vID}))}else if(r.at===102)h=n?[n]:[e.embeddedItem];else if(r.at===101)c=n?xt.getRootPrefix()+"products/"+n.slug:e.embeddedItem?.link;else if(r.at===4){let b=ue.isValidURL(r.gu?.u);b&&(c=b.href)}else if(r.at===109){let b=await s.upgradeToSubscription(n,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),qt.get().refreshUI(b)}if(this.sendTriggerClicked(d,{from:"button"},e.video),C.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),C.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){bx.default.error("Unable to get a discount code",b);return}}if(f&&r.at===103)await s.performCopyCoupon(f);else if(r.at===110){let b=await s.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await To.applyWithStorefront(f)}catch(b){C.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){To.navigate(f,o,c);return}if(c){location.href=c;return}To.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,r){let n=k.EVENT_TRIGGER_CLICKED,i=new Le(n,t,this.triggerContext.triggerData);i.items=e,r?.id&&(i.videos=[r.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let r="";if(t.type===wx.DiscountType.STATIC){if(!t.code)throw bt.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(r=await this.generateDiscount(e),!r)throw C.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(t){throw ue.showSnackbar("Failed to generate a discount code"),C.error("Error generating discount code",t,e),bt.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Ki=class{static getBestSources(e){if(!e)return[];let t=[],r=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];r&&t.push(r);let n=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return n&&t.push(n),t}static async performCTA(e,t){let r={applyDiscount:!0};t.cta===No.ClickActionType.ADD_TO_CART?r={at:No.ClickActionType.ADD_TO_CART,applyDiscount:!0}:t.cta===No.ClickActionType.GO_TO_PRODUCT?r={at:No.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0}:t.cta===No.ClickActionType.OPEN_CART&&(e.triggerData.redirectBehaviour=No.RedirectBehaviour.CART_DRAWER),await new Do(e).execute({clickAction:r,embeddedItem:new pn(t.item)})}},Cx=Pe(Y_()),cU=["videoPlayers"],Dh=class H_{videoPlayers;videos=[];currentIndex=0;muted=!0;videoProgress=[];selectedItem=null;triggerContext;VideoUtils=Ki;isMobile;engagementTrigger;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData,this.isMobile=new Cx.default().getDevice().type==="mobile"}pauseAll(){this.videoPlayers.forEach(t=>t.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(r=>r.nativeElement.muted=this.muted);let t=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await rt.set(ge.MUTED,this.muted)}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await rt.get(ge.MUTED,!0),t.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let t=this.getCurrentVideoElement();t.currentTime=0,t.play()}else this.moveToNextVideo();else{let t=this.videoPlayers.last;if(t){let r=this.getPreviousVideoDataForEvent(),n=[k.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),t.nativeElement.currentTime=0,t.nativeElement.play()}}}updateProgress(t,r){let n=t.target;this.videoProgress[r]=n.currentTime/n.duration*100}onSlideChange(t){let r=this.getPreviousVideoDataForEvent();t(),this.playActiveVideo(),this.selectedItem=null;let n=this.currentVideoProps(),i={previous:r,current:n},s=[k.EVENT_VIDEO_CHANGE,i,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(t,r){let n={videoID:r.id,videoIndex:this.currentIndex},i=[k.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),this.selectedItem=t}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),r=this.videoPlayers.find(i=>i.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(r?.currentTime*1e3);let n=r?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/n).toFixed(4),t}static \u0275fac=function(t){return new(t||H_)};static \u0275cmp=ft({type:H_,selectors:[["cooee-base-video"]],viewQuery:function(t,r){if(t&1&&ns(cU,5),t&2){let n;rs(n=is())&&(r.videoPlayers=n)}},decls:0,vars:0,template:function(t,r){},encapsulation:2})},lU=["swiperContainer"],uU=(e,t)=>({"lc:bg-white":e,"lc:bg-black/70 lc:justify-center lc:items-center":t}),dU=e=>({"lc:w-[100dvw] lc:h-[100dvh] lc:rounded-none":e}),fU=e=>({"swiper-hide-slide":e}),pU=e=>({"lc:rounded-lg":e}),hU=()=>({size:18}),mU=()=>({size:48}),gU=(e,t)=>({"lc-mobile lc:bg-black/50":e,"lc-desktop lc:bg-transparent":t}),Sx=(e,t)=>t.url;function vU(e,t){if(e&1&&Ae(0,"source",10),e&2){let r=t.$implicit;qn("type",r.mimeType),Bi("media","(max-width: ",r.width,"px)"),be("src",r.url,dn)}}function yU(e,t){if(e&1&&Ae(0,"source",11),e&2){let r=t.$implicit;qn("type",r.mimeType),be("src",r.url,dn)}}function _U(e,t){if(e&1){let r=zn();Q(0,"video",9,2),ht("timeupdate",function(n){It(r);let i=X().$index,s=X();return Tt(s.updateProgress(n,i))})("click",function(){It(r);let n=X().$index,i=X();return Tt(i.currentIndex===n&&i.toggleMute())})("ended",function(){It(r);let n=X(2);return Tt(n.onVideoEnded())}),$t(2,vU,1,4,"source",10,Sx),$t(4,yU,1,2,"source",11,Sx),ee()}if(e&2){let r=X(),n=r.$implicit,i=r.$index,s=X();be("ngClass",Ea(4,pU,!s.isMobile))("autoplay",s.currentIndex===i)("muted",s.muted),ts("data-video-id",n.id),Y(2),Wt(n.sources),Y(2),Wt(s.VideoUtils.getBestSources(n.sources))}}function EU(e,t){if(e&1){let r=zn();Q(0,"div",13)(1,"cooee-product-modal",14),ht("performCTA",function(n){It(r);let i=X(2).$implicit,s=X();return Tt(s.performClickToAction(n,i))})("closeModel",function(){It(r);let n=X(3);return Tt(n.selectedItem=null)}),ee()()}if(e&2){let r=X(3);Y(),be("item",r.selectedItem)}}function wU(e,t){e&1&&Vd(0)}function bU(e,t){if(e&1&&pt(0,wU,1,0,"ng-container",18),e&2){X(4);let r=vv(9);be("ngTemplateOutlet",r)("ngTemplateOutletContext",yv(2,hU))}}function CU(e,t){if(e&1){let r=zn();Q(0,"div",15)(1,"cooee-mute-toggle",16),ht("buttonClicked",function(){It(r);let n=X(3);return Tt(n.toggleMute())}),ee(),pt(2,bU,1,3,"ng-container"),ee(),Q(3,"cooee-product-card",17),ht("performCTA",function(n){It(r);let i=X(2).$implicit,s=X();return Tt(s.performClickToAction(n,i))})("clicked",function(n){It(r);let i=X(2).$implicit,s=X();return Tt(s.productCardClicked(n,i))}),ee()}if(e&2){let r=X(2).$implicit,n=X();Y(),be("muted",n.muted),Y(),Ot(n.isMobile?2:-1),Y(),be("items",r.items)}}function SU(e,t){if(e&1&&(Ae(0,"cooee-video-progress-bar",12),pt(1,EU,2,1,"div",13)(2,CU,4,3)),e&2){let r=X().$index,n=X();be("width",n.videoProgress[r]||0),Y(),Ot(n.selectedItem?1:2)}}function DU(e,t){if(e&1&&(Fr(0),Q(1,"div",6),pt(2,_U,6,6,"video",8)(3,SU,3,2),ee()),e&2){let r=t.$index,n=X(),i=n.currentIndex===r||n.currentIndex-1===r||n.currentIndex+1===r;Y(),be("ngClass",Ea(3,fU,!i)),Y(),Ot(i?2:-1),Y(),Ot(n.currentIndex===r?3:-1)}}function IU(e,t){e&1&&Ae(0,"div",19)(1,"div",20)}function TU(e,t){e&1&&Vd(0)}function xU(e,t){if(e&1&&(Q(0,"div",7),pt(1,TU,1,0,"ng-container",18),ee()),e&2){X();let r=vv(9);Y(),be("ngTemplateOutlet",r)("ngTemplateOutletContext",yv(2,mU))}}function RU(e,t){if(e&1){let r=zn();Q(0,"button",21),ht("click",function(){It(r);let n=X();return Tt(n.close())}),hr(),Q(1,"svg",22),Ae(2,"path",23)(3,"path",24),ee()()}if(e&2){let r=t.size,n=X();be("ngClass",_v(3,gU,n.isMobile,!n.isMobile)),Y(),ts("height",r+"px")("width",r+"px")}}var Ih=class K_ extends Dh{constructor(t){super(),this.cdr=t}videos=[];currentIndex=0;closeDialog=new We;performCTA=new We;swiperContainerRef;swiperInstance;ngAfterViewInit(){let t=this.swiperContainerRef.nativeElement.getRootNode(),r=wt.get().website.commonCSS;r&&vn.injectRawCSS(r,t),vn.injectStylesheet(Rn.styleURL,t),vn.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",t),this.loadSwiperScript().then(()=>{this.initSwiper(),this.afterSwiperInit(),this.playActiveVideo()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(t=this.videos[this.currentIndex],r=this.currentIndex){let n=this.getCurrentVideoElement();this.closeDialog.emit({lastVideo:t,lastVideoIndex:r,lastVideoDuration:n?.currentTime})}performClickToAction(t,r){this.performCTA.emit({cta:t.cta,item:t.item,video:r})}getCurrentVideoElement(){return this.videoPlayers.get(Math.min(this.currentIndex,1))?.nativeElement}updateProgress(t,r){super.updateProgress(t,r),this.cdr.detectChanges()}async toggleMute(){await super.toggleMute(),this.cdr.detectChanges()}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}loadSwiperScript(){return new Promise(t=>{let r="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(i=>i.src.includes(r))){t();return}let n=document.createElement("script");n.src=r,n.onload=()=>t(),document.body.appendChild(n)})}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:this.isMobile?1: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")}}),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-size","50px"),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-color","white")}afterSwiperInit(){this.swiperInstance.on("slideChange",t=>{this.onSlideChange(()=>{this.currentIndex=t.realIndex,this.cdr.detectChanges()})})}static \u0275fac=function(t){return new(t||K_)(Ut(Br))};static \u0275cmp=ft({type:K_,selectors:[["cooee-video-swiper"]],viewQuery:function(t,r){if(t&1&&ns(lU,5),t&2){let n;rs(n=is())&&(r.swiperContainerRef=n.first)}},inputs:{videos:"videos",currentIndex:"currentIndex",triggerContext:"triggerContext"},outputs:{closeDialog:"closeDialog",performCTA:"performCTA"},features:[fo],decls:10,vars:9,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoPlayers",""],[1,"lc:relative","lc:w-screen","lc:h-screen","lc:flex",3,"ngClass"],[1,"swiper-container","lc:w-[70vw]","lc:h-[80vh]",3,"ngClass"],[1,"swiper-wrapper"],[1,"swiper-slide","lc:relative","lc:flex","lc:items-center",3,"ngClass"],[1,"lc:absolute","lc:top-10","lc:right-20","lc:flex","lc:gap-2","lc:z-10"],["playsinline","",1,"lc:h-full","lc:w-full","lc:object-cover","lc:z-[-1]","lc:fixed",3,"ngClass","autoplay","muted"],["playsinline","",1,"lc:h-full","lc:w-full","lc:object-cover","lc:z-[-1]","lc:fixed",3,"timeupdate","click","ended","ngClass","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-2","lc:flex","lc:gap-2","lc:z-10","lc:flex","lc:gap-1"],[3,"buttonClicked","muted"],[3,"performCTA","clicked","items"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"swiper-button-prev","lc:text-white"],[1,"swiper-button-next","lc:text-white"],["id","lc-close-button",1,"lc:rounded-full","lc:flex","lc:items-center","lc:justify-center","lc:border-none","lc:cursor-pointer",3,"click","ngClass"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","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"]],template:function(t,r){t&1&&(Q(0,"div",3)(1,"div",4,0)(3,"div",5),$t(4,DU,4,5,"div",6,Fi),ee(),pt(6,IU,2,0),ee(),pt(7,xU,2,3,"div",7),ee(),pt(8,RU,4,6,"ng-template",null,1,YS)),t&2&&(be("ngClass",_v(4,uU,r.isMobile,!r.isMobile)),Y(),be("ngClass",Ea(7,dU,r.isMobile)),Y(3),Wt(r.videos),Y(2),Ot(r.isMobile?-1:6),Y(),Ot(r.isMobile?-1:7))},dependencies:[op,cp,lp,up,Wd,aD],styles:[`.swiper-hide-slide{visibility:hidden!important}
79
- `],encapsulation:3})},Th=class H0{constructor(t,r){this.dialogRef=t,this.data=r}static \u0275fac=function(t){return new(t||H0)(Ut(xs),Ut(V_))};static \u0275cmp=ft({type:H0,selectors:[["cooee-desktop-video-carousel"]],decls:1,vars:3,consts:[[3,"closeDialog","performCTA","videos","currentIndex","triggerContext"]],template:function(t,r){t&1&&(Q(0,"cooee-video-swiper",0),ht("closeDialog",function(n){return r.dialogRef.close(n)})("performCTA",function(n){return r.data.onCTAPerformed(n)}),ee()),t&2&&be("videos",r.data.videos)("currentIndex",r.data.currentIndex)("triggerContext",r.data.triggerContext)},dependencies:[Ih],encapsulation:2})},ou=Pe(Ax());function zx(e){let t=e.cloneNode(!0),r=t.querySelectorAll("[id]"),n=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<r.length;i++)r[i].removeAttribute("id");return n==="canvas"?Px(e,t):(n==="input"||n==="select"||n==="textarea")&&Ox(e,t),Mx("canvas",e,t,Px),Mx("input, textarea, select",e,t,Ox),t}function Mx(e,t,r,n){let i=t.querySelectorAll(e);if(i.length){let s=r.querySelectorAll(e);for(let o=0;o<i.length;o++)n(i[o],s[o])}}var AU=0;function Ox(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${AU++}`)}function Px(e,t){let r=t.getContext("2d");if(r)try{r.drawImage(e,0,0)}catch{}}function BE(e){let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function OE(e,t,r){let{top:n,bottom:i,left:s,right:o}=e;return r>=n&&r<=i&&t>=s&&t<=o}function iu(e,t,r){e.top+=t,e.bottom=e.top+e.height,e.left+=r,e.right=e.left+e.width}function kx(e,t,r,n){let{top:i,right:s,bottom:o,left:a,width:l,height:c}=e,h=l*t,d=c*t;return n>i-d&&n<o+d&&r>a-h&&r<s+h}var Mh=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:BE(t)})})}handleScroll(e){let t=Kn(e),r=this.positions.get(t);if(!r)return null;let n=r.scrollPosition,i,s;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,s=l.left}else i=t.scrollTop,s=t.scrollLeft;let o=n.top-i,a=n.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&t!==c&&t.contains(c)&&iu(l.clientRect,o,a)}),n.top=i,n.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function qx(e,t){let r=e.rootNodes;if(r.length===1&&r[0].nodeType===t.ELEMENT_NODE)return r[0];let n=t.createElement("div");return r.forEach(i=>n.appendChild(i)),n}function VE(e,t,r){for(let n in t)if(t.hasOwnProperty(n)){let i=t[n];i?e.setProperty(n,i,r?.has(n)?"important":""):e.removeProperty(n)}return e}function bc(e,t){let r=t?"":"none";VE(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":r,"-ms-user-select":r,"-webkit-user-select":r,"-moz-user-select":r})}function Lx(e,t,r){VE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},r)}function Oh(e,t){return t&&t!="none"?e+" "+t:e}function Fx(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=Ph(t.left,t.top)}function Ph(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Bx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function MU(e){let t=getComputedStyle(e),r=AE(t,"transition-property"),n=r.find(a=>a==="transform"||a==="all");if(!n)return 0;let i=r.indexOf(n),s=AE(t,"transition-duration"),o=AE(t,"transition-delay");return Bx(s[i])+Bx(o[i])}function AE(e,t){return e.getPropertyValue(t).split(",").map(r=>r.trim())}var OU=new Set(["position"]),PE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,r,n,i,s,o,a,l,c){this._document=e,this._rootElement=t,this._direction=r,this._initialDomRect=n,this._previewTemplate=i,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=a,this._zIndex=l,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Vx(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return MU(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,r=e?e.template:null,n;if(r&&e){let i=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(r,e.context);s.detectChanges(),n=qx(s,this._document),this._previewEmbeddedView=s,e.matchSize?Fx(n,i):n.style.transform=Ph(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else n=zx(this._rootElement),Fx(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return VE(n.style,{"pointer-events":"none",margin:Vx(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},OU),bc(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>n.classList.add(i)):n.classList.add(t)),n}};function Vx(e){return"showPopover"in e}var PU={passive:!0},Ux={passive:!1},kU={passive:!1,capture:!0},LU=800,Hx=new Set(["position"]),kE=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=ki(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new ie;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=dt.EMPTY;_pointerUpSubscription=dt.EMPTY;_scrollSubscription=dt.EMPTY;_resizeSubscription=dt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>bc(t,e)))}_disabled=!1;beforeStarted=new ie;started=new ie;released=new ie;ended=new ie;entered=new ie;exited=new ie;dropped=new ie;moved=this._moveEvents;data;constrainPosition;constructor(e,t,r,n,i,s,o){this._config=t,this._document=r,this._ngZone=n,this._viewportRuler=i,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new Mh(r),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(r=>Xn(r)),this._handles.forEach(r=>bc(r,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(r=>{this._handles.indexOf(r)>-1&&t.add(r)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Xn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Cn(this._renderer,t,"mousedown",this._pointerDown,Ux),Cn(this._renderer,t,"touchstart",this._pointerDown,PU),Cn(this._renderer,t,"dragstart",this._nativeDragStart,Ux)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Xn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),bc(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),bc(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let n=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(n+i>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),o=this._dropContainer;if(!s){this._endDragSequence(e);return}(!o||!o.isDragging()&&!o.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let r=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(r),this._dropContainer)this._updateActiveDropContainer(r,t);else{let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=r.x-n.x+this._passiveTransform.x,i.y=r.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:r,event:e,distance:this._getDragDistance(r),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){nu(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),r=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Cn(this._renderer,t,"selectstart",FU,kU)}),r){let n=this._rootElement,i=n.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,n),this._initialTransform=n.style.transform||"",this._preview=new PE(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,t)),Lx(n,!1,Hx),this._document.body.appendChild(i.replaceChild(s,n)),this.started.next({source:this,event:e}),r.start(),this._initialContainer=r,this._initialIndex=r.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(r?r.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let r=this.isDragging(),n=nu(t),i=!n&&t.button!==0,s=this._rootElement,o=Kn(t),a=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+LU>Date.now(),l=n?Xf(t):Zf(t);if(o&&o.draggable&&t.type==="mousedown"&&t.preventDefault(),r||i||a||l)return;if(this._handles.length){let d=s.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=BE(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Lx(this._rootElement,!0,Hx),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,r=t.getItemIndex(this),n=this._getPointerPositionOnPage(e),i=this._getDragDistance(n),s=t._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:i,dropPoint:n,event:e}),this.dropped.next({item:this,currentIndex:r,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:i,dropPoint:n,event:e}),t.drop(this,r,this._initialIndex,this._initialContainer,s,i,n,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:r,y:n}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(r,n),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(r=>{let n=o=>{(!o||this._preview&&Kn(o)===this._preview.element&&o.propertyName==="transform")&&(s(),r(),clearTimeout(i))},i=setTimeout(n,t*1.5),s=this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,r;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),r=qx(this._placeholderRef,this._document)):r=zx(this._rootElement),r.style.pointerEvents="none",r.classList.add("cdk-drag-placeholder"),r}_getPointerPositionInElement(e,t,r){let n=t===this._rootElement?null:t,i=n?n.getBoundingClientRect():e,s=nu(r)?r.targetTouches[0]:r,o=this._getViewportScrollPosition(),a=s.pageX-i.left-o.left,l=s.pageY-i.top-o.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),r=nu(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,n=r.pageX-t.left,i=r.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=n,o.y=i,o.matrixTransform(s.inverse())}}return{x:n,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:r,y:n}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(r=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),d=o.left+i,f=o.right-(a-i);r=jx(r,d,f),n=jx(n,c,h)}return{x:r,y:n}}_updatePointerDirectionDelta(e){let{x:t,y:r}=e,n=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-i.x),o=Math.abs(r-i.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=t>i.x?1:-1,i.x=t),o>this._config.pointerDirectionChangeThreshold&&(n.y=r>i.y?1:-1,i.y=r),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,bc(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let r=1/this.scale,n=Ph(e*r,t*r),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Oh(n,this._initialTransform)}_applyPreviewTransform(e,t){let r=this._previewTemplate?.template?void 0:this._initialTransform,n=Ph(e,t);this._preview.setTransform(Oh(n,r))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let r=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||r.width===0&&r.height===0)return;let i=n.left-r.left,s=r.right-n.right,o=n.top-r.top,a=r.bottom-n.bottom;n.width>r.width?(i>0&&(e+=i),s>0&&(e-=s)):e=0,n.height>r.height?(o>0&&(t+=o),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:nu(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let r=Kn(e);this._boundaryRect&&r!==this._boundaryElement&&r.contains(this._boundaryElement)&&iu(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=$a(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let r=this._previewContainer||"global";if(r==="parent")return e;if(r==="global"){let n=this._document;return t||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return Xn(r)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function jx(e,t,r){return Math.max(t,Math.min(r,e))}function nu(e){return e.type[0]==="t"}function FU(e){e.preventDefault()}function Yx(e,t,r){let n=$x(t,e.length-1),i=$x(r,e.length-1);if(n===i)return;let s=e[n],o=i<n?-1:1;for(let a=n;a!==i;a+=o)e[a]=e[a+o];e[i]=s}function $x(e,t){return Math.max(0,Math.min(t,e))}var kh=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,r,n){let i=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,r,n);if(s===-1&&i.length>0)return null;let o=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===e),l=i[s],c=i[a].clientRect,h=l.clientRect,d=a>s?1:-1,f=this._getItemOffsetPx(c,h,d),g=this._getSiblingOffsetPx(a,i,d),m=i.slice();return Yx(i,a,s),i.forEach((b,I)=>{if(m[I]===b)return;let A=b.drag===e,F=A?f:g,V=A?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=F;let M=Math.round(b.offset*(1/b.drag.scale));o?(V.style.transform=Oh(`translate3d(${M}px, 0, 0)`,b.initialTransform),iu(b.clientRect,0,F)):(V.style.transform=Oh(`translate3d(0, ${M}px, 0)`,b.initialTransform),iu(b.clientRect,F,0))}),this._previousSwap.overlaps=OE(h,t,r),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?n.x:n.y,{previousIndex:a,currentIndex:s}}enter(e,t,r,n){let i=n==null||n<0?this._getItemIndexFromPointerPosition(e,t,r):n,s=this._activeDraggables,o=s.indexOf(e),a=e.getPlaceholderElement(),l=s[i];if(l===e&&(l=s[i+1]),!l&&(i==null||i===-1||i<s.length-1)&&this._shouldEnterAsFirstChild(t,r)&&(l=s[0]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(a,c),s.splice(i,0,e)}else this._element.appendChild(a),s.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let r=this._itemPositions.find(n=>n.drag===e)?.initialTransform;t.style.transform=r||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:r})=>{iu(r,e,t)}),this._itemPositions.forEach(({drag:r})=>{this._dragDropRegistry.isDragging(r)&&r._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let r=t.getVisibleElement();return{drag:t,offset:0,initialTransform:r.style.transform||"",clientRect:BE(r)}}).sort((t,r)=>e?t.clientRect.left-r.clientRect.left:t.clientRect.top-r.clientRect.top)}_getItemOffsetPx(e,t,r){let n=this.orientation==="horizontal",i=n?t.left-e.left:t.top-e.top;return r===-1&&(i+=n?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,r){let n=this.orientation==="horizontal",i=t[e].clientRect,s=t[e+r*-1],o=i[n?"width":"height"]*r;if(s){let a=n?"left":"top",l=n?"right":"bottom";r===-1?o-=s.clientRect[a]-i[l]:o+=i[a]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let r=this._itemPositions,n=this.orientation==="horizontal";if(r[0].drag!==this._activeDraggables[0]){let i=r[r.length-1].clientRect;return n?e>=i.right:t>=i.bottom}else{let i=r[0].clientRect;return n?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,r,n){let i=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:a})=>{if(o===e)return!1;if(n){let l=i?n.x:n.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):r>=Math.floor(a.top)&&r<Math.floor(a.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},LE=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let r=0;r<t.length;r++){let n=t[r];this._relatedNodes.push([n,n.nextSibling])}this.withItems(e)}sort(e,t,r,n){let i=this._getItemIndexFromPointerPosition(e,t,r),s=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let o=this._activeItems[i];if(s.drag===o&&s.overlaps&&s.deltaX===n.x&&s.deltaY===n.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),c=o.getRootElement();i>a?c.after(l):c.before(l),Yx(this._activeItems,a,i);let h=this._getRootNode().elementFromPoint(t,r);return s.deltaX=n.x,s.deltaY=n.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:a,currentIndex:i}}enter(e,t,r,n){let i=n==null||n<0?this._getItemIndexFromPointerPosition(e,t,r):n;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,r));let s=this._activeItems[i],o=this._activeItems.indexOf(e);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(i,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let r=this._relatedNodes.length-1;r>-1;r--){let[n,i]=this._relatedNodes[r];n.parentNode===e&&n.nextSibling!==i&&(i===null?e.appendChild(n):i.parentNode===e&&e.insertBefore(n,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,r){let n=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(r)),i=n?this._activeItems.findIndex(s=>{let o=s.getRootElement();return n===o||o.contains(n)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=$a(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,r){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let n=1/0,i=-1;for(let s=0;s<this._activeItems.length;s++){let o=this._activeItems[s];if(o!==e){let{x:a,y:l}=o.getRootElement().getBoundingClientRect(),c=Math.hypot(t-a,r-l);c<n&&(n=c,i=s)}}return i}},Wx=.05,Kx=.05,Dr=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(Dr||{}),jn=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(jn||{}),FE=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new ie;entered=new ie;exited=new ie;dropped=new ie;sorted=new ie;receivingStarted=new ie;receivingStopped=new ie;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=dt.EMPTY;_verticalScrollDirection=Dr.NONE;_horizontalScrollDirection=jn.NONE;_scrollNode;_stopScrollTimers=new ie;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,r,n,i){this._dragDropRegistry=t,this._ngZone=n,this._viewportRuler=i;let s=this.element=Xn(e);this._document=r,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new Mh(r)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,r,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,r,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,r,n,i,s,o,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:r,container:this,previousContainer:n,isPointerOverContainer:i,distance:s,dropPoint:o,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(r=>r._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>e.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof kh&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new LE(this._document,this._dragDropRegistry);else{let t=new kh(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,r)=>this.sortPredicate(t,r,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Xn(this.element),r=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(e);return r>-1&&this._scrollableElements.splice(r,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,r,n){if(this.sortingDisabled||!this._domRect||!kx(this._domRect,Wx,t,r))return;let i=this._sortStrategy.sort(e,t,r,n);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let r,n=Dr.NONE,i=jn.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||r||kx(s.clientRect,Wx,e,t)&&([n,i]=BU(o,s.clientRect,this._direction,e,t),(n||i)&&(r=o))}),!n&&!i){let{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};n=Zx(a,t),i=Xx(a,e),r=window}r&&(n!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||r!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=i,this._scrollNode=r,(n||i)&&r?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),om(0,Eu).pipe(Wr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===Dr.UP?e.scrollBy(0,-t):this._verticalScrollDirection===Dr.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===jn.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===jn.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&OE(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,r){return this._siblings.find(n=>n._canReceive(e,t,r))}_canReceive(e,t,r){if(!this._domRect||!OE(this._domRect,t,r)||!this.enterPredicate(e,this))return!1;let n=this._getShadowRoot().elementFromPoint(t,r);return n?n===this._container||this._container.contains(n):!1}_startReceiving(e,t){let r=this._activeSiblings;!r.has(e)&&t.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(r.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=$a(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Zx(e,t){let{top:r,bottom:n,height:i}=e,s=i*Kx;return t>=r-s&&t<=r+s?Dr.UP:t>=n-s&&t<=n+s?Dr.DOWN:Dr.NONE}function Xx(e,t){let{left:r,right:n,width:i}=e,s=i*Kx;return t>=r-s&&t<=r+s?jn.LEFT:t>=n-s&&t<=n+s?jn.RIGHT:jn.NONE}function BU(e,t,r,n,i){let s=Zx(t,i),o=Xx(t,n),a=Dr.NONE,l=jn.NONE;if(s){let c=e.scrollTop;s===Dr.UP?c>0&&(a=Dr.UP):e.scrollHeight-c>e.clientHeight&&(a=Dr.DOWN)}if(o){let c=e.scrollLeft;r==="rtl"?o===jn.RIGHT?c<0&&(l=jn.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=jn.LEFT):o===jn.LEFT?c>0&&(l=jn.LEFT):e.scrollWidth-c>e.clientWidth&&(l=jn.RIGHT)}return[a,l]}var ru={capture:!0},ME={passive:!1,capture:!0},VU=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ft({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(r,n){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
80
- `],encapsulation:2,changeDetection:0})}return e})(),Jx=(()=>{class e{_ngZone=O(Ve);_document=O(Qe);_styleLoader=O(Ss);_renderer=O(un).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=ki([]);_globalListeners;_draggingPredicate=r=>r.isDragging();_domNodesToDirectives=null;pointerMove=new ie;pointerUp=new ie;scroll=new ie;constructor(){}registerDropContainer(r){this._dropInstances.has(r)||this._dropInstances.add(r)}registerDragItem(r){this._dragInstances.add(r),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=Cn(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,ME)})}removeDropContainer(r){this._dropInstances.delete(r)}removeDragItem(r){this._dragInstances.delete(r),this.stopDragging(r),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(r,n){if(!(this._activeDragInstances().indexOf(r)>-1)&&(this._styleLoader.load(VU),this._activeDragInstances.update(i=>[...i,r]),this._activeDragInstances().length===1)){let i=n.type.startsWith("touch"),s=a=>this.pointerUp.next(a),o=[["scroll",a=>this.scroll.next(a),ru],["selectstart",this._preventDefaultWhileDragging,ME]];i?o.push(["touchend",s,ru],["touchcancel",s,ru]):o.push(["mouseup",s,ru]),i||o.push(["mousemove",a=>this.pointerMove.next(a),ME]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>Cn(this._renderer,this._document,a,l,c))})}}stopDragging(r){this._activeDragInstances.update(n=>{let i=n.indexOf(r);return i>-1?(n.splice(i,1),[...n]):n}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(r){return this._activeDragInstances().indexOf(r)>-1}scrolled(r){let n=[this.scroll];return r&&r!==this._document&&n.push(new nt(i=>this._ngZone.runOutsideAngular(()=>{let s=Cn(this._renderer,r,"scroll",o=>{this._activeDragInstances().length&&i.next(o)},ru);return()=>{s()}}))),eo(...n)}registerDirectiveNode(r,n){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(r,n)}removeDirectiveNode(r){this._domNodesToDirectives?.delete(r)}getDragDirectiveForNode(r){return this._domNodesToDirectives?.get(r)||null}ngOnDestroy(){this._dragInstances.forEach(r=>this.removeDragItem(r)),this._dropInstances.forEach(r=>this.removeDropContainer(r)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=r=>{this._activeDragInstances().length>0&&r.preventDefault()};_persistentTouchmoveListener=r=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))};_clearGlobalListeners(){this._globalListeners?.forEach(r=>r()),this._globalListeners=void 0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),UU={dragStartThreshold:5,pointerDirectionChangeThreshold:5},HU=(()=>{class e{_document=O(Qe);_ngZone=O(Ve);_viewportRuler=O(xl);_dragDropRegistry=O(Jx);_renderer=O(un).createRenderer(null,null);constructor(){}createDrag(r,n=UU){return new kE(r,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(r){return new FE(r,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Gx=new he("CDK_DRAG_PARENT"),jU=new he("CdkDragHandle"),$U=new he("CDK_DRAG_CONFIG"),WU=new he("CdkDropList"),Qx=(()=>{class e{element=O(Mt);dropContainer=O(WU,{optional:!0,skipSelf:!0});_ngZone=O(Ve);_viewContainerRef=O(kr);_dir=O(Ds,{optional:!0});_changeDetectorRef=O(Br);_selfHandle=O(jU,{optional:!0,self:!0});_parentDrag=O(Gx,{optional:!0,skipSelf:!0});_dragDropRegistry=O(Jx);_destroyed=new ie;_handles=new Tr([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(r){this._disabled=r,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new We;released=new We;ended=new We;entered=new We;exited=new We;dropped=new We;moved=new nt(r=>{let n=this._dragRef.moved.pipe(dr(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(r);return()=>{n.unsubscribe()}});_injector=O(vt);constructor(){let r=this.dropContainer,n=O($U,{optional:!0}),i=O(HU);this._dragRef=i.createDrag(this.element,{dragStartThreshold:n&&n.dragStartThreshold!=null?n.dragStartThreshold:5,pointerDirectionChangeThreshold:n&&n.pointerDirectionChangeThreshold!=null?n.pointerDirectionChangeThreshold:5,zIndex:n?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),n&&this._assignDefaults(n),r&&(this._dragRef._withDropContainer(r._dropListRef),r.addItem(this),r._dropListRef.beforeStarted.pipe(Wr(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(r){this._dragRef.setFreeDragPosition(r)}ngAfterViewInit(){Xr(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(r){let n=r.rootElementSelector,i=r.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(r){let n=this._handles.getValue();n.push(r),this._handles.next(n)}_removeHandle(r){let n=this._handles.getValue(),i=n.indexOf(r);i>-1&&(n.splice(i,1),this._handles.next(n))}_setPreviewTemplate(r){this._previewTemplate=r}_resetPreviewTemplate(r){r===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(r){this._placeholderTemplate=r}_resetPlaceholderTemplate(r){r===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let r=this.element.nativeElement,n=r;this.rootElementSelector&&(n=r.closest!==void 0?r.closest(this.rootElementSelector):r.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||r)}_getBoundaryElement(){let r=this.boundaryElement;return r?typeof r=="string"?this.element.nativeElement.closest(r):Xn(r):null}_syncInputs(r){r.beforeStarted.subscribe(()=>{if(!r.isDragging()){let n=this._dir,i=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;r.disabled=this.disabled,r.lockAxis=this.lockAxis,r.scale=this.scale,r.dragStartDelay=typeof i=="object"&&i?i:w_(i),r.constrainPosition=this.constrainPosition,r.previewClass=this.previewClass,r.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),n&&r.withDirection(n.value)}}),r.beforeStarted.pipe(sm(1)).subscribe(()=>{if(this._parentDrag){r.withParent(this._parentDrag._dragRef);return}let n=this.element.nativeElement.parentElement;for(;n;){let i=this._dragDropRegistry.getDragDirectiveForNode(n);if(i){r.withParent(i._dragRef);break}n=n.parentElement}})}_handleEvents(r){r.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),r.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),r.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),r.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),r.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),r.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(r){let{lockAxis:n,dragStartDelay:i,constrainPosition:s,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:h}=r;this.disabled=l??!1,this.dragStartDelay=i||0,n&&(this.lockAxis=n),s&&(this.constrainPosition=s),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(cm(r=>{let n=r.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),Qs(r=>eo(...r.map(n=>n._stateChanges.pipe(Si(n))))),Wr(this._destroyed)).subscribe(r=>{let n=this._dragRef,i=r.element.nativeElement;r.disabled?n.disableHandle(i):n.enableHandle(i)})}static \u0275fac=function(r){return new(r||e)};static \u0275dir=Lr({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,n){r&2&&ti("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",wa],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",bv]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Ud([{provide:Gx,useExisting:e}]),Xo]})}return e})(),GU=e=>({"lc:cursor-grab":e}),eR=(e,t)=>t.url;function zU(e,t){if(e&1&&Ae(0,"source",9),e&2){let r=t.$implicit;qn("type",r.mimeType),Bi("media","(max-width: ",r.width,"px)"),be("src",r.url,dn)}}function qU(e,t){if(e&1&&Ae(0,"source",10),e&2){let r=t.$implicit;qn("type",r.mimeType),be("src",r.url,dn)}}var Lh=class Q0{constructor(t){this.elementRef=t}video;closeClicked=new We;videoClicked=new We;isDragging=!1;VideoUtils=Ki;ngOnInit(){let t=this.elementRef.nativeElement.parentElement.parentElement;t.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(t){return new(t||Q0)(Ut(Mt))};static \u0275cmp=ft({type:Q0,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:13,vars:5,consts:[["cdkDrag","",1,"lc:shadow-2xl","lc:fixed","lc:right-10","lc:bottom-10","lc:rounded-lg","lc:max-w-[100px]","lc:flex","lc:justify-center","lc:items-center",3,"cdkDragMoved","ngClass","cdkDragBoundary"],["id","lc-close-button",1,"lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-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"],["xmlns","http://www.w3.org/2000/svg","height","80px","viewBox","0 0 24 24","width","80px","fill","#FFFFFF"],["d","M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"],["autoplay","","loop","",1,"lc:rounded-lg","lc:w-full",3,"click","muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,r){t&1&&(Q(0,"div",0),ht("cdkDragMoved",function(){return r.isDragging=!0}),Q(1,"button",1),ht("click",function(){return r.close()}),hr(),Q(2,"svg",2),Ae(3,"path",3)(4,"path",4),ee()(),Jo(),Q(5,"button",5),hr(),Q(6,"svg",6),Ae(7,"path",7),ee()(),Jo(),Q(8,"video",8),ht("click",function(){return r.onVideoClick()}),$t(9,zU,1,4,"source",9,eR),$t(11,qU,1,2,"source",10,eR),ee()()),t&2&&(be("ngClass",Ea(3,GU,r.isDragging))("cdkDragBoundary","body"),Y(8),be("muted",!0),Y(),Wt(r.video.sources),Y(2),Wt(r.VideoUtils.getBestSources(r.video.sources)))},dependencies:[Wd,Qx],encapsulation:2})},Fh=(e,t)=>t.url;function YU(e,t){if(e&1&&(Q(0,"div",0),fn(1),ee()),e&2){X();let r=mr(1);Y(),os(" ",r," ")}}function KU(e,t){if(e&1&&Ae(0,"source",6),e&2){let r=t.$implicit;qn("type",r.mimeType),Bi("media","(max-width: ",r.width,"px)"),be("src",r.url,dn)}}function ZU(e,t){if(e&1&&Ae(0,"source",7),e&2){let r=t.$implicit;qn("type",r.mimeType),be("src",r.url,dn)}}function XU(e,t){if(e&1&&(Q(0,"div",8)(1,"span",10),fn(2),ee(),Ae(3,"span",11),bn(4,"cooeeCurrency"),bn(5,"safeHtml"),ee()),e&2){X();let r=mr(0);Y(2),os(" ",r.name," "),Y(),be("innerHTML",xn(5,4,xn(4,2,r.price)),Pr)}}function JU(e,t){if(e&1){let r=zn();Q(0,"div",12),ht("click",function(){It(r);let n=X().$implicit,i=mr(0),s=X(2);return Tt(s.addToCartClicked(n,i))})("keydown",function(){It(r);let n=X().$implicit,i=mr(0),s=X(2);return Tt(s.addToCartClicked(n,i))}),fn(1," Add to cart "),ee()}}function QU(e,t){if(e&1){let r=zn();Fr(0),Q(1,"div",3)(2,"div",4),ht("click",function(){let n=It(r),i=n.$implicit,s=n.$index,o=mr(0),a=X(2);return Tt(a.onClick(i,o,s))})("keydown",function(){let n=It(r),i=n.$implicit,s=n.$index,o=mr(0),a=X(2);return Tt(a.onClick(i,o,s))}),Q(3,"video",5),$t(4,KU,1,4,"source",6,Fh),$t(6,ZU,1,2,"source",7,Fh),ee(),pt(8,XU,6,6,"div",8),ee(),pt(9,JU,2,0,"div",9),ee()}if(e&2){let r=t.$implicit,n=X(2),i=mr(4);ho(r.items==null?null:r.items[0]),Y(3),be("muted",!0),Y(),Wt(r.sources),Y(2),Wt(n.VideoUtils.getBestSources(r.sources)),Y(2),Ot(i?8:-1),Y(),Ot(i?9:-1)}}function eH(e,t){if(e&1&&(Q(0,"div",1),$t(1,QU,10,4,"div",3,Fi),ee()),e&2){let r=X();Y(),Wt(r.videos)}}function tH(e,t){if(e&1&&Ae(0,"source",6),e&2){let r=t.$implicit;qn("type",r.mimeType),Bi("media","(max-width: ",r.width,"px)"),be("src",r.url,dn)}}function nH(e,t){if(e&1&&Ae(0,"source",7),e&2){let r=t.$implicit;qn("type",r.mimeType),be("src",r.url,dn)}}function rH(e,t){if(e&1){let r=zn();Fr(0),Q(1,"div",13),hr(),Q(2,"svg",14),Ae(3,"circle",15)(4,"circle",16),ee(),Jo(),Q(5,"div",17)(6,"video",18),ht("click",function(){let n=It(r),i=n.$implicit,s=n.$index,o=mr(0),a=X(2);return Tt(a.onClick(i,o,s))}),$t(7,tH,1,4,"source",6,Fh),$t(9,nH,1,2,"source",7,Fh),ee()()()}if(e&2){let r=t.$implicit,n=X(2);ho(r.items==null?null:r.items[0]),Y(6),be("muted",!0),Y(),Wt(r.sources),Y(2),Wt(n.VideoUtils.getBestSources(r.sources))}}function iH(e,t){if(e&1&&(Q(0,"div",2),$t(1,rH,11,2,"div",13,Fi),ee()),e&2){let r=X();Y(),Wt(r.videos)}}function oH(e,t){if(e&1){let r=zn();Q(0,"cooee-draggable-video-popup",20),ht("videoClicked",function(){It(r),X();let n=mr(0),i=mr(1),s=mr(2),o=X();return Tt(o.onPopupVideoClick(i,s,n))})("closeClicked",function(){It(r);let n=X(2);return Tt(n.onPopupVideoClosed())}),ee()}if(e&2){let r=X(2);be("video",r.videos[0])}}function sH(e,t){if(e&1&&(Fr(0)(1)(2),pt(3,oH,1,1,"cooee-draggable-video-popup",19)),e&2){let r=X(),n=ho(0);Y();let i=ho(r.videos[n]);Y(),ho(i.items[0]),Y(),Ot(r.hidePopupVideo?-1:3)}}var Bh=class UE{constructor(t,r){this.dialog=t,this.cdr=r}sendEvent=new We;videos;VideoUtils=Ki;VideoConfigSource=IE;VideoConfigTemplate=TE;hidePopupVideo;_triggerContext=ki(null);dialogRef=null;currentDialogData=null;get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this.videos=t.triggerData.content?.videoConfig?.videos}onResize(){!this.dialogRef||!this.currentDialogData||this.openDialog(this.currentDialogData.videos[0],this.currentDialogData.currentIndex,!0)}sendTriggerClicked(t,r){let n=new Le(k.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);n.videos=[t.id],n.items=[r],this.sendEvent.emit(n)}onClick(t,r,n){this.sendTriggerClicked(t,r),this.openDialog(t,n)}performCTA(t){let r;if(t.cta===ou.ClickActionType.ADD_TO_CART)r=k.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===ou.ClickActionType.GO_TO_PRODUCT)r=k.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===ou.ClickActionType.OPEN_CART)r=k.EVENT_OPEN_CART_CLICKED;else return;let n=t.video.id,i={videoID:n},s=new Le(r,{current:i},this.triggerContext?.triggerData);s.videos=[n],s.items=[t.item],this.sendEvent.emit(s),Ki.performCTA(this.triggerContext,t)}addToCartClicked(t,r){this.performCTA({cta:ou.ClickActionType.ADD_TO_CART,item:r,video:t})}onPopupVideoClick(t,r,n){this.hidePopupVideo=!0,this.onClick(t,r,n),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3,r=new Le(k.EVENT_TRIGGER_CLOSED,{duration:t},this.triggerContext?.triggerData);this.sendEvent.emit(r)}openDialog(t,r,n=!1){let i={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:s=>this.performCTA(s)};if(this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(Th,{width:"100vw",height:"100vh",data:i}),this.currentDialogData=i,this.dialogRef&&!n){let s={videoID:t.id,videoIndex:r},o=new Le(k.EVENT_VIDEO_DIALOG_OPENED,{current:s},this.triggerContext?.triggerData);o.videos=[t.id],this.sendEvent.emit(o)}this.dialogRef.closed.subscribe(s=>{if(!s)return;let o=s.lastVideoDuration*1e3,a={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:o,playedTillPercent:o/t.durationMS},l=new Le(k.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[s.lastVideo.id],this.sendEvent.emit(l),this.dialogRef=null,this.currentDialogData=null})}static \u0275fac=function(t){return new(t||UE)(Ut(vT),Ut(Br))};static \u0275cmp=ft({type:UE,selectors:[["cooee-shoppable-videos"]],hostBindings:function(t,r){t&1&&ht("resize",function(){return r.onResize()},!1,eS)},inputs:{triggerContext:"triggerContext"},outputs:{sendEvent:"sendEvent"},decls:9,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","","playsinline","",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-4","lc:text-xl"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-1","lc:text-xl"],["id","lc-item-price",1,"lc:text-xl",3,"innerHTML"],["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-4","lc:text-xl",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"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(t,r){if(t&1&&(Fr(0)(1),pt(2,YU,2,1,"div",0),Fr(3)(4)(5),pt(6,eH,3,0,"div",1)(7,iH,3,0,"div",2)(8,sH,4,4)),t&2){let n=r.triggerContext==null||r.triggerContext.triggerData==null||r.triggerContext.triggerData.content==null?null:r.triggerContext.triggerData.content.videoConfig;Y();let i=ho(n==null?null:n.heading);Y(),Ot(i?2:-1);let s=n==null?null:n.source;Y(2),ho(s===r.VideoConfigSource.GALLERY);let o=n==null?null:n.template;Y(2),Ot(o===r.VideoConfigTemplate.SWIPER?6:o===r.VideoConfigTemplate.STORY?7:o===r.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[ui,Lh,di],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.lc-video-card[_ngcontent-%COMP%] > video[_ngcontent-%COMP%]:hover{scale:1.1}.animate-progress[_ngcontent-%COMP%]{stroke-dasharray:100 241.6;stroke-dashoffset:0;transition:stroke-dashoffset .3s;transform-origin:50% 50%;animation:_ngcontent-%COMP%_snake-rotate 2.5s linear infinite}@keyframes _ngcontent-%COMP%_snake-rotate{to{transform:rotate(360deg)}}']})};C.configure("CooeeWidgetSDK");(async()=>{let e=await yD(wD),t=(r,n)=>{let i=JS(r,{injector:e.injector});customElements.define(n,i)};t(Uf,"cooee-progressbar"),t(Bh,"cooee-shoppable-videos")})();})();
78
+ `,xo=class{async performAddToCart(e,t){if(!e.length)return;let r=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),n=xt.getCartURL("cart/add.js"),i={items:r},s=Yt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(n,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return C.log(`Added ${e.length} items to Cart`),ue.showSnackbar("Product added to your cart"),a.json()}catch(a){C.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!dx.JSUtils.hasKeys(t)){C.warn("No update fields provided");return}let r=xt.getCartURL("cart/change.js"),n=w({id:e.key},t),i=JSON.stringify(n);try{let s=await fetch(r,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(C.log(`Updated ${e}`),ze.getCurrent().update(s.json()))}catch(s){C.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),C.log(`Code-${e} copied`),ue.showSnackbar("Discount code copied")}catch(t){C.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=xt.getProductSlug(e.link);t&&(location.pathname=xt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){C.warn("Trying to upgrade to subscription with no item");return}let r=await ze.getCurrent().getNormalisedCart(),n=e.selectedOrFirstVariant.value,i=r.items.findIndex(c=>c.vID===n.mID),s=n.selectedSellingPlan.value,o=xt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){C.log(`Upgraded ${e} selling plan`),ue.showSnackbar("Line item updated");let h=await c.json();return ze.getCurrent().update(h),h}}catch(c){C.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,r){let n=wt.get().storefrontToken;if(!n)throw new Error("Storefront token not set for the store");if(!e?.vID){C.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:r.getKVFormatPrivateAttributesForLineItem()}],o=await ue.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",n);let l=JSON.stringify({query:sU,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await Mn.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e.clickAction,r=e.items,n=e.triggerData;if(t.at){let i=t;if(C.log(`Performing ${JSON.stringify(i)} action`),i.at===101)r?.length&&this.performGoToItem(r[0]);else if(i.at===102)r?.length&&await this.performAddToCart(r,n);else if(i.at===103)await this.performCopyCoupon(n.discount.code);else if(i.at===105)Yt.get().open();else if(i.at===104){let s=e.collections;if(!s?.length)return;location.pathname=xt.getRootPrefix()+"collections/"+s[0].handle}}t.applyDiscount&&n.discount?.code&&To.navigate(n.discount.code,n.redirectBehaviour)}getVIDAndQuantity(e){let t,r;if(e instanceof hn)t=e.vID,r=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,r=1}return{vID:t,quantity:r}}},Xp=class extends Ei{ctaListener=new xo;constructor(e){super(e),mi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Si(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=ze.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await ze.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let r of t){if(e.amount<r.minValue)break;if(C.log("Current milestone",r),r.rewardType===fx.MilestoneRewardType.FREE_AUTO_GIFT){let n=r.items[0],i=e.items.find(s=>s.vID===n.vID||s.mID===n.mID);if(i)C.log(`Item(vID:${n.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.performAddToCart([n],this.engagementTrigger);Yt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await ze.getCurrent().getNormalisedCart()).items.filter(r=>r.vID!==e?.vID&&r.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let r of t)await this.ctaListener.performUpdate(r,{quantity:0})}},Jp=class extends Qn{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 r=t.detail;this.safeHTTPService.sendEvent(r)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},px=Pe(Sa()),Qp=class extends Qn{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,r=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,n=e.detail;if(!px.JSUtils.hasKeys(n)){C.error(`No detail received for ${r}`);return}C.log("Detail received for BYOB",n);let i=n.campaignID??n.campaignId??n.campaign_id;if(i!==t.shortID&&i!==t.engagementID){C.warn(`Current ${r} is not BYOB. Received: ${i}`);return}let s=n.items;if(!s?.length)return;let o=s.map(a=>new hn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new Do(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},mc=class{runtimeData=ke.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ei.renderedEngagements];Ei.renderedEngagements.length=0;for(let r of e)C.log(`\u{1F4E3} ${r} received as cart embed`),!this.findAndUpdateCurrent(r,t)&&(C.log(`${r} is new`),r.isProgressBar()?new Xp(r).renderSilently():r.isSubscriptionUpsell()?Zp.renderCartUpsell(r):new Ei(r).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Qn.renderedEngagements];Qn.renderedEngagements.length=0;for(let r of e)C.log(`\u{1F4E3} ${r} received as page embed`),!this.findAndUpdateCurrent(r,t)&&(C.log(`${r} is new`),r.isShoppableVideo()?new Jp(r).renderSilently():r.isBYOB()?new Qp(r).renderSilently():new Qn(r).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let r=t.findIndex(n=>n.isSameTrigger(e));return r<0||e.isSubscriptionUpsell()?!1:(t[r].update(e),t[r].renderSilently(),t.splice(r,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},gc=class{runtimeData=ke.get();httpService=xe.get(Mn);sessionManager=xe.get(Kt);constructor(){}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 ze.getCurrent().getNormalisedCart()}catch(i){C.error("Error fetching Shopify cart before sending widget call",i)}let t=new URLSearchParams(location.search),r=t.get("cooee-preview");r?e.previewIDs=r.trim().split(",").filter(i=>Number.isInteger(+i)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let n=t.get("cooee-variant");return n?e.previewVariant=n:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}async addSessionContext(e){let t=await this.sessionManager.checkSessionAndGetContext();e.sessionID=t[0],e.sessionNumber=t[1],e.landingPage=t[2],e.page=hi.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),t=[];return e.forEach(r=>{let n=r.dataset.engagementId;n&&+n&&t.push(n)}),t}},$r=class PD extends gc{static INSTANCE;loadWidgetsSubject=new ie;constructor(){super(),this.loadWidgetsSubject.pipe(xr(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>C.error("Unable to initiate page widgets",t))}),mi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new PD),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){Kt.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>C.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){Kt.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){Kt.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();C.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async r=>{let n=r.widgets.map(i=>new Hn(i));new mc().processPageWidgetResponse(n)}).catch(r=>{C.error("Error sending widget getter",r)})}async loadCartWidgets(){let t=await this.getWidgetProps();C.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async r=>{let n=r.widgets.map(i=>new Hn(i));new mc().processCartWidgetResponse(n)}).catch(r=>{C.error("Error sending widget getter",r)})}async getVariation(t){let r=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),r))}renderCachedCartWidgets(){new mc().processCartWidgetResponse(this.runtimeData.cartEngagements)}},eh=class{eventAPIService;constructor(){this.eventAPIService=xe.get(Ro)}processResponse(e){for(let t of e)t.experiment?.cssSelector&&this.runExperiment(t);document.querySelector("#lc-hide-body")?.remove()}async runExperiment(e){if(!e.experiment?.cssSelector){C.error("No CSS selector present in experiment",e.toString);return}let t;try{t=await ue.retrySelectors(e.experiment.cssSelector)}catch{C.error("Fail to get CSS selector for experiment",e.toString());return}if(t?.length){for(let r of t)if(e.experiment.op==="SHOW")r.style.display="block";else if(e.experiment.op==="HIDE")r.style.display="none";else{C.error("Invalid experiment operation",e.toString);return}this.eventAPIService.trackExperiment({name:k.EVENT_EXPERIMENT_START,experiment:new yo(e)}).catch(r=>{C.error("Fail to track experiment",r)})}}},Ro=class AD extends gc{static INSTANCE;constructor(){super()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new AD),this.INSTANCE}loadExperimentSilently(){rt.get(ge.SDK_TOKEN).then(t=>{t?this.loadExperiments().catch(r=>C.error("Unable to initiate experiment",r)):Kt.replaySubject.subscribe(async()=>{this.loadExperiments().catch(r=>C.error("Unable to initiate experiment",r))})})}async loadExperiments(){if(!this.runtimeData.activeExperiment)return;let t=await this.getWidgetProps();C.log("Load experiments",t),this.httpService.post("/v1/engagement/experiments",t).then(async r=>{let n=r.experiments.map(i=>new Hn(i));new eh().processResponse(n)}).catch(r=>{C.error("Error sending experiment getter",r)})}async trackExperiment(t){await this.addSessionContext(t),await this.httpService.post("/v1/event/experiment",t)}},th=class{runtimeData=ke.get();widgetAPIService=xe.get($r);experimentAPIService=xe.get(Ro);meddle(){let e=_t.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=_t.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.loadExperiments=()=>{this.experimentAPIService.loadExperimentSilently()},e.previewWidget=_t.previewWidget.bind(_t),e.previewPopup=_t.previewPopup.bind(_t)}overwritePush(e,t){Pa(e,"push",t)}meddleAccount(){this.overwritePush(_t.globalRef.account,(...e)=>{this.processAccount(e[0])}),_t.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(_t.globalRef.events,(...e)=>{this.processEvent(e[0])}),_t.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(_t.globalRef.profile,(...e)=>{this.processProfile(e[0])}),_t.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(_t.globalRef.screen,(...e)=>{this.processPageName(e[0])}),_t.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&_t.authenticate(e),e.flags&&Fs.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?_t.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):_t.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&_t.updateProfile(e)}processPageName(e){e&&_t.setPageName(e)}meddlePage(){this.overwritePush(_t.globalRef.page,(...e)=>{this.processPage(e[0])}),_t.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&&_t.setPageName(e.pageName),e.activeExperiment&&(this.runtimeData.activeExperiment=e.activeExperiment)}},vc=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))}},yc=class su{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=xe.get(Ue);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new su),this.INSTANCE}resetScrollID(t){vc.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)}ue.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Bo(window,"scroll").pipe(xr(su.DEBOUNCE_TIME),dr(()=>{let t=this.getPercentScrolledY();if(t>100){C.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)>=su.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let r={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let n=vc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new Le(k.EVENT_SCROLL,r,null,n);this.safeHttpService.sendEvent(i),vc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,r=window.innerHeight;return Math.ceil((window.scrollY+r)/t*100)}},nh=class LD{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=xe.get(Ue);runtimeData=ke.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){C.info("Not sending background event as user was inactive on website");return}C.info(`Sending background event with ${t} seconds`);let r={};r[LD.ACTIVE_DURATION]=t,this.apiService.sendEvent(new Le(k.EVENT_APP_BACKGROUND,r))}},rh=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof _i&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(r=>{if(r.url){let n=new FontFace(k.COOEE+e.name,r.getURL(),r.getFontDescriptor());t.push(n.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(r=>{document.fonts.add(r)})}},ih=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),C.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},oh=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ue.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&await this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:await this.collectFormData();break;case void 0:case 105:break;default:C.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;ue.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())}async closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),await this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){C.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)){C.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"),r=Notification.permission;return{camera:e,location:t,notification:r}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}async collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let r=document.getElementById(t.id).value;t.type===51?e.email=r:t.type===52&&(e.mobile=r)}await this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),ue.showSnackbar("Coupon applied on cart"),ih.updateIdentity(e)}async dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};await new xo().processEvent(t);let r={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}},Sr=class{renderer=ir.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,r){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=r,this.stylesConverter=new pc(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=re(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 Os(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 oh(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},wi=class extends Sr{constructor(e,t,r){super(e,t,r)}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 r=[];t.u&&r.push("underline"),t.st&&r.push("line-through"),r.length||r.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",r.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?Qa[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},Jl=class extends wi{constructor(e,t,r){super(e,t,r),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()}},Ql=class extends Sr{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},Hs=class extends Sr{constructor(e,t,r){super(e,t,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()}},eu=class MD extends Sr{constructor(t,r,n){super(t,r,n),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",MD.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 r=this.inappElement.spc,n=this.stylesConverter.getScaledSize(t.w)+r.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+r.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",n+"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(){}},sh=class extends Sr{constructor(e,t,r){super(e,t,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}},_c=class extends wi{borderColor="";constructor(e,t,r){super(e,t,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",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},ah=class VD extends _c{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,r,n){super(t,r,n)}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,r){t.addEventListener("keydown",n=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(VD.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(r,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(r,!1)),n.stopPropagation()})}},ch=class UD extends _c{static MOBILE_REGEX=/^\d+$/;constructor(t,r,n){super(t,r,n)}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,r){t.addEventListener("keydown",n=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(UD.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(r,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(r,!1)),n.stopPropagation()})}},lh=class Xi extends wi{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,r,n){super(t,r,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=re(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(r=>this.renderer.setStyles(r,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(Xi.DAYS)),t.hour&&this.elements.push(this.getChild(Xi.HOURS)),t.minute&&this.elements.push(this.getChild(Xi.MINUTES)),t.second&&this.elements.push(this.getChild(Xi.SECONDS)),this.elements.forEach(r=>this.inappHTMLEl.appendChild(r))}getChild(t){let r=this.renderer.createElement("div"),n=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,n.innerText="00",n.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(n,"text-align","center"),this.renderer.setStyle(n,"font-family","inherit"),this.inappElement.lblPos==="start"?(r.appendChild(i),r.appendChild(n)):(r.appendChild(n),r.appendChild(i)),this.renderer.setStyle(r,"display","flex"),this.renderer.setStyle(r,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(r,"justify-content","center"),this.renderer.setStyle(r,"align-items","center"),this.renderer.setStyle(r,"gap","5px"),this.spans.push(n),r}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,r=>{this.spans.forEach(n=>{n.id===`lc-${Xi.DAYS}`?n.innerText=String(r.days).padStart(2,"0"):n.id===`lc-${Xi.HOURS}`?n.innerText=String(r.hours).padStart(2,"0"):n.id===`lc-${Xi.MINUTES}`?n.innerText=String(r.minutes).padStart(2,"0"):n.id===`lc-${Xi.SECONDS}`&&(n.innerText=String(r.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},uh=class extends wi{constructor(e,t,r){super(e,t,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",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new yi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let r=this.parentHTMLEl.querySelector("#coo-13");if(!r)return;let n=e.imgs[0]??t.imgs?.at(0);n?.url&&r.setAttribute("src",n.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let r=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(n=>{t.add(this.createOption(n.name??"Default",n,n.mID===r?.vID))})}createOption(e,t,r){let n=this.renderer.createElement("option");return n.text=e,n.value=JSON.stringify(t),r&&(n.selected=!0),t||(n.disabled=!0),n}},dh=class extends Hs{constructor(e,t,r){super(e,t,r)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},Ec=class Sc{static ACTIVE_TRIGGER_DATA;renderer=ir.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ue.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 Hn(t))}async renderEngagement(t){if(this.triggerContext=new dc(new Date,t),this.triggerContext.onClose(r=>{this.closeInApp(r)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let r=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(r)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Yt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Yt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){Sc.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){bt.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&&Sc.ACTIVE_TRIGGER_DATA){let n={triggerShown:new yo(Sc.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,n),!0}if(ke.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let r=k.PAYMENT_MODAL_DETAILS.find(n=>!!document.querySelector(n.identifier));return r?(this.skipTrigger(t,{reason:`${r.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new eu(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw C.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let r=new Le(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(r);let n={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}sendTriggerClosed(t){let r=t.eventName;delete t.eventName;let n=new Le(r,t,this.triggerContext.triggerData);n.name===k.EVENT_TRIGGER_CLICKED&&(n.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(n)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,r,n){r instanceof rc?new ah(t,r,n).render():r instanceof ic?new ch(t,r,n).render():r instanceof Eo?new Jl(t,r,n).render():r instanceof oc?new dh(t,r,n).render():r instanceof Gi?new Hs(t,r,n).render():r instanceof Ps?new Ql(t,r,n).render():r instanceof tc?new lh(t,r,n).render():r instanceof nc?new uh(t,r,n).render():C.error("Unsupported element type- "+r.type)}renderContainer(t){let r=this.ian?.cont;r&&(this.containerHTMLElement=new sh(this.rootContainer,r,t).render().getHTMLElement(),new rh().loadAllFonts(this.ian),this.ian.elems?.forEach(async n=>{await this.renderElement(this.containerHTMLElement,n,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let r=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),Sc.ACTIVE_TRIGGER_DATA=void 0;let n=this.containerHTMLElement.animate(r,{duration:500,easing:"ease-in-out"});n.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){ir.get().removeInApp(this.triggerContext)}skipTrigger(t,r){let n=new Le(k.EVENT_CAMPAIGN_REJECTED,r,t);this.safeHTTP.sendEvent(n)}async preloadImages(t){let r=t.ian;if(!r)return;let n=[];r.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&n.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;n.push(this.getPromise(o))}}),r.bg?.img?.src&&n.push(this.getPromise(r.bg.img.src)),r.cont.bg?.img?.src&&n.push(this.getPromise(r.cont.bg.img.src)),await Promise.all(n)}getPromise(t){return new Promise(r=>{let n=new Image;n.onload=r,n.src=t,n.style.display="none"})}},fh=class{compareCartItemSubject=new ie;constructor(){this.compareCartItemSubject.pipe(xr(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(r=>C.error("Unable to process cart change in XMLHttpRequest",r))}),t.apply(this,arguments)},C.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(r){return t.apply(window,arguments).then(n=>(e.performEvent(r.toString()).catch(i=>C.error("Unable to process cart change in fetch",i)),n))},C.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(ke.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let r=e?.items,n=t.items,i=[],s=[];if(C.debug(`Comparing cart change with old count ${r?.length} to new count ${n.length}`),n?.forEach(o=>{let a=r?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=re(w({},o),{quantity:c});l?i.push(h):s.push(h)}r&&ue.removeFromArray(r,a)}else i.push(o)}),r)for(let o of r)s.push(o);C.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&mi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let r=new Le(e,t);xe.get(Ue).sendEvent(r)}async compareCartItems(){let e=await rt.get(ge.CURRENT_CART,{}),t=await ze.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},ph=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(r,n){try{await e.modifyRequest(r,n)}catch(i){bt.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(n?.body)})}return t(r,n)},C.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let r=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(r.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let n;if(typeof t.body=="string")try{n=JSON.parse(t.body)}catch{return}else n=t.body;C.debug("Intercepted fetch request of:",r),n?.query.includes("cartCreate")&&(t.body=await this.updatedBody(n),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],r=await ue.getCartAttributes();return e.variables.input.attributes=[...t,...r],JSON.stringify(e)}sendBuyNowEvent(){let e=ke.get().getCurrentItem();if(!e)return;let t=new Le(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ue.getInstance().sendEvent(t)}},wc=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,r=new Le(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ue.getInstance().sendEvent(r),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>C.error(e))}async listen(){this.elements=await ue.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},hh=class Pf extends wc{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(Pf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Pf),this.INSTANCE}},mh=class Uv extends wc{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(Uv.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Uv),this.INSTANCE}},gh=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(){ue.onDocumentLoaded(()=>{C.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){C.debug("No clickable cart checkout button found");return}C.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Yt.get().open()}},vh=class{trackSilently(){this.track().catch(e=>bt.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let r={};this.processSmallCheckout(e,r),this.processBigCheckout(t,r);let n=this.getTokenFromCurrentURLPath();if(n&&(r.urlToken=n),!Object.keys(r).length){C.warn("No processable data found in",e,t);return}r.referrer=document.referrer,r.url=location.href;let i=await xe.get(Kt).checkSessionAndGetContext();r.sessionID=i[0],this.trackOrder(r)}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){C.info("Found order to be send",e),Ue.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))}},tu=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await ze.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},r=new Le(k.EVENT_CHECKOUT_STARTED,t);Ue.getInstance().sendEvent(r)})}},yh=class{async migrate(){}};vn.escape=hx.MustacheUtils.escapeHtml;var _t=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new yh().migrate(),this.autoAuthenticate(),new th().meddle(),xe.get(Ro).loadExperimentSilently(),new nh().listen(),new vh().trackSilently(),new fh().listen(),new ph().listen(),new gh().listen(),xe.get(yc).listen(),xe.get(mh).listenSilently(),xe.get(hh).listenSilently(),xe.get($r).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),br.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||Pa(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,Pa(this.globalRef,"config",new wt),Pa(this.globalRef,"runtimeData",new ke),C.debug("Global reference initialised")}static injectWidgetAssets(){At.injectScriptURL(Rn.widgetURL,"cooee-widget-sdk"),At.injectStylesheet(Rn.styleURL)}static autoAuthenticate(){let e=xt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),r=e.shopifyShop;if((ue.isNull(t)||t.length!==24)&&ue.isNull(r)){C.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,xe.get(Kt).init(e)}static sendEvent(e,t,r){for(let i in t)if(i.length>3&&i.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");let n=new Le(e,t,r?.triggerData);r?.occurred&&(n.occurred=r.occurred),xe.get(Ue).sendEvent(n)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");xe.get(Ue).updateProfile(e)}static setPageName(e){if(!e)return;let t=ke.get(),r=t.pageName;if(e===r)return;if(t.pageName=e,e==="cart"&&xe.get($r).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){xe.get(yc).resetScrollID();return}let n={};r&&(n.ps=r);let i=new Le(k.EVENT_SCREEN_VIEW,n);i.occurred=t.jsLoadTime,xe.get(Ue).sendEvent(i),xe.get(yc).resetScrollID(i.occurred)}static previewPopup(e,t){new Ec(t).render(e)}static previewWidget(e){new Qn(new Hn(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){C.error(e)}window.addEventListener("message",e=>{if(C.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=ke.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:r}=t.detail;r&&this.updateProfile({goKwikToken:r})}),window.gokwikSdk?tu.attachCheckoutListener():window.addEventListener("gokwikLoaded",tu.attachCheckoutListener)}static storePreviewParams(){let e=ke.get(),t=new URLSearchParams(location.search),r=t.get("cooee-preview");r&&(e.previewIDs=r.trim().split(",").filter(i=>Number.isInteger(+i)));let n=t.get("cooee-variant");n&&(e.previewVariant=n)}},_h=class BD{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new BD),this.INSTANCE}init(){Ol.get(ge.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){C.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let r=this.updateGlobalConfig(t);Ol.set(ge.APP_CONFIG,r).catch(n=>C.error(n)),gp.processConfiguration(),r.website&&(At.injectRawScript(r.website.commonJS),At.injectRawCSS(r.website.commonCSS)),Yt.get().onToggle().subscribe(async({open:n})=>{C.info("Cart drawer is now",n?"open":"closed"),n&&(xe.get($r).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let r=_t.globalRef.config.update(t);return Yt.forceUpdate(),C.debug("App configurations",r),r}async trackViewCartEvent(){let t=await ze.getCurrent().getNormalisedCart(),r={value:t.amount,currency:t.currency},n={items:t.items,amount:r,drawer:!0};Ue.getInstance().sendEvent(new Le(k.EVENT_VIEW_CART,n))}},mx=Pe($_()),Eh=class U_{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 mx.URLBuilder(location.href)}catch{return{}}let r={};if(this.META_REQUIRED_FIELDS.every(n=>Array.from(t.getParams().keys()).includes(n)))return r={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new U_(r);if(this.GOOGLE_REQUIRED_FIELDS.every(n=>Array.from(t.getParams().keys()).includes(n)))return r={source:"GOOGLE"},new U_(r)}},Bs=class FD{static INSTANCE;httpAPIService=Mn.getInstance();coreService=_h.getInstance();sentryService=bt.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new FD),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await rt.set(ge.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await rt.set(ge.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await rt.set(ge.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),C.log("Validating session with server");let r=await this.getSessionValidateData(t);try{let n=await this.httpAPIService.validateSession(r);C.log("Validating session Response",n),await this.coreService.processAppConfigurations(n.appSettings),await this.storeAndPopulateAuthData(n)}catch(n){throw C.error(n),n}}async populateUserDataFromStorage(){if(this.sdkToken=await rt.get(ge.SDK_TOKEN),!this.sdkToken){C.warn("No SDK token found in local storage");return}this.userID=await rt.get(ge.ID),this.deviceID=await rt.get(ge.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){C.debug("SDK Token:",this.sdkToken),C.log("Device ID:",this.deviceID),C.log("User ID:",this.userID),Ya.trackDeviceID(this.deviceID),br.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 r=await new hp().get();r.host=location.origin;try{(await CT())?.isPrivate&&(r.private=!0)}catch(i){gx.default.error("Unable to detect private/incognito window",i)}let n=await rt.get(ge.DEVICE_ID);return n||(n=new cn().toHexString(),await rt.set(ge.DEVICE_ID,n)),re(w({deviceID:n,deviceProps:r,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:hi.parseFromCurrent(),ad:Eh.getAdParams(),occurred:this.getSessionStartTime(ke.get().jsLoadTime),currentItem:ke.get().getCurrentItem(),cart:await ze.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await rt.get(ge.FIRST_SEEN),r=t?new Date(t):new Date;t||await rt.set(ge.FIRST_SEEN,r.toISOString()),this.httpAPIService.setFirstSeen(r),this.sentryService.setGlobalContext("Visitor Info",{first_seen:r.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},Kt=class Cc{static replaySubject=new Po(1);static INSTANCE;sentryService=xe.get(bt);lock=new qa;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Cc),this.INSTANCE}init(t){if(C.debug("Initialising SDK",t),wT(navigator.userAgent)){C.info("This seems to be a bot. Disabling SDK");return}Bs.getInstance().init(t),Cc.INSTANCE.checkForNewSession(!0).then(async()=>{Cc.replaySubject.next(!0),Cc.replaySubject.complete()}).catch(r=>C.error("Unable to perform device init",r))}getCurrentSessionID(){return mn.set(ge.SESSION_LAST_USED_TIME,new Date().getTime()),mn.get(ge.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 r=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,r=!0):await this.notSynced()&&(r=!0),t){let n=await this.getContext();await Bs.getInstance().validateSession({sessionID:n[0],sessionNumber:n[1],landingPage:n[2],newSession:r}),await mn.set(ge.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){C.debug("Starting new session"),await mn.clear(),C.debug("Cleared SessionStorage before starting new session");let t=new Date,r=new cn().toHexString();C.debug("New session ID to be used",r);let n=await rt.get(ge.SESSION_NUMBER,0)+1;br.prepend(`New Session ID: <strong>${r}</strong> & number: ${n}`),await Promise.all([rt.set(ge.SESSION_NUMBER,n),mn.set(ge.ID,r),mn.set(ge.SESSION_LAST_USED_TIME,t.getTime()),mn.set(ge.SESSION_LANDING_PAGE,hi.parseFromCurrent())])}getLandingPage(){return mn.get(ge.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return rt.get(ge.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await mn.get(ge.ID))return!0;let t=await mn.get(ge.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await mn.get(ge.SESSION_SYNCED,!1)}},_x=Pe(Yn()),vx=Pe(Yn()),yx=Pe(Sa()),wh=class{triggerData;safeHttpService=Ue.getInstance();render(e){e.contentSource===vx.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){C.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new Le(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let r=this.getFormDetails(t);this.safeHttpService.sendEvent(new Le(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 Le(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},r=e.metaData;if(yx.JSUtils.hasKeys(r)){let n=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(r).forEach(o=>{n.includes(o)||(t[o]=r[o])}),t.email=r.$email??r.email,t.mobile=r.$phone_number??r.phone_number;let i=r.$first_name??r.first_name,s=r.$last_name??r.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},bh=class{static trackIntent(e){if(!this.isInstalled()){C.log("Facebook pixel not installed");return}if(!wt.get().pixelPush){C.log("Facebook pixel push not enabled");return}let t=Rs[e.intent]?.toLowerCase(),r=e.segmentName;!t&&!r||(C.debug(`Sending ${t} intent and ${r} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},Ch=class jD{static INSTANCE;httpService=xe.get(Mn);sentryService=xe.get(bt);sessionManager=xe.get(Kt);runtime=ke.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new jD),this.INSTANCE}sendSilently(t){this.send(t).catch(r=>C.error(`Failed to send ${t.name}`,r))}async send(t){if(C.debug(`Sending event ${t.name}`),br.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){C.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 r=>{C.log("\u2705 Event tracked:",t.name),br.prepend(`\u2705 Event <strong>${r.eventName}</strong> tracked`),this.processEventResponse(t,r)}).catch(r=>{C.error(`Error sending event ${t.name} to server`,r)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(C.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let r=await this.sessionManager.checkSessionAndGetContext();t.sessionID=r[0],t.sessionNumber=r[1],t.landingPage=r[2],t.page=hi.parseFromCurrent()}async addShopifyContext(t){if(xt.isShopify())try{t.cart=await ze.getCurrent().getNormalisedCart()}catch(r){C.error("Error fetching Shopify cart before sending the event",r)}}processEventResponse(t,r){this.renderWidgetIfAny(t,r).catch(n=>{C.error("Failed to display a campaign",n,t,r),this.sentryService.captureException(n,{event:t,response:r})}),this.utiliseIntentIfCalculated(r)}async renderWidgetIfAny(t,r){if(!r.triggerData){C.log(`Nothing to engage after ${t.name}`);return}C.log(`\u{1F4E3} Engagement(id=${r.triggerData.shortID}) will be shown`,r.triggerData);let n=new Hn(r.triggerData);n.occurred=t.occurred;let i;try{i=await fc.refreshItems(n)}catch(s){C.error("Failed to refresh the products",s);return}if(n.items=i,n.contentSource===_x.EngagementContentSource.KLAVIYO){new wh().render(n);return}new Ec().renderEngagement(n).catch(s=>{C.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:n})})}utiliseIntentIfCalculated(t){t.intent&&(Ya.trackIntent(t.intent),bh.trackIntent(t),br.prepend(`Intent is <strong>${Rs[t.intent]}</strong>`))}addShopifyAttributes(){xt.isShopify()&&ze.getCurrent().addCooeeAttributes().catch(t=>{C.error("Fail to add attributes in cart",t)})}},Ue=class HD{static INSTANCE;httpApiService=Mn.getInstance();eventAPIService=Ch.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new HD),this.INSTANCE}sendEvent(t){C.debug(`Waiting for auth to send event ${t.name}`),Kt.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){Kt.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){Kt.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){Kt.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},Do=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ue.getInstance();async execute(e){let t=ke.get().getCurrentItem(),r=e.clickAction||this.element?.clc;if(!r)return;let n=e.item,i=this.triggerContext,s=new xo,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!r?.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="",h=[],d=[];if(n?d=[n.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),r.at===108){let b=i.selectedItems;if(d=e.embeddedItems??b.map(I=>I.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let I;e.embeddedItems?I=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):I=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&(I.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),d.unshift(A.toEmbed())),l.selectedVariants=I,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??b}else if(r.at===107){let b=await ze.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(I=>({itemMID:I.mID,mID:I.vID}))}else if(r.at===102)h=n?[n]:[e.embeddedItem];else if(r.at===101)c=n?xt.getRootPrefix()+"products/"+n.slug:e.embeddedItem?.link;else if(r.at===4){let b=ue.isValidURL(r.gu?.u);b&&(c=b.href)}else if(r.at===109){let b=await s.upgradeToSubscription(n,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Yt.get().refreshUI(b)}if(this.sendTriggerClicked(d,{from:"button"},e.video),C.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),C.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){wx.default.error("Unable to get a discount code",b);return}}if(f&&r.at===103)await s.performCopyCoupon(f);else if(r.at===110){let b=await s.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await To.applyWithStorefront(f)}catch(b){C.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){To.navigate(f,o,c);return}if(c){location.href=c;return}To.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,r){let n=k.EVENT_TRIGGER_CLICKED,i=new Le(n,t,this.triggerContext.triggerData);i.items=e,r?.id&&(i.videos=[r.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let r="";if(t.type===Ex.DiscountType.STATIC){if(!t.code)throw bt.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(r=await this.generateDiscount(e),!r)throw C.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(t){throw ue.showSnackbar("Failed to generate a discount code"),C.error("Error generating discount code",t,e),bt.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Ki=class{static getBestSources(e){if(!e)return[];let t=[],r=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];r&&t.push(r);let n=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return n&&t.push(n),t}static async performCTA(e,t){let r={applyDiscount:!0};t.cta===No.ClickActionType.ADD_TO_CART?r={at:No.ClickActionType.ADD_TO_CART,applyDiscount:!0}:t.cta===No.ClickActionType.GO_TO_PRODUCT?r={at:No.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0}:t.cta===No.ClickActionType.OPEN_CART&&(e.triggerData.redirectBehaviour=No.RedirectBehaviour.CART_DRAWER),await new Do(e).execute({clickAction:r,embeddedItem:new hn(t.item)})}},bx=Pe(q_()),aU=["videoPlayers"],Sh=class H_{videoPlayers;videos=[];currentIndex=0;muted=!0;videoProgress=[];selectedItem=null;triggerContext;VideoUtils=Ki;isMobile;engagementTrigger;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData,this.isMobile=new bx.default().getDevice().type==="mobile"}pauseAll(){this.videoPlayers.forEach(t=>t.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(r=>r.nativeElement.muted=this.muted);let t=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await rt.set(ge.MUTED,this.muted)}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await rt.get(ge.MUTED,!0),t.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let t=this.getCurrentVideoElement();t.currentTime=0,t.play()}else this.moveToNextVideo();else{let t=this.videoPlayers.last;if(t){let r=this.getPreviousVideoDataForEvent(),n=[k.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),t.nativeElement.currentTime=0,t.nativeElement.play()}}}updateProgress(t,r){let n=t.target;this.videoProgress[r]=n.currentTime/n.duration*100}onSlideChange(t){let r=this.getPreviousVideoDataForEvent();t(),this.playActiveVideo(),this.selectedItem=null;let n=this.currentVideoProps(),i={previous:r,current:n},s=[k.EVENT_VIDEO_CHANGE,i,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(t,r){let n={videoID:r.id,videoIndex:this.currentIndex},i=[k.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),this.selectedItem=t}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),r=this.videoPlayers.find(i=>i.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(r?.currentTime*1e3);let n=r?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/n).toFixed(4),t}static \u0275fac=function(t){return new(t||H_)};static \u0275cmp=ft({type:H_,selectors:[["cooee-base-video"]],viewQuery:function(t,r){if(t&1&&ns(aU,5),t&2){let n;rs(n=is())&&(r.videoPlayers=n)}},decls:0,vars:0,template:function(t,r){},encapsulation:2})},cU=["swiperContainer"],lU=(e,t)=>({"lc:bg-white":e,"lc:bg-black/70 lc:justify-center lc:items-center":t}),uU=e=>({"lc:w-[100dvw] lc:h-[100dvh] lc:rounded-none":e}),dU=e=>({"swiper-hide-slide":e}),fU=e=>({"lc:rounded-lg":e}),pU=()=>({size:18}),hU=()=>({size:48}),mU=(e,t)=>({"lc-mobile lc:bg-black/50":e,"lc-desktop lc:bg-transparent":t}),Cx=(e,t)=>t.url;function gU(e,t){if(e&1&&Ae(0,"source",10),e&2){let r=t.$implicit;qn("type",r.mimeType),Bi("media","(max-width: ",r.width,"px)"),be("src",r.url,fn)}}function vU(e,t){if(e&1&&Ae(0,"source",11),e&2){let r=t.$implicit;qn("type",r.mimeType),be("src",r.url,fn)}}function yU(e,t){if(e&1){let r=zn();Q(0,"video",9,2),ht("timeupdate",function(n){It(r);let i=X().$index,s=X();return Tt(s.updateProgress(n,i))})("click",function(){It(r);let n=X().$index,i=X();return Tt(i.currentIndex===n&&i.toggleMute())})("ended",function(){It(r);let n=X(2);return Tt(n.onVideoEnded())}),Wt(2,gU,1,4,"source",10,Cx),Wt(4,vU,1,2,"source",11,Cx),ee()}if(e&2){let r=X(),n=r.$implicit,i=r.$index,s=X();be("ngClass",Ea(4,fU,!s.isMobile))("autoplay",s.currentIndex===i)("muted",s.muted),ts("data-video-id",n.id),Y(2),Gt(n.sources),Y(2),Gt(s.VideoUtils.getBestSources(n.sources))}}function _U(e,t){if(e&1){let r=zn();Q(0,"div",13)(1,"cooee-product-modal",14),ht("performCTA",function(n){It(r);let i=X(2).$implicit,s=X();return Tt(s.performClickToAction(n,i))})("closeModel",function(){It(r);let n=X(3);return Tt(n.selectedItem=null)}),ee()()}if(e&2){let r=X(3);Y(),be("item",r.selectedItem)}}function EU(e,t){e&1&&Vd(0)}function wU(e,t){if(e&1&&pt(0,EU,1,0,"ng-container",18),e&2){X(4);let r=gv(9);be("ngTemplateOutlet",r)("ngTemplateOutletContext",vv(2,pU))}}function bU(e,t){if(e&1){let r=zn();Q(0,"div",15)(1,"cooee-mute-toggle",16),ht("buttonClicked",function(){It(r);let n=X(3);return Tt(n.toggleMute())}),ee(),pt(2,wU,1,3,"ng-container"),ee(),Q(3,"cooee-product-card",17),ht("performCTA",function(n){It(r);let i=X(2).$implicit,s=X();return Tt(s.performClickToAction(n,i))})("clicked",function(n){It(r);let i=X(2).$implicit,s=X();return Tt(s.productCardClicked(n,i))}),ee()}if(e&2){let r=X(2).$implicit,n=X();Y(),be("muted",n.muted),Y(),Pt(n.isMobile?2:-1),Y(),be("items",r.items)}}function CU(e,t){if(e&1&&(Ae(0,"cooee-video-progress-bar",12),pt(1,_U,2,1,"div",13)(2,bU,4,3)),e&2){let r=X().$index,n=X();be("width",n.videoProgress[r]||0),Y(),Pt(n.selectedItem?1:2)}}function SU(e,t){if(e&1&&(Fr(0),Q(1,"div",6),pt(2,yU,6,6,"video",8)(3,CU,3,2),ee()),e&2){let r=t.$index,n=X(),i=n.currentIndex===r||n.currentIndex-1===r||n.currentIndex+1===r;Y(),be("ngClass",Ea(3,dU,!i)),Y(),Pt(i?2:-1),Y(),Pt(n.currentIndex===r?3:-1)}}function DU(e,t){e&1&&Ae(0,"div",19)(1,"div",20)}function IU(e,t){e&1&&Vd(0)}function TU(e,t){if(e&1&&(Q(0,"div",7),pt(1,IU,1,0,"ng-container",18),ee()),e&2){X();let r=gv(9);Y(),be("ngTemplateOutlet",r)("ngTemplateOutletContext",vv(2,hU))}}function xU(e,t){if(e&1){let r=zn();Q(0,"button",21),ht("click",function(){It(r);let n=X();return Tt(n.close())}),hr(),Q(1,"svg",22),Ae(2,"path",23)(3,"path",24),ee()()}if(e&2){let r=t.size,n=X();be("ngClass",yv(3,mU,n.isMobile,!n.isMobile)),Y(),ts("height",r+"px")("width",r+"px")}}var Dh=class Y_ extends Sh{constructor(t){super(),this.cdr=t}videos=[];currentIndex=0;closeDialog=new We;performCTA=new We;swiperContainerRef;swiperInstance;ngAfterViewInit(){let t=this.swiperContainerRef.nativeElement.getRootNode(),r=wt.get().website.commonCSS;r&&At.injectRawCSS(r,t),At.injectStylesheet(Rn.styleURL,t),At.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",t),this.initSwiper(),this.afterSwiperInit(),this.playActiveVideo()}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(t=this.videos[this.currentIndex],r=this.currentIndex){let n=this.getCurrentVideoElement();this.closeDialog.emit({lastVideo:t,lastVideoIndex:r,lastVideoDuration:n?.currentTime})}performClickToAction(t,r){this.performCTA.emit({cta:t.cta,item:t.item,video:r})}getCurrentVideoElement(){return this.videoPlayers.get(Math.min(this.currentIndex,1))?.nativeElement}updateProgress(t,r){super.updateProgress(t,r),this.cdr.detectChanges()}async toggleMute(){await super.toggleMute(),this.cdr.detectChanges()}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:this.isMobile?1: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")}}),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-size","50px"),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-color","white")}afterSwiperInit(){this.swiperInstance.on("slideChange",t=>{this.onSlideChange(()=>{this.currentIndex=t.realIndex,this.cdr.detectChanges()})})}static \u0275fac=function(t){return new(t||Y_)(Ht(Br))};static \u0275cmp=ft({type:Y_,selectors:[["cooee-video-swiper"]],viewQuery:function(t,r){if(t&1&&ns(cU,5),t&2){let n;rs(n=is())&&(r.swiperContainerRef=n.first)}},inputs:{videos:"videos",currentIndex:"currentIndex",triggerContext:"triggerContext"},outputs:{closeDialog:"closeDialog",performCTA:"performCTA"},features:[fo],decls:10,vars:9,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoPlayers",""],[1,"lc:relative","lc:w-screen","lc:h-screen","lc:flex",3,"ngClass"],[1,"swiper-container","lc:w-[70vw]","lc:h-[80vh]",3,"ngClass"],[1,"swiper-wrapper"],[1,"swiper-slide","lc:relative","lc:flex","lc:items-center",3,"ngClass"],[1,"lc:absolute","lc:top-10","lc:right-20","lc:flex","lc:gap-2","lc:z-10"],["playsinline","",1,"lc:h-full","lc:w-full","lc:object-cover","lc:z-[-1]","lc:fixed",3,"ngClass","autoplay","muted"],["playsinline","",1,"lc:h-full","lc:w-full","lc:object-cover","lc:z-[-1]","lc:fixed",3,"timeupdate","click","ended","ngClass","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-2","lc:flex","lc:gap-2","lc:z-10","lc:flex","lc:gap-1"],[3,"buttonClicked","muted"],[3,"performCTA","clicked","items"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"swiper-button-prev","lc:text-white"],[1,"swiper-button-next","lc:text-white"],["id","lc-close-button",1,"lc:rounded-full","lc:flex","lc:items-center","lc:justify-center","lc:border-none","lc:cursor-pointer",3,"click","ngClass"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","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"]],template:function(t,r){t&1&&(Q(0,"div",3)(1,"div",4,0)(3,"div",5),Wt(4,SU,4,5,"div",6,Fi),ee(),pt(6,DU,2,0),ee(),pt(7,TU,2,3,"div",7),ee(),pt(8,xU,4,6,"ng-template",null,1,qS)),t&2&&(be("ngClass",yv(4,lU,r.isMobile,!r.isMobile)),Y(),be("ngClass",Ea(7,uU,r.isMobile)),Y(3),Gt(r.videos),Y(2),Pt(r.isMobile?-1:6),Y(),Pt(r.isMobile?-1:7))},dependencies:[op,cp,lp,up,Wd,sD],styles:[`.swiper-hide-slide{visibility:hidden!important}
79
+ `],encapsulation:3})},Ih=class U0{constructor(t,r){this.dialogRef=t,this.data=r}static \u0275fac=function(t){return new(t||U0)(Ht(xs),Ht(B_))};static \u0275cmp=ft({type:U0,selectors:[["cooee-desktop-video-carousel"]],decls:1,vars:3,consts:[[3,"closeDialog","performCTA","videos","currentIndex","triggerContext"]],template:function(t,r){t&1&&(Q(0,"cooee-video-swiper",0),ht("closeDialog",function(n){return r.dialogRef.close(n)})("performCTA",function(n){return r.data.onCTAPerformed(n)}),ee()),t&2&&be("videos",r.data.videos)("currentIndex",r.data.currentIndex)("triggerContext",r.data.triggerContext)},dependencies:[Dh],encapsulation:2})},ou=Pe(Nx());function Gx(e){let t=e.cloneNode(!0),r=t.querySelectorAll("[id]"),n=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<r.length;i++)r[i].removeAttribute("id");return n==="canvas"?Ox(e,t):(n==="input"||n==="select"||n==="textarea")&&Mx(e,t),Ax("canvas",e,t,Ox),Ax("input, textarea, select",e,t,Mx),t}function Ax(e,t,r,n){let i=t.querySelectorAll(e);if(i.length){let s=r.querySelectorAll(e);for(let o=0;o<i.length;o++)n(i[o],s[o])}}var NU=0;function Mx(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${NU++}`)}function Ox(e,t){let r=t.getContext("2d");if(r)try{r.drawImage(e,0,0)}catch{}}function FE(e){let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function ME(e,t,r){let{top:n,bottom:i,left:s,right:o}=e;return r>=n&&r<=i&&t>=s&&t<=o}function iu(e,t,r){e.top+=t,e.bottom=e.top+e.height,e.left+=r,e.right=e.left+e.width}function Px(e,t,r,n){let{top:i,right:s,bottom:o,left:a,width:l,height:c}=e,h=l*t,d=c*t;return n>i-d&&n<o+d&&r>a-h&&r<s+h}var Ah=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:FE(t)})})}handleScroll(e){let t=Kn(e),r=this.positions.get(t);if(!r)return null;let n=r.scrollPosition,i,s;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,s=l.left}else i=t.scrollTop,s=t.scrollLeft;let o=n.top-i,a=n.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&t!==c&&t.contains(c)&&iu(l.clientRect,o,a)}),n.top=i,n.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function zx(e,t){let r=e.rootNodes;if(r.length===1&&r[0].nodeType===t.ELEMENT_NODE)return r[0];let n=t.createElement("div");return r.forEach(i=>n.appendChild(i)),n}function BE(e,t,r){for(let n in t)if(t.hasOwnProperty(n)){let i=t[n];i?e.setProperty(n,i,r?.has(n)?"important":""):e.removeProperty(n)}return e}function bc(e,t){let r=t?"":"none";BE(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":r,"-ms-user-select":r,"-webkit-user-select":r,"-moz-user-select":r})}function kx(e,t,r){BE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},r)}function Mh(e,t){return t&&t!="none"?e+" "+t:e}function Lx(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=Oh(t.left,t.top)}function Oh(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Fx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function AU(e){let t=getComputedStyle(e),r=NE(t,"transition-property"),n=r.find(a=>a==="transform"||a==="all");if(!n)return 0;let i=r.indexOf(n),s=NE(t,"transition-duration"),o=NE(t,"transition-delay");return Fx(s[i])+Fx(o[i])}function NE(e,t){return e.getPropertyValue(t).split(",").map(r=>r.trim())}var MU=new Set(["position"]),OE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,r,n,i,s,o,a,l,c){this._document=e,this._rootElement=t,this._direction=r,this._initialDomRect=n,this._previewTemplate=i,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=a,this._zIndex=l,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Bx(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return AU(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,r=e?e.template:null,n;if(r&&e){let i=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(r,e.context);s.detectChanges(),n=zx(s,this._document),this._previewEmbeddedView=s,e.matchSize?Lx(n,i):n.style.transform=Oh(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else n=Gx(this._rootElement),Lx(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return BE(n.style,{"pointer-events":"none",margin:Bx(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},MU),bc(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>n.classList.add(i)):n.classList.add(t)),n}};function Bx(e){return"showPopover"in e}var OU={passive:!0},Vx={passive:!1},PU={passive:!1,capture:!0},kU=800,Ux=new Set(["position"]),PE=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=ki(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new ie;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=dt.EMPTY;_pointerUpSubscription=dt.EMPTY;_scrollSubscription=dt.EMPTY;_resizeSubscription=dt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>bc(t,e)))}_disabled=!1;beforeStarted=new ie;started=new ie;released=new ie;ended=new ie;entered=new ie;exited=new ie;dropped=new ie;moved=this._moveEvents;data;constrainPosition;constructor(e,t,r,n,i,s,o){this._config=t,this._document=r,this._ngZone=n,this._viewportRuler=i,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new Ah(r),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(r=>Xn(r)),this._handles.forEach(r=>bc(r,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(r=>{this._handles.indexOf(r)>-1&&t.add(r)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Xn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Cn(this._renderer,t,"mousedown",this._pointerDown,Vx),Cn(this._renderer,t,"touchstart",this._pointerDown,OU),Cn(this._renderer,t,"dragstart",this._nativeDragStart,Vx)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Xn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),bc(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),bc(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let n=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(n+i>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),o=this._dropContainer;if(!s){this._endDragSequence(e);return}(!o||!o.isDragging()&&!o.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let r=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(r),this._dropContainer)this._updateActiveDropContainer(r,t);else{let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=r.x-n.x+this._passiveTransform.x,i.y=r.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:r,event:e,distance:this._getDragDistance(r),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){nu(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),r=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Cn(this._renderer,t,"selectstart",LU,PU)}),r){let n=this._rootElement,i=n.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,n),this._initialTransform=n.style.transform||"",this._preview=new OE(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,t)),kx(n,!1,Ux),this._document.body.appendChild(i.replaceChild(s,n)),this.started.next({source:this,event:e}),r.start(),this._initialContainer=r,this._initialIndex=r.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(r?r.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let r=this.isDragging(),n=nu(t),i=!n&&t.button!==0,s=this._rootElement,o=Kn(t),a=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+kU>Date.now(),l=n?Xf(t):Zf(t);if(o&&o.draggable&&t.type==="mousedown"&&t.preventDefault(),r||i||a||l)return;if(this._handles.length){let d=s.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=FE(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){kx(this._rootElement,!0,Ux),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,r=t.getItemIndex(this),n=this._getPointerPositionOnPage(e),i=this._getDragDistance(n),s=t._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:i,dropPoint:n,event:e}),this.dropped.next({item:this,currentIndex:r,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:i,dropPoint:n,event:e}),t.drop(this,r,this._initialIndex,this._initialContainer,s,i,n,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:r,y:n}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(r,n),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(r=>{let n=o=>{(!o||this._preview&&Kn(o)===this._preview.element&&o.propertyName==="transform")&&(s(),r(),clearTimeout(i))},i=setTimeout(n,t*1.5),s=this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,r;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),r=zx(this._placeholderRef,this._document)):r=Gx(this._rootElement),r.style.pointerEvents="none",r.classList.add("cdk-drag-placeholder"),r}_getPointerPositionInElement(e,t,r){let n=t===this._rootElement?null:t,i=n?n.getBoundingClientRect():e,s=nu(r)?r.targetTouches[0]:r,o=this._getViewportScrollPosition(),a=s.pageX-i.left-o.left,l=s.pageY-i.top-o.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),r=nu(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,n=r.pageX-t.left,i=r.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=n,o.y=i,o.matrixTransform(s.inverse())}}return{x:n,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:r,y:n}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(r=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),d=o.left+i,f=o.right-(a-i);r=Hx(r,d,f),n=Hx(n,c,h)}return{x:r,y:n}}_updatePointerDirectionDelta(e){let{x:t,y:r}=e,n=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-i.x),o=Math.abs(r-i.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=t>i.x?1:-1,i.x=t),o>this._config.pointerDirectionChangeThreshold&&(n.y=r>i.y?1:-1,i.y=r),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,bc(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let r=1/this.scale,n=Oh(e*r,t*r),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Mh(n,this._initialTransform)}_applyPreviewTransform(e,t){let r=this._previewTemplate?.template?void 0:this._initialTransform,n=Oh(e,t);this._preview.setTransform(Mh(n,r))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let r=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||r.width===0&&r.height===0)return;let i=n.left-r.left,s=r.right-n.right,o=n.top-r.top,a=r.bottom-n.bottom;n.width>r.width?(i>0&&(e+=i),s>0&&(e-=s)):e=0,n.height>r.height?(o>0&&(t+=o),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:nu(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let r=Kn(e);this._boundaryRect&&r!==this._boundaryElement&&r.contains(this._boundaryElement)&&iu(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=$a(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let r=this._previewContainer||"global";if(r==="parent")return e;if(r==="global"){let n=this._document;return t||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return Xn(r)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function Hx(e,t,r){return Math.max(t,Math.min(r,e))}function nu(e){return e.type[0]==="t"}function LU(e){e.preventDefault()}function qx(e,t,r){let n=jx(t,e.length-1),i=jx(r,e.length-1);if(n===i)return;let s=e[n],o=i<n?-1:1;for(let a=n;a!==i;a+=o)e[a]=e[a+o];e[i]=s}function jx(e,t){return Math.max(0,Math.min(t,e))}var Ph=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,r,n){let i=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,r,n);if(s===-1&&i.length>0)return null;let o=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===e),l=i[s],c=i[a].clientRect,h=l.clientRect,d=a>s?1:-1,f=this._getItemOffsetPx(c,h,d),g=this._getSiblingOffsetPx(a,i,d),m=i.slice();return qx(i,a,s),i.forEach((b,I)=>{if(m[I]===b)return;let A=b.drag===e,F=A?f:g,U=A?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=F;let M=Math.round(b.offset*(1/b.drag.scale));o?(U.style.transform=Mh(`translate3d(${M}px, 0, 0)`,b.initialTransform),iu(b.clientRect,0,F)):(U.style.transform=Mh(`translate3d(0, ${M}px, 0)`,b.initialTransform),iu(b.clientRect,F,0))}),this._previousSwap.overlaps=ME(h,t,r),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?n.x:n.y,{previousIndex:a,currentIndex:s}}enter(e,t,r,n){let i=n==null||n<0?this._getItemIndexFromPointerPosition(e,t,r):n,s=this._activeDraggables,o=s.indexOf(e),a=e.getPlaceholderElement(),l=s[i];if(l===e&&(l=s[i+1]),!l&&(i==null||i===-1||i<s.length-1)&&this._shouldEnterAsFirstChild(t,r)&&(l=s[0]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(a,c),s.splice(i,0,e)}else this._element.appendChild(a),s.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let r=this._itemPositions.find(n=>n.drag===e)?.initialTransform;t.style.transform=r||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:r})=>{iu(r,e,t)}),this._itemPositions.forEach(({drag:r})=>{this._dragDropRegistry.isDragging(r)&&r._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let r=t.getVisibleElement();return{drag:t,offset:0,initialTransform:r.style.transform||"",clientRect:FE(r)}}).sort((t,r)=>e?t.clientRect.left-r.clientRect.left:t.clientRect.top-r.clientRect.top)}_getItemOffsetPx(e,t,r){let n=this.orientation==="horizontal",i=n?t.left-e.left:t.top-e.top;return r===-1&&(i+=n?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,r){let n=this.orientation==="horizontal",i=t[e].clientRect,s=t[e+r*-1],o=i[n?"width":"height"]*r;if(s){let a=n?"left":"top",l=n?"right":"bottom";r===-1?o-=s.clientRect[a]-i[l]:o+=i[a]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let r=this._itemPositions,n=this.orientation==="horizontal";if(r[0].drag!==this._activeDraggables[0]){let i=r[r.length-1].clientRect;return n?e>=i.right:t>=i.bottom}else{let i=r[0].clientRect;return n?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,r,n){let i=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:a})=>{if(o===e)return!1;if(n){let l=i?n.x:n.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):r>=Math.floor(a.top)&&r<Math.floor(a.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},kE=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let r=0;r<t.length;r++){let n=t[r];this._relatedNodes.push([n,n.nextSibling])}this.withItems(e)}sort(e,t,r,n){let i=this._getItemIndexFromPointerPosition(e,t,r),s=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let o=this._activeItems[i];if(s.drag===o&&s.overlaps&&s.deltaX===n.x&&s.deltaY===n.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),c=o.getRootElement();i>a?c.after(l):c.before(l),qx(this._activeItems,a,i);let h=this._getRootNode().elementFromPoint(t,r);return s.deltaX=n.x,s.deltaY=n.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:a,currentIndex:i}}enter(e,t,r,n){let i=n==null||n<0?this._getItemIndexFromPointerPosition(e,t,r):n;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,r));let s=this._activeItems[i],o=this._activeItems.indexOf(e);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(i,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let r=this._relatedNodes.length-1;r>-1;r--){let[n,i]=this._relatedNodes[r];n.parentNode===e&&n.nextSibling!==i&&(i===null?e.appendChild(n):i.parentNode===e&&e.insertBefore(n,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,r){let n=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(r)),i=n?this._activeItems.findIndex(s=>{let o=s.getRootElement();return n===o||o.contains(n)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=$a(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,r){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let n=1/0,i=-1;for(let s=0;s<this._activeItems.length;s++){let o=this._activeItems[s];if(o!==e){let{x:a,y:l}=o.getRootElement().getBoundingClientRect(),c=Math.hypot(t-a,r-l);c<n&&(n=c,i=s)}}return i}},$x=.05,Yx=.05,Dr=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(Dr||{}),jn=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(jn||{}),LE=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new ie;entered=new ie;exited=new ie;dropped=new ie;sorted=new ie;receivingStarted=new ie;receivingStopped=new ie;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=dt.EMPTY;_verticalScrollDirection=Dr.NONE;_horizontalScrollDirection=jn.NONE;_scrollNode;_stopScrollTimers=new ie;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,r,n,i){this._dragDropRegistry=t,this._ngZone=n,this._viewportRuler=i;let s=this.element=Xn(e);this._document=r,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new Ah(r)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,r,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,r,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,r,n,i,s,o,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:r,container:this,previousContainer:n,isPointerOverContainer:i,distance:s,dropPoint:o,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(r=>r._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>e.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof Ph&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new kE(this._document,this._dragDropRegistry);else{let t=new Ph(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,r)=>this.sortPredicate(t,r,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Xn(this.element),r=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(e);return r>-1&&this._scrollableElements.splice(r,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,r,n){if(this.sortingDisabled||!this._domRect||!Px(this._domRect,$x,t,r))return;let i=this._sortStrategy.sort(e,t,r,n);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let r,n=Dr.NONE,i=jn.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||r||Px(s.clientRect,$x,e,t)&&([n,i]=FU(o,s.clientRect,this._direction,e,t),(n||i)&&(r=o))}),!n&&!i){let{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};n=Kx(a,t),i=Zx(a,e),r=window}r&&(n!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||r!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=i,this._scrollNode=r,(n||i)&&r?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),im(0,Eu).pipe(Wr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===Dr.UP?e.scrollBy(0,-t):this._verticalScrollDirection===Dr.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===jn.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===jn.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&ME(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,r){return this._siblings.find(n=>n._canReceive(e,t,r))}_canReceive(e,t,r){if(!this._domRect||!ME(this._domRect,t,r)||!this.enterPredicate(e,this))return!1;let n=this._getShadowRoot().elementFromPoint(t,r);return n?n===this._container||this._container.contains(n):!1}_startReceiving(e,t){let r=this._activeSiblings;!r.has(e)&&t.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(r.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=$a(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Kx(e,t){let{top:r,bottom:n,height:i}=e,s=i*Yx;return t>=r-s&&t<=r+s?Dr.UP:t>=n-s&&t<=n+s?Dr.DOWN:Dr.NONE}function Zx(e,t){let{left:r,right:n,width:i}=e,s=i*Yx;return t>=r-s&&t<=r+s?jn.LEFT:t>=n-s&&t<=n+s?jn.RIGHT:jn.NONE}function FU(e,t,r,n,i){let s=Kx(t,i),o=Zx(t,n),a=Dr.NONE,l=jn.NONE;if(s){let c=e.scrollTop;s===Dr.UP?c>0&&(a=Dr.UP):e.scrollHeight-c>e.clientHeight&&(a=Dr.DOWN)}if(o){let c=e.scrollLeft;r==="rtl"?o===jn.RIGHT?c<0&&(l=jn.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=jn.LEFT):o===jn.LEFT?c>0&&(l=jn.LEFT):e.scrollWidth-c>e.clientWidth&&(l=jn.RIGHT)}return[a,l]}var ru={capture:!0},AE={passive:!1,capture:!0},BU=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ft({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(r,n){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
80
+ `],encapsulation:2,changeDetection:0})}return e})(),Xx=(()=>{class e{_ngZone=O(Ve);_document=O(Qe);_styleLoader=O(Ss);_renderer=O(dn).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=ki([]);_globalListeners;_draggingPredicate=r=>r.isDragging();_domNodesToDirectives=null;pointerMove=new ie;pointerUp=new ie;scroll=new ie;constructor(){}registerDropContainer(r){this._dropInstances.has(r)||this._dropInstances.add(r)}registerDragItem(r){this._dragInstances.add(r),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=Cn(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,AE)})}removeDropContainer(r){this._dropInstances.delete(r)}removeDragItem(r){this._dragInstances.delete(r),this.stopDragging(r),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(r,n){if(!(this._activeDragInstances().indexOf(r)>-1)&&(this._styleLoader.load(BU),this._activeDragInstances.update(i=>[...i,r]),this._activeDragInstances().length===1)){let i=n.type.startsWith("touch"),s=a=>this.pointerUp.next(a),o=[["scroll",a=>this.scroll.next(a),ru],["selectstart",this._preventDefaultWhileDragging,AE]];i?o.push(["touchend",s,ru],["touchcancel",s,ru]):o.push(["mouseup",s,ru]),i||o.push(["mousemove",a=>this.pointerMove.next(a),AE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>Cn(this._renderer,this._document,a,l,c))})}}stopDragging(r){this._activeDragInstances.update(n=>{let i=n.indexOf(r);return i>-1?(n.splice(i,1),[...n]):n}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(r){return this._activeDragInstances().indexOf(r)>-1}scrolled(r){let n=[this.scroll];return r&&r!==this._document&&n.push(new nt(i=>this._ngZone.runOutsideAngular(()=>{let s=Cn(this._renderer,r,"scroll",o=>{this._activeDragInstances().length&&i.next(o)},ru);return()=>{s()}}))),eo(...n)}registerDirectiveNode(r,n){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(r,n)}removeDirectiveNode(r){this._domNodesToDirectives?.delete(r)}getDragDirectiveForNode(r){return this._domNodesToDirectives?.get(r)||null}ngOnDestroy(){this._dragInstances.forEach(r=>this.removeDragItem(r)),this._dropInstances.forEach(r=>this.removeDropContainer(r)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=r=>{this._activeDragInstances().length>0&&r.preventDefault()};_persistentTouchmoveListener=r=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))};_clearGlobalListeners(){this._globalListeners?.forEach(r=>r()),this._globalListeners=void 0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),VU={dragStartThreshold:5,pointerDirectionChangeThreshold:5},UU=(()=>{class e{_document=O(Qe);_ngZone=O(Ve);_viewportRuler=O(xl);_dragDropRegistry=O(Xx);_renderer=O(dn).createRenderer(null,null);constructor(){}createDrag(r,n=VU){return new PE(r,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(r){return new LE(r,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Wx=new he("CDK_DRAG_PARENT"),HU=new he("CdkDragHandle"),jU=new he("CDK_DRAG_CONFIG"),$U=new he("CdkDropList"),Jx=(()=>{class e{element=O(Ot);dropContainer=O($U,{optional:!0,skipSelf:!0});_ngZone=O(Ve);_viewContainerRef=O(kr);_dir=O(Ds,{optional:!0});_changeDetectorRef=O(Br);_selfHandle=O(HU,{optional:!0,self:!0});_parentDrag=O(Wx,{optional:!0,skipSelf:!0});_dragDropRegistry=O(Xx);_destroyed=new ie;_handles=new Tr([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(r){this._disabled=r,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new We;released=new We;ended=new We;entered=new We;exited=new We;dropped=new We;moved=new nt(r=>{let n=this._dragRef.moved.pipe(dr(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(r);return()=>{n.unsubscribe()}});_injector=O(vt);constructor(){let r=this.dropContainer,n=O(jU,{optional:!0}),i=O(UU);this._dragRef=i.createDrag(this.element,{dragStartThreshold:n&&n.dragStartThreshold!=null?n.dragStartThreshold:5,pointerDirectionChangeThreshold:n&&n.pointerDirectionChangeThreshold!=null?n.pointerDirectionChangeThreshold:5,zIndex:n?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),n&&this._assignDefaults(n),r&&(this._dragRef._withDropContainer(r._dropListRef),r.addItem(this),r._dropListRef.beforeStarted.pipe(Wr(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(r){this._dragRef.setFreeDragPosition(r)}ngAfterViewInit(){Xr(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(r){let n=r.rootElementSelector,i=r.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(r){let n=this._handles.getValue();n.push(r),this._handles.next(n)}_removeHandle(r){let n=this._handles.getValue(),i=n.indexOf(r);i>-1&&(n.splice(i,1),this._handles.next(n))}_setPreviewTemplate(r){this._previewTemplate=r}_resetPreviewTemplate(r){r===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(r){this._placeholderTemplate=r}_resetPlaceholderTemplate(r){r===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let r=this.element.nativeElement,n=r;this.rootElementSelector&&(n=r.closest!==void 0?r.closest(this.rootElementSelector):r.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||r)}_getBoundaryElement(){let r=this.boundaryElement;return r?typeof r=="string"?this.element.nativeElement.closest(r):Xn(r):null}_syncInputs(r){r.beforeStarted.subscribe(()=>{if(!r.isDragging()){let n=this._dir,i=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;r.disabled=this.disabled,r.lockAxis=this.lockAxis,r.scale=this.scale,r.dragStartDelay=typeof i=="object"&&i?i:E_(i),r.constrainPosition=this.constrainPosition,r.previewClass=this.previewClass,r.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),n&&r.withDirection(n.value)}}),r.beforeStarted.pipe(om(1)).subscribe(()=>{if(this._parentDrag){r.withParent(this._parentDrag._dragRef);return}let n=this.element.nativeElement.parentElement;for(;n;){let i=this._dragDropRegistry.getDragDirectiveForNode(n);if(i){r.withParent(i._dragRef);break}n=n.parentElement}})}_handleEvents(r){r.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),r.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),r.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),r.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),r.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),r.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(r){let{lockAxis:n,dragStartDelay:i,constrainPosition:s,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:h}=r;this.disabled=l??!1,this.dragStartDelay=i||0,n&&(this.lockAxis=n),s&&(this.constrainPosition=s),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(am(r=>{let n=r.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),Qs(r=>eo(...r.map(n=>n._stateChanges.pipe(Si(n))))),Wr(this._destroyed)).subscribe(r=>{let n=this._dragRef,i=r.element.nativeElement;r.disabled?n.disableHandle(i):n.enableHandle(i)})}static \u0275fac=function(r){return new(r||e)};static \u0275dir=Lr({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,n){r&2&&ti("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",wa],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",wv]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Ud([{provide:Wx,useExisting:e}]),Xo]})}return e})(),WU=e=>({"lc:cursor-grab":e}),Qx=(e,t)=>t.url;function GU(e,t){if(e&1&&Ae(0,"source",9),e&2){let r=t.$implicit;qn("type",r.mimeType),Bi("media","(max-width: ",r.width,"px)"),be("src",r.url,fn)}}function zU(e,t){if(e&1&&Ae(0,"source",10),e&2){let r=t.$implicit;qn("type",r.mimeType),be("src",r.url,fn)}}var kh=class Q0{constructor(t){this.elementRef=t}video;closeClicked=new We;videoClicked=new We;isDragging=!1;VideoUtils=Ki;ngOnInit(){let t=this.elementRef.nativeElement.parentElement.parentElement;t.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(t){return new(t||Q0)(Ht(Ot))};static \u0275cmp=ft({type:Q0,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:13,vars:5,consts:[["cdkDrag","",1,"lc:shadow-2xl","lc:fixed","lc:right-10","lc:bottom-10","lc:rounded-lg","lc:max-w-[100px]","lc:flex","lc:justify-center","lc:items-center",3,"cdkDragMoved","ngClass","cdkDragBoundary"],["id","lc-close-button",1,"lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-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"],["xmlns","http://www.w3.org/2000/svg","height","80px","viewBox","0 0 24 24","width","80px","fill","#FFFFFF"],["d","M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"],["autoplay","","loop","",1,"lc:rounded-lg","lc:w-full",3,"click","muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,r){t&1&&(Q(0,"div",0),ht("cdkDragMoved",function(){return r.isDragging=!0}),Q(1,"button",1),ht("click",function(){return r.close()}),hr(),Q(2,"svg",2),Ae(3,"path",3)(4,"path",4),ee()(),Jo(),Q(5,"button",5),hr(),Q(6,"svg",6),Ae(7,"path",7),ee()(),Jo(),Q(8,"video",8),ht("click",function(){return r.onVideoClick()}),Wt(9,GU,1,4,"source",9,Qx),Wt(11,zU,1,2,"source",10,Qx),ee()()),t&2&&(be("ngClass",Ea(3,WU,r.isDragging))("cdkDragBoundary","body"),Y(8),be("muted",!0),Y(),Gt(r.video.sources),Y(2),Gt(r.VideoUtils.getBestSources(r.video.sources)))},dependencies:[Wd,Jx],encapsulation:2})},Lh=(e,t)=>t.url;function qU(e,t){if(e&1&&(Q(0,"div",0),pn(1),ee()),e&2){X();let r=mr(1);Y(),os(" ",r," ")}}function YU(e,t){if(e&1&&Ae(0,"source",6),e&2){let r=t.$implicit;qn("type",r.mimeType),Bi("media","(max-width: ",r.width,"px)"),be("src",r.url,fn)}}function KU(e,t){if(e&1&&Ae(0,"source",7),e&2){let r=t.$implicit;qn("type",r.mimeType),be("src",r.url,fn)}}function ZU(e,t){if(e&1&&(Q(0,"div",8)(1,"span",10),pn(2),ee(),Ae(3,"span",11),bn(4,"cooeeCurrency"),bn(5,"safeHtml"),ee()),e&2){X();let r=mr(0);Y(2),os(" ",r.name," "),Y(),be("innerHTML",xn(5,4,xn(4,2,r.price)),Pr)}}function XU(e,t){if(e&1){let r=zn();Q(0,"div",12),ht("click",function(){It(r);let n=X().$implicit,i=mr(0),s=X(2);return Tt(s.addToCartClicked(n,i))})("keydown",function(){It(r);let n=X().$implicit,i=mr(0),s=X(2);return Tt(s.addToCartClicked(n,i))}),pn(1," Add to cart "),ee()}}function JU(e,t){if(e&1){let r=zn();Fr(0),Q(1,"div",3)(2,"div",4),ht("click",function(){let n=It(r),i=n.$implicit,s=n.$index,o=mr(0),a=X(2);return Tt(a.onClick(i,o,s))})("keydown",function(){let n=It(r),i=n.$implicit,s=n.$index,o=mr(0),a=X(2);return Tt(a.onClick(i,o,s))}),Q(3,"video",5),Wt(4,YU,1,4,"source",6,Lh),Wt(6,KU,1,2,"source",7,Lh),ee(),pt(8,ZU,6,6,"div",8),ee(),pt(9,XU,2,0,"div",9),ee()}if(e&2){let r=t.$implicit,n=X(2),i=mr(4);ho(r.items==null?null:r.items[0]),Y(3),be("muted",!0),Y(),Gt(r.sources),Y(2),Gt(n.VideoUtils.getBestSources(r.sources)),Y(2),Pt(i?8:-1),Y(),Pt(i?9:-1)}}function QU(e,t){if(e&1&&(Q(0,"div",1),Wt(1,JU,10,4,"div",3,Fi),ee()),e&2){let r=X();Y(),Gt(r.videos)}}function eH(e,t){if(e&1&&Ae(0,"source",6),e&2){let r=t.$implicit;qn("type",r.mimeType),Bi("media","(max-width: ",r.width,"px)"),be("src",r.url,fn)}}function tH(e,t){if(e&1&&Ae(0,"source",7),e&2){let r=t.$implicit;qn("type",r.mimeType),be("src",r.url,fn)}}function nH(e,t){if(e&1){let r=zn();Fr(0),Q(1,"div",13),hr(),Q(2,"svg",14),Ae(3,"circle",15)(4,"circle",16),ee(),Jo(),Q(5,"div",17)(6,"video",18),ht("click",function(){let n=It(r),i=n.$implicit,s=n.$index,o=mr(0),a=X(2);return Tt(a.onClick(i,o,s))}),Wt(7,eH,1,4,"source",6,Lh),Wt(9,tH,1,2,"source",7,Lh),ee()()()}if(e&2){let r=t.$implicit,n=X(2);ho(r.items==null?null:r.items[0]),Y(6),be("muted",!0),Y(),Gt(r.sources),Y(2),Gt(n.VideoUtils.getBestSources(r.sources))}}function rH(e,t){if(e&1&&(Q(0,"div",2),Wt(1,nH,11,2,"div",13,Fi),ee()),e&2){let r=X();Y(),Gt(r.videos)}}function iH(e,t){if(e&1){let r=zn();Q(0,"cooee-draggable-video-popup",20),ht("videoClicked",function(){It(r),X();let n=mr(0),i=mr(1),s=mr(2),o=X();return Tt(o.onPopupVideoClick(i,s,n))})("closeClicked",function(){It(r);let n=X(2);return Tt(n.onPopupVideoClosed())}),ee()}if(e&2){let r=X(2);be("video",r.videos[0])}}function oH(e,t){if(e&1&&(Fr(0)(1)(2),pt(3,iH,1,1,"cooee-draggable-video-popup",19)),e&2){let r=X(),n=ho(0);Y();let i=ho(r.videos[n]);Y(),ho(i.items[0]),Y(),Pt(r.hidePopupVideo?-1:3)}}var Fh=class J0{constructor(t,r){this.dialog=t,this.cdr=r}sendEvent=new We;videos;VideoUtils=Ki;VideoConfigSource=DE;VideoConfigTemplate=IE;hidePopupVideo;_triggerContext=ki(null);dialogRef=null;currentDialogData=null;get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this.videos=t.triggerData.content?.videoConfig?.videos}onResize(){!this.dialogRef||!this.currentDialogData||this.openDialog(this.currentDialogData.videos[0],this.currentDialogData.currentIndex,!0)}ngOnInit(){At.loadSwiperScript()}sendTriggerClicked(t,r){let n=new Le(k.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);n.videos=[t.id],n.items=[r],this.sendEvent.emit(n)}onClick(t,r,n){this.sendTriggerClicked(t,r),At.loadSwiperScript().then(()=>this.openDialog(t,n))}performCTA(t){let r;if(t.cta===ou.ClickActionType.ADD_TO_CART)r=k.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===ou.ClickActionType.GO_TO_PRODUCT)r=k.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===ou.ClickActionType.OPEN_CART)r=k.EVENT_OPEN_CART_CLICKED;else return;let n=t.video.id,i={videoID:n},s=new Le(r,{current:i},this.triggerContext?.triggerData);s.videos=[n],s.items=[t.item],this.sendEvent.emit(s),Ki.performCTA(this.triggerContext,t)}addToCartClicked(t,r){this.performCTA({cta:ou.ClickActionType.ADD_TO_CART,item:r,video:t})}onPopupVideoClick(t,r,n){this.hidePopupVideo=!0,this.onClick(t,r,n),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3,r=new Le(k.EVENT_TRIGGER_CLOSED,{duration:t},this.triggerContext?.triggerData);this.sendEvent.emit(r)}openDialog(t,r,n=!1){let i={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:s=>this.performCTA(s)};if(this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(Ih,{width:"100vw",height:"100vh",data:i}),this.currentDialogData=i,this.dialogRef&&!n){let s={videoID:t.id,videoIndex:r},o=new Le(k.EVENT_VIDEO_DIALOG_OPENED,{current:s},this.triggerContext?.triggerData);o.videos=[t.id],this.sendEvent.emit(o)}this.dialogRef.closed.subscribe(s=>{if(!s)return;let o=s.lastVideoDuration*1e3,a={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:o,playedTillPercent:o/t.durationMS},l=new Le(k.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[s.lastVideo.id],this.sendEvent.emit(l),this.dialogRef=null,this.currentDialogData=null})}static \u0275fac=function(t){return new(t||J0)(Ht(gT),Ht(Br))};static \u0275cmp=ft({type:J0,selectors:[["cooee-shoppable-videos"]],hostBindings:function(t,r){t&1&&ht("resize",function(){return r.onResize()},!1,QC)},inputs:{triggerContext:"triggerContext"},outputs:{sendEvent:"sendEvent"},decls:9,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","","playsinline","",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-4","lc:text-xl"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-1","lc:text-xl"],["id","lc-item-price",1,"lc:text-xl",3,"innerHTML"],["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-4","lc:text-xl",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"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(t,r){if(t&1&&(Fr(0)(1),pt(2,qU,2,1,"div",0),Fr(3)(4)(5),pt(6,QU,3,0,"div",1)(7,rH,3,0,"div",2)(8,oH,4,4)),t&2){let n=r.triggerContext==null||r.triggerContext.triggerData==null||r.triggerContext.triggerData.content==null?null:r.triggerContext.triggerData.content.videoConfig;Y();let i=ho(n==null?null:n.heading);Y(),Pt(i?2:-1);let s=n==null?null:n.source;Y(2),ho(s===r.VideoConfigSource.GALLERY);let o=n==null?null:n.template;Y(2),Pt(o===r.VideoConfigTemplate.SWIPER?6:o===r.VideoConfigTemplate.STORY?7:o===r.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[ui,kh,di],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.lc-video-card[_ngcontent-%COMP%] > video[_ngcontent-%COMP%]:hover{scale:1.1}.animate-progress[_ngcontent-%COMP%]{stroke-dasharray:100 241.6;stroke-dashoffset:0;transition:stroke-dashoffset .3s;transform-origin:50% 50%;animation:_ngcontent-%COMP%_snake-rotate 2.5s linear infinite}@keyframes _ngcontent-%COMP%_snake-rotate{to{transform:rotate(360deg)}}']})};C.configure("CooeeWidgetSDK");(async()=>{let e=await vD(ED),t=(r,n)=>{let i=XS(r,{injector:e.injector});customElements.define(n,i)};t(Uf,"cooee-progressbar"),t(Fh,"cooee-shoppable-videos")})();})();