@blotoutio/providers-blotout-wallet-sdk 0.51.0 → 0.52.0
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/index.cjs.js +50 -49
- package/index.js +50 -49
- package/index.mjs +50 -49
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -34,7 +34,6 @@ new Set([
|
|
34
34
|
...expand('911,921,922,923,924,926,927,932,933,935,942,944,946,950,953,955,957-958,960-969,974,975,976,977,981-982,987,988,990-999'),
|
35
35
|
]);
|
36
36
|
|
37
|
-
const packageName = 'blotoutWallet';
|
38
37
|
const customAttributes = {
|
39
38
|
'--bw-primary': { type: 'color', defaultValue: '#000000' },
|
40
39
|
'--bw-secondary': { type: 'color', defaultValue: '#4e647f' },
|
@@ -45,8 +44,19 @@ const customAttributes = {
|
|
45
44
|
'--bw-input-foreground': { type: 'color', defaultValue: '#52525B' },
|
46
45
|
'--bw-input-background': { type: 'color', defaultValue: '#ffffff' },
|
47
46
|
'--bw-backdrop': { type: 'color', defaultValue: '#00000077' },
|
48
|
-
|
47
|
+
text: {
|
48
|
+
type: 'text',
|
49
|
+
defaultValue: "Hey! Your cart has expired!<br>But we've got you covered! \u{1F609}",
|
50
|
+
},
|
51
|
+
inputLabel: { type: 'text', defaultValue: 'Enter your email ID' },
|
52
|
+
restoreLabel: { type: 'text', defaultValue: 'Restore Cart' },
|
53
|
+
rejectionLabel: {
|
54
|
+
type: 'text',
|
55
|
+
defaultValue: 'No thanks, delete my expired cart',
|
56
|
+
},
|
49
57
|
};
|
58
|
+
|
59
|
+
const packageName = 'blotoutWallet';
|
50
60
|
const cartTokenCookie = 'cart';
|
51
61
|
const cartTokenTwoCookie = 'cart2';
|
52
62
|
const cartCurrencyCookie = 'cart_currency';
|
@@ -210,26 +220,26 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
210
220
|
* Copyright 2019 Google LLC
|
211
221
|
* SPDX-License-Identifier: BSD-3-Clause
|
212
222
|
*/
|
213
|
-
const t$3=globalThis,e$5=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$
|
223
|
+
const t$3=globalThis,e$5=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$4 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$5&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$5=t=>new n$4("string"==typeof t?t:t+"",void 0,s$2),i$4=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$4(o,t,s$2)},S$1=(s,o)=>{if(e$5)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$3.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$5?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$5(e)})(t):t;
|
214
224
|
|
215
225
|
/**
|
216
226
|
* @license
|
217
227
|
* Copyright 2017 Google LLC
|
218
228
|
* SPDX-License-Identifier: BSD-3-Clause
|
219
|
-
*/const{is:i$3,defineProperty:e$4,getOwnPropertyDescriptor:r$4,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$
|
229
|
+
*/const{is:i$3,defineProperty:e$4,getOwnPropertyDescriptor:r$4,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$3}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$3(t,s),y$1={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$1){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$4(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$4(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$3(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d$1("elementProperties")]=new Map,b[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b}),(a$1.reactiveElementVersions??=[]).push("2.0.4");
|
220
230
|
|
221
231
|
/**
|
222
232
|
* @license
|
223
233
|
* Copyright 2017 Google LLC
|
224
234
|
* SPDX-License-Identifier: BSD-3-Clause
|
225
235
|
*/
|
226
|
-
const t$2=globalThis,i$2=t$2.trustedTypes,s$1=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$3="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$
|
236
|
+
const t$2=globalThis,i$2=t$2.trustedTypes,s$1=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$3="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$2=`<${o$3}>`,r$3=document,l=()=>r$3.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),w=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),A=new WeakMap,E=r$3.createTreeWalker(r$3,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$1?s$1.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$2:d>=0?(o.push(a),s.slice(0,d)+e$3+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [C(t,l+(t[s]||"<?>")+(2===i?"</svg>":"")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=E.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$3)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?k:"?"===e[1]?H:"@"===e[1]?I:R}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$2?i$2.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),E.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$3.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){if(i===w)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$3).importNode(i,!0);E.currentNode=e;let h=E.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new M(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new L(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=E.nextNode(),o++);}return E.currentNode=r$3,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),c(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t);}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t));}_(t){this._$AH!==T&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$3.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=V.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new S(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new V(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new M(this.S(l()),this.S(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=N(this,e[s+n],i,n),r===w&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===T?t=T:t!==T&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class k extends R{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===T?void 0:t;}}class H extends R{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T);}}class I extends R{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=N(this,t,i,0)??T)===w)return;const s=this._$AH,e=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==T&&(s===T||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t);}}const Z=t$2.litHtmlPolyfillSupport;Z?.(V,M),(t$2.litHtmlVersions??=[]).push("3.1.3");const j=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h};
|
227
237
|
|
228
238
|
/**
|
229
239
|
* @license
|
230
240
|
* Copyright 2017 Google LLC
|
231
241
|
* SPDX-License-Identifier: BSD-3-Clause
|
232
|
-
*/class s extends b
|
242
|
+
*/class s extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=j(i,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return w}}s._$litElement$=!0,s[("finalized")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r$2=globalThis.litElementPolyfillSupport;r$2?.({LitElement:s});(globalThis.litElementVersions??=[]).push("4.0.5");
|
233
243
|
|
234
244
|
/**
|
235
245
|
* @license
|
@@ -242,7 +252,7 @@ const t$1=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e
|
|
242
252
|
* @license
|
243
253
|
* Copyright 2017 Google LLC
|
244
254
|
* SPDX-License-Identifier: BSD-3-Clause
|
245
|
-
*/const o$
|
255
|
+
*/const o$2={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1},r$1=(t=o$2,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.P(o,void 0,t),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n$1(t){return (e,o)=>"object"==typeof o?r$1(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
|
246
256
|
|
247
257
|
/**
|
248
258
|
* @license
|
@@ -274,7 +284,14 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e
|
|
274
284
|
* @license
|
275
285
|
* Copyright 2018 Google LLC
|
276
286
|
* SPDX-License-Identifier: BSD-3-Clause
|
277
|
-
*/const n="important",i=" !"+n,o=e(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||t$1.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e;}}return w}});
|
287
|
+
*/const n="important",i=" !"+n,o$1=e(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||t$1.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e;}}return w}});
|
288
|
+
|
289
|
+
/**
|
290
|
+
* @license
|
291
|
+
* Copyright 2021 Google LLC
|
292
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
293
|
+
*/
|
294
|
+
function*o(o,t){const f="function"==typeof t;if(void 0!==o){let i=-1;for(const n of o)i>-1&&(yield f?t(i):t),i++,yield n;}}
|
278
295
|
|
279
296
|
const spring = 'linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1)';
|
280
297
|
|
@@ -316,30 +333,11 @@ const cssVars = i$4 `
|
|
316
333
|
--bw-backdrop,
|
317
334
|
${r$5(customAttributes['--bw-backdrop'].defaultValue)}
|
318
335
|
);
|
319
|
-
--z-index: var(
|
320
|
-
--bw-z-index,
|
321
|
-
${r$5(customAttributes['--bw-z-index'].defaultValue)}
|
322
|
-
);
|
323
336
|
|
324
337
|
--spring-easing: ${r$5(spring)};
|
325
338
|
}
|
326
339
|
`;
|
327
340
|
|
328
|
-
const wink = (attrs) => b `<svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg" class=${attrs === null || attrs === void 0 ? void 0 : attrs.class} style=${attrs === null || attrs === void 0 ? void 0 : attrs.style}>
|
329
|
-
<g clip-path="url(#clip0_146_560)">
|
330
|
-
<path d="M9.5 1.125C7.94248 1.125 6.41992 1.58686 5.12489 2.45218C3.82985 3.31749 2.82049 4.5474 2.22445 5.98637C1.62841 7.42534 1.47246 9.00874 1.77632 10.5363C2.08018 12.0639 2.8302 13.4671 3.93154 14.5685C5.03288 15.6698 6.43607 16.4198 7.96367 16.7237C9.49127 17.0275 11.0747 16.8716 12.5136 16.2756C13.9526 15.6795 15.1825 14.6702 16.0478 13.3751C16.9131 12.0801 17.375 10.5575 17.375 9C17.375 6.91142 16.5453 4.90838 15.0685 3.43153C13.5916 1.95469 11.5886 1.125 9.5 1.125ZM9.5 15.75C8.16498 15.75 6.85994 15.3541 5.7499 14.6124C4.63987 13.8707 3.77471 12.8165 3.26382 11.5831C2.75293 10.3497 2.61925 8.99251 2.8797 7.68314C3.14015 6.37377 3.78303 5.17103 4.72703 4.22703C5.67104 3.28302 6.87377 2.64015 8.18314 2.3797C9.49252 2.11925 10.8497 2.25292 12.0831 2.76381C13.3165 3.2747 14.3707 4.13987 15.1124 5.2499C15.8541 6.35993 16.25 7.66498 16.25 9C16.25 10.7902 15.5388 12.5071 14.273 13.773C13.0071 15.0388 11.2902 15.75 9.5 15.75Z" fill="currentColor"/>
|
331
|
-
<path d="M12.0313 6.1875C11.7531 6.1875 11.4812 6.26997 11.25 6.4245C11.0187 6.57902 10.8385 6.79864 10.732 7.0556C10.6256 7.31256 10.5978 7.59531 10.652 7.8681C10.7063 8.14088 10.8402 8.39145 11.0369 8.58812C11.2335 8.78479 11.4841 8.91872 11.7569 8.97298C12.0297 9.02724 12.3124 8.99939 12.5694 8.89296C12.8264 8.78652 13.046 8.60628 13.2005 8.37502C13.355 8.14376 13.4375 7.87188 13.4375 7.59375C13.4375 7.22079 13.2893 6.8631 13.0256 6.59938C12.7619 6.33566 12.4042 6.1875 12.0313 6.1875Z" fill="currentColor"/>
|
332
|
-
<path d="M8.375 7.3125H5V8.4375H8.375V7.3125Z" fill="currentColor"/>
|
333
|
-
<path d="M9.49961 13.4996C10.2761 13.4983 11.039 13.2961 11.7142 12.9127C12.3893 12.5293 12.9538 11.9777 13.3527 11.3115L12.3909 10.749C12.0907 11.2475 11.6667 11.6599 11.1601 11.9462C10.6535 12.2325 10.0815 12.383 9.49961 12.383C8.91771 12.383 8.3457 12.2325 7.83911 11.9462C7.33251 11.6599 6.90854 11.2475 6.60836 10.749L5.64648 11.3115C6.04539 11.9777 6.60987 12.5293 7.28506 12.9127C7.96024 13.2961 8.72315 13.4983 9.49961 13.4996Z" fill="currentColor"/>
|
334
|
-
</g>
|
335
|
-
<defs>
|
336
|
-
<clip-path id="clip0_146_560">
|
337
|
-
<rect width="18" height="18" fill="currentColor" transform="translate(0.5)"/>
|
338
|
-
</clip-path>
|
339
|
-
</defs>
|
340
|
-
</svg>
|
341
|
-
`;
|
342
|
-
|
343
341
|
const fadeInDialog = (element) => {
|
344
342
|
const dialogAnimation = element.animate([
|
345
343
|
{ transform: 'translateY(-20px)', opacity: 0 },
|
@@ -371,6 +369,10 @@ const fadeOutToBottom = (element) => {
|
|
371
369
|
* Sets the max-age for the dismissed popup cookie
|
372
370
|
*/
|
373
371
|
const DISMISSED_COOKIE_LIFETIME = 1800;
|
372
|
+
const formatString = (str) => {
|
373
|
+
const parts = str.split(/<\s*br\s*\/?\s*>/);
|
374
|
+
return o(parts, x `<br />`);
|
375
|
+
};
|
374
376
|
let BlotoutWallet = class BlotoutWallet extends s {
|
375
377
|
constructor() {
|
376
378
|
super(...arguments);
|
@@ -418,31 +420,33 @@ let BlotoutWallet = class BlotoutWallet extends s {
|
|
418
420
|
}
|
419
421
|
};
|
420
422
|
this.expiredCartContent = () => {
|
423
|
+
var _a, _b, _c, _d;
|
421
424
|
return x `<form
|
422
425
|
class="restore-form"
|
423
426
|
method="dialog"
|
424
427
|
@submit=${this.onSubmit}
|
425
428
|
>
|
426
|
-
<div
|
427
|
-
|
428
|
-
<p>
|
429
|
-
But we've got you covered!
|
430
|
-
${wink({ style: 'vertical-align: text-bottom' })}
|
431
|
-
</p>
|
429
|
+
<div>
|
430
|
+
${formatString(((_a = this.theme) === null || _a === void 0 ? void 0 : _a.text) || customAttributes.text.defaultValue)}
|
432
431
|
</div>
|
433
432
|
<input
|
434
433
|
type="email"
|
435
434
|
name="email"
|
436
|
-
placeholder=
|
435
|
+
placeholder=${((_b = this.theme) === null || _b === void 0 ? void 0 : _b.inputLabel) ||
|
436
|
+
customAttributes.inputLabel.defaultValue}
|
437
437
|
?required=${!this.hasEmail}
|
438
|
-
style=${o({
|
438
|
+
style=${o$1({
|
439
439
|
display: this.hasEmail ? 'none' : 'block',
|
440
440
|
})}
|
441
441
|
/>
|
442
|
-
<button class="restore" type="submit">
|
442
|
+
<button class="restore" type="submit">
|
443
|
+
${((_c = this.theme) === null || _c === void 0 ? void 0 : _c.restoreLabel) ||
|
444
|
+
customAttributes.restoreLabel.defaultValue}
|
445
|
+
</button>
|
443
446
|
</form>
|
444
447
|
<button class="delete" type="button" @click=${this.skipCarts}>
|
445
|
-
|
448
|
+
${((_d = this.theme) === null || _d === void 0 ? void 0 : _d.rejectionLabel) ||
|
449
|
+
customAttributes.rejectionLabel.defaultValue}
|
446
450
|
</button> `;
|
447
451
|
};
|
448
452
|
}
|
@@ -587,17 +591,7 @@ BlotoutWallet.styles = [
|
|
587
591
|
gap: 16px;
|
588
592
|
}
|
589
593
|
|
590
|
-
|
591
|
-
display: flex;
|
592
|
-
flex-direction: column;
|
593
|
-
gap: 4px;
|
594
|
-
|
595
|
-
p {
|
596
|
-
margin: 0;
|
597
|
-
}
|
598
|
-
}
|
599
|
-
|
600
|
-
input[name='email'] {
|
594
|
+
input {
|
601
595
|
width: 100%;
|
602
596
|
border: 1px solid var(--input-border);
|
603
597
|
color: var(--input-foreground);
|
@@ -606,8 +600,13 @@ BlotoutWallet.styles = [
|
|
606
600
|
border-radius: 5px;
|
607
601
|
}
|
608
602
|
|
609
|
-
input
|
603
|
+
input::placeholder {
|
610
604
|
color: var(--input-foreground);
|
605
|
+
color: color(from var(--input-foreground) srgb r g b / 0.7);
|
606
|
+
}
|
607
|
+
|
608
|
+
:is(input[name='email'], button):focus-visible {
|
609
|
+
outline-color: var(--primary);
|
611
610
|
}
|
612
611
|
|
613
612
|
.restore {
|
@@ -674,9 +673,11 @@ const init = (params) => {
|
|
674
673
|
const theme = (_d = params.manifest.variables) === null || _d === void 0 ? void 0 : _d['theme'];
|
675
674
|
if (theme) {
|
676
675
|
element.style.cssText = Object.entries(theme)
|
676
|
+
.filter(([name]) => name.startsWith('--'))
|
677
677
|
.map(([name, value]) => `${name}:${value}`)
|
678
678
|
.join(';');
|
679
679
|
}
|
680
|
+
element.theme = theme;
|
680
681
|
element.edgeURL = params.baseUrl;
|
681
682
|
element.userId = params.userId;
|
682
683
|
document.body.append(element);
|
package/index.js
CHANGED
@@ -35,7 +35,6 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
35
35
|
...expand('911,921,922,923,924,926,927,932,933,935,942,944,946,950,953,955,957-958,960-969,974,975,976,977,981-982,987,988,990-999'),
|
36
36
|
]);
|
37
37
|
|
38
|
-
const packageName = 'blotoutWallet';
|
39
38
|
const customAttributes = {
|
40
39
|
'--bw-primary': { type: 'color', defaultValue: '#000000' },
|
41
40
|
'--bw-secondary': { type: 'color', defaultValue: '#4e647f' },
|
@@ -46,8 +45,19 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
46
45
|
'--bw-input-foreground': { type: 'color', defaultValue: '#52525B' },
|
47
46
|
'--bw-input-background': { type: 'color', defaultValue: '#ffffff' },
|
48
47
|
'--bw-backdrop': { type: 'color', defaultValue: '#00000077' },
|
49
|
-
|
48
|
+
text: {
|
49
|
+
type: 'text',
|
50
|
+
defaultValue: "Hey! Your cart has expired!<br>But we've got you covered! \u{1F609}",
|
51
|
+
},
|
52
|
+
inputLabel: { type: 'text', defaultValue: 'Enter your email ID' },
|
53
|
+
restoreLabel: { type: 'text', defaultValue: 'Restore Cart' },
|
54
|
+
rejectionLabel: {
|
55
|
+
type: 'text',
|
56
|
+
defaultValue: 'No thanks, delete my expired cart',
|
57
|
+
},
|
50
58
|
};
|
59
|
+
|
60
|
+
const packageName = 'blotoutWallet';
|
51
61
|
const cartTokenCookie = 'cart';
|
52
62
|
const cartTokenTwoCookie = 'cart2';
|
53
63
|
const cartCurrencyCookie = 'cart_currency';
|
@@ -211,26 +221,26 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
211
221
|
* Copyright 2019 Google LLC
|
212
222
|
* SPDX-License-Identifier: BSD-3-Clause
|
213
223
|
*/
|
214
|
-
const t$3=globalThis,e$5=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$
|
224
|
+
const t$3=globalThis,e$5=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$4 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$5&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$5=t=>new n$4("string"==typeof t?t:t+"",void 0,s$2),i$4=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$4(o,t,s$2)},S$1=(s,o)=>{if(e$5)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$3.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$5?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$5(e)})(t):t;
|
215
225
|
|
216
226
|
/**
|
217
227
|
* @license
|
218
228
|
* Copyright 2017 Google LLC
|
219
229
|
* SPDX-License-Identifier: BSD-3-Clause
|
220
|
-
*/const{is:i$3,defineProperty:e$4,getOwnPropertyDescriptor:r$4,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$
|
230
|
+
*/const{is:i$3,defineProperty:e$4,getOwnPropertyDescriptor:r$4,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$3}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$3(t,s),y$1={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$1){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$4(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$4(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$3(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d$1("elementProperties")]=new Map,b[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b}),(a$1.reactiveElementVersions??=[]).push("2.0.4");
|
221
231
|
|
222
232
|
/**
|
223
233
|
* @license
|
224
234
|
* Copyright 2017 Google LLC
|
225
235
|
* SPDX-License-Identifier: BSD-3-Clause
|
226
236
|
*/
|
227
|
-
const t$2=globalThis,i$2=t$2.trustedTypes,s$1=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$3="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$
|
237
|
+
const t$2=globalThis,i$2=t$2.trustedTypes,s$1=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$3="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$2=`<${o$3}>`,r$3=document,l=()=>r$3.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),w=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),A=new WeakMap,E=r$3.createTreeWalker(r$3,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$1?s$1.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$2:d>=0?(o.push(a),s.slice(0,d)+e$3+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [C(t,l+(t[s]||"<?>")+(2===i?"</svg>":"")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=E.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$3)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?k:"?"===e[1]?H:"@"===e[1]?I:R}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$2?i$2.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),E.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$3.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){if(i===w)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$3).importNode(i,!0);E.currentNode=e;let h=E.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new M(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new L(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=E.nextNode(),o++);}return E.currentNode=r$3,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),c(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t);}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t));}_(t){this._$AH!==T&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$3.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=V.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new S(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new V(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new M(this.S(l()),this.S(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=N(this,e[s+n],i,n),r===w&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===T?t=T:t!==T&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class k extends R{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===T?void 0:t;}}class H extends R{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T);}}class I extends R{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=N(this,t,i,0)??T)===w)return;const s=this._$AH,e=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==T&&(s===T||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t);}}const Z=t$2.litHtmlPolyfillSupport;Z?.(V,M),(t$2.litHtmlVersions??=[]).push("3.1.3");const j=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h};
|
228
238
|
|
229
239
|
/**
|
230
240
|
* @license
|
231
241
|
* Copyright 2017 Google LLC
|
232
242
|
* SPDX-License-Identifier: BSD-3-Clause
|
233
|
-
*/class s extends b
|
243
|
+
*/class s extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=j(i,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return w}}s._$litElement$=!0,s[("finalized")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r$2=globalThis.litElementPolyfillSupport;r$2?.({LitElement:s});(globalThis.litElementVersions??=[]).push("4.0.5");
|
234
244
|
|
235
245
|
/**
|
236
246
|
* @license
|
@@ -243,7 +253,7 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
243
253
|
* @license
|
244
254
|
* Copyright 2017 Google LLC
|
245
255
|
* SPDX-License-Identifier: BSD-3-Clause
|
246
|
-
*/const o$
|
256
|
+
*/const o$2={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1},r$1=(t=o$2,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.P(o,void 0,t),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n$1(t){return (e,o)=>"object"==typeof o?r$1(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
|
247
257
|
|
248
258
|
/**
|
249
259
|
* @license
|
@@ -275,7 +285,14 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
275
285
|
* @license
|
276
286
|
* Copyright 2018 Google LLC
|
277
287
|
* SPDX-License-Identifier: BSD-3-Clause
|
278
|
-
*/const n="important",i=" !"+n,o=e(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||t$1.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e;}}return w}});
|
288
|
+
*/const n="important",i=" !"+n,o$1=e(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||t$1.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e;}}return w}});
|
289
|
+
|
290
|
+
/**
|
291
|
+
* @license
|
292
|
+
* Copyright 2021 Google LLC
|
293
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
294
|
+
*/
|
295
|
+
function*o(o,t){const f="function"==typeof t;if(void 0!==o){let i=-1;for(const n of o)i>-1&&(yield f?t(i):t),i++,yield n;}}
|
279
296
|
|
280
297
|
const spring = 'linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1)';
|
281
298
|
|
@@ -317,30 +334,11 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
317
334
|
--bw-backdrop,
|
318
335
|
${r$5(customAttributes['--bw-backdrop'].defaultValue)}
|
319
336
|
);
|
320
|
-
--z-index: var(
|
321
|
-
--bw-z-index,
|
322
|
-
${r$5(customAttributes['--bw-z-index'].defaultValue)}
|
323
|
-
);
|
324
337
|
|
325
338
|
--spring-easing: ${r$5(spring)};
|
326
339
|
}
|
327
340
|
`;
|
328
341
|
|
329
|
-
const wink = (attrs) => b `<svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg" class=${attrs === null || attrs === void 0 ? void 0 : attrs.class} style=${attrs === null || attrs === void 0 ? void 0 : attrs.style}>
|
330
|
-
<g clip-path="url(#clip0_146_560)">
|
331
|
-
<path d="M9.5 1.125C7.94248 1.125 6.41992 1.58686 5.12489 2.45218C3.82985 3.31749 2.82049 4.5474 2.22445 5.98637C1.62841 7.42534 1.47246 9.00874 1.77632 10.5363C2.08018 12.0639 2.8302 13.4671 3.93154 14.5685C5.03288 15.6698 6.43607 16.4198 7.96367 16.7237C9.49127 17.0275 11.0747 16.8716 12.5136 16.2756C13.9526 15.6795 15.1825 14.6702 16.0478 13.3751C16.9131 12.0801 17.375 10.5575 17.375 9C17.375 6.91142 16.5453 4.90838 15.0685 3.43153C13.5916 1.95469 11.5886 1.125 9.5 1.125ZM9.5 15.75C8.16498 15.75 6.85994 15.3541 5.7499 14.6124C4.63987 13.8707 3.77471 12.8165 3.26382 11.5831C2.75293 10.3497 2.61925 8.99251 2.8797 7.68314C3.14015 6.37377 3.78303 5.17103 4.72703 4.22703C5.67104 3.28302 6.87377 2.64015 8.18314 2.3797C9.49252 2.11925 10.8497 2.25292 12.0831 2.76381C13.3165 3.2747 14.3707 4.13987 15.1124 5.2499C15.8541 6.35993 16.25 7.66498 16.25 9C16.25 10.7902 15.5388 12.5071 14.273 13.773C13.0071 15.0388 11.2902 15.75 9.5 15.75Z" fill="currentColor"/>
|
332
|
-
<path d="M12.0313 6.1875C11.7531 6.1875 11.4812 6.26997 11.25 6.4245C11.0187 6.57902 10.8385 6.79864 10.732 7.0556C10.6256 7.31256 10.5978 7.59531 10.652 7.8681C10.7063 8.14088 10.8402 8.39145 11.0369 8.58812C11.2335 8.78479 11.4841 8.91872 11.7569 8.97298C12.0297 9.02724 12.3124 8.99939 12.5694 8.89296C12.8264 8.78652 13.046 8.60628 13.2005 8.37502C13.355 8.14376 13.4375 7.87188 13.4375 7.59375C13.4375 7.22079 13.2893 6.8631 13.0256 6.59938C12.7619 6.33566 12.4042 6.1875 12.0313 6.1875Z" fill="currentColor"/>
|
333
|
-
<path d="M8.375 7.3125H5V8.4375H8.375V7.3125Z" fill="currentColor"/>
|
334
|
-
<path d="M9.49961 13.4996C10.2761 13.4983 11.039 13.2961 11.7142 12.9127C12.3893 12.5293 12.9538 11.9777 13.3527 11.3115L12.3909 10.749C12.0907 11.2475 11.6667 11.6599 11.1601 11.9462C10.6535 12.2325 10.0815 12.383 9.49961 12.383C8.91771 12.383 8.3457 12.2325 7.83911 11.9462C7.33251 11.6599 6.90854 11.2475 6.60836 10.749L5.64648 11.3115C6.04539 11.9777 6.60987 12.5293 7.28506 12.9127C7.96024 13.2961 8.72315 13.4983 9.49961 13.4996Z" fill="currentColor"/>
|
335
|
-
</g>
|
336
|
-
<defs>
|
337
|
-
<clip-path id="clip0_146_560">
|
338
|
-
<rect width="18" height="18" fill="currentColor" transform="translate(0.5)"/>
|
339
|
-
</clip-path>
|
340
|
-
</defs>
|
341
|
-
</svg>
|
342
|
-
`;
|
343
|
-
|
344
342
|
const fadeInDialog = (element) => {
|
345
343
|
const dialogAnimation = element.animate([
|
346
344
|
{ transform: 'translateY(-20px)', opacity: 0 },
|
@@ -372,6 +370,10 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
372
370
|
* Sets the max-age for the dismissed popup cookie
|
373
371
|
*/
|
374
372
|
const DISMISSED_COOKIE_LIFETIME = 1800;
|
373
|
+
const formatString = (str) => {
|
374
|
+
const parts = str.split(/<\s*br\s*\/?\s*>/);
|
375
|
+
return o(parts, x `<br />`);
|
376
|
+
};
|
375
377
|
let BlotoutWallet = class BlotoutWallet extends s {
|
376
378
|
constructor() {
|
377
379
|
super(...arguments);
|
@@ -419,31 +421,33 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
419
421
|
}
|
420
422
|
};
|
421
423
|
this.expiredCartContent = () => {
|
424
|
+
var _a, _b, _c, _d;
|
422
425
|
return x `<form
|
423
426
|
class="restore-form"
|
424
427
|
method="dialog"
|
425
428
|
@submit=${this.onSubmit}
|
426
429
|
>
|
427
|
-
<div
|
428
|
-
|
429
|
-
<p>
|
430
|
-
But we've got you covered!
|
431
|
-
${wink({ style: 'vertical-align: text-bottom' })}
|
432
|
-
</p>
|
430
|
+
<div>
|
431
|
+
${formatString(((_a = this.theme) === null || _a === void 0 ? void 0 : _a.text) || customAttributes.text.defaultValue)}
|
433
432
|
</div>
|
434
433
|
<input
|
435
434
|
type="email"
|
436
435
|
name="email"
|
437
|
-
placeholder=
|
436
|
+
placeholder=${((_b = this.theme) === null || _b === void 0 ? void 0 : _b.inputLabel) ||
|
437
|
+
customAttributes.inputLabel.defaultValue}
|
438
438
|
?required=${!this.hasEmail}
|
439
|
-
style=${o({
|
439
|
+
style=${o$1({
|
440
440
|
display: this.hasEmail ? 'none' : 'block',
|
441
441
|
})}
|
442
442
|
/>
|
443
|
-
<button class="restore" type="submit">
|
443
|
+
<button class="restore" type="submit">
|
444
|
+
${((_c = this.theme) === null || _c === void 0 ? void 0 : _c.restoreLabel) ||
|
445
|
+
customAttributes.restoreLabel.defaultValue}
|
446
|
+
</button>
|
444
447
|
</form>
|
445
448
|
<button class="delete" type="button" @click=${this.skipCarts}>
|
446
|
-
|
449
|
+
${((_d = this.theme) === null || _d === void 0 ? void 0 : _d.rejectionLabel) ||
|
450
|
+
customAttributes.rejectionLabel.defaultValue}
|
447
451
|
</button> `;
|
448
452
|
};
|
449
453
|
}
|
@@ -588,17 +592,7 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
588
592
|
gap: 16px;
|
589
593
|
}
|
590
594
|
|
591
|
-
|
592
|
-
display: flex;
|
593
|
-
flex-direction: column;
|
594
|
-
gap: 4px;
|
595
|
-
|
596
|
-
p {
|
597
|
-
margin: 0;
|
598
|
-
}
|
599
|
-
}
|
600
|
-
|
601
|
-
input[name='email'] {
|
595
|
+
input {
|
602
596
|
width: 100%;
|
603
597
|
border: 1px solid var(--input-border);
|
604
598
|
color: var(--input-foreground);
|
@@ -607,8 +601,13 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
607
601
|
border-radius: 5px;
|
608
602
|
}
|
609
603
|
|
610
|
-
input
|
604
|
+
input::placeholder {
|
611
605
|
color: var(--input-foreground);
|
606
|
+
color: color(from var(--input-foreground) srgb r g b / 0.7);
|
607
|
+
}
|
608
|
+
|
609
|
+
:is(input[name='email'], button):focus-visible {
|
610
|
+
outline-color: var(--primary);
|
612
611
|
}
|
613
612
|
|
614
613
|
.restore {
|
@@ -675,9 +674,11 @@ var ProvidersBlotoutWalletSdk = (function () {
|
|
675
674
|
const theme = (_d = params.manifest.variables) === null || _d === void 0 ? void 0 : _d['theme'];
|
676
675
|
if (theme) {
|
677
676
|
element.style.cssText = Object.entries(theme)
|
677
|
+
.filter(([name]) => name.startsWith('--'))
|
678
678
|
.map(([name, value]) => `${name}:${value}`)
|
679
679
|
.join(';');
|
680
680
|
}
|
681
|
+
element.theme = theme;
|
681
682
|
element.edgeURL = params.baseUrl;
|
682
683
|
element.userId = params.userId;
|
683
684
|
document.body.append(element);
|
package/index.mjs
CHANGED
@@ -32,7 +32,6 @@ new Set([
|
|
32
32
|
...expand('911,921,922,923,924,926,927,932,933,935,942,944,946,950,953,955,957-958,960-969,974,975,976,977,981-982,987,988,990-999'),
|
33
33
|
]);
|
34
34
|
|
35
|
-
const packageName = 'blotoutWallet';
|
36
35
|
const customAttributes = {
|
37
36
|
'--bw-primary': { type: 'color', defaultValue: '#000000' },
|
38
37
|
'--bw-secondary': { type: 'color', defaultValue: '#4e647f' },
|
@@ -43,8 +42,19 @@ const customAttributes = {
|
|
43
42
|
'--bw-input-foreground': { type: 'color', defaultValue: '#52525B' },
|
44
43
|
'--bw-input-background': { type: 'color', defaultValue: '#ffffff' },
|
45
44
|
'--bw-backdrop': { type: 'color', defaultValue: '#00000077' },
|
46
|
-
|
45
|
+
text: {
|
46
|
+
type: 'text',
|
47
|
+
defaultValue: "Hey! Your cart has expired!<br>But we've got you covered! \u{1F609}",
|
48
|
+
},
|
49
|
+
inputLabel: { type: 'text', defaultValue: 'Enter your email ID' },
|
50
|
+
restoreLabel: { type: 'text', defaultValue: 'Restore Cart' },
|
51
|
+
rejectionLabel: {
|
52
|
+
type: 'text',
|
53
|
+
defaultValue: 'No thanks, delete my expired cart',
|
54
|
+
},
|
47
55
|
};
|
56
|
+
|
57
|
+
const packageName = 'blotoutWallet';
|
48
58
|
const cartTokenCookie = 'cart';
|
49
59
|
const cartTokenTwoCookie = 'cart2';
|
50
60
|
const cartCurrencyCookie = 'cart_currency';
|
@@ -208,26 +218,26 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
208
218
|
* Copyright 2019 Google LLC
|
209
219
|
* SPDX-License-Identifier: BSD-3-Clause
|
210
220
|
*/
|
211
|
-
const t$3=globalThis,e$5=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$
|
221
|
+
const t$3=globalThis,e$5=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$4 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$5&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$5=t=>new n$4("string"==typeof t?t:t+"",void 0,s$2),i$4=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$4(o,t,s$2)},S$1=(s,o)=>{if(e$5)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$3.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$5?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$5(e)})(t):t;
|
212
222
|
|
213
223
|
/**
|
214
224
|
* @license
|
215
225
|
* Copyright 2017 Google LLC
|
216
226
|
* SPDX-License-Identifier: BSD-3-Clause
|
217
|
-
*/const{is:i$3,defineProperty:e$4,getOwnPropertyDescriptor:r$4,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$
|
227
|
+
*/const{is:i$3,defineProperty:e$4,getOwnPropertyDescriptor:r$4,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$3}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$3(t,s),y$1={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$1){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$4(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$4(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$3(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d$1("elementProperties")]=new Map,b[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b}),(a$1.reactiveElementVersions??=[]).push("2.0.4");
|
218
228
|
|
219
229
|
/**
|
220
230
|
* @license
|
221
231
|
* Copyright 2017 Google LLC
|
222
232
|
* SPDX-License-Identifier: BSD-3-Clause
|
223
233
|
*/
|
224
|
-
const t$2=globalThis,i$2=t$2.trustedTypes,s$1=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$3="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$
|
234
|
+
const t$2=globalThis,i$2=t$2.trustedTypes,s$1=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$3="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$2=`<${o$3}>`,r$3=document,l=()=>r$3.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),w=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),A=new WeakMap,E=r$3.createTreeWalker(r$3,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$1?s$1.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$2:d>=0?(o.push(a),s.slice(0,d)+e$3+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [C(t,l+(t[s]||"<?>")+(2===i?"</svg>":"")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=E.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$3)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?k:"?"===e[1]?H:"@"===e[1]?I:R}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$2?i$2.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),E.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$3.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){if(i===w)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$3).importNode(i,!0);E.currentNode=e;let h=E.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new M(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new L(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=E.nextNode(),o++);}return E.currentNode=r$3,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),c(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t);}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t));}_(t){this._$AH!==T&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$3.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=V.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new S(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new V(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new M(this.S(l()),this.S(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=N(this,e[s+n],i,n),r===w&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===T?t=T:t!==T&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class k extends R{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===T?void 0:t;}}class H extends R{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T);}}class I extends R{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=N(this,t,i,0)??T)===w)return;const s=this._$AH,e=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==T&&(s===T||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t);}}const Z=t$2.litHtmlPolyfillSupport;Z?.(V,M),(t$2.litHtmlVersions??=[]).push("3.1.3");const j=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h};
|
225
235
|
|
226
236
|
/**
|
227
237
|
* @license
|
228
238
|
* Copyright 2017 Google LLC
|
229
239
|
* SPDX-License-Identifier: BSD-3-Clause
|
230
|
-
*/class s extends b
|
240
|
+
*/class s extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=j(i,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return w}}s._$litElement$=!0,s[("finalized")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r$2=globalThis.litElementPolyfillSupport;r$2?.({LitElement:s});(globalThis.litElementVersions??=[]).push("4.0.5");
|
231
241
|
|
232
242
|
/**
|
233
243
|
* @license
|
@@ -240,7 +250,7 @@ const t$1=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e
|
|
240
250
|
* @license
|
241
251
|
* Copyright 2017 Google LLC
|
242
252
|
* SPDX-License-Identifier: BSD-3-Clause
|
243
|
-
*/const o$
|
253
|
+
*/const o$2={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1},r$1=(t=o$2,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.P(o,void 0,t),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n$1(t){return (e,o)=>"object"==typeof o?r$1(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
|
244
254
|
|
245
255
|
/**
|
246
256
|
* @license
|
@@ -272,7 +282,14 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e
|
|
272
282
|
* @license
|
273
283
|
* Copyright 2018 Google LLC
|
274
284
|
* SPDX-License-Identifier: BSD-3-Clause
|
275
|
-
*/const n="important",i=" !"+n,o=e(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||t$1.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e;}}return w}});
|
285
|
+
*/const n="important",i=" !"+n,o$1=e(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||t$1.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e;}}return w}});
|
286
|
+
|
287
|
+
/**
|
288
|
+
* @license
|
289
|
+
* Copyright 2021 Google LLC
|
290
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
291
|
+
*/
|
292
|
+
function*o(o,t){const f="function"==typeof t;if(void 0!==o){let i=-1;for(const n of o)i>-1&&(yield f?t(i):t),i++,yield n;}}
|
276
293
|
|
277
294
|
const spring = 'linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1)';
|
278
295
|
|
@@ -314,30 +331,11 @@ const cssVars = i$4 `
|
|
314
331
|
--bw-backdrop,
|
315
332
|
${r$5(customAttributes['--bw-backdrop'].defaultValue)}
|
316
333
|
);
|
317
|
-
--z-index: var(
|
318
|
-
--bw-z-index,
|
319
|
-
${r$5(customAttributes['--bw-z-index'].defaultValue)}
|
320
|
-
);
|
321
334
|
|
322
335
|
--spring-easing: ${r$5(spring)};
|
323
336
|
}
|
324
337
|
`;
|
325
338
|
|
326
|
-
const wink = (attrs) => b `<svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg" class=${attrs === null || attrs === void 0 ? void 0 : attrs.class} style=${attrs === null || attrs === void 0 ? void 0 : attrs.style}>
|
327
|
-
<g clip-path="url(#clip0_146_560)">
|
328
|
-
<path d="M9.5 1.125C7.94248 1.125 6.41992 1.58686 5.12489 2.45218C3.82985 3.31749 2.82049 4.5474 2.22445 5.98637C1.62841 7.42534 1.47246 9.00874 1.77632 10.5363C2.08018 12.0639 2.8302 13.4671 3.93154 14.5685C5.03288 15.6698 6.43607 16.4198 7.96367 16.7237C9.49127 17.0275 11.0747 16.8716 12.5136 16.2756C13.9526 15.6795 15.1825 14.6702 16.0478 13.3751C16.9131 12.0801 17.375 10.5575 17.375 9C17.375 6.91142 16.5453 4.90838 15.0685 3.43153C13.5916 1.95469 11.5886 1.125 9.5 1.125ZM9.5 15.75C8.16498 15.75 6.85994 15.3541 5.7499 14.6124C4.63987 13.8707 3.77471 12.8165 3.26382 11.5831C2.75293 10.3497 2.61925 8.99251 2.8797 7.68314C3.14015 6.37377 3.78303 5.17103 4.72703 4.22703C5.67104 3.28302 6.87377 2.64015 8.18314 2.3797C9.49252 2.11925 10.8497 2.25292 12.0831 2.76381C13.3165 3.2747 14.3707 4.13987 15.1124 5.2499C15.8541 6.35993 16.25 7.66498 16.25 9C16.25 10.7902 15.5388 12.5071 14.273 13.773C13.0071 15.0388 11.2902 15.75 9.5 15.75Z" fill="currentColor"/>
|
329
|
-
<path d="M12.0313 6.1875C11.7531 6.1875 11.4812 6.26997 11.25 6.4245C11.0187 6.57902 10.8385 6.79864 10.732 7.0556C10.6256 7.31256 10.5978 7.59531 10.652 7.8681C10.7063 8.14088 10.8402 8.39145 11.0369 8.58812C11.2335 8.78479 11.4841 8.91872 11.7569 8.97298C12.0297 9.02724 12.3124 8.99939 12.5694 8.89296C12.8264 8.78652 13.046 8.60628 13.2005 8.37502C13.355 8.14376 13.4375 7.87188 13.4375 7.59375C13.4375 7.22079 13.2893 6.8631 13.0256 6.59938C12.7619 6.33566 12.4042 6.1875 12.0313 6.1875Z" fill="currentColor"/>
|
330
|
-
<path d="M8.375 7.3125H5V8.4375H8.375V7.3125Z" fill="currentColor"/>
|
331
|
-
<path d="M9.49961 13.4996C10.2761 13.4983 11.039 13.2961 11.7142 12.9127C12.3893 12.5293 12.9538 11.9777 13.3527 11.3115L12.3909 10.749C12.0907 11.2475 11.6667 11.6599 11.1601 11.9462C10.6535 12.2325 10.0815 12.383 9.49961 12.383C8.91771 12.383 8.3457 12.2325 7.83911 11.9462C7.33251 11.6599 6.90854 11.2475 6.60836 10.749L5.64648 11.3115C6.04539 11.9777 6.60987 12.5293 7.28506 12.9127C7.96024 13.2961 8.72315 13.4983 9.49961 13.4996Z" fill="currentColor"/>
|
332
|
-
</g>
|
333
|
-
<defs>
|
334
|
-
<clip-path id="clip0_146_560">
|
335
|
-
<rect width="18" height="18" fill="currentColor" transform="translate(0.5)"/>
|
336
|
-
</clip-path>
|
337
|
-
</defs>
|
338
|
-
</svg>
|
339
|
-
`;
|
340
|
-
|
341
339
|
const fadeInDialog = (element) => {
|
342
340
|
const dialogAnimation = element.animate([
|
343
341
|
{ transform: 'translateY(-20px)', opacity: 0 },
|
@@ -369,6 +367,10 @@ const fadeOutToBottom = (element) => {
|
|
369
367
|
* Sets the max-age for the dismissed popup cookie
|
370
368
|
*/
|
371
369
|
const DISMISSED_COOKIE_LIFETIME = 1800;
|
370
|
+
const formatString = (str) => {
|
371
|
+
const parts = str.split(/<\s*br\s*\/?\s*>/);
|
372
|
+
return o(parts, x `<br />`);
|
373
|
+
};
|
372
374
|
let BlotoutWallet = class BlotoutWallet extends s {
|
373
375
|
constructor() {
|
374
376
|
super(...arguments);
|
@@ -416,31 +418,33 @@ let BlotoutWallet = class BlotoutWallet extends s {
|
|
416
418
|
}
|
417
419
|
};
|
418
420
|
this.expiredCartContent = () => {
|
421
|
+
var _a, _b, _c, _d;
|
419
422
|
return x `<form
|
420
423
|
class="restore-form"
|
421
424
|
method="dialog"
|
422
425
|
@submit=${this.onSubmit}
|
423
426
|
>
|
424
|
-
<div
|
425
|
-
|
426
|
-
<p>
|
427
|
-
But we've got you covered!
|
428
|
-
${wink({ style: 'vertical-align: text-bottom' })}
|
429
|
-
</p>
|
427
|
+
<div>
|
428
|
+
${formatString(((_a = this.theme) === null || _a === void 0 ? void 0 : _a.text) || customAttributes.text.defaultValue)}
|
430
429
|
</div>
|
431
430
|
<input
|
432
431
|
type="email"
|
433
432
|
name="email"
|
434
|
-
placeholder=
|
433
|
+
placeholder=${((_b = this.theme) === null || _b === void 0 ? void 0 : _b.inputLabel) ||
|
434
|
+
customAttributes.inputLabel.defaultValue}
|
435
435
|
?required=${!this.hasEmail}
|
436
|
-
style=${o({
|
436
|
+
style=${o$1({
|
437
437
|
display: this.hasEmail ? 'none' : 'block',
|
438
438
|
})}
|
439
439
|
/>
|
440
|
-
<button class="restore" type="submit">
|
440
|
+
<button class="restore" type="submit">
|
441
|
+
${((_c = this.theme) === null || _c === void 0 ? void 0 : _c.restoreLabel) ||
|
442
|
+
customAttributes.restoreLabel.defaultValue}
|
443
|
+
</button>
|
441
444
|
</form>
|
442
445
|
<button class="delete" type="button" @click=${this.skipCarts}>
|
443
|
-
|
446
|
+
${((_d = this.theme) === null || _d === void 0 ? void 0 : _d.rejectionLabel) ||
|
447
|
+
customAttributes.rejectionLabel.defaultValue}
|
444
448
|
</button> `;
|
445
449
|
};
|
446
450
|
}
|
@@ -585,17 +589,7 @@ BlotoutWallet.styles = [
|
|
585
589
|
gap: 16px;
|
586
590
|
}
|
587
591
|
|
588
|
-
|
589
|
-
display: flex;
|
590
|
-
flex-direction: column;
|
591
|
-
gap: 4px;
|
592
|
-
|
593
|
-
p {
|
594
|
-
margin: 0;
|
595
|
-
}
|
596
|
-
}
|
597
|
-
|
598
|
-
input[name='email'] {
|
592
|
+
input {
|
599
593
|
width: 100%;
|
600
594
|
border: 1px solid var(--input-border);
|
601
595
|
color: var(--input-foreground);
|
@@ -604,8 +598,13 @@ BlotoutWallet.styles = [
|
|
604
598
|
border-radius: 5px;
|
605
599
|
}
|
606
600
|
|
607
|
-
input
|
601
|
+
input::placeholder {
|
608
602
|
color: var(--input-foreground);
|
603
|
+
color: color(from var(--input-foreground) srgb r g b / 0.7);
|
604
|
+
}
|
605
|
+
|
606
|
+
:is(input[name='email'], button):focus-visible {
|
607
|
+
outline-color: var(--primary);
|
609
608
|
}
|
610
609
|
|
611
610
|
.restore {
|
@@ -672,9 +671,11 @@ const init = (params) => {
|
|
672
671
|
const theme = (_d = params.manifest.variables) === null || _d === void 0 ? void 0 : _d['theme'];
|
673
672
|
if (theme) {
|
674
673
|
element.style.cssText = Object.entries(theme)
|
674
|
+
.filter(([name]) => name.startsWith('--'))
|
675
675
|
.map(([name, value]) => `${name}:${value}`)
|
676
676
|
.join(';');
|
677
677
|
}
|
678
|
+
element.theme = theme;
|
678
679
|
element.edgeURL = params.baseUrl;
|
679
680
|
element.userId = params.userId;
|
680
681
|
document.body.append(element);
|