@frak-labs/components 1.3.0-beta.feb13924 → 1.3.1
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/cdn/Ambassador.DugUIOLT.js +392 -0
- package/cdn/Banner.gDEO8VKX.js +208 -0
- package/cdn/{ButtonShare.UhoAxsGt.js → ButtonShare.OuDvPMdk.js} +1 -1
- package/cdn/ButtonWallet.DNE6ZhkT.js +40 -0
- package/cdn/GiftIcon.NTATj1WE.js +1 -0
- package/cdn/{OpenInAppButton.BfMQFzoN.js → OpenInAppButton.Dv7oAwl1.js} +1 -1
- package/cdn/PostPurchase.DCNA-GAT.js +102 -0
- package/cdn/components.js +1 -1
- package/cdn/{jsxRuntime.module.DCugjvlV.js → jsxRuntime.module.C5UTjP_H.js} +1 -1
- package/cdn/loader.js +58 -36
- package/cdn/qr.vkJgq9pN.js +5 -0
- package/cdn/replay-V6FXES7X.efKsNT6s.js +1 -0
- package/cdn/rewards.COyZ6-7W.js +1 -0
- package/cdn/useGlobalComponents.DoG1wfeq.js +1 -0
- package/cdn/{useLightDomStyles.BS4EHEmn.js → useLightDomStyles.B0_CS0Kq.js} +1 -1
- package/cdn/{usePlacement.CUkTnqlu.js → usePlacement.B5JX9OU-.js} +1 -1
- package/cdn/{useReward.Dnfj2E2g.js → useReward.By-xuybY.js} +1 -1
- package/dist/{GiftIcon-DNqgjTjb.js → GiftIcon-JVhSFEhP.js} +0 -1
- package/dist/ambassador.js +162 -99
- package/dist/banner.js +84 -59
- package/dist/postPurchase.js +43 -30
- package/dist/sharedBaseCss.css-BkMpQeRx.js +5 -0
- package/package.json +5 -4
- package/cdn/Ambassador.dWFL3OMZ.js +0 -333
- package/cdn/Banner.BaEY18ZO.js +0 -183
- package/cdn/ButtonWallet.DROPSw9u.js +0 -40
- package/cdn/GiftIcon.DNEaYOmS.js +0 -1
- package/cdn/PostPurchase.D-aOKaLH.js +0 -89
- package/cdn/qr.Bdg4-2EI.js +0 -5
- package/cdn/replay-V6FXES7X.CgBxdfNp.js +0 -1
- package/cdn/rewards.B_p05JY_.js +0 -1
- package/cdn/useGlobalComponents.CXXK4kVf.js +0 -1
- package/dist/sharedBaseCss.css-ChRUA1zY.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023 Paul Miller (paulmillr.com)
|
|
3
|
+
* SPDX-License-Identifier: MIT OR Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
const e=/* @__PURE__ */ (()=>{let e=[];for(let t=1;t<=40;t++){let n=(16*t+128)*t+64;if(t>=2){let e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}e.push(n>>>3)}return e})(),t=[`low`,`medium`,`quartile`,`high`],n={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},r={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},i={low:1,medium:0,quartile:3,high:2},a=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`;function o(e){if(e=y(e),e===1)return[];let t=21+4*(e-1)-7,n=Math.ceil((t-6)/28),r=Math.floor((t-6)/n);r%2?r+=1:(t-6)%n*2>=n&&(r+=2);let i=[6];for(let e=1;e<n;e++)i.push(t-(n-e)*r);return i.push(t),i}function s(e,t){let n=i[e]<<3|t,r=n;for(let e=0;e<10;e++)r=r<<1^(r>>9)*1335;return(n<<10|r)^21522}function c(e){let t=e;for(let e=0;e<12;e++)t=t<<1^(t>>11)*7973;return e<<12|t}const l={numeric:1,alphanumeric:2,byte:4},u={numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16]},d=/* @__PURE__ */ (()=>{let e=/* @__PURE__ */ new Uint8Array(510),t=/* @__PURE__ */ new Uint8Array(256);for(let n=0,r=1;n<255;n++)e[n]=e[n+255]=r,t[r]=n,r<<=1,r&256&&(r^=285);return{exp:e,log:t}})();function f(e){let{exp:t,log:n}=d,r=new Uint8Array(e);r[e-1]=1;for(let i=0,a=1;i<e;i++){for(let i=0;i<e;i++){let o=r[i];r[i]=(o?t[n[o]+n[a]]:0)^(i+1<e?r[i+1]:0)}a=t[n[a]+1]}return r}const p=[];function m(e){let t=p[e];if(t!==void 0)return t;let n=f(e),{exp:r,log:i}=d,a=e+3>>>2,o=new Int32Array(256*a);for(let t=1;t<256;t++){let s=i[t];for(let c=0;c<e;c++){let e=n[c];e&&(o[t*a+(c>>>2)]|=r[i[e]+s]<<8*(c&3))}}return p[e]={gen:n,mul32:o}}const h=/* @__PURE__ */ new Int32Array(8);function g(e,t,n){let r=t.length,i=n.length>>>8,a=i-1,o=h.fill(0,0,i);for(let t=0;t<e.length;t++){let r=o[0],s=(e[t]^r&255)*i;for(let e=0;e<a;e++){let t=o[e+1];o[e]=(r>>>8|t<<24)^n[s+e],r=t}o[a]=r>>>8^n[s+a]}let s=new Uint8Array(r);for(let e=0;e<r;e++)s[e]=o[e>>>2]>>>8*(e&3);return s}function _(t,i){let a=e[t-1],o=n[i][t-1],s=r[i][t-1],c=Math.floor(a/s)-o;return{words:o,numBlocks:s,shortBlocks:s-a%s,blockLen:c,capacity:(a-o*s)*8}}const v=e=>{throw Error(e)};function y(e){if(typeof e!=`number`)throw TypeError(`"ver" expected number, got type=${typeof e}`);if(!Number.isSafeInteger(e))throw RangeError(`"ver" expected safe integer, got ${e}`);if(e<1||e>40)throw RangeError(`Invalid version=${e}. Expected number [1..40]`);return e}function b(e){let t=`numeric`;for(let n=0;n<e.length;n++){let r=x[e.charCodeAt(n)];if(!(r>=0))return`byte`;r>9&&(t=`alphanumeric`)}return t}const x=/* @__PURE__ */ (()=>{let e=(/* @__PURE__ */ new Int8Array(128)).fill(-1);for(let t=0;t<45;t++)e[a.charCodeAt(t)]=t;return e})();function S(e,t,n,r,i){let a=_(e,t),o=u[r][Math.floor((e+7)/17)],s=r===`byte`?i.length:n.length;s>=1<<o&&v(`Capacity overflow`);let c=new Uint8Array(a.capacity>>>3),d=0,f=0,p=0,h=(e,t)=>{for(d=d<<t|e,f+=t;f>=8;)c[p++]=d>>>(f-=8)&255};if(h(l[r],4),h(s,o),r===`numeric`)for(let e=0;e<s;e+=3){let t=Math.min(3,s-e);h(Number(n.slice(e,e+t)),[0,4,7,10][t])}else if(r===`alphanumeric`){for(let e=0;e+1<s;e+=2)h(x[n.charCodeAt(e)]*45+x[n.charCodeAt(e+1)],11);s&1&&h(x[n.charCodeAt(s-1)],6)}else for(let e=0;e<i.length;e++)h(i[e],8);let y=p*8+f;y>a.capacity&&v(`Capacity overflow`),f&&(c[p]=d<<8-f&255),y+=Math.min(4,a.capacity-y),y&7&&(y+=8-(y&7));for(let e=y>>>3,t=0;e<c.length;e++,t^=1)c[e]=t?17:236;let{words:b,numBlocks:S,shortBlocks:C,blockLen:w}=a,T=m(b),E=[],D=[];for(let e=0,t=0;e<S;e++){let n=w+(e<C?0:1);E.push(c.subarray(t,t+n)),D.push(g(E[e],T.gen,T.mul32)),t+=n}let O=new Uint8Array(c.length+b*S),k=0;for(let e=0;e<=w;e++)for(let t of E)e<t.length&&(O[k++]=t[e]);for(let e=0;e<b;e++)for(let t of D)O[k++]=t[e];return O}function C(e,t){let n=e%2,r=t%2,i=e%3,a=t%3*i%3,o=n&r,s=0;return n===r&&(s|=1),r===0&&(s|=2),i===0&&(s|=4),(e+t)%3==0&&(s|=8),(Math.floor(t/2)+Math.floor(e/3))%2==0&&(s|=16),o+a===0&&(s|=32),(o+a)%2==0&&(s|=64),((n^r)+a)%2==0&&(s|=128),s}const w=/* @__PURE__ */ (()=>{let e=/* @__PURE__ */ new Uint8Array(72);for(let t=0;t<12;t++)for(let n=0;n<6;n++)e[t*6+n]=C(n,t);return e})();function T(e,t){return w[t%12*6+e%6]}const E=/* @__PURE__ */ (()=>{let e=/* @__PURE__ */ new Uint8Array(65536);for(let t=1;t<e.length;t++)e[t]=e[t>>>1]+(t&1);return e})(),D=e=>E[e&65535]+E[e>>>16],O=/* @__PURE__ */ new Int32Array(32);function k(e){let t=[1431655765,858993459,252645135,16711935,65535];for(let n=0;n<5;n++){let r=t[n],i=1<<n;for(let t=0;t<32;t+=i<<1)for(let n=0;n<i;n++){let a=e[t+n],o=e[t+n+i],s=(a>>>i^o)&r;e[t+n]=a^s<<i,e[t+n+i]=o^s}}}const A=e=>{let t=e+31>>>5;return{size:e,words:t,v:new Int32Array(t*e)}},j=(e,t,n)=>e.v[n*e.words+(t>>>5)]>>>(t&31)&1,M=(e,t,n,r)=>{let i=n*e.words+(t>>>5),a=1<<(t&31);e.v[i]=r?e.v[i]|a:e.v[i]&~a};function N(e,t){let{size:n,words:r,v:i}=e,a=O;for(let e=0;e<n;e+=32)for(let o=0;o<r;o++){let s=Math.min(32,n-e);for(let t=0;t<s;t++)a[t]=i[(e+t)*r+o];a.fill(0,s),k(a);for(let r=0,i=o*32;r<32&&i<n;r++,i++)t.v[i*t.words+(e>>>5)]=a[r]}}function P(e){let{size:t,words:n,v:r}=e,i=t&31?~(-1<<(t&31)):-1,a=0;for(let e=0;e<n;e++){let o=e===n-1?i:-1,s=r[3*n+e],c=-1,l=r[e]^r[n+e],u=r[n+e]^r[2*n+e],d=r[2*n+e]^s;for(let i=0,f=4*n+e;i<=t-5;i++,f+=n){let e=r[f],t=s^e,n=~(l|u|d|t)&o;n&&(a+=D(n)+2*D(n&c)),c=l,l=u,u=d,d=t,s=e}}return a}function F(e){let{size:t,words:n,v:r}=e,i=t&31?~(-1<<(t&31)):-1,a=0;for(let e=0;e<n;e++){let o=e===n-1?i:-1,s=e,c=r[s],l=r[s+=n],u=r[s+=n],d=r[s+=n],f=r[s+=n],p=r[s+=n],m=r[s+=n],h=r[s+=n],g=r[s+=n],_=r[s+=n];for(let e=0;e<=t-11;e++){let e=r[s+=n],t=o&c&~l&u&d&f&~p&m&~(h|g|_|e),i=o&~(c|l|u|d)&f&~p&m&h&g&~_&e;a+=D(t)+D(i),c=l,l=u,u=d,d=f,f=p,p=m,m=h,h=g,g=_,_=e}}return a}function I(e,t,n=1/0){let{size:r,words:i,v:a}=e,o=P(e)+P(t);if(o>=n)return o;let s=~(-1<<r-32*(i-1)-1),c=0,l=0;for(let e=0;e<r;e++)for(let t=0;t<i;t++){let n=a[e*i+t];if(l+=D(n),e===r-1)continue;let o=a[(e+1)*i+t],u=t+1<i?a[e*i+t+1]:0,d=t+1<i?a[(e+1)*i+t+1]:0,f=~(n^o),p=~(n^(n>>>1|u<<31)),m=~(o^(o>>>1|d<<31)),h=f&p&m;t===i-1&&(h&=s),c+=D(h)}let u=r*r,d=Math.ceil(Math.max(0,Math.abs(l*100-u*50)-u*5)/(u*5)),f=o+3*c+10*d;return f>=n?f:f+40*(F(e)+F(t))}function L(e,t,n,r){let i=e.size,a=s(n,r);for(let t=0;t<15;t++){let n=a>>t&1;t<6?M(e,8,t,n):t<8?M(e,8,t+1,n):t===8?M(e,7,8,n):M(e,14-t,8,n),t<8?M(e,i-1-t,8,n):M(e,8,i-15+t,n)}if(M(e,8,i-8,1),t>=7){let n=c(t);for(let t=0;t<18;t++){let r=n>>t&1,a=i-11+t%3,o=t/3|0;M(e,a,o,r),M(e,o,a,r)}}}let R;function z(e){let t=21+4*(e-1),n=A(t),r=new Uint8Array(t*t),i=(e,i,a)=>{M(n,e,i,a),r[i*t+e]=1};for(let[e,n]of[[0,0],[t-7,0],[0,t-7]])for(let r=-1;r<8;r++)for(let a=-1;a<8;a++){let o=e+a,s=n+r;o<0||s<0||o>=t||s>=t||i(o,s,+(a>=0&&a<7&&r>=0&&r<7&&(a===0||a===6||r===0||r===6||a>1&&a<5&&r>1&&r<5)))}let a=o(e);for(let e of a)for(let n of a)if(!r[e*t+n])for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++){let a=Math.max(Math.abs(r),Math.abs(t))!==1;i(n+r,e+t,+!!a)}for(let e=0;e<t;e++)r[6*t+e]||i(e,6,+(e%2==0)),r[e*t+6]||i(6,e,+(e%2==0));for(let e=0;e<9;e++)e!==6&&(i(8,e,0),i(e,8,0)),e<8&&(i(t-1-e,8,0),i(8,t-1-e,0));if(e>=7)for(let e=0;e<18;e++){let n=t-11+e%3,r=e/3|0;i(n,r,0),i(r,n,0)}let s=[];for(let e=0;e<8;e++)s.push(A(t));let c=new Uint16Array(t*t),l=0;for(let e=t-1,i=-1,a=t-1;e>0;e-=2,i=-i)for(e===6&&(e=5);;a+=i){for(let i=0;i<2;i++){let o=e-i;if(r[a*t+o])continue;let u=a*n.words+(o>>>5);c[l++]=u<<5|o&31;for(let e=0,t=T(o,a);t;e++,t>>=1)t&1&&(s[e].v[u]|=1<<(o&31))}if(a+i<0||a+i>=t)break}let u=new Int32Array(l>>>1);for(let e=0;e+1<l;e+=2){let t=c[e],n=c[e+1];t>>>5==n>>>5&&(t&31)==(n&31)+1&&(u[e>>>1]=t>>>5<<6|(n&31)<<1|1)}let d=s.map(e=>{let n=A(t);return N(e,n),n.v});return{ver:e,tpl:n.v,pos:c.slice(0,l),pair:u,planes:s.map(e=>e.v),planesT:d,work:[A(t),A(t),A(t),A(t)]}}function B(e,t,n,r,i=!1){(R===void 0||R.ver!==e)&&(R=z(e));let{tpl:a,pos:o,pair:s,planes:c,planesT:l,work:u}=R,[d,f,p,m]=u;d.v.set(a);let h=Math.min(8*n.length,o.length);for(let e=0;e<h;e+=2){let t=n[e>>>3]>>>6-(e&7)&3;if(t===0)continue;let r=s[e>>>1];if(r&1)d.v[r>>>6]|=t<<(r>>>1&31);else{if(t&2){let t=o[e];d.v[t>>>5]|=1<<(t&31)}if(t&1){let t=o[e+1];d.v[t>>>5]|=1<<(t&31)}}}let g=r;if(g===void 0){N(d,f);let e=1/0;for(let t=0;t<8;t++){let n=c[t],r=l[t];for(let e=0;e<p.v.length;e++)p.v[e]=d.v[e]^n[e],m.v[e]=f.v[e]^r[e];let i=I(p,m,e);i<e&&(e=i,g=t)}}let _=c[g];for(let e=0;e<d.v.length;e++)d.v[e]^=_[e];return i||L(d,e,t,g),d}const V=(e,t)=>{if(typeof e!=`number`)throw TypeError(`"${t}" expected number, got type=${typeof e}`);if(!Number.isSafeInteger(e))throw RangeError(`"${t}" expected safe integer, got ${e}`);return e},H=(e,t)=>{if(typeof e!=`string`)throw TypeError(`"${t}" expected string, got type=${typeof e}`);return e};function U(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<128)t++;else if(r<2048)t+=2;else if(r<55296||r>57343)t+=3;else if(r<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=4,n++):t+=3}else t+=3}return t}function W(e,t){let n=u.byte[Math.floor((e+7)/17)];return Math.min((1<<n)-1,Math.floor((_(e,t).capacity-4-n)/8))}function G(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}const ee=(e,t,n)=>e.map[t]>=0&&e.map[n]>=0&&j(e.m,e.map[t],e.map[n])===1,K=[10,27],q=/* @__PURE__ */ String.fromCharCode(K[0]);function te(e){let{m:t,W:n,map:r}=e,i=Array(n),{words:a,v:o}=t;for(let e=0;e<n;e++){let t=r[e],s=Array(n);if(t<0)for(let e=0;e<n;e++)s[e]=!1;else{let e=t*a;for(let t=0;t<n;t++){let n=r[t];s[t]=n>=0&&(o[e+(n>>>5)]>>>(n&31)&1)==1}}i[e]=s}return i}const J=[`█`,`▀`,`▄`,` `],ne=/* @__PURE__ */ (()=>{let e=[];for(let t=0;t<256;t++)e.push(J[t>>6]+J[t>>4&3]+J[t>>2&3]+J[t&3]);return e})();function re(e){let{m:t,W:n,map:r}=e,{words:i,v:a}=t,o=``;for(let e=0;e<n;e+=2){let t=r[e],s=e+1<n?r[e+1]:-2,c=t*i,l=s*i,u=0,d=0;for(let e=0;e<n;e++){let n=r[e],i=+(s===-2);n>=0&&(t>=0&&a[c+(n>>>5)]>>>(n&31)&1&&(i|=2),s>=0&&a[l+(n>>>5)]>>>(n&31)&1&&(i|=1)),u=u<<2|i,++d===4&&(o+=ne[u],u=0,d=0)}for(let e=0;e<d;e++)o+=J[u>>2*(d-1-e)&3];o+=q}return o}function ie(e){let t=e.W,n=String.fromCharCode(K[1]),r=n+`[0m`,i=``;for(let a=0;a<t;a++){for(let o=0;o<t;o++)i+=ee(e,o,a)?`${n}[40m ${r}`:`${n}[1;47m ${r}`;i+=q}return i}const Y=e=>e<10?1:e<100?2:e<1e3?3:e<1e4?4:String(e).length,X=e=>e<0?1+Y(-e):Y(e);let Z;function ae(e,t){let{m:n,W:r,map:i}=e,{words:a,v:o}=n;(Z===void 0||Z.W!==r)&&(Z={W:r,cmds:Array(4*r)});let s=Z.cmds,c=`<svg viewBox="0 0 ${r} ${r}" xmlns="http://www.w3.org/2000/svg">`,l=``,u=0,d=0,f=!1;for(let e=0;e<r;e++){let n=i[e];if(n<0)continue;let p=n*a;for(let n=0;n<r;n++){let a=i[n];if(a<0||!(o[p+(a>>>5)]>>>(a&31)&1))continue;if(!t){c+=`<rect x="${n}" y="${e}" width="1" height="1" />`;continue}let m=n-u,h=e-d,g;if(f&&n>=10&&h<=1&&X(m)+1<=Y(n)+Y(e)){let e=(2*h+1)*r+m;g=s[e],g===void 0&&(g=s[e]=`m${m} ${h}h1v1h-1Z`)}else{let t;t=f&&X(m)+X(h)<=Y(n)+Y(e)?`m${m} ${h}`:`M${n} ${e}`,g=`${t}h1v1${n<10?`H${n}`:`h-1`}Z`}l+=g,u=n,d=e,f=!0}}return t&&(c+=`<path d="${l}"/>`),c+`</svg>`}function Q(e){let t=e.W,n=t*t,r=Math.floor(n/126),i=n%126,a=new Uint8Array(408+r*128+2+i+4),o=0,s=e=>{a[o++]=e&255,a[o++]=e>>>8};for(let e of[71,73,70,56,55,97])a[o++]=e;s(t),s(t),a[o++]=246,o+=2,a[o++]=255,a[o++]=255,a[o++]=255,o+=381,a[o++]=44,o+=4,s(t),s(t),a[o++]=0,a[o++]=7;let{m:c,map:l}=e,{words:u,v:d}=c,f=new Uint8Array(t),p=a.length-4-n,m=-2;for(let e=0,n=p;e<t;e++,n+=t){let r=l[e];if(r!==m&&(m=r,f.fill(0),r>=0)){let e=r*u;for(let n=0;n<t;n++){let t=l[n];t>=0&&(f[n]=d[e+(t>>>5)]>>>(t&31)&1)}}a.set(f,n)}for(let e=0,t=p;e<n;e+=126,t+=126){let r=n-e<126?n-e:126;a[o++]=r+1,a[o++]=128,a.copyWithin(o,t,t+r),o+=r}return i===0&&(a[o++]=1,a[o++]=128),a[o++]=1,a[o++]=129,a[o++]=0,a[o++]=59,a}function oe(e){let t=e,n;if(typeof t.toBase64==`function`)n=t.toBase64();else{let e=``;for(let n=0;n<t.length;n+=8192)e+=String.fromCharCode(...t.subarray(n,n+8192));n=btoa(e)}return`data:image/gif;base64,`+n}function $(e,n=`raw`,r={}){if(H(e,`text`),H(n,`output`),typeof r!=`object`||!r||Array.isArray(r))throw TypeError(`"opts" expected object, got type=${typeof r}`);let i=r.version;i!==void 0&&(i=y(i));let o=r.ecc===void 0?`medium`:r.ecc;t.includes(o)||v(`invalid ecc=${o}`);let s=r.encoding===void 0?b(e):r.encoding;if(u[s]||v(`invalid encoding=${s}`),s!==`byte`){let t=s===`numeric`?10:45;for(let n=0;n<e.length;n++){let r=x[e.charCodeAt(n)];if(!(r>=0&&r<t)){let r=String.fromCodePoint(e.codePointAt(n));v(`Unknown letter: "${r}". Allowed: ${a.slice(0,t)}`)}}}r.mask!==void 0&&(V(r.mask,`opts.mask`)<0||r.mask>7)&&v(`invalid mask=${r.mask}`);let c=r.textEncoder;if(s===`byte`&&c===void 0){let t=W(i===void 0?40:i,o);(e.length>t||U(e)>t)&&v(`Capacity overflow`)}let l=s===`byte`?(c===void 0?e=>new TextEncoder().encode(e):c)(e):void 0;if(l!==void 0&&!G(l))throw TypeError(`"opts.textEncoder" expected Uint8Array, got type=${typeof l}`);let d=s===`byte`?l.length:e.length,f=s===`numeric`?Math.floor(d/3)*10+[0,4,7][d%3]:s===`alphanumeric`?Math.floor(d/2)*11+d%2*6:d*8;if(i===void 0){for(i=1;i<=40;i++){let e=u[s][Math.floor((i+7)/17)];if(d<1<<e&&4+e+f<=_(i,o).capacity)break}i>40&&v(`Capacity overflow`)}else{let e=u[s][Math.floor((i+7)/17)];(d>=1<<e||4+e+f>_(i,o).capacity)&&v(`Capacity overflow`)}let p=S(i,o,e,s,l),m=B(i,o,p,r.mask),h=r.border===void 0?2:V(r.border,`opts.border`);if(h<=0)throw RangeError(`invalid border=${h}`);let g=r.scale===void 0?1:V(r.scale,`opts.scale`);if(g<=0||g>1024)throw RangeError(`invalid scale factor: ${g}`);let C=(m.size+2*h)*g,w=n===`ascii`||n===`gif`||n===`data-url`?4096:1024;if(C>w)throw RangeError(`invalid opts: output is ${C}x${C} (max ${w}), reduce border/scale`);let T=new Int32Array(C);for(let e=0;e<C;e++){let t=Math.floor(e/g)-h;T[e]=t>=0&&t<m.size?t:-1}let E={m,W:C,map:T};return n===`raw`?te(E):n===`ascii`?re(E):n===`term`?ie(E):n===`svg`?ae(E,r.optimize===void 0||r.optimize):n===`gif`?Q(E):n===`data-url`?oe(Q(E)):v(`Unknown output: ${n}`)}export{$ as default,$ as encodeQR};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){return()=>{}}var t=null;function n(n,r){if(typeof document>`u`||typeof window>`u`)return;t&&t();let i=n.maxEventsPerChunk??200,a=n.flushIntervalMs??1e4,o=n.maxPayloadBytes??1048576,s=[],c=0,l=null;function u(e){if(s.length===0)return;let t=JSON.stringify(s);if(new TextEncoder().encode(t).length>o){if(s.length>1){let t=Math.floor(s.length/2),n=s.slice(0,t),r=s.slice(t),i=e&&n.some(e=>e.type===2);s=n,u(i),s=r,u(!1);return}s=[];return}let n=s[0].timestamp,i=s[s.length-1].timestamp;try{r({chunk_index:c,events_count:s.length,is_full_snapshot:e,started_at:new Date(n).toISOString(),ended_at:new Date(i).toISOString(),payload:t}),c+=1,s=[]}catch(e){throw e}}function d(e){let t=e||s.some(e=>e.type===2);s.length>=i?u(t):e&&s.length>0&&u(!0)}let f=n.maskAllText!==!1,p=n.unmaskTextSelector,m=e({emit(e,t){s.push(e),d(!!t)},checkoutEveryNms:a,maskAllInputs:n.maskAllInputs??!0,maskTextSelector:f?`*`:`[data-openpanel-replay-mask]`,maskTextFn:f&&p?(e,t)=>t?.closest(p)?e:e.replace(/\S/g,`*`):void 0,blockSelector:n.blockSelector??`[data-openpanel-replay-block]`,blockClass:n.blockClass,ignoreSelector:n.ignoreSelector});l=setInterval(()=>{s.length>0&&u(s.some(e=>e.type===2))},a);function h(){document.visibilityState===`hidden`&&s.length>0&&u(s.some(e=>e.type===2))}function g(){s.length>0&&u(s.some(e=>e.type===2))}document.addEventListener(`visibilitychange`,h),window.addEventListener(`pagehide`,g),t=()=>{s.length>0&&u(s.some(e=>e.type===2)),l&&=(clearInterval(l),null),document.removeEventListener(`visibilitychange`,h),window.removeEventListener(`pagehide`,g),m?.(),t=null}}function r(){t&&t()}export{n as startReplayRecorder,r as stopReplayRecorder};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as e,b as t,v as n,x as r,y as i}from"./loader.js";function a(e){return Array.isArray(e)?e:e.conditions}function o(e){if(typeof e==`number`)return e;if(typeof e==`string`&&e.trim()!==``){let t=Number(e);return Number.isFinite(t)?t:void 0}}function s(e,t,n){let r=[];for(let i of a(e)){if(`logic`in i){r.push(...s(i,t,n));continue}if(i.field===t&&n.has(i.operator)){let e=o(i.value);e!=null&&r.push(e)}}return r}const c=/* @__PURE__ */ new Set([`gt`,`gte`,`between`]),l=/* @__PURE__ */ new Set([`gt`,`gte`]);function u(e){let t=s(e,`purchase.amount`,c);return t.length>0?Math.min(...t):void 0}function d(e){let t=s(e,`time.timestamp`,l);if(t.length!==0)return/* @__PURE__ */ new Date(Math.min(...t)*1e3)}function f(e,t){switch(e.payoutType){case`fixed`:return e.amount[t];case`percentage`:return e.maxAmount?.[t]??0;case`tiered`:return e.tiers.reduce((e,n)=>`amount`in n?Math.max(e,n.amount[t]):e,0)}}function p(e){return e.payoutType===`percentage`?e.percent:e.payoutType===`tiered`?e.tiers.reduce((e,t)=>`percent`in t?Math.max(e,t.percent):e,0):0}function m(e,t){let n=f(e,t);return n>0?n:p(e)*1e-6}function h(n,i){let a=e(i),o=r(a);switch(n.payoutType){case`fixed`:return t(Math.round(n.amount[o]),a);case`percentage`:return`${n.percent} %`;case`tiered`:{let e=f(n,o);if(e>0)return t(Math.round(e),a);let r=p(n);return r>0?`${r} %`:t(0,a)}}}function g(t,a){let o=e(a),s=r(o);switch(t.payoutType){case`fixed`:return n(Math.round(t.amount[s]),o);case`percentage`:return i(t.percent);case`tiered`:{let e=f(t,s);if(e>0)return n(Math.round(e),o);let r=p(t);return r>0?i(r):n(0,o)}}}function _(t,n){if(!(!t||m(t,r(e(n)))<=0))return h(t,n)}function v(e,t){return t?e.replaceAll(`{REWARD}`,t):e.replaceAll(`{REWARD}`,``)}const y=/* @__PURE__ */ new Set([`eq`,`neq`,`gt`,`gte`,`lt`,`lte`,`between`]),b=/* @__PURE__ */ new Set([`contains`,`starts_with`,`ends_with`]);function x(e){return`logic`in e&&`conditions`in e}function S(e,t){return e[t]}function C(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(typeof e==`string`&&e.trim()!==``){let t=Number(e);return Number.isFinite(t)?t:void 0}}function w(e,t){let n=C(e),r=C(t);return n!==void 0&&r!==void 0?n-r:String(e).localeCompare(String(t))}function T(e,t,n){if(!Array.isArray(n))return e===`not_in`;if(t==null)return;let r=n.includes(t);return e===`in`?r:!r}function E(e,t,n,r){switch(e){case`eq`:return t===n;case`neq`:return t!==n;case`gt`:return w(t,n)>0;case`gte`:return w(t,n)>=0;case`lt`:return w(t,n)<0;case`lte`:return w(t,n)<=0;case`between`:return r==null||Array.isArray(r)?void 0:w(t,n)>=0&&w(t,r)<=0}}function D(e,t,n){if(typeof t==`string`&&typeof n==`string`)return e===`contains`?t.includes(n):e===`starts_with`?t.startsWith(n):t.endsWith(n)}function O(e,t){let n=S(t,e.field),{operator:r,value:i,valueTo:a}=e;if(r===`exists`)return n!=null;if(r===`not_exists`)return n==null;if(r===`in`||r===`not_in`)return T(r,n,i);if(!(Array.isArray(i)||n==null||i==null)){if(y.has(r))return E(r,n,i,a);if(b.has(r))return D(r,n,i)}}function k(e,t){if(x(e)){let n=e.conditions.map(e=>k(e,t));return e.logic===`all`?n.every(Boolean):e.logic===`any`?n.some(Boolean):e.logic!==`none`||!n.some(Boolean)}return O(e,t)??!0}function A(e,t){return e?Array.isArray(e)?e.every(e=>k(e,t)):k(e,t):!0}function j(e,t){return e.expiresAt!=null&&new Date(e.expiresAt).getTime()<=t}function M(e,t){let n=d(e.conditions);return n==null||n.getTime()<=t}function N(e,t){return t===`referee`?e.referee:e.referrer}function P(e,t,n){let r=N(e,n);return r?m(r,t):0}function F(e,t){if(!t||t.length===0||!e.productScope)return;let n=t.filter(t=>A(e.productScope,t));return n.length>0?n:void 0}function I(e,t){return!t||t.length===0||!e.productScope||t.some(t=>A(e.productScope,t))}function L(t,n={}){let i=(n.now??/* @__PURE__ */ new Date).getTime(),a=n.audience??`referrer`,o=r(e(n.currency)),s=(n.targetInteraction?t.filter(e=>e.interactionTypeKey===n.targetInteraction):t).filter(e=>!j(e,i)),c=s.filter(e=>M(e,i));if(c.length>0){let e=c.reduce((e,t)=>{let r=I(e,n.products),i=I(t,n.products);return r===i?P(t,o,a)>P(e,o,a)?t:e:i?t:e});return{campaign:e,status:`live`,matchedProducts:F(e,n.products)}}let l=s.map(e=>({campaign:e,startsAt:d(e.conditions)})).filter(e=>e.startsAt!=null);if(l.length===0)return;let u=l.reduce((e,t)=>{let r=I(e.campaign,n.products),i=I(t.campaign,n.products);return r===i?t.startsAt.getTime()<e.startsAt.getTime()?t:e:i?t:e});return{campaign:u.campaign,status:`upcoming`,startsAt:u.startsAt,matchedProducts:F(u.campaign,n.products)}}function R(e,n={}){let r=L(e,n);if(!r)return;let i=N(r.campaign,n.audience??`referrer`);if(!i)return;let a=_(i,n.currency);if(!a)return;let o=u(r.campaign.conditions),s=o==null?void 0:t(o,n.currency),c=r.campaign.defaultLockupSeconds,l=c&&c>0?Math.round(c/86400):void 0;return{formatted:a,parts:g(i,n.currency),payoutType:i.payoutType,minPurchaseAmount:s,lockupDurationDays:l,referrerReward:r.campaign.referrer,refereeReward:r.campaign.referee,minPurchaseValue:o??void 0,isProductScoped:r.campaign.productScope!=null,matchedProducts:r.matchedProducts}}export{v as i,L as n,R as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./loader.js";import{o as t,s as n}from"./jsxRuntime.module.C5UTjP_H.js";function r(){return n(t,()=>e.getConfig().components)}export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as e}from"./loader.js";import{f as t,i as n}from"./jsxRuntime.module.
|
|
1
|
+
import{O as e}from"./loader.js";import{f as t,i as n}from"./jsxRuntime.module.C5UTjP_H.js";function r(r,i,a,o,s){t(()=>{s&&e.injectBase(`shared`,s),e.injectBase(r,o??n)},[r]),t(()=>{a&&e.injectPlacement(r,i??``,a)},[r,i,a])}export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as e}from"./loader.js";import{o as t,p as n,s as r}from"./jsxRuntime.module.
|
|
1
|
+
import{w as e}from"./loader.js";import{o as t,p as n,s as r}from"./jsxRuntime.module.C5UTjP_H.js";function i(t){return e.getConfig().placements?.[t]}function a(e){let a=n(()=>e?i(e):void 0,[e]);return r(t,a)}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as e}from"./loader.js";import{d as t,f as n}from"./jsxRuntime.module.C5UTjP_H.js";import{r}from"./rewards.COyZ6-7W.js";function i(i,a,o,s){let[c,l]=t(void 0),[u,d]=t(!1);return n(()=>{if(!i)return;let t=window.FrakSetup?.client;t&&e(t).then(e=>{let n=r(e.rewards,{currency:t.config.metadata?.currency,targetInteraction:a,audience:o,products:s});d(n!==void 0),n&&n.payoutType!==`percentage`&&l(n.formatted)}).catch(()=>{})},[i,a,o,s]),{reward:c,hasReward:u}}export{i as t};
|
package/dist/ambassador.js
CHANGED
|
@@ -4,7 +4,7 @@ import { t as useGlobalComponents } from "./useGlobalComponents-B3s2UQFk.js";
|
|
|
4
4
|
import { t as useLightDomStyles } from "./useLightDomStyles-BQ5FvCPi.js";
|
|
5
5
|
import { t as useReward } from "./useReward-DEhiMfgl.js";
|
|
6
6
|
import { componentDefaults } from "./i18n/defaults.js";
|
|
7
|
-
import { t as cssSource$2 } from "./sharedBaseCss.css-
|
|
7
|
+
import { t as cssSource$2 } from "./sharedBaseCss.css-BkMpQeRx.js";
|
|
8
8
|
import { trackEvent } from "@frak-labs/core-sdk";
|
|
9
9
|
import { getInstallUrl } from "@frak-labs/core-sdk/actions";
|
|
10
10
|
import { useCallback, useEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
@@ -331,338 +331,397 @@ function useHostTheme(target) {
|
|
|
331
331
|
//#endregion
|
|
332
332
|
//#region \0ve-inline:src/components/Ambassador/Ambassador.css.ts.vanilla.js
|
|
333
333
|
const cssSource$1 = `.Ambassador_panel__awpcg00 {
|
|
334
|
-
background-color: var(--frak-amb-surface,
|
|
335
|
-
border: 1px solid var(--frak-amb-border,
|
|
334
|
+
background-color: var(--frak-amb-surface, #1111110a);
|
|
335
|
+
border: 1px solid var(--frak-amb-border, #11111126);
|
|
336
336
|
border-radius: var(--frak-amb-radius, 12px);
|
|
337
337
|
}
|
|
338
|
+
|
|
338
339
|
.Ambassador_root__awpcg01 {
|
|
339
340
|
text-align: start;
|
|
340
|
-
|
|
341
|
+
box-sizing: border-box;
|
|
341
342
|
flex-direction: column;
|
|
342
343
|
gap: clamp(3em, 7vw, 5.5em);
|
|
343
344
|
width: 100%;
|
|
344
345
|
max-width: 100%;
|
|
345
|
-
|
|
346
|
+
display: flex;
|
|
346
347
|
}
|
|
348
|
+
|
|
347
349
|
.Ambassador_ctaButton__awpcg02 {
|
|
348
|
-
display: inline-flex;
|
|
349
|
-
align-items: center;
|
|
350
|
-
justify-content: center;
|
|
351
|
-
padding: 0.95em 2em;
|
|
352
350
|
border-radius: var(--frak-amb-cta-radius, 999px);
|
|
353
351
|
background-color: var(--frak-amb-cta-bg, var(--frak-amb-accent, #111));
|
|
354
352
|
color: var(--frak-amb-accent-ink, #fff);
|
|
355
|
-
font-size: var(--frak-amb-cta-size,
|
|
353
|
+
font-size: var(--frak-amb-cta-size, .9em);
|
|
356
354
|
font-weight: var(--frak-amb-cta-weight, 700);
|
|
357
|
-
letter-spacing: var(--frak-amb-cta-spacing,
|
|
355
|
+
letter-spacing: var(--frak-amb-cta-spacing, .06em);
|
|
358
356
|
text-transform: var(--frak-amb-cta-transform, uppercase);
|
|
359
|
-
text-decoration: none;
|
|
360
357
|
cursor: pointer;
|
|
358
|
+
justify-content: center;
|
|
359
|
+
align-items: center;
|
|
360
|
+
padding: .95em 2em;
|
|
361
|
+
text-decoration: none;
|
|
362
|
+
display: inline-flex;
|
|
361
363
|
}
|
|
364
|
+
|
|
362
365
|
.Ambassador_ctaButton__awpcg02:hover {
|
|
363
|
-
opacity:
|
|
366
|
+
opacity: .85;
|
|
364
367
|
}
|
|
368
|
+
|
|
365
369
|
.Ambassador_ctaButton__awpcg02:disabled {
|
|
366
|
-
opacity:
|
|
370
|
+
opacity: .5;
|
|
367
371
|
cursor: default;
|
|
368
372
|
}
|
|
373
|
+
|
|
369
374
|
.Ambassador_ctaButton__awpcg02:focus-visible {
|
|
370
375
|
outline-color: #000;
|
|
371
376
|
box-shadow: 0 0 0 2px #fff;
|
|
372
377
|
}
|
|
378
|
+
|
|
373
379
|
.Ambassador_region__awpcg03 {
|
|
374
|
-
display: grid;
|
|
375
|
-
gap: 0.85em;
|
|
376
380
|
align-content: start;
|
|
381
|
+
gap: .85em;
|
|
377
382
|
min-width: 0;
|
|
378
383
|
margin: 0;
|
|
384
|
+
display: grid;
|
|
379
385
|
}
|
|
386
|
+
|
|
380
387
|
.Ambassador_centeredRegion__awpcg04 {
|
|
381
|
-
justify-items: center;
|
|
382
388
|
text-align: center;
|
|
389
|
+
justify-items: center;
|
|
383
390
|
}
|
|
391
|
+
|
|
384
392
|
.Ambassador_regionTitle__awpcg05 {
|
|
385
|
-
margin: 0;
|
|
386
393
|
font-size: var(--frak-amb-h2-size, clamp(1.4em, 2.6vw, 2em));
|
|
387
394
|
line-height: 1.2;
|
|
388
395
|
font-weight: var(--frak-amb-h2-weight, inherit);
|
|
389
396
|
letter-spacing: var(--frak-amb-h2-spacing, normal);
|
|
390
397
|
color: var(--frak-amb-h2-color, inherit);
|
|
398
|
+
margin: 0;
|
|
391
399
|
}
|
|
400
|
+
|
|
392
401
|
[data-frak-amb-font~="h2-family"] .Ambassador_regionTitle__awpcg05 {
|
|
393
402
|
font-family: var(--frak-amb-h2-family);
|
|
394
403
|
}
|
|
404
|
+
|
|
395
405
|
[data-frak-amb-font~="h2-transform"] .Ambassador_regionTitle__awpcg05 {
|
|
396
406
|
text-transform: var(--frak-amb-h2-transform);
|
|
397
407
|
}
|
|
408
|
+
|
|
398
409
|
.Ambassador_lede__awpcg06 {
|
|
399
|
-
|
|
410
|
+
opacity: .75;
|
|
400
411
|
max-width: 52ch;
|
|
401
|
-
|
|
412
|
+
margin: 0;
|
|
402
413
|
}
|
|
414
|
+
|
|
403
415
|
.Ambassador_mutedSmall__awpcg07 {
|
|
416
|
+
opacity: .7;
|
|
404
417
|
margin: 0;
|
|
405
|
-
font-size:
|
|
406
|
-
opacity: 0.7;
|
|
418
|
+
font-size: .85em;
|
|
407
419
|
}
|
|
420
|
+
|
|
408
421
|
.Ambassador_muted__awpcg08 {
|
|
422
|
+
opacity: .7;
|
|
409
423
|
margin: 0;
|
|
410
|
-
opacity: 0.7;
|
|
411
424
|
}
|
|
425
|
+
|
|
412
426
|
.Ambassador_card__awpcg09 {
|
|
413
|
-
display: grid;
|
|
414
|
-
gap: 0.5em;
|
|
415
427
|
align-content: start;
|
|
428
|
+
gap: .5em;
|
|
416
429
|
padding: 1.4em;
|
|
430
|
+
display: grid;
|
|
417
431
|
}
|
|
432
|
+
|
|
418
433
|
.Ambassador_amountUnit__awpcg0a {
|
|
419
|
-
font-size: 0.32em;
|
|
420
|
-
font-weight: 700;
|
|
421
434
|
letter-spacing: normal;
|
|
435
|
+
font-size: .32em;
|
|
436
|
+
font-weight: 700;
|
|
422
437
|
}
|
|
438
|
+
|
|
423
439
|
.Ambassador_amountWords__awpcg0b {
|
|
424
|
-
|
|
425
|
-
font-size:
|
|
440
|
+
letter-spacing: -.02em;
|
|
441
|
+
font-size: .45em;
|
|
426
442
|
line-height: 1.1;
|
|
427
|
-
|
|
443
|
+
display: inline-block;
|
|
428
444
|
}
|
|
445
|
+
|
|
429
446
|
.Ambassador_bigFigure__awpcg0c {
|
|
430
|
-
|
|
431
|
-
line-height: 0.85;
|
|
432
|
-
letter-spacing: -0.04em;
|
|
447
|
+
letter-spacing: -.04em;
|
|
433
448
|
color: var(--frak-amb-accent-text, var(--frak-amb-accent, #111));
|
|
449
|
+
font-weight: 800;
|
|
450
|
+
line-height: .85;
|
|
434
451
|
}
|
|
452
|
+
|
|
435
453
|
.Ambassador_hero__awpcg0d {
|
|
436
|
-
gap: 2.5em;
|
|
437
454
|
grid-template-columns: repeat(auto-fit, minmax(min(18em, 100%), 1fr));
|
|
438
455
|
align-items: center;
|
|
456
|
+
gap: 2.5em;
|
|
439
457
|
}
|
|
458
|
+
|
|
440
459
|
.Ambassador_heroBody__awpcg0e {
|
|
441
|
-
display: grid;
|
|
442
|
-
gap: 1em;
|
|
443
460
|
align-content: start;
|
|
444
461
|
justify-items: start;
|
|
462
|
+
gap: 1em;
|
|
445
463
|
min-width: 0;
|
|
464
|
+
display: grid;
|
|
446
465
|
}
|
|
466
|
+
|
|
447
467
|
.Ambassador_heroTitle__awpcg0f {
|
|
448
|
-
margin: 0;
|
|
449
468
|
font-size: var(--frak-amb-h1-size, clamp(2em, 4.6vw, 3.2em));
|
|
450
469
|
line-height: 1.1;
|
|
451
470
|
font-weight: var(--frak-amb-h1-weight, inherit);
|
|
452
471
|
letter-spacing: var(--frak-amb-h1-spacing, normal);
|
|
453
472
|
color: var(--frak-amb-h1-color, inherit);
|
|
473
|
+
margin: 0;
|
|
454
474
|
}
|
|
475
|
+
|
|
455
476
|
[data-frak-amb-font~="h1-family"] .Ambassador_heroTitle__awpcg0f {
|
|
456
477
|
font-family: var(--frak-amb-h1-family);
|
|
457
478
|
}
|
|
479
|
+
|
|
458
480
|
[data-frak-amb-font~="h1-transform"] .Ambassador_heroTitle__awpcg0f {
|
|
459
481
|
text-transform: var(--frak-amb-h1-transform);
|
|
460
482
|
}
|
|
483
|
+
|
|
461
484
|
.Ambassador_heroArt__awpcg0g {
|
|
462
|
-
|
|
463
|
-
display: grid;
|
|
485
|
+
background: var(--frak-amb-image, none) center/cover;
|
|
464
486
|
place-items: center;
|
|
465
487
|
padding: 1em;
|
|
466
|
-
|
|
488
|
+
display: grid;
|
|
489
|
+
position: relative;
|
|
467
490
|
}
|
|
491
|
+
|
|
468
492
|
.Ambassador_heroArtFramed__awpcg0h {
|
|
469
493
|
aspect-ratio: 4 / 5;
|
|
470
494
|
align-content: end;
|
|
471
495
|
}
|
|
496
|
+
|
|
472
497
|
.Ambassador_heroImage__awpcg0i {
|
|
498
|
+
object-fit: cover;
|
|
473
499
|
position: absolute;
|
|
474
500
|
inset: 0;
|
|
475
|
-
|
|
501
|
+
border-radius: var(--frak-amb-radius, 12px) !important;
|
|
502
|
+
border: 0 !important;
|
|
476
503
|
width: 100% !important;
|
|
477
|
-
height: 100% !important;
|
|
478
504
|
max-width: none !important;
|
|
505
|
+
height: 100% !important;
|
|
479
506
|
margin: 0 !important;
|
|
480
|
-
border: 0 !important;
|
|
481
|
-
border-radius: var(--frak-amb-radius, 12px) !important;
|
|
482
507
|
}
|
|
508
|
+
|
|
483
509
|
.Ambassador_heroTag__awpcg0j {
|
|
484
|
-
position: relative;
|
|
485
|
-
display: flex;
|
|
486
|
-
flex-wrap: wrap;
|
|
487
|
-
align-items: center;
|
|
488
|
-
gap: 0.75em;
|
|
489
510
|
box-sizing: border-box;
|
|
490
|
-
width: 100%;
|
|
491
|
-
padding: 0.9em 1em;
|
|
492
511
|
border-radius: var(--frak-amb-radius, 12px);
|
|
493
512
|
background-color: var(--frak-amb-tag-bg, #fff);
|
|
494
513
|
text-align: start;
|
|
514
|
+
flex-wrap: wrap;
|
|
515
|
+
align-items: center;
|
|
516
|
+
gap: .75em;
|
|
517
|
+
width: 100%;
|
|
518
|
+
padding: .9em 1em;
|
|
519
|
+
display: flex;
|
|
520
|
+
position: relative;
|
|
495
521
|
}
|
|
522
|
+
|
|
496
523
|
.Ambassador_heroTagMain__awpcg0k {
|
|
497
524
|
display: grid;
|
|
498
525
|
}
|
|
526
|
+
|
|
499
527
|
.Ambassador_heroAmount__awpcg0l {
|
|
528
|
+
color: var(--frak-amb-accent-text, var(--frak-amb-accent, #111));
|
|
500
529
|
font-size: 1.4em;
|
|
501
530
|
line-height: 1.1;
|
|
502
|
-
color: var(--frak-amb-accent-text, var(--frak-amb-accent, #111));
|
|
503
531
|
}
|
|
532
|
+
|
|
504
533
|
.Ambassador_heroRewardCaption__awpcg0m {
|
|
505
|
-
|
|
506
|
-
|
|
534
|
+
opacity: .7;
|
|
535
|
+
font-size: .8em;
|
|
507
536
|
}
|
|
537
|
+
|
|
508
538
|
.Ambassador_heroPill__awpcg0n {
|
|
509
|
-
margin-inline-start: auto;
|
|
510
|
-
padding: 0.45em 0.8em;
|
|
511
539
|
border-radius: var(--frak-amb-cta-radius, 999px);
|
|
512
540
|
background-color: var(--frak-amb-accent, #111);
|
|
513
541
|
color: var(--frak-amb-accent-ink, #fff);
|
|
514
|
-
|
|
542
|
+
letter-spacing: .04em;
|
|
543
|
+
margin-inline-start: auto;
|
|
544
|
+
padding: .45em .8em;
|
|
545
|
+
font-size: .72em;
|
|
515
546
|
font-weight: 700;
|
|
516
|
-
letter-spacing: 0.04em;
|
|
517
547
|
}
|
|
548
|
+
|
|
518
549
|
.Ambassador_rewardHeading__awpcg0o {
|
|
519
550
|
font-size: 1em;
|
|
520
551
|
}
|
|
552
|
+
|
|
521
553
|
.Ambassador_rewardHeadingText__awpcg0p {
|
|
522
554
|
font-size: var(--frak-amb-h2-size, clamp(1.4em, 2.6vw, 2em));
|
|
523
555
|
}
|
|
556
|
+
|
|
524
557
|
.Ambassador_rewardAmount__awpcg0q {
|
|
525
|
-
|
|
526
|
-
margin-block-end: 0.12em;
|
|
558
|
+
margin-block-end: .12em;
|
|
527
559
|
font-size: clamp(3.5em, 14vw, 7em);
|
|
560
|
+
display: block;
|
|
528
561
|
}
|
|
562
|
+
|
|
529
563
|
.Ambassador_stepsGrid__awpcg0r {
|
|
530
|
-
display: grid;
|
|
531
|
-
gap: 1.25em;
|
|
532
564
|
grid-template-columns: repeat(auto-fit, minmax(min(15em, 100%), 1fr));
|
|
565
|
+
gap: 1.25em;
|
|
566
|
+
display: grid;
|
|
533
567
|
}
|
|
568
|
+
|
|
534
569
|
.Ambassador_stepNumber__awpcg0s {
|
|
535
|
-
display: grid;
|
|
536
|
-
place-items: center;
|
|
537
|
-
inline-size: 1.9em;
|
|
538
|
-
block-size: 1.9em;
|
|
539
|
-
margin: 0;
|
|
540
570
|
border-radius: var(--frak-amb-cta-radius, 999px);
|
|
541
571
|
background-color: var(--frak-amb-accent, #111);
|
|
572
|
+
block-size: 1.9em;
|
|
573
|
+
inline-size: 1.9em;
|
|
542
574
|
color: var(--frak-amb-accent-ink, #fff);
|
|
543
|
-
|
|
575
|
+
place-items: center;
|
|
576
|
+
margin: 0;
|
|
577
|
+
font-size: .9em;
|
|
544
578
|
font-weight: 700;
|
|
579
|
+
display: grid;
|
|
545
580
|
}
|
|
581
|
+
|
|
546
582
|
.Ambassador_stepIcon__awpcg0t {
|
|
583
|
+
object-fit: contain;
|
|
547
584
|
width: 40px;
|
|
548
585
|
height: 40px;
|
|
549
|
-
object-fit: contain;
|
|
550
586
|
}
|
|
587
|
+
|
|
551
588
|
.Ambassador_stepTitle__awpcg0u {
|
|
552
589
|
margin: 0;
|
|
553
590
|
font-size: 1.05em;
|
|
554
591
|
line-height: 1.3;
|
|
555
592
|
}
|
|
593
|
+
|
|
556
594
|
.Ambassador_winWinCards__awpcg0v {
|
|
557
|
-
display: grid;
|
|
558
|
-
gap: 1.25em;
|
|
559
595
|
grid-template-columns: repeat(auto-fit, minmax(min(15em, 100%), 1fr));
|
|
596
|
+
gap: 1.25em;
|
|
560
597
|
width: 100%;
|
|
561
598
|
max-width: 40em;
|
|
599
|
+
display: grid;
|
|
562
600
|
}
|
|
601
|
+
|
|
563
602
|
.Ambassador_winWinCard__awpcg0w {
|
|
564
|
-
justify-items: center;
|
|
565
603
|
text-align: center;
|
|
604
|
+
justify-items: center;
|
|
566
605
|
}
|
|
606
|
+
|
|
567
607
|
.Ambassador_winWinCardAmount__awpcg0x {
|
|
568
608
|
margin: 0;
|
|
569
609
|
font-size: clamp(2em, 6vw, 3em);
|
|
570
610
|
}
|
|
611
|
+
|
|
571
612
|
.Ambassador_referralCta__awpcg0y {
|
|
572
613
|
justify-self: start;
|
|
573
614
|
}
|
|
615
|
+
|
|
574
616
|
.Ambassador_store__awpcg0z {
|
|
575
|
-
display: grid;
|
|
576
|
-
gap: 1.75em;
|
|
577
617
|
grid-template-columns: repeat(auto-fit, minmax(min(14em, 100%), 1fr));
|
|
578
618
|
align-items: center;
|
|
619
|
+
gap: 1.75em;
|
|
579
620
|
padding: 1.75em;
|
|
621
|
+
display: grid;
|
|
580
622
|
}
|
|
623
|
+
|
|
581
624
|
.Ambassador_storeBody__awpcg010 {
|
|
582
|
-
display: grid;
|
|
583
|
-
gap: 0.75em;
|
|
584
625
|
align-content: start;
|
|
626
|
+
gap: .75em;
|
|
585
627
|
min-width: 0;
|
|
628
|
+
display: grid;
|
|
586
629
|
}
|
|
630
|
+
|
|
587
631
|
.Ambassador_storeQr__awpcg011 {
|
|
588
|
-
|
|
632
|
+
text-align: center;
|
|
589
633
|
justify-items: center;
|
|
590
|
-
gap:
|
|
634
|
+
gap: .5em;
|
|
591
635
|
margin: 0;
|
|
592
|
-
|
|
636
|
+
display: grid;
|
|
593
637
|
}
|
|
638
|
+
|
|
594
639
|
.Ambassador_storeBadges__awpcg012 {
|
|
595
|
-
display: flex;
|
|
596
640
|
flex-wrap: wrap;
|
|
597
641
|
align-items: center;
|
|
598
|
-
gap:
|
|
642
|
+
gap: .75em;
|
|
643
|
+
display: flex;
|
|
599
644
|
}
|
|
645
|
+
|
|
600
646
|
.Ambassador_storeBadge__awpcg013 {
|
|
601
|
-
|
|
647
|
+
border-radius: 8px;
|
|
602
648
|
align-items: center;
|
|
649
|
+
line-height: 0;
|
|
603
650
|
text-decoration: none;
|
|
604
|
-
|
|
605
|
-
color: #fff !important;
|
|
606
|
-
border-radius: 8px;
|
|
651
|
+
display: inline-flex;
|
|
607
652
|
overflow: hidden;
|
|
608
|
-
|
|
653
|
+
color: #fff !important;
|
|
654
|
+
background-color: #000 !important;
|
|
609
655
|
}
|
|
656
|
+
|
|
610
657
|
.Ambassador_storeBadge__awpcg013:focus-visible {
|
|
611
658
|
outline-color: #000;
|
|
612
659
|
box-shadow: 0 0 0 2px #fff;
|
|
613
660
|
}
|
|
661
|
+
|
|
614
662
|
.Ambassador_storeBadgeArt__awpcg014 {
|
|
615
663
|
display: block;
|
|
664
|
+
border: 0 !important;
|
|
665
|
+
border-radius: 0 !important;
|
|
616
666
|
width: auto !important;
|
|
617
|
-
height: 40px !important;
|
|
618
667
|
max-width: none !important;
|
|
668
|
+
height: 40px !important;
|
|
619
669
|
margin: 0 !important;
|
|
620
|
-
border: 0 !important;
|
|
621
|
-
border-radius: 0 !important;
|
|
622
670
|
}
|
|
671
|
+
|
|
623
672
|
.Ambassador_faqItem__awpcg015 {
|
|
624
|
-
|
|
625
|
-
|
|
673
|
+
border-bottom: 1px solid var(--frak-amb-border, #11111126);
|
|
674
|
+
padding: .9em 0;
|
|
626
675
|
}
|
|
676
|
+
|
|
627
677
|
.Ambassador_faqQuestion__awpcg016 {
|
|
628
678
|
cursor: pointer;
|
|
629
679
|
font-weight: 700;
|
|
630
680
|
list-style: none;
|
|
631
681
|
}
|
|
682
|
+
|
|
632
683
|
.Ambassador_faqQuestion__awpcg016::-webkit-details-marker {
|
|
633
684
|
display: none;
|
|
634
685
|
}
|
|
635
|
-
|
|
686
|
+
|
|
687
|
+
.Ambassador_faqQuestion__awpcg016:after {
|
|
636
688
|
content: "+";
|
|
637
689
|
float: right;
|
|
638
|
-
margin-inline-start: 1em;
|
|
639
690
|
color: var(--frak-amb-accent-text, var(--frak-amb-accent, #111));
|
|
691
|
+
margin-inline-start: 1em;
|
|
640
692
|
font-weight: 700;
|
|
641
693
|
}
|
|
642
|
-
|
|
694
|
+
|
|
695
|
+
.Ambassador_faqItem__awpcg015[open] .Ambassador_faqQuestion__awpcg016:after {
|
|
643
696
|
content: "–";
|
|
644
697
|
}
|
|
698
|
+
|
|
645
699
|
.Ambassador_faqAnswer__awpcg017 {
|
|
646
|
-
|
|
647
|
-
|
|
700
|
+
opacity: .75;
|
|
701
|
+
margin: .6em 0 0;
|
|
648
702
|
}
|
|
703
|
+
|
|
649
704
|
.Ambassador_faqAttribution__awpcg018 {
|
|
650
705
|
text-align: center;
|
|
651
706
|
}
|
|
707
|
+
|
|
652
708
|
.Ambassador_frakLink__awpcg019 {
|
|
653
709
|
color: inherit;
|
|
710
|
+
text-underline-offset: .15em;
|
|
654
711
|
text-decoration: underline;
|
|
655
|
-
text-underline-offset: 0.15em;
|
|
656
712
|
}
|
|
713
|
+
|
|
657
714
|
@supports (color: color-mix(in srgb, red 4%, transparent)) {
|
|
658
715
|
.Ambassador_panel__awpcg00 {
|
|
659
716
|
background-color: var(--frak-amb-surface, color-mix(in srgb, var(--frak-amb-accent, #111) 4%, transparent));
|
|
660
717
|
border: 1px solid var(--frak-amb-border, color-mix(in srgb, var(--frak-amb-accent, #111) 15%, transparent));
|
|
661
718
|
}
|
|
719
|
+
|
|
662
720
|
.Ambassador_faqItem__awpcg015 {
|
|
663
721
|
border-bottom: 1px solid var(--frak-amb-border, color-mix(in srgb, var(--frak-amb-accent, #111) 15%, transparent));
|
|
664
722
|
}
|
|
665
|
-
}
|
|
723
|
+
}
|
|
724
|
+
`;
|
|
666
725
|
//#endregion
|
|
667
726
|
//#region src/components/Ambassador/Ambassador.css.ts
|
|
668
727
|
var amountUnit = "Ambassador_amountUnit__awpcg0a";
|
|
@@ -734,6 +793,7 @@ const cssSource = cssSource$1;
|
|
|
734
793
|
//#region src/components/Ambassador/InstallQr.tsx
|
|
735
794
|
const WIDE_QUERY = "(min-width: 768px)";
|
|
736
795
|
const QUIET_ZONE = 4;
|
|
796
|
+
const ECC = "low";
|
|
737
797
|
const QR_SIZE = 200;
|
|
738
798
|
function InstallQr({ url, label, caption, class: className, captionClass }) {
|
|
739
799
|
const [query] = useState(readWideQuery);
|
|
@@ -750,7 +810,10 @@ function InstallQr({ url, label, caption, class: className, captionClass }) {
|
|
|
750
810
|
let cancelled = false;
|
|
751
811
|
import("qr").then(({ encodeQR }) => {
|
|
752
812
|
if (cancelled) return;
|
|
753
|
-
setGrid(encodeQR(url, "raw", {
|
|
813
|
+
setGrid(encodeQR(url, "raw", {
|
|
814
|
+
border: QUIET_ZONE,
|
|
815
|
+
ecc: ECC
|
|
816
|
+
}));
|
|
754
817
|
}).catch(() => {});
|
|
755
818
|
return () => {
|
|
756
819
|
cancelled = true;
|