@letscooee/web-sdk 9.12.6 → 9.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.min.js +1 -1
- package/dist/widget.min.js +20 -20
- package/package.json +1 -1
package/dist/main.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var yd=Object.create;var Ec=Object.defineProperty;var vd=Object.getOwnPropertyDescriptor;var wd=Object.getOwnPropertyNames;var bd=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty;var Ed=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wd(e))!_d.call(t,i)&&i!==r&&Ec(t,i,{get:()=>e[i],enumerable:!(n=vd(e,i))||n.enumerable});return t};var Sd=(t,e,r)=>(r=t!=null?yd(bd(t)):{},Ed(e||!t||!t.__esModule?Ec(r,"default",{value:t,enumerable:!0}):r,t));var Id=Object.create,ta=Object.defineProperty,Cd=Object.defineProperties,Td=Object.getOwnPropertyDescriptor,xd=Object.getOwnPropertyDescriptors,Dd=Object.getOwnPropertyNames,Sc=Object.getOwnPropertySymbols,Ad=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty,Nd=Object.prototype.propertyIsEnumerable,Ic=(t,e,r)=>e in t?ta(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||={})du.call(e,r)&&Ic(t,r,e[r]);if(Sc)for(var r of Sc(e))Nd.call(e,r)&&Ic(t,r,e[r]);return t},yt=(t,e)=>Cd(t,xd(e)),di=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),rs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Od=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Dd(e))!du.call(t,i)&&i!==r&&ta(t,i,{get:()=>e[i],enumerable:!(n=Td(e,i))||n.enumerable});return t},ke=(t,e,r)=>(r=t!=null?Id(Ad(t)):{},Od(e||!t||!t.__esModule?ta(r,"default",{value:t,enumerable:!0}):r,t)),sn=rs((t,e)=>{"use strict";(function(r){"use strict";var n={};n.VERSION="1.6.1";var i,s={},o=function(h,b){return function(){return b.apply(h,arguments)}},c=function(){var h=arguments,b=h[0],v,w;for(w=1;w<h.length;w++)for(v in h[w])!(v in b)&&h[w].hasOwnProperty(v)&&(b[v]=h[w][v]);return b},l=function(h,b){return{value:h,name:b}};n.TRACE=l(1,"TRACE"),n.DEBUG=l(2,"DEBUG"),n.INFO=l(3,"INFO"),n.TIME=l(4,"TIME"),n.WARN=l(5,"WARN"),n.ERROR=l(8,"ERROR"),n.OFF=l(99,"OFF");var p=function(h){this.context=h,this.setLevel(h.filterLevel),this.log=this.info};p.prototype={setLevel:function(h){h&&"value"in h&&(this.context.filterLevel=h)},getLevel:function(){return this.context.filterLevel},enabledFor:function(h){var b=this.context.filterLevel;return h.value>=b.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"start"])},timeEnd:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"end"])},invoke:function(h,b){i&&this.enabledFor(h)&&i(b,c({level:h},this.context))}};var d=new p({filterLevel:n.OFF});(function(){var h=n;h.enabledFor=o(d,d.enabledFor),h.trace=o(d,d.trace),h.debug=o(d,d.debug),h.time=o(d,d.time),h.timeEnd=o(d,d.timeEnd),h.info=o(d,d.info),h.warn=o(d,d.warn),h.error=o(d,d.error),h.log=h.info})(),n.setHandler=function(h){i=h},n.setLevel=function(h){d.setLevel(h);for(var b in s)s.hasOwnProperty(b)&&s[b].setLevel(h)},n.getLevel=function(){return d.getLevel()},n.get=function(h){return s[h]||(s[h]=new p(c({name:h},d.context)))},n.createDefaultHandler=function(h){h=h||{},h.formatter=h.formatter||function(w,_){_.name&&w.unshift("["+_.name+"]")};var b={},v=function(w,_){Function.prototype.apply.call(w,console,_)};return typeof console>"u"?function(){}:function(w,_){w=Array.prototype.slice.call(w);var k=console.log,A;_.level===n.TIME?(A=(_.name?"["+_.name+"] ":"")+w[0],w[1]==="start"?console.time?console.time(A):b[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):v(k,[A+": "+(new Date().getTime()-b[A])+"ms"])):(_.level===n.WARN&&console.warn?k=console.warn:_.level===n.ERROR&&console.error?k=console.error:_.level===n.INFO&&console.info?k=console.info:_.level===n.DEBUG&&console.debug?k=console.debug:_.level===n.TRACE&&console.trace&&(k=console.trace),h.formatter(w,_),v(k,w))}},n.useDefaults=function(h){n.setLevel(h&&h.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(h))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof e<"u"&&e.exports?e.exports=n:(n._prevLogger=r.Logger,n.noConflict=function(){return r.Logger=n._prevLogger,n},r.Logger=n)})(t)}),kd=rs((t,e)=>{"use strict";(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){var r,n,i;return function s(o,c,l){function p(b,v){if(!c[b]){if(!o[b]){var w=typeof di=="function"&&di;if(!v&&w)return w(b,!0);if(d)return d(b,!0);var _=new Error("Cannot find module '"+b+"'");throw _.code="MODULE_NOT_FOUND",_}var k=c[b]={exports:{}};o[b][0].call(k.exports,function(A){var B=o[b][1][A];return p(B||A)},k,k.exports,s,o,c,l)}return c[b].exports}for(var d=typeof di=="function"&&di,h=0;h<l.length;h++)p(l[h]);return p}({1:[function(s,o,c){(function(l){"use strict";var p=l.MutationObserver||l.WebKitMutationObserver,d;if(p){var h=0,b=new p(A),v=l.document.createTextNode("");b.observe(v,{characterData:!0}),d=function(){v.data=h=++h%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var w=new l.MessageChannel;w.port1.onmessage=A,d=function(){w.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?d=function(){var G=l.document.createElement("script");G.onreadystatechange=function(){A(),G.onreadystatechange=null,G.parentNode.removeChild(G),G=null},l.document.documentElement.appendChild(G)}:d=function(){setTimeout(A,0)};var _,k=[];function A(){_=!0;for(var G,j,X=k.length;X;){for(j=k,k=[],G=-1;++G<X;)j[G]();X=k.length}_=!1}o.exports=B;function B(G){k.push(G)===1&&!_&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,c){"use strict";var l=s(1);function p(){}var d={},h=["REJECTED"],b=["FULFILLED"],v=["PENDING"];o.exports=w;function w(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,q!==p&&B(this,q)}w.prototype.catch=function(q){return this.then(null,q)},w.prototype.then=function(q,rt){if(typeof q!="function"&&this.state===b||typeof rt!="function"&&this.state===h)return this;var Q=new this.constructor(p);if(this.state!==v){var tt=this.state===b?q:rt;k(Q,tt,this.outcome)}else this.queue.push(new _(Q,q,rt));return Q};function _(q,rt,Q){this.promise=q,typeof rt=="function"&&(this.onFulfilled=rt,this.callFulfilled=this.otherCallFulfilled),typeof Q=="function"&&(this.onRejected=Q,this.callRejected=this.otherCallRejected)}_.prototype.callFulfilled=function(q){d.resolve(this.promise,q)},_.prototype.otherCallFulfilled=function(q){k(this.promise,this.onFulfilled,q)},_.prototype.callRejected=function(q){d.reject(this.promise,q)},_.prototype.otherCallRejected=function(q){k(this.promise,this.onRejected,q)};function k(q,rt,Q){l(function(){var tt;try{tt=rt(Q)}catch(lt){return d.reject(q,lt)}tt===q?d.reject(q,new TypeError("Cannot resolve promise with itself")):d.resolve(q,tt)})}d.resolve=function(q,rt){var Q=G(A,rt);if(Q.status==="error")return d.reject(q,Q.value);var tt=Q.value;if(tt)B(q,tt);else{q.state=b,q.outcome=rt;for(var lt=-1,kt=q.queue.length;++lt<kt;)q.queue[lt].callFulfilled(rt)}return q},d.reject=function(q,rt){q.state=h,q.outcome=rt;for(var Q=-1,tt=q.queue.length;++Q<tt;)q.queue[Q].callRejected(rt);return q};function A(q){var rt=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof rt=="function")return function(){rt.apply(q,arguments)}}function B(q,rt){var Q=!1;function tt(jt){Q||(Q=!0,d.reject(q,jt))}function lt(jt){Q||(Q=!0,d.resolve(q,jt))}function kt(){rt(lt,tt)}var At=G(kt);At.status==="error"&&tt(At.value)}function G(q,rt){var Q={};try{Q.value=q(rt),Q.status="success"}catch(tt){Q.status="error",Q.value=tt}return Q}w.resolve=j;function j(q){return q instanceof this?q:d.resolve(new this(p),q)}w.reject=X;function X(q){var rt=new this(p);return d.reject(rt,q)}w.all=_t;function _t(q){var rt=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=q.length,tt=!1;if(!Q)return this.resolve([]);for(var lt=new Array(Q),kt=0,At=-1,jt=new this(p);++At<Q;)Wt(q[At],At);return jt;function Wt(ft,Gt){rt.resolve(ft).then(st,function(et){tt||(tt=!0,d.reject(jt,et))});function st(et){lt[Gt]=et,++kt===Q&&!tt&&(tt=!0,d.resolve(jt,lt))}}}w.race=Dt;function Dt(q){var rt=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=q.length,tt=!1;if(!Q)return this.resolve([]);for(var lt=-1,kt=new this(p);++lt<Q;)At(q[lt]);return kt;function At(jt){rt.resolve(jt).then(function(Wt){tt||(tt=!0,d.resolve(kt,Wt))},function(Wt){tt||(tt=!0,d.reject(kt,Wt))})}}},{1:1}],3:[function(s,o,c){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,c){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};function p(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function d(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=d();function b(){try{if(!h||!h.open)return!1;var g=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),m=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||m)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(g,m){g=g||[],m=m||{};try{return new Blob(g,m)}catch(C){if(C.name!=="TypeError")throw C;for(var y=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,I=new y,S=0;S<g.length;S+=1)I.append(g[S]);return I.getBlob(m.type)}}typeof Promise>"u"&&s(3);var w=Promise;function _(g,m){m&&g.then(function(y){m(null,y)},function(y){m(y)})}function k(g,m,y){typeof m=="function"&&g.then(m),typeof y=="function"&&g.catch(y)}function A(g){return typeof g!="string"&&(console.warn(g+" used as a key, but it is not a string."),g=String(g)),g}function B(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var G="local-forage-detect-blob-support",j=void 0,X={},_t=Object.prototype.toString,Dt="readonly",q="readwrite";function rt(g){for(var m=g.length,y=new ArrayBuffer(m),I=new Uint8Array(y),S=0;S<m;S++)I[S]=g.charCodeAt(S);return y}function Q(g){return new w(function(m){var y=g.transaction(G,q),I=v([""]);y.objectStore(G).put(I,"key"),y.onabort=function(S){S.preventDefault(),S.stopPropagation(),m(!1)},y.oncomplete=function(){var S=navigator.userAgent.match(/Chrome\/(\d+)/),C=navigator.userAgent.match(/Edge\//);m(C||!S||parseInt(S[1],10)>=43)}}).catch(function(){return!1})}function tt(g){return typeof j=="boolean"?w.resolve(j):Q(g).then(function(m){return j=m,j})}function lt(g){var m=X[g.name],y={};y.promise=new w(function(I,S){y.resolve=I,y.reject=S}),m.deferredOperations.push(y),m.dbReady?m.dbReady=m.dbReady.then(function(){return y.promise}):m.dbReady=y.promise}function kt(g){var m=X[g.name],y=m.deferredOperations.pop();if(y)return y.resolve(),y.promise}function At(g,m){var y=X[g.name],I=y.deferredOperations.pop();if(I)return I.reject(m),I.promise}function jt(g,m){return new w(function(y,I){if(X[g.name]=X[g.name]||ui(),g.db)if(m)lt(g),g.db.close();else return y(g.db);var S=[g.name];m&&S.push(g.version);var C=h.open.apply(h,S);m&&(C.onupgradeneeded=function(O){var $=C.result;try{$.createObjectStore(g.storeName),O.oldVersion<=1&&$.createObjectStore(G)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+O.oldVersion+" to version "+O.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw W}}),C.onerror=function(O){O.preventDefault(),I(C.error)},C.onsuccess=function(){var O=C.result;O.onversionchange=function($){$.target.close()},y(O),kt(g)}})}function Wt(g){return jt(g,!1)}function ft(g){return jt(g,!0)}function Gt(g,m){if(!g.db)return!0;var y=!g.db.objectStoreNames.contains(g.storeName),I=g.version<g.db.version,S=g.version>g.db.version;if(I&&(g.version!==m&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),S||y){if(y){var C=g.db.version+1;C>g.version&&(g.version=C)}return!0}return!1}function st(g){return new w(function(m,y){var I=new FileReader;I.onerror=y,I.onloadend=function(S){var C=btoa(S.target.result||"");m({__local_forage_encoded_blob:!0,data:C,type:g.type})},I.readAsBinaryString(g)})}function et(g){var m=rt(atob(g.data));return v([m],{type:g.type})}function $t(g){return g&&g.__local_forage_encoded_blob}function ci(g){var m=this,y=m._initReady().then(function(){var I=X[m._dbInfo.name];if(I&&I.dbReady)return I.dbReady});return k(y,g,g),y}function li(g){lt(g);for(var m=X[g.name],y=m.forages,I=0;I<y.length;I++){var S=y[I];S._dbInfo.db&&(S._dbInfo.db.close(),S._dbInfo.db=null)}return g.db=null,Wt(g).then(function(C){return g.db=C,Gt(g)?ft(g):C}).then(function(C){g.db=m.db=C;for(var O=0;O<y.length;O++)y[O]._dbInfo.db=C}).catch(function(C){throw At(g,C),C})}function oe(g,m,y,I){I===void 0&&(I=1);try{var S=g.db.transaction(g.storeName,m);y(null,S)}catch(C){if(I>0&&(!g.db||C.name==="InvalidStateError"||C.name==="NotFoundError"))return w.resolve().then(function(){if(!g.db||C.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),ft(g)}).then(function(){return li(g).then(function(){oe(g,m,y,I-1)})}).catch(y);y(C)}}function ui(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Es(g){var m=this,y={db:null};if(g)for(var I in g)y[I]=g[I];var S=X[y.name];S||(S=ui(),X[y.name]=S),S.forages.push(m),m._initReady||(m._initReady=m.ready,m.ready=ci);var C=[];function O(){return w.resolve()}for(var $=0;$<S.forages.length;$++){var W=S.forages[$];W!==m&&C.push(W._initReady().catch(O))}var V=S.forages.slice(0);return w.all(C).then(function(){return y.db=S.db,Wt(y)}).then(function(F){return y.db=F,Gt(y,m._defaultConfig.version)?ft(y):F}).then(function(F){y.db=S.db=F,m._dbInfo=y;for(var J=0;J<V.length;J++){var it=V[J];it!==m&&(it._dbInfo.db=y.db,it._dbInfo.version=y.version)}})}function dn(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.get(g);V.onsuccess=function(){var F=V.result;F===void 0&&(F=null),$t(F)&&(F=et(F)),S(F)},V.onerror=function(){C(V.error)}}catch(F){C(F)}})}).catch(C)});return _(I,m),I}function Ss(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.openCursor(),F=1;V.onsuccess=function(){var J=V.result;if(J){var it=J.value;$t(it)&&(it=et(it));var vt=g(it,J.key,F++);vt!==void 0?S(vt):J.continue()}else S()},V.onerror=function(){C(V.error)}}catch(J){C(J)}})}).catch(C)});return _(I,m),I}function Is(g,m,y){var I=this;g=A(g);var S=new w(function(C,O){var $;I.ready().then(function(){return $=I._dbInfo,_t.call(m)==="[object Blob]"?tt($.db).then(function(W){return W?m:st(m)}):m}).then(function(W){oe(I._dbInfo,q,function(V,F){if(V)return O(V);try{var J=F.objectStore(I._dbInfo.storeName);W===null&&(W=void 0);var it=J.put(W,g);F.oncomplete=function(){W===void 0&&(W=null),C(W)},F.onabort=F.onerror=function(){var vt=it.error?it.error:it.transaction.error;O(vt)}}catch(vt){O(vt)}})}).catch(O)});return _(S,y),S}function hi(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,q,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.delete(g);$.oncomplete=function(){S()},$.onerror=function(){C(V.error)},$.onabort=function(){var F=V.error?V.error:V.transaction.error;C(F)}}catch(F){C(F)}})}).catch(C)});return _(I,m),I}function Lr(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,q,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.clear();O.oncomplete=function(){I()},O.onabort=O.onerror=function(){var V=W.error?W.error:W.transaction.error;S(V)}}catch(V){S(V)}})}).catch(S)});return _(y,g),y}function ae(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,Dt,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.count();W.onsuccess=function(){I(W.result)},W.onerror=function(){S(W.error)}}catch(V){S(V)}})}).catch(S)});return _(y,g),y}function fn(g,m){var y=this,I=new w(function(S,C){if(g<0){S(null);return}y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=!1,F=W.openKeyCursor();F.onsuccess=function(){var J=F.result;if(!J){S(null);return}g===0||V?S(J.key):(V=!0,J.advance(g))},F.onerror=function(){C(F.error)}}catch(J){C(J)}})}).catch(C)});return _(I,m),I}function Cs(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,Dt,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.openKeyCursor(),V=[];W.onsuccess=function(){var F=W.result;if(!F){I(V);return}V.push(F.key),F.continue()},W.onerror=function(){S(W.error)}}catch(F){S(F)}})}).catch(S)});return _(y,g),y}function a(g,m){m=B.apply(this,arguments);var y=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||y.name,g.storeName=g.storeName||y.storeName);var I=this,S;if(!g.name)S=w.reject("Invalid arguments");else{var C=g.name===y.name&&I._dbInfo.db,O=C?w.resolve(I._dbInfo.db):Wt(g).then(function($){var W=X[g.name],V=W.forages;W.db=$;for(var F=0;F<V.length;F++)V[F]._dbInfo.db=$;return $});g.storeName?S=O.then(function($){if($.objectStoreNames.contains(g.storeName)){var W=$.version+1;lt(g);var V=X[g.name],F=V.forages;$.close();for(var J=0;J<F.length;J++){var it=F[J];it._dbInfo.db=null,it._dbInfo.version=W}var vt=new w(function(pt,Pt){var It=h.open(g.name,W);It.onerror=function(ce){var Ns=It.result;Ns.close(),Pt(ce)},It.onupgradeneeded=function(){var ce=It.result;ce.deleteObjectStore(g.storeName)},It.onsuccess=function(){var ce=It.result;ce.close(),pt(ce)}});return vt.then(function(pt){V.db=pt;for(var Pt=0;Pt<F.length;Pt++){var It=F[Pt];It._dbInfo.db=pt,kt(It._dbInfo)}}).catch(function(pt){throw(At(g,pt)||w.resolve()).catch(function(){}),pt})}}):S=O.then(function($){lt(g);var W=X[g.name],V=W.forages;$.close();for(var F=0;F<V.length;F++){var J=V[F];J._dbInfo.db=null}var it=new w(function(vt,pt){var Pt=h.deleteDatabase(g.name);Pt.onerror=function(){var It=Pt.result;It&&It.close(),pt(Pt.error)},Pt.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},Pt.onsuccess=function(){var It=Pt.result;It&&It.close(),vt(It)}});return it.then(function(vt){W.db=vt;for(var pt=0;pt<V.length;pt++){var Pt=V[pt];kt(Pt._dbInfo)}}).catch(function(vt){throw(At(g,vt)||w.resolve()).catch(function(){}),vt})})}return _(S,m),S}var u={_driver:"asyncStorage",_initStorage:Es,_support:b(),iterate:Ss,getItem:dn,setItem:Is,removeItem:hi,clear:Lr,length:ae,key:fn,keys:Cs,dropInstance:a};function f(){return typeof openDatabase=="function"}var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D="~~local_forage_type~",M=/^~~local_forage_type~([^~]+)~/,Y="__lfsc__:",ut=Y.length,Nt="arbf",gt="blob",St="si08",Ut="ui08",hr="uic8",gn="si16",mn="si32",lc="ur16",uc="ui32",hc="fl32",pc="fl64",dc=ut+Nt.length,fc=Object.prototype.toString;function gc(g){var m=g.length*.75,y=g.length,I,S=0,C,O,$,W;g[g.length-1]==="="&&(m--,g[g.length-2]==="="&&m--);var V=new ArrayBuffer(m),F=new Uint8Array(V);for(I=0;I<y;I+=4)C=E.indexOf(g[I]),O=E.indexOf(g[I+1]),$=E.indexOf(g[I+2]),W=E.indexOf(g[I+3]),F[S++]=C<<2|O>>4,F[S++]=(O&15)<<4|$>>2,F[S++]=($&3)<<6|W&63;return V}function Ts(g){var m=new Uint8Array(g),y="",I;for(I=0;I<m.length;I+=3)y+=E[m[I]>>2],y+=E[(m[I]&3)<<4|m[I+1]>>4],y+=E[(m[I+1]&15)<<2|m[I+2]>>6],y+=E[m[I+2]&63];return m.length%3===2?y=y.substring(0,y.length-1)+"=":m.length%3===1&&(y=y.substring(0,y.length-2)+"=="),y}function Rp(g,m){var y="";if(g&&(y=fc.call(g)),g&&(y==="[object ArrayBuffer]"||g.buffer&&fc.call(g.buffer)==="[object ArrayBuffer]")){var I,S=Y;g instanceof ArrayBuffer?(I=g,S+=Nt):(I=g.buffer,y==="[object Int8Array]"?S+=St:y==="[object Uint8Array]"?S+=Ut:y==="[object Uint8ClampedArray]"?S+=hr:y==="[object Int16Array]"?S+=gn:y==="[object Uint16Array]"?S+=lc:y==="[object Int32Array]"?S+=mn:y==="[object Uint32Array]"?S+=uc:y==="[object Float32Array]"?S+=hc:y==="[object Float64Array]"?S+=pc:m(new Error("Failed to get type for BinaryArray"))),m(S+Ts(I))}else if(y==="[object Blob]"){var C=new FileReader;C.onload=function(){var O=D+g.type+"~"+Ts(this.result);m(Y+gt+O)},C.readAsArrayBuffer(g)}else try{m(JSON.stringify(g))}catch(O){console.error("Couldn't convert value into a JSON string: ",g),m(null,O)}}function Lp(g){if(g.substring(0,ut)!==Y)return JSON.parse(g);var m=g.substring(dc),y=g.substring(ut,dc),I;if(y===gt&&M.test(m)){var S=m.match(M);I=S[1],m=m.substring(S[0].length)}var C=gc(m);switch(y){case Nt:return C;case gt:return v([C],{type:I});case St:return new Int8Array(C);case Ut:return new Uint8Array(C);case hr:return new Uint8ClampedArray(C);case gn:return new Int16Array(C);case lc:return new Uint16Array(C);case mn:return new Int32Array(C);case uc:return new Uint32Array(C);case hc:return new Float32Array(C);case pc:return new Float64Array(C);default:throw new Error("Unkown type: "+y)}}var xs={serialize:Rp,deserialize:Lp,stringToBuffer:gc,bufferToString:Ts};function mc(g,m,y,I){g.executeSql("CREATE TABLE IF NOT EXISTS "+m.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],y,I)}function Mp(g){var m=this,y={db:null};if(g)for(var I in g)y[I]=typeof g[I]!="string"?g[I].toString():g[I];var S=new w(function(C,O){try{y.db=openDatabase(y.name,String(y.version),y.description,y.size)}catch($){return O($)}y.db.transaction(function($){mc($,y,function(){m._dbInfo=y,C()},function(W,V){O(V)})},O)});return y.serializer=xs,S}function Je(g,m,y,I,S,C){g.executeSql(y,I,S,function(O,$){$.code===$.SYNTAX_ERR?O.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[m.storeName],function(W,V){V.rows.length?C(W,$):mc(W,m,function(){W.executeSql(y,I,S,C)},C)},C):C(O,$)},C)}function Up(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT * FROM "+O.storeName+" WHERE key = ? LIMIT 1",[g],function(W,V){var F=V.rows.length?V.rows.item(0).value:null;F&&(F=O.serializer.deserialize(F)),S(F)},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function Bp(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT * FROM "+O.storeName,[],function(W,V){for(var F=V.rows,J=F.length,it=0;it<J;it++){var vt=F.item(it),pt=vt.value;if(pt&&(pt=O.serializer.deserialize(pt)),pt=g(pt,vt.key,it+1),pt!==void 0){S(pt);return}}S()},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function yc(g,m,y,I){var S=this;g=A(g);var C=new w(function(O,$){S.ready().then(function(){m===void 0&&(m=null);var W=m,V=S._dbInfo;V.serializer.serialize(m,function(F,J){J?$(J):V.db.transaction(function(it){Je(it,V,"INSERT OR REPLACE INTO "+V.storeName+" (key, value) VALUES (?, ?)",[g,F],function(){O(W)},function(vt,pt){$(pt)})},function(it){if(it.code===it.QUOTA_ERR){if(I>0){O(yc.apply(S,[g,W,y,I-1]));return}$(it)}})})}).catch($)});return _(C,y),C}function jp(g,m,y){return yc.apply(this,[g,m,y,1])}function $p(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"DELETE FROM "+O.storeName+" WHERE key = ?",[g],function(){S()},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function Fp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"DELETE FROM "+C.storeName,[],function(){I()},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Hp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"SELECT COUNT(key) as c FROM "+C.storeName,[],function($,W){var V=W.rows.item(0).c;I(V)},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Vp(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT key FROM "+O.storeName+" WHERE id = ? LIMIT 1",[g+1],function(W,V){var F=V.rows.length?V.rows.item(0).key:null;S(F)},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function qp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"SELECT key FROM "+C.storeName,[],function($,W){for(var V=[],F=0;F<W.rows.length;F++)V.push(W.rows.item(F).key);I(V)},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Wp(g){return new w(function(m,y){g.transaction(function(I){I.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(S,C){for(var O=[],$=0;$<C.rows.length;$++)O.push(C.rows.item($).name);m({db:g,storeNames:O})},function(S,C){y(C)})},function(I){y(I)})})}function Gp(g,m){m=B.apply(this,arguments);var y=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||y.name,g.storeName=g.storeName||y.storeName);var I=this,S;return g.name?S=new w(function(C){var O;g.name===y.name?O=I._dbInfo.db:O=openDatabase(g.name,"","",0),g.storeName?C({db:O,storeNames:[g.storeName]}):C(Wp(O))}).then(function(C){return new w(function(O,$){C.db.transaction(function(W){function V(vt){return new w(function(pt,Pt){W.executeSql("DROP TABLE IF EXISTS "+vt,[],function(){pt()},function(It,ce){Pt(ce)})})}for(var F=[],J=0,it=C.storeNames.length;J<it;J++)F.push(V(C.storeNames[J]));w.all(F).then(function(){O()}).catch(function(vt){$(vt)})},function(W){$(W)})})}):S=w.reject("Invalid arguments"),_(S,m),S}var zp={_driver:"webSQLStorage",_initStorage:Mp,_support:f(),iterate:Bp,getItem:Up,setItem:jp,removeItem:$p,clear:Fp,length:Hp,key:Vp,keys:qp,dropInstance:Gp};function Yp(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function vc(g,m){var y=g.name+"/";return g.storeName!==m.storeName&&(y+=g.storeName+"/"),y}function Kp(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function Jp(){return!Kp()||localStorage.length>0}function Xp(g){var m=this,y={};if(g)for(var I in g)y[I]=g[I];return y.keyPrefix=vc(g,m._defaultConfig),Jp()?(m._dbInfo=y,y.serializer=xs,w.resolve()):w.reject()}function Qp(g){var m=this,y=m.ready().then(function(){for(var I=m._dbInfo.keyPrefix,S=localStorage.length-1;S>=0;S--){var C=localStorage.key(S);C.indexOf(I)===0&&localStorage.removeItem(C)}});return _(y,g),y}function Zp(g,m){var y=this;g=A(g);var I=y.ready().then(function(){var S=y._dbInfo,C=localStorage.getItem(S.keyPrefix+g);return C&&(C=S.serializer.deserialize(C)),C});return _(I,m),I}function td(g,m){var y=this,I=y.ready().then(function(){for(var S=y._dbInfo,C=S.keyPrefix,O=C.length,$=localStorage.length,W=1,V=0;V<$;V++){var F=localStorage.key(V);if(F.indexOf(C)===0){var J=localStorage.getItem(F);if(J&&(J=S.serializer.deserialize(J)),J=g(J,F.substring(O),W++),J!==void 0)return J}}});return _(I,m),I}function ed(g,m){var y=this,I=y.ready().then(function(){var S=y._dbInfo,C;try{C=localStorage.key(g)}catch{C=null}return C&&(C=C.substring(S.keyPrefix.length)),C});return _(I,m),I}function rd(g){var m=this,y=m.ready().then(function(){for(var I=m._dbInfo,S=localStorage.length,C=[],O=0;O<S;O++){var $=localStorage.key(O);$.indexOf(I.keyPrefix)===0&&C.push($.substring(I.keyPrefix.length))}return C});return _(y,g),y}function nd(g){var m=this,y=m.keys().then(function(I){return I.length});return _(y,g),y}function id(g,m){var y=this;g=A(g);var I=y.ready().then(function(){var S=y._dbInfo;localStorage.removeItem(S.keyPrefix+g)});return _(I,m),I}function sd(g,m,y){var I=this;g=A(g);var S=I.ready().then(function(){m===void 0&&(m=null);var C=m;return new w(function(O,$){var W=I._dbInfo;W.serializer.serialize(m,function(V,F){if(F)$(F);else try{localStorage.setItem(W.keyPrefix+g,V),O(C)}catch(J){(J.name==="QuotaExceededError"||J.name==="NS_ERROR_DOM_QUOTA_REACHED")&&$(J),$(J)}})})});return _(S,y),S}function od(g,m){if(m=B.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var y=this.config();g.name=g.name||y.name,g.storeName=g.storeName||y.storeName}var I=this,S;return g.name?S=new w(function(C){g.storeName?C(vc(g,I._defaultConfig)):C(g.name+"/")}).then(function(C){for(var O=localStorage.length-1;O>=0;O--){var $=localStorage.key(O);$.indexOf(C)===0&&localStorage.removeItem($)}}):S=w.reject("Invalid arguments"),_(S,m),S}var ad={_driver:"localStorageWrapper",_initStorage:Xp,_support:Yp(),iterate:td,getItem:Zp,setItem:sd,removeItem:id,clear:Qp,length:nd,key:ed,keys:rd,dropInstance:od},cd=function(g,m){return g===m||typeof g=="number"&&typeof m=="number"&&isNaN(g)&&isNaN(m)},ld=function(g,m){for(var y=g.length,I=0;I<y;){if(cd(g[I],m))return!0;I++}return!1},wc=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},yn={},bc={},Mr={INDEXEDDB:u,WEBSQL:zp,LOCALSTORAGE:ad},ud=[Mr.INDEXEDDB._driver,Mr.WEBSQL._driver,Mr.LOCALSTORAGE._driver],pi=["dropInstance"],Ds=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(pi),hd={description:"",driver:ud.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function pd(g,m){g[m]=function(){var y=arguments;return g.ready().then(function(){return g[m].apply(g,y)})}}function As(){for(var g=1;g<arguments.length;g++){var m=arguments[g];if(m)for(var y in m)m.hasOwnProperty(y)&&(wc(m[y])?arguments[0][y]=m[y].slice():arguments[0][y]=m[y])}return arguments[0]}var dd=function(){function g(m){p(this,g);for(var y in Mr)if(Mr.hasOwnProperty(y)){var I=Mr[y],S=I._driver;this[y]=S,yn[S]||this.defineDriver(I)}this._defaultConfig=As({},hd),this._config=As({},this._defaultConfig,m),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return g.prototype.config=function(m){if((typeof m>"u"?"undefined":l(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var y in m){if(y==="storeName"&&(m[y]=m[y].replace(/\W/g,"_")),y==="version"&&typeof m[y]!="number")return new Error("Database version must be a number.");this._config[y]=m[y]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},g.prototype.defineDriver=function(m,y,I){var S=new w(function(C,O){try{var $=m._driver,W=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){O(W);return}for(var V=Ds.concat("_initStorage"),F=0,J=V.length;F<J;F++){var it=V[F],vt=!ld(pi,it);if((vt||m[it])&&typeof m[it]!="function"){O(W);return}}var pt=function(){for(var It=function(gd){return function(){var md=new Error("Method "+gd+" is not implemented by the current driver"),_c=w.reject(md);return _(_c,arguments[arguments.length-1]),_c}},ce=0,Ns=pi.length;ce<Ns;ce++){var Os=pi[ce];m[Os]||(m[Os]=It(Os))}};pt();var Pt=function(It){yn[$]&&console.info("Redefining LocalForage driver: "+$),yn[$]=m,bc[$]=It,C()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(Pt,O):Pt(!!m._support):Pt(!0)}catch(It){O(It)}});return k(S,y,I),S},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(m,y,I){var S=yn[m]?w.resolve(yn[m]):w.reject(new Error("Driver not found."));return k(S,y,I),S},g.prototype.getSerializer=function(m){var y=w.resolve(xs);return k(y,m),y},g.prototype.ready=function(m){var y=this,I=y._driverSet.then(function(){return y._ready===null&&(y._ready=y._initDriver()),y._ready});return k(I,m,m),I},g.prototype.setDriver=function(m,y,I){var S=this;wc(m)||(m=[m]);var C=this._getSupportedDrivers(m);function O(){S._config.driver=S.driver()}function $(F){return S._extend(F),O(),S._ready=S._initStorage(S._config),S._ready}function W(F){return function(){var J=0;function it(){for(;J<F.length;){var vt=F[J];return J++,S._dbInfo=null,S._ready=null,S.getDriver(vt).then($).catch(it)}O();var pt=new Error("No available storage method found.");return S._driverSet=w.reject(pt),S._driverSet}return it()}}var V=this._driverSet!==null?this._driverSet.catch(function(){return w.resolve()}):w.resolve();return this._driverSet=V.then(function(){var F=C[0];return S._dbInfo=null,S._ready=null,S.getDriver(F).then(function(J){S._driver=J._driver,O(),S._wrapLibraryMethodsWithReady(),S._initDriver=W(C)})}).catch(function(){O();var F=new Error("No available storage method found.");return S._driverSet=w.reject(F),S._driverSet}),k(this._driverSet,y,I),this._driverSet},g.prototype.supports=function(m){return!!bc[m]},g.prototype._extend=function(m){As(this,m)},g.prototype._getSupportedDrivers=function(m){for(var y=[],I=0,S=m.length;I<S;I++){var C=m[I];this.supports(C)&&y.push(C)}return y},g.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,y=Ds.length;m<y;m++)pd(this,Ds[m])},g.prototype.createInstance=function(m){return new g(m)},g}(),fd=new dd;o.exports=fd},{3:3}]},{},[4])(4)})}),fu=rs(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URLBuilder=void 0;var e=function(){function r(n){try{this.base=new URL(n),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return r.prototype.appendQueryParam=function(n,i){this.params.append(n,i?i.toString():"")},r.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},r.prototype.deleteQueryParam=function(n){this.params.delete(n)},r.prototype.getBase=function(){return this.base},r.prototype.getPath=function(){return this.base.pathname},r.prototype.getHostname=function(){return this.base.hostname},r.prototype.getParams=function(){return this.params},r.prototype.getQueryParam=function(n){if(!this.params)return"";var i=this.params.get(n);return!i||i==="undefined"||i==="null"?void 0:i},r.prototype.getQueryString=function(){return this.params.toString()},r.prototype.setPath=function(n){return this.base.pathname=n,this},r.prototype.setQueryParam=function(n,i){return this.params.set(n,i?i.toString():""),this},r.prototype.setQueryString=function(n){if(n)return n[0]==="?"&&(n=n.slice(1)),this.params=new URLSearchParams(n),this},r.prototype.toString=function(){var n=this.params.toString();return n===""?this.base.search="":this.base.search="?"+n,this.base.toString()},r}();t.URLBuilder=e}),Pd=rs((t,e)=>{"use strict";(function(r,n){typeof t=="object"&&typeof e<"u"?e.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.fetchRetry=n())})(t,function(){"use strict";var r=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!n(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!n(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var c={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(c,o),function(l,p){var d=o.retries,h=o.retryDelay,b=o.retryOn;if(p&&p.retries!==void 0)if(n(p.retries))d=p.retries;else throw new i("retries must be a positive integer");if(p&&p.retryDelay!==void 0)if(n(p.retryDelay)||typeof p.retryDelay=="function")h=p.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(p&&p.retryOn)if(Array.isArray(p.retryOn)||typeof p.retryOn=="function")b=p.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(v,w){var _=function(A){var B=typeof Request<"u"&&l instanceof Request?l.clone():l;s(B,p).then(function(G){if(Array.isArray(b)&&b.indexOf(G.status)===-1)v(G);else if(typeof b=="function")try{return Promise.resolve(b(A,null,G)).then(function(j){j?k(A,null,G):v(G)}).catch(w)}catch(j){w(j)}else A<d?k(A,null,G):v(G)}).catch(function(G){if(typeof b=="function")try{Promise.resolve(b(A,G,null)).then(function(j){j?k(A,G,null):w(G)}).catch(function(j){w(j)})}catch(j){w(j)}else A<d?k(A,G,null):w(G)})};function k(A,B,G){var j=typeof h=="function"?h(A,B,G):h;setTimeout(function(){_(++A)},j)}_(0)})}};function n(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return r})}),Rd="9.12.6",H=class co{static SDK_VERSION=Rd;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=co.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");co.SDK_VERSION_CODE=parseInt(e,10)}},qe={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${H.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${H.SDK_VERSION}/dist/widget.min.js`},he=ke(sn()),T=class{static log(...t){he.default.info(...t)}static debug(...t){he.default.debug(...t)}static error(...t){he.default.error(...t)}static warn(...t){he.default.warn(...t)}static info(...t){he.default.info(...t)}static trace(...t){he.default.trace(...t)}};function Ld(t=H.LOG_PREFIX){he.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${H.SDK_VERSION}):`)}});let e=gu();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?he.default.setLevel(he.default[localStorage.cooeeLogLevel]):he.default.setLevel(qe.debug?he.default.TRACE:he.default.OFF)}function gu(){return new URL(location.href).searchParams?.get("cooee-debug")}function Md(){let t=`
|
|
1
|
+
"use strict";(()=>{var yd=Object.create;var Ec=Object.defineProperty;var vd=Object.getOwnPropertyDescriptor;var wd=Object.getOwnPropertyNames;var bd=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty;var Ed=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wd(e))!_d.call(t,i)&&i!==r&&Ec(t,i,{get:()=>e[i],enumerable:!(n=vd(e,i))||n.enumerable});return t};var Sd=(t,e,r)=>(r=t!=null?yd(bd(t)):{},Ed(e||!t||!t.__esModule?Ec(r,"default",{value:t,enumerable:!0}):r,t));var Id=Object.create,ta=Object.defineProperty,Cd=Object.defineProperties,Td=Object.getOwnPropertyDescriptor,xd=Object.getOwnPropertyDescriptors,Dd=Object.getOwnPropertyNames,Sc=Object.getOwnPropertySymbols,Ad=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty,Nd=Object.prototype.propertyIsEnumerable,Ic=(t,e,r)=>e in t?ta(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||={})du.call(e,r)&&Ic(t,r,e[r]);if(Sc)for(var r of Sc(e))Nd.call(e,r)&&Ic(t,r,e[r]);return t},yt=(t,e)=>Cd(t,xd(e)),di=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),rs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Od=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Dd(e))!du.call(t,i)&&i!==r&&ta(t,i,{get:()=>e[i],enumerable:!(n=Td(e,i))||n.enumerable});return t},ke=(t,e,r)=>(r=t!=null?Id(Ad(t)):{},Od(e||!t||!t.__esModule?ta(r,"default",{value:t,enumerable:!0}):r,t)),sn=rs((t,e)=>{"use strict";(function(r){"use strict";var n={};n.VERSION="1.6.1";var i,s={},o=function(h,b){return function(){return b.apply(h,arguments)}},c=function(){var h=arguments,b=h[0],v,w;for(w=1;w<h.length;w++)for(v in h[w])!(v in b)&&h[w].hasOwnProperty(v)&&(b[v]=h[w][v]);return b},l=function(h,b){return{value:h,name:b}};n.TRACE=l(1,"TRACE"),n.DEBUG=l(2,"DEBUG"),n.INFO=l(3,"INFO"),n.TIME=l(4,"TIME"),n.WARN=l(5,"WARN"),n.ERROR=l(8,"ERROR"),n.OFF=l(99,"OFF");var p=function(h){this.context=h,this.setLevel(h.filterLevel),this.log=this.info};p.prototype={setLevel:function(h){h&&"value"in h&&(this.context.filterLevel=h)},getLevel:function(){return this.context.filterLevel},enabledFor:function(h){var b=this.context.filterLevel;return h.value>=b.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"start"])},timeEnd:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"end"])},invoke:function(h,b){i&&this.enabledFor(h)&&i(b,c({level:h},this.context))}};var d=new p({filterLevel:n.OFF});(function(){var h=n;h.enabledFor=o(d,d.enabledFor),h.trace=o(d,d.trace),h.debug=o(d,d.debug),h.time=o(d,d.time),h.timeEnd=o(d,d.timeEnd),h.info=o(d,d.info),h.warn=o(d,d.warn),h.error=o(d,d.error),h.log=h.info})(),n.setHandler=function(h){i=h},n.setLevel=function(h){d.setLevel(h);for(var b in s)s.hasOwnProperty(b)&&s[b].setLevel(h)},n.getLevel=function(){return d.getLevel()},n.get=function(h){return s[h]||(s[h]=new p(c({name:h},d.context)))},n.createDefaultHandler=function(h){h=h||{},h.formatter=h.formatter||function(w,_){_.name&&w.unshift("["+_.name+"]")};var b={},v=function(w,_){Function.prototype.apply.call(w,console,_)};return typeof console>"u"?function(){}:function(w,_){w=Array.prototype.slice.call(w);var k=console.log,A;_.level===n.TIME?(A=(_.name?"["+_.name+"] ":"")+w[0],w[1]==="start"?console.time?console.time(A):b[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):v(k,[A+": "+(new Date().getTime()-b[A])+"ms"])):(_.level===n.WARN&&console.warn?k=console.warn:_.level===n.ERROR&&console.error?k=console.error:_.level===n.INFO&&console.info?k=console.info:_.level===n.DEBUG&&console.debug?k=console.debug:_.level===n.TRACE&&console.trace&&(k=console.trace),h.formatter(w,_),v(k,w))}},n.useDefaults=function(h){n.setLevel(h&&h.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(h))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof e<"u"&&e.exports?e.exports=n:(n._prevLogger=r.Logger,n.noConflict=function(){return r.Logger=n._prevLogger,n},r.Logger=n)})(t)}),kd=rs((t,e)=>{"use strict";(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){var r,n,i;return function s(o,c,l){function p(b,v){if(!c[b]){if(!o[b]){var w=typeof di=="function"&&di;if(!v&&w)return w(b,!0);if(d)return d(b,!0);var _=new Error("Cannot find module '"+b+"'");throw _.code="MODULE_NOT_FOUND",_}var k=c[b]={exports:{}};o[b][0].call(k.exports,function(A){var B=o[b][1][A];return p(B||A)},k,k.exports,s,o,c,l)}return c[b].exports}for(var d=typeof di=="function"&&di,h=0;h<l.length;h++)p(l[h]);return p}({1:[function(s,o,c){(function(l){"use strict";var p=l.MutationObserver||l.WebKitMutationObserver,d;if(p){var h=0,b=new p(A),v=l.document.createTextNode("");b.observe(v,{characterData:!0}),d=function(){v.data=h=++h%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var w=new l.MessageChannel;w.port1.onmessage=A,d=function(){w.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?d=function(){var G=l.document.createElement("script");G.onreadystatechange=function(){A(),G.onreadystatechange=null,G.parentNode.removeChild(G),G=null},l.document.documentElement.appendChild(G)}:d=function(){setTimeout(A,0)};var _,k=[];function A(){_=!0;for(var G,j,X=k.length;X;){for(j=k,k=[],G=-1;++G<X;)j[G]();X=k.length}_=!1}o.exports=B;function B(G){k.push(G)===1&&!_&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,c){"use strict";var l=s(1);function p(){}var d={},h=["REJECTED"],b=["FULFILLED"],v=["PENDING"];o.exports=w;function w(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,q!==p&&B(this,q)}w.prototype.catch=function(q){return this.then(null,q)},w.prototype.then=function(q,rt){if(typeof q!="function"&&this.state===b||typeof rt!="function"&&this.state===h)return this;var Q=new this.constructor(p);if(this.state!==v){var tt=this.state===b?q:rt;k(Q,tt,this.outcome)}else this.queue.push(new _(Q,q,rt));return Q};function _(q,rt,Q){this.promise=q,typeof rt=="function"&&(this.onFulfilled=rt,this.callFulfilled=this.otherCallFulfilled),typeof Q=="function"&&(this.onRejected=Q,this.callRejected=this.otherCallRejected)}_.prototype.callFulfilled=function(q){d.resolve(this.promise,q)},_.prototype.otherCallFulfilled=function(q){k(this.promise,this.onFulfilled,q)},_.prototype.callRejected=function(q){d.reject(this.promise,q)},_.prototype.otherCallRejected=function(q){k(this.promise,this.onRejected,q)};function k(q,rt,Q){l(function(){var tt;try{tt=rt(Q)}catch(lt){return d.reject(q,lt)}tt===q?d.reject(q,new TypeError("Cannot resolve promise with itself")):d.resolve(q,tt)})}d.resolve=function(q,rt){var Q=G(A,rt);if(Q.status==="error")return d.reject(q,Q.value);var tt=Q.value;if(tt)B(q,tt);else{q.state=b,q.outcome=rt;for(var lt=-1,kt=q.queue.length;++lt<kt;)q.queue[lt].callFulfilled(rt)}return q},d.reject=function(q,rt){q.state=h,q.outcome=rt;for(var Q=-1,tt=q.queue.length;++Q<tt;)q.queue[Q].callRejected(rt);return q};function A(q){var rt=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof rt=="function")return function(){rt.apply(q,arguments)}}function B(q,rt){var Q=!1;function tt(jt){Q||(Q=!0,d.reject(q,jt))}function lt(jt){Q||(Q=!0,d.resolve(q,jt))}function kt(){rt(lt,tt)}var At=G(kt);At.status==="error"&&tt(At.value)}function G(q,rt){var Q={};try{Q.value=q(rt),Q.status="success"}catch(tt){Q.status="error",Q.value=tt}return Q}w.resolve=j;function j(q){return q instanceof this?q:d.resolve(new this(p),q)}w.reject=X;function X(q){var rt=new this(p);return d.reject(rt,q)}w.all=_t;function _t(q){var rt=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=q.length,tt=!1;if(!Q)return this.resolve([]);for(var lt=new Array(Q),kt=0,At=-1,jt=new this(p);++At<Q;)Wt(q[At],At);return jt;function Wt(ft,Gt){rt.resolve(ft).then(st,function(et){tt||(tt=!0,d.reject(jt,et))});function st(et){lt[Gt]=et,++kt===Q&&!tt&&(tt=!0,d.resolve(jt,lt))}}}w.race=Dt;function Dt(q){var rt=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=q.length,tt=!1;if(!Q)return this.resolve([]);for(var lt=-1,kt=new this(p);++lt<Q;)At(q[lt]);return kt;function At(jt){rt.resolve(jt).then(function(Wt){tt||(tt=!0,d.resolve(kt,Wt))},function(Wt){tt||(tt=!0,d.reject(kt,Wt))})}}},{1:1}],3:[function(s,o,c){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,c){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};function p(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function d(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=d();function b(){try{if(!h||!h.open)return!1;var g=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),m=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||m)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(g,m){g=g||[],m=m||{};try{return new Blob(g,m)}catch(C){if(C.name!=="TypeError")throw C;for(var y=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,I=new y,S=0;S<g.length;S+=1)I.append(g[S]);return I.getBlob(m.type)}}typeof Promise>"u"&&s(3);var w=Promise;function _(g,m){m&&g.then(function(y){m(null,y)},function(y){m(y)})}function k(g,m,y){typeof m=="function"&&g.then(m),typeof y=="function"&&g.catch(y)}function A(g){return typeof g!="string"&&(console.warn(g+" used as a key, but it is not a string."),g=String(g)),g}function B(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var G="local-forage-detect-blob-support",j=void 0,X={},_t=Object.prototype.toString,Dt="readonly",q="readwrite";function rt(g){for(var m=g.length,y=new ArrayBuffer(m),I=new Uint8Array(y),S=0;S<m;S++)I[S]=g.charCodeAt(S);return y}function Q(g){return new w(function(m){var y=g.transaction(G,q),I=v([""]);y.objectStore(G).put(I,"key"),y.onabort=function(S){S.preventDefault(),S.stopPropagation(),m(!1)},y.oncomplete=function(){var S=navigator.userAgent.match(/Chrome\/(\d+)/),C=navigator.userAgent.match(/Edge\//);m(C||!S||parseInt(S[1],10)>=43)}}).catch(function(){return!1})}function tt(g){return typeof j=="boolean"?w.resolve(j):Q(g).then(function(m){return j=m,j})}function lt(g){var m=X[g.name],y={};y.promise=new w(function(I,S){y.resolve=I,y.reject=S}),m.deferredOperations.push(y),m.dbReady?m.dbReady=m.dbReady.then(function(){return y.promise}):m.dbReady=y.promise}function kt(g){var m=X[g.name],y=m.deferredOperations.pop();if(y)return y.resolve(),y.promise}function At(g,m){var y=X[g.name],I=y.deferredOperations.pop();if(I)return I.reject(m),I.promise}function jt(g,m){return new w(function(y,I){if(X[g.name]=X[g.name]||ui(),g.db)if(m)lt(g),g.db.close();else return y(g.db);var S=[g.name];m&&S.push(g.version);var C=h.open.apply(h,S);m&&(C.onupgradeneeded=function(O){var $=C.result;try{$.createObjectStore(g.storeName),O.oldVersion<=1&&$.createObjectStore(G)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+O.oldVersion+" to version "+O.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw W}}),C.onerror=function(O){O.preventDefault(),I(C.error)},C.onsuccess=function(){var O=C.result;O.onversionchange=function($){$.target.close()},y(O),kt(g)}})}function Wt(g){return jt(g,!1)}function ft(g){return jt(g,!0)}function Gt(g,m){if(!g.db)return!0;var y=!g.db.objectStoreNames.contains(g.storeName),I=g.version<g.db.version,S=g.version>g.db.version;if(I&&(g.version!==m&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),S||y){if(y){var C=g.db.version+1;C>g.version&&(g.version=C)}return!0}return!1}function st(g){return new w(function(m,y){var I=new FileReader;I.onerror=y,I.onloadend=function(S){var C=btoa(S.target.result||"");m({__local_forage_encoded_blob:!0,data:C,type:g.type})},I.readAsBinaryString(g)})}function et(g){var m=rt(atob(g.data));return v([m],{type:g.type})}function $t(g){return g&&g.__local_forage_encoded_blob}function ci(g){var m=this,y=m._initReady().then(function(){var I=X[m._dbInfo.name];if(I&&I.dbReady)return I.dbReady});return k(y,g,g),y}function li(g){lt(g);for(var m=X[g.name],y=m.forages,I=0;I<y.length;I++){var S=y[I];S._dbInfo.db&&(S._dbInfo.db.close(),S._dbInfo.db=null)}return g.db=null,Wt(g).then(function(C){return g.db=C,Gt(g)?ft(g):C}).then(function(C){g.db=m.db=C;for(var O=0;O<y.length;O++)y[O]._dbInfo.db=C}).catch(function(C){throw At(g,C),C})}function oe(g,m,y,I){I===void 0&&(I=1);try{var S=g.db.transaction(g.storeName,m);y(null,S)}catch(C){if(I>0&&(!g.db||C.name==="InvalidStateError"||C.name==="NotFoundError"))return w.resolve().then(function(){if(!g.db||C.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),ft(g)}).then(function(){return li(g).then(function(){oe(g,m,y,I-1)})}).catch(y);y(C)}}function ui(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Es(g){var m=this,y={db:null};if(g)for(var I in g)y[I]=g[I];var S=X[y.name];S||(S=ui(),X[y.name]=S),S.forages.push(m),m._initReady||(m._initReady=m.ready,m.ready=ci);var C=[];function O(){return w.resolve()}for(var $=0;$<S.forages.length;$++){var W=S.forages[$];W!==m&&C.push(W._initReady().catch(O))}var V=S.forages.slice(0);return w.all(C).then(function(){return y.db=S.db,Wt(y)}).then(function(F){return y.db=F,Gt(y,m._defaultConfig.version)?ft(y):F}).then(function(F){y.db=S.db=F,m._dbInfo=y;for(var J=0;J<V.length;J++){var it=V[J];it!==m&&(it._dbInfo.db=y.db,it._dbInfo.version=y.version)}})}function dn(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.get(g);V.onsuccess=function(){var F=V.result;F===void 0&&(F=null),$t(F)&&(F=et(F)),S(F)},V.onerror=function(){C(V.error)}}catch(F){C(F)}})}).catch(C)});return _(I,m),I}function Ss(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.openCursor(),F=1;V.onsuccess=function(){var J=V.result;if(J){var it=J.value;$t(it)&&(it=et(it));var vt=g(it,J.key,F++);vt!==void 0?S(vt):J.continue()}else S()},V.onerror=function(){C(V.error)}}catch(J){C(J)}})}).catch(C)});return _(I,m),I}function Is(g,m,y){var I=this;g=A(g);var S=new w(function(C,O){var $;I.ready().then(function(){return $=I._dbInfo,_t.call(m)==="[object Blob]"?tt($.db).then(function(W){return W?m:st(m)}):m}).then(function(W){oe(I._dbInfo,q,function(V,F){if(V)return O(V);try{var J=F.objectStore(I._dbInfo.storeName);W===null&&(W=void 0);var it=J.put(W,g);F.oncomplete=function(){W===void 0&&(W=null),C(W)},F.onabort=F.onerror=function(){var vt=it.error?it.error:it.transaction.error;O(vt)}}catch(vt){O(vt)}})}).catch(O)});return _(S,y),S}function hi(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){oe(y._dbInfo,q,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=W.delete(g);$.oncomplete=function(){S()},$.onerror=function(){C(V.error)},$.onabort=function(){var F=V.error?V.error:V.transaction.error;C(F)}}catch(F){C(F)}})}).catch(C)});return _(I,m),I}function Lr(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,q,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.clear();O.oncomplete=function(){I()},O.onabort=O.onerror=function(){var V=W.error?W.error:W.transaction.error;S(V)}}catch(V){S(V)}})}).catch(S)});return _(y,g),y}function ae(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,Dt,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.count();W.onsuccess=function(){I(W.result)},W.onerror=function(){S(W.error)}}catch(V){S(V)}})}).catch(S)});return _(y,g),y}function fn(g,m){var y=this,I=new w(function(S,C){if(g<0){S(null);return}y.ready().then(function(){oe(y._dbInfo,Dt,function(O,$){if(O)return C(O);try{var W=$.objectStore(y._dbInfo.storeName),V=!1,F=W.openKeyCursor();F.onsuccess=function(){var J=F.result;if(!J){S(null);return}g===0||V?S(J.key):(V=!0,J.advance(g))},F.onerror=function(){C(F.error)}}catch(J){C(J)}})}).catch(C)});return _(I,m),I}function Cs(g){var m=this,y=new w(function(I,S){m.ready().then(function(){oe(m._dbInfo,Dt,function(C,O){if(C)return S(C);try{var $=O.objectStore(m._dbInfo.storeName),W=$.openKeyCursor(),V=[];W.onsuccess=function(){var F=W.result;if(!F){I(V);return}V.push(F.key),F.continue()},W.onerror=function(){S(W.error)}}catch(F){S(F)}})}).catch(S)});return _(y,g),y}function a(g,m){m=B.apply(this,arguments);var y=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||y.name,g.storeName=g.storeName||y.storeName);var I=this,S;if(!g.name)S=w.reject("Invalid arguments");else{var C=g.name===y.name&&I._dbInfo.db,O=C?w.resolve(I._dbInfo.db):Wt(g).then(function($){var W=X[g.name],V=W.forages;W.db=$;for(var F=0;F<V.length;F++)V[F]._dbInfo.db=$;return $});g.storeName?S=O.then(function($){if($.objectStoreNames.contains(g.storeName)){var W=$.version+1;lt(g);var V=X[g.name],F=V.forages;$.close();for(var J=0;J<F.length;J++){var it=F[J];it._dbInfo.db=null,it._dbInfo.version=W}var vt=new w(function(pt,Pt){var It=h.open(g.name,W);It.onerror=function(ce){var Ns=It.result;Ns.close(),Pt(ce)},It.onupgradeneeded=function(){var ce=It.result;ce.deleteObjectStore(g.storeName)},It.onsuccess=function(){var ce=It.result;ce.close(),pt(ce)}});return vt.then(function(pt){V.db=pt;for(var Pt=0;Pt<F.length;Pt++){var It=F[Pt];It._dbInfo.db=pt,kt(It._dbInfo)}}).catch(function(pt){throw(At(g,pt)||w.resolve()).catch(function(){}),pt})}}):S=O.then(function($){lt(g);var W=X[g.name],V=W.forages;$.close();for(var F=0;F<V.length;F++){var J=V[F];J._dbInfo.db=null}var it=new w(function(vt,pt){var Pt=h.deleteDatabase(g.name);Pt.onerror=function(){var It=Pt.result;It&&It.close(),pt(Pt.error)},Pt.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},Pt.onsuccess=function(){var It=Pt.result;It&&It.close(),vt(It)}});return it.then(function(vt){W.db=vt;for(var pt=0;pt<V.length;pt++){var Pt=V[pt];kt(Pt._dbInfo)}}).catch(function(vt){throw(At(g,vt)||w.resolve()).catch(function(){}),vt})})}return _(S,m),S}var u={_driver:"asyncStorage",_initStorage:Es,_support:b(),iterate:Ss,getItem:dn,setItem:Is,removeItem:hi,clear:Lr,length:ae,key:fn,keys:Cs,dropInstance:a};function f(){return typeof openDatabase=="function"}var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D="~~local_forage_type~",M=/^~~local_forage_type~([^~]+)~/,Y="__lfsc__:",ut=Y.length,Nt="arbf",gt="blob",St="si08",Ut="ui08",hr="uic8",gn="si16",mn="si32",lc="ur16",uc="ui32",hc="fl32",pc="fl64",dc=ut+Nt.length,fc=Object.prototype.toString;function gc(g){var m=g.length*.75,y=g.length,I,S=0,C,O,$,W;g[g.length-1]==="="&&(m--,g[g.length-2]==="="&&m--);var V=new ArrayBuffer(m),F=new Uint8Array(V);for(I=0;I<y;I+=4)C=E.indexOf(g[I]),O=E.indexOf(g[I+1]),$=E.indexOf(g[I+2]),W=E.indexOf(g[I+3]),F[S++]=C<<2|O>>4,F[S++]=(O&15)<<4|$>>2,F[S++]=($&3)<<6|W&63;return V}function Ts(g){var m=new Uint8Array(g),y="",I;for(I=0;I<m.length;I+=3)y+=E[m[I]>>2],y+=E[(m[I]&3)<<4|m[I+1]>>4],y+=E[(m[I+1]&15)<<2|m[I+2]>>6],y+=E[m[I+2]&63];return m.length%3===2?y=y.substring(0,y.length-1)+"=":m.length%3===1&&(y=y.substring(0,y.length-2)+"=="),y}function Rp(g,m){var y="";if(g&&(y=fc.call(g)),g&&(y==="[object ArrayBuffer]"||g.buffer&&fc.call(g.buffer)==="[object ArrayBuffer]")){var I,S=Y;g instanceof ArrayBuffer?(I=g,S+=Nt):(I=g.buffer,y==="[object Int8Array]"?S+=St:y==="[object Uint8Array]"?S+=Ut:y==="[object Uint8ClampedArray]"?S+=hr:y==="[object Int16Array]"?S+=gn:y==="[object Uint16Array]"?S+=lc:y==="[object Int32Array]"?S+=mn:y==="[object Uint32Array]"?S+=uc:y==="[object Float32Array]"?S+=hc:y==="[object Float64Array]"?S+=pc:m(new Error("Failed to get type for BinaryArray"))),m(S+Ts(I))}else if(y==="[object Blob]"){var C=new FileReader;C.onload=function(){var O=D+g.type+"~"+Ts(this.result);m(Y+gt+O)},C.readAsArrayBuffer(g)}else try{m(JSON.stringify(g))}catch(O){console.error("Couldn't convert value into a JSON string: ",g),m(null,O)}}function Lp(g){if(g.substring(0,ut)!==Y)return JSON.parse(g);var m=g.substring(dc),y=g.substring(ut,dc),I;if(y===gt&&M.test(m)){var S=m.match(M);I=S[1],m=m.substring(S[0].length)}var C=gc(m);switch(y){case Nt:return C;case gt:return v([C],{type:I});case St:return new Int8Array(C);case Ut:return new Uint8Array(C);case hr:return new Uint8ClampedArray(C);case gn:return new Int16Array(C);case lc:return new Uint16Array(C);case mn:return new Int32Array(C);case uc:return new Uint32Array(C);case hc:return new Float32Array(C);case pc:return new Float64Array(C);default:throw new Error("Unkown type: "+y)}}var xs={serialize:Rp,deserialize:Lp,stringToBuffer:gc,bufferToString:Ts};function mc(g,m,y,I){g.executeSql("CREATE TABLE IF NOT EXISTS "+m.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],y,I)}function Mp(g){var m=this,y={db:null};if(g)for(var I in g)y[I]=typeof g[I]!="string"?g[I].toString():g[I];var S=new w(function(C,O){try{y.db=openDatabase(y.name,String(y.version),y.description,y.size)}catch($){return O($)}y.db.transaction(function($){mc($,y,function(){m._dbInfo=y,C()},function(W,V){O(V)})},O)});return y.serializer=xs,S}function Je(g,m,y,I,S,C){g.executeSql(y,I,S,function(O,$){$.code===$.SYNTAX_ERR?O.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[m.storeName],function(W,V){V.rows.length?C(W,$):mc(W,m,function(){W.executeSql(y,I,S,C)},C)},C):C(O,$)},C)}function Up(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT * FROM "+O.storeName+" WHERE key = ? LIMIT 1",[g],function(W,V){var F=V.rows.length?V.rows.item(0).value:null;F&&(F=O.serializer.deserialize(F)),S(F)},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function Bp(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT * FROM "+O.storeName,[],function(W,V){for(var F=V.rows,J=F.length,it=0;it<J;it++){var vt=F.item(it),pt=vt.value;if(pt&&(pt=O.serializer.deserialize(pt)),pt=g(pt,vt.key,it+1),pt!==void 0){S(pt);return}}S()},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function yc(g,m,y,I){var S=this;g=A(g);var C=new w(function(O,$){S.ready().then(function(){m===void 0&&(m=null);var W=m,V=S._dbInfo;V.serializer.serialize(m,function(F,J){J?$(J):V.db.transaction(function(it){Je(it,V,"INSERT OR REPLACE INTO "+V.storeName+" (key, value) VALUES (?, ?)",[g,F],function(){O(W)},function(vt,pt){$(pt)})},function(it){if(it.code===it.QUOTA_ERR){if(I>0){O(yc.apply(S,[g,W,y,I-1]));return}$(it)}})})}).catch($)});return _(C,y),C}function jp(g,m,y){return yc.apply(this,[g,m,y,1])}function $p(g,m){var y=this;g=A(g);var I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"DELETE FROM "+O.storeName+" WHERE key = ?",[g],function(){S()},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function Fp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"DELETE FROM "+C.storeName,[],function(){I()},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Hp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"SELECT COUNT(key) as c FROM "+C.storeName,[],function($,W){var V=W.rows.item(0).c;I(V)},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Vp(g,m){var y=this,I=new w(function(S,C){y.ready().then(function(){var O=y._dbInfo;O.db.transaction(function($){Je($,O,"SELECT key FROM "+O.storeName+" WHERE id = ? LIMIT 1",[g+1],function(W,V){var F=V.rows.length?V.rows.item(0).key:null;S(F)},function(W,V){C(V)})})}).catch(C)});return _(I,m),I}function qp(g){var m=this,y=new w(function(I,S){m.ready().then(function(){var C=m._dbInfo;C.db.transaction(function(O){Je(O,C,"SELECT key FROM "+C.storeName,[],function($,W){for(var V=[],F=0;F<W.rows.length;F++)V.push(W.rows.item(F).key);I(V)},function($,W){S(W)})})}).catch(S)});return _(y,g),y}function Wp(g){return new w(function(m,y){g.transaction(function(I){I.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(S,C){for(var O=[],$=0;$<C.rows.length;$++)O.push(C.rows.item($).name);m({db:g,storeNames:O})},function(S,C){y(C)})},function(I){y(I)})})}function Gp(g,m){m=B.apply(this,arguments);var y=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||y.name,g.storeName=g.storeName||y.storeName);var I=this,S;return g.name?S=new w(function(C){var O;g.name===y.name?O=I._dbInfo.db:O=openDatabase(g.name,"","",0),g.storeName?C({db:O,storeNames:[g.storeName]}):C(Wp(O))}).then(function(C){return new w(function(O,$){C.db.transaction(function(W){function V(vt){return new w(function(pt,Pt){W.executeSql("DROP TABLE IF EXISTS "+vt,[],function(){pt()},function(It,ce){Pt(ce)})})}for(var F=[],J=0,it=C.storeNames.length;J<it;J++)F.push(V(C.storeNames[J]));w.all(F).then(function(){O()}).catch(function(vt){$(vt)})},function(W){$(W)})})}):S=w.reject("Invalid arguments"),_(S,m),S}var zp={_driver:"webSQLStorage",_initStorage:Mp,_support:f(),iterate:Bp,getItem:Up,setItem:jp,removeItem:$p,clear:Fp,length:Hp,key:Vp,keys:qp,dropInstance:Gp};function Yp(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function vc(g,m){var y=g.name+"/";return g.storeName!==m.storeName&&(y+=g.storeName+"/"),y}function Kp(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function Jp(){return!Kp()||localStorage.length>0}function Xp(g){var m=this,y={};if(g)for(var I in g)y[I]=g[I];return y.keyPrefix=vc(g,m._defaultConfig),Jp()?(m._dbInfo=y,y.serializer=xs,w.resolve()):w.reject()}function Qp(g){var m=this,y=m.ready().then(function(){for(var I=m._dbInfo.keyPrefix,S=localStorage.length-1;S>=0;S--){var C=localStorage.key(S);C.indexOf(I)===0&&localStorage.removeItem(C)}});return _(y,g),y}function Zp(g,m){var y=this;g=A(g);var I=y.ready().then(function(){var S=y._dbInfo,C=localStorage.getItem(S.keyPrefix+g);return C&&(C=S.serializer.deserialize(C)),C});return _(I,m),I}function td(g,m){var y=this,I=y.ready().then(function(){for(var S=y._dbInfo,C=S.keyPrefix,O=C.length,$=localStorage.length,W=1,V=0;V<$;V++){var F=localStorage.key(V);if(F.indexOf(C)===0){var J=localStorage.getItem(F);if(J&&(J=S.serializer.deserialize(J)),J=g(J,F.substring(O),W++),J!==void 0)return J}}});return _(I,m),I}function ed(g,m){var y=this,I=y.ready().then(function(){var S=y._dbInfo,C;try{C=localStorage.key(g)}catch{C=null}return C&&(C=C.substring(S.keyPrefix.length)),C});return _(I,m),I}function rd(g){var m=this,y=m.ready().then(function(){for(var I=m._dbInfo,S=localStorage.length,C=[],O=0;O<S;O++){var $=localStorage.key(O);$.indexOf(I.keyPrefix)===0&&C.push($.substring(I.keyPrefix.length))}return C});return _(y,g),y}function nd(g){var m=this,y=m.keys().then(function(I){return I.length});return _(y,g),y}function id(g,m){var y=this;g=A(g);var I=y.ready().then(function(){var S=y._dbInfo;localStorage.removeItem(S.keyPrefix+g)});return _(I,m),I}function sd(g,m,y){var I=this;g=A(g);var S=I.ready().then(function(){m===void 0&&(m=null);var C=m;return new w(function(O,$){var W=I._dbInfo;W.serializer.serialize(m,function(V,F){if(F)$(F);else try{localStorage.setItem(W.keyPrefix+g,V),O(C)}catch(J){(J.name==="QuotaExceededError"||J.name==="NS_ERROR_DOM_QUOTA_REACHED")&&$(J),$(J)}})})});return _(S,y),S}function od(g,m){if(m=B.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var y=this.config();g.name=g.name||y.name,g.storeName=g.storeName||y.storeName}var I=this,S;return g.name?S=new w(function(C){g.storeName?C(vc(g,I._defaultConfig)):C(g.name+"/")}).then(function(C){for(var O=localStorage.length-1;O>=0;O--){var $=localStorage.key(O);$.indexOf(C)===0&&localStorage.removeItem($)}}):S=w.reject("Invalid arguments"),_(S,m),S}var ad={_driver:"localStorageWrapper",_initStorage:Xp,_support:Yp(),iterate:td,getItem:Zp,setItem:sd,removeItem:id,clear:Qp,length:nd,key:ed,keys:rd,dropInstance:od},cd=function(g,m){return g===m||typeof g=="number"&&typeof m=="number"&&isNaN(g)&&isNaN(m)},ld=function(g,m){for(var y=g.length,I=0;I<y;){if(cd(g[I],m))return!0;I++}return!1},wc=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},yn={},bc={},Mr={INDEXEDDB:u,WEBSQL:zp,LOCALSTORAGE:ad},ud=[Mr.INDEXEDDB._driver,Mr.WEBSQL._driver,Mr.LOCALSTORAGE._driver],pi=["dropInstance"],Ds=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(pi),hd={description:"",driver:ud.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function pd(g,m){g[m]=function(){var y=arguments;return g.ready().then(function(){return g[m].apply(g,y)})}}function As(){for(var g=1;g<arguments.length;g++){var m=arguments[g];if(m)for(var y in m)m.hasOwnProperty(y)&&(wc(m[y])?arguments[0][y]=m[y].slice():arguments[0][y]=m[y])}return arguments[0]}var dd=function(){function g(m){p(this,g);for(var y in Mr)if(Mr.hasOwnProperty(y)){var I=Mr[y],S=I._driver;this[y]=S,yn[S]||this.defineDriver(I)}this._defaultConfig=As({},hd),this._config=As({},this._defaultConfig,m),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return g.prototype.config=function(m){if((typeof m>"u"?"undefined":l(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var y in m){if(y==="storeName"&&(m[y]=m[y].replace(/\W/g,"_")),y==="version"&&typeof m[y]!="number")return new Error("Database version must be a number.");this._config[y]=m[y]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},g.prototype.defineDriver=function(m,y,I){var S=new w(function(C,O){try{var $=m._driver,W=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){O(W);return}for(var V=Ds.concat("_initStorage"),F=0,J=V.length;F<J;F++){var it=V[F],vt=!ld(pi,it);if((vt||m[it])&&typeof m[it]!="function"){O(W);return}}var pt=function(){for(var It=function(gd){return function(){var md=new Error("Method "+gd+" is not implemented by the current driver"),_c=w.reject(md);return _(_c,arguments[arguments.length-1]),_c}},ce=0,Ns=pi.length;ce<Ns;ce++){var Os=pi[ce];m[Os]||(m[Os]=It(Os))}};pt();var Pt=function(It){yn[$]&&console.info("Redefining LocalForage driver: "+$),yn[$]=m,bc[$]=It,C()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(Pt,O):Pt(!!m._support):Pt(!0)}catch(It){O(It)}});return k(S,y,I),S},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(m,y,I){var S=yn[m]?w.resolve(yn[m]):w.reject(new Error("Driver not found."));return k(S,y,I),S},g.prototype.getSerializer=function(m){var y=w.resolve(xs);return k(y,m),y},g.prototype.ready=function(m){var y=this,I=y._driverSet.then(function(){return y._ready===null&&(y._ready=y._initDriver()),y._ready});return k(I,m,m),I},g.prototype.setDriver=function(m,y,I){var S=this;wc(m)||(m=[m]);var C=this._getSupportedDrivers(m);function O(){S._config.driver=S.driver()}function $(F){return S._extend(F),O(),S._ready=S._initStorage(S._config),S._ready}function W(F){return function(){var J=0;function it(){for(;J<F.length;){var vt=F[J];return J++,S._dbInfo=null,S._ready=null,S.getDriver(vt).then($).catch(it)}O();var pt=new Error("No available storage method found.");return S._driverSet=w.reject(pt),S._driverSet}return it()}}var V=this._driverSet!==null?this._driverSet.catch(function(){return w.resolve()}):w.resolve();return this._driverSet=V.then(function(){var F=C[0];return S._dbInfo=null,S._ready=null,S.getDriver(F).then(function(J){S._driver=J._driver,O(),S._wrapLibraryMethodsWithReady(),S._initDriver=W(C)})}).catch(function(){O();var F=new Error("No available storage method found.");return S._driverSet=w.reject(F),S._driverSet}),k(this._driverSet,y,I),this._driverSet},g.prototype.supports=function(m){return!!bc[m]},g.prototype._extend=function(m){As(this,m)},g.prototype._getSupportedDrivers=function(m){for(var y=[],I=0,S=m.length;I<S;I++){var C=m[I];this.supports(C)&&y.push(C)}return y},g.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,y=Ds.length;m<y;m++)pd(this,Ds[m])},g.prototype.createInstance=function(m){return new g(m)},g}(),fd=new dd;o.exports=fd},{3:3}]},{},[4])(4)})}),fu=rs(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URLBuilder=void 0;var e=function(){function r(n){try{this.base=new URL(n),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return r.prototype.appendQueryParam=function(n,i){this.params.append(n,i?i.toString():"")},r.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},r.prototype.deleteQueryParam=function(n){this.params.delete(n)},r.prototype.getBase=function(){return this.base},r.prototype.getPath=function(){return this.base.pathname},r.prototype.getHostname=function(){return this.base.hostname},r.prototype.getParams=function(){return this.params},r.prototype.getQueryParam=function(n){if(!this.params)return"";var i=this.params.get(n);return!i||i==="undefined"||i==="null"?void 0:i},r.prototype.getQueryString=function(){return this.params.toString()},r.prototype.setPath=function(n){return this.base.pathname=n,this},r.prototype.setQueryParam=function(n,i){return this.params.set(n,i?i.toString():""),this},r.prototype.setQueryString=function(n){if(n)return n[0]==="?"&&(n=n.slice(1)),this.params=new URLSearchParams(n),this},r.prototype.toString=function(){var n=this.params.toString();return n===""?this.base.search="":this.base.search="?"+n,this.base.toString()},r}();t.URLBuilder=e}),Pd=rs((t,e)=>{"use strict";(function(r,n){typeof t=="object"&&typeof e<"u"?e.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.fetchRetry=n())})(t,function(){"use strict";var r=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!n(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!n(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var c={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(c,o),function(l,p){var d=o.retries,h=o.retryDelay,b=o.retryOn;if(p&&p.retries!==void 0)if(n(p.retries))d=p.retries;else throw new i("retries must be a positive integer");if(p&&p.retryDelay!==void 0)if(n(p.retryDelay)||typeof p.retryDelay=="function")h=p.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(p&&p.retryOn)if(Array.isArray(p.retryOn)||typeof p.retryOn=="function")b=p.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(v,w){var _=function(A){var B=typeof Request<"u"&&l instanceof Request?l.clone():l;s(B,p).then(function(G){if(Array.isArray(b)&&b.indexOf(G.status)===-1)v(G);else if(typeof b=="function")try{return Promise.resolve(b(A,null,G)).then(function(j){j?k(A,null,G):v(G)}).catch(w)}catch(j){w(j)}else A<d?k(A,null,G):v(G)}).catch(function(G){if(typeof b=="function")try{Promise.resolve(b(A,G,null)).then(function(j){j?k(A,G,null):w(G)}).catch(function(j){w(j)})}catch(j){w(j)}else A<d?k(A,G,null):w(G)})};function k(A,B,G){var j=typeof h=="function"?h(A,B,G):h;setTimeout(function(){_(++A)},j)}_(0)})}};function n(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return r})}),Rd="9.12.7",H=class co{static SDK_VERSION=Rd;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=co.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");co.SDK_VERSION_CODE=parseInt(e,10)}},qe={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${H.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${H.SDK_VERSION}/dist/widget.min.js`},he=ke(sn()),T=class{static log(...t){he.default.info(...t)}static debug(...t){he.default.debug(...t)}static error(...t){he.default.error(...t)}static warn(...t){he.default.warn(...t)}static info(...t){he.default.info(...t)}static trace(...t){he.default.trace(...t)}};function Ld(t=H.LOG_PREFIX){he.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${H.SDK_VERSION}):`)}});let e=gu();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?he.default.setLevel(he.default[localStorage.cooeeLogLevel]):he.default.setLevel(qe.debug?he.default.TRACE:he.default.OFF)}function gu(){return new URL(location.href).searchParams?.get("cooee-debug")}function Md(){let t=`
|
|
2
2
|
display: inline-block;
|
|
3
3
|
font-size: 14px;
|
|
4
4
|
background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
|