@getsupertab/supertab-js 3.6.1 → 3.7.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/dist/pkg/prod/{browser-ponyfill-Dv9Y3m1D.js → browser-ponyfill-sGts8M8y.js} +1 -1
- package/dist/pkg/prod/{sdk-BV7L6JlG.js → sdk-hiMQ9cBY.js} +52 -35
- package/dist/pkg/prod/sdk.d.ts +7 -7
- package/dist/pkg/prod/sdk.js +1 -1
- package/dist/pkg/prod/{sentry-CJra19F1.js → sentry-Dg1blqxr.js} +1 -1
- package/package.json +1 -1
|
@@ -4854,10 +4854,10 @@ const DN = Hr({
|
|
|
4854
4854
|
VITE_STATIC_REDIRECT_URI: void 0,
|
|
4855
4855
|
VITE_GTM_CONTAINER_ID: "GTM-NG9GT7FM",
|
|
4856
4856
|
VITE_SENTRY_DSN: "https://d08f3f301f364ceba6345c393c538faf@o23455.ingest.us.sentry.io/4507736861573120",
|
|
4857
|
-
VITE_BASE_URL: "https://js.supertab.co/v3.
|
|
4857
|
+
VITE_BASE_URL: "https://js.supertab.co/v3.7.0/",
|
|
4858
4858
|
TAPPER_ENV: "prod",
|
|
4859
4859
|
PACKAGE_NAME: "@getsupertab/supertab-js",
|
|
4860
|
-
PACKAGE_VERSION: "3.
|
|
4860
|
+
PACKAGE_VERSION: "3.7.0",
|
|
4861
4861
|
MONETIZATION_PROVIDER_SCRIPT_URL: void 0
|
|
4862
4862
|
});
|
|
4863
4863
|
function QI(o, i = {}) {
|
|
@@ -5496,7 +5496,7 @@ const xr = /* @__PURE__ */ p6(j), N9 = /* @__PURE__ */ XL({
|
|
|
5496
5496
|
default: xr
|
|
5497
5497
|
}, [j]), z1 = async (o) => {
|
|
5498
5498
|
if (LN) {
|
|
5499
|
-
const { captureException: i } = await import("./sentry-
|
|
5499
|
+
const { captureException: i } = await import("./sentry-Dg1blqxr.js");
|
|
5500
5500
|
i(o);
|
|
5501
5501
|
}
|
|
5502
5502
|
};
|
|
@@ -29467,15 +29467,21 @@ const Jj = J2(({ input: o, sendBack: i }) => {
|
|
|
29467
29467
|
}), Zj = J2(({ input: o, sendBack: i }) => {
|
|
29468
29468
|
console.log("🏃 [MakingPurchase] Actor started", { input: o }), (async () => {
|
|
29469
29469
|
var N;
|
|
29470
|
-
const {
|
|
29470
|
+
const {
|
|
29471
|
+
supertabClient: s,
|
|
29472
|
+
offering: f,
|
|
29473
|
+
tab: p,
|
|
29474
|
+
site: y,
|
|
29475
|
+
purchaseMetadata: v = {
|
|
29476
|
+
title: document.title,
|
|
29477
|
+
url: document.location.href
|
|
29478
|
+
}
|
|
29479
|
+
} = o;
|
|
29471
29480
|
if (!f.id)
|
|
29472
29481
|
throw new Error("Offering ID is missing");
|
|
29473
29482
|
if (!y)
|
|
29474
29483
|
throw new Error("Site is missing in context");
|
|
29475
|
-
const
|
|
29476
|
-
title: document.title,
|
|
29477
|
-
url: document.URL
|
|
29478
|
-
}, C = await s.api.purchase({
|
|
29484
|
+
const C = await s.api.purchase({
|
|
29479
29485
|
offeringId: f.id,
|
|
29480
29486
|
currencyCode: (N = p == null ? void 0 : p.currency) == null ? void 0 : N.code,
|
|
29481
29487
|
metadata: v
|
|
@@ -29550,7 +29556,8 @@ const Jj = J2(({ input: o, sendBack: i }) => {
|
|
|
29550
29556
|
merchantLogoUrl: o.merchantLogoUrl,
|
|
29551
29557
|
tab: null,
|
|
29552
29558
|
offering: null,
|
|
29553
|
-
selectedOfferingId: o.selectedOfferingId
|
|
29559
|
+
selectedOfferingId: o.selectedOfferingId,
|
|
29560
|
+
purchaseMetadata: o.purchaseMetadata
|
|
29554
29561
|
}),
|
|
29555
29562
|
states: {
|
|
29556
29563
|
Loading: {
|
|
@@ -29641,7 +29648,8 @@ const Jj = J2(({ input: o, sendBack: i }) => {
|
|
|
29641
29648
|
supertabClient: o.supertabClient,
|
|
29642
29649
|
offering: o.offering,
|
|
29643
29650
|
tab: o.tab,
|
|
29644
|
-
site: o.site
|
|
29651
|
+
site: o.site,
|
|
29652
|
+
purchaseMetadata: o.purchaseMetadata
|
|
29645
29653
|
};
|
|
29646
29654
|
},
|
|
29647
29655
|
onError: {
|
|
@@ -30353,8 +30361,9 @@ const Jj = J2(({ input: o, sendBack: i }) => {
|
|
|
30353
30361
|
retryCounter: 0,
|
|
30354
30362
|
paymentResult: !1,
|
|
30355
30363
|
// Reset payment result when starting a new purchase
|
|
30356
|
-
errorMessage: void 0
|
|
30364
|
+
errorMessage: void 0,
|
|
30357
30365
|
// Clear any previous error message
|
|
30366
|
+
purchaseMetadata: o.purchaseMetadata
|
|
30358
30367
|
}))
|
|
30359
30368
|
],
|
|
30360
30369
|
target: "PreparingPurchase",
|
|
@@ -30477,7 +30486,8 @@ const Jj = J2(({ input: o, sendBack: i }) => {
|
|
|
30477
30486
|
merchantName: o.merchantName,
|
|
30478
30487
|
merchantLogoUrl: o.merchantLogoUrl,
|
|
30479
30488
|
selectedOfferingId: o.selectedOfferingId,
|
|
30480
|
-
tab: o.tab
|
|
30489
|
+
tab: o.tab,
|
|
30490
|
+
purchaseMetadata: o.purchaseMetadata
|
|
30481
30491
|
}),
|
|
30482
30492
|
onError: [
|
|
30483
30493
|
{
|
|
@@ -63420,7 +63430,7 @@ typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObje
|
|
|
63420
63430
|
typeof Z1 != "function" && (Z1 = void 0);
|
|
63421
63431
|
if (!Z1 && !nS && !E5)
|
|
63422
63432
|
try {
|
|
63423
|
-
import("./browser-ponyfill-
|
|
63433
|
+
import("./browser-ponyfill-sGts8M8y.js").then((o) => o.b).then(function(o) {
|
|
63424
63434
|
Z1 = o.default;
|
|
63425
63435
|
}).catch(function() {
|
|
63426
63436
|
});
|
|
@@ -63765,32 +63775,39 @@ class cG {
|
|
|
63765
63775
|
this.purchaseWidgetActor.send({ type: "logIn" });
|
|
63766
63776
|
});
|
|
63767
63777
|
}
|
|
63768
|
-
async startPurchase({
|
|
63769
|
-
|
|
63770
|
-
|
|
63771
|
-
|
|
63772
|
-
|
|
63778
|
+
async startPurchase({
|
|
63779
|
+
offeringId: i,
|
|
63780
|
+
purchaseMetadata: s
|
|
63781
|
+
} = {}) {
|
|
63782
|
+
return new Promise((f) => {
|
|
63783
|
+
const { unsubscribe: p } = this.purchaseWidgetActor.subscribe((y) => {
|
|
63784
|
+
if (y.matches("Ready")) {
|
|
63785
|
+
p();
|
|
63773
63786
|
const {
|
|
63774
|
-
priorEntitlement:
|
|
63775
|
-
purchasedOffering:
|
|
63776
|
-
tab:
|
|
63777
|
-
purchase:
|
|
63778
|
-
authStatus:
|
|
63779
|
-
paymentResult:
|
|
63780
|
-
errorMessage:
|
|
63781
|
-
} =
|
|
63782
|
-
(
|
|
63783
|
-
priorEntitlement:
|
|
63784
|
-
purchase:
|
|
63785
|
-
purchasedOffering:
|
|
63786
|
-
tab:
|
|
63787
|
-
paymentResult:
|
|
63788
|
-
authStatus:
|
|
63789
|
-
errorMessage:
|
|
63787
|
+
priorEntitlement: v,
|
|
63788
|
+
purchasedOffering: C,
|
|
63789
|
+
tab: S,
|
|
63790
|
+
purchase: k,
|
|
63791
|
+
authStatus: O,
|
|
63792
|
+
paymentResult: T,
|
|
63793
|
+
errorMessage: L
|
|
63794
|
+
} = y.context;
|
|
63795
|
+
(k == null ? void 0 : k.status) === Ux.COMPLETED && Su({ event: "state_purchase_completed" }), f({
|
|
63796
|
+
priorEntitlement: v,
|
|
63797
|
+
purchase: k,
|
|
63798
|
+
purchasedOffering: C,
|
|
63799
|
+
tab: S,
|
|
63800
|
+
paymentResult: T,
|
|
63801
|
+
authStatus: O,
|
|
63802
|
+
errorMessage: L
|
|
63790
63803
|
});
|
|
63791
63804
|
}
|
|
63792
63805
|
});
|
|
63793
|
-
this.purchaseWidgetActor.send({
|
|
63806
|
+
this.purchaseWidgetActor.send({
|
|
63807
|
+
type: "startPurchase",
|
|
63808
|
+
offeringId: i,
|
|
63809
|
+
purchaseMetadata: s
|
|
63810
|
+
});
|
|
63794
63811
|
});
|
|
63795
63812
|
}
|
|
63796
63813
|
async render() {
|
package/dist/pkg/prod/sdk.d.ts
CHANGED
|
@@ -288,9 +288,7 @@ declare enum AuthStatus {
|
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
declare type BaseForPurchaseOfferingRequestClientFacing = Omit<PurchaseOfferingRequest, "metadata"> & {
|
|
291
|
-
metadata?:
|
|
292
|
-
[key: string]: string | number | boolean | null;
|
|
293
|
-
};
|
|
291
|
+
metadata?: Metadata;
|
|
294
292
|
purchaseIntentId: string;
|
|
295
293
|
};
|
|
296
294
|
|
|
@@ -354,6 +352,10 @@ declare type HTTPHeaders = {
|
|
|
354
352
|
[key: string]: string;
|
|
355
353
|
};
|
|
356
354
|
|
|
355
|
+
declare interface Metadata {
|
|
356
|
+
[key: string]: string | number | boolean | null;
|
|
357
|
+
}
|
|
358
|
+
|
|
357
359
|
declare interface Offering {
|
|
358
360
|
id: string;
|
|
359
361
|
description: string;
|
|
@@ -382,16 +384,14 @@ declare interface Purchase {
|
|
|
382
384
|
description: string;
|
|
383
385
|
price: Price;
|
|
384
386
|
status: PurchaseStatus;
|
|
385
|
-
metadata:
|
|
387
|
+
metadata: Metadata;
|
|
386
388
|
entitlementStatus: EntitlementStatus | null;
|
|
387
389
|
}
|
|
388
390
|
|
|
389
391
|
declare type PurchaseOfferingRequest = {
|
|
390
392
|
offeringId: string;
|
|
391
393
|
currencyCode: string;
|
|
392
|
-
metadata:
|
|
393
|
-
[key: string]: string | number | boolean | null;
|
|
394
|
-
};
|
|
394
|
+
metadata: Metadata;
|
|
395
395
|
};
|
|
396
396
|
|
|
397
397
|
declare type PurchaseOfferingRequestClientFacing = RequireAtLeastOne<BaseForPurchaseOfferingRequestClientFacing, "offeringId" | "purchaseIntentId">;
|
package/dist/pkg/prod/sdk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as nu, T as ru, P as su, a as iu, V as ou } from "./sdk-
|
|
1
|
+
import { r as nu, T as ru, P as su, a as iu, V as ou } from "./sdk-hiMQ9cBY.js";
|
|
2
2
|
const w = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, st = "9.22.0", $ = globalThis;
|
|
3
3
|
function ft() {
|
|
4
4
|
return nr($), $;
|