@letscooee/web-sdk 13.1.6 → 13.1.7

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,4 +1,4 @@
1
- import{Ab as An,Bb as Nt,Db as vo,_ as Eo,v as _o,yb as yo,zb as So}from"./chunk-BMEFEXWO.js";import{a as g,b as P,c as st,d as ho,e as _a,f as Ea,g as At}from"./chunk-V7UGKYBN.js";var Io=_a((To,Nn)=>{"use strict";(function(e){if(typeof To=="object"&&typeof Nn<"u")Nn.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.localforage=e()}})(function(){var e,t,n;return(function r(o,s,c){function f(I,x){if(!s[I]){if(!o[I]){var E=typeof st=="function"&&st;if(!x&&E)return E(I,!0);if(d)return d(I,!0);var S=new Error("Cannot find module '"+I+"'");throw S.code="MODULE_NOT_FOUND",S}var L=s[I]={exports:{}};o[I][0].call(L.exports,function(H){var k=o[I][1][H];return f(k||H)},L,L.exports,r,o,s,c)}return s[I].exports}for(var d=typeof st=="function"&&st,_=0;_<c.length;_++)f(c[_]);return f})({1:[function(r,o,s){(function(c){"use strict";var f=c.MutationObserver||c.WebKitMutationObserver,d;if(f){var _=0,I=new f(H),x=c.document.createTextNode("");I.observe(x,{characterData:!0}),d=function(){x.data=_=++_%2}}else if(!c.setImmediate&&typeof c.MessageChannel<"u"){var E=new c.MessageChannel;E.port1.onmessage=H,d=function(){E.port2.postMessage(0)}}else"document"in c&&"onreadystatechange"in c.document.createElement("script")?d=function(){var G=c.document.createElement("script");G.onreadystatechange=function(){H(),G.onreadystatechange=null,G.parentNode.removeChild(G),G=null},c.document.documentElement.appendChild(G)}:d=function(){setTimeout(H,0)};var S,L=[];function H(){S=!0;for(var G,ie,J=L.length;J;){for(ie=L,L=[],G=-1;++G<J;)ie[G]();J=L.length}S=!1}o.exports=k;function k(G){L.push(G)===1&&!S&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,o,s){"use strict";var c=r(1);function f(){}var d={},_=["REJECTED"],I=["FULFILLED"],x=["PENDING"];o.exports=E;function E(R){if(typeof R!="function")throw new TypeError("resolver must be a function");this.state=x,this.queue=[],this.outcome=void 0,R!==f&&k(this,R)}E.prototype.catch=function(R){return this.then(null,R)},E.prototype.then=function(R,M){if(typeof R!="function"&&this.state===I||typeof M!="function"&&this.state===_)return this;var O=new this.constructor(f);if(this.state!==x){var B=this.state===I?R:M;L(O,B,this.outcome)}else this.queue.push(new S(O,R,M));return O};function S(R,M,O){this.promise=R,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof O=="function"&&(this.onRejected=O,this.callRejected=this.otherCallRejected)}S.prototype.callFulfilled=function(R){d.resolve(this.promise,R)},S.prototype.otherCallFulfilled=function(R){L(this.promise,this.onFulfilled,R)},S.prototype.callRejected=function(R){d.reject(this.promise,R)},S.prototype.otherCallRejected=function(R){L(this.promise,this.onRejected,R)};function L(R,M,O){c(function(){var B;try{B=M(O)}catch(X){return d.reject(R,X)}B===R?d.reject(R,new TypeError("Cannot resolve promise with itself")):d.resolve(R,B)})}d.resolve=function(R,M){var O=G(H,M);if(O.status==="error")return d.reject(R,O.value);var B=O.value;if(B)k(R,B);else{R.state=I,R.outcome=M;for(var X=-1,re=R.queue.length;++X<re;)R.queue[X].callFulfilled(M)}return R},d.reject=function(R,M){R.state=_,R.outcome=M;for(var O=-1,B=R.queue.length;++O<B;)R.queue[O].callRejected(M);return R};function H(R){var M=R&&R.then;if(R&&(typeof R=="object"||typeof R=="function")&&typeof M=="function")return function(){M.apply(R,arguments)}}function k(R,M){var O=!1;function B(ae){O||(O=!0,d.reject(R,ae))}function X(ae){O||(O=!0,d.resolve(R,ae))}function re(){M(X,B)}var se=G(re);se.status==="error"&&B(se.value)}function G(R,M){var O={};try{O.value=R(M),O.status="success"}catch(B){O.status="error",O.value=B}return O}E.resolve=ie;function ie(R){return R instanceof this?R:d.resolve(new this(f),R)}E.reject=J;function J(R){var M=new this(f);return d.reject(M,R)}E.all=hn;function hn(R){var M=this;if(Object.prototype.toString.call(R)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=R.length,B=!1;if(!O)return this.resolve([]);for(var X=new Array(O),re=0,se=-1,ae=new this(f);++se<O;)ve(R[se],se);return ae;function ve(rt,bt){M.resolve(rt).then(_n,function(Ye){B||(B=!0,d.reject(ae,Ye))});function _n(Ye){X[bt]=Ye,++re===O&&!B&&(B=!0,d.resolve(ae,X))}}}E.race=Fe;function Fe(R){var M=this;if(Object.prototype.toString.call(R)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=R.length,B=!1;if(!O)return this.resolve([]);for(var X=-1,re=new this(f);++X<O;)se(R[X]);return re;function se(ae){M.resolve(ae).then(function(ve){B||(B=!0,d.resolve(re,ve))},function(ve){B||(B=!0,d.reject(re,ve))})}}},{1:1}],3:[function(r,o,s){(function(c){"use strict";typeof c.Promise!="function"&&(c.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,o,s){"use strict";var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function f(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}function d(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var _=d();function I(){try{if(!_||!_.open)return!1;var i=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),u=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!i||u)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function x(i,u){i=i||[],u=u||{};try{return new Blob(i,u)}catch(p){if(p.name!=="TypeError")throw p;for(var a=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,l=new a,m=0;m<i.length;m+=1)l.append(i[m]);return l.getBlob(u.type)}}typeof Promise>"u"&&r(3);var E=Promise;function S(i,u){u&&i.then(function(a){u(null,a)},function(a){u(a)})}function L(i,u,a){typeof u=="function"&&i.then(u),typeof a=="function"&&i.catch(a)}function H(i){return typeof i!="string"&&(console.warn(i+" used as a key, but it is not a string."),i=String(i)),i}function k(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var G="local-forage-detect-blob-support",ie=void 0,J={},hn=Object.prototype.toString,Fe="readonly",R="readwrite";function M(i){for(var u=i.length,a=new ArrayBuffer(u),l=new Uint8Array(a),m=0;m<u;m++)l[m]=i.charCodeAt(m);return a}function O(i){return new E(function(u){var a=i.transaction(G,R),l=x([""]);a.objectStore(G).put(l,"key"),a.onabort=function(m){m.preventDefault(),m.stopPropagation(),u(!1)},a.oncomplete=function(){var m=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);u(p||!m||parseInt(m[1],10)>=43)}}).catch(function(){return!1})}function B(i){return typeof ie=="boolean"?E.resolve(ie):O(i).then(function(u){return ie=u,ie})}function X(i){var u=J[i.name],a={};a.promise=new E(function(l,m){a.resolve=l,a.reject=m}),u.deferredOperations.push(a),u.dbReady?u.dbReady=u.dbReady.then(function(){return a.promise}):u.dbReady=a.promise}function re(i){var u=J[i.name],a=u.deferredOperations.pop();if(a)return a.resolve(),a.promise}function se(i,u){var a=J[i.name],l=a.deferredOperations.pop();if(l)return l.reject(u),l.promise}function ae(i,u){return new E(function(a,l){if(J[i.name]=J[i.name]||Kr(),i.db)if(u)X(i),i.db.close();else return a(i.db);var m=[i.name];u&&m.push(i.version);var p=_.open.apply(_,m);u&&(p.onupgradeneeded=function(h){var y=p.result;try{y.createObjectStore(i.storeName),h.oldVersion<=1&&y.createObjectStore(G)}catch(v){if(v.name==="ConstraintError")console.warn('The database "'+i.name+'" has been upgraded from version '+h.oldVersion+" to version "+h.newVersion+', but the storage "'+i.storeName+'" already exists.');else throw v}}),p.onerror=function(h){h.preventDefault(),l(p.error)},p.onsuccess=function(){var h=p.result;h.onversionchange=function(y){y.target.close()},a(h),re(i)}})}function ve(i){return ae(i,!1)}function rt(i){return ae(i,!0)}function bt(i,u){if(!i.db)return!0;var a=!i.db.objectStoreNames.contains(i.storeName),l=i.version<i.db.version,m=i.version>i.db.version;if(l&&(i.version!==u&&console.warn('The database "'+i.name+`" can't be downgraded from version `+i.db.version+" to version "+i.version+"."),i.version=i.db.version),m||a){if(a){var p=i.db.version+1;p>i.version&&(i.version=p)}return!0}return!1}function _n(i){return new E(function(u,a){var l=new FileReader;l.onerror=a,l.onloadend=function(m){var p=btoa(m.target.result||"");u({__local_forage_encoded_blob:!0,data:p,type:i.type})},l.readAsBinaryString(i)})}function Ye(i){var u=M(atob(i.data));return x([u],{type:i.type})}function qr(i){return i&&i.__local_forage_encoded_blob}function Es(i){var u=this,a=u._initReady().then(function(){var l=J[u._dbInfo.name];if(l&&l.dbReady)return l.dbReady});return L(a,i,i),a}function ys(i){X(i);for(var u=J[i.name],a=u.forages,l=0;l<a.length;l++){var m=a[l];m._dbInfo.db&&(m._dbInfo.db.close(),m._dbInfo.db=null)}return i.db=null,ve(i).then(function(p){return i.db=p,bt(i)?rt(i):p}).then(function(p){i.db=u.db=p;for(var h=0;h<a.length;h++)a[h]._dbInfo.db=p}).catch(function(p){throw se(i,p),p})}function Te(i,u,a,l){l===void 0&&(l=1);try{var m=i.db.transaction(i.storeName,u);a(null,m)}catch(p){if(l>0&&(!i.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!i.db||p.name==="NotFoundError"&&!i.db.objectStoreNames.contains(i.storeName)&&i.version<=i.db.version)return i.db&&(i.version=i.db.version+1),rt(i)}).then(function(){return ys(i).then(function(){Te(i,u,a,l-1)})}).catch(a);a(p)}}function Kr(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ss(i){var u=this,a={db:null};if(i)for(var l in i)a[l]=i[l];var m=J[a.name];m||(m=Kr(),J[a.name]=m),m.forages.push(u),u._initReady||(u._initReady=u.ready,u.ready=Es);var p=[];function h(){return E.resolve()}for(var y=0;y<m.forages.length;y++){var v=m.forages[y];v!==u&&p.push(v._initReady().catch(h))}var T=m.forages.slice(0);return E.all(p).then(function(){return a.db=m.db,ve(a)}).then(function(b){return a.db=b,bt(a,u._defaultConfig.version)?rt(a):b}).then(function(b){a.db=m.db=b,u._dbInfo=a;for(var N=0;N<T.length;N++){var D=T[N];D!==u&&(D._dbInfo.db=a.db,D._dbInfo.version=a.version)}})}function vs(i,u){var a=this;i=H(i);var l=new E(function(m,p){a.ready().then(function(){Te(a._dbInfo,Fe,function(h,y){if(h)return p(h);try{var v=y.objectStore(a._dbInfo.storeName),T=v.get(i);T.onsuccess=function(){var b=T.result;b===void 0&&(b=null),qr(b)&&(b=Ye(b)),m(b)},T.onerror=function(){p(T.error)}}catch(b){p(b)}})}).catch(p)});return S(l,u),l}function Ts(i,u){var a=this,l=new E(function(m,p){a.ready().then(function(){Te(a._dbInfo,Fe,function(h,y){if(h)return p(h);try{var v=y.objectStore(a._dbInfo.storeName),T=v.openCursor(),b=1;T.onsuccess=function(){var N=T.result;if(N){var D=N.value;qr(D)&&(D=Ye(D));var F=i(D,N.key,b++);F!==void 0?m(F):N.continue()}else m()},T.onerror=function(){p(T.error)}}catch(N){p(N)}})}).catch(p)});return S(l,u),l}function Is(i,u,a){var l=this;i=H(i);var m=new E(function(p,h){var y;l.ready().then(function(){return y=l._dbInfo,hn.call(u)==="[object Blob]"?B(y.db).then(function(v){return v?u:_n(u)}):u}).then(function(v){Te(l._dbInfo,R,function(T,b){if(T)return h(T);try{var N=b.objectStore(l._dbInfo.storeName);v===null&&(v=void 0);var D=N.put(v,i);b.oncomplete=function(){v===void 0&&(v=null),p(v)},b.onabort=b.onerror=function(){var F=D.error?D.error:D.transaction.error;h(F)}}catch(F){h(F)}})}).catch(h)});return S(m,a),m}function bs(i,u){var a=this;i=H(i);var l=new E(function(m,p){a.ready().then(function(){Te(a._dbInfo,R,function(h,y){if(h)return p(h);try{var v=y.objectStore(a._dbInfo.storeName),T=v.delete(i);y.oncomplete=function(){m()},y.onerror=function(){p(T.error)},y.onabort=function(){var b=T.error?T.error:T.transaction.error;p(b)}}catch(b){p(b)}})}).catch(p)});return S(l,u),l}function xs(i){var u=this,a=new E(function(l,m){u.ready().then(function(){Te(u._dbInfo,R,function(p,h){if(p)return m(p);try{var y=h.objectStore(u._dbInfo.storeName),v=y.clear();h.oncomplete=function(){l()},h.onabort=h.onerror=function(){var T=v.error?v.error:v.transaction.error;m(T)}}catch(T){m(T)}})}).catch(m)});return S(a,i),a}function Rs(i){var u=this,a=new E(function(l,m){u.ready().then(function(){Te(u._dbInfo,Fe,function(p,h){if(p)return m(p);try{var y=h.objectStore(u._dbInfo.storeName),v=y.count();v.onsuccess=function(){l(v.result)},v.onerror=function(){m(v.error)}}catch(T){m(T)}})}).catch(m)});return S(a,i),a}function As(i,u){var a=this,l=new E(function(m,p){if(i<0){m(null);return}a.ready().then(function(){Te(a._dbInfo,Fe,function(h,y){if(h)return p(h);try{var v=y.objectStore(a._dbInfo.storeName),T=!1,b=v.openKeyCursor();b.onsuccess=function(){var N=b.result;if(!N){m(null);return}i===0||T?m(N.key):(T=!0,N.advance(i))},b.onerror=function(){p(b.error)}}catch(N){p(N)}})}).catch(p)});return S(l,u),l}function Ns(i){var u=this,a=new E(function(l,m){u.ready().then(function(){Te(u._dbInfo,Fe,function(p,h){if(p)return m(p);try{var y=h.objectStore(u._dbInfo.storeName),v=y.openKeyCursor(),T=[];v.onsuccess=function(){var b=v.result;if(!b){l(T);return}T.push(b.key),b.continue()},v.onerror=function(){m(v.error)}}catch(b){m(b)}})}).catch(m)});return S(a,i),a}function Cs(i,u){u=k.apply(this,arguments);var a=this.config();i=typeof i!="function"&&i||{},i.name||(i.name=i.name||a.name,i.storeName=i.storeName||a.storeName);var l=this,m;if(!i.name)m=E.reject("Invalid arguments");else{var p=i.name===a.name&&l._dbInfo.db,h=p?E.resolve(l._dbInfo.db):ve(i).then(function(y){var v=J[i.name],T=v.forages;v.db=y;for(var b=0;b<T.length;b++)T[b]._dbInfo.db=y;return y});i.storeName?m=h.then(function(y){if(y.objectStoreNames.contains(i.storeName)){var v=y.version+1;X(i);var T=J[i.name],b=T.forages;y.close();for(var N=0;N<b.length;N++){var D=b[N];D._dbInfo.db=null,D._dbInfo.version=v}var F=new E(function(U,Y){var W=_.open(i.name,v);W.onerror=function(ce){var it=W.result;it.close(),Y(ce)},W.onupgradeneeded=function(){var ce=W.result;ce.deleteObjectStore(i.storeName)},W.onsuccess=function(){var ce=W.result;ce.close(),U(ce)}});return F.then(function(U){T.db=U;for(var Y=0;Y<b.length;Y++){var W=b[Y];W._dbInfo.db=U,re(W._dbInfo)}}).catch(function(U){throw(se(i,U)||E.resolve()).catch(function(){}),U})}}):m=h.then(function(y){X(i);var v=J[i.name],T=v.forages;y.close();for(var b=0;b<T.length;b++){var N=T[b];N._dbInfo.db=null}var D=new E(function(F,U){var Y=_.deleteDatabase(i.name);Y.onerror=function(){var W=Y.result;W&&W.close(),U(Y.error)},Y.onblocked=function(){console.warn('dropInstance blocked for database "'+i.name+'" until all open connections are closed')},Y.onsuccess=function(){var W=Y.result;W&&W.close(),F(W)}});return D.then(function(F){v.db=F;for(var U=0;U<T.length;U++){var Y=T[U];re(Y._dbInfo)}}).catch(function(F){throw(se(i,F)||E.resolve()).catch(function(){}),F})})}return S(m,u),m}var ws={_driver:"asyncStorage",_initStorage:Ss,_support:I(),iterate:Ts,getItem:vs,setItem:Is,removeItem:bs,clear:xs,length:Rs,key:As,keys:Ns,dropInstance:Cs};function Ds(){return typeof openDatabase=="function"}var Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ls="~~local_forage_type~",Jr=/^~~local_forage_type~([^~]+)~/,xt="__lfsc__:",En=xt.length,yn="arbf",Sn="blob",Xr="si08",Zr="ui08",Qr="uic8",eo="si16",to="si32",no="ur16",ro="ui32",oo="fl32",io="fl64",so=En+yn.length,ao=Object.prototype.toString;function co(i){var u=i.length*.75,a=i.length,l,m=0,p,h,y,v;i[i.length-1]==="="&&(u--,i[i.length-2]==="="&&u--);var T=new ArrayBuffer(u),b=new Uint8Array(T);for(l=0;l<a;l+=4)p=Ne.indexOf(i[l]),h=Ne.indexOf(i[l+1]),y=Ne.indexOf(i[l+2]),v=Ne.indexOf(i[l+3]),b[m++]=p<<2|h>>4,b[m++]=(h&15)<<4|y>>2,b[m++]=(y&3)<<6|v&63;return T}function vn(i){var u=new Uint8Array(i),a="",l;for(l=0;l<u.length;l+=3)a+=Ne[u[l]>>2],a+=Ne[(u[l]&3)<<4|u[l+1]>>4],a+=Ne[(u[l+1]&15)<<2|u[l+2]>>6],a+=Ne[u[l+2]&63];return u.length%3===2?a=a.substring(0,a.length-1)+"=":u.length%3===1&&(a=a.substring(0,a.length-2)+"=="),a}function Os(i,u){var a="";if(i&&(a=ao.call(i)),i&&(a==="[object ArrayBuffer]"||i.buffer&&ao.call(i.buffer)==="[object ArrayBuffer]")){var l,m=xt;i instanceof ArrayBuffer?(l=i,m+=yn):(l=i.buffer,a==="[object Int8Array]"?m+=Xr:a==="[object Uint8Array]"?m+=Zr:a==="[object Uint8ClampedArray]"?m+=Qr:a==="[object Int16Array]"?m+=eo:a==="[object Uint16Array]"?m+=no:a==="[object Int32Array]"?m+=to:a==="[object Uint32Array]"?m+=ro:a==="[object Float32Array]"?m+=oo:a==="[object Float64Array]"?m+=io:u(new Error("Failed to get type for BinaryArray"))),u(m+vn(l))}else if(a==="[object Blob]"){var p=new FileReader;p.onload=function(){var h=Ls+i.type+"~"+vn(this.result);u(xt+Sn+h)},p.readAsArrayBuffer(i)}else try{u(JSON.stringify(i))}catch(h){console.error("Couldn't convert value into a JSON string: ",i),u(null,h)}}function Ps(i){if(i.substring(0,En)!==xt)return JSON.parse(i);var u=i.substring(so),a=i.substring(En,so),l;if(a===Sn&&Jr.test(u)){var m=u.match(Jr);l=m[1],u=u.substring(m[0].length)}var p=co(u);switch(a){case yn:return p;case Sn:return x([p],{type:l});case Xr:return new Int8Array(p);case Zr:return new Uint8Array(p);case Qr:return new Uint8ClampedArray(p);case eo:return new Int16Array(p);case no:return new Uint16Array(p);case to:return new Int32Array(p);case ro:return new Uint32Array(p);case oo:return new Float32Array(p);case io:return new Float64Array(p);default:throw new Error("Unkown type: "+a)}}var Tn={serialize:Os,deserialize:Ps,stringToBuffer:co,bufferToString:vn};function uo(i,u,a,l){i.executeSql("CREATE TABLE IF NOT EXISTS "+u.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,l)}function Ms(i){var u=this,a={db:null};if(i)for(var l in i)a[l]=typeof i[l]!="string"?i[l].toString():i[l];var m=new E(function(p,h){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(y){return h(y)}a.db.transaction(function(y){uo(y,a,function(){u._dbInfo=a,p()},function(v,T){h(T)})},h)});return a.serializer=Tn,m}function Ce(i,u,a,l,m,p){i.executeSql(a,l,m,function(h,y){y.code===y.SYNTAX_ERR?h.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[u.storeName],function(v,T){T.rows.length?p(v,y):uo(v,u,function(){v.executeSql(a,l,m,p)},p)},p):p(h,y)},p)}function Fs(i,u){var a=this;i=H(i);var l=new E(function(m,p){a.ready().then(function(){var h=a._dbInfo;h.db.transaction(function(y){Ce(y,h,"SELECT * FROM "+h.storeName+" WHERE key = ? LIMIT 1",[i],function(v,T){var b=T.rows.length?T.rows.item(0).value:null;b&&(b=h.serializer.deserialize(b)),m(b)},function(v,T){p(T)})})}).catch(p)});return S(l,u),l}function Us(i,u){var a=this,l=new E(function(m,p){a.ready().then(function(){var h=a._dbInfo;h.db.transaction(function(y){Ce(y,h,"SELECT * FROM "+h.storeName,[],function(v,T){for(var b=T.rows,N=b.length,D=0;D<N;D++){var F=b.item(D),U=F.value;if(U&&(U=h.serializer.deserialize(U)),U=i(U,F.key,D+1),U!==void 0){m(U);return}}m()},function(v,T){p(T)})})}).catch(p)});return S(l,u),l}function fo(i,u,a,l){var m=this;i=H(i);var p=new E(function(h,y){m.ready().then(function(){u===void 0&&(u=null);var v=u,T=m._dbInfo;T.serializer.serialize(u,function(b,N){N?y(N):T.db.transaction(function(D){Ce(D,T,"INSERT OR REPLACE INTO "+T.storeName+" (key, value) VALUES (?, ?)",[i,b],function(){h(v)},function(F,U){y(U)})},function(D){if(D.code===D.QUOTA_ERR){if(l>0){h(fo.apply(m,[i,v,a,l-1]));return}y(D)}})})}).catch(y)});return S(p,a),p}function ks(i,u,a){return fo.apply(this,[i,u,a,1])}function Bs(i,u){var a=this;i=H(i);var l=new E(function(m,p){a.ready().then(function(){var h=a._dbInfo;h.db.transaction(function(y){Ce(y,h,"DELETE FROM "+h.storeName+" WHERE key = ?",[i],function(){m()},function(v,T){p(T)})})}).catch(p)});return S(l,u),l}function Hs(i){var u=this,a=new E(function(l,m){u.ready().then(function(){var p=u._dbInfo;p.db.transaction(function(h){Ce(h,p,"DELETE FROM "+p.storeName,[],function(){l()},function(y,v){m(v)})})}).catch(m)});return S(a,i),a}function $s(i){var u=this,a=new E(function(l,m){u.ready().then(function(){var p=u._dbInfo;p.db.transaction(function(h){Ce(h,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(y,v){var T=v.rows.item(0).c;l(T)},function(y,v){m(v)})})}).catch(m)});return S(a,i),a}function Gs(i,u){var a=this,l=new E(function(m,p){a.ready().then(function(){var h=a._dbInfo;h.db.transaction(function(y){Ce(y,h,"SELECT key FROM "+h.storeName+" WHERE id = ? LIMIT 1",[i+1],function(v,T){var b=T.rows.length?T.rows.item(0).key:null;m(b)},function(v,T){p(T)})})}).catch(p)});return S(l,u),l}function js(i){var u=this,a=new E(function(l,m){u.ready().then(function(){var p=u._dbInfo;p.db.transaction(function(h){Ce(h,p,"SELECT key FROM "+p.storeName,[],function(y,v){for(var T=[],b=0;b<v.rows.length;b++)T.push(v.rows.item(b).key);l(T)},function(y,v){m(v)})})}).catch(m)});return S(a,i),a}function Ws(i){return new E(function(u,a){i.transaction(function(l){l.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(m,p){for(var h=[],y=0;y<p.rows.length;y++)h.push(p.rows.item(y).name);u({db:i,storeNames:h})},function(m,p){a(p)})},function(l){a(l)})})}function Ys(i,u){u=k.apply(this,arguments);var a=this.config();i=typeof i!="function"&&i||{},i.name||(i.name=i.name||a.name,i.storeName=i.storeName||a.storeName);var l=this,m;return i.name?m=new E(function(p){var h;i.name===a.name?h=l._dbInfo.db:h=openDatabase(i.name,"","",0),i.storeName?p({db:h,storeNames:[i.storeName]}):p(Ws(h))}).then(function(p){return new E(function(h,y){p.db.transaction(function(v){function T(F){return new E(function(U,Y){v.executeSql("DROP TABLE IF EXISTS "+F,[],function(){U()},function(W,ce){Y(ce)})})}for(var b=[],N=0,D=p.storeNames.length;N<D;N++)b.push(T(p.storeNames[N]));E.all(b).then(function(){h()}).catch(function(F){y(F)})},function(v){y(v)})})}):m=E.reject("Invalid arguments"),S(m,u),m}var zs={_driver:"webSQLStorage",_initStorage:Ms,_support:Ds(),iterate:Us,getItem:Fs,setItem:ks,removeItem:Bs,clear:Hs,length:$s,key:Gs,keys:js,dropInstance:Ys};function Vs(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function po(i,u){var a=i.name+"/";return i.storeName!==u.storeName&&(a+=i.storeName+"/"),a}function qs(){var i="_localforage_support_test";try{return localStorage.setItem(i,!0),localStorage.removeItem(i),!1}catch{return!0}}function Ks(){return!qs()||localStorage.length>0}function Js(i){var u=this,a={};if(i)for(var l in i)a[l]=i[l];return a.keyPrefix=po(i,u._defaultConfig),Ks()?(u._dbInfo=a,a.serializer=Tn,E.resolve()):E.reject()}function Xs(i){var u=this,a=u.ready().then(function(){for(var l=u._dbInfo.keyPrefix,m=localStorage.length-1;m>=0;m--){var p=localStorage.key(m);p.indexOf(l)===0&&localStorage.removeItem(p)}});return S(a,i),a}function Zs(i,u){var a=this;i=H(i);var l=a.ready().then(function(){var m=a._dbInfo,p=localStorage.getItem(m.keyPrefix+i);return p&&(p=m.serializer.deserialize(p)),p});return S(l,u),l}function Qs(i,u){var a=this,l=a.ready().then(function(){for(var m=a._dbInfo,p=m.keyPrefix,h=p.length,y=localStorage.length,v=1,T=0;T<y;T++){var b=localStorage.key(T);if(b.indexOf(p)===0){var N=localStorage.getItem(b);if(N&&(N=m.serializer.deserialize(N)),N=i(N,b.substring(h),v++),N!==void 0)return N}}});return S(l,u),l}function ea(i,u){var a=this,l=a.ready().then(function(){var m=a._dbInfo,p;try{p=localStorage.key(i)}catch{p=null}return p&&(p=p.substring(m.keyPrefix.length)),p});return S(l,u),l}function ta(i){var u=this,a=u.ready().then(function(){for(var l=u._dbInfo,m=localStorage.length,p=[],h=0;h<m;h++){var y=localStorage.key(h);y.indexOf(l.keyPrefix)===0&&p.push(y.substring(l.keyPrefix.length))}return p});return S(a,i),a}function na(i){var u=this,a=u.keys().then(function(l){return l.length});return S(a,i),a}function ra(i,u){var a=this;i=H(i);var l=a.ready().then(function(){var m=a._dbInfo;localStorage.removeItem(m.keyPrefix+i)});return S(l,u),l}function oa(i,u,a){var l=this;i=H(i);var m=l.ready().then(function(){u===void 0&&(u=null);var p=u;return new E(function(h,y){var v=l._dbInfo;v.serializer.serialize(u,function(T,b){if(b)y(b);else try{localStorage.setItem(v.keyPrefix+i,T),h(p)}catch(N){(N.name==="QuotaExceededError"||N.name==="NS_ERROR_DOM_QUOTA_REACHED")&&y(N),y(N)}})})});return S(m,a),m}function ia(i,u){if(u=k.apply(this,arguments),i=typeof i!="function"&&i||{},!i.name){var a=this.config();i.name=i.name||a.name,i.storeName=i.storeName||a.storeName}var l=this,m;return i.name?m=new E(function(p){i.storeName?p(po(i,l._defaultConfig)):p(i.name+"/")}).then(function(p){for(var h=localStorage.length-1;h>=0;h--){var y=localStorage.key(h);y.indexOf(p)===0&&localStorage.removeItem(y)}}):m=E.reject("Invalid arguments"),S(m,u),m}var sa={_driver:"localStorageWrapper",_initStorage:Js,_support:Vs(),iterate:Qs,getItem:Zs,setItem:oa,removeItem:ra,clear:Xs,length:na,key:ea,keys:ta,dropInstance:ia},aa=function(u,a){return u===a||typeof u=="number"&&typeof a=="number"&&isNaN(u)&&isNaN(a)},ca=function(u,a){for(var l=u.length,m=0;m<l;){if(aa(u[m],a))return!0;m++}return!1},lo=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"},ot={},mo={},ze={INDEXEDDB:ws,WEBSQL:zs,LOCALSTORAGE:sa},ua=[ze.INDEXEDDB._driver,ze.WEBSQL._driver,ze.LOCALSTORAGE._driver],Rt=["dropInstance"],In=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Rt),fa={description:"",driver:ua.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function pa(i,u){i[u]=function(){var a=arguments;return i.ready().then(function(){return i[u].apply(i,a)})}}function bn(){for(var i=1;i<arguments.length;i++){var u=arguments[i];if(u)for(var a in u)u.hasOwnProperty(a)&&(lo(u[a])?arguments[0][a]=u[a].slice():arguments[0][a]=u[a])}return arguments[0]}var la=(function(){function i(u){f(this,i);for(var a in ze)if(ze.hasOwnProperty(a)){var l=ze[a],m=l._driver;this[a]=m,ot[m]||this.defineDriver(l)}this._defaultConfig=bn({},fa),this._config=bn({},this._defaultConfig,u),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return i.prototype.config=function(a){if((typeof a>"u"?"undefined":c(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var l in a){if(l==="storeName"&&(a[l]=a[l].replace(/\W/g,"_")),l==="version"&&typeof a[l]!="number")return new Error("Database version must be a number.");this._config[l]=a[l]}return"driver"in a&&a.driver?this.setDriver(this._config.driver):!0}else return typeof a=="string"?this._config[a]:this._config},i.prototype.defineDriver=function(a,l,m){var p=new E(function(h,y){try{var v=a._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver){y(T);return}for(var b=In.concat("_initStorage"),N=0,D=b.length;N<D;N++){var F=b[N],U=!ca(Rt,F);if((U||a[F])&&typeof a[F]!="function"){y(T);return}}var Y=function(){for(var it=function(ga){return function(){var ha=new Error("Method "+ga+" is not implemented by the current driver"),go=E.reject(ha);return S(go,arguments[arguments.length-1]),go}},xn=0,ma=Rt.length;xn<ma;xn++){var Rn=Rt[xn];a[Rn]||(a[Rn]=it(Rn))}};Y();var W=function(it){ot[v]&&console.info("Redefining LocalForage driver: "+v),ot[v]=a,mo[v]=it,h()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then(W,y):W(!!a._support):W(!0)}catch(ce){y(ce)}});return L(p,l,m),p},i.prototype.driver=function(){return this._driver||null},i.prototype.getDriver=function(a,l,m){var p=ot[a]?E.resolve(ot[a]):E.reject(new Error("Driver not found."));return L(p,l,m),p},i.prototype.getSerializer=function(a){var l=E.resolve(Tn);return L(l,a),l},i.prototype.ready=function(a){var l=this,m=l._driverSet.then(function(){return l._ready===null&&(l._ready=l._initDriver()),l._ready});return L(m,a,a),m},i.prototype.setDriver=function(a,l,m){var p=this;lo(a)||(a=[a]);var h=this._getSupportedDrivers(a);function y(){p._config.driver=p.driver()}function v(N){return p._extend(N),y(),p._ready=p._initStorage(p._config),p._ready}function T(N){return function(){var D=0;function F(){for(;D<N.length;){var U=N[D];return D++,p._dbInfo=null,p._ready=null,p.getDriver(U).then(v).catch(F)}y();var Y=new Error("No available storage method found.");return p._driverSet=E.reject(Y),p._driverSet}return F()}}var b=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=b.then(function(){var N=h[0];return p._dbInfo=null,p._ready=null,p.getDriver(N).then(function(D){p._driver=D._driver,y(),p._wrapLibraryMethodsWithReady(),p._initDriver=T(h)})}).catch(function(){y();var N=new Error("No available storage method found.");return p._driverSet=E.reject(N),p._driverSet}),L(this._driverSet,l,m),this._driverSet},i.prototype.supports=function(a){return!!mo[a]},i.prototype._extend=function(a){bn(this,a)},i.prototype._getSupportedDrivers=function(a){for(var l=[],m=0,p=a.length;m<p;m++){var h=a[m];this.supports(h)&&l.push(h)}return l},i.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,l=In.length;a<l;a++)pa(this,In[a])},i.prototype.createInstance=function(a){return new i(a)},i})(),da=new la;o.exports=da},{3:3}]},{},[4])(4)})});var Cn=Ea(Io());function Ct(e){return Cn.default.createInstance({name:"lc",storeName:e,driver:Cn.default.LOCALSTORAGE})}var Ve=class{static storage;static async get(t,n){return await this.storage?.getItem(t)??n}static set(t,n){return this.storage?.setItem(t,n)}static remove(t){return this.storage?.removeItem(t)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var at=class at extends Ve{};At(at,"storeName","usr"),at.storage=Ct(at.storeName);var wn=at;var wt=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;widgetCustomisation;currency;static get(){return window.CooeeSDK.config}update(t){return t??={},this.gaEnabled=t.gaEnabled,this.gaMeasurementID=t.gaMeasurementID,this.pixelPush=t.pixelPush,this.website=t.website??{},this.currencyCount=t.currencyCount??0,this.money=t.money,this.currency=t.currency,this.storefrontToken=t.storefrontToken,this.skipItemAttribute=t.skipItemAttribute,this.widgetCustomisation=t.widgetCustomisation,this}};var ct=class ct extends Ve{};At(ct,"storeName","ses"),ct.storage=Ct(ct.storeName);var Dn=ct;var C=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var w=globalThis;var me="9.42.0";function Ue(){return ke(w),w}function ke(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||me,t[me]=t[me]||{}}function Ie(e,t,n=w){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[me]=r[me]||{};return o[e]||(o[e]=t())}var Ln=["debug","info","warn","error","log","assert","trace"],ya="Sentry Logger ",qe={};function we(e){if(!("console"in w))return e();let t=w.console,n={},r=Object.keys(qe);r.forEach(o=>{let s=qe[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Sa(){Pn().enabled=!0}function va(){Pn().enabled=!1}function bo(){return Pn().enabled}function Ta(...e){On("log",...e)}function Ia(...e){On("warn",...e)}function ba(...e){On("error",...e)}function On(e,...t){C&&bo()&&we(()=>{w.console[e](`${ya}[${e}]:`,...t)})}function Pn(){return C?Ie("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var A={enable:Sa,disable:va,isEnabled:bo,log:Ta,warn:Ia,error:ba};var xo=/\(error: (.*)\)/,Ro=/captureMessage|captureException/;function Fn(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let s=[],c=n.split(`
1
+ import{_ as Eo,v as _o,yb as yo,zb as vo}from"./chunk-X2XZU367.js";import{a as So,b as An,c as Nt}from"./chunk-Y6YLR2GG.js";import{a as g,b as P,c as st,d as ho,e as _a,f as Ea,g as At}from"./chunk-V7UGKYBN.js";var Io=_a((To,Nn)=>{"use strict";(function(e){if(typeof To=="object"&&typeof Nn<"u")Nn.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.localforage=e()}})(function(){var e,t,n;return(function r(o,s,c){function f(I,x){if(!s[I]){if(!o[I]){var E=typeof st=="function"&&st;if(!x&&E)return E(I,!0);if(d)return d(I,!0);var S=new Error("Cannot find module '"+I+"'");throw S.code="MODULE_NOT_FOUND",S}var L=s[I]={exports:{}};o[I][0].call(L.exports,function(H){var k=o[I][1][H];return f(k||H)},L,L.exports,r,o,s,c)}return s[I].exports}for(var d=typeof st=="function"&&st,_=0;_<c.length;_++)f(c[_]);return f})({1:[function(r,o,s){(function(c){"use strict";var f=c.MutationObserver||c.WebKitMutationObserver,d;if(f){var _=0,I=new f(H),x=c.document.createTextNode("");I.observe(x,{characterData:!0}),d=function(){x.data=_=++_%2}}else if(!c.setImmediate&&typeof c.MessageChannel<"u"){var E=new c.MessageChannel;E.port1.onmessage=H,d=function(){E.port2.postMessage(0)}}else"document"in c&&"onreadystatechange"in c.document.createElement("script")?d=function(){var G=c.document.createElement("script");G.onreadystatechange=function(){H(),G.onreadystatechange=null,G.parentNode.removeChild(G),G=null},c.document.documentElement.appendChild(G)}:d=function(){setTimeout(H,0)};var S,L=[];function H(){S=!0;for(var G,ie,J=L.length;J;){for(ie=L,L=[],G=-1;++G<J;)ie[G]();J=L.length}S=!1}o.exports=k;function k(G){L.push(G)===1&&!S&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,o,s){"use strict";var c=r(1);function f(){}var d={},_=["REJECTED"],I=["FULFILLED"],x=["PENDING"];o.exports=E;function E(R){if(typeof R!="function")throw new TypeError("resolver must be a function");this.state=x,this.queue=[],this.outcome=void 0,R!==f&&k(this,R)}E.prototype.catch=function(R){return this.then(null,R)},E.prototype.then=function(R,M){if(typeof R!="function"&&this.state===I||typeof M!="function"&&this.state===_)return this;var O=new this.constructor(f);if(this.state!==x){var B=this.state===I?R:M;L(O,B,this.outcome)}else this.queue.push(new S(O,R,M));return O};function S(R,M,O){this.promise=R,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof O=="function"&&(this.onRejected=O,this.callRejected=this.otherCallRejected)}S.prototype.callFulfilled=function(R){d.resolve(this.promise,R)},S.prototype.otherCallFulfilled=function(R){L(this.promise,this.onFulfilled,R)},S.prototype.callRejected=function(R){d.reject(this.promise,R)},S.prototype.otherCallRejected=function(R){L(this.promise,this.onRejected,R)};function L(R,M,O){c(function(){var B;try{B=M(O)}catch(X){return d.reject(R,X)}B===R?d.reject(R,new TypeError("Cannot resolve promise with itself")):d.resolve(R,B)})}d.resolve=function(R,M){var O=G(H,M);if(O.status==="error")return d.reject(R,O.value);var B=O.value;if(B)k(R,B);else{R.state=I,R.outcome=M;for(var X=-1,re=R.queue.length;++X<re;)R.queue[X].callFulfilled(M)}return R},d.reject=function(R,M){R.state=_,R.outcome=M;for(var O=-1,B=R.queue.length;++O<B;)R.queue[O].callRejected(M);return R};function H(R){var M=R&&R.then;if(R&&(typeof R=="object"||typeof R=="function")&&typeof M=="function")return function(){M.apply(R,arguments)}}function k(R,M){var O=!1;function B(ae){O||(O=!0,d.reject(R,ae))}function X(ae){O||(O=!0,d.resolve(R,ae))}function re(){M(X,B)}var se=G(re);se.status==="error"&&B(se.value)}function G(R,M){var O={};try{O.value=R(M),O.status="success"}catch(B){O.status="error",O.value=B}return O}E.resolve=ie;function ie(R){return R instanceof this?R:d.resolve(new this(f),R)}E.reject=J;function J(R){var M=new this(f);return d.reject(M,R)}E.all=hn;function hn(R){var M=this;if(Object.prototype.toString.call(R)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=R.length,B=!1;if(!O)return this.resolve([]);for(var X=new Array(O),re=0,se=-1,ae=new this(f);++se<O;)ve(R[se],se);return ae;function ve(rt,bt){M.resolve(rt).then(_n,function(Ye){B||(B=!0,d.reject(ae,Ye))});function _n(Ye){X[bt]=Ye,++re===O&&!B&&(B=!0,d.resolve(ae,X))}}}E.race=Fe;function Fe(R){var M=this;if(Object.prototype.toString.call(R)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=R.length,B=!1;if(!O)return this.resolve([]);for(var X=-1,re=new this(f);++X<O;)se(R[X]);return re;function se(ae){M.resolve(ae).then(function(ve){B||(B=!0,d.resolve(re,ve))},function(ve){B||(B=!0,d.reject(re,ve))})}}},{1:1}],3:[function(r,o,s){(function(c){"use strict";typeof c.Promise!="function"&&(c.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,o,s){"use strict";var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function f(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}function d(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var _=d();function I(){try{if(!_||!_.open)return!1;var i=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),u=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!i||u)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function x(i,u){i=i||[],u=u||{};try{return new Blob(i,u)}catch(p){if(p.name!=="TypeError")throw p;for(var a=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,l=new a,m=0;m<i.length;m+=1)l.append(i[m]);return l.getBlob(u.type)}}typeof Promise>"u"&&r(3);var E=Promise;function S(i,u){u&&i.then(function(a){u(null,a)},function(a){u(a)})}function L(i,u,a){typeof u=="function"&&i.then(u),typeof a=="function"&&i.catch(a)}function H(i){return typeof i!="string"&&(console.warn(i+" used as a key, but it is not a string."),i=String(i)),i}function k(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var G="local-forage-detect-blob-support",ie=void 0,J={},hn=Object.prototype.toString,Fe="readonly",R="readwrite";function M(i){for(var u=i.length,a=new ArrayBuffer(u),l=new Uint8Array(a),m=0;m<u;m++)l[m]=i.charCodeAt(m);return a}function O(i){return new E(function(u){var a=i.transaction(G,R),l=x([""]);a.objectStore(G).put(l,"key"),a.onabort=function(m){m.preventDefault(),m.stopPropagation(),u(!1)},a.oncomplete=function(){var m=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);u(p||!m||parseInt(m[1],10)>=43)}}).catch(function(){return!1})}function B(i){return typeof ie=="boolean"?E.resolve(ie):O(i).then(function(u){return ie=u,ie})}function X(i){var u=J[i.name],a={};a.promise=new E(function(l,m){a.resolve=l,a.reject=m}),u.deferredOperations.push(a),u.dbReady?u.dbReady=u.dbReady.then(function(){return a.promise}):u.dbReady=a.promise}function re(i){var u=J[i.name],a=u.deferredOperations.pop();if(a)return a.resolve(),a.promise}function se(i,u){var a=J[i.name],l=a.deferredOperations.pop();if(l)return l.reject(u),l.promise}function ae(i,u){return new E(function(a,l){if(J[i.name]=J[i.name]||Kr(),i.db)if(u)X(i),i.db.close();else return a(i.db);var m=[i.name];u&&m.push(i.version);var p=_.open.apply(_,m);u&&(p.onupgradeneeded=function(h){var y=p.result;try{y.createObjectStore(i.storeName),h.oldVersion<=1&&y.createObjectStore(G)}catch(v){if(v.name==="ConstraintError")console.warn('The database "'+i.name+'" has been upgraded from version '+h.oldVersion+" to version "+h.newVersion+', but the storage "'+i.storeName+'" already exists.');else throw v}}),p.onerror=function(h){h.preventDefault(),l(p.error)},p.onsuccess=function(){var h=p.result;h.onversionchange=function(y){y.target.close()},a(h),re(i)}})}function ve(i){return ae(i,!1)}function rt(i){return ae(i,!0)}function bt(i,u){if(!i.db)return!0;var a=!i.db.objectStoreNames.contains(i.storeName),l=i.version<i.db.version,m=i.version>i.db.version;if(l&&(i.version!==u&&console.warn('The database "'+i.name+`" can't be downgraded from version `+i.db.version+" to version "+i.version+"."),i.version=i.db.version),m||a){if(a){var p=i.db.version+1;p>i.version&&(i.version=p)}return!0}return!1}function _n(i){return new E(function(u,a){var l=new FileReader;l.onerror=a,l.onloadend=function(m){var p=btoa(m.target.result||"");u({__local_forage_encoded_blob:!0,data:p,type:i.type})},l.readAsBinaryString(i)})}function Ye(i){var u=M(atob(i.data));return x([u],{type:i.type})}function qr(i){return i&&i.__local_forage_encoded_blob}function Es(i){var u=this,a=u._initReady().then(function(){var l=J[u._dbInfo.name];if(l&&l.dbReady)return l.dbReady});return L(a,i,i),a}function ys(i){X(i);for(var u=J[i.name],a=u.forages,l=0;l<a.length;l++){var m=a[l];m._dbInfo.db&&(m._dbInfo.db.close(),m._dbInfo.db=null)}return i.db=null,ve(i).then(function(p){return i.db=p,bt(i)?rt(i):p}).then(function(p){i.db=u.db=p;for(var h=0;h<a.length;h++)a[h]._dbInfo.db=p}).catch(function(p){throw se(i,p),p})}function Te(i,u,a,l){l===void 0&&(l=1);try{var m=i.db.transaction(i.storeName,u);a(null,m)}catch(p){if(l>0&&(!i.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return E.resolve().then(function(){if(!i.db||p.name==="NotFoundError"&&!i.db.objectStoreNames.contains(i.storeName)&&i.version<=i.db.version)return i.db&&(i.version=i.db.version+1),rt(i)}).then(function(){return ys(i).then(function(){Te(i,u,a,l-1)})}).catch(a);a(p)}}function Kr(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ss(i){var u=this,a={db:null};if(i)for(var l in i)a[l]=i[l];var m=J[a.name];m||(m=Kr(),J[a.name]=m),m.forages.push(u),u._initReady||(u._initReady=u.ready,u.ready=Es);var p=[];function h(){return E.resolve()}for(var y=0;y<m.forages.length;y++){var v=m.forages[y];v!==u&&p.push(v._initReady().catch(h))}var T=m.forages.slice(0);return E.all(p).then(function(){return a.db=m.db,ve(a)}).then(function(b){return a.db=b,bt(a,u._defaultConfig.version)?rt(a):b}).then(function(b){a.db=m.db=b,u._dbInfo=a;for(var N=0;N<T.length;N++){var D=T[N];D!==u&&(D._dbInfo.db=a.db,D._dbInfo.version=a.version)}})}function vs(i,u){var a=this;i=H(i);var l=new E(function(m,p){a.ready().then(function(){Te(a._dbInfo,Fe,function(h,y){if(h)return p(h);try{var v=y.objectStore(a._dbInfo.storeName),T=v.get(i);T.onsuccess=function(){var b=T.result;b===void 0&&(b=null),qr(b)&&(b=Ye(b)),m(b)},T.onerror=function(){p(T.error)}}catch(b){p(b)}})}).catch(p)});return S(l,u),l}function Ts(i,u){var a=this,l=new E(function(m,p){a.ready().then(function(){Te(a._dbInfo,Fe,function(h,y){if(h)return p(h);try{var v=y.objectStore(a._dbInfo.storeName),T=v.openCursor(),b=1;T.onsuccess=function(){var N=T.result;if(N){var D=N.value;qr(D)&&(D=Ye(D));var F=i(D,N.key,b++);F!==void 0?m(F):N.continue()}else m()},T.onerror=function(){p(T.error)}}catch(N){p(N)}})}).catch(p)});return S(l,u),l}function Is(i,u,a){var l=this;i=H(i);var m=new E(function(p,h){var y;l.ready().then(function(){return y=l._dbInfo,hn.call(u)==="[object Blob]"?B(y.db).then(function(v){return v?u:_n(u)}):u}).then(function(v){Te(l._dbInfo,R,function(T,b){if(T)return h(T);try{var N=b.objectStore(l._dbInfo.storeName);v===null&&(v=void 0);var D=N.put(v,i);b.oncomplete=function(){v===void 0&&(v=null),p(v)},b.onabort=b.onerror=function(){var F=D.error?D.error:D.transaction.error;h(F)}}catch(F){h(F)}})}).catch(h)});return S(m,a),m}function bs(i,u){var a=this;i=H(i);var l=new E(function(m,p){a.ready().then(function(){Te(a._dbInfo,R,function(h,y){if(h)return p(h);try{var v=y.objectStore(a._dbInfo.storeName),T=v.delete(i);y.oncomplete=function(){m()},y.onerror=function(){p(T.error)},y.onabort=function(){var b=T.error?T.error:T.transaction.error;p(b)}}catch(b){p(b)}})}).catch(p)});return S(l,u),l}function xs(i){var u=this,a=new E(function(l,m){u.ready().then(function(){Te(u._dbInfo,R,function(p,h){if(p)return m(p);try{var y=h.objectStore(u._dbInfo.storeName),v=y.clear();h.oncomplete=function(){l()},h.onabort=h.onerror=function(){var T=v.error?v.error:v.transaction.error;m(T)}}catch(T){m(T)}})}).catch(m)});return S(a,i),a}function Rs(i){var u=this,a=new E(function(l,m){u.ready().then(function(){Te(u._dbInfo,Fe,function(p,h){if(p)return m(p);try{var y=h.objectStore(u._dbInfo.storeName),v=y.count();v.onsuccess=function(){l(v.result)},v.onerror=function(){m(v.error)}}catch(T){m(T)}})}).catch(m)});return S(a,i),a}function As(i,u){var a=this,l=new E(function(m,p){if(i<0){m(null);return}a.ready().then(function(){Te(a._dbInfo,Fe,function(h,y){if(h)return p(h);try{var v=y.objectStore(a._dbInfo.storeName),T=!1,b=v.openKeyCursor();b.onsuccess=function(){var N=b.result;if(!N){m(null);return}i===0||T?m(N.key):(T=!0,N.advance(i))},b.onerror=function(){p(b.error)}}catch(N){p(N)}})}).catch(p)});return S(l,u),l}function Ns(i){var u=this,a=new E(function(l,m){u.ready().then(function(){Te(u._dbInfo,Fe,function(p,h){if(p)return m(p);try{var y=h.objectStore(u._dbInfo.storeName),v=y.openKeyCursor(),T=[];v.onsuccess=function(){var b=v.result;if(!b){l(T);return}T.push(b.key),b.continue()},v.onerror=function(){m(v.error)}}catch(b){m(b)}})}).catch(m)});return S(a,i),a}function Cs(i,u){u=k.apply(this,arguments);var a=this.config();i=typeof i!="function"&&i||{},i.name||(i.name=i.name||a.name,i.storeName=i.storeName||a.storeName);var l=this,m;if(!i.name)m=E.reject("Invalid arguments");else{var p=i.name===a.name&&l._dbInfo.db,h=p?E.resolve(l._dbInfo.db):ve(i).then(function(y){var v=J[i.name],T=v.forages;v.db=y;for(var b=0;b<T.length;b++)T[b]._dbInfo.db=y;return y});i.storeName?m=h.then(function(y){if(y.objectStoreNames.contains(i.storeName)){var v=y.version+1;X(i);var T=J[i.name],b=T.forages;y.close();for(var N=0;N<b.length;N++){var D=b[N];D._dbInfo.db=null,D._dbInfo.version=v}var F=new E(function(U,Y){var W=_.open(i.name,v);W.onerror=function(ce){var it=W.result;it.close(),Y(ce)},W.onupgradeneeded=function(){var ce=W.result;ce.deleteObjectStore(i.storeName)},W.onsuccess=function(){var ce=W.result;ce.close(),U(ce)}});return F.then(function(U){T.db=U;for(var Y=0;Y<b.length;Y++){var W=b[Y];W._dbInfo.db=U,re(W._dbInfo)}}).catch(function(U){throw(se(i,U)||E.resolve()).catch(function(){}),U})}}):m=h.then(function(y){X(i);var v=J[i.name],T=v.forages;y.close();for(var b=0;b<T.length;b++){var N=T[b];N._dbInfo.db=null}var D=new E(function(F,U){var Y=_.deleteDatabase(i.name);Y.onerror=function(){var W=Y.result;W&&W.close(),U(Y.error)},Y.onblocked=function(){console.warn('dropInstance blocked for database "'+i.name+'" until all open connections are closed')},Y.onsuccess=function(){var W=Y.result;W&&W.close(),F(W)}});return D.then(function(F){v.db=F;for(var U=0;U<T.length;U++){var Y=T[U];re(Y._dbInfo)}}).catch(function(F){throw(se(i,F)||E.resolve()).catch(function(){}),F})})}return S(m,u),m}var ws={_driver:"asyncStorage",_initStorage:Ss,_support:I(),iterate:Ts,getItem:vs,setItem:Is,removeItem:bs,clear:xs,length:Rs,key:As,keys:Ns,dropInstance:Cs};function Ds(){return typeof openDatabase=="function"}var Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ls="~~local_forage_type~",Jr=/^~~local_forage_type~([^~]+)~/,xt="__lfsc__:",En=xt.length,yn="arbf",Sn="blob",Xr="si08",Zr="ui08",Qr="uic8",eo="si16",to="si32",no="ur16",ro="ui32",oo="fl32",io="fl64",so=En+yn.length,ao=Object.prototype.toString;function co(i){var u=i.length*.75,a=i.length,l,m=0,p,h,y,v;i[i.length-1]==="="&&(u--,i[i.length-2]==="="&&u--);var T=new ArrayBuffer(u),b=new Uint8Array(T);for(l=0;l<a;l+=4)p=Ne.indexOf(i[l]),h=Ne.indexOf(i[l+1]),y=Ne.indexOf(i[l+2]),v=Ne.indexOf(i[l+3]),b[m++]=p<<2|h>>4,b[m++]=(h&15)<<4|y>>2,b[m++]=(y&3)<<6|v&63;return T}function vn(i){var u=new Uint8Array(i),a="",l;for(l=0;l<u.length;l+=3)a+=Ne[u[l]>>2],a+=Ne[(u[l]&3)<<4|u[l+1]>>4],a+=Ne[(u[l+1]&15)<<2|u[l+2]>>6],a+=Ne[u[l+2]&63];return u.length%3===2?a=a.substring(0,a.length-1)+"=":u.length%3===1&&(a=a.substring(0,a.length-2)+"=="),a}function Os(i,u){var a="";if(i&&(a=ao.call(i)),i&&(a==="[object ArrayBuffer]"||i.buffer&&ao.call(i.buffer)==="[object ArrayBuffer]")){var l,m=xt;i instanceof ArrayBuffer?(l=i,m+=yn):(l=i.buffer,a==="[object Int8Array]"?m+=Xr:a==="[object Uint8Array]"?m+=Zr:a==="[object Uint8ClampedArray]"?m+=Qr:a==="[object Int16Array]"?m+=eo:a==="[object Uint16Array]"?m+=no:a==="[object Int32Array]"?m+=to:a==="[object Uint32Array]"?m+=ro:a==="[object Float32Array]"?m+=oo:a==="[object Float64Array]"?m+=io:u(new Error("Failed to get type for BinaryArray"))),u(m+vn(l))}else if(a==="[object Blob]"){var p=new FileReader;p.onload=function(){var h=Ls+i.type+"~"+vn(this.result);u(xt+Sn+h)},p.readAsArrayBuffer(i)}else try{u(JSON.stringify(i))}catch(h){console.error("Couldn't convert value into a JSON string: ",i),u(null,h)}}function Ps(i){if(i.substring(0,En)!==xt)return JSON.parse(i);var u=i.substring(so),a=i.substring(En,so),l;if(a===Sn&&Jr.test(u)){var m=u.match(Jr);l=m[1],u=u.substring(m[0].length)}var p=co(u);switch(a){case yn:return p;case Sn:return x([p],{type:l});case Xr:return new Int8Array(p);case Zr:return new Uint8Array(p);case Qr:return new Uint8ClampedArray(p);case eo:return new Int16Array(p);case no:return new Uint16Array(p);case to:return new Int32Array(p);case ro:return new Uint32Array(p);case oo:return new Float32Array(p);case io:return new Float64Array(p);default:throw new Error("Unkown type: "+a)}}var Tn={serialize:Os,deserialize:Ps,stringToBuffer:co,bufferToString:vn};function uo(i,u,a,l){i.executeSql("CREATE TABLE IF NOT EXISTS "+u.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,l)}function Ms(i){var u=this,a={db:null};if(i)for(var l in i)a[l]=typeof i[l]!="string"?i[l].toString():i[l];var m=new E(function(p,h){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(y){return h(y)}a.db.transaction(function(y){uo(y,a,function(){u._dbInfo=a,p()},function(v,T){h(T)})},h)});return a.serializer=Tn,m}function Ce(i,u,a,l,m,p){i.executeSql(a,l,m,function(h,y){y.code===y.SYNTAX_ERR?h.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[u.storeName],function(v,T){T.rows.length?p(v,y):uo(v,u,function(){v.executeSql(a,l,m,p)},p)},p):p(h,y)},p)}function Fs(i,u){var a=this;i=H(i);var l=new E(function(m,p){a.ready().then(function(){var h=a._dbInfo;h.db.transaction(function(y){Ce(y,h,"SELECT * FROM "+h.storeName+" WHERE key = ? LIMIT 1",[i],function(v,T){var b=T.rows.length?T.rows.item(0).value:null;b&&(b=h.serializer.deserialize(b)),m(b)},function(v,T){p(T)})})}).catch(p)});return S(l,u),l}function Us(i,u){var a=this,l=new E(function(m,p){a.ready().then(function(){var h=a._dbInfo;h.db.transaction(function(y){Ce(y,h,"SELECT * FROM "+h.storeName,[],function(v,T){for(var b=T.rows,N=b.length,D=0;D<N;D++){var F=b.item(D),U=F.value;if(U&&(U=h.serializer.deserialize(U)),U=i(U,F.key,D+1),U!==void 0){m(U);return}}m()},function(v,T){p(T)})})}).catch(p)});return S(l,u),l}function fo(i,u,a,l){var m=this;i=H(i);var p=new E(function(h,y){m.ready().then(function(){u===void 0&&(u=null);var v=u,T=m._dbInfo;T.serializer.serialize(u,function(b,N){N?y(N):T.db.transaction(function(D){Ce(D,T,"INSERT OR REPLACE INTO "+T.storeName+" (key, value) VALUES (?, ?)",[i,b],function(){h(v)},function(F,U){y(U)})},function(D){if(D.code===D.QUOTA_ERR){if(l>0){h(fo.apply(m,[i,v,a,l-1]));return}y(D)}})})}).catch(y)});return S(p,a),p}function ks(i,u,a){return fo.apply(this,[i,u,a,1])}function Bs(i,u){var a=this;i=H(i);var l=new E(function(m,p){a.ready().then(function(){var h=a._dbInfo;h.db.transaction(function(y){Ce(y,h,"DELETE FROM "+h.storeName+" WHERE key = ?",[i],function(){m()},function(v,T){p(T)})})}).catch(p)});return S(l,u),l}function Hs(i){var u=this,a=new E(function(l,m){u.ready().then(function(){var p=u._dbInfo;p.db.transaction(function(h){Ce(h,p,"DELETE FROM "+p.storeName,[],function(){l()},function(y,v){m(v)})})}).catch(m)});return S(a,i),a}function $s(i){var u=this,a=new E(function(l,m){u.ready().then(function(){var p=u._dbInfo;p.db.transaction(function(h){Ce(h,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(y,v){var T=v.rows.item(0).c;l(T)},function(y,v){m(v)})})}).catch(m)});return S(a,i),a}function Gs(i,u){var a=this,l=new E(function(m,p){a.ready().then(function(){var h=a._dbInfo;h.db.transaction(function(y){Ce(y,h,"SELECT key FROM "+h.storeName+" WHERE id = ? LIMIT 1",[i+1],function(v,T){var b=T.rows.length?T.rows.item(0).key:null;m(b)},function(v,T){p(T)})})}).catch(p)});return S(l,u),l}function js(i){var u=this,a=new E(function(l,m){u.ready().then(function(){var p=u._dbInfo;p.db.transaction(function(h){Ce(h,p,"SELECT key FROM "+p.storeName,[],function(y,v){for(var T=[],b=0;b<v.rows.length;b++)T.push(v.rows.item(b).key);l(T)},function(y,v){m(v)})})}).catch(m)});return S(a,i),a}function Ws(i){return new E(function(u,a){i.transaction(function(l){l.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(m,p){for(var h=[],y=0;y<p.rows.length;y++)h.push(p.rows.item(y).name);u({db:i,storeNames:h})},function(m,p){a(p)})},function(l){a(l)})})}function Ys(i,u){u=k.apply(this,arguments);var a=this.config();i=typeof i!="function"&&i||{},i.name||(i.name=i.name||a.name,i.storeName=i.storeName||a.storeName);var l=this,m;return i.name?m=new E(function(p){var h;i.name===a.name?h=l._dbInfo.db:h=openDatabase(i.name,"","",0),i.storeName?p({db:h,storeNames:[i.storeName]}):p(Ws(h))}).then(function(p){return new E(function(h,y){p.db.transaction(function(v){function T(F){return new E(function(U,Y){v.executeSql("DROP TABLE IF EXISTS "+F,[],function(){U()},function(W,ce){Y(ce)})})}for(var b=[],N=0,D=p.storeNames.length;N<D;N++)b.push(T(p.storeNames[N]));E.all(b).then(function(){h()}).catch(function(F){y(F)})},function(v){y(v)})})}):m=E.reject("Invalid arguments"),S(m,u),m}var zs={_driver:"webSQLStorage",_initStorage:Ms,_support:Ds(),iterate:Us,getItem:Fs,setItem:ks,removeItem:Bs,clear:Hs,length:$s,key:Gs,keys:js,dropInstance:Ys};function Vs(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function po(i,u){var a=i.name+"/";return i.storeName!==u.storeName&&(a+=i.storeName+"/"),a}function qs(){var i="_localforage_support_test";try{return localStorage.setItem(i,!0),localStorage.removeItem(i),!1}catch{return!0}}function Ks(){return!qs()||localStorage.length>0}function Js(i){var u=this,a={};if(i)for(var l in i)a[l]=i[l];return a.keyPrefix=po(i,u._defaultConfig),Ks()?(u._dbInfo=a,a.serializer=Tn,E.resolve()):E.reject()}function Xs(i){var u=this,a=u.ready().then(function(){for(var l=u._dbInfo.keyPrefix,m=localStorage.length-1;m>=0;m--){var p=localStorage.key(m);p.indexOf(l)===0&&localStorage.removeItem(p)}});return S(a,i),a}function Zs(i,u){var a=this;i=H(i);var l=a.ready().then(function(){var m=a._dbInfo,p=localStorage.getItem(m.keyPrefix+i);return p&&(p=m.serializer.deserialize(p)),p});return S(l,u),l}function Qs(i,u){var a=this,l=a.ready().then(function(){for(var m=a._dbInfo,p=m.keyPrefix,h=p.length,y=localStorage.length,v=1,T=0;T<y;T++){var b=localStorage.key(T);if(b.indexOf(p)===0){var N=localStorage.getItem(b);if(N&&(N=m.serializer.deserialize(N)),N=i(N,b.substring(h),v++),N!==void 0)return N}}});return S(l,u),l}function ea(i,u){var a=this,l=a.ready().then(function(){var m=a._dbInfo,p;try{p=localStorage.key(i)}catch{p=null}return p&&(p=p.substring(m.keyPrefix.length)),p});return S(l,u),l}function ta(i){var u=this,a=u.ready().then(function(){for(var l=u._dbInfo,m=localStorage.length,p=[],h=0;h<m;h++){var y=localStorage.key(h);y.indexOf(l.keyPrefix)===0&&p.push(y.substring(l.keyPrefix.length))}return p});return S(a,i),a}function na(i){var u=this,a=u.keys().then(function(l){return l.length});return S(a,i),a}function ra(i,u){var a=this;i=H(i);var l=a.ready().then(function(){var m=a._dbInfo;localStorage.removeItem(m.keyPrefix+i)});return S(l,u),l}function oa(i,u,a){var l=this;i=H(i);var m=l.ready().then(function(){u===void 0&&(u=null);var p=u;return new E(function(h,y){var v=l._dbInfo;v.serializer.serialize(u,function(T,b){if(b)y(b);else try{localStorage.setItem(v.keyPrefix+i,T),h(p)}catch(N){(N.name==="QuotaExceededError"||N.name==="NS_ERROR_DOM_QUOTA_REACHED")&&y(N),y(N)}})})});return S(m,a),m}function ia(i,u){if(u=k.apply(this,arguments),i=typeof i!="function"&&i||{},!i.name){var a=this.config();i.name=i.name||a.name,i.storeName=i.storeName||a.storeName}var l=this,m;return i.name?m=new E(function(p){i.storeName?p(po(i,l._defaultConfig)):p(i.name+"/")}).then(function(p){for(var h=localStorage.length-1;h>=0;h--){var y=localStorage.key(h);y.indexOf(p)===0&&localStorage.removeItem(y)}}):m=E.reject("Invalid arguments"),S(m,u),m}var sa={_driver:"localStorageWrapper",_initStorage:Js,_support:Vs(),iterate:Qs,getItem:Zs,setItem:oa,removeItem:ra,clear:Xs,length:na,key:ea,keys:ta,dropInstance:ia},aa=function(u,a){return u===a||typeof u=="number"&&typeof a=="number"&&isNaN(u)&&isNaN(a)},ca=function(u,a){for(var l=u.length,m=0;m<l;){if(aa(u[m],a))return!0;m++}return!1},lo=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"},ot={},mo={},ze={INDEXEDDB:ws,WEBSQL:zs,LOCALSTORAGE:sa},ua=[ze.INDEXEDDB._driver,ze.WEBSQL._driver,ze.LOCALSTORAGE._driver],Rt=["dropInstance"],In=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Rt),fa={description:"",driver:ua.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function pa(i,u){i[u]=function(){var a=arguments;return i.ready().then(function(){return i[u].apply(i,a)})}}function bn(){for(var i=1;i<arguments.length;i++){var u=arguments[i];if(u)for(var a in u)u.hasOwnProperty(a)&&(lo(u[a])?arguments[0][a]=u[a].slice():arguments[0][a]=u[a])}return arguments[0]}var la=(function(){function i(u){f(this,i);for(var a in ze)if(ze.hasOwnProperty(a)){var l=ze[a],m=l._driver;this[a]=m,ot[m]||this.defineDriver(l)}this._defaultConfig=bn({},fa),this._config=bn({},this._defaultConfig,u),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return i.prototype.config=function(a){if((typeof a>"u"?"undefined":c(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var l in a){if(l==="storeName"&&(a[l]=a[l].replace(/\W/g,"_")),l==="version"&&typeof a[l]!="number")return new Error("Database version must be a number.");this._config[l]=a[l]}return"driver"in a&&a.driver?this.setDriver(this._config.driver):!0}else return typeof a=="string"?this._config[a]:this._config},i.prototype.defineDriver=function(a,l,m){var p=new E(function(h,y){try{var v=a._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver){y(T);return}for(var b=In.concat("_initStorage"),N=0,D=b.length;N<D;N++){var F=b[N],U=!ca(Rt,F);if((U||a[F])&&typeof a[F]!="function"){y(T);return}}var Y=function(){for(var it=function(ga){return function(){var ha=new Error("Method "+ga+" is not implemented by the current driver"),go=E.reject(ha);return S(go,arguments[arguments.length-1]),go}},xn=0,ma=Rt.length;xn<ma;xn++){var Rn=Rt[xn];a[Rn]||(a[Rn]=it(Rn))}};Y();var W=function(it){ot[v]&&console.info("Redefining LocalForage driver: "+v),ot[v]=a,mo[v]=it,h()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then(W,y):W(!!a._support):W(!0)}catch(ce){y(ce)}});return L(p,l,m),p},i.prototype.driver=function(){return this._driver||null},i.prototype.getDriver=function(a,l,m){var p=ot[a]?E.resolve(ot[a]):E.reject(new Error("Driver not found."));return L(p,l,m),p},i.prototype.getSerializer=function(a){var l=E.resolve(Tn);return L(l,a),l},i.prototype.ready=function(a){var l=this,m=l._driverSet.then(function(){return l._ready===null&&(l._ready=l._initDriver()),l._ready});return L(m,a,a),m},i.prototype.setDriver=function(a,l,m){var p=this;lo(a)||(a=[a]);var h=this._getSupportedDrivers(a);function y(){p._config.driver=p.driver()}function v(N){return p._extend(N),y(),p._ready=p._initStorage(p._config),p._ready}function T(N){return function(){var D=0;function F(){for(;D<N.length;){var U=N[D];return D++,p._dbInfo=null,p._ready=null,p.getDriver(U).then(v).catch(F)}y();var Y=new Error("No available storage method found.");return p._driverSet=E.reject(Y),p._driverSet}return F()}}var b=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=b.then(function(){var N=h[0];return p._dbInfo=null,p._ready=null,p.getDriver(N).then(function(D){p._driver=D._driver,y(),p._wrapLibraryMethodsWithReady(),p._initDriver=T(h)})}).catch(function(){y();var N=new Error("No available storage method found.");return p._driverSet=E.reject(N),p._driverSet}),L(this._driverSet,l,m),this._driverSet},i.prototype.supports=function(a){return!!mo[a]},i.prototype._extend=function(a){bn(this,a)},i.prototype._getSupportedDrivers=function(a){for(var l=[],m=0,p=a.length;m<p;m++){var h=a[m];this.supports(h)&&l.push(h)}return l},i.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,l=In.length;a<l;a++)pa(this,In[a])},i.prototype.createInstance=function(a){return new i(a)},i})(),da=new la;o.exports=da},{3:3}]},{},[4])(4)})});var Cn=Ea(Io());function Ct(e){return Cn.default.createInstance({name:"lc",storeName:e,driver:Cn.default.LOCALSTORAGE})}var Ve=class{static storage;static async get(t,n){return await this.storage?.getItem(t)??n}static set(t,n){return this.storage?.setItem(t,n)}static remove(t){return this.storage?.removeItem(t)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var at=class at extends Ve{};At(at,"storeName","usr"),at.storage=Ct(at.storeName);var wn=at;var wt=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;widgetCustomisation;currency;static get(){return window.CooeeSDK.config}update(t){return t??={},this.gaEnabled=t.gaEnabled,this.gaMeasurementID=t.gaMeasurementID,this.pixelPush=t.pixelPush,this.website=t.website??{},this.currencyCount=t.currencyCount??0,this.money=t.money,this.currency=t.currency,this.storefrontToken=t.storefrontToken,this.skipItemAttribute=t.skipItemAttribute,this.widgetCustomisation=t.widgetCustomisation,this}};var ct=class ct extends Ve{};At(ct,"storeName","ses"),ct.storage=Ct(ct.storeName);var Dn=ct;var C=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var w=globalThis;var me="9.42.0";function Ue(){return ke(w),w}function ke(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||me,t[me]=t[me]||{}}function Ie(e,t,n=w){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[me]=r[me]||{};return o[e]||(o[e]=t())}var Ln=["debug","info","warn","error","log","assert","trace"],ya="Sentry Logger ",qe={};function we(e){if(!("console"in w))return e();let t=w.console,n={},r=Object.keys(qe);r.forEach(o=>{let s=qe[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Sa(){Pn().enabled=!0}function va(){Pn().enabled=!1}function bo(){return Pn().enabled}function Ta(...e){On("log",...e)}function Ia(...e){On("warn",...e)}function ba(...e){On("error",...e)}function On(e,...t){C&&bo()&&we(()=>{w.console[e](`${ya}[${e}]:`,...t)})}function Pn(){return C?Ie("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var A={enable:Sa,disable:va,isEnabled:bo,log:Ta,warn:Ia,error:ba};var xo=/\(error: (.*)\)/,Ro=/captureMessage|captureException/;function Fn(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let s=[],c=n.split(`
2
2
  `);for(let f=r;f<c.length;f++){let d=c[f];if(d.length>1024)continue;let _=xo.test(d)?d.replace(xo,"$1"):d;if(!_.match(/\S*Error: /)){for(let I of t){let x=I(_);if(x){s.push(x);break}}if(s.length>=50+o)break}}return Ao(s.slice(o))}}function Ao(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Dt(t).function||"")&&t.pop(),t.reverse(),Ro.test(Dt(t).function||"")&&(t.pop(),Ro.test(Dt(t).function||"")&&t.pop()),t.slice(0,50).map(n=>P(g({},n),{filename:n.filename||Dt(t).filename,function:n.function||"?"}))}function Dt(e){return e[e.length-1]||{}}var Mn="<anonymous>";function ue(e){try{return!e||typeof e!="function"?Mn:e.name||Mn}catch{return Mn}}function Lt(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var Ot={},No={};function Q(e,t){Ot[e]=Ot[e]||[],Ot[e].push(t)}function ee(e,t){if(!No[e]){No[e]=!0;try{t()}catch(n){C&&A.error(`Error while instrumenting ${e}`,n)}}}function z(e,t){let n=e&&Ot[e];if(n)for(let r of n)try{r(t)}catch(o){C&&A.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
4
  Name: ${ue(r)}
@@ -0,0 +1,8 @@
1
+ import{e as w,f as S}from"./chunk-V7UGKYBN.js";var V=w((D,N)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var a,E={},g=function(o,s){return function(){return s.apply(o,arguments)}},T=function(){var o=arguments,s=o[0],p,c;for(c=1;c<o.length;c++)for(p in o[c])!(p in s)&&o[c].hasOwnProperty(p)&&(s[p]=o[c][p]);return s},f=function(o,s){return{value:o,name:s}};e.TRACE=f(1,"TRACE"),e.DEBUG=f(2,"DEBUG"),e.INFO=f(3,"INFO"),e.TIME=f(4,"TIME"),e.WARN=f(5,"WARN"),e.ERROR=f(8,"ERROR"),e.OFF=f(99,"OFF");var _=function(o){this.context=o,this.setLevel(o.filterLevel),this.log=this.info};_.prototype={setLevel:function(o){o&&"value"in o&&(this.context.filterLevel=o)},getLevel:function(){return this.context.filterLevel},enabledFor:function(o){var s=this.context.filterLevel;return o.value>=s.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(o){typeof o=="string"&&o.length>0&&this.invoke(e.TIME,[o,"start"])},timeEnd:function(o){typeof o=="string"&&o.length>0&&this.invoke(e.TIME,[o,"end"])},invoke:function(o,s){a&&this.enabledFor(o)&&a(s,T({level:o},this.context))}};var n=new _({filterLevel:e.OFF});(function(){var o=e;o.enabledFor=g(n,n.enabledFor),o.trace=g(n,n.trace),o.debug=g(n,n.debug),o.time=g(n,n.time),o.timeEnd=g(n,n.timeEnd),o.info=g(n,n.info),o.warn=g(n,n.warn),o.error=g(n,n.error),o.log=o.info})(),e.setHandler=function(o){a=o},e.setLevel=function(o){n.setLevel(o);for(var s in E)E.hasOwnProperty(s)&&E[s].setLevel(o)},e.getLevel=function(){return n.getLevel()},e.get=function(o){return E[o]||(E[o]=new _(T({name:o},n.context)))},e.createDefaultHandler=function(o){o=o||{},o.formatter=o.formatter||function(r,l){l.name&&r.unshift("["+l.name+"]")};var s={},p=function(c,r){Function.prototype.apply.call(c,console,r)};return typeof console>"u"?function(){}:function(c,r){c=Array.prototype.slice.call(c);var l=console.log,v;r.level===e.TIME?(v=(r.name?"["+r.name+"] ":"")+c[0],c[1]==="start"?console.time?console.time(v):s[v]=new Date().getTime():console.timeEnd?console.timeEnd(v):p(l,[v+": "+(new Date().getTime()-s[v])+"ms"])):(r.level===e.WARN&&console.warn?l=console.warn:r.level===e.ERROR&&console.error?l=console.error:r.level===e.INFO&&console.info?l=console.info:r.level===e.DEBUG&&console.debug?l=console.debug:r.level===e.TRACE&&console.trace&&(l=console.trace),o.formatter(c,r),p(l,c))}},e.useDefaults=function(o){e.setLevel(o&&o.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(o))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof N<"u"&&N.exports?N.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(D)});var C="13.1.7";var y=C.split("-")[0].split(".").slice(0,3).map(t=>t.padStart(2,"0")).join(""),x="WEB",A="CooeeSDK",I=C,U=parseInt(y,10);var B=["collection","product","cart"],F=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}],G=["View Item","View Cart","View Collection"],H=["CE Screen View","View Collection","View Item","View Cart"];var h=`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${I}/dist`,R={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",baseURL:h,styleURL:`${h}/widget.min.css`,widgetURL:`${h}/widget.min.js`,swiperStyleURL:`${h}/swiper-bundle.min.css`};var u=S(V());var i=class{static debuggerEl;static infoLogs=[];static log(...e){u.default.info(...e)}static verbose(...e){u.default.debug(...e)}static error(...e){u.default.error(...e)}static warn(...e){u.default.warn(...e)}static info(...e){u.default.info(...e),this.infoLogs.push({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){u.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function q(t=A){u.default.useDefaults({formatter:function(e){e.unshift(`${t} (v${I}):`)}}),O()&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?u.default.setLevel(u.default[localStorage.cooeeLogLevel]):u.default.setLevel(R.debug?u.default.TRACE:u.default.OFF)}function O(){let t=k();return t==="1"||t==="on"}function k(){return new URL(location.href).searchParams?.get("cooee-debug")}function J(){let t=["display: inline-block;","font-size: 14px;","background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);","color: white;","padding: 4px;","border-radius: 4px;"].join(" "),e=`
2
+ `;e+=`\u{1F4E3} Drive higher conversions with AI-powered onsite engagement
3
+ `,e+=`\u{1F50D} Track real-time visitor intent & optimize engagement
4
+ `,e+=`\u{1F4CA} Improve Meta Ads ROAS with intent-driven campaigns
5
+ `,e+=`\u{1F6CD}\uFE0F Boost purchases & repeat sales effortlessly
6
+ `,e+=`
7
+
8
+ `,e+="Learn more: https://www.letscooee.com",console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",t),console.log(`%c${e}`,"font-size: 13px; line-height: 1.8;"),console.log(`SDK v${I}`),console.groupEnd(),i.info(`SDK v${I} loaded`)}function d(t){if(t<0)return`${t}ms`;let e=new Date(Date.UTC(0,0,0,0,0,0,t)),a=[];return e.getUTCMinutes()&&a.push(e.getUTCMinutes()+"m"),e.getUTCSeconds()&&a.push(e.getUTCSeconds()+"s"),e.getUTCMilliseconds()&&a.push(e.getUTCMilliseconds()+"ms"),a.length||a.push("0ms"),a.join(" ")}var m="\xA0\xA0\xA0";function L(t){if(t===0)return"0 B";let e=1024,a=["B","KB","MB","GB"],E=Math.floor(Math.log(t)/Math.log(e));return`${(t/Math.pow(e,E)).toFixed(2)} ${a[E]}`}function M(t){let e=performance.getEntriesByType?.("resource");if(e)return e.filter(a=>a.name.includes(t)).pop()}function oe(t){let e=M(t);if(!e){i.info(`\u{1F4E6} API Resource Metrics for ${t}: Not available`);return}i.info("\u{1F4E6} \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 API Resource Metrics \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550"),i.info(`URL: ${t}`),i.info(`Duration: ${d(e.duration)}`);let a=e.transferSize===0;if(i.info(`Served from: ${a?"\u{1F4BE} Cache (disk/memory)":"\u{1F310} Network"}`),!a){i.info(`Transfer size: ${L(e.transferSize)}`),i.info(`Encoded size: ${L(e.encodedBodySize)}`),i.info(`Decoded size: ${L(e.decodedBodySize)}`);let r=(1-e.encodedBodySize/e.decodedBodySize)*100;r>0&&i.info(`Compression ratio: ${r.toFixed(1)}%`)}let E=e.redirectEnd-e.redirectStart,g=e.fetchStart-e.startTime,T=e.domainLookupEnd-e.domainLookupStart,f=e.connectEnd-e.connectStart,_=e.secureConnectionStart>0?e.connectEnd-e.secureConnectionStart:0,o=e.connectEnd===e.connectStart?e.requestStart-e.fetchStart-T:e.requestStart-e.connectEnd,s=e.responseStart-e.requestStart,p=e.responseEnd-e.responseStart;i.info(`Timing breakdown (${d(e.duration)} total):`),E>0&&i.info(`${m}Redirect: ${d(E)}`),g>0&&i.info(`${m}Queued: ${d(g)}`),o>0&&i.info(`${m}Stalled: ${d(o)}`),T>0&&i.info(`${m}DNS lookup: ${d(T)}`),f>0&&i.info(`${m}TCP connect: ${d(f)}`),_>0&&i.info(`${m}SSL handshake: ${d(_)}`),i.info(`${m}Server waiting (TTFB): ${d(s)}`),i.info(`${m}Content download: ${d(p)}`);let c=e.serverTiming;if(c?.length){i.info("Server-Timing:");for(let r of c){let l=r.description||r.name;r.duration>0?i.info(`${m}${l}: ${d(r.duration)}`):i.info(`${m}${l}: ${r.duration}`)}}i.info("\u{1F4E6} \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550")}export{x as a,I as b,U as c,B as d,F as e,G as f,H as g,R as h,V as i,i as j,q as k,O as l,k as m,J as n,d as o,L as p,oe as q};
@@ -1 +1 @@
1
- import{c as p,j as d,k as g}from"./chunk-OS2E7UQC.js";var f=(t,e,o,r)=>{if(!e)return;let n={videoID:e.id,videoIndex:o},i=new p("CE Video Shared",{current:n,platform:r},t);window.CooeeSDK.sendEvent(i)},l=(t,e,o=!0)=>{let r=o?encodeURIComponent(m(t,e)):m(t,e),n="Hey! Check out this video for an amazing product -",i=o?encodeURIComponent(n):n;return{url:r,text:i}},m=(t,e)=>{let o=d(window.location.href,t);return g(o,e)};export{f as a,l as b};
1
+ import{c as p,j as d,k as g}from"./chunk-XC2ODVUS.js";var f=(t,e,o,r)=>{if(!e)return;let n={videoID:e.id,videoIndex:o},i=new p("CE Video Shared",{current:n,platform:r},t);window.CooeeSDK.sendEvent(i)},l=(t,e,o=!0)=>{let r=o?encodeURIComponent(m(t,e)):m(t,e),n="Hey! Check out this video for an amazing product -",i=o?encodeURIComponent(n):n;return{url:r,text:i}},m=(t,e)=>{let o=d(window.location.href,t);return g(o,e)};export{f as a,l as b};
@@ -1,4 +1,4 @@
1
- import{a as He,b as et,c as Cn,g as De}from"./chunk-OS2E7UQC.js";import{a as me,d as Be,e as yn,g as tt,h as wt}from"./chunk-PLMFOGWI.js";import{$ as Et,$a as Ce,Aa as sn,Ab as Dt,Ba as L,Bb as j,Ca as an,D as he,Da as p,E as ie,Ea as ln,Fa as cn,I as _e,Ja as un,K as ge,Ka as dn,L as ue,La as P,Na as Le,O as u,Oa as Qe,Pa as Xe,Qa as x,Ra as oe,Sa as ve,Wa as z,X as k,Xa as q,Y as bt,Ya as U,Za as pn,_ as Jt,_a as Ze,ab as Je,b as Kt,ba as $,bb as fn,ca as ke,cb as Y,db as K,fb as fe,ga as en,ha as Ee,hb as se,ia as C,ib as ae,ja as y,jb as ee,ka as tn,kb as N,lb as mn,ma as de,mb as Ue,na as pe,o as Qt,oa as g,pa as m,q as Xt,qa as h,ra as I,s as Ct,sa as J,sb as hn,t as yt,ta as re,tb as _n,u as Zt,ua as Ke,ub as gn,v as S,va as nn,wa as rn,wb as vn,x as R,xa as T,y as F,ya as on,za as B}from"./chunk-BMEFEXWO.js";import{a as H,b as Fe}from"./chunk-V7UGKYBN.js";var bn=0;function fi(t=document.head){return En(Dt.styleURL,t,"cooee-global-styles")}function mi(t=document.head){return En(Dt.swiperStyleURL,t,"cooee-swiper-styles")}function En(t,e=document.head,n){return new Promise(i=>{if(e.querySelector(`#${n}`)){i();return}let o=document.createElement("link");o.rel="stylesheet",o.href=t,o.id=n,o.onload=()=>{i()},o.onerror=()=>{console.error("Failed to load stylesheet:",t),i()},e.appendChild(o)})}function Ge(t,e=document.head){if(!t)return;bn++;let n=document.createElement("style");n.id=`cooee-app-css-${bn}`,n.textContent=t,e.appendChild(n)}async function nt(){let t=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=t}async function it(t,e=!0){if(!t)return;let n=[];e&&n.push(mi(t)),n.push(fi(t)),await Promise.all(n);let i=me.get().website.commonCSS;Ge(i,t)}var gi={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Eo=Fe(H({},gi),{"[class.ng-submitted]":"isSubmitted"});var vi=new Zt("",{providedIn:"root",factory:()=>Dn}),Dn="always";var Ci=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=bt({type:t});static \u0275inj=yt({})}return t})();var wn=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:vi,useValue:n.callSetDisabledState??Dn}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=bt({type:t});static \u0275inj=yt({imports:[Ci]})}return t})();var It=(function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t})(It||{});var Q=(function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t[t.BUY_NOW=110]="BUY_NOW",t[t.QUICK_VIEW=111]="QUICK_VIEW",t})(Q||{});var yi=(function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t})(yi||{});var X=class t{engagementContext=S(He);eventData=S(et);constructor(){}executeCTA(e,n){let i,r=this.engagementContext();if(!r){j.error("Engagement context is not available; aborting executeCTA.");return}if(e===Q.ADD_TO_CART)i="CE Add To Cart Clicked";else if(e===Q.GO_TO_PRODUCT)i="CE View Item Clicked";else if(e===Q.OPEN_CART)i="CE Open Cart Clicked",r.triggerData.redirectBehaviour=It.CART_DRAWER;else{j.warn(`Unsupported CTA type: ${e}`);return}window.CooeeSDK.executeCTA(r,H({clickAction:{at:e}},n));let o=new Cn(i,this.eventData.props,r.triggerData);n?.video?o.setVideos(n.video):this.eventData.video&&o.setVideos(this.eventData.video),window.CooeeSDK.sendEvent(o)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Ct({token:t,factory:t.\u0275fac})};function In(t,e){return[X,...bi(t,e)]}function bi(t,e){return[{provide:He,useValue:ie(t)},{provide:et,useValue:H({},e)}]}var rt=class t{elementRef=S(_e);engagementService=S(X);hasSwiper=!1;_engagementTrigger=ie(null);_triggerContext=S(He);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){j.verbose("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(it(e,this.hasSwiper),Ge(this.engagementTrigger?.content?.innerCSS,e))}ngOnDestroy(){j.verbose("Destroying",this.constructor.name)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=k({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,i){n&2&&Xe(i.classes)},inputs:{triggerContext:"triggerContext"},decls:1,vars:0,template:function(n,i){n&1&&on(0)},encapsulation:2})};var xn=(t,e)=>e.id;function Ei(t,e){if(t&1&&(m(0,"span",6),x(1),h()),t&2){p();let n=U(0);u(),oe(n)}}function Di(t,e){if(t&1){let n=B();z(0),m(1,"button",5),L("click",function(){let r=R(n).$implicit,o=p().$implicit,s=p();return F(s.onOptionChange(o,r))}),C(2,Ei,2,1,"span",6),h()}if(t&2){let n=e.$implicit,i=p().$implicit,r=U(1),o=p(),s=n.name,l=q(n.displayName||n.name),c=n.swatch,d=r?n.hexColor??s:"",_=o.selectedOptions()[i.name]===s,a=!!(c!=null&&c.color),v=!!(!(c==null||c.image==null)&&c.image.url);u(),Le("swatch-color-type",a)("swatch-image-type",v)("selected",_)("disabled",n.disabled),g("title",l)("ngStyle",o.getSwatchStyles(c,d)),Ee("aria-checked",_?"true":"false")("data-value",s)("aria-disabled",n.disabled?"true":null)("aria-label",l),u(),y(!r&&!a&&!v?2:-1)}}function wi(t,e){if(t&1&&(m(0,"div"),z(1),m(2,"div",1),x(3),h(),m(4,"div",2),x(5),h(),m(6,"div",3),de(7,Di,3,16,"button",4,xn),h()()),t&2){let n=e.$implicit,i=p();Xe(Ze("option-group ",n.name.toLowerCase())),u(),q(i.hasHexColors(n)),u(2),ve("",n.name,":"),u(2),oe(i.selectedOptions()[n.name]),u(),Ee("aria-label",n.name),u(),pe(n.optionValues)}}var je=t=>t.trim().toLowerCase(),ot=class t extends rt{selectedVariant=new ke;item=N.required();selectedOptions=ie({});options=se(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){j.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(i=>{i.disabled=this.isOptionValueDisabledFast(n,i)})}),e.options});matchedVariant=se(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(i=>e.options.every(r=>{let o=i.selectedOptions.find(s=>s.name===r.name)?.value;return n[r.name]===o}))});availabilityIndex=se(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((i,r)=>{if(i.isAvailable)for(let o of i.selectedOptions){let s=je(o.name),l=o.value,c=n.get(s);c||n.set(s,c=new Map);let d=c.get(l);d||c.set(l,d=new Set),d.add(r)}}),n});constructor(){super(),ae(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=ae(()=>{let n=this.item();if(!n?.options)return;let i=H({},this.selectedOptions()),r=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=r?.selectedOptions.find(l=>l.name===o.name)?.value;s&&(i[o.name]=s)}),this.selectedOptions.set(i),e.destroy()})}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot;if(!e)return;let n=me.get().website?.itemSwatchMapping;n&&Ge(n,e)}onOptionChange(e,n){let i=H({},this.selectedOptions());i[e.name]=n.name,this.selectedOptions.set(i)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getSwatchStyles(e,n){let i={};return!e&&n?(i["--option-color"]=n,i["background-color"]=n,i):(e?.image?.url?i["background-image"]=`url("${e.image.url}")`:e?.color&&(i["--option-color"]=e.color,i["background-color"]=e.color),i)}getCandidateVariantsExcluding(e){let n=this.item(),i=this.availabilityIndex(),r=new Set;n.vars.forEach((s,l)=>{s.isAvailable&&r.add(l)});let o=r;for(let[s,l]of Object.entries(this.selectedOptions())){if(je(s)===je(e))continue;let c=i.get(je(s));if(!c)return new Set;let d=c.get(String(l));if(!d)return new Set;if(o=new Set([...o].filter(_=>d.has(_))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let r=this.availabilityIndex().get(je(e.name));if(!r)return!0;let o=n.name,s=r.get(o);if(!s||s.size===0)return!0;let l=this.getCandidateVariantsExcluding(e.name);if(l.size===0)return!0;for(let c of l)if(s.has(c))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=k({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Ce(In()),Et],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"swatch-color-type","swatch-image-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,i){n&1&&de(0,wi,9,7,"div",0,xn),n&2&&pe(i.options())},dependencies:[vn,_n,wn],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px;scrollbar-gutter:stable both-edges;scrollbar-width:none}.option-values::-webkit-scrollbar{display:none}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;flex-shrink:0;--selected-color: var(--option-color, rgba(var(--lc-primary-button-bg-color, 0 0 0)));background-size:cover;background-position:center;background-repeat:no-repeat}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
1
+ import{a as He,b as et,c as Cn,g as De}from"./chunk-XC2ODVUS.js";import{a as me,d as Be,e as yn,g as tt,h as wt}from"./chunk-DUAIGBXY.js";import{$ as Et,$a as Ce,Aa as sn,Ba as L,Ca as an,D as he,Da as p,E as ie,Ea as ln,Fa as cn,I as _e,Ja as un,K as ge,Ka as dn,L as ue,La as P,Na as Le,O as u,Oa as Qe,Pa as Xe,Qa as x,Ra as oe,Sa as ve,Wa as z,X as k,Xa as q,Y as bt,Ya as U,Za as pn,_ as Jt,_a as Ze,ab as Je,b as Kt,ba as $,bb as fn,ca as ke,cb as Y,db as K,fb as fe,ga as en,ha as Ee,hb as se,ia as C,ib as ae,ja as y,jb as ee,ka as tn,kb as N,lb as mn,ma as de,mb as Ue,na as pe,o as Qt,oa as g,pa as m,q as Xt,qa as h,ra as I,s as Ct,sa as J,sb as hn,t as yt,ta as re,tb as _n,u as Zt,ua as Ke,ub as gn,v as S,va as nn,wa as rn,wb as vn,x as R,xa as T,y as F,ya as on,za as B}from"./chunk-X2XZU367.js";import{b as Dt,c as j}from"./chunk-Y6YLR2GG.js";import{a as H,b as Fe}from"./chunk-V7UGKYBN.js";var bn=0;function fi(t=document.head){return En(Dt.styleURL,t,"cooee-global-styles")}function mi(t=document.head){return En(Dt.swiperStyleURL,t,"cooee-swiper-styles")}function En(t,e=document.head,n){return new Promise(i=>{if(e.querySelector(`#${n}`)){i();return}let o=document.createElement("link");o.rel="stylesheet",o.href=t,o.id=n,o.onload=()=>{i()},o.onerror=()=>{console.error("Failed to load stylesheet:",t),i()},e.appendChild(o)})}function Ge(t,e=document.head){if(!t)return;bn++;let n=document.createElement("style");n.id=`cooee-app-css-${bn}`,n.textContent=t,e.appendChild(n)}async function nt(){let t=(await import("./swiper-bundle-WHJS64TU.js")).default;return window.CooeeSDK.Swiper=t}async function it(t,e=!0){if(!t)return;let n=[];e&&n.push(mi(t)),n.push(fi(t)),await Promise.all(n);let i=me.get().website.commonCSS;Ge(i,t)}var gi={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Eo=Fe(H({},gi),{"[class.ng-submitted]":"isSubmitted"});var vi=new Zt("",{providedIn:"root",factory:()=>Dn}),Dn="always";var Ci=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=bt({type:t});static \u0275inj=yt({})}return t})();var wn=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:vi,useValue:n.callSetDisabledState??Dn}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=bt({type:t});static \u0275inj=yt({imports:[Ci]})}return t})();var It=(function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t})(It||{});var Q=(function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t[t.BUY_NOW=110]="BUY_NOW",t[t.QUICK_VIEW=111]="QUICK_VIEW",t})(Q||{});var yi=(function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t})(yi||{});var X=class t{engagementContext=S(He);eventData=S(et);constructor(){}executeCTA(e,n){let i,r=this.engagementContext();if(!r){j.error("Engagement context is not available; aborting executeCTA.");return}if(e===Q.ADD_TO_CART)i="CE Add To Cart Clicked";else if(e===Q.GO_TO_PRODUCT)i="CE View Item Clicked";else if(e===Q.OPEN_CART)i="CE Open Cart Clicked",r.triggerData.redirectBehaviour=It.CART_DRAWER;else{j.warn(`Unsupported CTA type: ${e}`);return}window.CooeeSDK.executeCTA(r,H({clickAction:{at:e}},n));let o=new Cn(i,this.eventData.props,r.triggerData);n?.video?o.setVideos(n.video):this.eventData.video&&o.setVideos(this.eventData.video),window.CooeeSDK.sendEvent(o)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Ct({token:t,factory:t.\u0275fac})};function In(t,e){return[X,...bi(t,e)]}function bi(t,e){return[{provide:He,useValue:ie(t)},{provide:et,useValue:H({},e)}]}var rt=class t{elementRef=S(_e);engagementService=S(X);hasSwiper=!1;_engagementTrigger=ie(null);_triggerContext=S(He);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){j.verbose("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(it(e,this.hasSwiper),Ge(this.engagementTrigger?.content?.innerCSS,e))}ngOnDestroy(){j.verbose("Destroying",this.constructor.name)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=k({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,i){n&2&&Xe(i.classes)},inputs:{triggerContext:"triggerContext"},decls:1,vars:0,template:function(n,i){n&1&&on(0)},encapsulation:2})};var xn=(t,e)=>e.id;function Ei(t,e){if(t&1&&(m(0,"span",6),x(1),h()),t&2){p();let n=U(0);u(),oe(n)}}function Di(t,e){if(t&1){let n=B();z(0),m(1,"button",5),L("click",function(){let r=R(n).$implicit,o=p().$implicit,s=p();return F(s.onOptionChange(o,r))}),C(2,Ei,2,1,"span",6),h()}if(t&2){let n=e.$implicit,i=p().$implicit,r=U(1),o=p(),s=n.name,l=q(n.displayName||n.name),c=n.swatch,d=r?n.hexColor??s:"",_=o.selectedOptions()[i.name]===s,a=!!(c!=null&&c.color),v=!!(!(c==null||c.image==null)&&c.image.url);u(),Le("swatch-color-type",a)("swatch-image-type",v)("selected",_)("disabled",n.disabled),g("title",l)("ngStyle",o.getSwatchStyles(c,d)),Ee("aria-checked",_?"true":"false")("data-value",s)("aria-disabled",n.disabled?"true":null)("aria-label",l),u(),y(!r&&!a&&!v?2:-1)}}function wi(t,e){if(t&1&&(m(0,"div"),z(1),m(2,"div",1),x(3),h(),m(4,"div",2),x(5),h(),m(6,"div",3),de(7,Di,3,16,"button",4,xn),h()()),t&2){let n=e.$implicit,i=p();Xe(Ze("option-group ",n.name.toLowerCase())),u(),q(i.hasHexColors(n)),u(2),ve("",n.name,":"),u(2),oe(i.selectedOptions()[n.name]),u(),Ee("aria-label",n.name),u(),pe(n.optionValues)}}var je=t=>t.trim().toLowerCase(),ot=class t extends rt{selectedVariant=new ke;item=N.required();selectedOptions=ie({});options=se(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){j.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(i=>{i.disabled=this.isOptionValueDisabledFast(n,i)})}),e.options});matchedVariant=se(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(i=>e.options.every(r=>{let o=i.selectedOptions.find(s=>s.name===r.name)?.value;return n[r.name]===o}))});availabilityIndex=se(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((i,r)=>{if(i.isAvailable)for(let o of i.selectedOptions){let s=je(o.name),l=o.value,c=n.get(s);c||n.set(s,c=new Map);let d=c.get(l);d||c.set(l,d=new Set),d.add(r)}}),n});constructor(){super(),ae(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=ae(()=>{let n=this.item();if(!n?.options)return;let i=H({},this.selectedOptions()),r=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=r?.selectedOptions.find(l=>l.name===o.name)?.value;s&&(i[o.name]=s)}),this.selectedOptions.set(i),e.destroy()})}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot;if(!e)return;let n=me.get().website?.itemSwatchMapping;n&&Ge(n,e)}onOptionChange(e,n){let i=H({},this.selectedOptions());i[e.name]=n.name,this.selectedOptions.set(i)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getSwatchStyles(e,n){let i={};return!e&&n?(i["--option-color"]=n,i["background-color"]=n,i):(e?.image?.url?i["background-image"]=`url("${e.image.url}")`:e?.color&&(i["--option-color"]=e.color,i["background-color"]=e.color),i)}getCandidateVariantsExcluding(e){let n=this.item(),i=this.availabilityIndex(),r=new Set;n.vars.forEach((s,l)=>{s.isAvailable&&r.add(l)});let o=r;for(let[s,l]of Object.entries(this.selectedOptions())){if(je(s)===je(e))continue;let c=i.get(je(s));if(!c)return new Set;let d=c.get(String(l));if(!d)return new Set;if(o=new Set([...o].filter(_=>d.has(_))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let r=this.availabilityIndex().get(je(e.name));if(!r)return!0;let o=n.name,s=r.get(o);if(!s||s.size===0)return!0;let l=this.getCandidateVariantsExcluding(e.name);if(l.size===0)return!0;for(let c of l)if(s.has(c))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=k({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Ce(In()),Et],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"swatch-color-type","swatch-image-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,i){n&1&&de(0,wi,9,7,"div",0,xn),n&2&&pe(i.options())},dependencies:[vn,_n,wn],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px;scrollbar-gutter:stable both-edges;scrollbar-width:none}.option-values::-webkit-scrollbar{display:none}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;flex-shrink:0;--selected-color: var(--option-color, rgba(var(--lc-primary-button-bg-color, 0 0 0)));background-size:cover;background-position:center;background-repeat:no-repeat}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
2
2
  `],encapsulation:3})};var we=class{lastWidth;lastHeight;resizeTimeout=null;debounceDelay=200;onResizeCallback;constructor(e){this.onResizeCallback=e,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,window.addEventListener("resize",this.debouncedResize),window.addEventListener("orientationchange",this.handleImmediateResize)}destroy(){window.removeEventListener("resize",this.debouncedResize),window.removeEventListener("orientationchange",this.handleImmediateResize)}handleImmediateResize=()=>{this.triggerResize()};debouncedResize=()=>{this.resizeTimeout!==null&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.triggerResize()},this.debounceDelay)};triggerResize(){let e=window.innerWidth,n=window.innerHeight;(n!==this.lastHeight||e!==this.lastWidth)&&(this.onResizeCallback(),this.lastWidth=e,this.lastHeight=n)}};var An,b,Nn,Mt,be,Vn,Tn,Pn,Rn,At,Vt,St,Ii,Ot={},Fn=[],xi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lt=Array.isArray;function le(t,e){for(var n in e)t[n]=e[n];return t}function Nt(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xt(t,e,n,i,r){var o={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Nn,__i:-1,__u:0};return r==null&&b.vnode!=null&&b.vnode(o),o}function Tt(t){return t.children}function Ie(t,e){this.props=t,this.context=e}function xe(t,e){if(e==null)return t.__?xe(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?xe(t):null}function kn(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return kn(t)}}function Sn(t){(!t.__d&&(t.__d=!0)&&be.push(t)&&!at.__r++||Vn!=b.debounceRendering)&&((Vn=b.debounceRendering)||Tn)(at)}function at(){for(var t,e,n,i,r,o,s,l=1;be.length;)be.length>l&&be.sort(Pn),t=be.shift(),l=be.length,t.__d&&(n=void 0,r=(i=(e=t).__v).__e,o=[],s=[],e.__P&&((n=le({},i)).__v=i.__v+1,b.vnode&&b.vnode(n),Hn(e.__P,n,i,e.__n,e.__P.namespaceURI,32&i.__u?[r]:null,o,r??xe(i),!!(32&i.__u),s),n.__v=i.__v,n.__.__k[n.__i]=n,Oi(o,n,s),n.__e!=r&&kn(n)));at.__r=0}function Ln(t,e,n,i,r,o,s,l,c,d,_){var a,v,f,V,W,A,D=i&&i.__k||Fn,w=e.length;for(c=Vi(n,e,D,c,w),a=0;a<w;a++)(f=n.__k[a])!=null&&(v=f.__i==-1?Ot:D[f.__i]||Ot,f.__i=a,A=Hn(t,f,v,r,o,s,l,c,d,_),V=f.__e,f.ref&&v.ref!=f.ref&&(v.ref&&Pt(v.ref,null,f),_.push(f.ref,f.__c||V,f)),W==null&&V!=null&&(W=V),4&f.__u||v.__k===f.__k?c=Un(f,c,t):typeof f.type=="function"&&A!==void 0?c=A:V&&(c=V.nextSibling),f.__u&=-7);return n.__e=W,c}function Vi(t,e,n,i,r){var o,s,l,c,d,_=n.length,a=_,v=0;for(t.__k=new Array(r),o=0;o<r;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=o+v,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?xt(null,s,null,null,null):lt(s)?xt(Tt,{children:s},null,null,null):s.constructor==null&&s.__b>0?xt(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,l=null,(d=s.__i=Si(s,n,c,a))!=-1&&(a--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(r>_?v--:r<_&&v++),typeof s.type!="function"&&(s.__u|=4)):d!=c&&(d==c-1?v--:d==c+1?v++:(d>c?v--:v++,s.__u|=4))):t.__k[o]=null;if(a)for(o=0;o<_;o++)(l=n[o])!=null&&(2&l.__u)==0&&(l.__e==i&&(i=xe(l)),Gn(l,l));return i}function Un(t,e,n){var i,r;if(typeof t.type=="function"){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=Un(i[r],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=xe(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Si(t,e,n,i){var r,o,s=t.key,l=t.type,c=e[n];if(c===null&&t.key==null||c&&s==c.key&&l==c.type&&(2&c.__u)==0)return n;if(i>(c!=null&&(2&c.__u)==0?1:0))for(r=n-1,o=n+1;r>=0||o<e.length;){if(r>=0){if((c=e[r])&&(2&c.__u)==0&&s==c.key&&l==c.type)return r;r--}if(o<e.length){if((c=e[o])&&(2&c.__u)==0&&s==c.key&&l==c.type)return o;o++}}return-1}function On(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||xi.test(e)?n:n+"px"}function st(t,e,n,i,r){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||On(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||On(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Rn,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?i?n.u=i.u:(n.u=At,t.addEventListener(e,o?St:Vt,o)):t.removeEventListener(e,o?St:Vt,o);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Mn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=At++;else if(e.t<n.u)return;return n(b.event?b.event(e):e)}}}function Hn(t,e,n,i,r,o,s,l,c,d){var _,a,v,f,V,W,A,D,w,Ne,ce,qe,Te,Yt,Ye,Pe,vt,Z=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),o=[l=e.__e=n.__e]),(_=b.__b)&&_(e);e:if(typeof Z=="function")try{if(D=e.props,w="prototype"in Z&&Z.prototype.render,Ne=(_=Z.contextType)&&i[_.__c],ce=_?Ne?Ne.props.value:_.__:i,n.__c?A=(a=e.__c=n.__c).__=a.__E:(w?e.__c=a=new Z(D,ce):(e.__c=a=new Ie(D,ce),a.constructor=Z,a.render=Ai),Ne&&Ne.sub(a),a.props=D,a.state||(a.state={}),a.context=ce,a.__n=i,v=a.__d=!0,a.__h=[],a._sb=[]),w&&a.__s==null&&(a.__s=a.state),w&&Z.getDerivedStateFromProps!=null&&(a.__s==a.state&&(a.__s=le({},a.__s)),le(a.__s,Z.getDerivedStateFromProps(D,a.__s))),f=a.props,V=a.state,a.__v=e,v)w&&Z.getDerivedStateFromProps==null&&a.componentWillMount!=null&&a.componentWillMount(),w&&a.componentDidMount!=null&&a.__h.push(a.componentDidMount);else{if(w&&Z.getDerivedStateFromProps==null&&D!==f&&a.componentWillReceiveProps!=null&&a.componentWillReceiveProps(D,ce),!a.__e&&a.shouldComponentUpdate!=null&&a.shouldComponentUpdate(D,a.__s,ce)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(a.props=D,a.state=a.__s,a.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Re){Re&&(Re.__=e)}),qe=0;qe<a._sb.length;qe++)a.__h.push(a._sb[qe]);a._sb=[],a.__h.length&&s.push(a);break e}a.componentWillUpdate!=null&&a.componentWillUpdate(D,a.__s,ce),w&&a.componentDidUpdate!=null&&a.__h.push(function(){a.componentDidUpdate(f,V,W)})}if(a.context=ce,a.props=D,a.__P=t,a.__e=!1,Te=b.__r,Yt=0,w){for(a.state=a.__s,a.__d=!1,Te&&Te(e),_=a.render(a.props,a.state,a.context),Ye=0;Ye<a._sb.length;Ye++)a.__h.push(a._sb[Ye]);a._sb=[]}else do a.__d=!1,Te&&Te(e),_=a.render(a.props,a.state,a.context),a.state=a.__s;while(a.__d&&++Yt<25);a.state=a.__s,a.getChildContext!=null&&(i=le(le({},i),a.getChildContext())),w&&!v&&a.getSnapshotBeforeUpdate!=null&&(W=a.getSnapshotBeforeUpdate(f,V)),Pe=_,_!=null&&_.type===Tt&&_.key==null&&(Pe=Bn(_.props.children)),l=Ln(t,lt(Pe)?Pe:[Pe],e,n,i,r,o,s,l,c,d),a.base=e.__e,e.__u&=-161,a.__h.length&&s.push(a),A&&(a.__E=a.__=null)}catch(Re){if(e.__v=null,c||o!=null)if(Re.then){for(e.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;o[o.indexOf(l)]=null,e.__e=l}else for(vt=o.length;vt--;)Nt(o[vt]);else e.__e=n.__e,e.__k=n.__k;b.__e(Re,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=Mi(n.__e,e,n,i,r,o,s,c,d);return(_=b.diffed)&&_(e),128&e.__u?void 0:l}function Oi(t,e,n){for(var i=0;i<n.length;i++)Pt(n[i],n[++i],n[++i]);b.__c&&b.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(o){o.call(r)})}catch(o){b.__e(o,r.__v)}})}function Bn(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:lt(t)?t.map(Bn):le({},t)}function Mi(t,e,n,i,r,o,s,l,c){var d,_,a,v,f,V,W,A=n.props,D=e.props,w=e.type;if(w=="svg"?r="http://www.w3.org/2000/svg":w=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((f=o[d])&&"setAttribute"in f==!!w&&(w?f.localName==w:f.nodeType==3)){t=f,o[d]=null;break}}if(t==null){if(w==null)return document.createTextNode(D);t=document.createElementNS(r,w,D.is&&D),l&&(b.__m&&b.__m(e,o),l=!1),o=null}if(w==null)A===D||l&&t.data==D||(t.data=D);else{if(o=o&&An.call(t.childNodes),A=n.props||Ot,!l&&o!=null)for(A={},d=0;d<t.attributes.length;d++)A[(f=t.attributes[d]).name]=f.value;for(d in A)if(f=A[d],d!="children"){if(d=="dangerouslySetInnerHTML")a=f;else if(!(d in D)){if(d=="value"&&"defaultValue"in D||d=="checked"&&"defaultChecked"in D)continue;st(t,d,null,f,r)}}for(d in D)f=D[d],d=="children"?v=f:d=="dangerouslySetInnerHTML"?_=f:d=="value"?V=f:d=="checked"?W=f:l&&typeof f!="function"||A[d]===f||st(t,d,f,A[d],r);if(_)l||a&&(_.__html==a.__html||_.__html==t.innerHTML)||(t.innerHTML=_.__html),e.__k=[];else if(a&&(t.innerHTML=""),Ln(e.type=="template"?t.content:t,lt(v)?v:[v],e,n,i,w=="foreignObject"?"http://www.w3.org/1999/xhtml":r,o,s,o?o[0]:n.__k&&xe(n,0),l,c),o!=null)for(d=o.length;d--;)Nt(o[d]);l||(d="value",w=="progress"&&V==null?t.removeAttribute("value"):V!=null&&(V!==t[d]||w=="progress"&&!V||w=="option"&&V!=A[d])&&st(t,d,V,A[d],r),d="checked",W!=null&&W!=t[d]&&st(t,d,W,A[d],r))}return t}function Pt(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(r){b.__e(r,n)}}function Gn(t,e,n){var i,r;if(b.unmount&&b.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||Pt(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){b.__e(o,e)}i.base=i.__P=null}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&Gn(i[r],e,n||typeof t.type!="function");n||Nt(t.__e),t.__c=t.__=t.__e=void 0}function Ai(t,e,n){return this.constructor(t,n)}An=Fn.slice,b={__e:function(t,e,n,i){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&o.getDerivedStateFromError!=null&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,i||{}),s=r.__d),s)return r.__E=r}catch(l){t=l}throw t}},Nn=0,Mt=function(t){return t!=null&&t.constructor==null},Ie.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=le({},this.state),typeof t=="function"&&(t=t(le({},n),this.props)),t&&le(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Sn(this))},Ie.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Sn(this))},Ie.prototype.render=Tt,be=[],Tn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pn=function(t,e){return t.__v.__b-e.__v.__b},at.__r=0,Rn=/(PointerCapture)$|Capture$/i,At=0,Vt=Mn(!1),St=Mn(!0),Ii=0;var Ft,G,Rt,jn,Wn=0,Zn=[],O=b,$n=O.__b,zn=O.__r,qn=O.diffed,Yn=O.__c,Kn=O.unmount,Qn=O.__;function Ni(t,e){O.__h&&O.__h(G,t,Wn||e),Wn=0;var n=G.__H||(G.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Lt(t,e){var n=Ni(Ft++,7);return Ri(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ti(){for(var t;t=Zn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ct),t.__H.__h.forEach(kt),t.__H.__h=[]}catch(e){t.__H.__h=[],O.__e(e,t.__v)}}O.__b=function(t){G=null,$n&&$n(t)},O.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Qn&&Qn(t,e)},O.__r=function(t){zn&&zn(t),Ft=0;var e=(G=t.__c).__H;e&&(Rt===G?(e.__h=[],G.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(ct),e.__h.forEach(kt),e.__h=[],Ft=0)),Rt=G},O.diffed=function(t){qn&&qn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Zn.push(e)!==1&&jn===O.requestAnimationFrame||((jn=O.requestAnimationFrame)||Pi)(Ti)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Rt=G=null},O.__c=function(t,e){e.some(function(n){try{n.__h.forEach(ct),n.__h=n.__h.filter(function(i){return!i.__||kt(i)})}catch(i){e.some(function(r){r.__h&&(r.__h=[])}),e=[],O.__e(i,n.__v)}}),Yn&&Yn(t,e)},O.unmount=function(t){Kn&&Kn(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{ct(i)}catch(r){e=r}}),n.__H=void 0,e&&O.__e(e,n.__v))};var Xn=typeof requestAnimationFrame=="function";function Pi(t){var e,n=function(){clearTimeout(i),Xn&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);Xn&&(e=requestAnimationFrame(n))}function ct(t){var e=G,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),G=e}function kt(t){var e=G;t.__c=t.__(),G=e}function Ri(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}var Fi=Symbol.for("preact-signals");function Ht(){if(Ve>1)Ve--;else{for(var t,e=!1;We!==void 0;){var n=We;for(We=void 0,Ut++;n!==void 0;){var i=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&ei(n))try{n.c()}catch(r){e||(t=r,e=!0)}n=i}}if(Ut=0,Ve--,e)throw t}}var E=void 0;var We=void 0,Ve=0,Ut=0,ut=0;function Jn(t){if(E!==void 0){var e=t.n;if(e===void 0||e.t!==E)return e={i:0,S:t,p:E.s,n:void 0,t:E,e:void 0,x:void 0,r:e},E.s!==void 0&&(E.s.n=e),E.s=e,t.n=e,32&E.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=E.s,e.n=void 0,E.s.n=e,E.s=e),e}}function M(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}M.prototype.brand=Fi;M.prototype.h=function(){return!0};M.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};M.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}};M.prototype.subscribe=function(t){var e=this;return ze(function(){var n=e.value,i=E;E=void 0;try{t(n)}finally{E=i}})};M.prototype.valueOf=function(){return this.value};M.prototype.toString=function(){return this.value+""};M.prototype.toJSON=function(){return this.value};M.prototype.peek=function(){var t=E;E=void 0;try{return this.value}finally{E=t}};Object.defineProperty(M.prototype,"value",{get:function(){var t=Jn(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Ut>100)throw new Error("Cycle detected");this.v=t,this.i++,ut++,Ve++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Ht()}}}});function ne(t){return new M(t)}function ei(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ti(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function ni(t){for(var e=t.s,n=void 0;e!==void 0;){var i=e.p;e.i===-1?(e.S.U(e),i!==void 0&&(i.n=e.n),e.n!==void 0&&(e.n.p=i)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=i}t.s=n}function Se(t){M.call(this,void 0),this.x=t,this.s=void 0,this.g=ut-1,this.f=4}(Se.prototype=new M).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ut))return!0;if(this.g=ut,this.f|=1,this.i>0&&!ei(this))return this.f&=-2,!0;var t=E;try{ti(this),E=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return E=t,ni(this),this.f&=-2,!0};Se.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}M.prototype.S.call(this,t)};Se.prototype.U=function(t){if(this.t!==void 0&&(M.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Se.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Se.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Jn(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Bt(t){return new Se(t)}function ii(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Ve++;var n=E;E=void 0;try{e()}catch(i){throw t.f&=-2,t.f|=8,Gt(t),i}finally{E=n,Ht()}}}function Gt(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ii(t)}function ki(t){if(E!==this)throw new Error("Out-of-order effect");ni(this),E=t,this.f&=-2,8&this.f&&Gt(this),Ht()}function $e(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}$e.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};$e.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ii(this),ti(this),Ve++;var t=E;return E=this,ki.bind(this,t)};$e.prototype.N=function(){2&this.f||(this.f|=2,this.o=We,We=this)};$e.prototype.d=function(){this.f|=8,1&this.f||Gt(this)};function ze(t){var e=new $e(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Wt,jt;function Oe(t,e){b[t]=e.bind(null,b[t]||function(){})}function dt(t){jt&&jt(),jt=t&&t.S()}function ri(t){var e=this,n=t.data,i=Ui(n);i.value=n;var r=Lt(function(){for(var o=e.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return e.__$u.c=function(){var s,l=e.__$u.S(),c=r.value;l(),Mt(c)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=c},Bt(function(){var s=i.value.value;return s===0?0:s===!0?"":s||""})},[]);return r.value}ri.displayName="_st";Object.defineProperties(M.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ri},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Oe("__b",function(t,e){if(typeof e.type=="string"){var n,i=e.props;for(var r in i)if(r!=="children"){var o=i[r];o instanceof M&&(n||(e.__np=n={}),n[r]=o,i[r]=o.peek())}}t(e)});Oe("__r",function(t,e){dt();var n,i=e.__c;i&&(i.__$f&=-2,(n=i.__$u)===void 0&&(i.__$u=n=(function(r){var o;return ze(function(){o=this}),o.c=function(){i.__$f|=1,i.setState({})},o})())),Wt=i,dt(n),t(e)});Oe("__e",function(t,e,n,i){dt(),Wt=void 0,t(e,n,i)});Oe("diffed",function(t,e){dt(),Wt=void 0;var n;if(typeof e.type=="string"&&(n=e.__e)){var i=e.__np,r=e.props;if(i){var o=n.U;if(o)for(var s in o){var l=o[s];l!==void 0&&!(s in i)&&(l.d(),o[s]=void 0)}else n.U=o={};for(var c in i){var d=o[c],_=i[c];d===void 0?(d=Li(n,c,_,r),o[c]=d):d.o(_,r)}}}t(e)});function Li(t,e,n,i){var r=e in t&&t.ownerSVGElement===void 0,o=ne(n);return{o:function(s,l){o.value=s,i=l},d:ze(function(){var s=o.value.value;i[e]!==s&&(i[e]=s,r?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}Oe("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var i=n.U;if(i){n.U=void 0;for(var r in i){var o=i[r];o&&o.d()}}}}else{var s=e.__c;if(s){var l=s.__$u;l&&(s.__$u=void 0,l.d())}}t(e)});Oe("__h",function(t,e,n,i){(i<3||i===9)&&(e.__$f|=2),t(e,n,i)});Ie.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u,i=n&&n.s!==void 0;for(var r in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(i||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(i||4&this.__$f)||3&this.__$f)return!0;for(var o in t)if(o!=="__source"&&t[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in t))return!0;return!1};function Ui(t){return Lt(function(){return ne(t)},[])}var pt=class{id;mID;vID;vName;imageURL;name;link;quantity;price;finalPrice;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price,this.finalPrice=e.finalPrice??e.price}};var ft=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}};var mt=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}};var $t=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}},ht=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedOptions;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(n=>new ft(n))??[],this.link=e.link,this.price=new mt(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.selectedOptions=e.selectedOptions??[],this.effectivePrice=ne(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=ne(void 0)),this.sellingPlans=e.sellingPlans?.map(n=>{let i=new $t(n);return i.isSelected&&(this.selectedSellingPlan.value=i),i})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}hasEffectivePrice(){return this.effectivePrice.value!==this.price.d}};function zt(t,e){for(let n of t){let i=e.get(n.attr),r=Array.isArray(i),o=typeof i=="string",s=typeof i=="number"&&typeof n.value=="number",l=Array.isArray(n.value),c=!0;switch(n.op){case"contains":{c=(r||o)&&i.includes(n.value);break}case"notContains":{c=(r||o)&&!i.includes(n.value);break}case"eq":{c=i===n.value;break}case"ne":{c=i!==n.value;break}case"gt":{c=s&&i>n.value;break}case"gte":{c=s&&i>=n.value;break}case"lt":{c=s&&i<n.value;break}case"lte":{c=s&&i<=n.value;break}case"in":{c=l&&n.value.includes(i);break}case"nin":{c=l&&!n.value.includes(i);break}case"between":{c=s&&l&&n.value.length===2&&i>=n.value[0]&&i<=n.value[1];break}case"all":{c=r&&l&&n.value.every(d=>i.includes(d));break}default:{c=!1;break}}if(!c)return!1}return!0}var _t=class{id;mID;name;options;imgs;vars;desc;link;slug;quantity;category;meta;reviews;tags;templateSuffix;selectedOrFirstVariant;selected=ne(!0);_showAddToCartButton;constructor(e){this.update(e),this.selectedOrFirstVariant=ne(this.selectedVariant),this._showAddToCartButton=this.evaluateShowATCFlag()}get firstImageURL(){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 showAddToCartButton(){return this._showAddToCartButton}set variants(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}hasVariants(){return this.vars?.length>1}setSelectedVariant(e){this.selectedOrFirstVariant.value=e}setSelectedVariantByID(e){if(!e)return;let n=this.vars.find(i=>i.mID===e.toString());n&&this.setSelectedVariant(n)}update(e){return this.id=e.id??this.id,this.mID=e.mID??this.mID,this.name=e.name??this.name,this.imgs=e.imgs??this.imgs,this.desc=e.desc??this.desc,this.link=e.link??this.link,this.slug=e.slug??this.slug,this.quantity=e.quantity??this.quantity,this.meta=e.meta??this.meta,this.category=e.category??this.category,this.reviews=e.reviews??this.reviews,this.options=e.options??this.options,this.tags=e.tags??this.tags,this.templateSuffix=e.templateSuffix??this.templateSuffix,e.vars&&(this.vars=e.vars.map(n=>new ht(n))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new pt({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})}getTemplateVariables(){let e=this.selectedOrFirstVariant.value,n=e.price,i=this.name,r=this.category,o=this.variantImage??this.firstImageURL,s=this.meta,l=this.tags?.join(",")??"",c=this.reviews?.rating,d=this.reviews?.totalReviews,_=n.cmp&&n.cmp>n.d,a=Fe(H({name:i},Be("price",n.d,!0)),{image_url:o,meta:s,category:r,rating:c,reviews:d,tags:l});if(e.hasEffectivePrice()){let f=Be("effective_price",e.effectivePrice.value,!0);Object.assign(a,f)}if(_){let f=n.cmp-n.d,V={discount_percent:(f/n.cmp*100).toFixed(0)};Object.assign(a,V),Object.assign(a,Be("compare_price",n.cmp)),Object.assign(a,Be("discount_price",f))}let v={name:e.name,quantity:e.quantity};return{product:a,variant:v}}evaluateShowATCFlag(){let e=me.get().widgetCustomisation?.atcButton?.showWhen;if(!e?.predicates?.length)return!0;let n=e.predicates,i=this.getValueMap(n);return e.op==="or"?n.some(r=>zt([r],i)):zt(n,i)}getValueMap(e){let n=new Map;for(let i of e){let r=i.attr.split(".");switch(r[1]){case"tags":{n.set(i.attr,this.tags);break}case"type":case"category":{n.set(i.attr,this.category);break}case"meta":case"metafield":{let s=r[2];if(!s)continue;n.set(i.attr,this.meta?.[s]);break}}}return n}};var gt=class{id;alt;shortID;sources;items;durationMS;thumbnail;card;bestSource;highSource;goodSource;lowSource;m3u8Source;constructor(e={}){if(this.id=e.id,this.alt=e.alt,this.shortID=e.shortID,this.sources=e.sources?.sort((n,i)=>i.height-n.height),this.durationMS=e.durationMS,this.thumbnail=e.thumbnail,this.items=e.items?e.items.map(n=>new _t(n)):[],this.card=e.card,this.sources){let n=[];for(let i of this.sources)i.format==="mp4"?n.push(i):i.format==="m3u8"&&!this.m3u8Source&&(this.m3u8Source=i);n.length>0&&(this.bestSource=n[0],this.highSource=n.length>1?n[1]:n[0],this.lowSource=n.length>2?n[n.length-1]:n[0])}}};var qt=(n=>(n.CLASSIC="CLASSIC",n.ITEM_CARD_HEADER="ITEM_CARD_HEADER",n))(qt||{});var Hi=(i=>(i.ON="ON",i.OFF="OFF",i.ON_HOVER="ON_HOVER",i))(Hi||{}),Bi=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.ITEM_SWIPER="ITEM_SWIPER",r.CARD="CARD",r.NONE="NONE",r))(Bi||{});var oi=class{videos;source;template;heading;autoPlay;showMuteButton;footerContent;detailPopup;playlistConfig;itemDetailConfig;constructor(e={}){this.videos=e.videos?.map(n=>new gt(n))??[],this.source=e.source,this.template=e.template,this.detailPopup=e.detailPopup??{template:"VIDEO_ONLY_VIEW"},this.heading=e.heading,this.showMuteButton=e.showMuteButton,this.autoPlay=e.autoPlay??"ON",this.footerContent=e.footerContent??"FIRST_ITEM",this.playlistConfig={videoSwiper:e.playlistConfig?.videoSwiper??void 0,itemCardClickBehavior:e.playlistConfig?.itemCardClickBehavior??"OPEN_VIDEO_DETAIL"},this.itemDetailConfig={template:e.itemDetailConfig?.template??"CLASSIC"}}showItems(){return this.footerContent==="FIRST_ITEM"||this.footerContent==="ITEM_SWIPER"}};function si(t){t||(t=S(he));let e=new Kt(n=>{if(t.destroyed){n.next();return}return t.onDestroy(n.next.bind(n))});return n=>n.pipe(Xt(e))}var ai=(n=>(n.SINGLE_PANE="SINGLE_PANE",n.TWO_PANE="TWO_PANE",n))(ai||{});var Me=class t{transform(e){return e==null?null:yn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Jt({name:"cooeeCurrency",type:t,pure:!0})};function Gi(t,e){if(t&1&&(I(0,"span",6),Y(1,"cooeeCurrency"),Y(2,"safeHtml")),t&2){p();let n=U(7);g("innerHTML",K(2,3,K(1,1,n.cmp)),ge)}}function ji(t,e){if(t&1&&(m(0,"span",8),x(1),h()),t&2){p();let n=U(14);u(),ve(" ",n,"% off ")}}function Wi(t,e){t&1&&(x(0," Out of Stock "),I(1,"cooee-icon",16))}function $i(t,e){t&1&&(x(0," Add To Cart "),I(1,"cooee-icon",17))}function zi(t,e){if(t&1){let n=B();m(0,"button",15),L("click",function(r){R(n);let o=p();return F(o.addToCartClicked(r))}),C(1,Wi,2,0)(2,$i,2,0),h()}if(t&2){let n=p();g("disabled",n.isButtonDisabled()),u(),y(n.isButtonDisabled()?1:2)}}var Ae=class t{buttonClick=ee();item=N.required();isButtonDisabled=se(()=>{let e=this.item();return e.hasVariants()?!e.vars.some(n=>n.isAvailable):!e.selectedOrFirstVariant.value.isAvailable});addToCartClicked(e){e.stopPropagation(),this.buttonClick.emit(this.item())}getDiscountPercentage(e){return e.cmp&&e.cmp>e.d?Math.round((1-e.d/e.cmp)*100):0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=k({type:t,selectors:[["cooee-item-card"]],inputs:{item:[1,"item"]},outputs:{buttonClick:"buttonClick"},decls:22,vars:17,consts:[[1,"card-body"],[1,"item-image",3,"alt","src"],[1,"item-info"],[1,"item-name"],[1,"prices"],[1,"item-price",3,"innerHTML"],[1,"item-cmp-price",3,"innerHTML"],["type","button",1,"shop-now-button",3,"click","href"],[1,"item-discount-percentage"],["type","button",1,"item-detail-button",3,"aria-label"],["name","open"],[1,"card-footer"],["type","button",1,"cta-button",3,"disabled"],["href","/cart","title","View Cart",1,"view-cart-button"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"],["type","button",1,"cta-button",3,"click","disabled"],["name","unavailable","aria-hidden","true"],["name","add","aria-hidden","true"]],template:function(n,i){if(n&1){let r=B();nn(0),m(1,"div",0),I(2,"img",1),m(3,"div",2)(4,"div",3),x(5),h(),m(6,"div",4),z(7),I(8,"span",5),Y(9,"cooeeCurrency"),Y(10,"safeHtml"),C(11,Gi,3,5,"span",6),h(),m(12,"a",7),L("click",function(s){return R(r),F(s.stopPropagation())}),x(13," Shop now "),h(),z(14),C(15,ji,2,1,"span",8),h(),m(16,"button",9),I(17,"cooee-icon",10),h()(),m(18,"div",11),C(19,zi,3,2,"button",12),m(20,"a",13),I(21,"img",14),h()(),rn()}if(n&2){let r=i.item().selectedOrFirstVariant.value;u(2),g("alt",pn(i.item().name))("src",i.item().firstImageURL,ue),u(3),ve(" ",i.item().name," "),u(2);let o=q(r.price);u(),g("innerHTML",K(10,14,K(9,12,o.d)),ge),u(3),y(o.cmp?11:-1),u(),g("href","/products/"+i.item().slug,ue),u(2);let s=q(i.getDiscountPercentage(r.price));u(),y(s>0?15:-1),u(),en("aria-label",Ze("View product details for ",i.item().name)),u(3),y(i.item().showAddToCartButton?19:-1)}},dependencies:[De,Me,tt],styles:["[_nghost-%COMP%]{max-width:100%;position:relative;display:flex;flex-direction:column;gap:8px;padding:8px}.card-body[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:flex-start}.item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:var(--lc-media-radius)}.item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px;margin-right:20px}.item-name[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-footer[_ngcontent-%COMP%]{display:flex;gap:6px;align-items:center}.cta-button[_ngcontent-%COMP%]{padding:10px;border:none;width:100%;text-align:center}.shop-now-button[_ngcontent-%COMP%], .item-discount-percentage[_ngcontent-%COMP%]{display:none;background:rgb(var(--lc-primary-button-bg-color));color:rgb(var(--lc-primary-button-color));border-radius:var(--lc-button-radius);font-size:12px;width:fit-content;height:auto;text-align:center;z-index:4;padding:2px 8px;text-decoration:none}.item-detail-button[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;cursor:pointer}.item-detail-button[_ngcontent-%COMP%] cooee-icon[name=open][_ngcontent-%COMP%]{color:#000;width:20px;height:20px;transition-duration:.2s}.item-detail-button[_ngcontent-%COMP%] cooee-icon[name=open][_ngcontent-%COMP%]:hover{color:rgba(var(--lc-primary-color))}.view-cart-button[_ngcontent-%COMP%]{display:none}"]})};var qi=t=>({active:t}),Yi=(t,e)=>e.mID;function Ki(t,e){t&1&&T(0)}function Qi(t,e){t&1&&T(0)}function Xi(t,e){t&1&&T(0)}function Zi(t,e){if(t&1&&(m(0,"div",11)(1,"div",12),x(2,"Shop Now"),h(),$(3,Ki,1,0,"ng-container",10),h(),m(4,"div",13),$(5,Qi,1,0,"ng-container",10),m(6,"div",14),$(7,Xi,1,0,"ng-container",10),h()()),t&2){p(2);let n=P(4),i=P(6),r=P(8);u(3),g("ngTemplateOutlet",n),u(2),g("ngTemplateOutlet",i),u(2),g("ngTemplateOutlet",r)}}function Ji(t,e){t&1&&T(0)}function er(t,e){t&1&&T(0)}function tr(t,e){t&1&&T(0)}function nr(t,e){t&1&&T(0)}function ir(t,e){t&1&&T(0)}function rr(t,e){if(t&1&&(m(0,"div",15),I(1,"cooee-item-card",16),$(2,Ji,1,0,"ng-container",10),h(),m(3,"div",13)(4,"div",17),$(5,er,1,0,"ng-container",10)(6,tr,1,0,"ng-container",10)(7,nr,1,0,"ng-container",10)(8,ir,1,0,"ng-container",10),h()()),t&2){let n=p(2),i=P(4),r=P(6),o=P(10),s=P(12),l=P(14);u(),g("item",n.item()),u(),g("ngTemplateOutlet",i),u(3),g("ngTemplateOutlet",l),u(),g("ngTemplateOutlet",r),u(),g("ngTemplateOutlet",s),u(),g("ngTemplateOutlet",o)}}function or(t,e){t&1&&T(0)}function sr(t,e){if(t&1&&(m(0,"div",7),C(1,Zi,8,3)(2,rr,9,6),m(3,"div",9),$(4,or,1,0,"ng-container",10),h()()),t&2){let n=p(),i=P(16),r=n.template()===n.ItemDetailTemplate.CLASSIC;u(),y(r?1:2),u(3),g("ngTemplateOutlet",i)}}function ar(t,e){t&1&&T(0)}function lr(t,e){t&1&&T(0)}function cr(t,e){t&1&&T(0)}function ur(t,e){t&1&&T(0)}function dr(t,e){if(t&1&&(m(0,"div",8)(1,"div",18),$(2,ar,1,0,"ng-container",10),h(),m(3,"div",17),$(4,lr,1,0,"ng-container",10)(5,cr,1,0,"ng-container",10)(6,ur,1,0,"ng-container",10),h()()),t&2){p();let n=P(4),i=P(6),r=P(8),o=P(16);u(2),g("ngTemplateOutlet",i),u(2),g("ngTemplateOutlet",n),u(),g("ngTemplateOutlet",r),u(),g("ngTemplateOutlet",o)}}function pr(t,e){if(t&1){let n=B();m(0,"button",19),L("click",function(){R(n);let r=p();return F(r.close())}),I(1,"cooee-icon",20),h()}}function fr(t,e){if(t&1&&I(0,"img",22),t&2){let n=e.$implicit,i=p(2);g("src",n.url,ue)("alt",n.alt??i.item().name)}}function mr(t,e){if(t&1&&(m(0,"div",21),de(1,fr,1,2,"img",22,tn),h()),t&2){let n=p();u(),pe(n.item().imgs)}}function hr(t,e){if(t&1&&(I(0,"span",25),Y(1,"cooeeCurrency"),Y(2,"safeHtml")),t&2){p(2);let n=U(2);g("innerHTML",K(2,3,K(1,1,n.d)),ge)}}function _r(t,e){if(t&1&&(I(0,"span",26),Y(1,"cooeeCurrency"),Y(2,"safeHtml")),t&2){p(2);let n=U(2);g("innerHTML",K(2,3,K(1,1,n.cmp)),ge)}}function gr(t,e){if(t&1&&(m(0,"div",24),C(1,hr,3,5,"span",25),C(2,_r,3,5,"span",26),h()),t&2){p();let n=U(2);u(),y(n.d?1:-1),u(),y(n.cmp?2:-1)}}function vr(t,e){t&1&&T(0)}function Cr(t,e){t&1&&T(0)}function yr(t,e){t&1&&T(0)}function br(t,e){if(t&1&&(m(0,"div",23),x(1),h(),z(2),C(3,gr,3,2,"div",24),$(4,vr,1,0,"ng-container",10)(5,Cr,1,0,"ng-container",10)(6,yr,1,0,"ng-container",10)),t&2){let n=p(),i=P(10),r=P(12),o=P(14),s=U(0);u(),oe(n.item().name),u();let l=q(s.price);u(),y(l?3:-1),u(),g("ngTemplateOutlet",r),u(),g("ngTemplateOutlet",o),u(),g("ngTemplateOutlet",i)}}function Er(t,e){if(t&1&&(m(0,"div",27),x(1,"Description"),h(),I(2,"div",28),Y(3,"safeHtml")),t&2){let n=p(2);u(2),g("innerHTML",K(3,1,n.item().desc),ge)}}function Dr(t,e){if(t&1&&C(0,Er,4,3),t&2){let n=p();y(n.item().desc?0:-1)}}function wr(t,e){if(t&1){let n=B();m(0,"a",32),L("click",function(r){let o=R(n).$implicit,s=p(3);return F(s.changeItem(r,o))}),I(1,"img",22),h()}if(t&2){let n=e.$implicit,i=p(3);g("ngClass",Je(3,qi,n.mID===i.item().mID+"")),u(),g("src",n.firstImageURL,ue)("alt",i.item().name)}}function Ir(t,e){if(t&1&&(m(0,"span",29),x(1,"Select product"),h(),m(2,"div",30),de(3,wr,2,5,"a",31,Yi),h()),t&2){let n=p(2);u(3),pe(n.similarItems())}}function xr(t,e){if(t&1&&C(0,Ir,5,0),t&2){let n=p();y(n.similarItems().length>1?0:-1)}}function Vr(t,e){if(t&1&&(m(0,"span",33),x(1,"Select variant"),h(),I(2,"cooee-item-options-picker",16)),t&2){let n=p(2);u(2),g("item",n.item())}}function Sr(t,e){if(t&1&&C(0,Vr,3,1),t&2){let n=p();y(n.item().hasVariants()?0:-1)}}function Or(t,e){t&1&&(x(0," Add To Cart "),I(1,"cooee-icon",42))}function Mr(t,e){t&1&&(x(0," Out of stock "),I(1,"cooee-icon",43))}function Ar(t,e){if(t&1){let n=B();m(0,"button",41),L("click",function(){R(n);let r=p(2);return F(r.clickAddToCart())}),C(1,Or,2,0)(2,Mr,2,0),h()}if(t&2){p(2);let n=U(0);g("disabled",!n.isAvailable),u(),y(n.isAvailable?1:2)}}function Nr(t,e){if(t&1&&(m(0,"span",40),x(1),h()),t&2){let n=p(2);u(),oe(n.currentVideoCartItemsCount())}}function Tr(t,e){if(t&1){let n=B();m(0,"div",34),C(1,Ar,3,2,"button",35),m(2,"button",36),L("click",function(){R(n);let r=p();return F(r.goToPDP())}),x(3," More Info "),I(4,"cooee-icon",37),h(),m(5,"button",38),L("click",function(){R(n);let r=p();return F(r.openCart())}),I(6,"img",39),C(7,Nr,2,1,"span",40),h()()}if(t&2){let n=p();u(),y(n.item().showAddToCartButton?1:-1),u(6),y(n.currentVideoCartItemsCount()?7:-1)}}var li=class t{closeClick=new ke;layout=Ue("SINGLE_PANE");item=Ue.required();similarItems=N([]);template=N("CLASSIC");cartItems=ie([]);currentVideoCartItemsCount=se(()=>{let e=this.item(),n=this.cartItems();return!e||!n.length?0:n.filter(i=>i.mID===e.mID).reduce((i,r)=>i+r.quantity,0)});ItemDetailTemplate=qt;engagementService=S(X);destroyRef=S(he);lastLayout=null;resizeObserver=new we(()=>{wt()?(this.lastLayout===null&&(this.lastLayout=this.layout()),this.layout.set("SINGLE_PANE")):this.lastLayout!==null&&(this.layout.set(this.lastLayout),this.lastLayout=null)});ngOnInit(){this.subscribeToCartChanges()}ngOnDestroy(){this.resizeObserver.destroy()}close(){this.closeClick.emit()}clickAddToCart(){this.engagementService.executeCTA(Q.ADD_TO_CART,{item:this.item()}),this.close()}openCart(){this.engagementService.executeCTA(Q.OPEN_CART)}changeItem(e,n){e.stopPropagation(),e.preventDefault(),this.item.set(n)}goToPDP(){this.engagementService.executeCTA(Q.GO_TO_PRODUCT,{item:this.item()})}isSinglePane(){return this.layout()!=="TWO_PANE"||wt()}subscribeToCartChanges(){window.CooeeSDK.cartChange$.pipe(Qt({cart:window.CooeeSDK.cart.getCooeeCart()}),si(this.destroyRef)).subscribe(e=>{this.cartItems.set(e.cart?.items??[])})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=k({type:t,selectors:[["cooee-item-detail"]],hostAttrs:[1,"letscooee-widget"],inputs:{layout:[1,"layout"],item:[1,"item"],similarItems:[1,"similarItems"],template:[1,"template"]},outputs:{closeClick:"closeClick",layout:"layoutChange",item:"itemChange"},features:[Ce([X])],decls:17,vars:2,consts:[["closeButtonTemplate",""],["imageStripTemplate",""],["bodyTemplate",""],["descriptionTemplate",""],["productSelectorTemplate",""],["variantSelectorTemplate",""],["footerButtonsTemplate",""],[1,"lc-card-wrapper","card-wrapper","single-pane"],[1,"card-wrapper","two-pane"],[1,"lc-card-footer","card-footer"],[4,"ngTemplateOutlet"],[1,"lc-card-header","card-header"],[1,"lc-header","header"],[1,"card-content"],[1,"lc-inner-body","inner-body"],[1,"card-header"],[3,"item"],[1,"inner-body"],[1,"images-container"],["type","button","aria-label","Close product details",1,"lc-close-button","close-button",3,"click"],["name","close","aria-hidden","true"],[1,"image-strip"],[3,"src","alt"],[1,"lc-item-name","item-name"],[1,"lc-prices","prices"],[1,"lc-item-price","item-price",3,"innerHTML"],[1,"lc-item-cmp-price","item-cmp-price",3,"innerHTML"],[1,"lc-description-title","description-title"],[1,"lc-description","description",3,"innerHTML"],[1,"lc-selected-product-title","selected-product-title"],[1,"lc-image-strip","image-strip"],["href","#",1,"product-selector",3,"ngClass"],["href","#",1,"product-selector",3,"click","ngClass"],[1,"selected-variant-title"],[1,"footer-buttons"],["type","button",1,"lc-cta-button","cta-button",3,"disabled"],["type","button",1,"lc-more-info-button","more-info-button",3,"click"],["name","info","aria-hidden","true",1,"more-info-icon"],["type","button","aria-label","View cart","title","View Cart",1,"view-cart-button",3,"click"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"],["aria-live","polite","aria-atomic","true",1,"cart-icon-badge"],["type","button",1,"lc-cta-button","cta-button",3,"click","disabled"],["name","add","aria-hidden","true",1,"add-to-cart-icon"],["name","unavailable","aria-hidden","true"]],template:function(n,i){n&1&&(z(0),C(1,sr,5,2,"div",7)(2,dr,7,4,"div",8),$(3,pr,2,0,"ng-template",null,0,fe)(5,mr,3,0,"ng-template",null,1,fe)(7,br,7,6,"ng-template",null,2,fe)(9,Dr,1,1,"ng-template",null,3,fe)(11,xr,1,1,"ng-template",null,4,fe)(13,Sr,1,1,"ng-template",null,5,fe)(15,Tr,8,2,"ng-template",null,6,fe)),n&2&&(q(i.item().selectedOrFirstVariant.value),u(),y(i.isSinglePane()?1:2))},dependencies:[hn,ot,De,gn,Ae,tt,Me],styles:["[_nghost-%COMP%]{display:block;background:#fff}.card-wrapper[_ngcontent-%COMP%]{position:relative}.card-wrapper.single-pane[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:auto}.card-wrapper.two-pane[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr}.card-header[_ngcontent-%COMP%]{display:var(--header-display, flex);flex-direction:row;justify-content:space-between;align-items:start;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.header[_ngcontent-%COMP%]{font-size:24px;font-weight:var(--lc-subheading-weight);color:rgba(var(--lc-subheading-color))}.close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.close-button[_ngcontent-%COMP%] cooee-icon[_ngcontent-%COMP%]{color:#000000b3}.two-pane[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{position:absolute;top:8px;right:4px}.card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overscroll-behavior:contain} cooee-item-card .item-info{margin-right:0!important} cooee-item-card .item-detail-button{display:none!important} cooee-item-card .card-footer{display:none!important}.inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.images-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:start}.image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:8px;flex-wrap:nowrap}.image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.two-pane[_ngcontent-%COMP%] .image-strip[_ngcontent-%COMP%]{padding:16px}.product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;border-radius:var(--lc-media-radius);padding:2px}.product-selector.active[_ngcontent-%COMP%]{border:1px solid rgba(var(--lc-primary-color))}.product-selector[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:100%;border-radius:var(--lc-media-radius)}.description-title[_ngcontent-%COMP%], .selected-product-title[_ngcontent-%COMP%], .selected-variant-title[_ngcontent-%COMP%]{font-size:var(--lc-subheading-size);font-weight:var(--lc-subheading-weight);color:rgba(var(--lc-subheading-color));margin-top:8px;line-height:normal}.description[_ngcontent-%COMP%]{line-height:normal;color:#000;font-size:var(--lc-description-size);font-weight:var(--lc-description-weight)}.card-footer[_ngcontent-%COMP%]{padding:var(--lc-item-detail-footer-padding);background-color:rgba(var(--lc-item-detail-footer-bg-color));box-shadow:var(--lc-item-detail-footer-box-shadow)}.footer-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px}.two-pane[_ngcontent-%COMP%] .footer-buttons[_ngcontent-%COMP%]{margin-top:16px}.cta-button[_ngcontent-%COMP%], .more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;display:flex;justify-content:center;align-items:center}.more-info-button[_ngcontent-%COMP%]{background-color:rgba(var(--lc-secondary-button-bg-color));color:rgba(var(--lc-secondary-button-color));font-weight:var(--lc-secondary-button-weight);text-transform:var(--lc-secondary-button-transform);border-radius:var(--lc-button-radius);font-size:var(--lc-button-size);font-family:var(--lc-button-family),serif;height:var(--lc-button-height);letter-spacing:var(--lc-button-letter-spacing);transition:filter .12s ease,background-color .2s ease,color .2s ease;border-width:1px;border-style:solid;border-color:rgba(var(--lc-secondary-button-border-color));display:flex;align-items:center;justify-content:center;gap:8px}.more-info-button[_ngcontent-%COMP%] cooee-icon[_ngcontent-%COMP%]{display:var(--lc-button-icon-display);width:var(--lc-button-icon-size, 20px)!important;height:var(--lc-button-icon-size, 20px)!important;color:inherit}.more-info-button[_ngcontent-%COMP%]:hover{filter:brightness(.95)}.more-info-button[_ngcontent-%COMP%]:active{filter:brightness(.9)}.more-info-button[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgba(var(--lc-primary-color, 0, 0, 0));outline-offset:2px}.view-cart-button[_ngcontent-%COMP%]{position:relative}.view-cart-button[_ngcontent-%COMP%] .cart-icon-badge[_ngcontent-%COMP%]{position:absolute;top:-6px;right:-6px;background-color:rgba(var(--lc-primary-color));color:#fff;border-radius:50%;width:18px;height:18px;font-size:12px;display:flex;align-items:center;justify-content:center}"]})};var Pr=[[["swiper-slides"]]],Rr=["swiper-slides"],Fr=(t,e)=>({"--swiper-navigation-size":t,color:e}),kr=t=>({color:t,bottom:0,top:"unset",position:"relative"});function Lr(t,e){if(t&1&&(J(0,"div",2),Ke(1,"span"),re(),J(2,"div",3),Ke(3,"span"),re()),t&2){let n,i,r=p(),o=((n=r.navigationConfig())==null?null:n.size)??50,s=((i=r.navigationConfig())==null||i.color==null?null:i.color.rgba)??"white",l=fn(4,Fr,o+"px",s);Qe(l),u(2),Qe(l)}}function Ur(t,e){if(t&1&&(J(0,"div",4),Ke(1,"span"),re()),t&2){let n,i=((n=p().paginationConfig())==null||n.color==null?null:n.color.rgba)??"white",r=Je(2,kr,i);Qe(r)}}var ci=class t{options=N.required();navigationConfig=N();paginationConfig=N();slideChange=ee();elementRef=S(_e);swiperInstance;initToken=0;resizeDebouncer=new we(this.onResize.bind(this));constructor(){ae(()=>{this.options()&&this.reInitSwiper()})}get swiper(){return this.swiperInstance}ngOnDestroy(){this.resizeDebouncer?.destroy(),this.swiperInstance?.destroy?.(),this.swiperInstance=void 0}async initSwiper(e=this.initToken){if(await nt(),e!==this.initToken){j.warn("Swiper token not matching");return}let n=this.elementRef.nativeElement,i={nextEl:n.querySelector(".swiper-button-next"),prevEl:n.querySelector(".swiper-button-prev"),enabled:this.navigationConfig()?.enabled},r=this.paginationConfig(),o={el:n.querySelector(".swiper-pagination"),enabled:this.paginationConfig()?.enabled,type:this.paginationConfig()?.type,clickable:!0,renderBullet:function(s,l){return`
3
3
  <span class="${l}"
4
4
  style="background-color: ${r?.color?.rgba};"></span>