@letscooee/web-sdk 9.12.15 → 9.12.16
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.
- package/dist/main.min.js +13 -13
- package/dist/widget.min.js +1 -1
- package/package.json +1 -1
package/dist/widget.min.js
CHANGED
|
@@ -7,7 +7,7 @@ import{$ as ji,$a as $l,A as Nl,Aa as Ee,B as Et,Ba as Ps,C as zn,Ca as Ke,D as
|
|
|
7
7
|
|
|
8
8
|
`+y.message+`
|
|
9
9
|
`+Array(y.message.length+1).join("=")+`
|
|
10
|
-
`+N(A,P)):y}}function mt(A,x){var F;return x.cache&&x.name&&x.storage.templates.get(x.name)?x.storage.templates.get(x.name):(F=typeof A=="function"?A:ze(A,x),x.cache&&x.name&&x.storage.templates.define(x.name,F),F)}Le.l.bind(Le),t.compile=ze,t.compileScope=se,t.compileScopeIntoFunction=K,t.compileToString=N,t.defaultConfig=Le,t.filters=De,t.getConfig=Ge,t.helpers=ye,t.nativeHelpers=ke,t.parse=C,t.render=function(A,x,F,P){var v=Ge(F||{});if(!v.async)return mt(A,v)(x,v);if(!P){if(typeof r=="function")return new r(function(y,H){try{y(mt(A,v)(x,v))}catch(J){H(J)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{mt(A,v)(x,v,P)}catch(y){return P(y)}},t.templates=te,Object.defineProperty(t,"__esModule",{value:!0})})});var rf=xs((nf,sc)=>{"use strict";(function(t){if(typeof nf=="object"&&typeof sc<"u")sc.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function a(g,p){if(!o[g]){if(!i[g]){var E=typeof Jr=="function"&&Jr;if(!p&&E)return E(g,!0);if(u)return u(g,!0);var C=new Error("Cannot find module '"+g+"'");throw C.code="MODULE_NOT_FOUND",C}var N=o[g]={exports:{}};i[g][0].call(N.exports,function(M){var L=i[g][1][M];return a(L||M)},N,N.exports,r,i,o,s)}return o[g].exports}for(var u=typeof Jr=="function"&&Jr,d=0;d<s.length;d++)a(s[d]);return a}({1:[function(r,i,o){(function(s){"use strict";var a=s.MutationObserver||s.WebKitMutationObserver,u;if(a){var d=0,g=new a(M),p=s.document.createTextNode("");g.observe(p,{characterData:!0}),u=function(){p.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=M,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var j=s.document.createElement("script");j.onreadystatechange=function(){M(),j.onreadystatechange=null,j.parentNode.removeChild(j),j=null},s.document.documentElement.appendChild(j)}:u=function(){setTimeout(M,0)};var C,N=[];function M(){C=!0;for(var j,K,se=N.length;se;){for(K=N,N=[],j=-1;++j<se;)K[j]();se=N.length}C=!1}i.exports=L;function L(j){N.push(j)===1&&!C&&u()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function a(){}var u={},d=["REJECTED"],g=["FULFILLED"],p=["PENDING"];i.exports=E;function E(U){if(typeof U!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,U!==a&&L(this,U)}E.prototype.catch=function(U){return this.then(null,U)},E.prototype.then=function(U,he){if(typeof U!="function"&&this.state===g||typeof he!="function"&&this.state===d)return this;var te=new this.constructor(a);if(this.state!==p){var ye=this.state===g?U:he;N(te,ye,this.outcome)}else this.queue.push(new C(te,U,he));return te};function C(U,he,te){this.promise=U,typeof he=="function"&&(this.onFulfilled=he,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}C.prototype.callFulfilled=function(U){u.resolve(this.promise,U)},C.prototype.otherCallFulfilled=function(U){N(this.promise,this.onFulfilled,U)},C.prototype.callRejected=function(U){u.reject(this.promise,U)},C.prototype.otherCallRejected=function(U){N(this.promise,this.onRejected,U)};function N(U,he,te){s(function(){var ye;try{ye=he(te)}catch(ke){return u.reject(U,ke)}ye===U?u.reject(U,new TypeError("Cannot resolve promise with itself")):u.resolve(U,ye)})}u.resolve=function(U,he){var te=j(M,he);if(te.status==="error")return u.reject(U,te.value);var ye=te.value;if(ye)L(U,ye);else{U.state=g,U.outcome=he;for(var ke=-1,De=U.queue.length;++ke<De;)U.queue[ke].callFulfilled(he)}return U},u.reject=function(U,he){U.state=d,U.outcome=he;for(var te=-1,ye=U.queue.length;++te<ye;)U.queue[te].callRejected(he);return U};function M(U){var he=U&&U.then;if(U&&(typeof U=="object"||typeof U=="function")&&typeof he=="function")return function(){he.apply(U,arguments)}}function L(U,he){var te=!1;function ye(Ge){te||(te=!0,u.reject(U,Ge))}function ke(Ge){te||(te=!0,u.resolve(U,Ge))}function De(){he(ke,ye)}var Le=j(De);Le.status==="error"&&ye(Le.value)}function j(U,he){var te={};try{te.value=U(he),te.status="success"}catch(ye){te.status="error",te.value=ye}return te}E.resolve=K;function K(U){return U instanceof this?U:u.resolve(new this(a),U)}E.reject=se;function se(U){var he=new this(a);return u.reject(he,U)}E.all=X;function X(U){var he=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=U.length,ye=!1;if(!te)return this.resolve([]);for(var ke=new Array(te),De=0,Le=-1,Ge=new this(a);++Le<te;)ze(U[Le],Le);return Ge;function ze(mt,A){he.resolve(mt).then(x,function(F){ye||(ye=!0,u.reject(Ge,F))});function x(F){ke[A]=F,++De===te&&!ye&&(ye=!0,u.resolve(Ge,ke))}}}E.race=be;function be(U){var he=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=U.length,ye=!1;if(!te)return this.resolve([]);for(var ke=-1,De=new this(a);++ke<te;)Le(U[ke]);return De;function Le(Ge){he.resolve(Ge).then(function(ze){ye||(ye=!0,u.resolve(De,ze))},function(ze){ye||(ye=!0,u.reject(De,ze))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function a(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")}function u(){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=u();function g(){try{if(!d||!d.open)return!1;var f=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||b)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function p(f,b){f=f||[],b=b||{};try{return new Blob(f,b)}catch(w){if(w.name!=="TypeError")throw w;for(var m=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,S=new m,T=0;T<f.length;T+=1)S.append(f[T]);return S.getBlob(b.type)}}typeof Promise>"u"&&r(3);var E=Promise;function C(f,b){b&&f.then(function(m){b(null,m)},function(m){b(m)})}function N(f,b,m){typeof b=="function"&&f.then(b),typeof m=="function"&&f.catch(m)}function M(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function L(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var j="local-forage-detect-blob-support",K=void 0,se={},X=Object.prototype.toString,be="readonly",U="readwrite";function he(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),T=0;T<b;T++)S[T]=f.charCodeAt(T);return m}function te(f){return new E(function(b){var m=f.transaction(j,U),S=p([""]);m.objectStore(j).put(S,"key"),m.onabort=function(T){T.preventDefault(),T.stopPropagation(),b(!1)},m.oncomplete=function(){var T=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);b(w||!T||parseInt(T[1],10)>=43)}}).catch(function(){return!1})}function ye(f){return typeof K=="boolean"?E.resolve(K):te(f).then(function(b){return K=b,K})}function ke(f){var b=se[f.name],m={};m.promise=new E(function(S,T){m.resolve=S,m.reject=T}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function De(f){var b=se[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Le(f,b){var m=se[f.name],S=m.deferredOperations.pop();if(S)return S.reject(b),S.promise}function Ge(f,b){return new E(function(m,S){if(se[f.name]=se[f.name]||J(),f.db)if(b)ke(f),f.db.close();else return m(f.db);var T=[f.name];b&&T.push(f.version);var w=d.open.apply(d,T);b&&(w.onupgradeneeded=function(R){var B=w.result;try{B.createObjectStore(f.storeName),R.oldVersion<=1&&B.createObjectStore(j)}catch($){if($.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+R.oldVersion+" to version "+R.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw $}}),w.onerror=function(R){R.preventDefault(),S(w.error)},w.onsuccess=function(){var R=w.result;R.onversionchange=function(B){B.target.close()},m(R),De(f)}})}function ze(f){return Ge(f,!1)}function mt(f){return Ge(f,!0)}function A(f,b){if(!f.db)return!0;var m=!f.db.objectStoreNames.contains(f.storeName),S=f.version<f.db.version,T=f.version>f.db.version;if(S&&(f.version!==b&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),T||m){if(m){var w=f.db.version+1;w>f.version&&(f.version=w)}return!0}return!1}function x(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(T){var w=btoa(T.target.result||"");b({__local_forage_encoded_blob:!0,data:w,type:f.type})},S.readAsBinaryString(f)})}function F(f){var b=he(atob(f.data));return p([b],{type:f.type})}function P(f){return f&&f.__local_forage_encoded_blob}function v(f){var b=this,m=b._initReady().then(function(){var S=se[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return N(m,f,f),m}function y(f){ke(f);for(var b=se[f.name],m=b.forages,S=0;S<m.length;S++){var T=m[S];T._dbInfo.db&&(T._dbInfo.db.close(),T._dbInfo.db=null)}return f.db=null,ze(f).then(function(w){return f.db=w,A(f)?mt(f):w}).then(function(w){f.db=b.db=w;for(var R=0;R<m.length;R++)m[R]._dbInfo.db=w}).catch(function(w){throw Le(f,w),w})}function H(f,b,m,S){S===void 0&&(S=1);try{var T=f.db.transaction(f.storeName,b);m(null,T)}catch(w){if(S>0&&(!f.db||w.name==="InvalidStateError"||w.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||w.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),mt(f)}).then(function(){return y(f).then(function(){H(f,b,m,S-1)})}).catch(m);m(w)}}function J(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function re(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=f[S];var T=se[m.name];T||(T=J(),se[m.name]=T),T.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=v);var w=[];function R(){return E.resolve()}for(var B=0;B<T.forages.length;B++){var $=T.forages[B];$!==b&&w.push($._initReady().catch(R))}var G=T.forages.slice(0);return E.all(w).then(function(){return m.db=T.db,ze(m)}).then(function(Y){return m.db=Y,A(m,b._defaultConfig.version)?mt(m):Y}).then(function(Y){m.db=T.db=Y,b._dbInfo=m;for(var ie=0;ie<G.length;ie++){var xe=G[ie];xe!==b&&(xe._dbInfo.db=m.db,xe._dbInfo.version=m.version)}})}function oe(f,b){var m=this;f=M(f);var S=new E(function(T,w){m.ready().then(function(){H(m._dbInfo,be,function(R,B){if(R)return w(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.get(f);G.onsuccess=function(){var Y=G.result;Y===void 0&&(Y=null),P(Y)&&(Y=F(Y)),T(Y)},G.onerror=function(){w(G.error)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ue(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){H(m._dbInfo,be,function(R,B){if(R)return w(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.openCursor(),Y=1;G.onsuccess=function(){var ie=G.result;if(ie){var xe=ie.value;P(xe)&&(xe=F(xe));var Ue=f(xe,ie.key,Y++);Ue!==void 0?T(Ue):ie.continue()}else T()},G.onerror=function(){w(G.error)}}catch(ie){w(ie)}})}).catch(w)});return C(S,b),S}function Q(f,b,m){var S=this;f=M(f);var T=new E(function(w,R){var B;S.ready().then(function(){return B=S._dbInfo,X.call(b)==="[object Blob]"?ye(B.db).then(function($){return $?b:x(b)}):b}).then(function($){H(S._dbInfo,U,function(G,Y){if(G)return R(G);try{var ie=Y.objectStore(S._dbInfo.storeName);$===null&&($=void 0);var xe=ie.put($,f);Y.oncomplete=function(){$===void 0&&($=null),w($)},Y.onabort=Y.onerror=function(){var Ue=xe.error?xe.error:xe.transaction.error;R(Ue)}}catch(Ue){R(Ue)}})}).catch(R)});return C(T,m),T}function ae(f,b){var m=this;f=M(f);var S=new E(function(T,w){m.ready().then(function(){H(m._dbInfo,U,function(R,B){if(R)return w(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.delete(f);B.oncomplete=function(){T()},B.onerror=function(){w(G.error)},B.onabort=function(){var Y=G.error?G.error:G.transaction.error;w(Y)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ee(f){var b=this,m=new E(function(S,T){b.ready().then(function(){H(b._dbInfo,U,function(w,R){if(w)return T(w);try{var B=R.objectStore(b._dbInfo.storeName),$=B.clear();R.oncomplete=function(){S()},R.onabort=R.onerror=function(){var G=$.error?$.error:$.transaction.error;T(G)}}catch(G){T(G)}})}).catch(T)});return C(m,f),m}function pe(f){var b=this,m=new E(function(S,T){b.ready().then(function(){H(b._dbInfo,be,function(w,R){if(w)return T(w);try{var B=R.objectStore(b._dbInfo.storeName),$=B.count();$.onsuccess=function(){S($.result)},$.onerror=function(){T($.error)}}catch(G){T(G)}})}).catch(T)});return C(m,f),m}function ce(f,b){var m=this,S=new E(function(T,w){if(f<0){T(null);return}m.ready().then(function(){H(m._dbInfo,be,function(R,B){if(R)return w(R);try{var $=B.objectStore(m._dbInfo.storeName),G=!1,Y=$.openKeyCursor();Y.onsuccess=function(){var ie=Y.result;if(!ie){T(null);return}f===0||G?T(ie.key):(G=!0,ie.advance(f))},Y.onerror=function(){w(Y.error)}}catch(ie){w(ie)}})}).catch(w)});return C(S,b),S}function me(f){var b=this,m=new E(function(S,T){b.ready().then(function(){H(b._dbInfo,be,function(w,R){if(w)return T(w);try{var B=R.objectStore(b._dbInfo.storeName),$=B.openKeyCursor(),G=[];$.onsuccess=function(){var Y=$.result;if(!Y){S(G);return}G.push(Y.key),Y.continue()},$.onerror=function(){T($.error)}}catch(Y){T(Y)}})}).catch(T)});return C(m,f),m}function ge(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,T;if(!f.name)T=E.reject("Invalid arguments");else{var w=f.name===m.name&&S._dbInfo.db,R=w?E.resolve(S._dbInfo.db):ze(f).then(function(B){var $=se[f.name],G=$.forages;$.db=B;for(var Y=0;Y<G.length;Y++)G[Y]._dbInfo.db=B;return B});f.storeName?T=R.then(function(B){if(B.objectStoreNames.contains(f.storeName)){var $=B.version+1;ke(f);var G=se[f.name],Y=G.forages;B.close();for(var ie=0;ie<Y.length;ie++){var xe=Y[ie];xe._dbInfo.db=null,xe._dbInfo.version=$}var Ue=new E(function(He,st){var tt=d.open(f.name,$);tt.onerror=function(Yt){var Zr=tt.result;Zr.close(),st(Yt)},tt.onupgradeneeded=function(){var Yt=tt.result;Yt.deleteObjectStore(f.storeName)},tt.onsuccess=function(){var Yt=tt.result;Yt.close(),He(Yt)}});return Ue.then(function(He){G.db=He;for(var st=0;st<Y.length;st++){var tt=Y[st];tt._dbInfo.db=He,De(tt._dbInfo)}}).catch(function(He){throw(Le(f,He)||E.resolve()).catch(function(){}),He})}}):T=R.then(function(B){ke(f);var $=se[f.name],G=$.forages;B.close();for(var Y=0;Y<G.length;Y++){var ie=G[Y];ie._dbInfo.db=null}var xe=new E(function(Ue,He){var st=d.deleteDatabase(f.name);st.onerror=function(){var tt=st.result;tt&&tt.close(),He(st.error)},st.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},st.onsuccess=function(){var tt=st.result;tt&&tt.close(),Ue(tt)}});return xe.then(function(Ue){$.db=Ue;for(var He=0;He<G.length;He++){var st=G[He];De(st._dbInfo)}}).catch(function(Ue){throw(Le(f,Ue)||E.resolve()).catch(function(){}),Ue})})}return C(T,b),T}var _e={_driver:"asyncStorage",_initStorage:re,_support:g(),iterate:ue,getItem:oe,setItem:Q,removeItem:ae,clear:ee,length:pe,key:ce,keys:me,dropInstance:ge};function h(){return typeof openDatabase=="function"}var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",_=/^~~local_forage_type~([^~]+)~/,I="__lfsc__:",D=I.length,k="arbf",ve="blob",Te="si08",Ce="ui08",Ve="uic8",Be="si16",qe="si32",kt="ur16",Wt="ui32",Cn="fl32",St="fl64",Vt=D+k.length,Fi=Object.prototype.toString;function ul(f){var b=f.length*.75,m=f.length,S,T=0,w,R,B,$;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var G=new ArrayBuffer(b),Y=new Uint8Array(G);for(S=0;S<m;S+=4)w=c.indexOf(f[S]),R=c.indexOf(f[S+1]),B=c.indexOf(f[S+2]),$=c.indexOf(f[S+3]),Y[T++]=w<<2|R>>4,Y[T++]=(R&15)<<4|B>>2,Y[T++]=(B&3)<<6|$&63;return G}function bs(f){var b=new Uint8Array(f),m="",S;for(S=0;S<b.length;S+=3)m+=c[b[S]>>2],m+=c[(b[S]&3)<<4|b[S+1]>>4],m+=c[(b[S+1]&15)<<2|b[S+2]>>6],m+=c[b[S+2]&63];return b.length%3===2?m=m.substring(0,m.length-1)+"=":b.length%3===1&&(m=m.substring(0,m.length-2)+"=="),m}function Xp(f,b){var m="";if(f&&(m=Fi.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Fi.call(f.buffer)==="[object ArrayBuffer]")){var S,T=I;f instanceof ArrayBuffer?(S=f,T+=k):(S=f.buffer,m==="[object Int8Array]"?T+=Te:m==="[object Uint8Array]"?T+=Ce:m==="[object Uint8ClampedArray]"?T+=Ve:m==="[object Int16Array]"?T+=Be:m==="[object Uint16Array]"?T+=kt:m==="[object Int32Array]"?T+=qe:m==="[object Uint32Array]"?T+=Wt:m==="[object Float32Array]"?T+=Cn:m==="[object Float64Array]"?T+=St:b(new Error("Failed to get type for BinaryArray"))),b(T+bs(S))}else if(m==="[object Blob]"){var w=new FileReader;w.onload=function(){var R=l+f.type+"~"+bs(this.result);b(I+ve+R)},w.readAsArrayBuffer(f)}else try{b(JSON.stringify(f))}catch(R){console.error("Couldn't convert value into a JSON string: ",f),b(null,R)}}function qp(f){if(f.substring(0,D)!==I)return JSON.parse(f);var b=f.substring(Vt),m=f.substring(D,Vt),S;if(m===ve&&_.test(b)){var T=b.match(_);S=T[1],b=b.substring(T[0].length)}var w=ul(b);switch(m){case k:return w;case ve:return p([w],{type:S});case Te:return new Int8Array(w);case Ce:return new Uint8Array(w);case Ve:return new Uint8ClampedArray(w);case Be:return new Int16Array(w);case kt:return new Uint16Array(w);case qe:return new Int32Array(w);case Wt:return new Uint32Array(w);case Cn:return new Float32Array(w);case St:return new Float64Array(w);default:throw new Error("Unkown type: "+m)}}var Cs={serialize:Xp,deserialize:qp,stringToBuffer:ul,bufferToString:bs};function dl(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function Zp(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=typeof f[S]!="string"?f[S].toString():f[S];var T=new E(function(w,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(B){return R(B)}m.db.transaction(function(B){dl(B,m,function(){b._dbInfo=m,w()},function($,G){R(G)})},R)});return m.serializer=Cs,T}function Vn(f,b,m,S,T,w){f.executeSql(m,S,T,function(R,B){B.code===B.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function($,G){G.rows.length?w($,B):dl($,b,function(){$.executeSql(m,S,T,w)},w)},w):w(R,B)},w)}function Jp(f,b){var m=this;f=M(f);var S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Vn(B,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function($,G){var Y=G.rows.length?G.rows.item(0).value:null;Y&&(Y=R.serializer.deserialize(Y)),T(Y)},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function Qp(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Vn(B,R,"SELECT * FROM "+R.storeName,[],function($,G){for(var Y=G.rows,ie=Y.length,xe=0;xe<ie;xe++){var Ue=Y.item(xe),He=Ue.value;if(He&&(He=R.serializer.deserialize(He)),He=f(He,Ue.key,xe+1),He!==void 0){T(He);return}}T()},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function fl(f,b,m,S){var T=this;f=M(f);var w=new E(function(R,B){T.ready().then(function(){b===void 0&&(b=null);var $=b,G=T._dbInfo;G.serializer.serialize(b,function(Y,ie){ie?B(ie):G.db.transaction(function(xe){Vn(xe,G,"INSERT OR REPLACE INTO "+G.storeName+" (key, value) VALUES (?, ?)",[f,Y],function(){R($)},function(Ue,He){B(He)})},function(xe){if(xe.code===xe.QUOTA_ERR){if(S>0){R(fl.apply(T,[f,$,m,S-1]));return}B(xe)}})})}).catch(B)});return C(w,m),w}function eh(f,b,m){return fl.apply(this,[f,b,m,1])}function th(f,b){var m=this;f=M(f);var S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Vn(B,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){T()},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function nh(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"DELETE FROM "+w.storeName,[],function(){S()},function(B,$){T($)})})}).catch(T)});return C(m,f),m}function rh(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(B,$){var G=$.rows.item(0).c;S(G)},function(B,$){T($)})})}).catch(T)});return C(m,f),m}function ih(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Vn(B,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function($,G){var Y=G.rows.length?G.rows.item(0).key:null;T(Y)},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function oh(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"SELECT key FROM "+w.storeName,[],function(B,$){for(var G=[],Y=0;Y<$.rows.length;Y++)G.push($.rows.item(Y).key);S(G)},function(B,$){T($)})})}).catch(T)});return C(m,f),m}function sh(f){return new E(function(b,m){f.transaction(function(S){S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(T,w){for(var R=[],B=0;B<w.rows.length;B++)R.push(w.rows.item(B).name);b({db:f,storeNames:R})},function(T,w){m(w)})},function(S){m(S)})})}function ah(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,T;return f.name?T=new E(function(w){var R;f.name===m.name?R=S._dbInfo.db:R=openDatabase(f.name,"","",0),f.storeName?w({db:R,storeNames:[f.storeName]}):w(sh(R))}).then(function(w){return new E(function(R,B){w.db.transaction(function($){function G(Ue){return new E(function(He,st){$.executeSql("DROP TABLE IF EXISTS "+Ue,[],function(){He()},function(tt,Yt){st(Yt)})})}for(var Y=[],ie=0,xe=w.storeNames.length;ie<xe;ie++)Y.push(G(w.storeNames[ie]));E.all(Y).then(function(){R()}).catch(function(Ue){B(Ue)})},function($){B($)})})}):T=E.reject("Invalid arguments"),C(T,b),T}var ch={_driver:"webSQLStorage",_initStorage:Zp,_support:h(),iterate:Qp,getItem:Jp,setItem:eh,removeItem:th,clear:nh,length:rh,key:ih,keys:oh,dropInstance:ah};function lh(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function pl(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function uh(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function dh(){return!uh()||localStorage.length>0}function fh(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=pl(f,b._defaultConfig),dh()?(b._dbInfo=m,m.serializer=Cs,E.resolve()):E.reject()}function ph(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,T=localStorage.length-1;T>=0;T--){var w=localStorage.key(T);w.indexOf(S)===0&&localStorage.removeItem(w)}});return C(m,f),m}function hh(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var T=m._dbInfo,w=localStorage.getItem(T.keyPrefix+f);return w&&(w=T.serializer.deserialize(w)),w});return C(S,b),S}function mh(f,b){var m=this,S=m.ready().then(function(){for(var T=m._dbInfo,w=T.keyPrefix,R=w.length,B=localStorage.length,$=1,G=0;G<B;G++){var Y=localStorage.key(G);if(Y.indexOf(w)===0){var ie=localStorage.getItem(Y);if(ie&&(ie=T.serializer.deserialize(ie)),ie=f(ie,Y.substring(R),$++),ie!==void 0)return ie}}});return C(S,b),S}function gh(f,b){var m=this,S=m.ready().then(function(){var T=m._dbInfo,w;try{w=localStorage.key(f)}catch{w=null}return w&&(w=w.substring(T.keyPrefix.length)),w});return C(S,b),S}function _h(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,T=localStorage.length,w=[],R=0;R<T;R++){var B=localStorage.key(R);B.indexOf(S.keyPrefix)===0&&w.push(B.substring(S.keyPrefix.length))}return w});return C(m,f),m}function vh(f){var b=this,m=b.keys().then(function(S){return S.length});return C(m,f),m}function yh(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var T=m._dbInfo;localStorage.removeItem(T.keyPrefix+f)});return C(S,b),S}function Eh(f,b,m){var S=this;f=M(f);var T=S.ready().then(function(){b===void 0&&(b=null);var w=b;return new E(function(R,B){var $=S._dbInfo;$.serializer.serialize(b,function(G,Y){if(Y)B(Y);else try{localStorage.setItem($.keyPrefix+f,G),R(w)}catch(ie){(ie.name==="QuotaExceededError"||ie.name==="NS_ERROR_DOM_QUOTA_REACHED")&&B(ie),B(ie)}})})});return C(T,m),T}function bh(f,b){if(b=L.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var m=this.config();f.name=f.name||m.name,f.storeName=f.storeName||m.storeName}var S=this,T;return f.name?T=new E(function(w){f.storeName?w(pl(f,S._defaultConfig)):w(f.name+"/")}).then(function(w){for(var R=localStorage.length-1;R>=0;R--){var B=localStorage.key(R);B.indexOf(w)===0&&localStorage.removeItem(B)}}):T=E.reject("Invalid arguments"),C(T,b),T}var Ch={_driver:"localStorageWrapper",_initStorage:fh,_support:lh(),iterate:mh,getItem:hh,setItem:Eh,removeItem:yh,clear:ph,length:vh,key:gh,keys:_h,dropInstance:bh},wh=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},Sh=function(b,m){for(var S=b.length,T=0;T<S;){if(wh(b[T],m))return!0;T++}return!1},hl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},qr={},ml={},fr={INDEXEDDB:_e,WEBSQL:ch,LOCALSTORAGE:Ch},Ih=[fr.INDEXEDDB._driver,fr.WEBSQL._driver,fr.LOCALSTORAGE._driver],ki=["dropInstance"],ws=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ki),Th={description:"",driver:Ih.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function xh(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function Ss(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(hl(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var Oh=function(){function f(b){a(this,f);for(var m in fr)if(fr.hasOwnProperty(m)){var S=fr[m],T=S._driver;this[m]=T,qr[T]||this.defineDriver(S)}this._defaultConfig=Ss({},Th),this._config=Ss({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(m){if((typeof m>"u"?"undefined":s(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in m){if(S==="storeName"&&(m[S]=m[S].replace(/\W/g,"_")),S==="version"&&typeof m[S]!="number")return new Error("Database version must be a number.");this._config[S]=m[S]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},f.prototype.defineDriver=function(m,S,T){var w=new E(function(R,B){try{var $=m._driver,G=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){B(G);return}for(var Y=ws.concat("_initStorage"),ie=0,xe=Y.length;ie<xe;ie++){var Ue=Y[ie],He=!Sh(ki,Ue);if((He||m[Ue])&&typeof m[Ue]!="function"){B(G);return}}var st=function(){for(var Zr=function(Nh){return function(){var Rh=new Error("Method "+Nh+" is not implemented by the current driver"),gl=E.reject(Rh);return C(gl,arguments[arguments.length-1]),gl}},Is=0,Dh=ki.length;Is<Dh;Is++){var Ts=ki[Is];m[Ts]||(m[Ts]=Zr(Ts))}};st();var tt=function(Zr){qr[$]&&console.info("Redefining LocalForage driver: "+$),qr[$]=m,ml[$]=Zr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(tt,B):tt(!!m._support):tt(!0)}catch(Yt){B(Yt)}});return N(w,S,T),w},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,T){var w=qr[m]?E.resolve(qr[m]):E.reject(new Error("Driver not found."));return N(w,S,T),w},f.prototype.getSerializer=function(m){var S=E.resolve(Cs);return N(S,m),S},f.prototype.ready=function(m){var S=this,T=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return N(T,m,m),T},f.prototype.setDriver=function(m,S,T){var w=this;hl(m)||(m=[m]);var R=this._getSupportedDrivers(m);function B(){w._config.driver=w.driver()}function $(ie){return w._extend(ie),B(),w._ready=w._initStorage(w._config),w._ready}function G(ie){return function(){var xe=0;function Ue(){for(;xe<ie.length;){var He=ie[xe];return xe++,w._dbInfo=null,w._ready=null,w.getDriver(He).then($).catch(Ue)}B();var st=new Error("No available storage method found.");return w._driverSet=E.reject(st),w._driverSet}return Ue()}}var Y=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=Y.then(function(){var ie=R[0];return w._dbInfo=null,w._ready=null,w.getDriver(ie).then(function(xe){w._driver=xe._driver,B(),w._wrapLibraryMethodsWithReady(),w._initDriver=G(R)})}).catch(function(){B();var ie=new Error("No available storage method found.");return w._driverSet=E.reject(ie),w._driverSet}),N(this._driverSet,S,T),this._driverSet},f.prototype.supports=function(m){return!!ml[m]},f.prototype._extend=function(m){Ss(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],T=0,w=m.length;T<w;T++){var R=m[T];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=ws.length;m<S;m++)xh(this,ws[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),Ah=new Oh;i.exports=Ah},{3:3}]},{},[4])(4)})});var Ph={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function Lh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Fh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Bs;function kh(t,e){if(!Bs){let n=Element.prototype;Bs=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Bs.call(t,e):!1}function Vh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[Lh(r)]=[n,i]}),e}function Bh(t,e){return e.get(Ds).resolveComponentFactory(t).inputs}function Uh(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let a=n[o],u=Hh(a,e,i);u!==-1&&r[u].push(a)}return r}function Hh(t,e,n){let r=n;return Fh(t)&&e.some((i,o)=>i!=="*"&&kh(t,i)?(r=o,!0):!1),r}var jh=10,Us=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(Ds).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Hs(this.componentFactory,e,this.inputMap)}},Hs=class{componentFactory;injector;inputMap;eventEmitters=new bl(1);events=this.eventEmitters.pipe(Dl(e=>Bi(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(Pt),this.appRef=this.injector.get(Gi),this.cdScheduler=n.get(Ml),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Ph.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},jh))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let n=Mt.create({providers:[],parent:this.injector}),r=Uh(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new yl(s=>{let a=o.subscribe(u=>s.next({name:i,value:u}));return()=>a.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},js=class extends HTMLElement{ngElementEventsSubscription=null};function tu(t,e){let n=Bh(t,e.injector),r=e.strategyFactory||new Us(t,e.injector),i=Vh(n);class o extends js{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let g=this[u];delete this[u],a.setInputValue(u,g,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,u,d,g){let[p,E]=i[a];this.ngElementStrategy.setInputValue(p,d,E)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let u=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(u)})}}return n.forEach(({propName:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(u){this.ngElementStrategy.setInputValue(s,u,a)},configurable:!0,enumerable:!0})}),o}var nu="9.12.15";var Xe=class t{static SDK_VERSION=nu;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_OPEN_CART="Open Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let e=t.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");t.SDK_VERSION_CODE=parseInt(e,10)}};var Dn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Xe.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Xe.SDK_VERSION}/dist/widget.min.js`};var Ut=Qr(iu());var lt=class{static log(...e){Ut.default.info(...e)}static debug(...e){Ut.default.debug(...e)}static error(...e){Ut.default.error(...e)}static warn(...e){Ut.default.warn(...e)}static info(...e){Ut.default.info(...e)}static trace(...e){Ut.default.trace(...e)}};function ou(t=Xe.LOG_PREFIX){Ut.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Xe.SDK_VERSION}):`)}});let e=Gh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Ut.default.setLevel(Ut.default[localStorage.cooeeLogLevel]):Ut.default.setLevel(Dn.debug?Ut.default.TRACE:Ut.default.OFF)}function Gh(){return new URL(location.href).searchParams?.get("cooee-debug")}var Li=Qr(Qi());var au={providers:[jl()]};var Yh={"[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"},YE=we(O({},Yh),{"[class.ng-submitted]":"isSubmitted"});var zh=new tn("",{providedIn:"root",factory:()=>uu}),uu="always";var Kh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Xn({type:t});static \u0275inj=zn({})}return t})();var du=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:zh,useValue:n.callSetDisabledState??uu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Xn({type:t});static \u0275inj=zn({imports:[Kh]})}return t})();var zt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.type="module",document.head.appendChild(r)}static injectRawScript(e){if(!e)return;let n=document.createElement("script");n.id="cooee-app-script",n.innerHTML=e,document.head.appendChild(n)}static injectRawCSS(e,n=document.head){if(!e)return;let r=document.createElement("style");r.textContent=e,n.appendChild(r)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let a of s)if(a.type==CSSRule.FONT_FACE_RULE){let u=e.split("/"),d=u.slice(0,u.length-1).join("/"),g=a.cssText;g=g.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let p=document.createElement("style");p.appendChild(document.createTextNode(g)),document.head.appendChild(p)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var Kt=class t{cooeeEvent=new at;cooeeCTA=new at;elementRef=Z(It);_engagementTrigger=Lt(null);_triggerContext=Lt(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){lt.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(zt.injectStylesheet(Dn.styleURL,e),zt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){lt.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Ne({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Vl(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var Xh=(t,e)=>({"--option-color":t,"background-color":e}),fu=(t,e)=>e.id;function qh(t,e){if(t&1&&(W(0,"span",6),Ae(1),z()),t&2){q();let n=We(1);V(),un(n)}}function Zh(t,e){if(t&1){let n=Ke();_t(0)(1)(2),W(3,"button",5),Pe("click",function(){let i=Re(n).$implicit,o=q().$implicit,s=q();return Me(s.onOptionChange(o,i))}),Oe(4,qh,2,1,"span",6),z()}if(t&2){let n,r=e.$implicit,i=q().$implicit,o=We(1),s=q(),a=r.name;V();let u=vt(r.displayName||r.name),d=o?(n=r.hexColor)!==null&&n!==void 0?n:a:"";V(2),ri("color-type",o)("selected",s.selectedOptions()[i.name]===a),de("disabled",r.disabled)("title",u)("ngStyle",Yi(10,Xh,d,d)),wn("data-value",a),V(),Ie(o?-1:4)}}function Jh(t,e){if(t&1&&(W(0,"div"),_t(1),W(2,"div",1),Ae(3),z(),W(4,"div",2),Ae(5),z(),W(6,"div",3),nt(7,Zh,5,13,"button",4,fu),z()()),t&2){let n=e.$implicit,r=q();Bl("option-group ",n.name.toLowerCase(),""),V(),vt(r.hasHexColors(n)),V(2),Tt("",n.name,":"),V(2),un(r.selectedOptions()[n.name]),V(2),rt(n.optionValues)}}var _r=class t extends Kt{selectedVariant=new at;item=Hi.required();selectedOptions=Lt({});options=zi(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){lt.error(n)}return e.options});matchedVariant=zi(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>n[i.name]===r.selectedOptions.find(o=>o.name===i.name)?.value))});constructor(){super(),Fs(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Fs(()=>{let n=this.item();if(!n?.options)return;let r=O({},this.selectedOptions());n.options.forEach(i=>{let o=n.vars[0]?.selectedOptions.find(s=>s.name===i.name)?.value;o&&(r[i.name]=o)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=O({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Ne({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Ct],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","title","ngStyle"],[1,"option-value",3,"click","disabled","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&nt(0,Jh,9,6,"div",0,fu),n&2&&rt(r.options())},dependencies:[zl,Wl,du],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}
|
|
10
|
+
`+N(A,P)):y}}function mt(A,x){var F;return x.cache&&x.name&&x.storage.templates.get(x.name)?x.storage.templates.get(x.name):(F=typeof A=="function"?A:ze(A,x),x.cache&&x.name&&x.storage.templates.define(x.name,F),F)}Le.l.bind(Le),t.compile=ze,t.compileScope=se,t.compileScopeIntoFunction=K,t.compileToString=N,t.defaultConfig=Le,t.filters=De,t.getConfig=Ge,t.helpers=ye,t.nativeHelpers=ke,t.parse=C,t.render=function(A,x,F,P){var v=Ge(F||{});if(!v.async)return mt(A,v)(x,v);if(!P){if(typeof r=="function")return new r(function(y,H){try{y(mt(A,v)(x,v))}catch(J){H(J)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{mt(A,v)(x,v,P)}catch(y){return P(y)}},t.templates=te,Object.defineProperty(t,"__esModule",{value:!0})})});var rf=xs((nf,sc)=>{"use strict";(function(t){if(typeof nf=="object"&&typeof sc<"u")sc.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function a(g,p){if(!o[g]){if(!i[g]){var E=typeof Jr=="function"&&Jr;if(!p&&E)return E(g,!0);if(u)return u(g,!0);var C=new Error("Cannot find module '"+g+"'");throw C.code="MODULE_NOT_FOUND",C}var N=o[g]={exports:{}};i[g][0].call(N.exports,function(M){var L=i[g][1][M];return a(L||M)},N,N.exports,r,i,o,s)}return o[g].exports}for(var u=typeof Jr=="function"&&Jr,d=0;d<s.length;d++)a(s[d]);return a}({1:[function(r,i,o){(function(s){"use strict";var a=s.MutationObserver||s.WebKitMutationObserver,u;if(a){var d=0,g=new a(M),p=s.document.createTextNode("");g.observe(p,{characterData:!0}),u=function(){p.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=M,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var j=s.document.createElement("script");j.onreadystatechange=function(){M(),j.onreadystatechange=null,j.parentNode.removeChild(j),j=null},s.document.documentElement.appendChild(j)}:u=function(){setTimeout(M,0)};var C,N=[];function M(){C=!0;for(var j,K,se=N.length;se;){for(K=N,N=[],j=-1;++j<se;)K[j]();se=N.length}C=!1}i.exports=L;function L(j){N.push(j)===1&&!C&&u()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function a(){}var u={},d=["REJECTED"],g=["FULFILLED"],p=["PENDING"];i.exports=E;function E(U){if(typeof U!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,U!==a&&L(this,U)}E.prototype.catch=function(U){return this.then(null,U)},E.prototype.then=function(U,he){if(typeof U!="function"&&this.state===g||typeof he!="function"&&this.state===d)return this;var te=new this.constructor(a);if(this.state!==p){var ye=this.state===g?U:he;N(te,ye,this.outcome)}else this.queue.push(new C(te,U,he));return te};function C(U,he,te){this.promise=U,typeof he=="function"&&(this.onFulfilled=he,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}C.prototype.callFulfilled=function(U){u.resolve(this.promise,U)},C.prototype.otherCallFulfilled=function(U){N(this.promise,this.onFulfilled,U)},C.prototype.callRejected=function(U){u.reject(this.promise,U)},C.prototype.otherCallRejected=function(U){N(this.promise,this.onRejected,U)};function N(U,he,te){s(function(){var ye;try{ye=he(te)}catch(ke){return u.reject(U,ke)}ye===U?u.reject(U,new TypeError("Cannot resolve promise with itself")):u.resolve(U,ye)})}u.resolve=function(U,he){var te=j(M,he);if(te.status==="error")return u.reject(U,te.value);var ye=te.value;if(ye)L(U,ye);else{U.state=g,U.outcome=he;for(var ke=-1,De=U.queue.length;++ke<De;)U.queue[ke].callFulfilled(he)}return U},u.reject=function(U,he){U.state=d,U.outcome=he;for(var te=-1,ye=U.queue.length;++te<ye;)U.queue[te].callRejected(he);return U};function M(U){var he=U&&U.then;if(U&&(typeof U=="object"||typeof U=="function")&&typeof he=="function")return function(){he.apply(U,arguments)}}function L(U,he){var te=!1;function ye(Ge){te||(te=!0,u.reject(U,Ge))}function ke(Ge){te||(te=!0,u.resolve(U,Ge))}function De(){he(ke,ye)}var Le=j(De);Le.status==="error"&&ye(Le.value)}function j(U,he){var te={};try{te.value=U(he),te.status="success"}catch(ye){te.status="error",te.value=ye}return te}E.resolve=K;function K(U){return U instanceof this?U:u.resolve(new this(a),U)}E.reject=se;function se(U){var he=new this(a);return u.reject(he,U)}E.all=X;function X(U){var he=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=U.length,ye=!1;if(!te)return this.resolve([]);for(var ke=new Array(te),De=0,Le=-1,Ge=new this(a);++Le<te;)ze(U[Le],Le);return Ge;function ze(mt,A){he.resolve(mt).then(x,function(F){ye||(ye=!0,u.reject(Ge,F))});function x(F){ke[A]=F,++De===te&&!ye&&(ye=!0,u.resolve(Ge,ke))}}}E.race=be;function be(U){var he=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=U.length,ye=!1;if(!te)return this.resolve([]);for(var ke=-1,De=new this(a);++ke<te;)Le(U[ke]);return De;function Le(Ge){he.resolve(Ge).then(function(ze){ye||(ye=!0,u.resolve(De,ze))},function(ze){ye||(ye=!0,u.reject(De,ze))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function a(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")}function u(){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=u();function g(){try{if(!d||!d.open)return!1;var f=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||b)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function p(f,b){f=f||[],b=b||{};try{return new Blob(f,b)}catch(w){if(w.name!=="TypeError")throw w;for(var m=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,S=new m,T=0;T<f.length;T+=1)S.append(f[T]);return S.getBlob(b.type)}}typeof Promise>"u"&&r(3);var E=Promise;function C(f,b){b&&f.then(function(m){b(null,m)},function(m){b(m)})}function N(f,b,m){typeof b=="function"&&f.then(b),typeof m=="function"&&f.catch(m)}function M(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function L(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var j="local-forage-detect-blob-support",K=void 0,se={},X=Object.prototype.toString,be="readonly",U="readwrite";function he(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),T=0;T<b;T++)S[T]=f.charCodeAt(T);return m}function te(f){return new E(function(b){var m=f.transaction(j,U),S=p([""]);m.objectStore(j).put(S,"key"),m.onabort=function(T){T.preventDefault(),T.stopPropagation(),b(!1)},m.oncomplete=function(){var T=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);b(w||!T||parseInt(T[1],10)>=43)}}).catch(function(){return!1})}function ye(f){return typeof K=="boolean"?E.resolve(K):te(f).then(function(b){return K=b,K})}function ke(f){var b=se[f.name],m={};m.promise=new E(function(S,T){m.resolve=S,m.reject=T}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function De(f){var b=se[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Le(f,b){var m=se[f.name],S=m.deferredOperations.pop();if(S)return S.reject(b),S.promise}function Ge(f,b){return new E(function(m,S){if(se[f.name]=se[f.name]||J(),f.db)if(b)ke(f),f.db.close();else return m(f.db);var T=[f.name];b&&T.push(f.version);var w=d.open.apply(d,T);b&&(w.onupgradeneeded=function(R){var B=w.result;try{B.createObjectStore(f.storeName),R.oldVersion<=1&&B.createObjectStore(j)}catch($){if($.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+R.oldVersion+" to version "+R.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw $}}),w.onerror=function(R){R.preventDefault(),S(w.error)},w.onsuccess=function(){var R=w.result;R.onversionchange=function(B){B.target.close()},m(R),De(f)}})}function ze(f){return Ge(f,!1)}function mt(f){return Ge(f,!0)}function A(f,b){if(!f.db)return!0;var m=!f.db.objectStoreNames.contains(f.storeName),S=f.version<f.db.version,T=f.version>f.db.version;if(S&&(f.version!==b&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),T||m){if(m){var w=f.db.version+1;w>f.version&&(f.version=w)}return!0}return!1}function x(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(T){var w=btoa(T.target.result||"");b({__local_forage_encoded_blob:!0,data:w,type:f.type})},S.readAsBinaryString(f)})}function F(f){var b=he(atob(f.data));return p([b],{type:f.type})}function P(f){return f&&f.__local_forage_encoded_blob}function v(f){var b=this,m=b._initReady().then(function(){var S=se[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return N(m,f,f),m}function y(f){ke(f);for(var b=se[f.name],m=b.forages,S=0;S<m.length;S++){var T=m[S];T._dbInfo.db&&(T._dbInfo.db.close(),T._dbInfo.db=null)}return f.db=null,ze(f).then(function(w){return f.db=w,A(f)?mt(f):w}).then(function(w){f.db=b.db=w;for(var R=0;R<m.length;R++)m[R]._dbInfo.db=w}).catch(function(w){throw Le(f,w),w})}function H(f,b,m,S){S===void 0&&(S=1);try{var T=f.db.transaction(f.storeName,b);m(null,T)}catch(w){if(S>0&&(!f.db||w.name==="InvalidStateError"||w.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||w.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),mt(f)}).then(function(){return y(f).then(function(){H(f,b,m,S-1)})}).catch(m);m(w)}}function J(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function re(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=f[S];var T=se[m.name];T||(T=J(),se[m.name]=T),T.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=v);var w=[];function R(){return E.resolve()}for(var B=0;B<T.forages.length;B++){var $=T.forages[B];$!==b&&w.push($._initReady().catch(R))}var G=T.forages.slice(0);return E.all(w).then(function(){return m.db=T.db,ze(m)}).then(function(Y){return m.db=Y,A(m,b._defaultConfig.version)?mt(m):Y}).then(function(Y){m.db=T.db=Y,b._dbInfo=m;for(var ie=0;ie<G.length;ie++){var xe=G[ie];xe!==b&&(xe._dbInfo.db=m.db,xe._dbInfo.version=m.version)}})}function oe(f,b){var m=this;f=M(f);var S=new E(function(T,w){m.ready().then(function(){H(m._dbInfo,be,function(R,B){if(R)return w(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.get(f);G.onsuccess=function(){var Y=G.result;Y===void 0&&(Y=null),P(Y)&&(Y=F(Y)),T(Y)},G.onerror=function(){w(G.error)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ue(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){H(m._dbInfo,be,function(R,B){if(R)return w(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.openCursor(),Y=1;G.onsuccess=function(){var ie=G.result;if(ie){var xe=ie.value;P(xe)&&(xe=F(xe));var Ue=f(xe,ie.key,Y++);Ue!==void 0?T(Ue):ie.continue()}else T()},G.onerror=function(){w(G.error)}}catch(ie){w(ie)}})}).catch(w)});return C(S,b),S}function Q(f,b,m){var S=this;f=M(f);var T=new E(function(w,R){var B;S.ready().then(function(){return B=S._dbInfo,X.call(b)==="[object Blob]"?ye(B.db).then(function($){return $?b:x(b)}):b}).then(function($){H(S._dbInfo,U,function(G,Y){if(G)return R(G);try{var ie=Y.objectStore(S._dbInfo.storeName);$===null&&($=void 0);var xe=ie.put($,f);Y.oncomplete=function(){$===void 0&&($=null),w($)},Y.onabort=Y.onerror=function(){var Ue=xe.error?xe.error:xe.transaction.error;R(Ue)}}catch(Ue){R(Ue)}})}).catch(R)});return C(T,m),T}function ae(f,b){var m=this;f=M(f);var S=new E(function(T,w){m.ready().then(function(){H(m._dbInfo,U,function(R,B){if(R)return w(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.delete(f);B.oncomplete=function(){T()},B.onerror=function(){w(G.error)},B.onabort=function(){var Y=G.error?G.error:G.transaction.error;w(Y)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ee(f){var b=this,m=new E(function(S,T){b.ready().then(function(){H(b._dbInfo,U,function(w,R){if(w)return T(w);try{var B=R.objectStore(b._dbInfo.storeName),$=B.clear();R.oncomplete=function(){S()},R.onabort=R.onerror=function(){var G=$.error?$.error:$.transaction.error;T(G)}}catch(G){T(G)}})}).catch(T)});return C(m,f),m}function pe(f){var b=this,m=new E(function(S,T){b.ready().then(function(){H(b._dbInfo,be,function(w,R){if(w)return T(w);try{var B=R.objectStore(b._dbInfo.storeName),$=B.count();$.onsuccess=function(){S($.result)},$.onerror=function(){T($.error)}}catch(G){T(G)}})}).catch(T)});return C(m,f),m}function ce(f,b){var m=this,S=new E(function(T,w){if(f<0){T(null);return}m.ready().then(function(){H(m._dbInfo,be,function(R,B){if(R)return w(R);try{var $=B.objectStore(m._dbInfo.storeName),G=!1,Y=$.openKeyCursor();Y.onsuccess=function(){var ie=Y.result;if(!ie){T(null);return}f===0||G?T(ie.key):(G=!0,ie.advance(f))},Y.onerror=function(){w(Y.error)}}catch(ie){w(ie)}})}).catch(w)});return C(S,b),S}function me(f){var b=this,m=new E(function(S,T){b.ready().then(function(){H(b._dbInfo,be,function(w,R){if(w)return T(w);try{var B=R.objectStore(b._dbInfo.storeName),$=B.openKeyCursor(),G=[];$.onsuccess=function(){var Y=$.result;if(!Y){S(G);return}G.push(Y.key),Y.continue()},$.onerror=function(){T($.error)}}catch(Y){T(Y)}})}).catch(T)});return C(m,f),m}function ge(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,T;if(!f.name)T=E.reject("Invalid arguments");else{var w=f.name===m.name&&S._dbInfo.db,R=w?E.resolve(S._dbInfo.db):ze(f).then(function(B){var $=se[f.name],G=$.forages;$.db=B;for(var Y=0;Y<G.length;Y++)G[Y]._dbInfo.db=B;return B});f.storeName?T=R.then(function(B){if(B.objectStoreNames.contains(f.storeName)){var $=B.version+1;ke(f);var G=se[f.name],Y=G.forages;B.close();for(var ie=0;ie<Y.length;ie++){var xe=Y[ie];xe._dbInfo.db=null,xe._dbInfo.version=$}var Ue=new E(function(He,st){var tt=d.open(f.name,$);tt.onerror=function(Yt){var Zr=tt.result;Zr.close(),st(Yt)},tt.onupgradeneeded=function(){var Yt=tt.result;Yt.deleteObjectStore(f.storeName)},tt.onsuccess=function(){var Yt=tt.result;Yt.close(),He(Yt)}});return Ue.then(function(He){G.db=He;for(var st=0;st<Y.length;st++){var tt=Y[st];tt._dbInfo.db=He,De(tt._dbInfo)}}).catch(function(He){throw(Le(f,He)||E.resolve()).catch(function(){}),He})}}):T=R.then(function(B){ke(f);var $=se[f.name],G=$.forages;B.close();for(var Y=0;Y<G.length;Y++){var ie=G[Y];ie._dbInfo.db=null}var xe=new E(function(Ue,He){var st=d.deleteDatabase(f.name);st.onerror=function(){var tt=st.result;tt&&tt.close(),He(st.error)},st.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},st.onsuccess=function(){var tt=st.result;tt&&tt.close(),Ue(tt)}});return xe.then(function(Ue){$.db=Ue;for(var He=0;He<G.length;He++){var st=G[He];De(st._dbInfo)}}).catch(function(Ue){throw(Le(f,Ue)||E.resolve()).catch(function(){}),Ue})})}return C(T,b),T}var _e={_driver:"asyncStorage",_initStorage:re,_support:g(),iterate:ue,getItem:oe,setItem:Q,removeItem:ae,clear:ee,length:pe,key:ce,keys:me,dropInstance:ge};function h(){return typeof openDatabase=="function"}var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",_=/^~~local_forage_type~([^~]+)~/,I="__lfsc__:",D=I.length,k="arbf",ve="blob",Te="si08",Ce="ui08",Ve="uic8",Be="si16",qe="si32",kt="ur16",Wt="ui32",Cn="fl32",St="fl64",Vt=D+k.length,Fi=Object.prototype.toString;function ul(f){var b=f.length*.75,m=f.length,S,T=0,w,R,B,$;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var G=new ArrayBuffer(b),Y=new Uint8Array(G);for(S=0;S<m;S+=4)w=c.indexOf(f[S]),R=c.indexOf(f[S+1]),B=c.indexOf(f[S+2]),$=c.indexOf(f[S+3]),Y[T++]=w<<2|R>>4,Y[T++]=(R&15)<<4|B>>2,Y[T++]=(B&3)<<6|$&63;return G}function bs(f){var b=new Uint8Array(f),m="",S;for(S=0;S<b.length;S+=3)m+=c[b[S]>>2],m+=c[(b[S]&3)<<4|b[S+1]>>4],m+=c[(b[S+1]&15)<<2|b[S+2]>>6],m+=c[b[S+2]&63];return b.length%3===2?m=m.substring(0,m.length-1)+"=":b.length%3===1&&(m=m.substring(0,m.length-2)+"=="),m}function Xp(f,b){var m="";if(f&&(m=Fi.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Fi.call(f.buffer)==="[object ArrayBuffer]")){var S,T=I;f instanceof ArrayBuffer?(S=f,T+=k):(S=f.buffer,m==="[object Int8Array]"?T+=Te:m==="[object Uint8Array]"?T+=Ce:m==="[object Uint8ClampedArray]"?T+=Ve:m==="[object Int16Array]"?T+=Be:m==="[object Uint16Array]"?T+=kt:m==="[object Int32Array]"?T+=qe:m==="[object Uint32Array]"?T+=Wt:m==="[object Float32Array]"?T+=Cn:m==="[object Float64Array]"?T+=St:b(new Error("Failed to get type for BinaryArray"))),b(T+bs(S))}else if(m==="[object Blob]"){var w=new FileReader;w.onload=function(){var R=l+f.type+"~"+bs(this.result);b(I+ve+R)},w.readAsArrayBuffer(f)}else try{b(JSON.stringify(f))}catch(R){console.error("Couldn't convert value into a JSON string: ",f),b(null,R)}}function qp(f){if(f.substring(0,D)!==I)return JSON.parse(f);var b=f.substring(Vt),m=f.substring(D,Vt),S;if(m===ve&&_.test(b)){var T=b.match(_);S=T[1],b=b.substring(T[0].length)}var w=ul(b);switch(m){case k:return w;case ve:return p([w],{type:S});case Te:return new Int8Array(w);case Ce:return new Uint8Array(w);case Ve:return new Uint8ClampedArray(w);case Be:return new Int16Array(w);case kt:return new Uint16Array(w);case qe:return new Int32Array(w);case Wt:return new Uint32Array(w);case Cn:return new Float32Array(w);case St:return new Float64Array(w);default:throw new Error("Unkown type: "+m)}}var Cs={serialize:Xp,deserialize:qp,stringToBuffer:ul,bufferToString:bs};function dl(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function Zp(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=typeof f[S]!="string"?f[S].toString():f[S];var T=new E(function(w,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(B){return R(B)}m.db.transaction(function(B){dl(B,m,function(){b._dbInfo=m,w()},function($,G){R(G)})},R)});return m.serializer=Cs,T}function Vn(f,b,m,S,T,w){f.executeSql(m,S,T,function(R,B){B.code===B.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function($,G){G.rows.length?w($,B):dl($,b,function(){$.executeSql(m,S,T,w)},w)},w):w(R,B)},w)}function Jp(f,b){var m=this;f=M(f);var S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Vn(B,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function($,G){var Y=G.rows.length?G.rows.item(0).value:null;Y&&(Y=R.serializer.deserialize(Y)),T(Y)},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function Qp(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Vn(B,R,"SELECT * FROM "+R.storeName,[],function($,G){for(var Y=G.rows,ie=Y.length,xe=0;xe<ie;xe++){var Ue=Y.item(xe),He=Ue.value;if(He&&(He=R.serializer.deserialize(He)),He=f(He,Ue.key,xe+1),He!==void 0){T(He);return}}T()},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function fl(f,b,m,S){var T=this;f=M(f);var w=new E(function(R,B){T.ready().then(function(){b===void 0&&(b=null);var $=b,G=T._dbInfo;G.serializer.serialize(b,function(Y,ie){ie?B(ie):G.db.transaction(function(xe){Vn(xe,G,"INSERT OR REPLACE INTO "+G.storeName+" (key, value) VALUES (?, ?)",[f,Y],function(){R($)},function(Ue,He){B(He)})},function(xe){if(xe.code===xe.QUOTA_ERR){if(S>0){R(fl.apply(T,[f,$,m,S-1]));return}B(xe)}})})}).catch(B)});return C(w,m),w}function eh(f,b,m){return fl.apply(this,[f,b,m,1])}function th(f,b){var m=this;f=M(f);var S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Vn(B,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){T()},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function nh(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"DELETE FROM "+w.storeName,[],function(){S()},function(B,$){T($)})})}).catch(T)});return C(m,f),m}function rh(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(B,$){var G=$.rows.item(0).c;S(G)},function(B,$){T($)})})}).catch(T)});return C(m,f),m}function ih(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Vn(B,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function($,G){var Y=G.rows.length?G.rows.item(0).key:null;T(Y)},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function oh(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"SELECT key FROM "+w.storeName,[],function(B,$){for(var G=[],Y=0;Y<$.rows.length;Y++)G.push($.rows.item(Y).key);S(G)},function(B,$){T($)})})}).catch(T)});return C(m,f),m}function sh(f){return new E(function(b,m){f.transaction(function(S){S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(T,w){for(var R=[],B=0;B<w.rows.length;B++)R.push(w.rows.item(B).name);b({db:f,storeNames:R})},function(T,w){m(w)})},function(S){m(S)})})}function ah(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,T;return f.name?T=new E(function(w){var R;f.name===m.name?R=S._dbInfo.db:R=openDatabase(f.name,"","",0),f.storeName?w({db:R,storeNames:[f.storeName]}):w(sh(R))}).then(function(w){return new E(function(R,B){w.db.transaction(function($){function G(Ue){return new E(function(He,st){$.executeSql("DROP TABLE IF EXISTS "+Ue,[],function(){He()},function(tt,Yt){st(Yt)})})}for(var Y=[],ie=0,xe=w.storeNames.length;ie<xe;ie++)Y.push(G(w.storeNames[ie]));E.all(Y).then(function(){R()}).catch(function(Ue){B(Ue)})},function($){B($)})})}):T=E.reject("Invalid arguments"),C(T,b),T}var ch={_driver:"webSQLStorage",_initStorage:Zp,_support:h(),iterate:Qp,getItem:Jp,setItem:eh,removeItem:th,clear:nh,length:rh,key:ih,keys:oh,dropInstance:ah};function lh(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function pl(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function uh(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function dh(){return!uh()||localStorage.length>0}function fh(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=pl(f,b._defaultConfig),dh()?(b._dbInfo=m,m.serializer=Cs,E.resolve()):E.reject()}function ph(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,T=localStorage.length-1;T>=0;T--){var w=localStorage.key(T);w.indexOf(S)===0&&localStorage.removeItem(w)}});return C(m,f),m}function hh(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var T=m._dbInfo,w=localStorage.getItem(T.keyPrefix+f);return w&&(w=T.serializer.deserialize(w)),w});return C(S,b),S}function mh(f,b){var m=this,S=m.ready().then(function(){for(var T=m._dbInfo,w=T.keyPrefix,R=w.length,B=localStorage.length,$=1,G=0;G<B;G++){var Y=localStorage.key(G);if(Y.indexOf(w)===0){var ie=localStorage.getItem(Y);if(ie&&(ie=T.serializer.deserialize(ie)),ie=f(ie,Y.substring(R),$++),ie!==void 0)return ie}}});return C(S,b),S}function gh(f,b){var m=this,S=m.ready().then(function(){var T=m._dbInfo,w;try{w=localStorage.key(f)}catch{w=null}return w&&(w=w.substring(T.keyPrefix.length)),w});return C(S,b),S}function _h(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,T=localStorage.length,w=[],R=0;R<T;R++){var B=localStorage.key(R);B.indexOf(S.keyPrefix)===0&&w.push(B.substring(S.keyPrefix.length))}return w});return C(m,f),m}function vh(f){var b=this,m=b.keys().then(function(S){return S.length});return C(m,f),m}function yh(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var T=m._dbInfo;localStorage.removeItem(T.keyPrefix+f)});return C(S,b),S}function Eh(f,b,m){var S=this;f=M(f);var T=S.ready().then(function(){b===void 0&&(b=null);var w=b;return new E(function(R,B){var $=S._dbInfo;$.serializer.serialize(b,function(G,Y){if(Y)B(Y);else try{localStorage.setItem($.keyPrefix+f,G),R(w)}catch(ie){(ie.name==="QuotaExceededError"||ie.name==="NS_ERROR_DOM_QUOTA_REACHED")&&B(ie),B(ie)}})})});return C(T,m),T}function bh(f,b){if(b=L.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var m=this.config();f.name=f.name||m.name,f.storeName=f.storeName||m.storeName}var S=this,T;return f.name?T=new E(function(w){f.storeName?w(pl(f,S._defaultConfig)):w(f.name+"/")}).then(function(w){for(var R=localStorage.length-1;R>=0;R--){var B=localStorage.key(R);B.indexOf(w)===0&&localStorage.removeItem(B)}}):T=E.reject("Invalid arguments"),C(T,b),T}var Ch={_driver:"localStorageWrapper",_initStorage:fh,_support:lh(),iterate:mh,getItem:hh,setItem:Eh,removeItem:yh,clear:ph,length:vh,key:gh,keys:_h,dropInstance:bh},wh=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},Sh=function(b,m){for(var S=b.length,T=0;T<S;){if(wh(b[T],m))return!0;T++}return!1},hl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},qr={},ml={},fr={INDEXEDDB:_e,WEBSQL:ch,LOCALSTORAGE:Ch},Ih=[fr.INDEXEDDB._driver,fr.WEBSQL._driver,fr.LOCALSTORAGE._driver],ki=["dropInstance"],ws=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ki),Th={description:"",driver:Ih.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function xh(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function Ss(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(hl(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var Oh=function(){function f(b){a(this,f);for(var m in fr)if(fr.hasOwnProperty(m)){var S=fr[m],T=S._driver;this[m]=T,qr[T]||this.defineDriver(S)}this._defaultConfig=Ss({},Th),this._config=Ss({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(m){if((typeof m>"u"?"undefined":s(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in m){if(S==="storeName"&&(m[S]=m[S].replace(/\W/g,"_")),S==="version"&&typeof m[S]!="number")return new Error("Database version must be a number.");this._config[S]=m[S]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},f.prototype.defineDriver=function(m,S,T){var w=new E(function(R,B){try{var $=m._driver,G=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){B(G);return}for(var Y=ws.concat("_initStorage"),ie=0,xe=Y.length;ie<xe;ie++){var Ue=Y[ie],He=!Sh(ki,Ue);if((He||m[Ue])&&typeof m[Ue]!="function"){B(G);return}}var st=function(){for(var Zr=function(Nh){return function(){var Rh=new Error("Method "+Nh+" is not implemented by the current driver"),gl=E.reject(Rh);return C(gl,arguments[arguments.length-1]),gl}},Is=0,Dh=ki.length;Is<Dh;Is++){var Ts=ki[Is];m[Ts]||(m[Ts]=Zr(Ts))}};st();var tt=function(Zr){qr[$]&&console.info("Redefining LocalForage driver: "+$),qr[$]=m,ml[$]=Zr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(tt,B):tt(!!m._support):tt(!0)}catch(Yt){B(Yt)}});return N(w,S,T),w},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,T){var w=qr[m]?E.resolve(qr[m]):E.reject(new Error("Driver not found."));return N(w,S,T),w},f.prototype.getSerializer=function(m){var S=E.resolve(Cs);return N(S,m),S},f.prototype.ready=function(m){var S=this,T=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return N(T,m,m),T},f.prototype.setDriver=function(m,S,T){var w=this;hl(m)||(m=[m]);var R=this._getSupportedDrivers(m);function B(){w._config.driver=w.driver()}function $(ie){return w._extend(ie),B(),w._ready=w._initStorage(w._config),w._ready}function G(ie){return function(){var xe=0;function Ue(){for(;xe<ie.length;){var He=ie[xe];return xe++,w._dbInfo=null,w._ready=null,w.getDriver(He).then($).catch(Ue)}B();var st=new Error("No available storage method found.");return w._driverSet=E.reject(st),w._driverSet}return Ue()}}var Y=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=Y.then(function(){var ie=R[0];return w._dbInfo=null,w._ready=null,w.getDriver(ie).then(function(xe){w._driver=xe._driver,B(),w._wrapLibraryMethodsWithReady(),w._initDriver=G(R)})}).catch(function(){B();var ie=new Error("No available storage method found.");return w._driverSet=E.reject(ie),w._driverSet}),N(this._driverSet,S,T),this._driverSet},f.prototype.supports=function(m){return!!ml[m]},f.prototype._extend=function(m){Ss(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],T=0,w=m.length;T<w;T++){var R=m[T];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=ws.length;m<S;m++)xh(this,ws[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),Ah=new Oh;i.exports=Ah},{3:3}]},{},[4])(4)})});var Ph={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function Lh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Fh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Bs;function kh(t,e){if(!Bs){let n=Element.prototype;Bs=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Bs.call(t,e):!1}function Vh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[Lh(r)]=[n,i]}),e}function Bh(t,e){return e.get(Ds).resolveComponentFactory(t).inputs}function Uh(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let a=n[o],u=Hh(a,e,i);u!==-1&&r[u].push(a)}return r}function Hh(t,e,n){let r=n;return Fh(t)&&e.some((i,o)=>i!=="*"&&kh(t,i)?(r=o,!0):!1),r}var jh=10,Us=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(Ds).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Hs(this.componentFactory,e,this.inputMap)}},Hs=class{componentFactory;injector;inputMap;eventEmitters=new bl(1);events=this.eventEmitters.pipe(Dl(e=>Bi(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(Pt),this.appRef=this.injector.get(Gi),this.cdScheduler=n.get(Ml),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Ph.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},jh))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let n=Mt.create({providers:[],parent:this.injector}),r=Uh(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new yl(s=>{let a=o.subscribe(u=>s.next({name:i,value:u}));return()=>a.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},js=class extends HTMLElement{ngElementEventsSubscription=null};function tu(t,e){let n=Bh(t,e.injector),r=e.strategyFactory||new Us(t,e.injector),i=Vh(n);class o extends js{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let g=this[u];delete this[u],a.setInputValue(u,g,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,u,d,g){let[p,E]=i[a];this.ngElementStrategy.setInputValue(p,d,E)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let u=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(u)})}}return n.forEach(({propName:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(u){this.ngElementStrategy.setInputValue(s,u,a)},configurable:!0,enumerable:!0})}),o}var nu="9.12.16";var Xe=class t{static SDK_VERSION=nu;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_OPEN_CART="Open Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let e=t.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");t.SDK_VERSION_CODE=parseInt(e,10)}};var Dn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Xe.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Xe.SDK_VERSION}/dist/widget.min.js`};var Ut=Qr(iu());var lt=class{static log(...e){Ut.default.info(...e)}static debug(...e){Ut.default.debug(...e)}static error(...e){Ut.default.error(...e)}static warn(...e){Ut.default.warn(...e)}static info(...e){Ut.default.info(...e)}static trace(...e){Ut.default.trace(...e)}};function ou(t=Xe.LOG_PREFIX){Ut.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Xe.SDK_VERSION}):`)}});let e=Gh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Ut.default.setLevel(Ut.default[localStorage.cooeeLogLevel]):Ut.default.setLevel(Dn.debug?Ut.default.TRACE:Ut.default.OFF)}function Gh(){return new URL(location.href).searchParams?.get("cooee-debug")}var Li=Qr(Qi());var au={providers:[jl()]};var Yh={"[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"},YE=we(O({},Yh),{"[class.ng-submitted]":"isSubmitted"});var zh=new tn("",{providedIn:"root",factory:()=>uu}),uu="always";var Kh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Xn({type:t});static \u0275inj=zn({})}return t})();var du=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:zh,useValue:n.callSetDisabledState??uu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Xn({type:t});static \u0275inj=zn({imports:[Kh]})}return t})();var zt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.type="module",document.head.appendChild(r)}static injectRawScript(e){if(!e)return;let n=document.createElement("script");n.id="cooee-app-script",n.innerHTML=e,document.head.appendChild(n)}static injectRawCSS(e,n=document.head){if(!e)return;let r=document.createElement("style");r.textContent=e,n.appendChild(r)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let a of s)if(a.type==CSSRule.FONT_FACE_RULE){let u=e.split("/"),d=u.slice(0,u.length-1).join("/"),g=a.cssText;g=g.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let p=document.createElement("style");p.appendChild(document.createTextNode(g)),document.head.appendChild(p)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var Kt=class t{cooeeEvent=new at;cooeeCTA=new at;elementRef=Z(It);_engagementTrigger=Lt(null);_triggerContext=Lt(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){lt.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(zt.injectStylesheet(Dn.styleURL,e),zt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){lt.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Ne({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Vl(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var Xh=(t,e)=>({"--option-color":t,"background-color":e}),fu=(t,e)=>e.id;function qh(t,e){if(t&1&&(W(0,"span",6),Ae(1),z()),t&2){q();let n=We(1);V(),un(n)}}function Zh(t,e){if(t&1){let n=Ke();_t(0)(1)(2),W(3,"button",5),Pe("click",function(){let i=Re(n).$implicit,o=q().$implicit,s=q();return Me(s.onOptionChange(o,i))}),Oe(4,qh,2,1,"span",6),z()}if(t&2){let n,r=e.$implicit,i=q().$implicit,o=We(1),s=q(),a=r.name;V();let u=vt(r.displayName||r.name),d=o?(n=r.hexColor)!==null&&n!==void 0?n:a:"";V(2),ri("color-type",o)("selected",s.selectedOptions()[i.name]===a),de("disabled",r.disabled)("title",u)("ngStyle",Yi(10,Xh,d,d)),wn("data-value",a),V(),Ie(o?-1:4)}}function Jh(t,e){if(t&1&&(W(0,"div"),_t(1),W(2,"div",1),Ae(3),z(),W(4,"div",2),Ae(5),z(),W(6,"div",3),nt(7,Zh,5,13,"button",4,fu),z()()),t&2){let n=e.$implicit,r=q();Bl("option-group ",n.name.toLowerCase(),""),V(),vt(r.hasHexColors(n)),V(2),Tt("",n.name,":"),V(2),un(r.selectedOptions()[n.name]),V(2),rt(n.optionValues)}}var _r=class t extends Kt{selectedVariant=new at;item=Hi.required();selectedOptions=Lt({});options=zi(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){lt.error(n)}return e.options});matchedVariant=zi(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>n[i.name]===r.selectedOptions.find(o=>o.name===i.name)?.value))});constructor(){super(),Fs(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Fs(()=>{let n=this.item();if(!n?.options)return;let r=O({},this.selectedOptions());n.options.forEach(i=>{let o=n.vars[0]?.selectedOptions.find(s=>s.name===i.name)?.value;o&&(r[i.name]=o)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=O({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Ne({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Ct],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","title","ngStyle"],[1,"option-value",3,"click","disabled","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&nt(0,Jh,9,6,"div",0,fu),n&2&&rt(r.options())},dependencies:[zl,Wl,du],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}
|
|
11
11
|
`],encapsulation:3})};var $s=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}($s||{});var jt=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}(jt||{});var si=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}(si||{});var vr=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 Gs=(n=>(n.CART_AMOUNT="CART_AMOUNT",n.ITEM_COUNT="ITEM_COUNT",n))(Gs||{});var yr=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var fe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Se=globalThis;var dn="9.42.0";function Zn(){return Jn(Se),Se}function Jn(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||dn,e[dn]=e[dn]||{}}function Nn(t,e,n=Se){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[dn]=r[dn]||{};return i[t]||(i[t]=e())}var Ws=["debug","info","warn","error","log","assert","trace"],Qh="Sentry Logger ",Er={};function Hn(t){if(!("console"in Se))return t();let e=Se.console,n={},r=Object.keys(Er);r.forEach(i=>{let o=Er[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function em(){zs().enabled=!0}function tm(){zs().enabled=!1}function pu(){return zs().enabled}function nm(...t){Ys("log",...t)}function rm(...t){Ys("warn",...t)}function im(...t){Ys("error",...t)}function Ys(t,...e){fe&&pu()&&Hn(()=>{Se.console[t](`${Qh}[${t}]:`,...e)})}function zs(){return fe?Nn("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var ne={enable:em,disable:tm,isEnabled:pu,log:nm,warn:rm,error:im};var fn="?",hu=/\(error: (.*)\)/,mu=/captureMessage|captureException/;function Xs(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
|
|
12
12
|
`);for(let a=r;a<s.length;a++){let u=s[a];if(u.length>1024)continue;let d=hu.test(u)?u.replace(hu,"$1"):u;if(!d.match(/\S*Error: /)){for(let g of e){let p=g(d);if(p){o.push(p);break}}if(o.length>=50+i)break}}return gu(o.slice(i))}}function gu(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(eo(e).function||"")&&e.pop(),e.reverse(),mu.test(eo(e).function||"")&&(e.pop(),mu.test(eo(e).function||"")&&e.pop()),e.slice(0,50).map(n=>we(O({},n),{filename:n.filename||eo(e).filename,function:n.function||fn}))}function eo(t){return t[t.length-1]||{}}var Ks="<anonymous>";function Xt(t){try{return!t||typeof t!="function"?Ks:t.name||Ks}catch{return Ks}}function to(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var no={},_u={};function Ot(t,e){no[t]=no[t]||[],no[t].push(e)}function At(t,e){if(!_u[t]){_u[t]=!0;try{e()}catch(n){fe&&ne.error(`Error while instrumenting ${t}`,n)}}}function ut(t,e){let n=t&&no[t];if(n)for(let r of n)try{r(e)}catch(i){fe&&ne.error(`Error while triggering instrumentation handler.
|
|
13
13
|
Type: ${t}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letscooee/web-sdk",
|
|
3
3
|
"description": "Engage uniquely and boost conversions with AI-powered customer journeys driven by real-time intent",
|
|
4
|
-
"version": "9.12.
|
|
4
|
+
"version": "9.12.16",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "ng lint",
|
|
7
7
|
"integrity": "./scripts/validate-integrity.sh",
|