@frak-labs/components 1.3.0 → 1.3.1-beta.393ef9ec
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/README.md +1 -1
- package/cdn/Ambassador.CRPtw_VT.js +392 -0
- package/cdn/Banner.gDEO8VKX.js +208 -0
- package/cdn/{ButtonShare.CgF4rWEO.js → ButtonShare.OuDvPMdk.js} +1 -1
- package/cdn/ButtonWallet.DNE6ZhkT.js +40 -0
- package/cdn/GiftIcon.NTATj1WE.js +1 -0
- package/cdn/OpenInAppButton.Dv7oAwl1.js +1 -0
- package/cdn/PostPurchase.Co0QSBMO.js +102 -0
- package/cdn/components.js +1 -1
- package/cdn/{jsxRuntime.module.CgbYebLx.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.CgBxdfNp.js +1 -0
- package/cdn/rewards.COyZ6-7W.js +1 -0
- package/cdn/useGlobalComponents.DoG1wfeq.js +1 -0
- package/cdn/{useLightDomStyles.CkTNHin8.js → useLightDomStyles.B0_CS0Kq.js} +1 -1
- package/cdn/{usePlacement.b__OilKu.js → usePlacement.B5JX9OU-.js} +1 -1
- package/cdn/{useReward.Duy0EWvi.js → useReward.By-xuybY.js} +1 -1
- package/dist/{GiftIcon-DNqgjTjb.js → GiftIcon-JVhSFEhP.js} +0 -1
- package/dist/ambassador.js +239 -104
- package/dist/banner.js +84 -59
- package/dist/postPurchase.js +43 -30
- package/dist/sharedBaseCss.css-BkMpQeRx.js +5 -0
- package/package.json +6 -7
- package/cdn/Ambassador.LCnsy5iT.js +0 -320
- package/cdn/Banner.BnzLkajr.js +0 -183
- package/cdn/ButtonWallet.JbMXw9dW.js +0 -40
- package/cdn/GiftIcon.Be-UU58r.js +0 -1
- package/cdn/OpenInAppButton.BaRZ25xH.js +0 -1
- package/cdn/PostPurchase.c3eqzVRl.js +0 -89
- package/cdn/qr.Bdg4-2EI.js +0 -5
- package/cdn/replay-V6FXES7X.efKsNT6s.js +0 -1
- package/cdn/rewards.B_p05JY_.js +0 -1
- package/cdn/useGlobalComponents.da05dAlQ.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 console.error(`[ReplayRecorder] sendChunk failed`,e),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};
|