@srimandir/dosha-calculator 2.1.7 → 2.1.8
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/dosha-calculator.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as Ne from "react";
|
|
2
|
-
import an, { useRef as he, useEffect as be, createContext as qn, useState as B, useMemo as
|
|
3
|
-
import { FooterCTAButton as
|
|
4
|
-
var
|
|
5
|
-
var
|
|
2
|
+
import an, { useRef as he, useEffect as be, createContext as qn, useState as B, useMemo as Yr, useContext as Wn, useCallback as qe, forwardRef as Hn, useImperativeHandle as Gn } from "react";
|
|
3
|
+
import { FooterCTAButton as as, FormContainer as zn, PrivacyBanner as Vn, FormSectionHeader as Jn, FormField as kt, FormTextInput as is, FormSegmentedControl as Yn, FormTagPills as Qn, FormCheckboxWithHelp as Xn, FormLocationInput as Zn, FormFooterNote as ea, UserReviewsSection as on, FAQAccordion as ln, ContactUsSection as cn, PageHeader as ta, MarqueeStrip as ra, FooterShell as sa, footerShellStyles as ct } from "@srimandir/astrology-common";
|
|
4
|
+
var or = { exports: {} }, Ft = {};
|
|
5
|
+
var os;
|
|
6
6
|
function na() {
|
|
7
|
-
if (
|
|
8
|
-
|
|
7
|
+
if (os) return Ft;
|
|
8
|
+
os = 1;
|
|
9
9
|
var t = an, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
10
10
|
function i(o, c, u) {
|
|
11
11
|
var d, f = {}, m = null, p = null;
|
|
@@ -17,9 +17,9 @@ function na() {
|
|
|
17
17
|
return Ft.Fragment = r, Ft.jsx = i, Ft.jsxs = i, Ft;
|
|
18
18
|
}
|
|
19
19
|
var Kt = {};
|
|
20
|
-
var
|
|
20
|
+
var ls;
|
|
21
21
|
function aa() {
|
|
22
|
-
return
|
|
22
|
+
return ls || (ls = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
23
23
|
var t = an, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.portal"), s = /* @__PURE__ */ Symbol.for("react.fragment"), n = /* @__PURE__ */ Symbol.for("react.strict_mode"), a = /* @__PURE__ */ Symbol.for("react.profiler"), i = /* @__PURE__ */ Symbol.for("react.provider"), o = /* @__PURE__ */ Symbol.for("react.context"), c = /* @__PURE__ */ Symbol.for("react.forward_ref"), u = /* @__PURE__ */ Symbol.for("react.suspense"), d = /* @__PURE__ */ Symbol.for("react.suspense_list"), f = /* @__PURE__ */ Symbol.for("react.memo"), m = /* @__PURE__ */ Symbol.for("react.lazy"), p = /* @__PURE__ */ Symbol.for("react.offscreen"), g = Symbol.iterator, y = "@@iterator";
|
|
24
24
|
function w(h) {
|
|
25
25
|
if (h === null || typeof h != "object")
|
|
@@ -45,10 +45,10 @@ function aa() {
|
|
|
45
45
|
Z.unshift("Warning: " + k), Function.prototype.apply.call(console[h], console, Z);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
var
|
|
48
|
+
var A = !1, x = !1, N = !1, P = !1, H = !1, M;
|
|
49
49
|
M = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
50
50
|
function we(h) {
|
|
51
|
-
return !!(typeof h == "string" || typeof h == "function" || h === s || h === a || H || h === n || h === u || h === d || P || h === p ||
|
|
51
|
+
return !!(typeof h == "string" || typeof h == "function" || h === s || h === a || H || h === n || h === u || h === d || P || h === p || A || x || N || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === f || h.$$typeof === i || h.$$typeof === o || h.$$typeof === c || // This needs to include all possible module reference object
|
|
52
52
|
// types supported by any Flight configuration anywhere since
|
|
53
53
|
// we don't know which Flight build this will end up being used
|
|
54
54
|
// with.
|
|
@@ -353,7 +353,7 @@ function aa() {
|
|
|
353
353
|
ref: !0,
|
|
354
354
|
__self: !0,
|
|
355
355
|
__source: !0
|
|
356
|
-
},
|
|
356
|
+
}, E, V;
|
|
357
357
|
function Re(h) {
|
|
358
358
|
if (Ae.call(h, "ref")) {
|
|
359
359
|
var k = Object.getOwnPropertyDescriptor(h, "ref").get;
|
|
@@ -376,7 +376,7 @@ function aa() {
|
|
|
376
376
|
function Lt(h, k) {
|
|
377
377
|
{
|
|
378
378
|
var j = function() {
|
|
379
|
-
|
|
379
|
+
E || (E = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", k));
|
|
380
380
|
};
|
|
381
381
|
j.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
382
382
|
get: j,
|
|
@@ -424,7 +424,7 @@ function aa() {
|
|
|
424
424
|
value: J
|
|
425
425
|
}), Object.freeze && (Object.freeze(F.props), Object.freeze(F)), F;
|
|
426
426
|
};
|
|
427
|
-
function
|
|
427
|
+
function Er(h, k, j, L, J) {
|
|
428
428
|
{
|
|
429
429
|
var Z, K = {}, F = null, xe = null;
|
|
430
430
|
j !== void 0 && (Ve(j), F = "" + j), Je(k) && (Ve(k.key), F = "" + k.key), Re(k) && (xe = k.ref, $t(k, J));
|
|
@@ -442,20 +442,20 @@ function aa() {
|
|
|
442
442
|
return pe(h, F, xe, J, L, le.current, K);
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
var Mt = S.ReactCurrentOwner,
|
|
445
|
+
var Mt = S.ReactCurrentOwner, nr = S.ReactDebugCurrentFrame;
|
|
446
446
|
function et(h) {
|
|
447
447
|
if (h) {
|
|
448
448
|
var k = h._owner, j = Ge(h.type, h._source, k ? k.type : null);
|
|
449
|
-
|
|
449
|
+
nr.setExtraStackFrame(j);
|
|
450
450
|
} else
|
|
451
|
-
|
|
451
|
+
nr.setExtraStackFrame(null);
|
|
452
452
|
}
|
|
453
453
|
var Bt;
|
|
454
454
|
Bt = !1;
|
|
455
|
-
function
|
|
455
|
+
function ar(h) {
|
|
456
456
|
return typeof h == "object" && h !== null && h.$$typeof === e;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function ir() {
|
|
459
459
|
{
|
|
460
460
|
if (Mt.current) {
|
|
461
461
|
var h = fe(Mt.current.type);
|
|
@@ -470,10 +470,10 @@ Check the render method of \`` + h + "`.";
|
|
|
470
470
|
function Nn(h) {
|
|
471
471
|
return "";
|
|
472
472
|
}
|
|
473
|
-
var
|
|
473
|
+
var es = {};
|
|
474
474
|
function In(h) {
|
|
475
475
|
{
|
|
476
|
-
var k =
|
|
476
|
+
var k = ir();
|
|
477
477
|
if (!k) {
|
|
478
478
|
var j = typeof h == "string" ? h : h.displayName || h.name;
|
|
479
479
|
j && (k = `
|
|
@@ -483,35 +483,35 @@ Check the top-level render call using <` + j + ">.");
|
|
|
483
483
|
return k;
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function ts(h, k) {
|
|
487
487
|
{
|
|
488
488
|
if (!h._store || h._store.validated || h.key != null)
|
|
489
489
|
return;
|
|
490
490
|
h._store.validated = !0;
|
|
491
491
|
var j = In(k);
|
|
492
|
-
if (
|
|
492
|
+
if (es[j])
|
|
493
493
|
return;
|
|
494
|
-
|
|
494
|
+
es[j] = !0;
|
|
495
495
|
var L = "";
|
|
496
496
|
h && h._owner && h._owner !== Mt.current && (L = " It was passed a child from " + fe(h._owner.type) + "."), et(h), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', j, L), et(null);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function rs(h, k) {
|
|
500
500
|
{
|
|
501
501
|
if (typeof h != "object")
|
|
502
502
|
return;
|
|
503
503
|
if (I(h))
|
|
504
504
|
for (var j = 0; j < h.length; j++) {
|
|
505
505
|
var L = h[j];
|
|
506
|
-
|
|
506
|
+
ar(L) && ts(L, k);
|
|
507
507
|
}
|
|
508
|
-
else if (
|
|
508
|
+
else if (ar(h))
|
|
509
509
|
h._store && (h._store.validated = !0);
|
|
510
510
|
else if (h) {
|
|
511
511
|
var J = w(h);
|
|
512
512
|
if (typeof J == "function" && J !== h.entries)
|
|
513
513
|
for (var Z = J.call(h), K; !(K = Z.next()).done; )
|
|
514
|
-
|
|
514
|
+
ar(K.value) && ts(K.value, k);
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
}
|
|
@@ -552,19 +552,19 @@ Check the top-level render call using <` + j + ">.");
|
|
|
552
552
|
h.ref !== null && (et(h), _("Invalid attribute `ref` supplied to `React.Fragment`."), et(null));
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
var
|
|
556
|
-
function
|
|
555
|
+
var ss = {};
|
|
556
|
+
function ns(h, k, j, L, J, Z) {
|
|
557
557
|
{
|
|
558
558
|
var K = we(h);
|
|
559
559
|
if (!K) {
|
|
560
560
|
var F = "";
|
|
561
561
|
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (F += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
562
562
|
var xe = Nn();
|
|
563
|
-
xe ? F += xe : F +=
|
|
563
|
+
xe ? F += xe : F += ir();
|
|
564
564
|
var ne;
|
|
565
565
|
h === null ? ne = "null" : I(h) ? ne = "array" : h !== void 0 && h.$$typeof === e ? (ne = "<" + (fe(h.type) || "Unknown") + " />", F = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof h, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ne, F);
|
|
566
566
|
}
|
|
567
|
-
var ie =
|
|
567
|
+
var ie = Er(h, k, j, J, Z);
|
|
568
568
|
if (ie == null)
|
|
569
569
|
return ie;
|
|
570
570
|
if (K) {
|
|
@@ -573,51 +573,51 @@ Check the top-level render call using <` + j + ">.");
|
|
|
573
573
|
if (L)
|
|
574
574
|
if (I(De)) {
|
|
575
575
|
for (var _t = 0; _t < De.length; _t++)
|
|
576
|
-
|
|
576
|
+
rs(De[_t], h);
|
|
577
577
|
Object.freeze && Object.freeze(De);
|
|
578
578
|
} else
|
|
579
579
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
580
580
|
else
|
|
581
|
-
|
|
581
|
+
rs(De, h);
|
|
582
582
|
}
|
|
583
583
|
if (Ae.call(k, "key")) {
|
|
584
584
|
var lt = fe(h), je = Object.keys(k).filter(function(Kn) {
|
|
585
585
|
return Kn !== "key";
|
|
586
|
-
}),
|
|
587
|
-
if (!
|
|
586
|
+
}), Ar = je.length > 0 ? "{key: someKey, " + je.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
587
|
+
if (!ss[lt + Ar]) {
|
|
588
588
|
var Fn = je.length > 0 ? "{" + je.join(": ..., ") + ": ...}" : "{}";
|
|
589
589
|
_(`A props object containing a "key" prop is being spread into JSX:
|
|
590
590
|
let props = %s;
|
|
591
591
|
<%s {...props} />
|
|
592
592
|
React keys must be passed directly to JSX without using spread:
|
|
593
593
|
let props = %s;
|
|
594
|
-
<%s key={someKey} {...props} />`,
|
|
594
|
+
<%s key={someKey} {...props} />`, Ar, lt, Fn, lt), ss[lt + Ar] = !0;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
return h === s ? $n(ie) : Dn(ie), ie;
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
600
|
function Ln(h, k, j) {
|
|
601
|
-
return
|
|
601
|
+
return ns(h, k, j, !0);
|
|
602
602
|
}
|
|
603
603
|
function Un(h, k, j) {
|
|
604
|
-
return
|
|
604
|
+
return ns(h, k, j, !1);
|
|
605
605
|
}
|
|
606
606
|
var Mn = Un, Bn = Ln;
|
|
607
607
|
Kt.Fragment = s, Kt.jsx = Mn, Kt.jsxs = Bn;
|
|
608
608
|
})()), Kt;
|
|
609
609
|
}
|
|
610
|
-
var
|
|
610
|
+
var cs;
|
|
611
611
|
function ia() {
|
|
612
|
-
return
|
|
612
|
+
return cs || (cs = 1, process.env.NODE_ENV === "production" ? or.exports = na() : or.exports = aa()), or.exports;
|
|
613
613
|
}
|
|
614
614
|
var l = ia();
|
|
615
|
-
const
|
|
615
|
+
const Rr = {
|
|
616
616
|
all_fields_filled: "all_fields_filled",
|
|
617
617
|
fields_not_filled: "fields_not_filled",
|
|
618
618
|
puja_clicked: "puja_clicked"
|
|
619
619
|
};
|
|
620
|
-
function
|
|
620
|
+
function xr(t, e) {
|
|
621
621
|
var r = {};
|
|
622
622
|
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && e.indexOf(s) < 0 && (r[s] = t[s]);
|
|
623
623
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -653,30 +653,30 @@ function oa(t, e, r, s) {
|
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
655
|
const la = (t) => t ? (...e) => t(...e) : (...e) => fetch(...e);
|
|
656
|
-
class
|
|
656
|
+
class Qr extends Error {
|
|
657
657
|
constructor(e, r = "FunctionsError", s) {
|
|
658
658
|
super(e), this.name = r, this.context = s;
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
|
-
class ca extends
|
|
661
|
+
class ca extends Qr {
|
|
662
662
|
constructor(e) {
|
|
663
663
|
super("Failed to send a request to the Edge Function", "FunctionsFetchError", e);
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
class
|
|
666
|
+
class us extends Qr {
|
|
667
667
|
constructor(e) {
|
|
668
668
|
super("Relay Error invoking the Edge Function", "FunctionsRelayError", e);
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
|
-
class
|
|
671
|
+
class ds extends Qr {
|
|
672
672
|
constructor(e) {
|
|
673
673
|
super("Edge Function returned a non-2xx status code", "FunctionsHttpError", e);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
var
|
|
676
|
+
var Ur;
|
|
677
677
|
(function(t) {
|
|
678
678
|
t.Any = "any", t.ApNortheast1 = "ap-northeast-1", t.ApNortheast2 = "ap-northeast-2", t.ApSouth1 = "ap-south-1", t.ApSoutheast1 = "ap-southeast-1", t.ApSoutheast2 = "ap-southeast-2", t.CaCentral1 = "ca-central-1", t.EuCentral1 = "eu-central-1", t.EuWest1 = "eu-west-1", t.EuWest2 = "eu-west-2", t.EuWest3 = "eu-west-3", t.SaEast1 = "sa-east-1", t.UsEast1 = "us-east-1", t.UsWest1 = "us-west-1", t.UsWest2 = "us-west-2";
|
|
679
|
-
})(
|
|
679
|
+
})(Ur || (Ur = {}));
|
|
680
680
|
class ua {
|
|
681
681
|
/**
|
|
682
682
|
* Creates a new Functions client bound to an Edge Functions URL.
|
|
@@ -691,7 +691,7 @@ class ua {
|
|
|
691
691
|
* })
|
|
692
692
|
* ```
|
|
693
693
|
*/
|
|
694
|
-
constructor(e, { headers: r = {}, customFetch: s, region: n =
|
|
694
|
+
constructor(e, { headers: r = {}, customFetch: s, region: n = Ur.Any } = {}) {
|
|
695
695
|
this.url = e, this.headers = r, this.region = n, this.fetch = la(s);
|
|
696
696
|
}
|
|
697
697
|
/**
|
|
@@ -743,16 +743,16 @@ class ua {
|
|
|
743
743
|
throw new ca(x);
|
|
744
744
|
}), _ = S.headers.get("x-relay-error");
|
|
745
745
|
if (_ && _ === "true")
|
|
746
|
-
throw new cs(S);
|
|
747
|
-
if (!S.ok)
|
|
748
746
|
throw new us(S);
|
|
749
|
-
|
|
750
|
-
|
|
747
|
+
if (!S.ok)
|
|
748
|
+
throw new ds(S);
|
|
749
|
+
let v = ((n = S.headers.get("Content-Type")) !== null && n !== void 0 ? n : "text/plain").split(";")[0].trim(), A;
|
|
750
|
+
return v === "application/json" ? A = yield S.json() : v === "application/octet-stream" || v === "application/pdf" ? A = yield S.blob() : v === "text/event-stream" ? A = S : v === "multipart/form-data" ? A = yield S.formData() : A = yield S.text(), { data: A, error: null, response: S };
|
|
751
751
|
} catch (o) {
|
|
752
752
|
return {
|
|
753
753
|
data: null,
|
|
754
754
|
error: o,
|
|
755
|
-
response: o instanceof
|
|
755
|
+
response: o instanceof ds || o instanceof us ? o.context : void 0
|
|
756
756
|
};
|
|
757
757
|
} finally {
|
|
758
758
|
a && clearTimeout(a);
|
|
@@ -1088,7 +1088,7 @@ ${d.stack}`);
|
|
|
1088
1088
|
return this.headers.append("Prefer", "handling=strict"), this.headers.append("Prefer", `max-affected=${t}`), this;
|
|
1089
1089
|
}
|
|
1090
1090
|
};
|
|
1091
|
-
const
|
|
1091
|
+
const hs = /* @__PURE__ */ new RegExp("[,()]");
|
|
1092
1092
|
var Rt = class extends fa {
|
|
1093
1093
|
/**
|
|
1094
1094
|
* Match only rows where `column` is equal to `value`.
|
|
@@ -1255,7 +1255,7 @@ var Rt = class extends fa {
|
|
|
1255
1255
|
* @param values - The values array to filter with
|
|
1256
1256
|
*/
|
|
1257
1257
|
in(t, e) {
|
|
1258
|
-
const r = Array.from(new Set(e)).map((s) => typeof s == "string" &&
|
|
1258
|
+
const r = Array.from(new Set(e)).map((s) => typeof s == "string" && hs.test(s) ? `"${s}"` : `${s}`).join(",");
|
|
1259
1259
|
return this.url.searchParams.append(t, `in.(${r})`), this;
|
|
1260
1260
|
}
|
|
1261
1261
|
/**
|
|
@@ -1265,7 +1265,7 @@ var Rt = class extends fa {
|
|
|
1265
1265
|
* @param values - The values array to filter with
|
|
1266
1266
|
*/
|
|
1267
1267
|
notIn(t, e) {
|
|
1268
|
-
const r = Array.from(new Set(e)).map((s) => typeof s == "string" &&
|
|
1268
|
+
const r = Array.from(new Set(e)).map((s) => typeof s == "string" && hs.test(s) ? `"${s}"` : `${s}`).join(",");
|
|
1269
1269
|
return this.url.searchParams.append(t, `not.in.(${r})`), this;
|
|
1270
1270
|
}
|
|
1271
1271
|
/**
|
|
@@ -1711,27 +1711,27 @@ var Rt = class extends fa {
|
|
|
1711
1711
|
});
|
|
1712
1712
|
}
|
|
1713
1713
|
};
|
|
1714
|
-
function
|
|
1714
|
+
function Yt(t) {
|
|
1715
1715
|
"@babel/helpers - typeof";
|
|
1716
|
-
return
|
|
1716
|
+
return Yt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1717
1717
|
return typeof e;
|
|
1718
1718
|
} : function(e) {
|
|
1719
1719
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1720
|
-
},
|
|
1720
|
+
}, Yt(t);
|
|
1721
1721
|
}
|
|
1722
1722
|
function pa(t, e) {
|
|
1723
|
-
if (
|
|
1723
|
+
if (Yt(t) != "object" || !t) return t;
|
|
1724
1724
|
var r = t[Symbol.toPrimitive];
|
|
1725
1725
|
if (r !== void 0) {
|
|
1726
1726
|
var s = r.call(t, e);
|
|
1727
|
-
if (
|
|
1727
|
+
if (Yt(s) != "object") return s;
|
|
1728
1728
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1729
1729
|
}
|
|
1730
1730
|
return (e === "string" ? String : Number)(t);
|
|
1731
1731
|
}
|
|
1732
1732
|
function ga(t) {
|
|
1733
1733
|
var e = pa(t, "string");
|
|
1734
|
-
return
|
|
1734
|
+
return Yt(e) == "symbol" ? e : e + "";
|
|
1735
1735
|
}
|
|
1736
1736
|
function ya(t, e, r) {
|
|
1737
1737
|
return (e = ga(e)) in t ? Object.defineProperty(t, e, {
|
|
@@ -1741,7 +1741,7 @@ function ya(t, e, r) {
|
|
|
1741
1741
|
writable: !0
|
|
1742
1742
|
}) : t[e] = r, t;
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function fs(t, e) {
|
|
1745
1745
|
var r = Object.keys(t);
|
|
1746
1746
|
if (Object.getOwnPropertySymbols) {
|
|
1747
1747
|
var s = Object.getOwnPropertySymbols(t);
|
|
@@ -1751,12 +1751,12 @@ function hs(t, e) {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
return r;
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function lr(t) {
|
|
1755
1755
|
for (var e = 1; e < arguments.length; e++) {
|
|
1756
1756
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
1757
|
-
e % 2 ?
|
|
1757
|
+
e % 2 ? fs(Object(r), !0).forEach(function(s) {
|
|
1758
1758
|
ya(t, s, r[s]);
|
|
1759
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
1759
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : fs(Object(r)).forEach(function(s) {
|
|
1760
1760
|
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(r, s));
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
@@ -1795,11 +1795,11 @@ var va = class un {
|
|
|
1795
1795
|
const p = () => {
|
|
1796
1796
|
clearTimeout(f), d.abort();
|
|
1797
1797
|
};
|
|
1798
|
-
return m.addEventListener("abort", p, { once: !0 }), o(c,
|
|
1798
|
+
return m.addEventListener("abort", p, { once: !0 }), o(c, lr(lr({}, u), {}, { signal: d.signal })).finally(() => {
|
|
1799
1799
|
clearTimeout(f), m.removeEventListener("abort", p);
|
|
1800
1800
|
});
|
|
1801
1801
|
}
|
|
1802
|
-
return o(c,
|
|
1802
|
+
return o(c, lr(lr({}, u), {}, { signal: d.signal })).finally(() => clearTimeout(f));
|
|
1803
1803
|
} : this.fetch = o;
|
|
1804
1804
|
}
|
|
1805
1805
|
/**
|
|
@@ -1983,7 +1983,7 @@ Suggested solution: ${e.workaround}`), new Error(r);
|
|
|
1983
1983
|
}
|
|
1984
1984
|
}
|
|
1985
1985
|
}
|
|
1986
|
-
const wa = "2.98.0", _a = `realtime-js/${wa}`, ka = "1.0.0", dn = "2.0.0",
|
|
1986
|
+
const wa = "2.98.0", _a = `realtime-js/${wa}`, ka = "1.0.0", dn = "2.0.0", ms = dn, Mr = 1e4, Sa = 1e3, xa = 100;
|
|
1987
1987
|
var st;
|
|
1988
1988
|
(function(t) {
|
|
1989
1989
|
t[t.connecting = 0] = "connecting", t[t.open = 1] = "open", t[t.closing = 2] = "closing", t[t.closed = 3] = "closed";
|
|
@@ -1996,10 +1996,10 @@ var Ke;
|
|
|
1996
1996
|
(function(t) {
|
|
1997
1997
|
t.close = "phx_close", t.error = "phx_error", t.join = "phx_join", t.reply = "phx_reply", t.leave = "phx_leave", t.access_token = "access_token";
|
|
1998
1998
|
})(Ke || (Ke = {}));
|
|
1999
|
-
var
|
|
1999
|
+
var Br;
|
|
2000
2000
|
(function(t) {
|
|
2001
2001
|
t.websocket = "websocket";
|
|
2002
|
-
})(
|
|
2002
|
+
})(Br || (Br = {}));
|
|
2003
2003
|
var ft;
|
|
2004
2004
|
(function(t) {
|
|
2005
2005
|
t.Connecting = "connecting", t.Open = "open", t.Closing = "closing", t.Closed = "closed";
|
|
@@ -2105,13 +2105,13 @@ var ee;
|
|
|
2105
2105
|
(function(t) {
|
|
2106
2106
|
t.abstime = "abstime", t.bool = "bool", t.date = "date", t.daterange = "daterange", t.float4 = "float4", t.float8 = "float8", t.int2 = "int2", t.int4 = "int4", t.int4range = "int4range", t.int8 = "int8", t.int8range = "int8range", t.json = "json", t.jsonb = "jsonb", t.money = "money", t.numeric = "numeric", t.oid = "oid", t.reltime = "reltime", t.text = "text", t.time = "time", t.timestamp = "timestamp", t.timestamptz = "timestamptz", t.timetz = "timetz", t.tsrange = "tsrange", t.tstzrange = "tstzrange";
|
|
2107
2107
|
})(ee || (ee = {}));
|
|
2108
|
-
const
|
|
2108
|
+
const ps = (t, e, r = {}) => {
|
|
2109
2109
|
var s;
|
|
2110
2110
|
const n = (s = r.skipTypes) !== null && s !== void 0 ? s : [];
|
|
2111
2111
|
return e ? Object.keys(e).reduce((a, i) => (a[i] = Ta(i, t, e, n), a), {}) : {};
|
|
2112
2112
|
}, Ta = (t, e, r, s) => {
|
|
2113
2113
|
const n = e.find((o) => o.name === t), a = n?.type, i = r[t];
|
|
2114
|
-
return a && !s.includes(a) ? fn(a, i) :
|
|
2114
|
+
return a && !s.includes(a) ? fn(a, i) : Fr(i);
|
|
2115
2115
|
}, fn = (t, e) => {
|
|
2116
2116
|
if (t.charAt(0) === "_") {
|
|
2117
2117
|
const r = t.slice(1, t.length);
|
|
@@ -2153,11 +2153,11 @@ const ms = (t, e, r = {}) => {
|
|
|
2153
2153
|
// To allow users to cast it based on Timezone
|
|
2154
2154
|
case ee.tsrange:
|
|
2155
2155
|
case ee.tstzrange:
|
|
2156
|
-
return
|
|
2156
|
+
return Fr(e);
|
|
2157
2157
|
default:
|
|
2158
|
-
return
|
|
2158
|
+
return Fr(e);
|
|
2159
2159
|
}
|
|
2160
|
-
},
|
|
2160
|
+
}, Fr = (t) => t, Pa = (t) => {
|
|
2161
2161
|
switch (t) {
|
|
2162
2162
|
case "t":
|
|
2163
2163
|
return !0;
|
|
@@ -2200,7 +2200,7 @@ const ms = (t, e, r = {}) => {
|
|
|
2200
2200
|
const e = new URL(t);
|
|
2201
2201
|
return e.protocol = e.protocol.replace(/^ws/i, "http"), e.pathname = e.pathname.replace(/\/+$/, "").replace(/\/socket\/websocket$/i, "").replace(/\/socket$/i, "").replace(/\/websocket$/i, ""), e.pathname === "" || e.pathname === "/" ? e.pathname = "/api/broadcast" : e.pathname = e.pathname + "/api/broadcast", e.href;
|
|
2202
2202
|
};
|
|
2203
|
-
class
|
|
2203
|
+
class Cr {
|
|
2204
2204
|
/**
|
|
2205
2205
|
* Initializes the Push
|
|
2206
2206
|
*
|
|
@@ -2209,7 +2209,7 @@ class Rr {
|
|
|
2209
2209
|
* @param payload The payload, for example `{user_id: 123}`
|
|
2210
2210
|
* @param timeout The push timeout in milliseconds
|
|
2211
2211
|
*/
|
|
2212
|
-
constructor(e, r, s = {}, n =
|
|
2212
|
+
constructor(e, r, s = {}, n = Mr) {
|
|
2213
2213
|
this.channel = e, this.event = r, this.payload = s, this.timeout = n, this.sent = !1, this.timeoutTimer = void 0, this.ref = "", this.receivedResp = null, this.recHooks = [], this.refEvent = null;
|
|
2214
2214
|
}
|
|
2215
2215
|
resend(e) {
|
|
@@ -2261,11 +2261,11 @@ class Rr {
|
|
|
2261
2261
|
return this.receivedResp && this.receivedResp.status === e;
|
|
2262
2262
|
}
|
|
2263
2263
|
}
|
|
2264
|
-
var
|
|
2264
|
+
var gs;
|
|
2265
2265
|
(function(t) {
|
|
2266
2266
|
t.SYNC = "sync", t.JOIN = "join", t.LEAVE = "leave";
|
|
2267
|
-
})(
|
|
2268
|
-
class
|
|
2267
|
+
})(gs || (gs = {}));
|
|
2268
|
+
class zt {
|
|
2269
2269
|
/**
|
|
2270
2270
|
* Creates a Presence helper that keeps the local presence state in sync with the server.
|
|
2271
2271
|
*
|
|
@@ -2296,12 +2296,12 @@ class Gt {
|
|
|
2296
2296
|
};
|
|
2297
2297
|
this.channel._on(s.state, {}, (n) => {
|
|
2298
2298
|
const { onJoin: a, onLeave: i, onSync: o } = this.caller;
|
|
2299
|
-
this.joinRef = this.channel._joinRef(), this.state =
|
|
2300
|
-
this.state =
|
|
2299
|
+
this.joinRef = this.channel._joinRef(), this.state = zt.syncState(this.state, n, a, i), this.pendingDiffs.forEach((c) => {
|
|
2300
|
+
this.state = zt.syncDiff(this.state, c, a, i);
|
|
2301
2301
|
}), this.pendingDiffs = [], o();
|
|
2302
2302
|
}), this.channel._on(s.diff, {}, (n) => {
|
|
2303
2303
|
const { onJoin: a, onLeave: i, onSync: o } = this.caller;
|
|
2304
|
-
this.inPendingSyncState() ? this.pendingDiffs.push(n) : (this.state =
|
|
2304
|
+
this.inPendingSyncState() ? this.pendingDiffs.push(n) : (this.state = zt.syncDiff(this.state, n, a, i), o());
|
|
2305
2305
|
}), this.onJoin((n, a, i) => {
|
|
2306
2306
|
this.channel._trigger("presence", {
|
|
2307
2307
|
event: "join",
|
|
@@ -2430,14 +2430,14 @@ class Gt {
|
|
|
2430
2430
|
return !this.joinRef || this.joinRef !== this.channel._joinRef();
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
|
-
var
|
|
2433
|
+
var ys;
|
|
2434
2434
|
(function(t) {
|
|
2435
2435
|
t.ALL = "*", t.INSERT = "INSERT", t.UPDATE = "UPDATE", t.DELETE = "DELETE";
|
|
2436
|
-
})(
|
|
2437
|
-
var
|
|
2436
|
+
})(ys || (ys = {}));
|
|
2437
|
+
var Vt;
|
|
2438
2438
|
(function(t) {
|
|
2439
2439
|
t.BROADCAST = "broadcast", t.PRESENCE = "presence", t.POSTGRES_CHANGES = "postgres_changes", t.SYSTEM = "system";
|
|
2440
|
-
})(
|
|
2440
|
+
})(Vt || (Vt = {}));
|
|
2441
2441
|
var Xe;
|
|
2442
2442
|
(function(t) {
|
|
2443
2443
|
t.SUBSCRIBED = "SUBSCRIBED", t.TIMED_OUT = "TIMED_OUT", t.CLOSED = "CLOSED", t.CHANNEL_ERROR = "CHANNEL_ERROR";
|
|
@@ -2465,7 +2465,7 @@ class Nt {
|
|
|
2465
2465
|
broadcast: { ack: !1, self: !1 },
|
|
2466
2466
|
presence: { key: "", enabled: !1 },
|
|
2467
2467
|
private: !1
|
|
2468
|
-
}, r.config), this.timeout = this.socket.timeout, this.joinPush = new
|
|
2468
|
+
}, r.config), this.timeout = this.socket.timeout, this.joinPush = new Cr(this, Ke.join, this.params, this.timeout), this.rejoinTimer = new hn(() => this._rejoinUntilConnected(), this.socket.reconnectAfterMs), this.joinPush.receive("ok", () => {
|
|
2469
2469
|
this.state = ce.joined, this.rejoinTimer.reset(), this.pushBuffer.forEach((i) => i.send()), this.pushBuffer = [];
|
|
2470
2470
|
}), this._onClose(() => {
|
|
2471
2471
|
this.rejoinTimer.reset(), this.socket.log("channel", `close ${this.topic} ${this._joinRef()}`), this.state = ce.closed, this.socket._remove(this);
|
|
@@ -2477,14 +2477,14 @@ class Nt {
|
|
|
2477
2477
|
this._isLeaving() || this._isClosed() || (this.socket.log("channel", `error ${this.topic}`, i), this.state = ce.errored, this.rejoinTimer.scheduleTimeout());
|
|
2478
2478
|
}), this._on(Ke.reply, {}, (i, o) => {
|
|
2479
2479
|
this._trigger(this._replyEventName(o), i);
|
|
2480
|
-
}), this.presence = new
|
|
2480
|
+
}), this.presence = new zt(this), this.broadcastEndpointURL = mn(this.socket.endPoint), this.private = this.params.config.private || !1, !this.private && (!((a = (n = this.params.config) === null || n === void 0 ? void 0 : n.broadcast) === null || a === void 0) && a.replay))
|
|
2481
2481
|
throw `tried to use replay on public channel '${this.topic}'. It must be a private channel.`;
|
|
2482
2482
|
}
|
|
2483
2483
|
/** Subscribe registers your client with the server */
|
|
2484
2484
|
subscribe(e, r = this.timeout) {
|
|
2485
2485
|
var s, n, a;
|
|
2486
2486
|
if (this.socket.isConnected() || this.socket.connect(), this.state == ce.closed) {
|
|
2487
|
-
const { config: { broadcast: i, presence: o, private: c } } = this.params, u = (n = (s = this.bindings.postgres_changes) === null || s === void 0 ? void 0 : s.map((p) => p.filter)) !== null && n !== void 0 ? n : [], d = !!this.bindings[
|
|
2487
|
+
const { config: { broadcast: i, presence: o, private: c } } = this.params, u = (n = (s = this.bindings.postgres_changes) === null || s === void 0 ? void 0 : s.map((p) => p.filter)) !== null && n !== void 0 ? n : [], d = !!this.bindings[Vt.PRESENCE] && this.bindings[Vt.PRESENCE].length > 0 || ((a = this.params.config.presence) === null || a === void 0 ? void 0 : a.enabled) === !0, f = {}, m = {
|
|
2488
2488
|
broadcast: i,
|
|
2489
2489
|
presence: Object.assign(Object.assign({}, o), { enabled: d }),
|
|
2490
2490
|
postgres_changes: u,
|
|
@@ -2498,8 +2498,8 @@ class Nt {
|
|
|
2498
2498
|
} else {
|
|
2499
2499
|
const y = this.bindings.postgres_changes, w = (g = y?.length) !== null && g !== void 0 ? g : 0, S = [];
|
|
2500
2500
|
for (let _ = 0; _ < w; _++) {
|
|
2501
|
-
const v = y[_], { filter: { event:
|
|
2502
|
-
if (H && H.event ===
|
|
2501
|
+
const v = y[_], { filter: { event: A, schema: x, table: N, filter: P } } = v, H = p && p[_];
|
|
2502
|
+
if (H && H.event === A && Nt.isFilterValueEqual(H.schema, x) && Nt.isFilterValueEqual(H.table, N) && Nt.isFilterValueEqual(H.filter, P))
|
|
2503
2503
|
S.push(Object.assign(Object.assign({}, v), { id: H.id }));
|
|
2504
2504
|
else {
|
|
2505
2505
|
this.unsubscribe(), this.state = ce.errored, e?.(Xe.CHANNEL_ERROR, new Error("mismatch between server and client bindings for postgres changes"));
|
|
@@ -2547,7 +2547,7 @@ class Nt {
|
|
|
2547
2547
|
}, e);
|
|
2548
2548
|
}
|
|
2549
2549
|
on(e, r, s) {
|
|
2550
|
-
return this.state === ce.joined && e ===
|
|
2550
|
+
return this.state === ce.joined && e === Vt.PRESENCE && (this.socket.log("channel", `resubscribe to ${this.topic} due to change in presence callbacks on joined channel`), this.unsubscribe().then(async () => await this.subscribe())), this._on(e, r, s);
|
|
2551
2551
|
}
|
|
2552
2552
|
/**
|
|
2553
2553
|
* Sends a broadcast message explicitly via REST API.
|
|
@@ -2662,7 +2662,7 @@ class Nt {
|
|
|
2662
2662
|
this.joinPush.destroy();
|
|
2663
2663
|
let s = null;
|
|
2664
2664
|
return new Promise((n) => {
|
|
2665
|
-
s = new
|
|
2665
|
+
s = new Cr(this, Ke.leave, {}, e), s.receive("ok", () => {
|
|
2666
2666
|
r(), n("ok");
|
|
2667
2667
|
}).receive("timeout", () => {
|
|
2668
2668
|
r(), n("timed out");
|
|
@@ -2690,7 +2690,7 @@ class Nt {
|
|
|
2690
2690
|
_push(e, r, s = this.timeout) {
|
|
2691
2691
|
if (!this.joinedOnce)
|
|
2692
2692
|
throw `tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;
|
|
2693
|
-
let n = new
|
|
2693
|
+
let n = new Cr(this, e, r, s);
|
|
2694
2694
|
return this._canPush() ? n.send() : this._addToPushBuffer(n), n;
|
|
2695
2695
|
}
|
|
2696
2696
|
/** @internal */
|
|
@@ -2735,11 +2735,11 @@ class Nt {
|
|
|
2735
2735
|
var g, y, w, S, _, v;
|
|
2736
2736
|
if (["broadcast", "presence", "postgres_changes"].includes(i))
|
|
2737
2737
|
if ("id" in p) {
|
|
2738
|
-
const
|
|
2739
|
-
return
|
|
2738
|
+
const A = p.id, x = (g = p.filter) === null || g === void 0 ? void 0 : g.event;
|
|
2739
|
+
return A && ((y = r.ids) === null || y === void 0 ? void 0 : y.includes(A)) && (x === "*" || x?.toLocaleLowerCase() === ((w = r.data) === null || w === void 0 ? void 0 : w.type.toLocaleLowerCase()));
|
|
2740
2740
|
} else {
|
|
2741
|
-
const
|
|
2742
|
-
return
|
|
2741
|
+
const A = (_ = (S = p?.filter) === null || S === void 0 ? void 0 : S.event) === null || _ === void 0 ? void 0 : _.toLocaleLowerCase();
|
|
2742
|
+
return A === "*" || A === ((v = r?.event) === null || v === void 0 ? void 0 : v.toLocaleLowerCase());
|
|
2743
2743
|
}
|
|
2744
2744
|
else
|
|
2745
2745
|
return p.type.toLocaleLowerCase() === i;
|
|
@@ -2851,11 +2851,11 @@ class Nt {
|
|
|
2851
2851
|
new: {},
|
|
2852
2852
|
old: {}
|
|
2853
2853
|
};
|
|
2854
|
-
return (e.type === "INSERT" || e.type === "UPDATE") && (r.new =
|
|
2854
|
+
return (e.type === "INSERT" || e.type === "UPDATE") && (r.new = ps(e.columns, e.record)), (e.type === "UPDATE" || e.type === "DELETE") && (r.old = ps(e.columns, e.old_record)), r;
|
|
2855
2855
|
}
|
|
2856
2856
|
}
|
|
2857
|
-
const
|
|
2858
|
-
},
|
|
2857
|
+
const Or = () => {
|
|
2858
|
+
}, cr = {
|
|
2859
2859
|
HEARTBEAT_INTERVAL: 25e3,
|
|
2860
2860
|
RECONNECT_DELAY: 10,
|
|
2861
2861
|
HEARTBEAT_TIMEOUT_FALLBACK: 100
|
|
@@ -2897,14 +2897,14 @@ class Da {
|
|
|
2897
2897
|
*/
|
|
2898
2898
|
constructor(e, r) {
|
|
2899
2899
|
var s;
|
|
2900
|
-
if (this.accessTokenValue = null, this.apiKey = null, this._manuallySetToken = !1, this.channels = new Array(), this.endPoint = "", this.httpEndpoint = "", this.headers = {}, this.params = {}, this.timeout =
|
|
2900
|
+
if (this.accessTokenValue = null, this.apiKey = null, this._manuallySetToken = !1, this.channels = new Array(), this.endPoint = "", this.httpEndpoint = "", this.headers = {}, this.params = {}, this.timeout = Mr, this.transport = null, this.heartbeatIntervalMs = cr.HEARTBEAT_INTERVAL, this.heartbeatTimer = void 0, this.pendingHeartbeatRef = null, this.heartbeatCallback = Or, this.ref = 0, this.reconnectTimer = null, this.vsn = ms, this.logger = Or, this.conn = null, this.sendBuffer = [], this.serializer = new ja(), this.stateChangeCallbacks = {
|
|
2901
2901
|
open: [],
|
|
2902
2902
|
close: [],
|
|
2903
2903
|
error: [],
|
|
2904
2904
|
message: []
|
|
2905
2905
|
}, this.accessToken = null, this._connectionState = "disconnected", this._wasManualDisconnect = !1, this._authPromise = null, this._heartbeatSentAt = null, this._resolveFetch = (n) => n ? (...a) => n(...a) : (...a) => fetch(...a), !(!((s = r?.params) === null || s === void 0) && s.apikey))
|
|
2906
2906
|
throw new Error("API key is required to connect to Realtime");
|
|
2907
|
-
this.apiKey = r.params.apikey, this.endPoint = `${e}/${
|
|
2907
|
+
this.apiKey = r.params.apikey, this.endPoint = `${e}/${Br.websocket}`, this.httpEndpoint = mn(e), this._initializeOptions(r), this._setupReconnectionTimer(), this.fetch = this._resolveFetch(r?.fetch);
|
|
2908
2908
|
}
|
|
2909
2909
|
/**
|
|
2910
2910
|
* Connects the socket, unless already connected.
|
|
@@ -3113,7 +3113,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3113
3113
|
this._wasManualDisconnect = !1, (e = this.conn) === null || e === void 0 || e.close(Sa, "heartbeat timeout"), setTimeout(() => {
|
|
3114
3114
|
var r;
|
|
3115
3115
|
this.isConnected() || (r = this.reconnectTimer) === null || r === void 0 || r.scheduleTimeout();
|
|
3116
|
-
},
|
|
3116
|
+
}, cr.HEARTBEAT_TIMEOUT_FALLBACK);
|
|
3117
3117
|
return;
|
|
3118
3118
|
}
|
|
3119
3119
|
this._heartbeatSentAt = Date.now(), this.pendingHeartbeatRef = this._makeRef(), this.push({
|
|
@@ -3369,7 +3369,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3369
3369
|
this.reconnectTimer = new hn(async () => {
|
|
3370
3370
|
setTimeout(async () => {
|
|
3371
3371
|
await this._waitForAuthIfNeeded(), this.isConnected() || this.connect();
|
|
3372
|
-
},
|
|
3372
|
+
}, cr.RECONNECT_DELAY);
|
|
3373
3373
|
}, this.reconnectAfterMs);
|
|
3374
3374
|
}
|
|
3375
3375
|
/**
|
|
@@ -3378,7 +3378,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3378
3378
|
*/
|
|
3379
3379
|
_initializeOptions(e) {
|
|
3380
3380
|
var r, s, n, a, i, o, c, u, d, f, m, p;
|
|
3381
|
-
switch (this.transport = (r = e?.transport) !== null && r !== void 0 ? r : null, this.timeout = (s = e?.timeout) !== null && s !== void 0 ? s :
|
|
3381
|
+
switch (this.transport = (r = e?.transport) !== null && r !== void 0 ? r : null, this.timeout = (s = e?.timeout) !== null && s !== void 0 ? s : Mr, this.heartbeatIntervalMs = (n = e?.heartbeatIntervalMs) !== null && n !== void 0 ? n : cr.HEARTBEAT_INTERVAL, this.worker = (a = e?.worker) !== null && a !== void 0 ? a : !1, this.accessToken = (i = e?.accessToken) !== null && i !== void 0 ? i : null, this.heartbeatCallback = (o = e?.heartbeatCallback) !== null && o !== void 0 ? o : Or, this.vsn = (c = e?.vsn) !== null && c !== void 0 ? c : ms, e?.params && (this.params = e.params), e?.logger && (this.logger = e.logger), (e?.logLevel || e?.log_level) && (this.logLevel = e.logLevel || e.log_level, this.params = Object.assign(Object.assign({}, this.params), { log_level: this.logLevel })), this.reconnectAfterMs = (u = e?.reconnectAfterMs) !== null && u !== void 0 ? u : ((g) => Oa[g - 1] || Na), this.vsn) {
|
|
3382
3382
|
case ka:
|
|
3383
3383
|
this.encode = (d = e?.encode) !== null && d !== void 0 ? d : ((g, y) => y(JSON.stringify(g))), this.decode = (f = e?.decode) !== null && f !== void 0 ? f : ((g, y) => y(JSON.parse(g)));
|
|
3384
3384
|
break;
|
|
@@ -3395,7 +3395,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3395
3395
|
}
|
|
3396
3396
|
}
|
|
3397
3397
|
}
|
|
3398
|
-
var
|
|
3398
|
+
var Qt = class extends Error {
|
|
3399
3399
|
constructor(t, e) {
|
|
3400
3400
|
super(t), this.name = "IcebergError", this.status = e.status, this.icebergType = e.icebergType, this.icebergCode = e.icebergCode, this.details = e.details, this.isCommitStateUnknown = e.icebergType === "CommitStateUnknownException" || [500, 502, 504].includes(e.status) && e.icebergType?.includes("CommitState") === !0;
|
|
3401
3401
|
}
|
|
@@ -3449,7 +3449,7 @@ function Ua(t) {
|
|
|
3449
3449
|
}), d = await u.text(), f = (u.headers.get("content-type") || "").includes("application/json"), m = f && d ? JSON.parse(d) : d;
|
|
3450
3450
|
if (!u.ok) {
|
|
3451
3451
|
const p = f ? m : void 0, g = p?.error;
|
|
3452
|
-
throw new
|
|
3452
|
+
throw new Qt(
|
|
3453
3453
|
g?.message ?? `Request failed with status ${u.status}`,
|
|
3454
3454
|
{
|
|
3455
3455
|
status: u.status,
|
|
@@ -3463,7 +3463,7 @@ function Ua(t) {
|
|
|
3463
3463
|
}
|
|
3464
3464
|
};
|
|
3465
3465
|
}
|
|
3466
|
-
function
|
|
3466
|
+
function ur(t) {
|
|
3467
3467
|
return t.join("");
|
|
3468
3468
|
}
|
|
3469
3469
|
var Ma = class {
|
|
@@ -3471,7 +3471,7 @@ var Ma = class {
|
|
|
3471
3471
|
this.client = t, this.prefix = e;
|
|
3472
3472
|
}
|
|
3473
3473
|
async listNamespaces(t) {
|
|
3474
|
-
const e = t ? { parent:
|
|
3474
|
+
const e = t ? { parent: ur(t.namespace) } : void 0;
|
|
3475
3475
|
return (await this.client.request({
|
|
3476
3476
|
method: "GET",
|
|
3477
3477
|
path: `${this.prefix}/namespaces`,
|
|
@@ -3492,14 +3492,14 @@ var Ma = class {
|
|
|
3492
3492
|
async dropNamespace(t) {
|
|
3493
3493
|
await this.client.request({
|
|
3494
3494
|
method: "DELETE",
|
|
3495
|
-
path: `${this.prefix}/namespaces/${
|
|
3495
|
+
path: `${this.prefix}/namespaces/${ur(t.namespace)}`
|
|
3496
3496
|
});
|
|
3497
3497
|
}
|
|
3498
3498
|
async loadNamespaceMetadata(t) {
|
|
3499
3499
|
return {
|
|
3500
3500
|
properties: (await this.client.request({
|
|
3501
3501
|
method: "GET",
|
|
3502
|
-
path: `${this.prefix}/namespaces/${
|
|
3502
|
+
path: `${this.prefix}/namespaces/${ur(t.namespace)}`
|
|
3503
3503
|
})).data.properties
|
|
3504
3504
|
};
|
|
3505
3505
|
}
|
|
@@ -3507,10 +3507,10 @@ var Ma = class {
|
|
|
3507
3507
|
try {
|
|
3508
3508
|
return await this.client.request({
|
|
3509
3509
|
method: "HEAD",
|
|
3510
|
-
path: `${this.prefix}/namespaces/${
|
|
3510
|
+
path: `${this.prefix}/namespaces/${ur(t.namespace)}`
|
|
3511
3511
|
}), !0;
|
|
3512
3512
|
} catch (e) {
|
|
3513
|
-
if (e instanceof
|
|
3513
|
+
if (e instanceof Qt && e.status === 404)
|
|
3514
3514
|
return !1;
|
|
3515
3515
|
throw e;
|
|
3516
3516
|
}
|
|
@@ -3519,7 +3519,7 @@ var Ma = class {
|
|
|
3519
3519
|
try {
|
|
3520
3520
|
return await this.createNamespace(t, e);
|
|
3521
3521
|
} catch (r) {
|
|
3522
|
-
if (r instanceof
|
|
3522
|
+
if (r instanceof Qt && r.status === 409)
|
|
3523
3523
|
return;
|
|
3524
3524
|
throw r;
|
|
3525
3525
|
}
|
|
@@ -3583,7 +3583,7 @@ var Ba = class {
|
|
|
3583
3583
|
headers: e
|
|
3584
3584
|
}), !0;
|
|
3585
3585
|
} catch (r) {
|
|
3586
|
-
if (r instanceof
|
|
3586
|
+
if (r instanceof Qt && r.status === 404)
|
|
3587
3587
|
return !1;
|
|
3588
3588
|
throw r;
|
|
3589
3589
|
}
|
|
@@ -3592,7 +3592,7 @@ var Ba = class {
|
|
|
3592
3592
|
try {
|
|
3593
3593
|
return await this.createTable(t, e);
|
|
3594
3594
|
} catch (r) {
|
|
3595
|
-
if (r instanceof
|
|
3595
|
+
if (r instanceof Qt && r.status === 409)
|
|
3596
3596
|
return await this.loadTable({ namespace: t.namespace, name: e.name });
|
|
3597
3597
|
throw r;
|
|
3598
3598
|
}
|
|
@@ -3868,15 +3868,15 @@ var Ba = class {
|
|
|
3868
3868
|
async createTableIfNotExists(t, e) {
|
|
3869
3869
|
return this.tableOps.createTableIfNotExists(t, e);
|
|
3870
3870
|
}
|
|
3871
|
-
},
|
|
3871
|
+
}, jr = class extends Error {
|
|
3872
3872
|
constructor(t, e = "storage", r, s) {
|
|
3873
3873
|
super(t), this.__isStorageError = !0, this.namespace = e, this.name = e === "vectors" ? "StorageVectorsError" : "StorageError", this.status = r, this.statusCode = s;
|
|
3874
3874
|
}
|
|
3875
3875
|
};
|
|
3876
|
-
function
|
|
3876
|
+
function Tr(t) {
|
|
3877
3877
|
return typeof t == "object" && t !== null && "__isStorageError" in t;
|
|
3878
3878
|
}
|
|
3879
|
-
var
|
|
3879
|
+
var dr = class extends jr {
|
|
3880
3880
|
constructor(t, e, r, s = "storage") {
|
|
3881
3881
|
super(t, s, e, r), this.name = s === "vectors" ? "StorageVectorsApiError" : "StorageApiError", this.status = e, this.statusCode = r;
|
|
3882
3882
|
}
|
|
@@ -3888,7 +3888,7 @@ var ur = class extends xr {
|
|
|
3888
3888
|
statusCode: this.statusCode
|
|
3889
3889
|
};
|
|
3890
3890
|
}
|
|
3891
|
-
}, pn = class extends
|
|
3891
|
+
}, pn = class extends jr {
|
|
3892
3892
|
constructor(t, e, r = "storage") {
|
|
3893
3893
|
super(t, r), this.name = r === "vectors" ? "StorageVectorsUnknownError" : "StorageUnknownError", this.originalError = e;
|
|
3894
3894
|
}
|
|
@@ -3897,36 +3897,36 @@ const Ka = (t) => t ? (...e) => t(...e) : (...e) => fetch(...e), qa = (t) => {
|
|
|
3897
3897
|
if (typeof t != "object" || t === null) return !1;
|
|
3898
3898
|
const e = Object.getPrototypeOf(t);
|
|
3899
3899
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
3900
|
-
},
|
|
3901
|
-
if (Array.isArray(t)) return t.map((r) =>
|
|
3900
|
+
}, Kr = (t) => {
|
|
3901
|
+
if (Array.isArray(t)) return t.map((r) => Kr(r));
|
|
3902
3902
|
if (typeof t == "function" || t !== Object(t)) return t;
|
|
3903
3903
|
const e = {};
|
|
3904
3904
|
return Object.entries(t).forEach(([r, s]) => {
|
|
3905
3905
|
const n = r.replace(/([-_][a-z])/gi, (a) => a.toUpperCase().replace(/[-_]/g, ""));
|
|
3906
|
-
e[n] =
|
|
3906
|
+
e[n] = Kr(s);
|
|
3907
3907
|
}), e;
|
|
3908
3908
|
}, Wa = (t) => !t || typeof t != "string" || t.length === 0 || t.length > 100 || t.trim() !== t || t.includes("/") || t.includes("\\") ? !1 : /^[\w!.\*'() &$@=;:+,?-]+$/.test(t);
|
|
3909
|
-
function
|
|
3909
|
+
function Xt(t) {
|
|
3910
3910
|
"@babel/helpers - typeof";
|
|
3911
|
-
return
|
|
3911
|
+
return Xt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
3912
3912
|
return typeof e;
|
|
3913
3913
|
} : function(e) {
|
|
3914
3914
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3915
|
-
},
|
|
3915
|
+
}, Xt(t);
|
|
3916
3916
|
}
|
|
3917
3917
|
function Ha(t, e) {
|
|
3918
|
-
if (
|
|
3918
|
+
if (Xt(t) != "object" || !t) return t;
|
|
3919
3919
|
var r = t[Symbol.toPrimitive];
|
|
3920
3920
|
if (r !== void 0) {
|
|
3921
3921
|
var s = r.call(t, e);
|
|
3922
|
-
if (
|
|
3922
|
+
if (Xt(s) != "object") return s;
|
|
3923
3923
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3924
3924
|
}
|
|
3925
3925
|
return (e === "string" ? String : Number)(t);
|
|
3926
3926
|
}
|
|
3927
3927
|
function Ga(t) {
|
|
3928
3928
|
var e = Ha(t, "string");
|
|
3929
|
-
return
|
|
3929
|
+
return Xt(e) == "symbol" ? e : e + "";
|
|
3930
3930
|
}
|
|
3931
3931
|
function za(t, e, r) {
|
|
3932
3932
|
return (e = Ga(e)) in t ? Object.defineProperty(t, e, {
|
|
@@ -3936,7 +3936,7 @@ function za(t, e, r) {
|
|
|
3936
3936
|
writable: !0
|
|
3937
3937
|
}) : t[e] = r, t;
|
|
3938
3938
|
}
|
|
3939
|
-
function
|
|
3939
|
+
function vs(t, e) {
|
|
3940
3940
|
var r = Object.keys(t);
|
|
3941
3941
|
if (Object.getOwnPropertySymbols) {
|
|
3942
3942
|
var s = Object.getOwnPropertySymbols(t);
|
|
@@ -3949,15 +3949,15 @@ function ys(t, e) {
|
|
|
3949
3949
|
function C(t) {
|
|
3950
3950
|
for (var e = 1; e < arguments.length; e++) {
|
|
3951
3951
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
3952
|
-
e % 2 ?
|
|
3952
|
+
e % 2 ? vs(Object(r), !0).forEach(function(s) {
|
|
3953
3953
|
za(t, s, r[s]);
|
|
3954
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
3954
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : vs(Object(r)).forEach(function(s) {
|
|
3955
3955
|
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(r, s));
|
|
3956
3956
|
});
|
|
3957
3957
|
}
|
|
3958
3958
|
return t;
|
|
3959
3959
|
}
|
|
3960
|
-
const
|
|
3960
|
+
const bs = (t) => {
|
|
3961
3961
|
var e;
|
|
3962
3962
|
return t.msg || t.message || t.error_description || (typeof t.error == "string" ? t.error : (e = t.error) === null || e === void 0 ? void 0 : e.message) || JSON.stringify(t);
|
|
3963
3963
|
}, Va = async (t, e, r, s) => {
|
|
@@ -3965,21 +3965,21 @@ const vs = (t) => {
|
|
|
3965
3965
|
const n = t, a = n.status || 500;
|
|
3966
3966
|
if (typeof n.json == "function") n.json().then((i) => {
|
|
3967
3967
|
const o = i?.statusCode || i?.code || a + "";
|
|
3968
|
-
e(new
|
|
3968
|
+
e(new dr(bs(i), a, o, s));
|
|
3969
3969
|
}).catch(() => {
|
|
3970
3970
|
if (s === "vectors") {
|
|
3971
3971
|
const i = a + "";
|
|
3972
|
-
e(new
|
|
3972
|
+
e(new dr(n.statusText || `HTTP ${a} error`, a, i, s));
|
|
3973
3973
|
} else {
|
|
3974
3974
|
const i = a + "";
|
|
3975
|
-
e(new
|
|
3975
|
+
e(new dr(n.statusText || `HTTP ${a} error`, a, i, s));
|
|
3976
3976
|
}
|
|
3977
3977
|
});
|
|
3978
3978
|
else {
|
|
3979
3979
|
const i = a + "";
|
|
3980
|
-
e(new
|
|
3980
|
+
e(new dr(n.statusText || `HTTP ${a} error`, a, i, s));
|
|
3981
3981
|
}
|
|
3982
|
-
} else e(new pn(
|
|
3982
|
+
} else e(new pn(bs(t), t, s));
|
|
3983
3983
|
}, Ja = (t, e, r, s) => {
|
|
3984
3984
|
const n = {
|
|
3985
3985
|
method: t,
|
|
@@ -4010,7 +4010,7 @@ function gn(t = "storage") {
|
|
|
4010
4010
|
remove: async (e, r, s, n, a) => qt(e, "DELETE", r, n, a, s, t)
|
|
4011
4011
|
};
|
|
4012
4012
|
}
|
|
4013
|
-
const Ya = gn("storage"), { get:
|
|
4013
|
+
const Ya = gn("storage"), { get: Zt, post: Fe, put: qr, head: Qa, remove: Xr } = Ya, Oe = gn("vectors");
|
|
4014
4014
|
var Dt = class {
|
|
4015
4015
|
/**
|
|
4016
4016
|
* Creates a new BaseApiClient instance
|
|
@@ -4076,7 +4076,7 @@ var Dt = class {
|
|
|
4076
4076
|
};
|
|
4077
4077
|
} catch (r) {
|
|
4078
4078
|
if (e.shouldThrowOnError) throw r;
|
|
4079
|
-
if (
|
|
4079
|
+
if (Tr(r)) return {
|
|
4080
4080
|
data: null,
|
|
4081
4081
|
error: r
|
|
4082
4082
|
};
|
|
@@ -4099,7 +4099,7 @@ var Dt = class {
|
|
|
4099
4099
|
};
|
|
4100
4100
|
} catch (e) {
|
|
4101
4101
|
if (t.shouldThrowOnError) throw e;
|
|
4102
|
-
if (
|
|
4102
|
+
if (Tr(e)) return {
|
|
4103
4103
|
data: null,
|
|
4104
4104
|
error: e
|
|
4105
4105
|
};
|
|
@@ -4137,7 +4137,7 @@ var Za = class {
|
|
|
4137
4137
|
};
|
|
4138
4138
|
} catch (e) {
|
|
4139
4139
|
if (t.shouldThrowOnError) throw e;
|
|
4140
|
-
if (
|
|
4140
|
+
if (Tr(e)) return {
|
|
4141
4141
|
data: null,
|
|
4142
4142
|
error: e
|
|
4143
4143
|
};
|
|
@@ -4152,7 +4152,7 @@ const ei = {
|
|
|
4152
4152
|
column: "name",
|
|
4153
4153
|
order: "asc"
|
|
4154
4154
|
}
|
|
4155
|
-
},
|
|
4155
|
+
}, ws = {
|
|
4156
4156
|
cacheControl: "3600",
|
|
4157
4157
|
contentType: "text/plain;charset=UTF-8",
|
|
4158
4158
|
upsert: !1
|
|
@@ -4172,11 +4172,11 @@ var ti = class extends Dt {
|
|
|
4172
4172
|
var n = this;
|
|
4173
4173
|
return n.handleOperation(async () => {
|
|
4174
4174
|
let a;
|
|
4175
|
-
const i = C(C({},
|
|
4175
|
+
const i = C(C({}, ws), s);
|
|
4176
4176
|
let o = C(C({}, n.headers), t === "POST" && { "x-upsert": String(i.upsert) });
|
|
4177
4177
|
const c = i.metadata;
|
|
4178
4178
|
typeof Blob < "u" && r instanceof Blob ? (a = new FormData(), a.append("cacheControl", i.cacheControl), c && a.append("metadata", n.encodeMetadata(c)), a.append("", r)) : typeof FormData < "u" && r instanceof FormData ? (a = r, a.has("cacheControl") || a.append("cacheControl", i.cacheControl), c && !a.has("metadata") && a.append("metadata", n.encodeMetadata(c))) : (a = r, o["cache-control"] = `max-age=${i.cacheControl}`, o["content-type"] = i.contentType, c && (o["x-metadata"] = n.toBase64(n.encodeMetadata(c))), (typeof ReadableStream < "u" && a instanceof ReadableStream || a && typeof a == "object" && "pipe" in a && typeof a.pipe == "function") && !i.duplex && (i.duplex = "half")), s?.headers && (o = C(C({}, o), s.headers));
|
|
4179
|
-
const u = n._removeEmptyFolders(e), d = n._getFinalPath(u), f = await (t == "PUT" ?
|
|
4179
|
+
const u = n._removeEmptyFolders(e), d = n._getFinalPath(u), f = await (t == "PUT" ? qr : Fe)(n.fetch, `${n.url}/object/${d}`, a, C({ headers: o }, i?.duplex ? { duplex: i.duplex } : {}));
|
|
4180
4180
|
return {
|
|
4181
4181
|
path: u,
|
|
4182
4182
|
id: f.Id,
|
|
@@ -4267,10 +4267,10 @@ var ti = class extends Dt {
|
|
|
4267
4267
|
const a = n._removeEmptyFolders(t), i = n._getFinalPath(a), o = new URL(n.url + `/object/upload/sign/${i}`);
|
|
4268
4268
|
return o.searchParams.set("token", e), n.handleOperation(async () => {
|
|
4269
4269
|
let c;
|
|
4270
|
-
const u = C({ upsert:
|
|
4270
|
+
const u = C({ upsert: ws.upsert }, s), d = C(C({}, n.headers), { "x-upsert": String(u.upsert) });
|
|
4271
4271
|
return typeof Blob < "u" && r instanceof Blob ? (c = new FormData(), c.append("cacheControl", u.cacheControl), c.append("", r)) : typeof FormData < "u" && r instanceof FormData ? (c = r, c.append("cacheControl", u.cacheControl)) : (c = r, d["cache-control"] = `max-age=${u.cacheControl}`, d["content-type"] = u.contentType), {
|
|
4272
4272
|
path: a,
|
|
4273
|
-
fullPath: (await
|
|
4273
|
+
fullPath: (await qr(n.fetch, o.toString(), c, { headers: d })).Key
|
|
4274
4274
|
};
|
|
4275
4275
|
});
|
|
4276
4276
|
}
|
|
@@ -4311,7 +4311,7 @@ var ti = class extends Dt {
|
|
|
4311
4311
|
const n = C({}, r.headers);
|
|
4312
4312
|
e?.upsert && (n["x-upsert"] = "true");
|
|
4313
4313
|
const a = await Fe(r.fetch, `${r.url}/object/upload/sign/${s}`, {}, { headers: n }), i = new URL(r.url + a.url), o = i.searchParams.get("token");
|
|
4314
|
-
if (!o) throw new
|
|
4314
|
+
if (!o) throw new jr("No token returned by API");
|
|
4315
4315
|
return {
|
|
4316
4316
|
signedUrl: i.toString(),
|
|
4317
4317
|
path: t,
|
|
@@ -4604,7 +4604,7 @@ var ti = class extends Dt {
|
|
|
4604
4604
|
* ```
|
|
4605
4605
|
*/
|
|
4606
4606
|
download(t, e, r) {
|
|
4607
|
-
const s = typeof e?.transform < "u" ? "render/image/authenticated" : "object", n = this.transformOptsToQueryString(e?.transform || {}), a = n ? `?${n}` : "", i = this._getFinalPath(t), o = () =>
|
|
4607
|
+
const s = typeof e?.transform < "u" ? "render/image/authenticated" : "object", n = this.transformOptsToQueryString(e?.transform || {}), a = n ? `?${n}` : "", i = this._getFinalPath(t), o = () => Zt(this.fetch, `${this.url}/${s}/${i}${a}`, {
|
|
4608
4608
|
headers: this.headers,
|
|
4609
4609
|
noResolveJson: !0
|
|
4610
4610
|
}, r);
|
|
@@ -4628,7 +4628,7 @@ var ti = class extends Dt {
|
|
|
4628
4628
|
async info(t) {
|
|
4629
4629
|
var e = this;
|
|
4630
4630
|
const r = e._getFinalPath(t);
|
|
4631
|
-
return e.handleOperation(async () =>
|
|
4631
|
+
return e.handleOperation(async () => Kr(await Zt(e.fetch, `${e.url}/object/info/${r}`, { headers: e.headers })));
|
|
4632
4632
|
}
|
|
4633
4633
|
/**
|
|
4634
4634
|
* Checks the existence of a file.
|
|
@@ -4655,7 +4655,7 @@ var ti = class extends Dt {
|
|
|
4655
4655
|
};
|
|
4656
4656
|
} catch (s) {
|
|
4657
4657
|
if (e.shouldThrowOnError) throw s;
|
|
4658
|
-
if (
|
|
4658
|
+
if (Tr(s) && s instanceof pn) {
|
|
4659
4659
|
const n = s.originalError;
|
|
4660
4660
|
if ([400, 404].includes(n?.status)) return {
|
|
4661
4661
|
data: !1,
|
|
@@ -4748,7 +4748,7 @@ var ti = class extends Dt {
|
|
|
4748
4748
|
*/
|
|
4749
4749
|
async remove(t) {
|
|
4750
4750
|
var e = this;
|
|
4751
|
-
return e.handleOperation(async () => await
|
|
4751
|
+
return e.handleOperation(async () => await Xr(e.fetch, `${e.url}/object/${e.bucketId}`, { prefixes: t }, { headers: e.headers }));
|
|
4752
4752
|
}
|
|
4753
4753
|
/**
|
|
4754
4754
|
* Get file metadata
|
|
@@ -4856,12 +4856,12 @@ var ti = class extends Dt {
|
|
|
4856
4856
|
return t.width && e.push(`width=${t.width}`), t.height && e.push(`height=${t.height}`), t.resize && e.push(`resize=${t.resize}`), t.format && e.push(`format=${t.format}`), t.quality && e.push(`quality=${t.quality}`), e.join("&");
|
|
4857
4857
|
}
|
|
4858
4858
|
};
|
|
4859
|
-
const ri = "2.98.0",
|
|
4859
|
+
const ri = "2.98.0", sr = { "X-Client-Info": `storage-js/${ri}` };
|
|
4860
4860
|
var si = class extends Dt {
|
|
4861
4861
|
constructor(t, e = {}, r, s) {
|
|
4862
4862
|
const n = new URL(t);
|
|
4863
4863
|
s?.useNewHostname && /supabase\.(co|in|red)$/.test(n.hostname) && !n.hostname.includes("storage.supabase.") && (n.hostname = n.hostname.replace("supabase.", "storage.supabase."));
|
|
4864
|
-
const a = n.href.replace(/\/$/, ""), i = C(C({},
|
|
4864
|
+
const a = n.href.replace(/\/$/, ""), i = C(C({}, sr), e);
|
|
4865
4865
|
super(a, i, r, "storage");
|
|
4866
4866
|
}
|
|
4867
4867
|
/**
|
|
@@ -4900,7 +4900,7 @@ var si = class extends Dt {
|
|
|
4900
4900
|
var e = this;
|
|
4901
4901
|
return e.handleOperation(async () => {
|
|
4902
4902
|
const r = e.listBucketOptionsToQueryString(t);
|
|
4903
|
-
return await
|
|
4903
|
+
return await Zt(e.fetch, `${e.url}/bucket${r}`, { headers: e.headers });
|
|
4904
4904
|
});
|
|
4905
4905
|
}
|
|
4906
4906
|
/**
|
|
@@ -4938,7 +4938,7 @@ var si = class extends Dt {
|
|
|
4938
4938
|
*/
|
|
4939
4939
|
async getBucket(t) {
|
|
4940
4940
|
var e = this;
|
|
4941
|
-
return e.handleOperation(async () => await
|
|
4941
|
+
return e.handleOperation(async () => await Zt(e.fetch, `${e.url}/bucket/${t}`, { headers: e.headers }));
|
|
4942
4942
|
}
|
|
4943
4943
|
/**
|
|
4944
4944
|
* Creates a new Storage bucket
|
|
@@ -5025,7 +5025,7 @@ var si = class extends Dt {
|
|
|
5025
5025
|
*/
|
|
5026
5026
|
async updateBucket(t, e) {
|
|
5027
5027
|
var r = this;
|
|
5028
|
-
return r.handleOperation(async () => await
|
|
5028
|
+
return r.handleOperation(async () => await qr(r.fetch, `${r.url}/bucket/${t}`, {
|
|
5029
5029
|
id: t,
|
|
5030
5030
|
name: t,
|
|
5031
5031
|
public: e.public,
|
|
@@ -5088,7 +5088,7 @@ var si = class extends Dt {
|
|
|
5088
5088
|
*/
|
|
5089
5089
|
async deleteBucket(t) {
|
|
5090
5090
|
var e = this;
|
|
5091
|
-
return e.handleOperation(async () => await
|
|
5091
|
+
return e.handleOperation(async () => await Xr(e.fetch, `${e.url}/bucket/${t}`, {}, { headers: e.headers }));
|
|
5092
5092
|
}
|
|
5093
5093
|
listBucketOptionsToQueryString(t) {
|
|
5094
5094
|
const e = {};
|
|
@@ -5113,7 +5113,7 @@ var si = class extends Dt {
|
|
|
5113
5113
|
* ```
|
|
5114
5114
|
*/
|
|
5115
5115
|
constructor(t, e = {}, r) {
|
|
5116
|
-
const s = t.replace(/\/$/, ""), n = C(C({},
|
|
5116
|
+
const s = t.replace(/\/$/, ""), n = C(C({}, sr), e);
|
|
5117
5117
|
super(s, n, r, "storage");
|
|
5118
5118
|
}
|
|
5119
5119
|
/**
|
|
@@ -5206,7 +5206,7 @@ var si = class extends Dt {
|
|
|
5206
5206
|
const r = new URLSearchParams();
|
|
5207
5207
|
t?.limit !== void 0 && r.set("limit", t.limit.toString()), t?.offset !== void 0 && r.set("offset", t.offset.toString()), t?.sortColumn && r.set("sortColumn", t.sortColumn), t?.sortOrder && r.set("sortOrder", t.sortOrder), t?.search && r.set("search", t.search);
|
|
5208
5208
|
const s = r.toString(), n = s ? `${e.url}/bucket?${s}` : `${e.url}/bucket`;
|
|
5209
|
-
return await
|
|
5209
|
+
return await Zt(e.fetch, n, { headers: e.headers });
|
|
5210
5210
|
});
|
|
5211
5211
|
}
|
|
5212
5212
|
/**
|
|
@@ -5242,7 +5242,7 @@ var si = class extends Dt {
|
|
|
5242
5242
|
*/
|
|
5243
5243
|
async deleteBucket(t) {
|
|
5244
5244
|
var e = this;
|
|
5245
|
-
return e.handleOperation(async () => await
|
|
5245
|
+
return e.handleOperation(async () => await Xr(e.fetch, `${e.url}/bucket/${t}`, {}, { headers: e.headers }));
|
|
5246
5246
|
}
|
|
5247
5247
|
/**
|
|
5248
5248
|
* @alpha
|
|
@@ -5369,7 +5369,7 @@ var si = class extends Dt {
|
|
|
5369
5369
|
*/
|
|
5370
5370
|
from(t) {
|
|
5371
5371
|
var e = this;
|
|
5372
|
-
if (!Wa(t)) throw new
|
|
5372
|
+
if (!Wa(t)) throw new jr("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");
|
|
5373
5373
|
const r = new Fa({
|
|
5374
5374
|
baseUrl: this.url,
|
|
5375
5375
|
catalogName: t,
|
|
@@ -5400,7 +5400,7 @@ var si = class extends Dt {
|
|
|
5400
5400
|
}, ai = class extends Dt {
|
|
5401
5401
|
/** Creates a new VectorIndexApi instance */
|
|
5402
5402
|
constructor(t, e = {}, r) {
|
|
5403
|
-
const s = t.replace(/\/$/, ""), n = C(C({},
|
|
5403
|
+
const s = t.replace(/\/$/, ""), n = C(C({}, sr), {}, { "Content-Type": "application/json" }, e);
|
|
5404
5404
|
super(s, n, r, "vectors");
|
|
5405
5405
|
}
|
|
5406
5406
|
/** Creates a new vector index within a bucket */
|
|
@@ -5432,7 +5432,7 @@ var si = class extends Dt {
|
|
|
5432
5432
|
}, ii = class extends Dt {
|
|
5433
5433
|
/** Creates a new VectorDataApi instance */
|
|
5434
5434
|
constructor(t, e = {}, r) {
|
|
5435
|
-
const s = t.replace(/\/$/, ""), n = C(C({},
|
|
5435
|
+
const s = t.replace(/\/$/, ""), n = C(C({}, sr), {}, { "Content-Type": "application/json" }, e);
|
|
5436
5436
|
super(s, n, r, "vectors");
|
|
5437
5437
|
}
|
|
5438
5438
|
/** Inserts or updates vectors in batch (1-500 per request) */
|
|
@@ -5470,7 +5470,7 @@ var si = class extends Dt {
|
|
|
5470
5470
|
}, oi = class extends Dt {
|
|
5471
5471
|
/** Creates a new VectorBucketApi instance */
|
|
5472
5472
|
constructor(t, e = {}, r) {
|
|
5473
|
-
const s = t.replace(/\/$/, ""), n = C(C({},
|
|
5473
|
+
const s = t.replace(/\/$/, ""), n = C(C({}, sr), {}, { "Content-Type": "application/json" }, e);
|
|
5474
5474
|
super(s, n, r, "vectors");
|
|
5475
5475
|
}
|
|
5476
5476
|
/** Creates a new vector bucket */
|
|
@@ -6025,34 +6025,34 @@ var si = class extends Dt {
|
|
|
6025
6025
|
return new ni(this.url + "/iceberg", this.headers, this.fetch);
|
|
6026
6026
|
}
|
|
6027
6027
|
};
|
|
6028
|
-
const vn = "2.98.0", Ct = 30 * 1e3,
|
|
6028
|
+
const vn = "2.98.0", Ct = 30 * 1e3, Wr = 3, Nr = Wr * Ct, hi = "http://localhost:9999", fi = "supabase.auth.token", mi = { "X-Client-Info": `gotrue-js/${vn}` }, Hr = "X-Supabase-Api-Version", bn = {
|
|
6029
6029
|
"2024-01-01": {
|
|
6030
6030
|
timestamp: Date.parse("2024-01-01T00:00:00.0Z"),
|
|
6031
6031
|
name: "2024-01-01"
|
|
6032
6032
|
}
|
|
6033
6033
|
}, pi = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i, gi = 600 * 1e3;
|
|
6034
|
-
class
|
|
6034
|
+
class er extends Error {
|
|
6035
6035
|
constructor(e, r, s) {
|
|
6036
6036
|
super(e), this.__isAuthError = !0, this.name = "AuthError", this.status = r, this.code = s;
|
|
6037
6037
|
}
|
|
6038
6038
|
}
|
|
6039
|
-
function
|
|
6039
|
+
function R(t) {
|
|
6040
6040
|
return typeof t == "object" && t !== null && "__isAuthError" in t;
|
|
6041
6041
|
}
|
|
6042
|
-
class yi extends
|
|
6042
|
+
class yi extends er {
|
|
6043
6043
|
constructor(e, r, s) {
|
|
6044
6044
|
super(e, r, s), this.name = "AuthApiError", this.status = r, this.code = s;
|
|
6045
6045
|
}
|
|
6046
6046
|
}
|
|
6047
6047
|
function vi(t) {
|
|
6048
|
-
return
|
|
6048
|
+
return R(t) && t.name === "AuthApiError";
|
|
6049
6049
|
}
|
|
6050
|
-
class mt extends
|
|
6050
|
+
class mt extends er {
|
|
6051
6051
|
constructor(e, r) {
|
|
6052
6052
|
super(e), this.name = "AuthUnknownError", this.originalError = r;
|
|
6053
6053
|
}
|
|
6054
6054
|
}
|
|
6055
|
-
class Ze extends
|
|
6055
|
+
class Ze extends er {
|
|
6056
6056
|
constructor(e, r, s, n) {
|
|
6057
6057
|
super(e, s, n), this.name = r, this.status = s;
|
|
6058
6058
|
}
|
|
@@ -6062,20 +6062,20 @@ class Ce extends Ze {
|
|
|
6062
6062
|
super("Auth session missing!", "AuthSessionMissingError", 400, void 0);
|
|
6063
6063
|
}
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6066
|
-
return
|
|
6065
|
+
function Ir(t) {
|
|
6066
|
+
return R(t) && t.name === "AuthSessionMissingError";
|
|
6067
6067
|
}
|
|
6068
6068
|
class xt extends Ze {
|
|
6069
6069
|
constructor() {
|
|
6070
6070
|
super("Auth session or user missing", "AuthInvalidTokenResponseError", 500, void 0);
|
|
6071
6071
|
}
|
|
6072
6072
|
}
|
|
6073
|
-
class
|
|
6073
|
+
class hr extends Ze {
|
|
6074
6074
|
constructor(e) {
|
|
6075
6075
|
super(e, "AuthInvalidCredentialsError", 400, void 0);
|
|
6076
6076
|
}
|
|
6077
6077
|
}
|
|
6078
|
-
class
|
|
6078
|
+
class fr extends Ze {
|
|
6079
6079
|
constructor(e, r = null) {
|
|
6080
6080
|
super(e, "AuthImplicitGrantRedirectError", 500, void 0), this.details = null, this.details = r;
|
|
6081
6081
|
}
|
|
@@ -6089,9 +6089,9 @@ class hr extends Ze {
|
|
|
6089
6089
|
}
|
|
6090
6090
|
}
|
|
6091
6091
|
function bi(t) {
|
|
6092
|
-
return
|
|
6092
|
+
return R(t) && t.name === "AuthImplicitGrantRedirectError";
|
|
6093
6093
|
}
|
|
6094
|
-
class
|
|
6094
|
+
class _s extends Ze {
|
|
6095
6095
|
constructor(e, r = null) {
|
|
6096
6096
|
super(e, "AuthPKCEGrantCodeExchangeError", 500, void 0), this.details = null, this.details = r;
|
|
6097
6097
|
}
|
|
@@ -6109,45 +6109,45 @@ class wi extends Ze {
|
|
|
6109
6109
|
super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.", "AuthPKCECodeVerifierMissingError", 400, "pkce_code_verifier_not_found");
|
|
6110
6110
|
}
|
|
6111
6111
|
}
|
|
6112
|
-
class
|
|
6112
|
+
class Gr extends Ze {
|
|
6113
6113
|
constructor(e, r) {
|
|
6114
6114
|
super(e, "AuthRetryableFetchError", r, void 0);
|
|
6115
6115
|
}
|
|
6116
6116
|
}
|
|
6117
|
-
function
|
|
6118
|
-
return
|
|
6117
|
+
function Dr(t) {
|
|
6118
|
+
return R(t) && t.name === "AuthRetryableFetchError";
|
|
6119
6119
|
}
|
|
6120
|
-
class
|
|
6120
|
+
class ks extends Ze {
|
|
6121
6121
|
constructor(e, r, s) {
|
|
6122
6122
|
super(e, "AuthWeakPasswordError", r, "weak_password"), this.reasons = s;
|
|
6123
6123
|
}
|
|
6124
6124
|
}
|
|
6125
|
-
class
|
|
6125
|
+
class zr extends Ze {
|
|
6126
6126
|
constructor(e) {
|
|
6127
6127
|
super(e, "AuthInvalidJwtError", 400, "invalid_jwt");
|
|
6128
6128
|
}
|
|
6129
6129
|
}
|
|
6130
|
-
const
|
|
6130
|
+
const _r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""), Ss = `
|
|
6131
6131
|
\r=`.split(""), _i = (() => {
|
|
6132
6132
|
const t = new Array(128);
|
|
6133
6133
|
for (let e = 0; e < t.length; e += 1)
|
|
6134
6134
|
t[e] = -1;
|
|
6135
|
-
for (let e = 0; e <
|
|
6136
|
-
t[
|
|
6137
|
-
for (let e = 0; e <
|
|
6138
|
-
t[
|
|
6135
|
+
for (let e = 0; e < Ss.length; e += 1)
|
|
6136
|
+
t[Ss[e].charCodeAt(0)] = -2;
|
|
6137
|
+
for (let e = 0; e < _r.length; e += 1)
|
|
6138
|
+
t[_r[e].charCodeAt(0)] = e;
|
|
6139
6139
|
return t;
|
|
6140
6140
|
})();
|
|
6141
|
-
function
|
|
6141
|
+
function xs(t, e, r) {
|
|
6142
6142
|
if (t !== null)
|
|
6143
6143
|
for (e.queue = e.queue << 8 | t, e.queuedBits += 8; e.queuedBits >= 6; ) {
|
|
6144
6144
|
const s = e.queue >> e.queuedBits - 6 & 63;
|
|
6145
|
-
r(
|
|
6145
|
+
r(_r[s]), e.queuedBits -= 6;
|
|
6146
6146
|
}
|
|
6147
6147
|
else if (e.queuedBits > 0)
|
|
6148
6148
|
for (e.queue = e.queue << 6 - e.queuedBits, e.queuedBits = 6; e.queuedBits >= 6; ) {
|
|
6149
6149
|
const s = e.queue >> e.queuedBits - 6 & 63;
|
|
6150
|
-
r(
|
|
6150
|
+
r(_r[s]), e.queuedBits -= 6;
|
|
6151
6151
|
}
|
|
6152
6152
|
}
|
|
6153
6153
|
function wn(t, e, r) {
|
|
@@ -6161,7 +6161,7 @@ function wn(t, e, r) {
|
|
|
6161
6161
|
throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`);
|
|
6162
6162
|
}
|
|
6163
6163
|
}
|
|
6164
|
-
function
|
|
6164
|
+
function js(t) {
|
|
6165
6165
|
const e = [], r = (i) => {
|
|
6166
6166
|
e.push(String.fromCodePoint(i));
|
|
6167
6167
|
}, s = {
|
|
@@ -6242,7 +6242,7 @@ function vt(t) {
|
|
|
6242
6242
|
const e = [], r = { queue: 0, queuedBits: 0 }, s = (n) => {
|
|
6243
6243
|
e.push(n);
|
|
6244
6244
|
};
|
|
6245
|
-
return t.forEach((n) =>
|
|
6245
|
+
return t.forEach((n) => xs(n, r, s)), xs(null, r, s), e.join("");
|
|
6246
6246
|
}
|
|
6247
6247
|
function Ti(t) {
|
|
6248
6248
|
return Math.round(Date.now() / 1e3) + t;
|
|
@@ -6299,25 +6299,25 @@ const kn = (t) => t ? (...e) => t(...e) : (...e) => fetch(...e), Ai = (t) => typ
|
|
|
6299
6299
|
}, ge = async (t, e) => {
|
|
6300
6300
|
await t.removeItem(e);
|
|
6301
6301
|
};
|
|
6302
|
-
class
|
|
6302
|
+
class Pr {
|
|
6303
6303
|
constructor() {
|
|
6304
|
-
this.promise = new
|
|
6304
|
+
this.promise = new Pr.promiseConstructor((e, r) => {
|
|
6305
6305
|
this.resolve = e, this.reject = r;
|
|
6306
6306
|
});
|
|
6307
6307
|
}
|
|
6308
6308
|
}
|
|
6309
|
-
|
|
6310
|
-
function
|
|
6309
|
+
Pr.promiseConstructor = Promise;
|
|
6310
|
+
function mr(t) {
|
|
6311
6311
|
const e = t.split(".");
|
|
6312
6312
|
if (e.length !== 3)
|
|
6313
|
-
throw new
|
|
6313
|
+
throw new zr("Invalid JWT structure");
|
|
6314
6314
|
for (let s = 0; s < e.length; s++)
|
|
6315
6315
|
if (!pi.test(e[s]))
|
|
6316
|
-
throw new
|
|
6316
|
+
throw new zr("JWT not in base64url format");
|
|
6317
6317
|
return {
|
|
6318
6318
|
// using base64url lib
|
|
6319
|
-
header: JSON.parse(
|
|
6320
|
-
payload: JSON.parse(
|
|
6319
|
+
header: JSON.parse(js(e[0])),
|
|
6320
|
+
payload: JSON.parse(js(e[1])),
|
|
6321
6321
|
signature: It(e[2]),
|
|
6322
6322
|
raw: {
|
|
6323
6323
|
header: e[0],
|
|
@@ -6382,7 +6382,7 @@ async function jt(t, e, r = !1) {
|
|
|
6382
6382
|
}
|
|
6383
6383
|
const $i = /^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;
|
|
6384
6384
|
function Li(t) {
|
|
6385
|
-
const e = t.headers.get(
|
|
6385
|
+
const e = t.headers.get(Hr);
|
|
6386
6386
|
if (!e || !e.match($i))
|
|
6387
6387
|
return null;
|
|
6388
6388
|
try {
|
|
@@ -6420,7 +6420,7 @@ function Tt(t) {
|
|
|
6420
6420
|
if (!Bi.test(t))
|
|
6421
6421
|
throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not");
|
|
6422
6422
|
}
|
|
6423
|
-
function
|
|
6423
|
+
function $r() {
|
|
6424
6424
|
const t = {};
|
|
6425
6425
|
return new Proxy(t, {
|
|
6426
6426
|
get: (e, r) => {
|
|
@@ -6455,16 +6455,16 @@ function Fi(t, e) {
|
|
|
6455
6455
|
}
|
|
6456
6456
|
});
|
|
6457
6457
|
}
|
|
6458
|
-
function
|
|
6458
|
+
function Ts(t) {
|
|
6459
6459
|
return JSON.parse(JSON.stringify(t));
|
|
6460
6460
|
}
|
|
6461
6461
|
const ht = (t) => t.msg || t.message || t.error_description || t.error || JSON.stringify(t), Ki = [502, 503, 504];
|
|
6462
|
-
async function
|
|
6462
|
+
async function Ps(t) {
|
|
6463
6463
|
var e;
|
|
6464
6464
|
if (!Ai(t))
|
|
6465
|
-
throw new
|
|
6465
|
+
throw new Gr(ht(t), 0);
|
|
6466
6466
|
if (Ki.includes(t.status))
|
|
6467
|
-
throw new
|
|
6467
|
+
throw new Gr(ht(t), t.status);
|
|
6468
6468
|
let r;
|
|
6469
6469
|
try {
|
|
6470
6470
|
r = await t.json();
|
|
@@ -6475,11 +6475,11 @@ async function Ts(t) {
|
|
|
6475
6475
|
const n = Li(t);
|
|
6476
6476
|
if (n && n.getTime() >= bn["2024-01-01"].timestamp && typeof r == "object" && r && typeof r.code == "string" ? s = r.code : typeof r == "object" && r && typeof r.error_code == "string" && (s = r.error_code), s) {
|
|
6477
6477
|
if (s === "weak_password")
|
|
6478
|
-
throw new
|
|
6478
|
+
throw new ks(ht(r), t.status, ((e = r.weak_password) === null || e === void 0 ? void 0 : e.reasons) || []);
|
|
6479
6479
|
if (s === "session_not_found")
|
|
6480
6480
|
throw new Ce();
|
|
6481
6481
|
} else if (typeof r == "object" && r && typeof r.weak_password == "object" && r.weak_password && Array.isArray(r.weak_password.reasons) && r.weak_password.reasons.length && r.weak_password.reasons.reduce((a, i) => a && typeof i == "string", !0))
|
|
6482
|
-
throw new
|
|
6482
|
+
throw new ks(ht(r), t.status, r.weak_password.reasons);
|
|
6483
6483
|
throw new yi(ht(r), t.status || 500, s);
|
|
6484
6484
|
}
|
|
6485
6485
|
const qi = (t, e, r, s) => {
|
|
@@ -6489,7 +6489,7 @@ const qi = (t, e, r, s) => {
|
|
|
6489
6489
|
async function O(t, e, r, s) {
|
|
6490
6490
|
var n;
|
|
6491
6491
|
const a = Object.assign({}, s?.headers);
|
|
6492
|
-
a[
|
|
6492
|
+
a[Hr] || (a[Hr] = bn["2024-01-01"].name), s?.jwt && (a.Authorization = `Bearer ${s.jwt}`);
|
|
6493
6493
|
const i = (n = s?.query) !== null && n !== void 0 ? n : {};
|
|
6494
6494
|
s?.redirectTo && (i.redirect_to = s.redirectTo);
|
|
6495
6495
|
const o = Object.keys(i).length ? "?" + new URLSearchParams(i).toString() : "", c = await Wi(t, e, r + o, {
|
|
@@ -6504,14 +6504,14 @@ async function Wi(t, e, r, s, n, a) {
|
|
|
6504
6504
|
try {
|
|
6505
6505
|
o = await t(r, Object.assign({}, i));
|
|
6506
6506
|
} catch (c) {
|
|
6507
|
-
throw console.error(c), new
|
|
6507
|
+
throw console.error(c), new Gr(ht(c), 0);
|
|
6508
6508
|
}
|
|
6509
|
-
if (o.ok || await
|
|
6509
|
+
if (o.ok || await Ps(o), s?.noResolveJson)
|
|
6510
6510
|
return o;
|
|
6511
6511
|
try {
|
|
6512
6512
|
return await o.json();
|
|
6513
6513
|
} catch (c) {
|
|
6514
|
-
await
|
|
6514
|
+
await Ps(c);
|
|
6515
6515
|
}
|
|
6516
6516
|
}
|
|
6517
6517
|
function Be(t) {
|
|
@@ -6521,7 +6521,7 @@ function Be(t) {
|
|
|
6521
6521
|
const s = (e = t.user) !== null && e !== void 0 ? e : t;
|
|
6522
6522
|
return { data: { session: r, user: s }, error: null };
|
|
6523
6523
|
}
|
|
6524
|
-
function
|
|
6524
|
+
function Es(t) {
|
|
6525
6525
|
const e = Be(t);
|
|
6526
6526
|
return !e.error && t.weak_password && typeof t.weak_password == "object" && Array.isArray(t.weak_password.reasons) && t.weak_password.reasons.length && t.weak_password.message && typeof t.weak_password.message == "string" && t.weak_password.reasons.reduce((r, s) => r && typeof s == "string", !0) && (e.data.weak_password = t.weak_password), e;
|
|
6527
6527
|
}
|
|
@@ -6533,7 +6533,7 @@ function Hi(t) {
|
|
|
6533
6533
|
return { data: t, error: null };
|
|
6534
6534
|
}
|
|
6535
6535
|
function Gi(t) {
|
|
6536
|
-
const { action_link: e, email_otp: r, hashed_token: s, redirect_to: n, verification_type: a } = t, i =
|
|
6536
|
+
const { action_link: e, email_otp: r, hashed_token: s, redirect_to: n, verification_type: a } = t, i = xr(t, ["action_link", "email_otp", "hashed_token", "redirect_to", "verification_type"]), o = {
|
|
6537
6537
|
action_link: e,
|
|
6538
6538
|
email_otp: r,
|
|
6539
6539
|
hashed_token: s,
|
|
@@ -6548,13 +6548,13 @@ function Gi(t) {
|
|
|
6548
6548
|
error: null
|
|
6549
6549
|
};
|
|
6550
6550
|
}
|
|
6551
|
-
function
|
|
6551
|
+
function As(t) {
|
|
6552
6552
|
return t;
|
|
6553
6553
|
}
|
|
6554
6554
|
function zi(t) {
|
|
6555
6555
|
return t.access_token && t.refresh_token && t.expires_in;
|
|
6556
6556
|
}
|
|
6557
|
-
const
|
|
6557
|
+
const Lr = ["global", "local", "others"];
|
|
6558
6558
|
class Vi {
|
|
6559
6559
|
/**
|
|
6560
6560
|
* Creates an admin API client that can be used to manage users and OAuth clients.
|
|
@@ -6587,9 +6587,9 @@ class Vi {
|
|
|
6587
6587
|
* @param jwt A valid, logged-in JWT.
|
|
6588
6588
|
* @param scope The logout sope.
|
|
6589
6589
|
*/
|
|
6590
|
-
async signOut(e, r =
|
|
6591
|
-
if (
|
|
6592
|
-
throw new Error(`@supabase/auth-js: Parameter scope must be one of ${
|
|
6590
|
+
async signOut(e, r = Lr[0]) {
|
|
6591
|
+
if (Lr.indexOf(r) < 0)
|
|
6592
|
+
throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Lr.join(", ")}`);
|
|
6593
6593
|
try {
|
|
6594
6594
|
return await O(this.fetch, "POST", `${this.url}/logout?scope=${r}`, {
|
|
6595
6595
|
headers: this.headers,
|
|
@@ -6597,7 +6597,7 @@ class Vi {
|
|
|
6597
6597
|
noResolveJson: !0
|
|
6598
6598
|
}), { data: null, error: null };
|
|
6599
6599
|
} catch (s) {
|
|
6600
|
-
if (
|
|
6600
|
+
if (R(s))
|
|
6601
6601
|
return { data: null, error: s };
|
|
6602
6602
|
throw s;
|
|
6603
6603
|
}
|
|
@@ -6616,7 +6616,7 @@ class Vi {
|
|
|
6616
6616
|
xform: nt
|
|
6617
6617
|
});
|
|
6618
6618
|
} catch (s) {
|
|
6619
|
-
if (
|
|
6619
|
+
if (R(s))
|
|
6620
6620
|
return { data: { user: null }, error: s };
|
|
6621
6621
|
throw s;
|
|
6622
6622
|
}
|
|
@@ -6630,7 +6630,7 @@ class Vi {
|
|
|
6630
6630
|
*/
|
|
6631
6631
|
async generateLink(e) {
|
|
6632
6632
|
try {
|
|
6633
|
-
const { options: r } = e, s =
|
|
6633
|
+
const { options: r } = e, s = xr(e, ["options"]), n = Object.assign(Object.assign({}, s), r);
|
|
6634
6634
|
return "newEmail" in s && (n.new_email = s?.newEmail, delete n.newEmail), await O(this.fetch, "POST", `${this.url}/admin/generate_link`, {
|
|
6635
6635
|
body: n,
|
|
6636
6636
|
headers: this.headers,
|
|
@@ -6638,7 +6638,7 @@ class Vi {
|
|
|
6638
6638
|
redirectTo: r?.redirectTo
|
|
6639
6639
|
});
|
|
6640
6640
|
} catch (r) {
|
|
6641
|
-
if (
|
|
6641
|
+
if (R(r))
|
|
6642
6642
|
return {
|
|
6643
6643
|
data: {
|
|
6644
6644
|
properties: null,
|
|
@@ -6662,7 +6662,7 @@ class Vi {
|
|
|
6662
6662
|
xform: nt
|
|
6663
6663
|
});
|
|
6664
6664
|
} catch (r) {
|
|
6665
|
-
if (
|
|
6665
|
+
if (R(r))
|
|
6666
6666
|
return { data: { user: null }, error: r };
|
|
6667
6667
|
throw r;
|
|
6668
6668
|
}
|
|
@@ -6683,7 +6683,7 @@ class Vi {
|
|
|
6683
6683
|
page: (s = (r = e?.page) === null || r === void 0 ? void 0 : r.toString()) !== null && s !== void 0 ? s : "",
|
|
6684
6684
|
per_page: (a = (n = e?.perPage) === null || n === void 0 ? void 0 : n.toString()) !== null && a !== void 0 ? a : ""
|
|
6685
6685
|
},
|
|
6686
|
-
xform:
|
|
6686
|
+
xform: As
|
|
6687
6687
|
});
|
|
6688
6688
|
if (d.error)
|
|
6689
6689
|
throw d.error;
|
|
@@ -6693,7 +6693,7 @@ class Vi {
|
|
|
6693
6693
|
u[`${w}Page`] = y;
|
|
6694
6694
|
}), u.total = parseInt(m)), { data: Object.assign(Object.assign({}, f), u), error: null };
|
|
6695
6695
|
} catch (u) {
|
|
6696
|
-
if (
|
|
6696
|
+
if (R(u))
|
|
6697
6697
|
return { data: { users: [] }, error: u };
|
|
6698
6698
|
throw u;
|
|
6699
6699
|
}
|
|
@@ -6713,7 +6713,7 @@ class Vi {
|
|
|
6713
6713
|
xform: nt
|
|
6714
6714
|
});
|
|
6715
6715
|
} catch (r) {
|
|
6716
|
-
if (
|
|
6716
|
+
if (R(r))
|
|
6717
6717
|
return { data: { user: null }, error: r };
|
|
6718
6718
|
throw r;
|
|
6719
6719
|
}
|
|
@@ -6759,7 +6759,7 @@ class Vi {
|
|
|
6759
6759
|
xform: nt
|
|
6760
6760
|
});
|
|
6761
6761
|
} catch (s) {
|
|
6762
|
-
if (
|
|
6762
|
+
if (R(s))
|
|
6763
6763
|
return { data: { user: null }, error: s };
|
|
6764
6764
|
throw s;
|
|
6765
6765
|
}
|
|
@@ -6784,7 +6784,7 @@ class Vi {
|
|
|
6784
6784
|
xform: nt
|
|
6785
6785
|
});
|
|
6786
6786
|
} catch (s) {
|
|
6787
|
-
if (
|
|
6787
|
+
if (R(s))
|
|
6788
6788
|
return { data: { user: null }, error: s };
|
|
6789
6789
|
throw s;
|
|
6790
6790
|
}
|
|
@@ -6798,7 +6798,7 @@ class Vi {
|
|
|
6798
6798
|
});
|
|
6799
6799
|
return { data: r, error: s };
|
|
6800
6800
|
} catch (r) {
|
|
6801
|
-
if (
|
|
6801
|
+
if (R(r))
|
|
6802
6802
|
return { data: null, error: r };
|
|
6803
6803
|
throw r;
|
|
6804
6804
|
}
|
|
@@ -6810,7 +6810,7 @@ class Vi {
|
|
|
6810
6810
|
headers: this.headers
|
|
6811
6811
|
}), error: null };
|
|
6812
6812
|
} catch (r) {
|
|
6813
|
-
if (
|
|
6813
|
+
if (R(r))
|
|
6814
6814
|
return { data: null, error: r };
|
|
6815
6815
|
throw r;
|
|
6816
6816
|
}
|
|
@@ -6831,7 +6831,7 @@ class Vi {
|
|
|
6831
6831
|
page: (s = (r = e?.page) === null || r === void 0 ? void 0 : r.toString()) !== null && s !== void 0 ? s : "",
|
|
6832
6832
|
per_page: (a = (n = e?.perPage) === null || n === void 0 ? void 0 : n.toString()) !== null && a !== void 0 ? a : ""
|
|
6833
6833
|
},
|
|
6834
|
-
xform:
|
|
6834
|
+
xform: As
|
|
6835
6835
|
});
|
|
6836
6836
|
if (d.error)
|
|
6837
6837
|
throw d.error;
|
|
@@ -6841,7 +6841,7 @@ class Vi {
|
|
|
6841
6841
|
u[`${w}Page`] = y;
|
|
6842
6842
|
}), u.total = parseInt(m)), { data: Object.assign(Object.assign({}, f), u), error: null };
|
|
6843
6843
|
} catch (u) {
|
|
6844
|
-
if (
|
|
6844
|
+
if (R(u))
|
|
6845
6845
|
return { data: { clients: [] }, error: u };
|
|
6846
6846
|
throw u;
|
|
6847
6847
|
}
|
|
@@ -6860,7 +6860,7 @@ class Vi {
|
|
|
6860
6860
|
xform: (r) => ({ data: r, error: null })
|
|
6861
6861
|
});
|
|
6862
6862
|
} catch (r) {
|
|
6863
|
-
if (
|
|
6863
|
+
if (R(r))
|
|
6864
6864
|
return { data: null, error: r };
|
|
6865
6865
|
throw r;
|
|
6866
6866
|
}
|
|
@@ -6878,7 +6878,7 @@ class Vi {
|
|
|
6878
6878
|
xform: (r) => ({ data: r, error: null })
|
|
6879
6879
|
});
|
|
6880
6880
|
} catch (r) {
|
|
6881
|
-
if (
|
|
6881
|
+
if (R(r))
|
|
6882
6882
|
return { data: null, error: r };
|
|
6883
6883
|
throw r;
|
|
6884
6884
|
}
|
|
@@ -6897,7 +6897,7 @@ class Vi {
|
|
|
6897
6897
|
xform: (s) => ({ data: s, error: null })
|
|
6898
6898
|
});
|
|
6899
6899
|
} catch (s) {
|
|
6900
|
-
if (
|
|
6900
|
+
if (R(s))
|
|
6901
6901
|
return { data: null, error: s };
|
|
6902
6902
|
throw s;
|
|
6903
6903
|
}
|
|
@@ -6915,7 +6915,7 @@ class Vi {
|
|
|
6915
6915
|
noResolveJson: !0
|
|
6916
6916
|
}), { data: null, error: null };
|
|
6917
6917
|
} catch (r) {
|
|
6918
|
-
if (
|
|
6918
|
+
if (R(r))
|
|
6919
6919
|
return { data: null, error: r };
|
|
6920
6920
|
throw r;
|
|
6921
6921
|
}
|
|
@@ -6933,13 +6933,13 @@ class Vi {
|
|
|
6933
6933
|
xform: (r) => ({ data: r, error: null })
|
|
6934
6934
|
});
|
|
6935
6935
|
} catch (r) {
|
|
6936
|
-
if (
|
|
6936
|
+
if (R(r))
|
|
6937
6937
|
return { data: null, error: r };
|
|
6938
6938
|
throw r;
|
|
6939
6939
|
}
|
|
6940
6940
|
}
|
|
6941
6941
|
}
|
|
6942
|
-
function
|
|
6942
|
+
function Rs(t = {}) {
|
|
6943
6943
|
return {
|
|
6944
6944
|
getItem: (e) => t[e] || null,
|
|
6945
6945
|
setItem: (e, r) => {
|
|
@@ -7092,7 +7092,7 @@ class oe extends Error {
|
|
|
7092
7092
|
super(e, { cause: s }), this.__isWebAuthnError = !0, this.name = (a = n ?? (s instanceof Error ? s.name : void 0)) !== null && a !== void 0 ? a : "Unknown Error", this.code = r;
|
|
7093
7093
|
}
|
|
7094
7094
|
}
|
|
7095
|
-
class
|
|
7095
|
+
class kr extends oe {
|
|
7096
7096
|
constructor(e, r) {
|
|
7097
7097
|
super({
|
|
7098
7098
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
@@ -7275,7 +7275,7 @@ function ao(t) {
|
|
|
7275
7275
|
/** we assert the options here as typescript still doesn't know about future webauthn types */
|
|
7276
7276
|
t
|
|
7277
7277
|
);
|
|
7278
|
-
const { challenge: e, user: r, excludeCredentials: s } = t, n =
|
|
7278
|
+
const { challenge: e, user: r, excludeCredentials: s } = t, n = xr(
|
|
7279
7279
|
t,
|
|
7280
7280
|
["challenge", "user", "excludeCredentials"]
|
|
7281
7281
|
), a = It(e).buffer, i = Object.assign(Object.assign({}, r), { id: It(r.id).buffer }), o = Object.assign(Object.assign({}, n), {
|
|
@@ -7301,7 +7301,7 @@ function io(t) {
|
|
|
7301
7301
|
throw new Error("Credential request options are required");
|
|
7302
7302
|
if (typeof PublicKeyCredential < "u" && "parseRequestOptionsFromJSON" in PublicKeyCredential && typeof PublicKeyCredential.parseRequestOptionsFromJSON == "function")
|
|
7303
7303
|
return PublicKeyCredential.parseRequestOptionsFromJSON(t);
|
|
7304
|
-
const { challenge: e, allowCredentials: r } = t, s =
|
|
7304
|
+
const { challenge: e, allowCredentials: r } = t, s = xr(
|
|
7305
7305
|
t,
|
|
7306
7306
|
["challenge", "allowCredentials"]
|
|
7307
7307
|
), n = It(e).buffer, a = Object.assign(Object.assign({}, s), { challenge: n });
|
|
@@ -7364,7 +7364,7 @@ function jn(t) {
|
|
|
7364
7364
|
t === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)
|
|
7365
7365
|
);
|
|
7366
7366
|
}
|
|
7367
|
-
function
|
|
7367
|
+
function Cs() {
|
|
7368
7368
|
var t, e;
|
|
7369
7369
|
return !!(ye() && "PublicKeyCredential" in window && window.PublicKeyCredential && "credentials" in navigator && typeof ((t = navigator?.credentials) === null || t === void 0 ? void 0 : t.create) == "function" && typeof ((e = navigator?.credentials) === null || e === void 0 ? void 0 : e.get) == "function");
|
|
7370
7370
|
}
|
|
@@ -7376,10 +7376,10 @@ async function co(t) {
|
|
|
7376
7376
|
);
|
|
7377
7377
|
return e ? e instanceof PublicKeyCredential ? { data: e, error: null } : {
|
|
7378
7378
|
data: null,
|
|
7379
|
-
error: new
|
|
7379
|
+
error: new kr("Browser returned unexpected credential type", e)
|
|
7380
7380
|
} : {
|
|
7381
7381
|
data: null,
|
|
7382
|
-
error: new
|
|
7382
|
+
error: new kr("Empty credential response", e)
|
|
7383
7383
|
};
|
|
7384
7384
|
} catch (e) {
|
|
7385
7385
|
return {
|
|
@@ -7399,10 +7399,10 @@ async function uo(t) {
|
|
|
7399
7399
|
);
|
|
7400
7400
|
return e ? e instanceof PublicKeyCredential ? { data: e, error: null } : {
|
|
7401
7401
|
data: null,
|
|
7402
|
-
error: new
|
|
7402
|
+
error: new kr("Browser returned unexpected credential type", e)
|
|
7403
7403
|
} : {
|
|
7404
7404
|
data: null,
|
|
7405
|
-
error: new
|
|
7405
|
+
error: new kr("Empty credential response", e)
|
|
7406
7406
|
};
|
|
7407
7407
|
} catch (e) {
|
|
7408
7408
|
return {
|
|
@@ -7430,7 +7430,7 @@ const ho = {
|
|
|
7430
7430
|
hints: ["security-key"],
|
|
7431
7431
|
attestation: "direct"
|
|
7432
7432
|
};
|
|
7433
|
-
function
|
|
7433
|
+
function Sr(...t) {
|
|
7434
7434
|
const e = (n) => n !== null && typeof n == "object" && !Array.isArray(n), r = (n) => n instanceof ArrayBuffer || ArrayBuffer.isView(n), s = {};
|
|
7435
7435
|
for (const n of t)
|
|
7436
7436
|
if (n)
|
|
@@ -7443,17 +7443,17 @@ function kr(...t) {
|
|
|
7443
7443
|
s[a] = i;
|
|
7444
7444
|
else if (e(i)) {
|
|
7445
7445
|
const o = s[a];
|
|
7446
|
-
e(o) ? s[a] =
|
|
7446
|
+
e(o) ? s[a] = Sr(o, i) : s[a] = Sr(i);
|
|
7447
7447
|
} else
|
|
7448
7448
|
s[a] = i;
|
|
7449
7449
|
}
|
|
7450
7450
|
return s;
|
|
7451
7451
|
}
|
|
7452
7452
|
function mo(t, e) {
|
|
7453
|
-
return
|
|
7453
|
+
return Sr(ho, t, e || {});
|
|
7454
7454
|
}
|
|
7455
7455
|
function po(t, e) {
|
|
7456
|
-
return
|
|
7456
|
+
return Sr(fo, t, e || {});
|
|
7457
7457
|
}
|
|
7458
7458
|
class go {
|
|
7459
7459
|
constructor(e) {
|
|
@@ -7542,7 +7542,7 @@ class go {
|
|
|
7542
7542
|
}
|
|
7543
7543
|
}
|
|
7544
7544
|
} catch (o) {
|
|
7545
|
-
return
|
|
7545
|
+
return R(o) ? { data: null, error: o } : {
|
|
7546
7546
|
data: null,
|
|
7547
7547
|
error: new mt("Unexpected error in challenge", o)
|
|
7548
7548
|
};
|
|
@@ -7587,10 +7587,10 @@ class go {
|
|
|
7587
7587
|
if (!r)
|
|
7588
7588
|
return {
|
|
7589
7589
|
data: null,
|
|
7590
|
-
error: new
|
|
7590
|
+
error: new er("rpId is required for WebAuthn authentication")
|
|
7591
7591
|
};
|
|
7592
7592
|
try {
|
|
7593
|
-
if (!
|
|
7593
|
+
if (!Cs())
|
|
7594
7594
|
return {
|
|
7595
7595
|
data: null,
|
|
7596
7596
|
error: new mt("Browser does not support WebAuthn", null)
|
|
@@ -7614,7 +7614,7 @@ class go {
|
|
|
7614
7614
|
}
|
|
7615
7615
|
});
|
|
7616
7616
|
} catch (i) {
|
|
7617
|
-
return
|
|
7617
|
+
return R(i) ? { data: null, error: i } : {
|
|
7618
7618
|
data: null,
|
|
7619
7619
|
error: new mt("Unexpected error in authenticate", i)
|
|
7620
7620
|
};
|
|
@@ -7639,10 +7639,10 @@ class go {
|
|
|
7639
7639
|
if (!r)
|
|
7640
7640
|
return {
|
|
7641
7641
|
data: null,
|
|
7642
|
-
error: new
|
|
7642
|
+
error: new er("rpId is required for WebAuthn registration")
|
|
7643
7643
|
};
|
|
7644
7644
|
try {
|
|
7645
|
-
if (!
|
|
7645
|
+
if (!Cs())
|
|
7646
7646
|
return {
|
|
7647
7647
|
data: null,
|
|
7648
7648
|
error: new mt("Browser does not support WebAuthn", null)
|
|
@@ -7674,7 +7674,7 @@ class go {
|
|
|
7674
7674
|
}
|
|
7675
7675
|
}) : { data: null, error: u };
|
|
7676
7676
|
} catch (i) {
|
|
7677
|
-
return
|
|
7677
|
+
return R(i) ? { data: null, error: i } : {
|
|
7678
7678
|
data: null,
|
|
7679
7679
|
error: new mt("Unexpected error in register", i)
|
|
7680
7680
|
};
|
|
@@ -7697,11 +7697,11 @@ const yo = {
|
|
|
7697
7697
|
// 5 seconds
|
|
7698
7698
|
skipAutoInitialize: !1
|
|
7699
7699
|
};
|
|
7700
|
-
async function
|
|
7700
|
+
async function Os(t, e, r) {
|
|
7701
7701
|
return await r();
|
|
7702
7702
|
}
|
|
7703
7703
|
const Pt = {};
|
|
7704
|
-
class
|
|
7704
|
+
class tr {
|
|
7705
7705
|
/**
|
|
7706
7706
|
* The JWKS used for verifying asymmetric JWTs
|
|
7707
7707
|
*/
|
|
@@ -7737,7 +7737,7 @@ class er {
|
|
|
7737
7737
|
var r, s, n;
|
|
7738
7738
|
this.userStorage = null, this.memoryStorage = null, this.stateChangeEmitters = /* @__PURE__ */ new Map(), this.autoRefreshTicker = null, this.autoRefreshTickTimeout = null, this.visibilityChangedCallback = null, this.refreshingDeferred = null, this.initializePromise = null, this.detectSessionInUrl = !0, this.hasCustomAuthorizationHeader = !1, this.suppressGetSessionWarning = !1, this.lockAcquired = !1, this.pendingInLock = [], this.broadcastChannel = null, this.logger = console.log;
|
|
7739
7739
|
const a = Object.assign(Object.assign({}, yo), e);
|
|
7740
|
-
if (this.storageKey = a.storageKey, this.instanceID = (r =
|
|
7740
|
+
if (this.storageKey = a.storageKey, this.instanceID = (r = tr.nextInstanceID[this.storageKey]) !== null && r !== void 0 ? r : 0, tr.nextInstanceID[this.storageKey] = this.instanceID + 1, this.logDebugMessages = !!a.debug, typeof a.debug == "function" && (this.logger = a.debug), this.instanceID > 0 && ye()) {
|
|
7741
7741
|
const i = `${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;
|
|
7742
7742
|
console.warn(i), this.logDebugMessages && console.trace(i);
|
|
7743
7743
|
}
|
|
@@ -7745,7 +7745,7 @@ class er {
|
|
|
7745
7745
|
url: a.url,
|
|
7746
7746
|
headers: a.headers,
|
|
7747
7747
|
fetch: a.fetch
|
|
7748
|
-
}), this.url = a.url, this.headers = a.headers, this.fetch = kn(a.fetch), this.lock = a.lock ||
|
|
7748
|
+
}), this.url = a.url, this.headers = a.headers, this.fetch = kn(a.fetch), this.lock = a.lock || Os, this.detectSessionInUrl = a.detectSessionInUrl, this.flowType = a.flowType, this.hasCustomAuthorizationHeader = a.hasCustomAuthorizationHeader, this.throwOnError = a.throwOnError, this.lockAcquireTimeout = a.lockAcquireTimeout, a.lock ? this.lock = a.lock : this.persistSession && ye() && (!((s = globalThis?.navigator) === null || s === void 0) && s.locks) ? this.lock = Yi : this.lock = Os, this.jwks || (this.jwks = { keys: [] }, this.jwks_cached_at = Number.MIN_SAFE_INTEGER), this.mfa = {
|
|
7749
7749
|
verify: this._verify.bind(this),
|
|
7750
7750
|
enroll: this._enroll.bind(this),
|
|
7751
7751
|
unenroll: this._unenroll.bind(this),
|
|
@@ -7760,7 +7760,7 @@ class er {
|
|
|
7760
7760
|
denyAuthorization: this._denyAuthorization.bind(this),
|
|
7761
7761
|
listGrants: this._listOAuthGrants.bind(this),
|
|
7762
7762
|
revokeGrant: this._revokeOAuthGrant.bind(this)
|
|
7763
|
-
}, this.persistSession ? (a.storage ? this.storage = a.storage : _n() ? this.storage = globalThis.localStorage : (this.memoryStorage = {}, this.storage =
|
|
7763
|
+
}, this.persistSession ? (a.storage ? this.storage = a.storage : _n() ? this.storage = globalThis.localStorage : (this.memoryStorage = {}, this.storage = Rs(this.memoryStorage)), a.userStorage && (this.userStorage = a.userStorage)) : (this.memoryStorage = {}, this.storage = Rs(this.memoryStorage)), ye() && globalThis.BroadcastChannel && this.persistSession && this.storageKey) {
|
|
7764
7764
|
try {
|
|
7765
7765
|
this.broadcastChannel = new globalThis.BroadcastChannel(this.storageKey);
|
|
7766
7766
|
} catch (i) {
|
|
@@ -7836,7 +7836,7 @@ class er {
|
|
|
7836
7836
|
}
|
|
7837
7837
|
return await this._recoverAndRefresh(), { error: null };
|
|
7838
7838
|
} catch (r) {
|
|
7839
|
-
return
|
|
7839
|
+
return R(r) ? this._returnResult({ error: r }) : this._returnResult({
|
|
7840
7840
|
error: new mt("Unexpected error during initialization", r)
|
|
7841
7841
|
});
|
|
7842
7842
|
} finally {
|
|
@@ -7864,7 +7864,7 @@ class er {
|
|
|
7864
7864
|
const c = i.session, u = i.user;
|
|
7865
7865
|
return i.session && (await this._saveSession(i.session), await this._notifyAllSubscribers("SIGNED_IN", c)), this._returnResult({ data: { user: u, session: c }, error: null });
|
|
7866
7866
|
} catch (a) {
|
|
7867
|
-
if (
|
|
7867
|
+
if (R(a))
|
|
7868
7868
|
return this._returnResult({ data: { user: null, session: null }, error: a });
|
|
7869
7869
|
throw a;
|
|
7870
7870
|
}
|
|
@@ -7913,14 +7913,14 @@ class er {
|
|
|
7913
7913
|
xform: Be
|
|
7914
7914
|
});
|
|
7915
7915
|
} else
|
|
7916
|
-
throw new
|
|
7916
|
+
throw new hr("You must provide either an email or phone number and a password");
|
|
7917
7917
|
const { data: i, error: o } = a;
|
|
7918
7918
|
if (o || !i)
|
|
7919
7919
|
return await ge(this.storage, `${this.storageKey}-code-verifier`), this._returnResult({ data: { user: null, session: null }, error: o });
|
|
7920
7920
|
const c = i.session, u = i.user;
|
|
7921
7921
|
return i.session && (await this._saveSession(i.session), await this._notifyAllSubscribers("SIGNED_IN", c)), this._returnResult({ data: { user: u, session: c }, error: null });
|
|
7922
7922
|
} catch (a) {
|
|
7923
|
-
if (await ge(this.storage, `${this.storageKey}-code-verifier`),
|
|
7923
|
+
if (await ge(this.storage, `${this.storageKey}-code-verifier`), R(a))
|
|
7924
7924
|
return this._returnResult({ data: { user: null, session: null }, error: a });
|
|
7925
7925
|
throw a;
|
|
7926
7926
|
}
|
|
@@ -7945,7 +7945,7 @@ class er {
|
|
|
7945
7945
|
password: i,
|
|
7946
7946
|
gotrue_meta_security: { captcha_token: o?.captchaToken }
|
|
7947
7947
|
},
|
|
7948
|
-
xform:
|
|
7948
|
+
xform: Es
|
|
7949
7949
|
});
|
|
7950
7950
|
} else if ("phone" in e) {
|
|
7951
7951
|
const { phone: a, password: i, options: o } = e;
|
|
@@ -7956,10 +7956,10 @@ class er {
|
|
|
7956
7956
|
password: i,
|
|
7957
7957
|
gotrue_meta_security: { captcha_token: o?.captchaToken }
|
|
7958
7958
|
},
|
|
7959
|
-
xform:
|
|
7959
|
+
xform: Es
|
|
7960
7960
|
});
|
|
7961
7961
|
} else
|
|
7962
|
-
throw new
|
|
7962
|
+
throw new hr("You must provide either an email or phone number and a password");
|
|
7963
7963
|
const { data: s, error: n } = r;
|
|
7964
7964
|
if (n)
|
|
7965
7965
|
return this._returnResult({ data: { user: null, session: null }, error: n });
|
|
@@ -7972,7 +7972,7 @@ class er {
|
|
|
7972
7972
|
error: n
|
|
7973
7973
|
});
|
|
7974
7974
|
} catch (r) {
|
|
7975
|
-
if (
|
|
7975
|
+
if (R(r))
|
|
7976
7976
|
return this._returnResult({ data: { user: null, session: null }, error: r });
|
|
7977
7977
|
throw r;
|
|
7978
7978
|
}
|
|
@@ -8037,7 +8037,7 @@ class er {
|
|
|
8037
8037
|
throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");
|
|
8038
8038
|
v = w;
|
|
8039
8039
|
}
|
|
8040
|
-
const
|
|
8040
|
+
const A = new URL((r = _?.url) !== null && r !== void 0 ? r : window.location.href), x = await v.request({
|
|
8041
8041
|
method: "eth_requestAccounts"
|
|
8042
8042
|
}).then((M) => M).catch(() => {
|
|
8043
8043
|
throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid");
|
|
@@ -8053,10 +8053,10 @@ class er {
|
|
|
8053
8053
|
P = Xi(M);
|
|
8054
8054
|
}
|
|
8055
8055
|
const H = {
|
|
8056
|
-
domain:
|
|
8056
|
+
domain: A.host,
|
|
8057
8057
|
address: N,
|
|
8058
8058
|
statement: S,
|
|
8059
|
-
uri:
|
|
8059
|
+
uri: A.href,
|
|
8060
8060
|
version: "1",
|
|
8061
8061
|
chainId: P,
|
|
8062
8062
|
nonce: (n = _?.signInWithEthereum) === null || n === void 0 ? void 0 : n.nonce,
|
|
@@ -8089,7 +8089,7 @@ class er {
|
|
|
8089
8089
|
}
|
|
8090
8090
|
return y.session && (await this._saveSession(y.session), await this._notifyAllSubscribers("SIGNED_IN", y.session)), this._returnResult({ data: Object.assign({}, y), error: w });
|
|
8091
8091
|
} catch (y) {
|
|
8092
|
-
if (
|
|
8092
|
+
if (R(y))
|
|
8093
8093
|
return this._returnResult({ data: { user: null, session: null }, error: y });
|
|
8094
8094
|
throw y;
|
|
8095
8095
|
}
|
|
@@ -8101,25 +8101,25 @@ class er {
|
|
|
8101
8101
|
g = e.message, y = e.signature;
|
|
8102
8102
|
else {
|
|
8103
8103
|
const { chain: w, wallet: S, statement: _, options: v } = e;
|
|
8104
|
-
let
|
|
8104
|
+
let A;
|
|
8105
8105
|
if (ye())
|
|
8106
8106
|
if (typeof S == "object")
|
|
8107
|
-
|
|
8107
|
+
A = S;
|
|
8108
8108
|
else {
|
|
8109
8109
|
const N = window;
|
|
8110
8110
|
if ("solana" in N && typeof N.solana == "object" && ("signIn" in N.solana && typeof N.solana.signIn == "function" || "signMessage" in N.solana && typeof N.solana.signMessage == "function"))
|
|
8111
|
-
|
|
8111
|
+
A = N.solana;
|
|
8112
8112
|
else
|
|
8113
8113
|
throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.");
|
|
8114
8114
|
}
|
|
8115
8115
|
else {
|
|
8116
8116
|
if (typeof S != "object" || !v?.url)
|
|
8117
8117
|
throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");
|
|
8118
|
-
|
|
8118
|
+
A = S;
|
|
8119
8119
|
}
|
|
8120
8120
|
const x = new URL((r = v?.url) !== null && r !== void 0 ? r : window.location.href);
|
|
8121
|
-
if ("signIn" in
|
|
8122
|
-
const N = await
|
|
8121
|
+
if ("signIn" in A && A.signIn) {
|
|
8122
|
+
const N = await A.signIn(Object.assign(Object.assign(Object.assign({ issuedAt: (/* @__PURE__ */ new Date()).toISOString() }, v?.signInWithSolana), {
|
|
8123
8123
|
// non-overridable properties
|
|
8124
8124
|
version: "1",
|
|
8125
8125
|
domain: x.host,
|
|
@@ -8137,11 +8137,11 @@ class er {
|
|
|
8137
8137
|
else
|
|
8138
8138
|
throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields");
|
|
8139
8139
|
} else {
|
|
8140
|
-
if (!("signMessage" in
|
|
8140
|
+
if (!("signMessage" in A) || typeof A.signMessage != "function" || !("publicKey" in A) || typeof A != "object" || !A.publicKey || !("toBase58" in A.publicKey) || typeof A.publicKey.toBase58 != "function")
|
|
8141
8141
|
throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");
|
|
8142
8142
|
g = [
|
|
8143
8143
|
`${x.host} wants you to sign in with your Solana account:`,
|
|
8144
|
-
|
|
8144
|
+
A.publicKey.toBase58(),
|
|
8145
8145
|
..._ ? ["", _, ""] : [""],
|
|
8146
8146
|
"Version: 1",
|
|
8147
8147
|
`URI: ${x.href}`,
|
|
@@ -8157,7 +8157,7 @@ class er {
|
|
|
8157
8157
|
] : []
|
|
8158
8158
|
].join(`
|
|
8159
8159
|
`);
|
|
8160
|
-
const N = await
|
|
8160
|
+
const N = await A.signMessage(new TextEncoder().encode(g), "utf8");
|
|
8161
8161
|
if (!N || !(N instanceof Uint8Array))
|
|
8162
8162
|
throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");
|
|
8163
8163
|
y = N;
|
|
@@ -8177,7 +8177,7 @@ class er {
|
|
|
8177
8177
|
}
|
|
8178
8178
|
return w.session && (await this._saveSession(w.session), await this._notifyAllSubscribers("SIGNED_IN", w.session)), this._returnResult({ data: Object.assign({}, w), error: S });
|
|
8179
8179
|
} catch (w) {
|
|
8180
|
-
if (
|
|
8180
|
+
if (R(w))
|
|
8181
8181
|
return this._returnResult({ data: { user: null, session: null }, error: w });
|
|
8182
8182
|
throw w;
|
|
8183
8183
|
}
|
|
@@ -8206,7 +8206,7 @@ class er {
|
|
|
8206
8206
|
}
|
|
8207
8207
|
return a.session && (await this._saveSession(a.session), await this._notifyAllSubscribers("SIGNED_IN", a.session)), this._returnResult({ data: Object.assign(Object.assign({}, a), { redirectType: n ?? null }), error: i });
|
|
8208
8208
|
} catch (a) {
|
|
8209
|
-
if (await ge(this.storage, `${this.storageKey}-code-verifier`),
|
|
8209
|
+
if (await ge(this.storage, `${this.storageKey}-code-verifier`), R(a))
|
|
8210
8210
|
return this._returnResult({
|
|
8211
8211
|
data: { user: null, session: null, redirectType: null },
|
|
8212
8212
|
error: a
|
|
@@ -8239,7 +8239,7 @@ class er {
|
|
|
8239
8239
|
}
|
|
8240
8240
|
return c.session && (await this._saveSession(c.session), await this._notifyAllSubscribers("SIGNED_IN", c.session)), this._returnResult({ data: c, error: u });
|
|
8241
8241
|
} catch (r) {
|
|
8242
|
-
if (
|
|
8242
|
+
if (R(r))
|
|
8243
8243
|
return this._returnResult({ data: { user: null, session: null }, error: r });
|
|
8244
8244
|
throw r;
|
|
8245
8245
|
}
|
|
@@ -8298,9 +8298,9 @@ class er {
|
|
|
8298
8298
|
error: d
|
|
8299
8299
|
});
|
|
8300
8300
|
}
|
|
8301
|
-
throw new
|
|
8301
|
+
throw new hr("You must provide either an email or phone number.");
|
|
8302
8302
|
} catch (o) {
|
|
8303
|
-
if (await ge(this.storage, `${this.storageKey}-code-verifier`),
|
|
8303
|
+
if (await ge(this.storage, `${this.storageKey}-code-verifier`), R(o))
|
|
8304
8304
|
return this._returnResult({ data: { user: null, session: null }, error: o });
|
|
8305
8305
|
throw o;
|
|
8306
8306
|
}
|
|
@@ -8326,7 +8326,7 @@ class er {
|
|
|
8326
8326
|
const c = i.session, u = i.user;
|
|
8327
8327
|
return c?.access_token && (await this._saveSession(c), await this._notifyAllSubscribers(e.type == "recovery" ? "PASSWORD_RECOVERY" : "SIGNED_IN", c)), this._returnResult({ data: { user: u, session: c }, error: null });
|
|
8328
8328
|
} catch (n) {
|
|
8329
|
-
if (
|
|
8329
|
+
if (R(n))
|
|
8330
8330
|
return this._returnResult({ data: { user: null, session: null }, error: n });
|
|
8331
8331
|
throw n;
|
|
8332
8332
|
}
|
|
@@ -8357,7 +8357,7 @@ class er {
|
|
|
8357
8357
|
});
|
|
8358
8358
|
return !((a = u.data) === null || a === void 0) && a.url && ye() && !(!((i = e.options) === null || i === void 0) && i.skipBrowserRedirect) && window.location.assign(u.data.url), this._returnResult(u);
|
|
8359
8359
|
} catch (o) {
|
|
8360
|
-
if (await ge(this.storage, `${this.storageKey}-code-verifier`),
|
|
8360
|
+
if (await ge(this.storage, `${this.storageKey}-code-verifier`), R(o))
|
|
8361
8361
|
return this._returnResult({ data: null, error: o });
|
|
8362
8362
|
throw o;
|
|
8363
8363
|
}
|
|
@@ -8384,7 +8384,7 @@ class er {
|
|
|
8384
8384
|
return this._returnResult({ data: { user: null, session: null }, error: n });
|
|
8385
8385
|
});
|
|
8386
8386
|
} catch (e) {
|
|
8387
|
-
if (
|
|
8387
|
+
if (R(e))
|
|
8388
8388
|
return this._returnResult({ data: { user: null, session: null }, error: e });
|
|
8389
8389
|
throw e;
|
|
8390
8390
|
}
|
|
@@ -8420,9 +8420,9 @@ class er {
|
|
|
8420
8420
|
error: o
|
|
8421
8421
|
});
|
|
8422
8422
|
}
|
|
8423
|
-
throw new
|
|
8423
|
+
throw new hr("You must provide either an email or phone number and a type");
|
|
8424
8424
|
} catch (r) {
|
|
8425
|
-
if (
|
|
8425
|
+
if (R(r))
|
|
8426
8426
|
return this._returnResult({ data: { user: null, session: null }, error: r });
|
|
8427
8427
|
throw r;
|
|
8428
8428
|
}
|
|
@@ -8506,11 +8506,11 @@ class er {
|
|
|
8506
8506
|
const r = await dt(this.storage, this.storageKey);
|
|
8507
8507
|
if (this._debug("#getSession()", "session from storage", r), r !== null && (this._isValidSession(r) ? e = r : (this._debug("#getSession()", "session from storage is not valid"), await this._removeSession())), !e)
|
|
8508
8508
|
return { data: { session: null }, error: null };
|
|
8509
|
-
const s = e.expires_at ? e.expires_at * 1e3 - Date.now() <
|
|
8509
|
+
const s = e.expires_at ? e.expires_at * 1e3 - Date.now() < Nr : !1;
|
|
8510
8510
|
if (this._debug("#__loadSession()", `session has${s ? "" : " not"} expired`, "expires_at", e.expires_at), !s) {
|
|
8511
8511
|
if (this.userStorage) {
|
|
8512
8512
|
const i = await dt(this.userStorage, this.storageKey + "-user");
|
|
8513
|
-
i?.user ? e.user = i.user : e.user =
|
|
8513
|
+
i?.user ? e.user = i.user : e.user = $r();
|
|
8514
8514
|
}
|
|
8515
8515
|
if (this.storage.isServer && e.user && !e.user.__isUserNotAvailableProxy) {
|
|
8516
8516
|
const i = { value: this.suppressGetSessionWarning };
|
|
@@ -8556,8 +8556,8 @@ class er {
|
|
|
8556
8556
|
});
|
|
8557
8557
|
});
|
|
8558
8558
|
} catch (r) {
|
|
8559
|
-
if (
|
|
8560
|
-
return
|
|
8559
|
+
if (R(r))
|
|
8560
|
+
return Ir(r) && (await this._removeSession(), await ge(this.storage, `${this.storageKey}-code-verifier`)), this._returnResult({ data: { user: null }, error: r });
|
|
8561
8561
|
throw r;
|
|
8562
8562
|
}
|
|
8563
8563
|
}
|
|
@@ -8590,7 +8590,7 @@ class er {
|
|
|
8590
8590
|
return i.user = u.user, await this._saveSession(i), await this._notifyAllSubscribers("USER_UPDATED", i), this._returnResult({ data: { user: i.user }, error: null });
|
|
8591
8591
|
});
|
|
8592
8592
|
} catch (s) {
|
|
8593
|
-
if (await ge(this.storage, `${this.storageKey}-code-verifier`),
|
|
8593
|
+
if (await ge(this.storage, `${this.storageKey}-code-verifier`), R(s))
|
|
8594
8594
|
return this._returnResult({ data: { user: null }, error: s });
|
|
8595
8595
|
throw s;
|
|
8596
8596
|
}
|
|
@@ -8609,7 +8609,7 @@ class er {
|
|
|
8609
8609
|
throw new Ce();
|
|
8610
8610
|
const r = Date.now() / 1e3;
|
|
8611
8611
|
let s = r, n = !0, a = null;
|
|
8612
|
-
const { payload: i } =
|
|
8612
|
+
const { payload: i } = mr(e.access_token);
|
|
8613
8613
|
if (i.exp && (s = i.exp, n = s <= r), n) {
|
|
8614
8614
|
const { data: o, error: c } = await this._callRefreshToken(e.refresh_token);
|
|
8615
8615
|
if (c)
|
|
@@ -8632,7 +8632,7 @@ class er {
|
|
|
8632
8632
|
}
|
|
8633
8633
|
return this._returnResult({ data: { user: a.user, session: a }, error: null });
|
|
8634
8634
|
} catch (r) {
|
|
8635
|
-
if (
|
|
8635
|
+
if (R(r))
|
|
8636
8636
|
return this._returnResult({ data: { session: null, user: null }, error: r });
|
|
8637
8637
|
throw r;
|
|
8638
8638
|
}
|
|
@@ -8662,7 +8662,7 @@ class er {
|
|
|
8662
8662
|
return a ? this._returnResult({ data: { user: null, session: null }, error: a }) : n ? this._returnResult({ data: { user: n.user, session: n }, error: null }) : this._returnResult({ data: { user: null, session: null }, error: null });
|
|
8663
8663
|
});
|
|
8664
8664
|
} catch (r) {
|
|
8665
|
-
if (
|
|
8665
|
+
if (R(r))
|
|
8666
8666
|
return this._returnResult({ data: { user: null, session: null }, error: r });
|
|
8667
8667
|
throw r;
|
|
8668
8668
|
}
|
|
@@ -8673,35 +8673,35 @@ class er {
|
|
|
8673
8673
|
async _getSessionFromURL(e, r) {
|
|
8674
8674
|
try {
|
|
8675
8675
|
if (!ye())
|
|
8676
|
-
throw new
|
|
8676
|
+
throw new fr("No browser detected.");
|
|
8677
8677
|
if (e.error || e.error_description || e.error_code)
|
|
8678
|
-
throw new
|
|
8678
|
+
throw new fr(e.error_description || "Error in URL with unspecified error_description", {
|
|
8679
8679
|
error: e.error || "unspecified_error",
|
|
8680
8680
|
code: e.error_code || "unspecified_code"
|
|
8681
8681
|
});
|
|
8682
8682
|
switch (r) {
|
|
8683
8683
|
case "implicit":
|
|
8684
8684
|
if (this.flowType === "pkce")
|
|
8685
|
-
throw new
|
|
8685
|
+
throw new _s("Not a valid PKCE flow url.");
|
|
8686
8686
|
break;
|
|
8687
8687
|
case "pkce":
|
|
8688
8688
|
if (this.flowType === "implicit")
|
|
8689
|
-
throw new
|
|
8689
|
+
throw new fr("Not a valid implicit grant flow url.");
|
|
8690
8690
|
break;
|
|
8691
8691
|
default:
|
|
8692
8692
|
}
|
|
8693
8693
|
if (r === "pkce") {
|
|
8694
8694
|
if (this._debug("#_initialize()", "begin", "is PKCE flow", !0), !e.code)
|
|
8695
|
-
throw new
|
|
8695
|
+
throw new _s("No code detected.");
|
|
8696
8696
|
const { data: _, error: v } = await this._exchangeCodeForSession(e.code);
|
|
8697
8697
|
if (v)
|
|
8698
8698
|
throw v;
|
|
8699
|
-
const
|
|
8700
|
-
return
|
|
8699
|
+
const A = new URL(window.location.href);
|
|
8700
|
+
return A.searchParams.delete("code"), window.history.replaceState(window.history.state, "", A.toString()), { data: { session: _.session, redirectType: null }, error: null };
|
|
8701
8701
|
}
|
|
8702
8702
|
const { provider_token: s, provider_refresh_token: n, access_token: a, refresh_token: i, expires_in: o, expires_at: c, token_type: u } = e;
|
|
8703
8703
|
if (!a || !o || !i || !u)
|
|
8704
|
-
throw new
|
|
8704
|
+
throw new fr("No session defined in URL");
|
|
8705
8705
|
const d = Math.round(Date.now() / 1e3), f = parseInt(o);
|
|
8706
8706
|
let m = d + f;
|
|
8707
8707
|
c && (m = parseInt(c));
|
|
@@ -8724,7 +8724,7 @@ class er {
|
|
|
8724
8724
|
};
|
|
8725
8725
|
return window.location.hash = "", this._debug("#_getSessionFromURL()", "clearing window.location.hash"), this._returnResult({ data: { session: S, redirectType: e.type }, error: null });
|
|
8726
8726
|
} catch (s) {
|
|
8727
|
-
if (
|
|
8727
|
+
if (R(s))
|
|
8728
8728
|
return this._returnResult({ data: { session: null, redirectType: null }, error: s });
|
|
8729
8729
|
throw s;
|
|
8730
8730
|
}
|
|
@@ -8761,12 +8761,12 @@ class er {
|
|
|
8761
8761
|
return await this._useSession(async (r) => {
|
|
8762
8762
|
var s;
|
|
8763
8763
|
const { data: n, error: a } = r;
|
|
8764
|
-
if (a && !
|
|
8764
|
+
if (a && !Ir(a))
|
|
8765
8765
|
return this._returnResult({ error: a });
|
|
8766
8766
|
const i = (s = n.session) === null || s === void 0 ? void 0 : s.access_token;
|
|
8767
8767
|
if (i) {
|
|
8768
8768
|
const { error: o } = await this.admin.signOut(i, e);
|
|
8769
|
-
if (o && !(vi(o) && (o.status === 404 || o.status === 401 || o.status === 403) ||
|
|
8769
|
+
if (o && !(vi(o) && (o.status === 404 || o.status === 401 || o.status === 403) || Ir(o)))
|
|
8770
8770
|
return this._returnResult({ error: o });
|
|
8771
8771
|
}
|
|
8772
8772
|
return e !== "others" && (await this._removeSession(), await ge(this.storage, `${this.storageKey}-code-verifier`)), this._returnResult({ error: null });
|
|
@@ -8824,7 +8824,7 @@ class er {
|
|
|
8824
8824
|
redirectTo: r.redirectTo
|
|
8825
8825
|
});
|
|
8826
8826
|
} catch (a) {
|
|
8827
|
-
if (await ge(this.storage, `${this.storageKey}-code-verifier`),
|
|
8827
|
+
if (await ge(this.storage, `${this.storageKey}-code-verifier`), R(a))
|
|
8828
8828
|
return this._returnResult({ data: null, error: a });
|
|
8829
8829
|
throw a;
|
|
8830
8830
|
}
|
|
@@ -8840,7 +8840,7 @@ class er {
|
|
|
8840
8840
|
throw s;
|
|
8841
8841
|
return this._returnResult({ data: { identities: (e = r.user.identities) !== null && e !== void 0 ? e : [] }, error: null });
|
|
8842
8842
|
} catch (r) {
|
|
8843
|
-
if (
|
|
8843
|
+
if (R(r))
|
|
8844
8844
|
return this._returnResult({ data: null, error: r });
|
|
8845
8845
|
throw r;
|
|
8846
8846
|
}
|
|
@@ -8874,7 +8874,7 @@ class er {
|
|
|
8874
8874
|
error: null
|
|
8875
8875
|
});
|
|
8876
8876
|
} catch (s) {
|
|
8877
|
-
if (
|
|
8877
|
+
if (R(s))
|
|
8878
8878
|
return this._returnResult({ data: { provider: e.provider, url: null }, error: s });
|
|
8879
8879
|
throw s;
|
|
8880
8880
|
}
|
|
@@ -8904,7 +8904,7 @@ class er {
|
|
|
8904
8904
|
error: new xt()
|
|
8905
8905
|
}) : (m.session && (await this._saveSession(m.session), await this._notifyAllSubscribers("USER_UPDATED", m.session)), this._returnResult({ data: m, error: p }));
|
|
8906
8906
|
} catch (n) {
|
|
8907
|
-
if (await ge(this.storage, `${this.storageKey}-code-verifier`),
|
|
8907
|
+
if (await ge(this.storage, `${this.storageKey}-code-verifier`), R(n))
|
|
8908
8908
|
return this._returnResult({ data: { user: null, session: null }, error: n });
|
|
8909
8909
|
throw n;
|
|
8910
8910
|
}
|
|
@@ -8926,7 +8926,7 @@ class er {
|
|
|
8926
8926
|
});
|
|
8927
8927
|
});
|
|
8928
8928
|
} catch (r) {
|
|
8929
|
-
if (
|
|
8929
|
+
if (R(r))
|
|
8930
8930
|
return this._returnResult({ data: null, error: r });
|
|
8931
8931
|
throw r;
|
|
8932
8932
|
}
|
|
@@ -8946,11 +8946,11 @@ class er {
|
|
|
8946
8946
|
xform: Be
|
|
8947
8947
|
})), (n, a) => {
|
|
8948
8948
|
const i = 200 * Math.pow(2, n);
|
|
8949
|
-
return a &&
|
|
8949
|
+
return a && Dr(a) && // retryable only if the request can be sent before the backoff overflows the tick duration
|
|
8950
8950
|
Date.now() + i - s < Ct;
|
|
8951
8951
|
});
|
|
8952
8952
|
} catch (s) {
|
|
8953
|
-
if (this._debug(r, "error", s),
|
|
8953
|
+
if (this._debug(r, "error", s), R(s))
|
|
8954
8954
|
return this._returnResult({ data: { session: null, user: null }, error: s });
|
|
8955
8955
|
throw s;
|
|
8956
8956
|
} finally {
|
|
@@ -8980,20 +8980,20 @@ class er {
|
|
|
8980
8980
|
const n = await dt(this.storage, this.storageKey);
|
|
8981
8981
|
if (n && this.userStorage) {
|
|
8982
8982
|
let i = await dt(this.userStorage, this.storageKey + "-user");
|
|
8983
|
-
!this.storage.isServer && Object.is(this.storage, this.userStorage) && !i && (i = { user: n.user }, await Ot(this.userStorage, this.storageKey + "-user", i)), n.user = (e = i?.user) !== null && e !== void 0 ? e :
|
|
8983
|
+
!this.storage.isServer && Object.is(this.storage, this.userStorage) && !i && (i = { user: n.user }, await Ot(this.userStorage, this.storageKey + "-user", i)), n.user = (e = i?.user) !== null && e !== void 0 ? e : $r();
|
|
8984
8984
|
} else if (n && !n.user && !n.user) {
|
|
8985
8985
|
const i = await dt(this.storage, this.storageKey + "-user");
|
|
8986
|
-
i && i?.user ? (n.user = i.user, await ge(this.storage, this.storageKey + "-user"), await Ot(this.storage, this.storageKey, n)) : n.user =
|
|
8986
|
+
i && i?.user ? (n.user = i.user, await ge(this.storage, this.storageKey + "-user"), await Ot(this.storage, this.storageKey, n)) : n.user = $r();
|
|
8987
8987
|
}
|
|
8988
8988
|
if (this._debug(s, "session from storage", n), !this._isValidSession(n)) {
|
|
8989
8989
|
this._debug(s, "session is not valid"), n !== null && await this._removeSession();
|
|
8990
8990
|
return;
|
|
8991
8991
|
}
|
|
8992
|
-
const a = ((r = n.expires_at) !== null && r !== void 0 ? r : 1 / 0) * 1e3 - Date.now() <
|
|
8993
|
-
if (this._debug(s, `session has${a ? "" : " not"} expired with margin of ${
|
|
8992
|
+
const a = ((r = n.expires_at) !== null && r !== void 0 ? r : 1 / 0) * 1e3 - Date.now() < Nr;
|
|
8993
|
+
if (this._debug(s, `session has${a ? "" : " not"} expired with margin of ${Nr}s`), a) {
|
|
8994
8994
|
if (this.autoRefreshToken && n.refresh_token) {
|
|
8995
8995
|
const { error: i } = await this._callRefreshToken(n.refresh_token);
|
|
8996
|
-
i && (console.error(i),
|
|
8996
|
+
i && (console.error(i), Dr(i) || (this._debug(s, "refresh failed with a non-retryable error, removing the session", i), await this._removeSession()));
|
|
8997
8997
|
}
|
|
8998
8998
|
} else if (n.user && n.user.__isUserNotAvailableProxy === !0)
|
|
8999
8999
|
try {
|
|
@@ -9020,7 +9020,7 @@ class er {
|
|
|
9020
9020
|
const n = `#_callRefreshToken(${e.substring(0, 5)}...)`;
|
|
9021
9021
|
this._debug(n, "begin");
|
|
9022
9022
|
try {
|
|
9023
|
-
this.refreshingDeferred = new
|
|
9023
|
+
this.refreshingDeferred = new Pr();
|
|
9024
9024
|
const { data: a, error: i } = await this._refreshAccessToken(e);
|
|
9025
9025
|
if (i)
|
|
9026
9026
|
throw i;
|
|
@@ -9030,9 +9030,9 @@ class er {
|
|
|
9030
9030
|
const o = { data: a.session, error: null };
|
|
9031
9031
|
return this.refreshingDeferred.resolve(o), o;
|
|
9032
9032
|
} catch (a) {
|
|
9033
|
-
if (this._debug(n, "error", a),
|
|
9033
|
+
if (this._debug(n, "error", a), R(a)) {
|
|
9034
9034
|
const i = { data: null, error: a };
|
|
9035
|
-
return
|
|
9035
|
+
return Dr(a) || await this._removeSession(), (r = this.refreshingDeferred) === null || r === void 0 || r.resolve(i), i;
|
|
9036
9036
|
}
|
|
9037
9037
|
throw (s = this.refreshingDeferred) === null || s === void 0 || s.reject(a), a;
|
|
9038
9038
|
} finally {
|
|
@@ -9073,10 +9073,10 @@ class er {
|
|
|
9073
9073
|
});
|
|
9074
9074
|
const n = Object.assign({}, r);
|
|
9075
9075
|
delete n.user;
|
|
9076
|
-
const a =
|
|
9076
|
+
const a = Ts(n);
|
|
9077
9077
|
await Ot(this.storage, this.storageKey, a);
|
|
9078
9078
|
} else {
|
|
9079
|
-
const n =
|
|
9079
|
+
const n = Ts(r);
|
|
9080
9080
|
await Ot(this.storage, this.storageKey, n);
|
|
9081
9081
|
}
|
|
9082
9082
|
}
|
|
@@ -9176,7 +9176,7 @@ class er {
|
|
|
9176
9176
|
return;
|
|
9177
9177
|
}
|
|
9178
9178
|
const n = Math.floor((s.expires_at * 1e3 - e) / Ct);
|
|
9179
|
-
this._debug("#_autoRefreshTokenTick()", `access token expires in ${n} ticks, a tick lasts ${Ct}ms, refresh threshold is ${
|
|
9179
|
+
this._debug("#_autoRefreshTokenTick()", `access token expires in ${n} ticks, a tick lasts ${Ct}ms, refresh threshold is ${Wr} ticks`), n <= Wr && await this._callRefreshToken(s.refresh_token);
|
|
9180
9180
|
});
|
|
9181
9181
|
} catch (r) {
|
|
9182
9182
|
console.error("Auto refresh tick failed with error. This is likely a transient error.", r);
|
|
@@ -9257,7 +9257,7 @@ class er {
|
|
|
9257
9257
|
});
|
|
9258
9258
|
});
|
|
9259
9259
|
} catch (r) {
|
|
9260
|
-
if (
|
|
9260
|
+
if (R(r))
|
|
9261
9261
|
return this._returnResult({ data: null, error: r });
|
|
9262
9262
|
throw r;
|
|
9263
9263
|
}
|
|
@@ -9277,7 +9277,7 @@ class er {
|
|
|
9277
9277
|
return u ? this._returnResult({ data: null, error: u }) : (e.factorType === "totp" && c.type === "totp" && (!((n = c?.totp) === null || n === void 0) && n.qr_code) && (c.totp.qr_code = `data:image/svg+xml;utf-8,${c.totp.qr_code}`), this._returnResult({ data: c, error: null }));
|
|
9278
9278
|
});
|
|
9279
9279
|
} catch (r) {
|
|
9280
|
-
if (
|
|
9280
|
+
if (R(r))
|
|
9281
9281
|
return this._returnResult({ data: null, error: r });
|
|
9282
9282
|
throw r;
|
|
9283
9283
|
}
|
|
@@ -9300,7 +9300,7 @@ class er {
|
|
|
9300
9300
|
return c ? this._returnResult({ data: null, error: c }) : (await this._saveSession(Object.assign({ expires_at: Math.round(Date.now() / 1e3) + o.expires_in }, o)), await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED", o), this._returnResult({ data: o, error: c }));
|
|
9301
9301
|
});
|
|
9302
9302
|
} catch (r) {
|
|
9303
|
-
if (
|
|
9303
|
+
if (R(r))
|
|
9304
9304
|
return this._returnResult({ data: null, error: r });
|
|
9305
9305
|
throw r;
|
|
9306
9306
|
}
|
|
@@ -9338,7 +9338,7 @@ class er {
|
|
|
9338
9338
|
}
|
|
9339
9339
|
});
|
|
9340
9340
|
} catch (r) {
|
|
9341
|
-
if (
|
|
9341
|
+
if (R(r))
|
|
9342
9342
|
return this._returnResult({ data: null, error: r });
|
|
9343
9343
|
throw r;
|
|
9344
9344
|
}
|
|
@@ -9385,18 +9385,18 @@ class er {
|
|
|
9385
9385
|
var r, s, n, a;
|
|
9386
9386
|
if (e)
|
|
9387
9387
|
try {
|
|
9388
|
-
const { payload: p } =
|
|
9388
|
+
const { payload: p } = mr(e);
|
|
9389
9389
|
let g = null;
|
|
9390
9390
|
p.aal && (g = p.aal);
|
|
9391
9391
|
let y = g;
|
|
9392
9392
|
const { data: { user: w }, error: S } = await this.getUser(e);
|
|
9393
9393
|
if (S)
|
|
9394
9394
|
return this._returnResult({ data: null, error: S });
|
|
9395
|
-
((s = (r = w?.factors) === null || r === void 0 ? void 0 : r.filter((
|
|
9395
|
+
((s = (r = w?.factors) === null || r === void 0 ? void 0 : r.filter((A) => A.status === "verified")) !== null && s !== void 0 ? s : []).length > 0 && (y = "aal2");
|
|
9396
9396
|
const v = p.amr || [];
|
|
9397
9397
|
return { data: { currentLevel: g, nextLevel: y, currentAuthenticationMethods: v }, error: null };
|
|
9398
9398
|
} catch (p) {
|
|
9399
|
-
if (
|
|
9399
|
+
if (R(p))
|
|
9400
9400
|
return this._returnResult({ data: null, error: p });
|
|
9401
9401
|
throw p;
|
|
9402
9402
|
}
|
|
@@ -9408,7 +9408,7 @@ class er {
|
|
|
9408
9408
|
data: { currentLevel: null, nextLevel: null, currentAuthenticationMethods: [] },
|
|
9409
9409
|
error: null
|
|
9410
9410
|
};
|
|
9411
|
-
const { payload: c } =
|
|
9411
|
+
const { payload: c } = mr(i.access_token);
|
|
9412
9412
|
let u = null;
|
|
9413
9413
|
c.aal && (u = c.aal);
|
|
9414
9414
|
let d = u;
|
|
@@ -9435,7 +9435,7 @@ class er {
|
|
|
9435
9435
|
}) : this._returnResult({ data: null, error: new Ce() });
|
|
9436
9436
|
});
|
|
9437
9437
|
} catch (r) {
|
|
9438
|
-
if (
|
|
9438
|
+
if (R(r))
|
|
9439
9439
|
return this._returnResult({ data: null, error: r });
|
|
9440
9440
|
throw r;
|
|
9441
9441
|
}
|
|
@@ -9461,7 +9461,7 @@ class er {
|
|
|
9461
9461
|
return i.data && i.data.redirect_url && ye() && !r?.skipBrowserRedirect && window.location.assign(i.data.redirect_url), i;
|
|
9462
9462
|
});
|
|
9463
9463
|
} catch (s) {
|
|
9464
|
-
if (
|
|
9464
|
+
if (R(s))
|
|
9465
9465
|
return this._returnResult({ data: null, error: s });
|
|
9466
9466
|
throw s;
|
|
9467
9467
|
}
|
|
@@ -9487,7 +9487,7 @@ class er {
|
|
|
9487
9487
|
return i.data && i.data.redirect_url && ye() && !r?.skipBrowserRedirect && window.location.assign(i.data.redirect_url), i;
|
|
9488
9488
|
});
|
|
9489
9489
|
} catch (s) {
|
|
9490
|
-
if (
|
|
9490
|
+
if (R(s))
|
|
9491
9491
|
return this._returnResult({ data: null, error: s });
|
|
9492
9492
|
throw s;
|
|
9493
9493
|
}
|
|
@@ -9507,7 +9507,7 @@ class er {
|
|
|
9507
9507
|
}) : this._returnResult({ data: null, error: new Ce() });
|
|
9508
9508
|
});
|
|
9509
9509
|
} catch (e) {
|
|
9510
|
-
if (
|
|
9510
|
+
if (R(e))
|
|
9511
9511
|
return this._returnResult({ data: null, error: e });
|
|
9512
9512
|
throw e;
|
|
9513
9513
|
}
|
|
@@ -9528,7 +9528,7 @@ class er {
|
|
|
9528
9528
|
}), { data: {}, error: null }) : this._returnResult({ data: null, error: new Ce() });
|
|
9529
9529
|
});
|
|
9530
9530
|
} catch (r) {
|
|
9531
|
-
if (
|
|
9531
|
+
if (R(r))
|
|
9532
9532
|
return this._returnResult({ data: null, error: r });
|
|
9533
9533
|
throw r;
|
|
9534
9534
|
}
|
|
@@ -9572,7 +9572,7 @@ class er {
|
|
|
9572
9572
|
return this._returnResult({ data: null, error: g });
|
|
9573
9573
|
s = p.session.access_token;
|
|
9574
9574
|
}
|
|
9575
|
-
const { header: n, payload: a, signature: i, raw: { header: o, payload: c } } =
|
|
9575
|
+
const { header: n, payload: a, signature: i, raw: { header: o, payload: c } } = mr(s);
|
|
9576
9576
|
r?.allowExpired || Ui(a.exp);
|
|
9577
9577
|
const u = !n.alg || n.alg.startsWith("HS") || !n.kid || !("crypto" in globalThis && "subtle" in globalThis.crypto) ? null : await this.fetchJwk(n.kid, r?.keys ? { keys: r.keys } : r?.jwks);
|
|
9578
9578
|
if (!u) {
|
|
@@ -9592,7 +9592,7 @@ class er {
|
|
|
9592
9592
|
"verify"
|
|
9593
9593
|
]);
|
|
9594
9594
|
if (!await crypto.subtle.verify(d, f, i, ji(`${o}.${c}`)))
|
|
9595
|
-
throw new
|
|
9595
|
+
throw new zr("Invalid JWT signature");
|
|
9596
9596
|
return {
|
|
9597
9597
|
data: {
|
|
9598
9598
|
claims: a,
|
|
@@ -9602,43 +9602,43 @@ class er {
|
|
|
9602
9602
|
error: null
|
|
9603
9603
|
};
|
|
9604
9604
|
} catch (s) {
|
|
9605
|
-
if (
|
|
9605
|
+
if (R(s))
|
|
9606
9606
|
return this._returnResult({ data: null, error: s });
|
|
9607
9607
|
throw s;
|
|
9608
9608
|
}
|
|
9609
9609
|
}
|
|
9610
9610
|
}
|
|
9611
|
-
|
|
9612
|
-
const vo =
|
|
9613
|
-
let
|
|
9614
|
-
typeof Deno < "u" ?
|
|
9615
|
-
const wo = { "X-Client-Info": `supabase-js-${
|
|
9611
|
+
tr.nextInstanceID = {};
|
|
9612
|
+
const vo = tr, bo = "2.98.0";
|
|
9613
|
+
let Gt = "";
|
|
9614
|
+
typeof Deno < "u" ? Gt = "deno" : typeof document < "u" ? Gt = "web" : typeof navigator < "u" && navigator.product === "ReactNative" ? Gt = "react-native" : Gt = "node";
|
|
9615
|
+
const wo = { "X-Client-Info": `supabase-js-${Gt}/${bo}` }, _o = { headers: wo }, ko = { schema: "public" }, So = {
|
|
9616
9616
|
autoRefreshToken: !0,
|
|
9617
9617
|
persistSession: !0,
|
|
9618
9618
|
detectSessionInUrl: !0,
|
|
9619
9619
|
flowType: "implicit"
|
|
9620
9620
|
}, xo = {};
|
|
9621
|
-
function
|
|
9621
|
+
function rr(t) {
|
|
9622
9622
|
"@babel/helpers - typeof";
|
|
9623
|
-
return
|
|
9623
|
+
return rr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
9624
9624
|
return typeof e;
|
|
9625
9625
|
} : function(e) {
|
|
9626
9626
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
9627
|
-
},
|
|
9627
|
+
}, rr(t);
|
|
9628
9628
|
}
|
|
9629
9629
|
function jo(t, e) {
|
|
9630
|
-
if (
|
|
9630
|
+
if (rr(t) != "object" || !t) return t;
|
|
9631
9631
|
var r = t[Symbol.toPrimitive];
|
|
9632
9632
|
if (r !== void 0) {
|
|
9633
9633
|
var s = r.call(t, e);
|
|
9634
|
-
if (
|
|
9634
|
+
if (rr(s) != "object") return s;
|
|
9635
9635
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9636
9636
|
}
|
|
9637
9637
|
return (e === "string" ? String : Number)(t);
|
|
9638
9638
|
}
|
|
9639
9639
|
function To(t) {
|
|
9640
9640
|
var e = jo(t, "string");
|
|
9641
|
-
return
|
|
9641
|
+
return rr(e) == "symbol" ? e : e + "";
|
|
9642
9642
|
}
|
|
9643
9643
|
function Po(t, e, r) {
|
|
9644
9644
|
return (e = To(e)) in t ? Object.defineProperty(t, e, {
|
|
@@ -9648,7 +9648,7 @@ function Po(t, e, r) {
|
|
|
9648
9648
|
writable: !0
|
|
9649
9649
|
}) : t[e] = r, t;
|
|
9650
9650
|
}
|
|
9651
|
-
function
|
|
9651
|
+
function Ns(t, e) {
|
|
9652
9652
|
var r = Object.keys(t);
|
|
9653
9653
|
if (Object.getOwnPropertySymbols) {
|
|
9654
9654
|
var s = Object.getOwnPropertySymbols(t);
|
|
@@ -9661,9 +9661,9 @@ function Os(t, e) {
|
|
|
9661
9661
|
function se(t) {
|
|
9662
9662
|
for (var e = 1; e < arguments.length; e++) {
|
|
9663
9663
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
9664
|
-
e % 2 ?
|
|
9664
|
+
e % 2 ? Ns(Object(r), !0).forEach(function(s) {
|
|
9665
9665
|
Po(t, s, r[s]);
|
|
9666
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
9666
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Ns(Object(r)).forEach(function(s) {
|
|
9667
9667
|
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(r, s));
|
|
9668
9668
|
});
|
|
9669
9669
|
}
|
|
@@ -9903,7 +9903,7 @@ function Uo(t, e) {
|
|
|
9903
9903
|
throw new Error("Supabase URL and anon key are required");
|
|
9904
9904
|
return $o(t, e);
|
|
9905
9905
|
}
|
|
9906
|
-
function
|
|
9906
|
+
function Is(t) {
|
|
9907
9907
|
const e = [];
|
|
9908
9908
|
let r = "", s = !1;
|
|
9909
9909
|
for (let n = 0; n < t.length; n++) {
|
|
@@ -9926,9 +9926,9 @@ function Mo(t) {
|
|
|
9926
9926
|
`).trim().split(`
|
|
9927
9927
|
`);
|
|
9928
9928
|
if (r.length < 2) return [];
|
|
9929
|
-
const s =
|
|
9929
|
+
const s = Is(r[0]), n = [];
|
|
9930
9930
|
for (let a = 1; a < r.length; a++) {
|
|
9931
|
-
const i =
|
|
9931
|
+
const i = Is(r[a]);
|
|
9932
9932
|
if (i.length < s.length) continue;
|
|
9933
9933
|
const o = {};
|
|
9934
9934
|
s.forEach((d, f) => {
|
|
@@ -9958,7 +9958,7 @@ function Mo(t) {
|
|
|
9958
9958
|
}
|
|
9959
9959
|
return n;
|
|
9960
9960
|
}
|
|
9961
|
-
const
|
|
9961
|
+
const Ds = {
|
|
9962
9962
|
mangal: ["mangal", "manglik", "kuja", "मंगल", "मांगलिक", "30 day", "30-day", "30 din"],
|
|
9963
9963
|
"kaal-sarp": ["kaal sarp", "kaal-sarp", "kaalsarp", "काल सर्प", "कालसर्प", "sarp"],
|
|
9964
9964
|
kaalSarp: ["kaal sarp", "kaal-sarp", "kaalsarp", "काल सर्प", "कालसर्प", "sarp"],
|
|
@@ -9972,8 +9972,8 @@ function Bo(t) {
|
|
|
9972
9972
|
const r = parseInt(e[0], 10), s = parseInt(e[1], 10) - 1, n = parseInt(e[2], 10);
|
|
9973
9973
|
return new Date(n, s, r);
|
|
9974
9974
|
}
|
|
9975
|
-
function
|
|
9976
|
-
const r =
|
|
9975
|
+
function $s(t, e) {
|
|
9976
|
+
const r = Ds[e] || Ds[e.toLowerCase()];
|
|
9977
9977
|
if (!r || r.length === 0) return null;
|
|
9978
9978
|
const s = t.filter((i) => {
|
|
9979
9979
|
const o = (i.pooja_title || "").toLowerCase(), c = (i.pooja_title_english || "").toLowerCase();
|
|
@@ -9988,11 +9988,11 @@ function Ds(t, e) {
|
|
|
9988
9988
|
return o ? o.getTime() >= n.getTime() : !0;
|
|
9989
9989
|
})[0] ?? s[0]) || null;
|
|
9990
9990
|
}
|
|
9991
|
-
let Et = [],
|
|
9991
|
+
let Et = [], Ls = 0;
|
|
9992
9992
|
const Fo = 3600 * 1e3;
|
|
9993
9993
|
async function Ko(t) {
|
|
9994
9994
|
const e = Date.now();
|
|
9995
|
-
if (Et.length > 0 && e -
|
|
9995
|
+
if (Et.length > 0 && e - Ls < Fo) return Et;
|
|
9996
9996
|
try {
|
|
9997
9997
|
const { data: r, error: s } = await t.functions.invoke("fetch-pujas");
|
|
9998
9998
|
if (s)
|
|
@@ -10000,12 +10000,12 @@ async function Ko(t) {
|
|
|
10000
10000
|
const n = typeof r == "string" ? r : "";
|
|
10001
10001
|
if (!n) return Et;
|
|
10002
10002
|
const a = Mo(n);
|
|
10003
|
-
return Et = a,
|
|
10003
|
+
return Et = a, Ls = e, a;
|
|
10004
10004
|
} catch (r) {
|
|
10005
10005
|
return console.warn("[DoshaCalculator] fetchPujas error:", r), Et;
|
|
10006
10006
|
}
|
|
10007
10007
|
}
|
|
10008
|
-
const
|
|
10008
|
+
const Us = {
|
|
10009
10009
|
"पितृ दोष निवारण महायज्ञ एवं काशी गंगा महाआरती": "Pitru Dosha Nivaran Mahayagya & Kashi Ganga Maha Aarti",
|
|
10010
10010
|
"पितृ दोष शांति महापूजा एवं काशी गंगा आरती": "Pitra Dosha Shanti Mahapuja & Kashi Ganga Aarti",
|
|
10011
10011
|
"पितृ दोष निवारण पूजा एवं काशी गंगा आरती": "Pitra Dosha Nivaran Puja & Kashi Ganga Aarti",
|
|
@@ -10079,7 +10079,7 @@ const Ls = {
|
|
|
10079
10079
|
काशी: "Kashi",
|
|
10080
10080
|
त्र्यंबकेश्वर: "Trimbakeshwar",
|
|
10081
10081
|
हथला: "Hathla"
|
|
10082
|
-
},
|
|
10082
|
+
}, Ms = {
|
|
10083
10083
|
"काशी विश्वनाथ मंदिर": "Kashi Vishwanath Temple",
|
|
10084
10084
|
"त्र्यंबकेश्वर मंदिर": "Trimbakeshwar Temple",
|
|
10085
10085
|
"त्र्यंबकेश्वर ज्योतिर्लिंग": "Trimbakeshwar Jyotirlinga",
|
|
@@ -10109,7 +10109,7 @@ function Pn(t, e) {
|
|
|
10109
10109
|
const r = e?.toLowerCase().startsWith("hi"), s = typeof t == "string" ? t : t.pooja_title, n = typeof t == "string" ? void 0 : t.pooja_title_english;
|
|
10110
10110
|
if (r) return s;
|
|
10111
10111
|
if (n?.trim()) return n;
|
|
10112
|
-
if (
|
|
10112
|
+
if (Us[s]) return Us[s];
|
|
10113
10113
|
const a = Tn(s);
|
|
10114
10114
|
return a !== s ? a : s;
|
|
10115
10115
|
}
|
|
@@ -10117,7 +10117,7 @@ function Ho(t, e) {
|
|
|
10117
10117
|
const r = e?.toLowerCase().startsWith("hi"), s = typeof t == "string" ? t : t.temple_name, n = typeof t == "string" ? void 0 : t.temple_name_english;
|
|
10118
10118
|
if (r) return s;
|
|
10119
10119
|
if (n?.trim()) return n;
|
|
10120
|
-
if (
|
|
10120
|
+
if (Ms[s]) return Ms[s];
|
|
10121
10121
|
const a = Tn(s);
|
|
10122
10122
|
return a !== s ? a : s;
|
|
10123
10123
|
}
|
|
@@ -10152,7 +10152,7 @@ function Qo() {
|
|
|
10152
10152
|
return /* @__PURE__ */ l.jsx("div", { className: Yo.container, children: "100% Accurate • Secure • Trusted by 30L+ families" });
|
|
10153
10153
|
}
|
|
10154
10154
|
const Me = (t) => ({ width: t, height: t });
|
|
10155
|
-
function
|
|
10155
|
+
function Bs(t) {
|
|
10156
10156
|
const { size: e = 24, ...r } = t;
|
|
10157
10157
|
return /* @__PURE__ */ l.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...Me(e), ...r, children: [
|
|
10158
10158
|
/* @__PURE__ */ l.jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
@@ -10160,14 +10160,14 @@ function Ms(t) {
|
|
|
10160
10160
|
/* @__PURE__ */ l.jsx("path", { d: "M12 17h.01" })
|
|
10161
10161
|
] });
|
|
10162
10162
|
}
|
|
10163
|
-
function
|
|
10163
|
+
function Fs(t) {
|
|
10164
10164
|
const { size: e = 24, ...r } = t;
|
|
10165
10165
|
return /* @__PURE__ */ l.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...Me(e), ...r, children: [
|
|
10166
10166
|
/* @__PURE__ */ l.jsx("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
10167
10167
|
/* @__PURE__ */ l.jsx("path", { d: "m9 11 3 3L22 4" })
|
|
10168
10168
|
] });
|
|
10169
10169
|
}
|
|
10170
|
-
function
|
|
10170
|
+
function Ks(t) {
|
|
10171
10171
|
const { size: e = 24, ...r } = t;
|
|
10172
10172
|
return /* @__PURE__ */ l.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...Me(e), ...r, children: [
|
|
10173
10173
|
/* @__PURE__ */ l.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
@@ -10211,7 +10211,7 @@ function An(t) {
|
|
|
10211
10211
|
const { size: e = 24, ...r } = t;
|
|
10212
10212
|
return /* @__PURE__ */ l.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...Me(e), ...r, children: /* @__PURE__ */ l.jsx("path", { d: "m6 9 6 6 6-6" }) });
|
|
10213
10213
|
}
|
|
10214
|
-
function
|
|
10214
|
+
function Vr(t) {
|
|
10215
10215
|
const { size: e = 24, className: r = "", ...s } = t;
|
|
10216
10216
|
return /* @__PURE__ */ l.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: `animate-spin ${r}`, style: { animation: "spin 1s linear infinite" }, ...Me(e), ...s, children: /* @__PURE__ */ l.jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
|
|
10217
10217
|
}
|
|
@@ -10256,7 +10256,7 @@ function yl({
|
|
|
10256
10256
|
loadingLabel: u = "Calculating..."
|
|
10257
10257
|
}) {
|
|
10258
10258
|
return a === "book-puja" && i && o ? /* @__PURE__ */ l.jsx(
|
|
10259
|
-
|
|
10259
|
+
as,
|
|
10260
10260
|
{
|
|
10261
10261
|
onClick: e,
|
|
10262
10262
|
disabled: n,
|
|
@@ -10279,13 +10279,13 @@ function yl({
|
|
|
10279
10279
|
] })
|
|
10280
10280
|
}
|
|
10281
10281
|
) : /* @__PURE__ */ l.jsx(
|
|
10282
|
-
|
|
10282
|
+
as,
|
|
10283
10283
|
{
|
|
10284
10284
|
onClick: e,
|
|
10285
10285
|
disabled: n,
|
|
10286
10286
|
className: t ? Le.ctaFilled : void 0,
|
|
10287
10287
|
children: n ? /* @__PURE__ */ l.jsxs("span", { className: Le.ctaFilledContent, children: [
|
|
10288
|
-
/* @__PURE__ */ l.jsx(
|
|
10288
|
+
/* @__PURE__ */ l.jsx(Vr, { className: "w-5 h-5 animate-spin" }),
|
|
10289
10289
|
u
|
|
10290
10290
|
] }) : t ? /* @__PURE__ */ l.jsxs("span", { className: Le.ctaFilledContent, children: [
|
|
10291
10291
|
s,
|
|
@@ -10304,7 +10304,7 @@ function yl({
|
|
|
10304
10304
|
}
|
|
10305
10305
|
);
|
|
10306
10306
|
}
|
|
10307
|
-
const vl = "_bannerContainer_1s29r_1", bl = "_bannerImage_1s29r_13", wl = "_ticker_1s29r_20", _l = "_tickerContent_1s29r_30",
|
|
10307
|
+
const vl = "_bannerContainer_1s29r_1", bl = "_bannerImage_1s29r_13", wl = "_ticker_1s29r_20", _l = "_tickerContent_1s29r_30", pr = {
|
|
10308
10308
|
bannerContainer: vl,
|
|
10309
10309
|
bannerImage: bl,
|
|
10310
10310
|
ticker: wl,
|
|
@@ -10314,17 +10314,17 @@ function kl({
|
|
|
10314
10314
|
bannerConfig: t,
|
|
10315
10315
|
className: e = ""
|
|
10316
10316
|
}) {
|
|
10317
|
-
return /* @__PURE__ */ l.jsxs("section", { className: `${
|
|
10317
|
+
return /* @__PURE__ */ l.jsxs("section", { className: `${pr.bannerContainer} ${e}`, children: [
|
|
10318
10318
|
/* @__PURE__ */ l.jsx(
|
|
10319
10319
|
"img",
|
|
10320
10320
|
{
|
|
10321
10321
|
src: t.imageUrl,
|
|
10322
10322
|
alt: t.alt,
|
|
10323
|
-
className:
|
|
10323
|
+
className: pr.bannerImage,
|
|
10324
10324
|
loading: "eager"
|
|
10325
10325
|
}
|
|
10326
10326
|
),
|
|
10327
|
-
/* @__PURE__ */ l.jsx("div", { className:
|
|
10327
|
+
/* @__PURE__ */ l.jsx("div", { className: pr.ticker, children: /* @__PURE__ */ l.jsx("div", { className: pr.tickerContent, children: t.tickerText }) })
|
|
10328
10328
|
] });
|
|
10329
10329
|
}
|
|
10330
10330
|
const Sl = 112;
|
|
@@ -10915,7 +10915,7 @@ function du({ locale: t, children: e }) {
|
|
|
10915
10915
|
be(() => {
|
|
10916
10916
|
s(t);
|
|
10917
10917
|
}, [t]);
|
|
10918
|
-
const n =
|
|
10918
|
+
const n = Yr(
|
|
10919
10919
|
() => (a) => xl[r]?.[a] ?? a,
|
|
10920
10920
|
[r]
|
|
10921
10921
|
);
|
|
@@ -10943,7 +10943,7 @@ function Il({
|
|
|
10943
10943
|
onOpen: s,
|
|
10944
10944
|
className: n = ""
|
|
10945
10945
|
}) {
|
|
10946
|
-
const a = he(null), i =
|
|
10946
|
+
const a = he(null), i = Yr(() => {
|
|
10947
10947
|
const c = /* @__PURE__ */ new Date(), u = (d) => String(d).padStart(2, "0");
|
|
10948
10948
|
return `${c.getFullYear()}-${u(c.getMonth() + 1)}-${u(c.getDate())}`;
|
|
10949
10949
|
}, []), o = () => {
|
|
@@ -11243,8 +11243,8 @@ async function rc(t, e, r = {}) {
|
|
|
11243
11243
|
"x-session-id": n
|
|
11244
11244
|
});
|
|
11245
11245
|
}
|
|
11246
|
-
let
|
|
11247
|
-
const sc = (t, e) => typeof window > "u" || window.google?.maps?.places ? Promise.resolve() :
|
|
11246
|
+
let gr = null;
|
|
11247
|
+
const sc = (t, e) => typeof window > "u" || window.google?.maps?.places ? Promise.resolve() : gr || (gr = new Promise((r, s) => {
|
|
11248
11248
|
const n = document.querySelector(
|
|
11249
11249
|
'script[data-google-maps-places="true"]'
|
|
11250
11250
|
);
|
|
@@ -11289,7 +11289,7 @@ const sc = (t, e) => typeof window > "u" || window.google?.maps?.places ? Promis
|
|
|
11289
11289
|
};
|
|
11290
11290
|
c();
|
|
11291
11291
|
}, a.onerror = () => s(new Error("Failed to load Google Maps API")), document.head.appendChild(a);
|
|
11292
|
-
}),
|
|
11292
|
+
}), gr), nc = (t = {}) => {
|
|
11293
11293
|
const { apiKey: e, language: r = "en", restrictCountry: s } = t, [n, a] = B(!1), [i, o] = B([]), [c, u] = B(!1), [d, f] = B(null), m = he(null), p = he(null), g = he(null);
|
|
11294
11294
|
be(() => {
|
|
11295
11295
|
if (!e) {
|
|
@@ -11326,7 +11326,7 @@ const sc = (t, e) => typeof window > "u" || window.google?.maps?.places ? Promis
|
|
|
11326
11326
|
sessionToken: g.current ?? void 0
|
|
11327
11327
|
};
|
|
11328
11328
|
s && (v.componentRestrictions = { country: s });
|
|
11329
|
-
const
|
|
11329
|
+
const A = await new Promise((x, N) => {
|
|
11330
11330
|
m.current.getPlacePredictions(
|
|
11331
11331
|
v,
|
|
11332
11332
|
(P, H) => {
|
|
@@ -11335,7 +11335,7 @@ const sc = (t, e) => typeof window > "u" || window.google?.maps?.places ? Promis
|
|
|
11335
11335
|
);
|
|
11336
11336
|
});
|
|
11337
11337
|
o(
|
|
11338
|
-
|
|
11338
|
+
A.map((x) => ({
|
|
11339
11339
|
place_id: x.place_id,
|
|
11340
11340
|
description: x.description,
|
|
11341
11341
|
structured_formatting: {
|
|
@@ -11370,13 +11370,13 @@ const sc = (t, e) => typeof window > "u" || window.google?.maps?.places ? Promis
|
|
|
11370
11370
|
}
|
|
11371
11371
|
);
|
|
11372
11372
|
g.current = new google.maps.places.AutocompleteSessionToken();
|
|
11373
|
-
const
|
|
11373
|
+
const A = v.geometry?.location?.lat() || 0, x = v.geometry?.location?.lng() || 0;
|
|
11374
11374
|
let N = "", P = "", H = "";
|
|
11375
11375
|
return v.address_components?.forEach((M) => {
|
|
11376
11376
|
M.types.includes("locality") && (N = M.long_name), M.types.includes("administrative_area_level_1") && (P = M.long_name), M.types.includes("country") && (H = M.long_name);
|
|
11377
11377
|
}), {
|
|
11378
11378
|
display_name: v.formatted_address || "",
|
|
11379
|
-
lat:
|
|
11379
|
+
lat: A,
|
|
11380
11380
|
lng: x,
|
|
11381
11381
|
city: N,
|
|
11382
11382
|
state: P,
|
|
@@ -11446,7 +11446,7 @@ function lc(t) {
|
|
|
11446
11446
|
const n = r.getMonth() - e.getMonth();
|
|
11447
11447
|
return (n < 0 || n === 0 && r.getDate() < e.getDate()) && s--, s;
|
|
11448
11448
|
}
|
|
11449
|
-
const
|
|
11449
|
+
const qs = Hn(
|
|
11450
11450
|
function({
|
|
11451
11451
|
t: e,
|
|
11452
11452
|
className: r = "",
|
|
@@ -11461,7 +11461,7 @@ const Ks = Hn(
|
|
|
11461
11461
|
analytics: f,
|
|
11462
11462
|
googleMapsApiKey: m
|
|
11463
11463
|
}, p) {
|
|
11464
|
-
const g = (T) => T.replace(/[^a-zA-Z\u0900-\u097F\s]/g, "").replace(/\s{2,}/g, " "), [y, w] = B(s?.name ?? ""), [S, _] = B(s?.gender ?? ""), [v,
|
|
11464
|
+
const g = (T) => T.replace(/[^a-zA-Z\u0900-\u097F\s]/g, "").replace(/\s{2,}/g, " "), [y, w] = B(s?.name ?? ""), [S, _] = B(s?.gender ?? ""), [v, A] = B(s?.problems ?? []), [x, N] = B(s?.dateOfBirth ?? ""), [P, H] = B(s?.birthTime ?? ""), [M, we] = B(s?.birthTimeUnknown ?? !1), [X, _e] = B(s?.birthPlace ?? ""), [fe, ve] = B(""), [Y, We] = B(null), [Te, Pe] = B(!1), [te, me] = B(null), [q, b] = B({}), U = qe((T) => {
|
|
11465
11465
|
const I = (Q) => {
|
|
11466
11466
|
const Ie = document.getElementById(Q);
|
|
11467
11467
|
return Ie ? (Ie.focus(), Ie.scrollIntoView({ behavior: "smooth", block: "center" }), !0) : !1;
|
|
@@ -11533,8 +11533,8 @@ const Ks = Hn(
|
|
|
11533
11533
|
return "UTC";
|
|
11534
11534
|
}
|
|
11535
11535
|
}, [m]), Ye = qe(async () => {
|
|
11536
|
-
const T = (le, Se,
|
|
11537
|
-
Se && (b((V) => ({ ...V, [Se]: le })), U(Se)), me(
|
|
11536
|
+
const T = (le, Se, E = !1) => {
|
|
11537
|
+
Se && (b((V) => ({ ...V, [Se]: le })), U(Se)), me(E ? le : null), u?.(le);
|
|
11538
11538
|
};
|
|
11539
11539
|
if (b({}), me(null), !i) {
|
|
11540
11540
|
T(e("calculationError"));
|
|
@@ -11586,16 +11586,16 @@ const Ks = Hn(
|
|
|
11586
11586
|
}
|
|
11587
11587
|
d?.(!0);
|
|
11588
11588
|
try {
|
|
11589
|
-
let le, Se,
|
|
11589
|
+
let le, Se, E;
|
|
11590
11590
|
if (Y)
|
|
11591
|
-
le = Y.lat, Se = Y.lon, Y.tz ?
|
|
11591
|
+
le = Y.lat, Se = Y.lon, Y.tz ? E = Y.tz : (E = await ze(le, Se), We({ ...Y, tz: E }));
|
|
11592
11592
|
else if (o) {
|
|
11593
11593
|
const pe = await o(I);
|
|
11594
11594
|
if (!pe) {
|
|
11595
11595
|
T(e("locationError")), d?.(!1);
|
|
11596
11596
|
return;
|
|
11597
11597
|
}
|
|
11598
|
-
le = pe.lat, Se = pe.lon,
|
|
11598
|
+
le = pe.lat, Se = pe.lon, E = pe.tz;
|
|
11599
11599
|
} else {
|
|
11600
11600
|
T(e("formPlaceSelectFromDropdown"), "birthPlace"), d?.(!1);
|
|
11601
11601
|
return;
|
|
@@ -11610,7 +11610,7 @@ const Ks = Hn(
|
|
|
11610
11610
|
date: x,
|
|
11611
11611
|
time: M ? "" : P || "12:00",
|
|
11612
11612
|
unknownTime: M,
|
|
11613
|
-
tz:
|
|
11613
|
+
tz: E || "UTC",
|
|
11614
11614
|
lat: le,
|
|
11615
11615
|
lon: Se,
|
|
11616
11616
|
place: Q,
|
|
@@ -11626,10 +11626,10 @@ const Ks = Hn(
|
|
|
11626
11626
|
});
|
|
11627
11627
|
if (Ut.success) {
|
|
11628
11628
|
me(null);
|
|
11629
|
-
const [pe,
|
|
11629
|
+
const [pe, Er, Mt] = (V.date || "").split("-").map(Number), nr = V.time || "12:00", [et, Bt] = nr.split(":").map((ir) => parseInt(ir, 10) || 0);
|
|
11630
11630
|
c?.(Ut, {
|
|
11631
11631
|
day: Mt || 1,
|
|
11632
|
-
month:
|
|
11632
|
+
month: Er || 1,
|
|
11633
11633
|
year: pe || 2e3,
|
|
11634
11634
|
hour: et,
|
|
11635
11635
|
minute: Bt,
|
|
@@ -11667,7 +11667,7 @@ const Ks = Hn(
|
|
|
11667
11667
|
Ae(), f?.trackNameSectionClicked?.();
|
|
11668
11668
|
}, children: /* @__PURE__ */ l.jsxs(kt, { id: "dosha-name", label: e("formNameLabel"), required: !0, children: [
|
|
11669
11669
|
/* @__PURE__ */ l.jsx(
|
|
11670
|
-
|
|
11670
|
+
is,
|
|
11671
11671
|
{
|
|
11672
11672
|
id: "dosha-name",
|
|
11673
11673
|
value: y,
|
|
@@ -11706,13 +11706,13 @@ const Ks = Hn(
|
|
|
11706
11706
|
options: wt,
|
|
11707
11707
|
selected: v,
|
|
11708
11708
|
onChange: (T) => {
|
|
11709
|
-
|
|
11709
|
+
A(T), T.includes("formProblemOther") || ve("");
|
|
11710
11710
|
}
|
|
11711
11711
|
}
|
|
11712
11712
|
),
|
|
11713
11713
|
v.includes("formProblemOther") && /* @__PURE__ */ l.jsxs("div", { style: { marginTop: "8px" }, children: [
|
|
11714
11714
|
/* @__PURE__ */ l.jsx(
|
|
11715
|
-
|
|
11715
|
+
is,
|
|
11716
11716
|
{
|
|
11717
11717
|
id: "dosha-problem-other",
|
|
11718
11718
|
value: fe,
|
|
@@ -11987,11 +11987,11 @@ const gt = Ne.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.j
|
|
|
11987
11987
|
}
|
|
11988
11988
|
));
|
|
11989
11989
|
gt.displayName = "CardTitle";
|
|
11990
|
-
const
|
|
11991
|
-
|
|
11990
|
+
const br = Ne.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx("p", { ref: r, className: `text-sm text-muted-foreground ${t}`, ...e }));
|
|
11991
|
+
br.displayName = "CardDescription";
|
|
11992
11992
|
const yt = Ne.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx("div", { ref: r, className: `p-6 pt-0 ${t}`, ...e }));
|
|
11993
11993
|
yt.displayName = "CardContent";
|
|
11994
|
-
const
|
|
11994
|
+
const wr = Ne.forwardRef(
|
|
11995
11995
|
({ className: t = "", variant: e = "default", ...r }, s) => {
|
|
11996
11996
|
const n = {
|
|
11997
11997
|
default: "border-transparent bg-primary text-primary-foreground",
|
|
@@ -12009,9 +12009,9 @@ const br = Ne.forwardRef(
|
|
|
12009
12009
|
);
|
|
12010
12010
|
}
|
|
12011
12011
|
);
|
|
12012
|
-
|
|
12013
|
-
const
|
|
12014
|
-
function
|
|
12012
|
+
wr.displayName = "Badge";
|
|
12013
|
+
const Zr = Ne.createContext(null);
|
|
12014
|
+
function Ws({
|
|
12015
12015
|
type: t = "single",
|
|
12016
12016
|
collapsible: e = !0,
|
|
12017
12017
|
className: r = "",
|
|
@@ -12027,17 +12027,17 @@ function qs({
|
|
|
12027
12027
|
},
|
|
12028
12028
|
[e, n]
|
|
12029
12029
|
);
|
|
12030
|
-
return /* @__PURE__ */ l.jsx(
|
|
12030
|
+
return /* @__PURE__ */ l.jsx(Zr.Provider, { value: { value: a, onToggle: o }, children: /* @__PURE__ */ l.jsx("div", { className: r, children: s }) });
|
|
12031
12031
|
}
|
|
12032
|
-
function
|
|
12032
|
+
function Hs({ value: t, className: e = "", children: r }) {
|
|
12033
12033
|
return /* @__PURE__ */ l.jsx("div", { "data-state": t, className: `border-b border-border ${e}`, children: r });
|
|
12034
12034
|
}
|
|
12035
|
-
function
|
|
12035
|
+
function Gs({
|
|
12036
12036
|
className: t = "",
|
|
12037
12037
|
children: e,
|
|
12038
12038
|
value: r
|
|
12039
12039
|
}) {
|
|
12040
|
-
const s = Ne.useContext(
|
|
12040
|
+
const s = Ne.useContext(Zr), n = s?.value === r;
|
|
12041
12041
|
return /* @__PURE__ */ l.jsxs(
|
|
12042
12042
|
"button",
|
|
12043
12043
|
{
|
|
@@ -12057,14 +12057,14 @@ function Hs({
|
|
|
12057
12057
|
}
|
|
12058
12058
|
);
|
|
12059
12059
|
}
|
|
12060
|
-
function
|
|
12060
|
+
function zs({
|
|
12061
12061
|
className: t = "",
|
|
12062
12062
|
children: e,
|
|
12063
12063
|
value: r
|
|
12064
12064
|
}) {
|
|
12065
|
-
return Ne.useContext(
|
|
12065
|
+
return Ne.useContext(Zr)?.value === r ? /* @__PURE__ */ l.jsx("div", { className: `overflow-hidden text-sm pb-4 pt-0 ${t}`, children: e }) : null;
|
|
12066
12066
|
}
|
|
12067
|
-
const
|
|
12067
|
+
const Jt = Ne.forwardRef(
|
|
12068
12068
|
({ className: t = "", size: e = "default", variant: r = "default", ...s }, n) => {
|
|
12069
12069
|
const a = {
|
|
12070
12070
|
default: "h-10 px-4 py-2",
|
|
@@ -12089,7 +12089,7 @@ const Vt = Ne.forwardRef(
|
|
|
12089
12089
|
);
|
|
12090
12090
|
}
|
|
12091
12091
|
);
|
|
12092
|
-
|
|
12092
|
+
Jt.displayName = "Button";
|
|
12093
12093
|
const On = Ne.forwardRef(
|
|
12094
12094
|
({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx(
|
|
12095
12095
|
"div",
|
|
@@ -12101,20 +12101,20 @@ const On = Ne.forwardRef(
|
|
|
12101
12101
|
)
|
|
12102
12102
|
);
|
|
12103
12103
|
On.displayName = "Skeleton";
|
|
12104
|
-
const
|
|
12104
|
+
const Jr = /* @__PURE__ */ new Map(), Vs = 1800 * 1e3;
|
|
12105
12105
|
function cc(t, e, r) {
|
|
12106
12106
|
return `D1|${e}|svg|${t.day}-${t.month}-${t.year}-${t.hour}-${t.minute}-${t.lat}-${t.lon}-${t.tzone}|${r}`;
|
|
12107
12107
|
}
|
|
12108
12108
|
function uc(t) {
|
|
12109
|
-
const e =
|
|
12110
|
-
if (e && Date.now() - e.timestamp <
|
|
12109
|
+
const e = Jr.get(t);
|
|
12110
|
+
if (e && Date.now() - e.timestamp < Vs)
|
|
12111
12111
|
return e.svg;
|
|
12112
12112
|
try {
|
|
12113
12113
|
const r = sessionStorage.getItem(`kundali_${t}`);
|
|
12114
12114
|
if (r) {
|
|
12115
12115
|
const s = JSON.parse(r);
|
|
12116
|
-
if (Date.now() - s.timestamp <
|
|
12117
|
-
return
|
|
12116
|
+
if (Date.now() - s.timestamp < Vs)
|
|
12117
|
+
return Jr.set(t, s), s.svg;
|
|
12118
12118
|
sessionStorage.removeItem(`kundali_${t}`);
|
|
12119
12119
|
}
|
|
12120
12120
|
} catch {
|
|
@@ -12123,7 +12123,7 @@ function uc(t) {
|
|
|
12123
12123
|
}
|
|
12124
12124
|
function dc(t, e) {
|
|
12125
12125
|
const r = { svg: e, timestamp: Date.now() };
|
|
12126
|
-
|
|
12126
|
+
Jr.set(t, r);
|
|
12127
12127
|
try {
|
|
12128
12128
|
sessionStorage.setItem(`kundali_${t}`, JSON.stringify(r));
|
|
12129
12129
|
} catch {
|
|
@@ -12161,19 +12161,19 @@ function mc({ birthDetails: t, supabase: e, language: r, t: s }) {
|
|
|
12161
12161
|
const [n, a] = B("North"), [i, o] = B("idle"), [c, u] = B(""), [d, f] = B(""), m = he(null), p = he(null), y = (r || "").toLowerCase().startsWith("hi") ? "hi" : "en", w = qe(
|
|
12162
12162
|
async (v) => {
|
|
12163
12163
|
m.current && m.current.abort();
|
|
12164
|
-
const
|
|
12165
|
-
m.current =
|
|
12164
|
+
const A = new AbortController();
|
|
12165
|
+
m.current = A, o("loading"), f("");
|
|
12166
12166
|
try {
|
|
12167
12167
|
const x = await fc(e, {
|
|
12168
12168
|
birthDetails: t,
|
|
12169
12169
|
chartType: v,
|
|
12170
12170
|
language: y,
|
|
12171
|
-
signal:
|
|
12171
|
+
signal: A.signal
|
|
12172
12172
|
});
|
|
12173
|
-
|
|
12173
|
+
A.signal.aborted || (u(x), o("success"));
|
|
12174
12174
|
} catch (x) {
|
|
12175
12175
|
if (x instanceof Error && x.name === "AbortError") return;
|
|
12176
|
-
console.error("[KundaliCard] Fetch error:", x),
|
|
12176
|
+
console.error("[KundaliCard] Fetch error:", x), A.signal.aborted || (f(x instanceof Error ? x.message : "Failed to load chart"), o("error"));
|
|
12177
12177
|
}
|
|
12178
12178
|
},
|
|
12179
12179
|
[t, e, y]
|
|
@@ -12191,7 +12191,7 @@ function mc({ birthDetails: t, supabase: e, language: r, t: s }) {
|
|
|
12191
12191
|
/* @__PURE__ */ l.jsx(gt, { className: "text-xl font-bold", children: s("drYourKundali") }),
|
|
12192
12192
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2 mt-3", children: [
|
|
12193
12193
|
/* @__PURE__ */ l.jsx(
|
|
12194
|
-
|
|
12194
|
+
Jt,
|
|
12195
12195
|
{
|
|
12196
12196
|
type: "button",
|
|
12197
12197
|
size: "sm",
|
|
@@ -12202,7 +12202,7 @@ function mc({ birthDetails: t, supabase: e, language: r, t: s }) {
|
|
|
12202
12202
|
}
|
|
12203
12203
|
),
|
|
12204
12204
|
/* @__PURE__ */ l.jsx(
|
|
12205
|
-
|
|
12205
|
+
Jt,
|
|
12206
12206
|
{
|
|
12207
12207
|
type: "button",
|
|
12208
12208
|
size: "sm",
|
|
@@ -12226,7 +12226,7 @@ function mc({ birthDetails: t, supabase: e, language: r, t: s }) {
|
|
|
12226
12226
|
i === "error" && /* @__PURE__ */ l.jsxs("div", { className: "w-full aspect-square flex flex-col items-center justify-center bg-muted/30 rounded-lg border border-border", children: [
|
|
12227
12227
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground mb-3", children: s("kundaliChartLoadError") }),
|
|
12228
12228
|
/* @__PURE__ */ l.jsxs(
|
|
12229
|
-
|
|
12229
|
+
Jt,
|
|
12230
12230
|
{
|
|
12231
12231
|
type: "button",
|
|
12232
12232
|
variant: "outline",
|
|
@@ -12247,7 +12247,7 @@ const pc = [
|
|
|
12247
12247
|
{ qKey: "faqQ1", aKey: "faqA1" },
|
|
12248
12248
|
{ qKey: "faqQ2", aKey: "faqA2" },
|
|
12249
12249
|
{ qKey: "faqQ3", aKey: "faqA3" }
|
|
12250
|
-
],
|
|
12250
|
+
], Js = [
|
|
12251
12251
|
{
|
|
12252
12252
|
type: "kaal-sarp",
|
|
12253
12253
|
detailKey: "kaalSarp",
|
|
@@ -12320,10 +12320,10 @@ function Ue(t) {
|
|
|
12320
12320
|
const e = t.toLowerCase();
|
|
12321
12321
|
return e === "present" || e === "active" || e === "partial" || e === "suggested";
|
|
12322
12322
|
}
|
|
12323
|
-
function
|
|
12323
|
+
function yr(t) {
|
|
12324
12324
|
return t ? t.toLowerCase().includes("nullified") : !1;
|
|
12325
12325
|
}
|
|
12326
|
-
function
|
|
12326
|
+
function Ys(t, e) {
|
|
12327
12327
|
if (Array.isArray(t)) {
|
|
12328
12328
|
const r = t.find(
|
|
12329
12329
|
(a) => (a.name ?? a.type) === e
|
|
@@ -12349,17 +12349,17 @@ function Js(t, e) {
|
|
|
12349
12349
|
};
|
|
12350
12350
|
}
|
|
12351
12351
|
}
|
|
12352
|
-
function
|
|
12352
|
+
function Qs(t, e) {
|
|
12353
12353
|
if (!t) return "";
|
|
12354
12354
|
const r = t.toLowerCase();
|
|
12355
12355
|
return r.includes("nullified") ? e("drStatusNullified") : r === "present" || r === "active" || r === "partial" || r === "suggested" ? e("drStatusPresent") : r === "absent" ? e("drStatusAbsent") : r === "inactive" ? e("drStatusInactive") : t;
|
|
12356
12356
|
}
|
|
12357
|
-
function
|
|
12357
|
+
function Xs(t) {
|
|
12358
12358
|
if (!t) return 2;
|
|
12359
12359
|
const e = t.toLowerCase();
|
|
12360
12360
|
return e === "severe" || e === "high" ? 3 : e === "moderate" || e === "medium" ? 2 : e === "mild" || e === "low" ? 1 : 2;
|
|
12361
12361
|
}
|
|
12362
|
-
function
|
|
12362
|
+
function Zs(t, e) {
|
|
12363
12363
|
if (!t) return e("drSeverityMedium");
|
|
12364
12364
|
const r = t.toLowerCase();
|
|
12365
12365
|
return e(r === "severe" || r === "high" ? "drSeverityHigh" : r === "moderate" || r === "medium" ? "drSeverityMedium" : r === "mild" || r === "low" ? "drSeverityLow" : "drSeverityMedium");
|
|
@@ -12387,14 +12387,14 @@ function vc({
|
|
|
12387
12387
|
problemAreaIds: w,
|
|
12388
12388
|
customProblemText: S
|
|
12389
12389
|
}) {
|
|
12390
|
-
const [_, v] = B({}), [
|
|
12390
|
+
const [_, v] = B({}), [A, x] = B(!1), N = !c && u && d, P = t.summary ?? {}, H = t.details ?? {};
|
|
12391
12391
|
be(() => {
|
|
12392
12392
|
if (!y || !y.trim() || !d) {
|
|
12393
12393
|
x(!1);
|
|
12394
12394
|
return;
|
|
12395
12395
|
}
|
|
12396
12396
|
x(!0), v({}), (async () => {
|
|
12397
|
-
const U = {}, W = ["mangal", "kaal-sarp", "pitra", "shani"].filter((D) => D === "mangal" ? Ue(P.mangal) && !
|
|
12397
|
+
const U = {}, W = ["mangal", "kaal-sarp", "pitra", "shani"].filter((D) => D === "mangal" ? Ue(P.mangal) && !yr(P.mangal) : D === "kaal-sarp" ? Ue(P.kaalSarp) : D === "pitra" ? Ue(P.pitra) : D === "shani" ? Ue(P.shaniSadeSati ?? P.sadeSati) : !1);
|
|
12398
12398
|
console.log("[DoshaResultsFull] Generating impacts for:", W, "problemArea:", y);
|
|
12399
12399
|
const G = W.map(async (D) => {
|
|
12400
12400
|
try {
|
|
@@ -12425,11 +12425,11 @@ function vc({
|
|
|
12425
12425
|
await Promise.all(G), console.log("[DoshaResultsFull] Final personalized impacts:", U), v(U), x(!1);
|
|
12426
12426
|
})();
|
|
12427
12427
|
}, [y, w, S, f, d, P]);
|
|
12428
|
-
const M = P.shaniSadeSati ?? P.sadeSati, we = Ue(P.mangal) && !
|
|
12429
|
-
for (const b of
|
|
12428
|
+
const M = P.shaniSadeSati ?? P.sadeSati, we = Ue(P.mangal) && !yr(P.mangal) || Ue(P.kaalSarp) || Ue(P.pitra) || Ue(M), X = [];
|
|
12429
|
+
for (const b of Js) {
|
|
12430
12430
|
const U = b.summaryKey === "shaniSadeSati" ? M : P[b.summaryKey];
|
|
12431
|
-
if (!Ue(U) || b.type === "mangal" &&
|
|
12432
|
-
const re = P[b.severityKey], W = b.type === "shani" ? P.shaniPhase ?? P.shaniPhase : void 0, G =
|
|
12431
|
+
if (!Ue(U) || b.type === "mangal" && yr(U)) continue;
|
|
12432
|
+
const re = P[b.severityKey], W = b.type === "shani" ? P.shaniPhase ?? P.shaniPhase : void 0, G = Ys(H, b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey), D = G?.explanation, $ = D && !(f.toLowerCase().startsWith("hi") && yc(D)) ? D : e(b.descKey), ue = (G?.remedies ?? e(b.remediesKey)).split(`
|
|
12433
12433
|
`).map((He) => He.trim()).filter(Boolean), ke = e(b.benefitsKey).split(`
|
|
12434
12434
|
`).map((He) => He.trim()).filter(Boolean);
|
|
12435
12435
|
X.push({
|
|
@@ -12447,7 +12447,7 @@ function vc({
|
|
|
12447
12447
|
benefits: ke
|
|
12448
12448
|
});
|
|
12449
12449
|
}
|
|
12450
|
-
X.sort((b, U) =>
|
|
12450
|
+
X.sort((b, U) => Xs(U.severity) - Xs(b.severity));
|
|
12451
12451
|
const _e = [
|
|
12452
12452
|
{ summaryKey: "grahan", detailKey: "grahan", labelKey: "drOtherGrahan" },
|
|
12453
12453
|
{ summaryKey: "shrapit", detailKey: "shrapit", labelKey: "drOtherShrapit" },
|
|
@@ -12538,17 +12538,17 @@ function vc({
|
|
|
12538
12538
|
{
|
|
12539
12539
|
className: "inline-flex items-center gap-2 bg-accent/20 border border-accent/30 px-4 py-2 rounded-full",
|
|
12540
12540
|
children: [
|
|
12541
|
-
/* @__PURE__ */ l.jsx(
|
|
12541
|
+
/* @__PURE__ */ l.jsx(Bs, { className: "w-4 h-4 text-primary" }),
|
|
12542
12542
|
/* @__PURE__ */ l.jsxs("span", { className: "font-medium text-sm text-foreground", children: [
|
|
12543
12543
|
b.label,
|
|
12544
12544
|
": ",
|
|
12545
|
-
|
|
12545
|
+
Qs(b.status, e)
|
|
12546
12546
|
] })
|
|
12547
12547
|
]
|
|
12548
12548
|
},
|
|
12549
12549
|
b.type
|
|
12550
12550
|
)) }) : /* @__PURE__ */ l.jsxs("div", { className: "text-center py-8", children: [
|
|
12551
|
-
/* @__PURE__ */ l.jsx(
|
|
12551
|
+
/* @__PURE__ */ l.jsx(Fs, { className: "w-12 h-12 mx-auto mb-4 text-success" }),
|
|
12552
12552
|
/* @__PURE__ */ l.jsx("p", { className: "text-lg font-medium text-foreground", children: e("resultNoDoshas") }),
|
|
12553
12553
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground mt-2", children: e("resultNoDoshasDesc") })
|
|
12554
12554
|
] }) })
|
|
@@ -12560,23 +12560,23 @@ function vc({
|
|
|
12560
12560
|
{
|
|
12561
12561
|
className: `spiritual-glow border border-primary/10 mx-4 ${G}`,
|
|
12562
12562
|
children: [
|
|
12563
|
-
/* @__PURE__ */ l.jsx("div", { className: "px-4 pt-3", children: /* @__PURE__ */ l.jsx(
|
|
12563
|
+
/* @__PURE__ */ l.jsx("div", { className: "px-4 pt-3", children: /* @__PURE__ */ l.jsx(wr, { variant: "outline", className: "text-xs font-normal text-muted-foreground", children: D }) }),
|
|
12564
12564
|
/* @__PURE__ */ l.jsxs(pt, { className: "pb-3 pt-2", children: [
|
|
12565
12565
|
/* @__PURE__ */ l.jsxs(gt, { className: "flex items-center gap-3 text-xl", children: [
|
|
12566
12566
|
/* @__PURE__ */ l.jsx(re, { className: "w-6 h-6 text-primary" }),
|
|
12567
12567
|
b.label
|
|
12568
12568
|
] }),
|
|
12569
|
-
/* @__PURE__ */ l.jsxs(
|
|
12569
|
+
/* @__PURE__ */ l.jsxs(br, { children: [
|
|
12570
12570
|
e("drSeverity"),
|
|
12571
12571
|
": ",
|
|
12572
|
-
|
|
12572
|
+
Zs(b.severity, e),
|
|
12573
12573
|
b.phase != null && ` • ${e("drPhase")}: ${b.phase}`
|
|
12574
12574
|
] })
|
|
12575
12575
|
] }),
|
|
12576
12576
|
/* @__PURE__ */ l.jsxs(yt, { className: "space-y-4", children: [
|
|
12577
12577
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
12578
12578
|
/* @__PURE__ */ l.jsxs("h4", { className: "font-semibold text-base flex items-center gap-2", children: [
|
|
12579
|
-
/* @__PURE__ */ l.jsx(
|
|
12579
|
+
/* @__PURE__ */ l.jsx(Ks, { className: "w-4 h-4 text-primary" }),
|
|
12580
12580
|
e("drWhyMarked"),
|
|
12581
12581
|
n && /* @__PURE__ */ l.jsxs(
|
|
12582
12582
|
"button",
|
|
@@ -12606,14 +12606,14 @@ function vc({
|
|
|
12606
12606
|
] }),
|
|
12607
12607
|
/* @__PURE__ */ l.jsxs("div", { className: "p-4 bg-destructive/10 border border-destructive/20 rounded-lg", children: [
|
|
12608
12608
|
/* @__PURE__ */ l.jsx("h4", { className: "font-semibold text-sm mb-2 text-destructive", children: _[b.type]?.title || e("drImpactIfPresent") }),
|
|
12609
|
-
|
|
12610
|
-
/* @__PURE__ */ l.jsx(
|
|
12609
|
+
A ? /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
12610
|
+
/* @__PURE__ */ l.jsx(Vr, { className: "w-4 h-4 animate-spin" }),
|
|
12611
12611
|
/* @__PURE__ */ l.jsx("span", { children: f === "hi" ? "प्रभाव विश्लेषण हो रहा है..." : "Analyzing impact..." })
|
|
12612
12612
|
] }) : /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: _[b.type]?.text || b.impact })
|
|
12613
12613
|
] }),
|
|
12614
12614
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
12615
12615
|
/* @__PURE__ */ l.jsx("h4", { className: "font-semibold text-base", children: e("drPujaRecommendation") }),
|
|
12616
|
-
i ? o ? /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ l.jsx(
|
|
12616
|
+
i ? o ? /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ l.jsx(Vr, { className: "w-6 h-6 text-primary animate-spin", size: 24 }) }) : (() => {
|
|
12617
12617
|
const $ = gc(
|
|
12618
12618
|
b.type,
|
|
12619
12619
|
b.detailKey
|
|
@@ -12654,29 +12654,29 @@ function vc({
|
|
|
12654
12654
|
/* @__PURE__ */ l.jsxs(at, { className: "spiritual-glow mx-4", children: [
|
|
12655
12655
|
/* @__PURE__ */ l.jsxs(pt, { children: [
|
|
12656
12656
|
/* @__PURE__ */ l.jsx(gt, { className: "text-2xl font-bold text-center gradient-spiritual bg-clip-text text-transparent", children: e("drDetailedAnalysis") }),
|
|
12657
|
-
/* @__PURE__ */ l.jsx(
|
|
12657
|
+
/* @__PURE__ */ l.jsx(br, { className: "text-center", children: e("drBasedOnChart") })
|
|
12658
12658
|
] }),
|
|
12659
|
-
/* @__PURE__ */ l.jsx(yt, { className: "space-y-4", children: /* @__PURE__ */ l.jsx(
|
|
12660
|
-
const U = b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey, re = b.summaryKey === "shaniSadeSati" ? M : P[b.summaryKey], W =
|
|
12659
|
+
/* @__PURE__ */ l.jsx(yt, { className: "space-y-4", children: /* @__PURE__ */ l.jsx(Ws, { type: "single", collapsible: !0, className: "w-full space-y-4", children: Js.map((b) => {
|
|
12660
|
+
const U = b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey, re = b.summaryKey === "shaniSadeSati" ? M : P[b.summaryKey], W = Ys(
|
|
12661
12661
|
H,
|
|
12662
12662
|
b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey
|
|
12663
12663
|
), G = P[b.severityKey], D = b.type === "shani" ? P.shaniPhase : void 0, $ = b.icon, ue = (W?.remedies ?? e(b.remediesKey)).split(`
|
|
12664
12664
|
`).map((Ee) => Ee.trim()).filter(Boolean);
|
|
12665
|
-
return /* @__PURE__ */ l.jsxs(
|
|
12666
|
-
/* @__PURE__ */ l.jsx(
|
|
12665
|
+
return /* @__PURE__ */ l.jsxs(Hs, { value: U, className: "border border-border rounded-lg px-4", children: [
|
|
12666
|
+
/* @__PURE__ */ l.jsx(Gs, { value: U, className: "hover:no-underline", children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
12667
12667
|
/* @__PURE__ */ l.jsx($, { className: "w-5 h-5 text-destructive" }),
|
|
12668
12668
|
/* @__PURE__ */ l.jsxs("div", { className: "text-left", children: [
|
|
12669
12669
|
/* @__PURE__ */ l.jsx("h3", { className: "font-semibold text-lg", children: e(b.nameKey) }),
|
|
12670
12670
|
/* @__PURE__ */ l.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
12671
12671
|
e("drStatus"),
|
|
12672
12672
|
": ",
|
|
12673
|
-
|
|
12674
|
-
G && !
|
|
12673
|
+
Qs(re, e),
|
|
12674
|
+
G && !yr(re) && ` • ${e("drSeverity")}: ${Zs(G, e)}`,
|
|
12675
12675
|
b.type === "shani" && D != null && ` • ${e("drPhase")}: ${D}`
|
|
12676
12676
|
] })
|
|
12677
12677
|
] })
|
|
12678
12678
|
] }) }),
|
|
12679
|
-
/* @__PURE__ */ l.jsxs(
|
|
12679
|
+
/* @__PURE__ */ l.jsxs(zs, { value: U, className: "pt-4 space-y-4", children: [
|
|
12680
12680
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground italic", children: e(b.descKey) }),
|
|
12681
12681
|
W?.explanation && /* @__PURE__ */ l.jsxs("div", { children: [
|
|
12682
12682
|
/* @__PURE__ */ l.jsx("h4", { className: "font-medium mb-2", children: e("drExplanation") }),
|
|
@@ -12703,7 +12703,7 @@ function vc({
|
|
|
12703
12703
|
children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
12704
12704
|
/* @__PURE__ */ l.jsxs("div", { className: "text-left flex-1 min-w-0", children: [
|
|
12705
12705
|
/* @__PURE__ */ l.jsx(gt, { className: "text-xl font-semibold", children: e("drOtherDoshas") }),
|
|
12706
|
-
/* @__PURE__ */ l.jsx(
|
|
12706
|
+
/* @__PURE__ */ l.jsx(br, { children: e(ve ? "drOtherDoshasStatusActive" : "drOtherDoshasStatusNone") })
|
|
12707
12707
|
] }),
|
|
12708
12708
|
/* @__PURE__ */ l.jsx(
|
|
12709
12709
|
An,
|
|
@@ -12714,28 +12714,28 @@ function vc({
|
|
|
12714
12714
|
] })
|
|
12715
12715
|
}
|
|
12716
12716
|
),
|
|
12717
|
-
Y && /* @__PURE__ */ l.jsx(yt, { children: /* @__PURE__ */ l.jsx(
|
|
12717
|
+
Y && /* @__PURE__ */ l.jsx(yt, { children: /* @__PURE__ */ l.jsx(Ws, { type: "single", collapsible: !0, className: "w-full space-y-2", children: _e.map((b) => {
|
|
12718
12718
|
const U = P[b.summaryKey], re = Ue(U), W = Pe[b.detailKey] ?? {}, G = W.explanation, D = W.placements;
|
|
12719
12719
|
return /* @__PURE__ */ l.jsxs(
|
|
12720
|
-
|
|
12720
|
+
Hs,
|
|
12721
12721
|
{
|
|
12722
12722
|
value: b.summaryKey,
|
|
12723
12723
|
className: "border border-border rounded-lg px-3",
|
|
12724
12724
|
children: [
|
|
12725
|
-
/* @__PURE__ */ l.jsx(
|
|
12725
|
+
/* @__PURE__ */ l.jsx(Gs, { value: b.summaryKey, className: "hover:no-underline py-3", children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0 mr-2", children: [
|
|
12726
12726
|
/* @__PURE__ */ l.jsx("span", { className: "font-semibold text-sm text-left leading-tight", children: e(b.labelKey) }),
|
|
12727
|
-
re ? /* @__PURE__ */ l.jsxs(
|
|
12728
|
-
/* @__PURE__ */ l.jsx(Ms, { size: 10 }),
|
|
12729
|
-
e("drStatusPresent")
|
|
12730
|
-
] }) : /* @__PURE__ */ l.jsxs(br, { variant: "secondary", className: "flex-shrink-0 text-xs flex items-center gap-1 bg-green-50 text-green-700 border border-green-200", children: [
|
|
12727
|
+
re ? /* @__PURE__ */ l.jsxs(wr, { variant: "destructive", className: "flex-shrink-0 text-xs flex items-center gap-1", children: [
|
|
12731
12728
|
/* @__PURE__ */ l.jsx(Bs, { size: 10 }),
|
|
12729
|
+
e("drStatusPresent")
|
|
12730
|
+
] }) : /* @__PURE__ */ l.jsxs(wr, { variant: "secondary", className: "flex-shrink-0 text-xs flex items-center gap-1 bg-green-50 text-green-700 border border-green-200", children: [
|
|
12731
|
+
/* @__PURE__ */ l.jsx(Fs, { size: 10 }),
|
|
12732
12732
|
e("drStatusAbsent")
|
|
12733
12733
|
] })
|
|
12734
12734
|
] }) }),
|
|
12735
|
-
/* @__PURE__ */ l.jsxs(
|
|
12735
|
+
/* @__PURE__ */ l.jsxs(zs, { value: b.summaryKey, className: "space-y-3 pt-0 pb-3", children: [
|
|
12736
12736
|
D && D.length > 0 && /* @__PURE__ */ l.jsxs("div", { className: "p-3 bg-accent/10 rounded-md border border-accent/20", children: [
|
|
12737
12737
|
/* @__PURE__ */ l.jsxs("h5", { className: "font-medium mb-2 flex items-center gap-2 text-sm", children: [
|
|
12738
|
-
/* @__PURE__ */ l.jsx(
|
|
12738
|
+
/* @__PURE__ */ l.jsx(Ks, { size: 14 }),
|
|
12739
12739
|
e("drPlanetaryPositions")
|
|
12740
12740
|
] }),
|
|
12741
12741
|
/* @__PURE__ */ l.jsx("ul", { className: "list-disc list-inside text-sm text-muted-foreground space-y-1 leading-relaxed", children: D.map(($, z) => /* @__PURE__ */ l.jsx("li", { children: $ }, z)) })
|
|
@@ -12840,7 +12840,7 @@ function bc({
|
|
|
12840
12840
|
t.schedule_date_ist && /* @__PURE__ */ l.jsx("p", { className: "text-sm font-medium text-card-foreground", children: o }),
|
|
12841
12841
|
t.individual_pack_price_inr > 0 && /* @__PURE__ */ l.jsx("p", { className: "text-base font-bold text-primary", children: n ? `₹${t.individual_pack_price_inr} से शुरू` : `Starting from ₹${t.individual_pack_price_inr}` }),
|
|
12842
12842
|
/* @__PURE__ */ l.jsxs(
|
|
12843
|
-
|
|
12843
|
+
Jt,
|
|
12844
12844
|
{
|
|
12845
12845
|
size: "lg",
|
|
12846
12846
|
className: "book-puja-cta w-full h-14 text-lg font-bold",
|
|
@@ -12867,7 +12867,7 @@ const wc = "_section_15ygl_1", _c = "_heading_15ygl_5", kc = "_list_15ygl_16", S
|
|
|
12867
12867
|
itemTitle: Tc,
|
|
12868
12868
|
itemDesc: Pc
|
|
12869
12869
|
};
|
|
12870
|
-
function
|
|
12870
|
+
function en({
|
|
12871
12871
|
t,
|
|
12872
12872
|
className: e = "",
|
|
12873
12873
|
bannerType: r = "generic"
|
|
@@ -12926,7 +12926,7 @@ const Ec = {
|
|
|
12926
12926
|
"generic-what-you'll-get-first": "generic",
|
|
12927
12927
|
"generic-form-first": "generic"
|
|
12928
12928
|
};
|
|
12929
|
-
function
|
|
12929
|
+
function tn(t, e) {
|
|
12930
12930
|
let r = "generic";
|
|
12931
12931
|
if (t) {
|
|
12932
12932
|
for (const [s, n] of Object.entries(Ac))
|
|
@@ -12940,7 +12940,7 @@ function en(t, e) {
|
|
|
12940
12940
|
function Rc(t) {
|
|
12941
12941
|
return typeof window > "u" ? null : new URLSearchParams(window.location.search).get(t);
|
|
12942
12942
|
}
|
|
12943
|
-
function
|
|
12943
|
+
function Wt() {
|
|
12944
12944
|
return Rc("utm_term");
|
|
12945
12945
|
}
|
|
12946
12946
|
const Cc = "https://srm-cdn.a4b.io/yoda/1770362904947.svg", Oc = "https://srm-cdn.a4b.io/yoda/1770375694934.svg", Nc = "https://srm-cdn.a4b.io/yoda/1770375720933.svg", Ic = "https://srm-cdn.a4b.io/yoda/1770707793537.svg", Dc = "https://srm-cdn.a4b.io/yoda/1770362713543.svg";
|
|
@@ -12962,7 +12962,7 @@ function rn(t) {
|
|
|
12962
12962
|
}
|
|
12963
12963
|
return Array.from(e);
|
|
12964
12964
|
}
|
|
12965
|
-
function
|
|
12965
|
+
function vr(t) {
|
|
12966
12966
|
if (!t) return !1;
|
|
12967
12967
|
const e = t.toLowerCase();
|
|
12968
12968
|
return e === "present" || e === "active" || e === "partial" || e === "suggested";
|
|
@@ -12988,16 +12988,16 @@ function $c(t) {
|
|
|
12988
12988
|
}
|
|
12989
12989
|
function nn(t) {
|
|
12990
12990
|
const e = [];
|
|
12991
|
-
return
|
|
12991
|
+
return vr(t.kaalSarp) && e.push({
|
|
12992
12992
|
type: "kaal-sarp",
|
|
12993
12993
|
severity: typeof t.kaalSarpSeverity == "string" ? t.kaalSarpSeverity : void 0
|
|
12994
|
-
}),
|
|
12994
|
+
}), vr(t.pitra) && e.push({
|
|
12995
12995
|
type: "pitra",
|
|
12996
12996
|
severity: typeof t.pitraSeverity == "string" ? t.pitraSeverity : void 0
|
|
12997
|
-
}),
|
|
12997
|
+
}), vr(t.shaniSadeSati || t.sadeSati) && e.push({
|
|
12998
12998
|
type: "shani",
|
|
12999
12999
|
severity: typeof t.sadeSatiSeverity == "string" ? t.sadeSatiSeverity : void 0
|
|
13000
|
-
}),
|
|
13000
|
+
}), vr(t.mangal) && !t.mangal?.toLowerCase().includes("nullified") && e.push({
|
|
13001
13001
|
type: "mangal",
|
|
13002
13002
|
severity: typeof t.mangalSeverity == "string" ? t.mangalSeverity : void 0
|
|
13003
13003
|
}), e.length === 0 ? null : (e.sort((r, s) => sn(s.severity) - sn(r.severity)), e[0]?.type ?? null);
|
|
@@ -13079,7 +13079,7 @@ function hu({
|
|
|
13079
13079
|
getFirstPujaInfo: S,
|
|
13080
13080
|
onBookPujaClick: _
|
|
13081
13081
|
}) {
|
|
13082
|
-
const v =
|
|
13082
|
+
const v = Yr(() => {
|
|
13083
13083
|
if (c)
|
|
13084
13084
|
return c;
|
|
13085
13085
|
if (a && i)
|
|
@@ -13089,38 +13089,46 @@ function hu({
|
|
|
13089
13089
|
return null;
|
|
13090
13090
|
}
|
|
13091
13091
|
return null;
|
|
13092
|
-
}, [c, a, i]),
|
|
13092
|
+
}, [c, a, i]), A = jl(), x = A?.t ?? ((E) => E), N = A?.locale ?? "en", P = A?.setLocale, H = N.toLowerCase().startsWith("hi"), M = he(null), we = he(null), [X, _e] = B(!1), [fe, ve] = B(!1), [Y, We] = B(null), [Te, Pe] = B(null), [te, me] = B(() => {
|
|
13093
|
+
if (typeof window < "u") {
|
|
13094
|
+
const E = Wt();
|
|
13095
|
+
if (E && E.toLowerCase().includes("marriage"))
|
|
13096
|
+
return {
|
|
13097
|
+
problems: ["formProblemMarriage"]
|
|
13098
|
+
};
|
|
13099
|
+
}
|
|
13100
|
+
}), [q, b] = B(!1), [U, re] = B([]), [W, G] = B(!1), [D, $] = B(null), z = he(!1);
|
|
13093
13101
|
be(() => {
|
|
13094
13102
|
z.current || (z.current = !0, w?.trackDoshaCalculatorWebView?.());
|
|
13095
13103
|
}, []);
|
|
13096
13104
|
const ue = !m || !S;
|
|
13097
13105
|
be(() => {
|
|
13098
13106
|
if (!ue || !v) return;
|
|
13099
|
-
let
|
|
13107
|
+
let E = !0;
|
|
13100
13108
|
return G(!0), Ko(v).then((V) => {
|
|
13101
|
-
|
|
13109
|
+
E && re(V);
|
|
13102
13110
|
}).finally(() => {
|
|
13103
|
-
|
|
13111
|
+
E && G(!1);
|
|
13104
13112
|
}), () => {
|
|
13105
|
-
|
|
13113
|
+
E = !1;
|
|
13106
13114
|
};
|
|
13107
13115
|
}, [ue, v]);
|
|
13108
13116
|
const Ee = qe(
|
|
13109
|
-
(
|
|
13110
|
-
const V =
|
|
13117
|
+
(E) => {
|
|
13118
|
+
const V = $s(U, E);
|
|
13111
13119
|
return V ? /* @__PURE__ */ l.jsx(
|
|
13112
13120
|
bc,
|
|
13113
13121
|
{
|
|
13114
13122
|
puja: V,
|
|
13115
|
-
doshaType:
|
|
13123
|
+
doshaType: E,
|
|
13116
13124
|
language: N
|
|
13117
13125
|
}
|
|
13118
13126
|
) : null;
|
|
13119
13127
|
},
|
|
13120
13128
|
[U, N]
|
|
13121
13129
|
), ke = qe(
|
|
13122
|
-
(
|
|
13123
|
-
const V =
|
|
13130
|
+
(E) => {
|
|
13131
|
+
const V = $s(U, E);
|
|
13124
13132
|
return V ? {
|
|
13125
13133
|
name: Pn(V, N),
|
|
13126
13134
|
price: V.individual_pack_price_inr,
|
|
@@ -13128,33 +13136,38 @@ function hu({
|
|
|
13128
13136
|
} : null;
|
|
13129
13137
|
},
|
|
13130
13138
|
[U, N]
|
|
13131
|
-
), He = m ?? Ee, bt = S ?? ke, Ge = p || !m && W, [Ae, it] = B(
|
|
13132
|
-
()
|
|
13133
|
-
|
|
13139
|
+
), He = m ?? Ee, bt = S ?? ke, Ge = p || !m && W, [Ae, it] = B(() => {
|
|
13140
|
+
const E = typeof window < "u" ? Wt() : null;
|
|
13141
|
+
return tn(E, N);
|
|
13142
|
+
}), [ze, Ye] = B(() => {
|
|
13143
|
+
if (typeof window > "u") return "generic";
|
|
13144
|
+
const E = Wt();
|
|
13145
|
+
return E && E.toLowerCase().includes("marriage") ? "marriage" : "generic";
|
|
13146
|
+
});
|
|
13134
13147
|
be(() => {
|
|
13135
|
-
const
|
|
13148
|
+
const E = Wt(), V = tn(E, N);
|
|
13136
13149
|
it(V);
|
|
13137
13150
|
let Re = "generic";
|
|
13138
|
-
|
|
13151
|
+
E && E.toLowerCase().includes("marriage") && (Re = "marriage"), Ye(Re);
|
|
13139
13152
|
}, [N]);
|
|
13140
13153
|
const [wt, T] = B(!1);
|
|
13141
13154
|
be(() => {
|
|
13142
|
-
const
|
|
13143
|
-
|
|
13155
|
+
const E = Wt();
|
|
13156
|
+
E && E.toLowerCase().includes("what-you") && T(!0);
|
|
13144
13157
|
}, []);
|
|
13145
13158
|
const I = () => {
|
|
13146
13159
|
M.current?.scrollIntoView({ behavior: "smooth" });
|
|
13147
13160
|
}, Q = qe(
|
|
13148
|
-
(
|
|
13161
|
+
(E) => {
|
|
13149
13162
|
w?.trackDoshaSectionImpression?.({
|
|
13150
|
-
section:
|
|
13163
|
+
section: E,
|
|
13151
13164
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
13152
13165
|
});
|
|
13153
13166
|
},
|
|
13154
13167
|
[w]
|
|
13155
|
-
), Ie = (
|
|
13156
|
-
if (We(
|
|
13157
|
-
const Re =
|
|
13168
|
+
), Ie = (E, V) => {
|
|
13169
|
+
if (We(E), Pe(V ?? null), b(!1), E.summary) {
|
|
13170
|
+
const Re = E.summary, Je = nn(Re);
|
|
13158
13171
|
if (Je) {
|
|
13159
13172
|
const $t = rn(Je).map((Lt) => bt(Lt)).find(Boolean) ?? null;
|
|
13160
13173
|
$($t);
|
|
@@ -13162,16 +13175,16 @@ function hu({
|
|
|
13162
13175
|
$(null);
|
|
13163
13176
|
} else
|
|
13164
13177
|
$(null);
|
|
13165
|
-
d?.(
|
|
13178
|
+
d?.(E, V);
|
|
13166
13179
|
};
|
|
13167
13180
|
be(() => {
|
|
13168
13181
|
if (S || !Y?.summary) return;
|
|
13169
|
-
const
|
|
13170
|
-
if (!
|
|
13182
|
+
const E = nn(Y.summary);
|
|
13183
|
+
if (!E) {
|
|
13171
13184
|
$(null);
|
|
13172
13185
|
return;
|
|
13173
13186
|
}
|
|
13174
|
-
const V = rn(
|
|
13187
|
+
const V = rn(E).map((Re) => ke(Re)).find(Boolean) ?? null;
|
|
13175
13188
|
$(V);
|
|
13176
13189
|
}, [ke, S, Y]);
|
|
13177
13190
|
const ot = () => {
|
|
@@ -13181,15 +13194,15 @@ function hu({
|
|
|
13181
13194
|
if (_)
|
|
13182
13195
|
_();
|
|
13183
13196
|
else if (D.link) {
|
|
13184
|
-
const
|
|
13185
|
-
window.open(
|
|
13197
|
+
const E = $c(D.link);
|
|
13198
|
+
window.open(E, "_blank", "noopener,noreferrer");
|
|
13186
13199
|
}
|
|
13187
13200
|
return;
|
|
13188
13201
|
}
|
|
13189
13202
|
console.log("supabase", v), console.log("resolvePlaceProp", u), console.log("isFormComplete", X), console.log("formSubmitRef.current", we.current), v && we.current ? (w?.trackFloatingCtaClicked?.(
|
|
13190
|
-
X ?
|
|
13203
|
+
X ? Rr.all_fields_filled : Rr.fields_not_filled
|
|
13191
13204
|
), X || I(), we.current.submit()) : (w?.trackFloatingCtaClicked?.(
|
|
13192
|
-
|
|
13205
|
+
Rr.fields_not_filled
|
|
13193
13206
|
), I());
|
|
13194
13207
|
}, Se = (s ? /* @__PURE__ */ l.jsxs(
|
|
13195
13208
|
"button",
|
|
@@ -13239,7 +13252,7 @@ function hu({
|
|
|
13239
13252
|
t: x,
|
|
13240
13253
|
onEdit: q ? void 0 : ot,
|
|
13241
13254
|
inlineEditForm: q ? /* @__PURE__ */ l.jsx(
|
|
13242
|
-
|
|
13255
|
+
qs,
|
|
13243
13256
|
{
|
|
13244
13257
|
ref: we,
|
|
13245
13258
|
t: x,
|
|
@@ -13261,12 +13274,12 @@ function hu({
|
|
|
13261
13274
|
kundaliSectionId: y,
|
|
13262
13275
|
birthDetails: Te,
|
|
13263
13276
|
supabase: v,
|
|
13264
|
-
language:
|
|
13277
|
+
language: A?.locale ?? "en",
|
|
13265
13278
|
readMoreReviewsHref: n,
|
|
13266
13279
|
analytics: w,
|
|
13267
13280
|
problemArea: te?.problems?.join(", ") || "",
|
|
13268
13281
|
problemAreaIds: te?.problems || [],
|
|
13269
|
-
customProblemText: te?.problems?.find((
|
|
13282
|
+
customProblemText: te?.problems?.find((E) => !["formProblemMarriage", "formProblemCareer", "formProblemHealth", "formProblemFinancial", "formProblemFamily", "formProblemEducation", "formProblemBusiness", "formProblemOther"].includes(E)) || ""
|
|
13270
13283
|
}
|
|
13271
13284
|
)
|
|
13272
13285
|
}
|
|
@@ -13278,7 +13291,7 @@ function hu({
|
|
|
13278
13291
|
{
|
|
13279
13292
|
section: "what_from_analysis",
|
|
13280
13293
|
onImpression: Q,
|
|
13281
|
-
children: /* @__PURE__ */ l.jsx(
|
|
13294
|
+
children: /* @__PURE__ */ l.jsx(en, { t: x, bannerType: ze })
|
|
13282
13295
|
}
|
|
13283
13296
|
),
|
|
13284
13297
|
/* @__PURE__ */ l.jsx(
|
|
@@ -13287,7 +13300,7 @@ function hu({
|
|
|
13287
13300
|
section: "form",
|
|
13288
13301
|
onImpression: Q,
|
|
13289
13302
|
children: /* @__PURE__ */ l.jsx("div", { ref: M, children: /* @__PURE__ */ l.jsx(
|
|
13290
|
-
|
|
13303
|
+
qs,
|
|
13291
13304
|
{
|
|
13292
13305
|
ref: we,
|
|
13293
13306
|
t: x,
|
|
@@ -13310,7 +13323,7 @@ function hu({
|
|
|
13310
13323
|
{
|
|
13311
13324
|
section: "what_from_analysis",
|
|
13312
13325
|
onImpression: Q,
|
|
13313
|
-
children: /* @__PURE__ */ l.jsx(
|
|
13326
|
+
children: /* @__PURE__ */ l.jsx(en, { t: x, bannerType: ze })
|
|
13314
13327
|
}
|
|
13315
13328
|
),
|
|
13316
13329
|
/* @__PURE__ */ l.jsx(
|
|
@@ -13321,16 +13334,16 @@ function hu({
|
|
|
13321
13334
|
children: /* @__PURE__ */ l.jsx(
|
|
13322
13335
|
on,
|
|
13323
13336
|
{
|
|
13324
|
-
t: (
|
|
13337
|
+
t: (E) => {
|
|
13325
13338
|
if (ze === "marriage") {
|
|
13326
|
-
if (
|
|
13339
|
+
if (E === "feedbackTitle")
|
|
13327
13340
|
return x("feedbackTitleMarriage");
|
|
13328
|
-
if (
|
|
13329
|
-
const Re = `feedbackTestimonialMarriage${
|
|
13330
|
-
return Je === Re ? x(
|
|
13341
|
+
if (E.startsWith("feedbackTestimonial")) {
|
|
13342
|
+
const Re = `feedbackTestimonialMarriage${E.replace("feedbackTestimonial", "")}`, Je = x(Re);
|
|
13343
|
+
return Je === Re ? x(E) : Je;
|
|
13331
13344
|
}
|
|
13332
13345
|
}
|
|
13333
|
-
return x(
|
|
13346
|
+
return x(E);
|
|
13334
13347
|
},
|
|
13335
13348
|
readMoreHref: n,
|
|
13336
13349
|
onReadMore: w?.trackReadMoreReviewsClicked ? () => w.trackReadMoreReviewsClicked() : void 0
|
|
@@ -13349,7 +13362,7 @@ function hu({
|
|
|
13349
13362
|
t: x,
|
|
13350
13363
|
items: ze === "marriage" ? Mc : Uc,
|
|
13351
13364
|
defaultOpenIndex: 0,
|
|
13352
|
-
onItemOpen: (
|
|
13365
|
+
onItemOpen: (E) => w?.trackFaqQuestionClicked?.(E)
|
|
13353
13366
|
}
|
|
13354
13367
|
)
|
|
13355
13368
|
}
|
|
@@ -13417,7 +13430,7 @@ const Bc = "_section_ji9so_1", Fc = "_heading_ji9so_6", Kc = "_headingSuccess_ji
|
|
|
13417
13430
|
{ key: "pitra", labelKey: "resultPitra", summaryKey: "pitra" },
|
|
13418
13431
|
{ key: "sadeSati", labelKey: "resultSadeSati", summaryKey: "shaniSadeSati" }
|
|
13419
13432
|
];
|
|
13420
|
-
function
|
|
13433
|
+
function Ht(t) {
|
|
13421
13434
|
if (!t) return !1;
|
|
13422
13435
|
const e = t.toLowerCase();
|
|
13423
13436
|
return e === "present" || e === "active" || e === "partial" || e === "suggested";
|
|
@@ -13439,11 +13452,11 @@ function iu(t, e) {
|
|
|
13439
13452
|
return r.includes("nullified") || r === "present" || r === "active" || r === "partial" || r === "suggested" ? e("resultStatusPresent") : r === "absent" ? e("resultStatusAbsent") : r === "inactive" ? e("resultStatusInactive") : t;
|
|
13440
13453
|
}
|
|
13441
13454
|
function fu({ result: t, t: e, onEdit: r, className: s = "" }) {
|
|
13442
|
-
const n = t.summary ?? {}, a = t.details ?? {}, i = n.shaniSadeSati ?? n.sadeSati, o =
|
|
13455
|
+
const n = t.summary ?? {}, a = t.details ?? {}, i = n.shaniSadeSati ?? n.sadeSati, o = Ht(n.mangal) || Ht(n.kaalSarp) || Ht(n.pitra) || Ht(i);
|
|
13443
13456
|
return /* @__PURE__ */ l.jsxs("section", { className: `${ae.section} ${s}`, "aria-labelledby": "dosha-results-heading", children: [
|
|
13444
13457
|
/* @__PURE__ */ l.jsx("h2", { id: "dosha-results-heading", className: o ? `${ae.heading} ${ae.headingSuccess}` : ae.heading, children: e(o ? "resultSomeDoshas" : "resultNoDoshas") }),
|
|
13445
13458
|
o ? /* @__PURE__ */ l.jsx("div", { children: nu.map(({ key: c, labelKey: u, summaryKey: d }) => {
|
|
13446
|
-
const f = d === "shaniSadeSati" ? i : n[d], m =
|
|
13459
|
+
const f = d === "shaniSadeSati" ? i : n[d], m = Ht(f), p = au(a, c === "sadeSati" ? "sadeSati" : c), g = p?.explanation, y = typeof p?.remedies == "string" ? p.remedies : void 0;
|
|
13447
13460
|
return /* @__PURE__ */ l.jsxs(
|
|
13448
13461
|
"div",
|
|
13449
13462
|
{
|
|
@@ -13505,10 +13518,10 @@ function mu(t) {
|
|
|
13505
13518
|
}
|
|
13506
13519
|
export {
|
|
13507
13520
|
hu as DoshaCalculator,
|
|
13508
|
-
|
|
13521
|
+
qs as DoshaFormSection,
|
|
13509
13522
|
vc as DoshaResultsFull,
|
|
13510
13523
|
fu as DoshaResultsView,
|
|
13511
|
-
|
|
13524
|
+
Rr as FLOATING_CTA_STATUS,
|
|
13512
13525
|
du as I18nProvider,
|
|
13513
13526
|
mc as KundaliCard,
|
|
13514
13527
|
uu as LOCALE_LABELS,
|