@srimandir/dosha-calculator 2.1.2 → 2.1.3
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,12 +1,12 @@
|
|
|
1
1
|
import * as Ae from "react";
|
|
2
|
-
import
|
|
3
|
-
import { FooterCTAButton as ss, FormContainer as
|
|
2
|
+
import nn, { useRef as ue, useEffect as ve, createContext as Kn, useState as M, useMemo as zr, useContext as qn, useCallback as Ue, forwardRef as Wn, useImperativeHandle as Hn } from "react";
|
|
3
|
+
import { FooterCTAButton as ss, FormContainer as Gn, PrivacyBanner as Vn, FormSectionHeader as zn, FormField as kt, FormTextInput as ns, FormSegmentedControl as Jn, FormTagPills as Yn, FormCheckboxWithHelp as Qn, FormLocationInput as Xn, FormFooterNote as Zn, UserReviewsSection as an, FAQAccordion as on, ContactUsSection as ln, PageHeader as ea, MarqueeStrip as ta, FooterShell as ra, footerShellStyles as ot } from "@srimandir/astrology-common";
|
|
4
4
|
var ar = { exports: {} }, Bt = {};
|
|
5
5
|
var as;
|
|
6
|
-
function
|
|
6
|
+
function sa() {
|
|
7
7
|
if (as) return Bt;
|
|
8
8
|
as = 1;
|
|
9
|
-
var t =
|
|
9
|
+
var t = nn, 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;
|
|
12
12
|
u !== void 0 && (m = "" + u), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (p = c.ref);
|
|
@@ -18,9 +18,9 @@ function na() {
|
|
|
18
18
|
}
|
|
19
19
|
var Ft = {};
|
|
20
20
|
var is;
|
|
21
|
-
function
|
|
21
|
+
function na() {
|
|
22
22
|
return is || (is = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
23
|
-
var t =
|
|
23
|
+
var t = nn, 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 v(h) {
|
|
25
25
|
if (h === null || typeof h != "object")
|
|
26
26
|
return null;
|
|
@@ -187,8 +187,8 @@ function aa() {
|
|
|
187
187
|
}
|
|
188
188
|
var Me = !1, Be;
|
|
189
189
|
{
|
|
190
|
-
var
|
|
191
|
-
Be = new
|
|
190
|
+
var yt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
191
|
+
Be = new yt();
|
|
192
192
|
}
|
|
193
193
|
function Ge(h, S) {
|
|
194
194
|
if (!h || Me)
|
|
@@ -258,13 +258,13 @@ function aa() {
|
|
|
258
258
|
} finally {
|
|
259
259
|
Me = !1, He.current = J, _e(), Error.prepareStackTrace = G;
|
|
260
260
|
}
|
|
261
|
-
var
|
|
262
|
-
return typeof h == "function" && Be.set(h,
|
|
261
|
+
var _t = h ? h.displayName || h.name : "", it = _t ? pe(_t) : "";
|
|
262
|
+
return typeof h == "function" && Be.set(h, it), it;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function vt(h, S, j) {
|
|
265
265
|
return Ge(h, !1);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function bt(h) {
|
|
268
268
|
var S = h.prototype;
|
|
269
269
|
return !!(S && S.isReactComponent);
|
|
270
270
|
}
|
|
@@ -272,7 +272,7 @@ function aa() {
|
|
|
272
272
|
if (h == null)
|
|
273
273
|
return "";
|
|
274
274
|
if (typeof h == "function")
|
|
275
|
-
return Ge(h,
|
|
275
|
+
return Ge(h, bt(h));
|
|
276
276
|
if (typeof h == "string")
|
|
277
277
|
return pe(h);
|
|
278
278
|
switch (h) {
|
|
@@ -284,7 +284,7 @@ function aa() {
|
|
|
284
284
|
if (typeof h == "object")
|
|
285
285
|
switch (h.$$typeof) {
|
|
286
286
|
case c:
|
|
287
|
-
return
|
|
287
|
+
return vt(h.render);
|
|
288
288
|
case f:
|
|
289
289
|
return Fe(h.type, S, j);
|
|
290
290
|
case m: {
|
|
@@ -297,7 +297,7 @@ function aa() {
|
|
|
297
297
|
}
|
|
298
298
|
return "";
|
|
299
299
|
}
|
|
300
|
-
var xe = Object.prototype.hasOwnProperty,
|
|
300
|
+
var xe = Object.prototype.hasOwnProperty, nt = {}, Ke = k.ReactDebugCurrentFrame;
|
|
301
301
|
function Ve(h) {
|
|
302
302
|
if (h) {
|
|
303
303
|
var S = h._owner, j = Fe(h.type, h._source, S ? S.type : null);
|
|
@@ -305,7 +305,7 @@ function aa() {
|
|
|
305
305
|
} else
|
|
306
306
|
Ke.setExtraStackFrame(null);
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function wt(h, S, j, D, G) {
|
|
309
309
|
{
|
|
310
310
|
var J = Function.call.bind(xe);
|
|
311
311
|
for (var K in h)
|
|
@@ -320,7 +320,7 @@ function aa() {
|
|
|
320
320
|
} catch (te) {
|
|
321
321
|
U = te;
|
|
322
322
|
}
|
|
323
|
-
U && !(U instanceof Error) && (Ve(G), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", D || "React class", j, K, typeof U), Ve(null)), U instanceof Error && !(U.message in
|
|
323
|
+
U && !(U instanceof Error) && (Ve(G), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", D || "React class", j, K, typeof U), Ve(null)), U instanceof Error && !(U.message in nt) && (nt[U.message] = !0, Ve(G), _("Failed %s type: %s", j, U.message), Ve(null));
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
}
|
|
@@ -336,17 +336,17 @@ function aa() {
|
|
|
336
336
|
}
|
|
337
337
|
function Ee(h) {
|
|
338
338
|
try {
|
|
339
|
-
return
|
|
339
|
+
return at(h), !1;
|
|
340
340
|
} catch {
|
|
341
341
|
return !0;
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function at(h) {
|
|
345
345
|
return "" + h;
|
|
346
346
|
}
|
|
347
347
|
function qe(h) {
|
|
348
348
|
if (Ee(h))
|
|
349
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", z(h)),
|
|
349
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", z(h)), at(h);
|
|
350
350
|
}
|
|
351
351
|
var ae = k.ReactCurrentOwner, ge = {
|
|
352
352
|
key: !0,
|
|
@@ -443,7 +443,7 @@ function aa() {
|
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
var Ut = k.ReactCurrentOwner, rr = k.ReactDebugCurrentFrame;
|
|
446
|
-
function
|
|
446
|
+
function Qe(h) {
|
|
447
447
|
if (h) {
|
|
448
448
|
var S = h._owner, j = Fe(h.type, h._source, S ? S.type : null);
|
|
449
449
|
rr.setExtraStackFrame(j);
|
|
@@ -467,11 +467,11 @@ Check the render method of \`` + h + "`.";
|
|
|
467
467
|
return "";
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Cn(h) {
|
|
471
471
|
return "";
|
|
472
472
|
}
|
|
473
473
|
var Xr = {};
|
|
474
|
-
function
|
|
474
|
+
function Nn(h) {
|
|
475
475
|
{
|
|
476
476
|
var S = nr();
|
|
477
477
|
if (!S) {
|
|
@@ -488,12 +488,12 @@ Check the top-level render call using <` + j + ">.");
|
|
|
488
488
|
if (!h._store || h._store.validated || h.key != null)
|
|
489
489
|
return;
|
|
490
490
|
h._store.validated = !0;
|
|
491
|
-
var j =
|
|
491
|
+
var j = Nn(S);
|
|
492
492
|
if (Xr[j])
|
|
493
493
|
return;
|
|
494
494
|
Xr[j] = !0;
|
|
495
495
|
var D = "";
|
|
496
|
-
h && h._owner && h._owner !== Ut.current && (D = " It was passed a child from " + le(h._owner.type) + "."),
|
|
496
|
+
h && h._owner && h._owner !== Ut.current && (D = " It was passed a child from " + le(h._owner.type) + "."), Qe(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, D), Qe(null);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
function es(h, S) {
|
|
@@ -515,7 +515,7 @@ Check the top-level render call using <` + j + ">.");
|
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function In(h) {
|
|
519
519
|
{
|
|
520
520
|
var S = h.type;
|
|
521
521
|
if (S == null || typeof S == "string")
|
|
@@ -531,7 +531,7 @@ Check the top-level render call using <` + j + ">.");
|
|
|
531
531
|
return;
|
|
532
532
|
if (j) {
|
|
533
533
|
var D = le(S);
|
|
534
|
-
|
|
534
|
+
wt(j, h.props, "prop", D, h);
|
|
535
535
|
} else if (S.PropTypes !== void 0 && !Mt) {
|
|
536
536
|
Mt = !0;
|
|
537
537
|
var G = le(S);
|
|
@@ -540,16 +540,16 @@ Check the top-level render call using <` + j + ">.");
|
|
|
540
540
|
typeof S.getDefaultProps == "function" && !S.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function Dn(h) {
|
|
544
544
|
{
|
|
545
545
|
for (var S = Object.keys(h.props), j = 0; j < S.length; j++) {
|
|
546
546
|
var D = S[j];
|
|
547
547
|
if (D !== "children" && D !== "key") {
|
|
548
|
-
|
|
548
|
+
Qe(h), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", D), Qe(null);
|
|
549
549
|
break;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
h.ref !== null && (
|
|
552
|
+
h.ref !== null && (Qe(h), _("Invalid attribute `ref` supplied to `React.Fragment`."), Qe(null));
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
var ts = {};
|
|
@@ -559,7 +559,7 @@ Check the top-level render call using <` + j + ">.");
|
|
|
559
559
|
if (!K) {
|
|
560
560
|
var U = "";
|
|
561
561
|
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (U += " 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
|
-
var ye =
|
|
562
|
+
var ye = Cn();
|
|
563
563
|
ye ? U += ye : U += nr();
|
|
564
564
|
var te;
|
|
565
565
|
h === null ? te = "null" : I(h) ? te = "array" : h !== void 0 && h.$$typeof === e ? (te = "<" + (le(h.type) || "Unknown") + " />", U = " Did you accidentally export a JSX literal instead of a component?") : te = 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", te, U);
|
|
@@ -572,8 +572,8 @@ Check the top-level render call using <` + j + ">.");
|
|
|
572
572
|
if (Oe !== void 0)
|
|
573
573
|
if (D)
|
|
574
574
|
if (I(Oe)) {
|
|
575
|
-
for (var
|
|
576
|
-
es(Oe[
|
|
575
|
+
for (var _t = 0; _t < Oe.length; _t++)
|
|
576
|
+
es(Oe[_t], h);
|
|
577
577
|
Object.freeze && Object.freeze(Oe);
|
|
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.");
|
|
@@ -581,37 +581,37 @@ Check the top-level render call using <` + j + ">.");
|
|
|
581
581
|
es(Oe, h);
|
|
582
582
|
}
|
|
583
583
|
if (xe.call(S, "key")) {
|
|
584
|
-
var
|
|
585
|
-
return
|
|
584
|
+
var it = le(h), ke = Object.keys(S).filter(function(Fn) {
|
|
585
|
+
return Fn !== "key";
|
|
586
586
|
}), Pr = ke.length > 0 ? "{key: someKey, " + ke.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
587
|
-
if (!ts[
|
|
588
|
-
var
|
|
587
|
+
if (!ts[it + Pr]) {
|
|
588
|
+
var Bn = ke.length > 0 ? "{" + ke.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} />`, Pr,
|
|
594
|
+
<%s key={someKey} {...props} />`, Pr, it, Bn, it), ts[it + Pr] = !0;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
return h === s ?
|
|
597
|
+
return h === s ? Dn(se) : In(se), se;
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function $n(h, S, j) {
|
|
601
601
|
return rs(h, S, j, !0);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function Ln(h, S, j) {
|
|
604
604
|
return rs(h, S, j, !1);
|
|
605
605
|
}
|
|
606
|
-
var
|
|
607
|
-
Ft.Fragment = s, Ft.jsx =
|
|
606
|
+
var Un = Ln, Mn = $n;
|
|
607
|
+
Ft.Fragment = s, Ft.jsx = Un, Ft.jsxs = Mn;
|
|
608
608
|
})()), Ft;
|
|
609
609
|
}
|
|
610
610
|
var os;
|
|
611
|
-
function
|
|
612
|
-
return os || (os = 1, process.env.NODE_ENV === "production" ? ar.exports =
|
|
611
|
+
function aa() {
|
|
612
|
+
return os || (os = 1, process.env.NODE_ENV === "production" ? ar.exports = sa() : ar.exports = na()), ar.exports;
|
|
613
613
|
}
|
|
614
|
-
var l =
|
|
614
|
+
var l = aa();
|
|
615
615
|
const Ar = {
|
|
616
616
|
all_fields_filled: "all_fields_filled",
|
|
617
617
|
fields_not_filled: "fields_not_filled",
|
|
@@ -625,7 +625,7 @@ function kr(t, e) {
|
|
|
625
625
|
e.indexOf(s[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, s[n]) && (r[s[n]] = t[s[n]]);
|
|
626
626
|
return r;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function ia(t, e, r, s) {
|
|
629
629
|
function n(a) {
|
|
630
630
|
return a instanceof r ? a : new r(function(i) {
|
|
631
631
|
i(a);
|
|
@@ -652,13 +652,13 @@ function oa(t, e, r, s) {
|
|
|
652
652
|
u((s = s.apply(t, e || [])).next());
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
|
-
const
|
|
655
|
+
const oa = (t) => t ? (...e) => t(...e) : (...e) => fetch(...e);
|
|
656
656
|
class Jr 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
|
|
661
|
+
class la extends Jr {
|
|
662
662
|
constructor(e) {
|
|
663
663
|
super("Failed to send a request to the Edge Function", "FunctionsFetchError", e);
|
|
664
664
|
}
|
|
@@ -677,7 +677,7 @@ var Lr;
|
|
|
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
|
})(Lr || (Lr = {}));
|
|
680
|
-
class
|
|
680
|
+
class ca {
|
|
681
681
|
/**
|
|
682
682
|
* Creates a new Functions client bound to an Edge Functions URL.
|
|
683
683
|
*
|
|
@@ -692,7 +692,7 @@ class ua {
|
|
|
692
692
|
* ```
|
|
693
693
|
*/
|
|
694
694
|
constructor(e, { headers: r = {}, customFetch: s, region: n = Lr.Any } = {}) {
|
|
695
|
-
this.url = e, this.headers = r, this.region = n, this.fetch =
|
|
695
|
+
this.url = e, this.headers = r, this.region = n, this.fetch = oa(s);
|
|
696
696
|
}
|
|
697
697
|
/**
|
|
698
698
|
* Updates the authorization header
|
|
@@ -717,7 +717,7 @@ class ua {
|
|
|
717
717
|
* ```
|
|
718
718
|
*/
|
|
719
719
|
invoke(e) {
|
|
720
|
-
return
|
|
720
|
+
return ia(this, arguments, void 0, function* (r, s = {}) {
|
|
721
721
|
var n;
|
|
722
722
|
let a, i;
|
|
723
723
|
try {
|
|
@@ -740,7 +740,7 @@ class ua {
|
|
|
740
740
|
body: y,
|
|
741
741
|
signal: v
|
|
742
742
|
}).catch((x) => {
|
|
743
|
-
throw new
|
|
743
|
+
throw new la(x);
|
|
744
744
|
}), _ = k.headers.get("x-relay-error");
|
|
745
745
|
if (_ && _ === "true")
|
|
746
746
|
throw new ls(k);
|
|
@@ -760,7 +760,7 @@ class ua {
|
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
|
-
var
|
|
763
|
+
var ua = class extends Error {
|
|
764
764
|
/**
|
|
765
765
|
* @example
|
|
766
766
|
* ```ts
|
|
@@ -777,7 +777,7 @@ var da = class extends Error {
|
|
|
777
777
|
constructor(t) {
|
|
778
778
|
super(t.message), this.name = "PostgrestError", this.details = t.details, this.hint = t.hint, this.code = t.code;
|
|
779
779
|
}
|
|
780
|
-
},
|
|
780
|
+
}, da = class {
|
|
781
781
|
/**
|
|
782
782
|
* Creates a builder configured for a specific PostgREST request.
|
|
783
783
|
*
|
|
@@ -843,7 +843,7 @@ var da = class extends Error {
|
|
|
843
843
|
} catch {
|
|
844
844
|
a.status === 404 && y === "" ? (u = 204, d = "No Content") : i = { message: y };
|
|
845
845
|
}
|
|
846
|
-
if (i && r.isMaybeSingle && (!(i == null || (g = i.details) === null || g === void 0) && g.includes("0 rows")) && (i = null, u = 200, d = "OK"), i && r.shouldThrowOnError) throw new
|
|
846
|
+
if (i && r.isMaybeSingle && (!(i == null || (g = i.details) === null || g === void 0) && g.includes("0 rows")) && (i = null, u = 200, d = "OK"), i && r.shouldThrowOnError) throw new ua(i);
|
|
847
847
|
}
|
|
848
848
|
return {
|
|
849
849
|
error: i,
|
|
@@ -917,7 +917,7 @@ ${d.stack}`);
|
|
|
917
917
|
overrideTypes() {
|
|
918
918
|
return this;
|
|
919
919
|
}
|
|
920
|
-
},
|
|
920
|
+
}, ha = class extends da {
|
|
921
921
|
/**
|
|
922
922
|
* Perform a SELECT on the query result.
|
|
923
923
|
*
|
|
@@ -1089,7 +1089,7 @@ ${d.stack}`);
|
|
|
1089
1089
|
}
|
|
1090
1090
|
};
|
|
1091
1091
|
const us = /* @__PURE__ */ new RegExp("[,()]");
|
|
1092
|
-
var Et = class extends
|
|
1092
|
+
var Et = class extends ha {
|
|
1093
1093
|
/**
|
|
1094
1094
|
* Match only rows where `column` is equal to `value`.
|
|
1095
1095
|
*
|
|
@@ -1430,7 +1430,7 @@ var Et = class extends fa {
|
|
|
1430
1430
|
filter(t, e, r) {
|
|
1431
1431
|
return this.url.searchParams.append(t, `${e}.${r}`), this;
|
|
1432
1432
|
}
|
|
1433
|
-
},
|
|
1433
|
+
}, fa = class {
|
|
1434
1434
|
/**
|
|
1435
1435
|
* Creates a query builder scoped to a Postgres table or view.
|
|
1436
1436
|
*
|
|
@@ -1719,7 +1719,7 @@ function zt(t) {
|
|
|
1719
1719
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1720
1720
|
}, zt(t);
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1722
|
+
function ma(t, e) {
|
|
1723
1723
|
if (zt(t) != "object" || !t) return t;
|
|
1724
1724
|
var r = t[Symbol.toPrimitive];
|
|
1725
1725
|
if (r !== void 0) {
|
|
@@ -1729,12 +1729,12 @@ function pa(t, e) {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
return (e === "string" ? String : Number)(t);
|
|
1731
1731
|
}
|
|
1732
|
-
function
|
|
1733
|
-
var e =
|
|
1732
|
+
function pa(t) {
|
|
1733
|
+
var e = ma(t, "string");
|
|
1734
1734
|
return zt(e) == "symbol" ? e : e + "";
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1737
|
-
return (e =
|
|
1736
|
+
function ga(t, e, r) {
|
|
1737
|
+
return (e = pa(e)) in t ? Object.defineProperty(t, e, {
|
|
1738
1738
|
value: r,
|
|
1739
1739
|
enumerable: !0,
|
|
1740
1740
|
configurable: !0,
|
|
@@ -1755,14 +1755,14 @@ function ir(t) {
|
|
|
1755
1755
|
for (var e = 1; e < arguments.length; e++) {
|
|
1756
1756
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
1757
1757
|
e % 2 ? ds(Object(r), !0).forEach(function(s) {
|
|
1758
|
-
|
|
1758
|
+
ga(t, s, r[s]);
|
|
1759
1759
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : ds(Object(r)).forEach(function(s) {
|
|
1760
1760
|
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(r, s));
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
1763
1763
|
return t;
|
|
1764
1764
|
}
|
|
1765
|
-
var
|
|
1765
|
+
var ya = class cn {
|
|
1766
1766
|
/**
|
|
1767
1767
|
* Creates a PostgREST client.
|
|
1768
1768
|
*
|
|
@@ -1809,7 +1809,7 @@ var va = class un {
|
|
|
1809
1809
|
*/
|
|
1810
1810
|
from(e) {
|
|
1811
1811
|
if (!e || typeof e != "string" || e.trim() === "") throw new Error("Invalid relation name: relation must be a non-empty string.");
|
|
1812
|
-
return new
|
|
1812
|
+
return new fa(new URL(`${this.url}/${e}`), {
|
|
1813
1813
|
headers: new Headers(this.headers),
|
|
1814
1814
|
schema: this.schemaName,
|
|
1815
1815
|
fetch: this.fetch,
|
|
@@ -1824,7 +1824,7 @@ var va = class un {
|
|
|
1824
1824
|
* @param schema - The schema to query
|
|
1825
1825
|
*/
|
|
1826
1826
|
schema(e) {
|
|
1827
|
-
return new
|
|
1827
|
+
return new cn(this.url, {
|
|
1828
1828
|
headers: this.headers,
|
|
1829
1829
|
schema: e,
|
|
1830
1830
|
fetch: this.fetch,
|
|
@@ -1884,7 +1884,7 @@ var va = class un {
|
|
|
1884
1884
|
});
|
|
1885
1885
|
}
|
|
1886
1886
|
};
|
|
1887
|
-
class
|
|
1887
|
+
class va {
|
|
1888
1888
|
/**
|
|
1889
1889
|
* Static-only utility – prevent instantiation.
|
|
1890
1890
|
*/
|
|
@@ -1983,11 +1983,11 @@ Suggested solution: ${e.workaround}`), new Error(r);
|
|
|
1983
1983
|
}
|
|
1984
1984
|
}
|
|
1985
1985
|
}
|
|
1986
|
-
const
|
|
1987
|
-
var
|
|
1986
|
+
const ba = "2.98.0", wa = `realtime-js/${ba}`, _a = "1.0.0", un = "2.0.0", hs = un, Ur = 1e4, ka = 1e3, Sa = 100;
|
|
1987
|
+
var tt;
|
|
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";
|
|
1990
|
-
})(
|
|
1990
|
+
})(tt || (tt = {}));
|
|
1991
1991
|
var ie;
|
|
1992
1992
|
(function(t) {
|
|
1993
1993
|
t.closed = "closed", t.errored = "errored", t.joined = "joined", t.joining = "joining", t.leaving = "leaving";
|
|
@@ -2000,11 +2000,11 @@ var Mr;
|
|
|
2000
2000
|
(function(t) {
|
|
2001
2001
|
t.websocket = "websocket";
|
|
2002
2002
|
})(Mr || (Mr = {}));
|
|
2003
|
-
var
|
|
2003
|
+
var dt;
|
|
2004
2004
|
(function(t) {
|
|
2005
2005
|
t.Connecting = "connecting", t.Open = "open", t.Closing = "closing", t.Closed = "closed";
|
|
2006
|
-
})(
|
|
2007
|
-
class
|
|
2006
|
+
})(dt || (dt = {}));
|
|
2007
|
+
class xa {
|
|
2008
2008
|
constructor(e) {
|
|
2009
2009
|
this.HEADER_LENGTH = 1, this.USER_BROADCAST_PUSH_META_LENGTH = 6, this.KINDS = { userBroadcastPush: 3, userBroadcast: 4 }, this.BINARY_ENCODING = 0, this.JSON_ENCODING = 1, this.BROADCAST_EVENT = "broadcast", this.allowedMetadataKeys = [], this.allowedMetadataKeys = e ?? [];
|
|
2010
2010
|
}
|
|
@@ -2087,7 +2087,7 @@ class ja {
|
|
|
2087
2087
|
return !e || typeof e != "object" ? {} : Object.fromEntries(Object.entries(e).filter(([s]) => r.includes(s)));
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
2090
|
-
class
|
|
2090
|
+
class dn {
|
|
2091
2091
|
constructor(e, r) {
|
|
2092
2092
|
this.callback = e, this.timerCalc = r, this.timer = void 0, this.tries = 0, this.callback = e, this.timerCalc = r;
|
|
2093
2093
|
}
|
|
@@ -2108,18 +2108,18 @@ var Q;
|
|
|
2108
2108
|
const fs = (t, e, r = {}) => {
|
|
2109
2109
|
var s;
|
|
2110
2110
|
const n = (s = r.skipTypes) !== null && s !== void 0 ? s : [];
|
|
2111
|
-
return e ? Object.keys(e).reduce((a, i) => (a[i] =
|
|
2112
|
-
},
|
|
2111
|
+
return e ? Object.keys(e).reduce((a, i) => (a[i] = ja(i, t, e, n), a), {}) : {};
|
|
2112
|
+
}, ja = (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) ?
|
|
2115
|
-
},
|
|
2114
|
+
return a && !s.includes(a) ? hn(a, i) : Br(i);
|
|
2115
|
+
}, hn = (t, e) => {
|
|
2116
2116
|
if (t.charAt(0) === "_") {
|
|
2117
2117
|
const r = t.slice(1, t.length);
|
|
2118
|
-
return
|
|
2118
|
+
return Ea(e, r);
|
|
2119
2119
|
}
|
|
2120
2120
|
switch (t) {
|
|
2121
2121
|
case Q.bool:
|
|
2122
|
-
return
|
|
2122
|
+
return Ta(e);
|
|
2123
2123
|
case Q.float4:
|
|
2124
2124
|
case Q.float8:
|
|
2125
2125
|
case Q.int2:
|
|
@@ -2127,12 +2127,12 @@ const fs = (t, e, r = {}) => {
|
|
|
2127
2127
|
case Q.int8:
|
|
2128
2128
|
case Q.numeric:
|
|
2129
2129
|
case Q.oid:
|
|
2130
|
-
return
|
|
2130
|
+
return Pa(e);
|
|
2131
2131
|
case Q.json:
|
|
2132
2132
|
case Q.jsonb:
|
|
2133
|
-
return
|
|
2133
|
+
return Aa(e);
|
|
2134
2134
|
case Q.timestamp:
|
|
2135
|
-
return
|
|
2135
|
+
return Ra(e);
|
|
2136
2136
|
// Format to be consistent with PostgREST
|
|
2137
2137
|
case Q.abstime:
|
|
2138
2138
|
// To allow users to cast it based on Timezone
|
|
@@ -2157,7 +2157,7 @@ const fs = (t, e, r = {}) => {
|
|
|
2157
2157
|
default:
|
|
2158
2158
|
return Br(e);
|
|
2159
2159
|
}
|
|
2160
|
-
}, Br = (t) => t,
|
|
2160
|
+
}, Br = (t) => t, Ta = (t) => {
|
|
2161
2161
|
switch (t) {
|
|
2162
2162
|
case "t":
|
|
2163
2163
|
return !0;
|
|
@@ -2166,14 +2166,14 @@ const fs = (t, e, r = {}) => {
|
|
|
2166
2166
|
default:
|
|
2167
2167
|
return t;
|
|
2168
2168
|
}
|
|
2169
|
-
},
|
|
2169
|
+
}, Pa = (t) => {
|
|
2170
2170
|
if (typeof t == "string") {
|
|
2171
2171
|
const e = parseFloat(t);
|
|
2172
2172
|
if (!Number.isNaN(e))
|
|
2173
2173
|
return e;
|
|
2174
2174
|
}
|
|
2175
2175
|
return t;
|
|
2176
|
-
},
|
|
2176
|
+
}, Aa = (t) => {
|
|
2177
2177
|
if (typeof t == "string")
|
|
2178
2178
|
try {
|
|
2179
2179
|
return JSON.parse(t);
|
|
@@ -2181,7 +2181,7 @@ const fs = (t, e, r = {}) => {
|
|
|
2181
2181
|
return t;
|
|
2182
2182
|
}
|
|
2183
2183
|
return t;
|
|
2184
|
-
},
|
|
2184
|
+
}, Ea = (t, e) => {
|
|
2185
2185
|
if (typeof t != "string")
|
|
2186
2186
|
return t;
|
|
2187
2187
|
const r = t.length - 1, s = t[r];
|
|
@@ -2193,10 +2193,10 @@ const fs = (t, e, r = {}) => {
|
|
|
2193
2193
|
} catch {
|
|
2194
2194
|
a = i ? i.split(",") : [];
|
|
2195
2195
|
}
|
|
2196
|
-
return a.map((o) =>
|
|
2196
|
+
return a.map((o) => hn(e, o));
|
|
2197
2197
|
}
|
|
2198
2198
|
return t;
|
|
2199
|
-
},
|
|
2199
|
+
}, Ra = (t) => typeof t == "string" ? t.replace(" ", "T") : t, fn = (t) => {
|
|
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
|
};
|
|
@@ -2438,10 +2438,10 @@ var Gt;
|
|
|
2438
2438
|
(function(t) {
|
|
2439
2439
|
t.BROADCAST = "broadcast", t.PRESENCE = "presence", t.POSTGRES_CHANGES = "postgres_changes", t.SYSTEM = "system";
|
|
2440
2440
|
})(Gt || (Gt = {}));
|
|
2441
|
-
var
|
|
2441
|
+
var Je;
|
|
2442
2442
|
(function(t) {
|
|
2443
2443
|
t.SUBSCRIBED = "SUBSCRIBED", t.TIMED_OUT = "TIMED_OUT", t.CLOSED = "CLOSED", t.CHANNEL_ERROR = "CHANNEL_ERROR";
|
|
2444
|
-
})(
|
|
2444
|
+
})(Je || (Je = {}));
|
|
2445
2445
|
class Ct {
|
|
2446
2446
|
/**
|
|
2447
2447
|
* Creates a channel that can broadcast messages, sync presence, and listen to Postgres changes.
|
|
@@ -2465,7 +2465,7 @@ class Ct {
|
|
|
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 Er(this, Le.join, this.params, this.timeout), this.rejoinTimer = new
|
|
2468
|
+
}, r.config), this.timeout = this.socket.timeout, this.joinPush = new Er(this, Le.join, this.params, this.timeout), this.rejoinTimer = new dn(() => this._rejoinUntilConnected(), this.socket.reconnectAfterMs), this.joinPush.receive("ok", () => {
|
|
2469
2469
|
this.state = ie.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 = ie.closed, this.socket._remove(this);
|
|
@@ -2477,7 +2477,7 @@ class Ct {
|
|
|
2477
2477
|
this._isLeaving() || this._isClosed() || (this.socket.log("channel", `error ${this.topic}`, i), this.state = ie.errored, this.rejoinTimer.scheduleTimeout());
|
|
2478
2478
|
}), this._on(Le.reply, {}, (i, o) => {
|
|
2479
2479
|
this._trigger(this._replyEventName(o), i);
|
|
2480
|
-
}), this.presence = new Ht(this), this.broadcastEndpointURL =
|
|
2480
|
+
}), this.presence = new Ht(this), this.broadcastEndpointURL = fn(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 */
|
|
@@ -2490,10 +2490,10 @@ class Ct {
|
|
|
2490
2490
|
postgres_changes: u,
|
|
2491
2491
|
private: c
|
|
2492
2492
|
};
|
|
2493
|
-
this.socket.accessTokenValue && (f.access_token = this.socket.accessTokenValue), this._onError((p) => e?.(
|
|
2493
|
+
this.socket.accessTokenValue && (f.access_token = this.socket.accessTokenValue), this._onError((p) => e?.(Je.CHANNEL_ERROR, p)), this._onClose(() => e?.(Je.CLOSED)), this.updateJoinPayload(Object.assign({ config: m }, f)), this.joinedOnce = !0, this._rejoin(r), this.joinPush.receive("ok", async ({ postgres_changes: p }) => {
|
|
2494
2494
|
var g;
|
|
2495
2495
|
if (this.socket._isManualToken() || this.socket.setAuth(), p === void 0) {
|
|
2496
|
-
e?.(
|
|
2496
|
+
e?.(Je.SUBSCRIBED);
|
|
2497
2497
|
return;
|
|
2498
2498
|
} else {
|
|
2499
2499
|
const y = this.bindings.postgres_changes, v = (g = y?.length) !== null && g !== void 0 ? g : 0, k = [];
|
|
@@ -2502,17 +2502,17 @@ class Ct {
|
|
|
2502
2502
|
if (Y && Y.event === T && Ct.isFilterValueEqual(Y.schema, x) && Ct.isFilterValueEqual(Y.table, N) && Ct.isFilterValueEqual(Y.filter, $))
|
|
2503
2503
|
k.push(Object.assign(Object.assign({}, w), { id: Y.id }));
|
|
2504
2504
|
else {
|
|
2505
|
-
this.unsubscribe(), this.state = ie.errored, e?.(
|
|
2505
|
+
this.unsubscribe(), this.state = ie.errored, e?.(Je.CHANNEL_ERROR, new Error("mismatch between server and client bindings for postgres changes"));
|
|
2506
2506
|
return;
|
|
2507
2507
|
}
|
|
2508
2508
|
}
|
|
2509
|
-
this.bindings.postgres_changes = k, e && e(
|
|
2509
|
+
this.bindings.postgres_changes = k, e && e(Je.SUBSCRIBED);
|
|
2510
2510
|
return;
|
|
2511
2511
|
}
|
|
2512
2512
|
}).receive("error", (p) => {
|
|
2513
|
-
this.state = ie.errored, e?.(
|
|
2513
|
+
this.state = ie.errored, e?.(Je.CHANNEL_ERROR, new Error(JSON.stringify(Object.values(p).join(", ") || "error")));
|
|
2514
2514
|
}).receive("timeout", () => {
|
|
2515
|
-
e?.(
|
|
2515
|
+
e?.(Je.TIMED_OUT);
|
|
2516
2516
|
});
|
|
2517
2517
|
}
|
|
2518
2518
|
return this;
|
|
@@ -2695,7 +2695,7 @@ class Ct {
|
|
|
2695
2695
|
}
|
|
2696
2696
|
/** @internal */
|
|
2697
2697
|
_addToPushBuffer(e) {
|
|
2698
|
-
if (e.startTimeout(), this.pushBuffer.push(e), this.pushBuffer.length >
|
|
2698
|
+
if (e.startTimeout(), this.pushBuffer.push(e), this.pushBuffer.length > Sa) {
|
|
2699
2699
|
const r = this.pushBuffer.shift();
|
|
2700
2700
|
r && (r.destroy(), this.socket.log("channel", `discarded push due to buffer overflow: ${r.event}`, r.payload));
|
|
2701
2701
|
}
|
|
@@ -2859,13 +2859,13 @@ const Rr = () => {
|
|
|
2859
2859
|
HEARTBEAT_INTERVAL: 25e3,
|
|
2860
2860
|
RECONNECT_DELAY: 10,
|
|
2861
2861
|
HEARTBEAT_TIMEOUT_FALLBACK: 100
|
|
2862
|
-
},
|
|
2862
|
+
}, Oa = [1e3, 2e3, 5e3, 1e4], Ca = 1e4, Na = `
|
|
2863
2863
|
addEventListener("message", (e) => {
|
|
2864
2864
|
if (e.data.event === "start") {
|
|
2865
2865
|
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
|
|
2866
2866
|
}
|
|
2867
2867
|
});`;
|
|
2868
|
-
class
|
|
2868
|
+
class Ia {
|
|
2869
2869
|
/**
|
|
2870
2870
|
* Initializes the Socket.
|
|
2871
2871
|
*
|
|
@@ -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 = Ur, this.transport = null, this.heartbeatIntervalMs = or.HEARTBEAT_INTERVAL, this.heartbeatTimer = void 0, this.pendingHeartbeatRef = null, this.heartbeatCallback = Rr, this.ref = 0, this.reconnectTimer = null, this.vsn = hs, this.logger = Rr, this.conn = null, this.sendBuffer = [], this.serializer = new
|
|
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 = Ur, this.transport = null, this.heartbeatIntervalMs = or.HEARTBEAT_INTERVAL, this.heartbeatTimer = void 0, this.pendingHeartbeatRef = null, this.heartbeatCallback = Rr, this.ref = 0, this.reconnectTimer = null, this.vsn = hs, this.logger = Rr, this.conn = null, this.sendBuffer = [], this.serializer = new xa(), 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}/${Mr.websocket}`, this.httpEndpoint =
|
|
2907
|
+
this.apiKey = r.params.apikey, this.endPoint = `${e}/${Mr.websocket}`, this.httpEndpoint = fn(e), this._initializeOptions(r), this._setupReconnectionTimer(), this.fetch = this._resolveFetch(r?.fetch);
|
|
2908
2908
|
}
|
|
2909
2909
|
/**
|
|
2910
2910
|
* Connects the socket, unless already connected.
|
|
@@ -2915,7 +2915,7 @@ class Da {
|
|
|
2915
2915
|
this.conn = new this.transport(this.endpointURL());
|
|
2916
2916
|
else
|
|
2917
2917
|
try {
|
|
2918
|
-
this.conn =
|
|
2918
|
+
this.conn = va.createWebSocket(this.endpointURL());
|
|
2919
2919
|
} catch (e) {
|
|
2920
2920
|
this._setConnectionState("disconnected");
|
|
2921
2921
|
const r = e.message;
|
|
@@ -2996,21 +2996,21 @@ Option 2: Install and provide the "ws" package:
|
|
|
2996
2996
|
*/
|
|
2997
2997
|
connectionState() {
|
|
2998
2998
|
switch (this.conn && this.conn.readyState) {
|
|
2999
|
-
case
|
|
3000
|
-
return
|
|
3001
|
-
case
|
|
3002
|
-
return
|
|
3003
|
-
case
|
|
3004
|
-
return
|
|
2999
|
+
case tt.connecting:
|
|
3000
|
+
return dt.Connecting;
|
|
3001
|
+
case tt.open:
|
|
3002
|
+
return dt.Open;
|
|
3003
|
+
case tt.closing:
|
|
3004
|
+
return dt.Closing;
|
|
3005
3005
|
default:
|
|
3006
|
-
return
|
|
3006
|
+
return dt.Closed;
|
|
3007
3007
|
}
|
|
3008
3008
|
}
|
|
3009
3009
|
/**
|
|
3010
3010
|
* Returns `true` is the connection is open.
|
|
3011
3011
|
*/
|
|
3012
3012
|
isConnected() {
|
|
3013
|
-
return this.connectionState() ===
|
|
3013
|
+
return this.connectionState() === dt.Open;
|
|
3014
3014
|
}
|
|
3015
3015
|
/**
|
|
3016
3016
|
* Returns `true` if the connection is currently connecting.
|
|
@@ -3110,7 +3110,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3110
3110
|
} catch (r) {
|
|
3111
3111
|
this.log("error", "error in heartbeat callback", r);
|
|
3112
3112
|
}
|
|
3113
|
-
this._wasManualDisconnect = !1, (e = this.conn) === null || e === void 0 || e.close(
|
|
3113
|
+
this._wasManualDisconnect = !1, (e = this.conn) === null || e === void 0 || e.close(ka, "heartbeat timeout"), setTimeout(() => {
|
|
3114
3114
|
var r;
|
|
3115
3115
|
this.isConnected() || (r = this.reconnectTimer) === null || r === void 0 || r.scheduleTimeout();
|
|
3116
3116
|
}, or.HEARTBEAT_TIMEOUT_FALLBACK);
|
|
@@ -3206,7 +3206,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3206
3206
|
* @internal
|
|
3207
3207
|
*/
|
|
3208
3208
|
_setupConnectionHandlers() {
|
|
3209
|
-
this.conn && ("binaryType" in this.conn && (this.conn.binaryType = "arraybuffer"), this.conn.onopen = () => this._onConnOpen(), this.conn.onerror = (e) => this._onConnError(e), this.conn.onmessage = (e) => this._onConnMessage(e), this.conn.onclose = (e) => this._onConnClose(e), this.conn.readyState ===
|
|
3209
|
+
this.conn && ("binaryType" in this.conn && (this.conn.binaryType = "arraybuffer"), this.conn.onopen = () => this._onConnOpen(), this.conn.onerror = (e) => this._onConnError(e), this.conn.onmessage = (e) => this._onConnMessage(e), this.conn.onclose = (e) => this._onConnClose(e), this.conn.readyState === tt.open && this._onConnOpen());
|
|
3210
3210
|
}
|
|
3211
3211
|
/**
|
|
3212
3212
|
* Teardown connection and cleanup resources
|
|
@@ -3214,7 +3214,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3214
3214
|
*/
|
|
3215
3215
|
_teardownConnection() {
|
|
3216
3216
|
if (this.conn) {
|
|
3217
|
-
if (this.conn.readyState ===
|
|
3217
|
+
if (this.conn.readyState === tt.open || this.conn.readyState === tt.connecting)
|
|
3218
3218
|
try {
|
|
3219
3219
|
this.conn.close();
|
|
3220
3220
|
} catch (e) {
|
|
@@ -3227,7 +3227,11 @@ Option 2: Install and provide the "ws" package:
|
|
|
3227
3227
|
/** @internal */
|
|
3228
3228
|
_onConnOpen() {
|
|
3229
3229
|
this._setConnectionState("connected"), this.log("transport", `connected to ${this.endpointURL()}`), (this._authPromise || (this.accessToken && !this.accessTokenValue ? this.setAuth() : Promise.resolve())).then(() => {
|
|
3230
|
-
this.
|
|
3230
|
+
this.accessTokenValue && (this.channels.forEach((r) => {
|
|
3231
|
+
r.updateJoinPayload({ access_token: this.accessTokenValue });
|
|
3232
|
+
}), this.sendBuffer = [], this.channels.forEach((r) => {
|
|
3233
|
+
r._isJoining() && (r.joinPush.sent = !1, r.joinPush.send());
|
|
3234
|
+
})), this.flushSendBuffer();
|
|
3231
3235
|
}).catch((r) => {
|
|
3232
3236
|
this.log("error", "error waiting for auth on connect", r), this.flushSendBuffer();
|
|
3233
3237
|
}), this._clearTimer("reconnect"), this.worker ? this.workerRef || this._startWorkerHeartbeat() : this._startHeartbeat(), this._triggerStateCallbacks("open");
|
|
@@ -3286,7 +3290,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3286
3290
|
if (e)
|
|
3287
3291
|
r = e;
|
|
3288
3292
|
else {
|
|
3289
|
-
const s = new Blob([
|
|
3293
|
+
const s = new Blob([Na], { type: "application/javascript" });
|
|
3290
3294
|
r = URL.createObjectURL(s);
|
|
3291
3295
|
}
|
|
3292
3296
|
return r;
|
|
@@ -3317,7 +3321,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3317
3321
|
s ? this._manuallySetToken = !0 : this.accessToken && (this._manuallySetToken = !1), this.accessTokenValue != r && (this.accessTokenValue = r, this.channels.forEach((n) => {
|
|
3318
3322
|
const a = {
|
|
3319
3323
|
access_token: r,
|
|
3320
|
-
version:
|
|
3324
|
+
version: wa
|
|
3321
3325
|
};
|
|
3322
3326
|
r && n.updateJoinPayload(a), n.joinedOnce && n._isJoined() && n._push(Le.access_token, {
|
|
3323
3327
|
access_token: r
|
|
@@ -3362,7 +3366,7 @@ Option 2: Install and provide the "ws" package:
|
|
|
3362
3366
|
* @internal
|
|
3363
3367
|
*/
|
|
3364
3368
|
_setupReconnectionTimer() {
|
|
3365
|
-
this.reconnectTimer = new
|
|
3369
|
+
this.reconnectTimer = new dn(async () => {
|
|
3366
3370
|
setTimeout(async () => {
|
|
3367
3371
|
await this._waitForAuthIfNeeded(), this.isConnected() || this.connect();
|
|
3368
3372
|
}, or.RECONNECT_DELAY);
|
|
@@ -3374,11 +3378,11 @@ Option 2: Install and provide the "ws" package:
|
|
|
3374
3378
|
*/
|
|
3375
3379
|
_initializeOptions(e) {
|
|
3376
3380
|
var r, s, n, a, i, o, c, u, d, f, m, p;
|
|
3377
|
-
switch (this.transport = (r = e?.transport) !== null && r !== void 0 ? r : null, this.timeout = (s = e?.timeout) !== null && s !== void 0 ? s : Ur, this.heartbeatIntervalMs = (n = e?.heartbeatIntervalMs) !== null && n !== void 0 ? n : or.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 : Rr, this.vsn = (c = e?.vsn) !== null && c !== void 0 ? c : hs, 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) =>
|
|
3378
|
-
case
|
|
3381
|
+
switch (this.transport = (r = e?.transport) !== null && r !== void 0 ? r : null, this.timeout = (s = e?.timeout) !== null && s !== void 0 ? s : Ur, this.heartbeatIntervalMs = (n = e?.heartbeatIntervalMs) !== null && n !== void 0 ? n : or.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 : Rr, this.vsn = (c = e?.vsn) !== null && c !== void 0 ? c : hs, 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] || Ca), this.vsn) {
|
|
3382
|
+
case _a:
|
|
3379
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)));
|
|
3380
3384
|
break;
|
|
3381
|
-
case
|
|
3385
|
+
case un:
|
|
3382
3386
|
this.encode = (m = e?.encode) !== null && m !== void 0 ? m : this.serializer.encode.bind(this.serializer), this.decode = (p = e?.decode) !== null && p !== void 0 ? p : this.serializer.decode.bind(this.serializer);
|
|
3383
3387
|
break;
|
|
3384
3388
|
default:
|
|
@@ -3414,17 +3418,17 @@ var Jt = class extends Error {
|
|
|
3414
3418
|
return this.status === 419;
|
|
3415
3419
|
}
|
|
3416
3420
|
};
|
|
3417
|
-
function
|
|
3421
|
+
function Da(t, e, r) {
|
|
3418
3422
|
const s = new URL(e, t);
|
|
3419
3423
|
if (r)
|
|
3420
3424
|
for (const [n, a] of Object.entries(r))
|
|
3421
3425
|
a !== void 0 && s.searchParams.set(n, a);
|
|
3422
3426
|
return s.toString();
|
|
3423
3427
|
}
|
|
3424
|
-
async function
|
|
3428
|
+
async function $a(t) {
|
|
3425
3429
|
return !t || t.type === "none" ? {} : t.type === "bearer" ? { Authorization: `Bearer ${t.token}` } : t.type === "header" ? { [t.name]: t.value } : t.type === "custom" ? await t.getHeaders() : {};
|
|
3426
3430
|
}
|
|
3427
|
-
function
|
|
3431
|
+
function La(t) {
|
|
3428
3432
|
const e = t.fetchImpl ?? globalThis.fetch;
|
|
3429
3433
|
return {
|
|
3430
3434
|
async request({
|
|
@@ -3434,7 +3438,7 @@ function Ua(t) {
|
|
|
3434
3438
|
body: a,
|
|
3435
3439
|
headers: i
|
|
3436
3440
|
}) {
|
|
3437
|
-
const o =
|
|
3441
|
+
const o = Da(t.baseUrl, s, n), c = await $a(t.auth), u = await e(o, {
|
|
3438
3442
|
method: r,
|
|
3439
3443
|
headers: {
|
|
3440
3444
|
...a ? { "Content-Type": "application/json" } : {},
|
|
@@ -3462,7 +3466,7 @@ function Ua(t) {
|
|
|
3462
3466
|
function lr(t) {
|
|
3463
3467
|
return t.join("");
|
|
3464
3468
|
}
|
|
3465
|
-
var
|
|
3469
|
+
var Ua = class {
|
|
3466
3470
|
constructor(t, e = "") {
|
|
3467
3471
|
this.client = t, this.prefix = e;
|
|
3468
3472
|
}
|
|
@@ -3521,24 +3525,24 @@ var Ma = class {
|
|
|
3521
3525
|
}
|
|
3522
3526
|
}
|
|
3523
3527
|
};
|
|
3524
|
-
function
|
|
3528
|
+
function St(t) {
|
|
3525
3529
|
return t.join("");
|
|
3526
3530
|
}
|
|
3527
|
-
var
|
|
3531
|
+
var Ma = class {
|
|
3528
3532
|
constructor(t, e = "", r) {
|
|
3529
3533
|
this.client = t, this.prefix = e, this.accessDelegation = r;
|
|
3530
3534
|
}
|
|
3531
3535
|
async listTables(t) {
|
|
3532
3536
|
return (await this.client.request({
|
|
3533
3537
|
method: "GET",
|
|
3534
|
-
path: `${this.prefix}/namespaces/${
|
|
3538
|
+
path: `${this.prefix}/namespaces/${St(t.namespace)}/tables`
|
|
3535
3539
|
})).data.identifiers;
|
|
3536
3540
|
}
|
|
3537
3541
|
async createTable(t, e) {
|
|
3538
3542
|
const r = {};
|
|
3539
3543
|
return this.accessDelegation && (r["X-Iceberg-Access-Delegation"] = this.accessDelegation), (await this.client.request({
|
|
3540
3544
|
method: "POST",
|
|
3541
|
-
path: `${this.prefix}/namespaces/${
|
|
3545
|
+
path: `${this.prefix}/namespaces/${St(t.namespace)}/tables`,
|
|
3542
3546
|
body: e,
|
|
3543
3547
|
headers: r
|
|
3544
3548
|
})).data.metadata;
|
|
@@ -3546,7 +3550,7 @@ var Ba = class {
|
|
|
3546
3550
|
async updateTable(t, e) {
|
|
3547
3551
|
const r = await this.client.request({
|
|
3548
3552
|
method: "POST",
|
|
3549
|
-
path: `${this.prefix}/namespaces/${
|
|
3553
|
+
path: `${this.prefix}/namespaces/${St(t.namespace)}/tables/${t.name}`,
|
|
3550
3554
|
body: e
|
|
3551
3555
|
});
|
|
3552
3556
|
return {
|
|
@@ -3557,7 +3561,7 @@ var Ba = class {
|
|
|
3557
3561
|
async dropTable(t, e) {
|
|
3558
3562
|
await this.client.request({
|
|
3559
3563
|
method: "DELETE",
|
|
3560
|
-
path: `${this.prefix}/namespaces/${
|
|
3564
|
+
path: `${this.prefix}/namespaces/${St(t.namespace)}/tables/${t.name}`,
|
|
3561
3565
|
query: { purgeRequested: String(e?.purge ?? !1) }
|
|
3562
3566
|
});
|
|
3563
3567
|
}
|
|
@@ -3565,7 +3569,7 @@ var Ba = class {
|
|
|
3565
3569
|
const e = {};
|
|
3566
3570
|
return this.accessDelegation && (e["X-Iceberg-Access-Delegation"] = this.accessDelegation), (await this.client.request({
|
|
3567
3571
|
method: "GET",
|
|
3568
|
-
path: `${this.prefix}/namespaces/${
|
|
3572
|
+
path: `${this.prefix}/namespaces/${St(t.namespace)}/tables/${t.name}`,
|
|
3569
3573
|
headers: e
|
|
3570
3574
|
})).data.metadata;
|
|
3571
3575
|
}
|
|
@@ -3575,7 +3579,7 @@ var Ba = class {
|
|
|
3575
3579
|
try {
|
|
3576
3580
|
return await this.client.request({
|
|
3577
3581
|
method: "HEAD",
|
|
3578
|
-
path: `${this.prefix}/namespaces/${
|
|
3582
|
+
path: `${this.prefix}/namespaces/${St(t.namespace)}/tables/${t.name}`,
|
|
3579
3583
|
headers: e
|
|
3580
3584
|
}), !0;
|
|
3581
3585
|
} catch (r) {
|
|
@@ -3593,7 +3597,7 @@ var Ba = class {
|
|
|
3593
3597
|
throw r;
|
|
3594
3598
|
}
|
|
3595
3599
|
}
|
|
3596
|
-
},
|
|
3600
|
+
}, Ba = class {
|
|
3597
3601
|
/**
|
|
3598
3602
|
* Creates a new Iceberg REST Catalog client.
|
|
3599
3603
|
*
|
|
@@ -3603,11 +3607,11 @@ var Ba = class {
|
|
|
3603
3607
|
let e = "v1";
|
|
3604
3608
|
t.catalogName && (e += `/${t.catalogName}`);
|
|
3605
3609
|
const r = t.baseUrl.endsWith("/") ? t.baseUrl : `${t.baseUrl}/`;
|
|
3606
|
-
this.client =
|
|
3610
|
+
this.client = La({
|
|
3607
3611
|
baseUrl: r,
|
|
3608
3612
|
auth: t.auth,
|
|
3609
3613
|
fetchImpl: t.fetch
|
|
3610
|
-
}), this.accessDelegation = t.accessDelegation?.join(","), this.namespaceOps = new
|
|
3614
|
+
}), this.accessDelegation = t.accessDelegation?.join(","), this.namespaceOps = new Ua(this.client, e), this.tableOps = new Ma(this.client, e, this.accessDelegation);
|
|
3611
3615
|
}
|
|
3612
3616
|
/**
|
|
3613
3617
|
* Lists all namespaces in the catalog.
|
|
@@ -3884,12 +3888,12 @@ var cr = class extends Sr {
|
|
|
3884
3888
|
statusCode: this.statusCode
|
|
3885
3889
|
};
|
|
3886
3890
|
}
|
|
3887
|
-
},
|
|
3891
|
+
}, mn = class extends Sr {
|
|
3888
3892
|
constructor(t, e, r = "storage") {
|
|
3889
3893
|
super(t, r), this.name = r === "vectors" ? "StorageVectorsUnknownError" : "StorageUnknownError", this.originalError = e;
|
|
3890
3894
|
}
|
|
3891
3895
|
};
|
|
3892
|
-
const
|
|
3896
|
+
const Fa = (t) => t ? (...e) => t(...e) : (...e) => fetch(...e), Ka = (t) => {
|
|
3893
3897
|
if (typeof t != "object" || t === null) return !1;
|
|
3894
3898
|
const e = Object.getPrototypeOf(t);
|
|
3895
3899
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
@@ -3901,7 +3905,7 @@ const Ka = (t) => t ? (...e) => t(...e) : (...e) => fetch(...e), qa = (t) => {
|
|
|
3901
3905
|
const n = r.replace(/([-_][a-z])/gi, (a) => a.toUpperCase().replace(/[-_]/g, ""));
|
|
3902
3906
|
e[n] = Fr(s);
|
|
3903
3907
|
}), e;
|
|
3904
|
-
},
|
|
3908
|
+
}, qa = (t) => !t || typeof t != "string" || t.length === 0 || t.length > 100 || t.trim() !== t || t.includes("/") || t.includes("\\") ? !1 : /^[\w!.\*'() &$@=;:+,?-]+$/.test(t);
|
|
3905
3909
|
function Yt(t) {
|
|
3906
3910
|
"@babel/helpers - typeof";
|
|
3907
3911
|
return Yt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -3910,7 +3914,7 @@ function Yt(t) {
|
|
|
3910
3914
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3911
3915
|
}, Yt(t);
|
|
3912
3916
|
}
|
|
3913
|
-
function
|
|
3917
|
+
function Wa(t, e) {
|
|
3914
3918
|
if (Yt(t) != "object" || !t) return t;
|
|
3915
3919
|
var r = t[Symbol.toPrimitive];
|
|
3916
3920
|
if (r !== void 0) {
|
|
@@ -3920,12 +3924,12 @@ function Ha(t, e) {
|
|
|
3920
3924
|
}
|
|
3921
3925
|
return (e === "string" ? String : Number)(t);
|
|
3922
3926
|
}
|
|
3923
|
-
function
|
|
3924
|
-
var e =
|
|
3927
|
+
function Ha(t) {
|
|
3928
|
+
var e = Wa(t, "string");
|
|
3925
3929
|
return Yt(e) == "symbol" ? e : e + "";
|
|
3926
3930
|
}
|
|
3927
|
-
function
|
|
3928
|
-
return (e =
|
|
3931
|
+
function Ga(t, e, r) {
|
|
3932
|
+
return (e = Ha(e)) in t ? Object.defineProperty(t, e, {
|
|
3929
3933
|
value: r,
|
|
3930
3934
|
enumerable: !0,
|
|
3931
3935
|
configurable: !0,
|
|
@@ -3946,7 +3950,7 @@ function R(t) {
|
|
|
3946
3950
|
for (var e = 1; e < arguments.length; e++) {
|
|
3947
3951
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
3948
3952
|
e % 2 ? gs(Object(r), !0).forEach(function(s) {
|
|
3949
|
-
|
|
3953
|
+
Ga(t, s, r[s]);
|
|
3950
3954
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : gs(Object(r)).forEach(function(s) {
|
|
3951
3955
|
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(r, s));
|
|
3952
3956
|
});
|
|
@@ -3956,7 +3960,7 @@ function R(t) {
|
|
|
3956
3960
|
const ys = (t) => {
|
|
3957
3961
|
var e;
|
|
3958
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);
|
|
3959
|
-
},
|
|
3963
|
+
}, Va = async (t, e, r, s) => {
|
|
3960
3964
|
if (t && typeof t == "object" && "status" in t && "ok" in t && typeof t.status == "number" && !r?.noResolveJson) {
|
|
3961
3965
|
const n = t, a = n.status || 500;
|
|
3962
3966
|
if (typeof n.json == "function") n.json().then((i) => {
|
|
@@ -3975,17 +3979,17 @@ const ys = (t) => {
|
|
|
3975
3979
|
const i = a + "";
|
|
3976
3980
|
e(new cr(n.statusText || `HTTP ${a} error`, a, i, s));
|
|
3977
3981
|
}
|
|
3978
|
-
} else e(new
|
|
3979
|
-
},
|
|
3982
|
+
} else e(new mn(ys(t), t, s));
|
|
3983
|
+
}, za = (t, e, r, s) => {
|
|
3980
3984
|
const n = {
|
|
3981
3985
|
method: t,
|
|
3982
3986
|
headers: e?.headers || {}
|
|
3983
3987
|
};
|
|
3984
|
-
return t === "GET" || t === "HEAD" || !s ? R(R({}, n), r) : (
|
|
3988
|
+
return t === "GET" || t === "HEAD" || !s ? R(R({}, n), r) : (Ka(s) ? (n.headers = R({ "Content-Type": "application/json" }, e?.headers), n.body = JSON.stringify(s)) : n.body = s, e?.duplex && (n.duplex = e.duplex), R(R({}, n), r));
|
|
3985
3989
|
};
|
|
3986
3990
|
async function Kt(t, e, r, s, n, a, i) {
|
|
3987
3991
|
return new Promise((o, c) => {
|
|
3988
|
-
t(r,
|
|
3992
|
+
t(r, za(e, s, n, a)).then((u) => {
|
|
3989
3993
|
if (!u.ok) throw u;
|
|
3990
3994
|
if (s?.noResolveJson) return u;
|
|
3991
3995
|
if (i === "vectors") {
|
|
@@ -3994,10 +3998,10 @@ async function Kt(t, e, r, s, n, a, i) {
|
|
|
3994
3998
|
if (!d || !d.includes("application/json")) return {};
|
|
3995
3999
|
}
|
|
3996
4000
|
return u.json();
|
|
3997
|
-
}).then((u) => o(u)).catch((u) =>
|
|
4001
|
+
}).then((u) => o(u)).catch((u) => Va(u, c, s, i));
|
|
3998
4002
|
});
|
|
3999
4003
|
}
|
|
4000
|
-
function
|
|
4004
|
+
function pn(t = "storage") {
|
|
4001
4005
|
return {
|
|
4002
4006
|
get: async (e, r, s, n) => Kt(e, "GET", r, s, n, void 0, t),
|
|
4003
4007
|
post: async (e, r, s, n, a) => Kt(e, "POST", r, n, a, s, t),
|
|
@@ -4006,7 +4010,7 @@ function gn(t = "storage") {
|
|
|
4006
4010
|
remove: async (e, r, s, n, a) => Kt(e, "DELETE", r, n, a, s, t)
|
|
4007
4011
|
};
|
|
4008
4012
|
}
|
|
4009
|
-
const
|
|
4013
|
+
const Ja = pn("storage"), { get: Qt, post: $e, put: Kr, head: Ya, remove: Yr } = Ja, Pe = pn("vectors");
|
|
4010
4014
|
var It = class {
|
|
4011
4015
|
/**
|
|
4012
4016
|
* Creates a new BaseApiClient instance
|
|
@@ -4016,7 +4020,7 @@ var It = class {
|
|
|
4016
4020
|
* @param namespace - Error namespace ('storage' or 'vectors')
|
|
4017
4021
|
*/
|
|
4018
4022
|
constructor(t, e = {}, r, s = "storage") {
|
|
4019
|
-
this.shouldThrowOnError = !1, this.url = t, this.headers = e, this.fetch =
|
|
4023
|
+
this.shouldThrowOnError = !1, this.url = t, this.headers = e, this.fetch = Fa(r), this.namespace = s;
|
|
4020
4024
|
}
|
|
4021
4025
|
/**
|
|
4022
4026
|
* Enable throwing errors instead of returning them.
|
|
@@ -4079,7 +4083,7 @@ var It = class {
|
|
|
4079
4083
|
throw r;
|
|
4080
4084
|
}
|
|
4081
4085
|
}
|
|
4082
|
-
},
|
|
4086
|
+
}, Qa = class {
|
|
4083
4087
|
constructor(t, e) {
|
|
4084
4088
|
this.downloadFn = t, this.shouldThrowOnError = e;
|
|
4085
4089
|
}
|
|
@@ -4103,14 +4107,14 @@ var It = class {
|
|
|
4103
4107
|
}
|
|
4104
4108
|
}
|
|
4105
4109
|
};
|
|
4106
|
-
let
|
|
4107
|
-
|
|
4108
|
-
var
|
|
4110
|
+
let gn;
|
|
4111
|
+
gn = Symbol.toStringTag;
|
|
4112
|
+
var Xa = class {
|
|
4109
4113
|
constructor(t, e) {
|
|
4110
|
-
this.downloadFn = t, this.shouldThrowOnError = e, this[
|
|
4114
|
+
this.downloadFn = t, this.shouldThrowOnError = e, this[gn] = "BlobDownloadBuilder", this.promise = null;
|
|
4111
4115
|
}
|
|
4112
4116
|
asStream() {
|
|
4113
|
-
return new
|
|
4117
|
+
return new Qa(this.downloadFn, this.shouldThrowOnError);
|
|
4114
4118
|
}
|
|
4115
4119
|
then(t, e) {
|
|
4116
4120
|
return this.getPromise().then(t, e);
|
|
@@ -4141,7 +4145,7 @@ var Za = class {
|
|
|
4141
4145
|
}
|
|
4142
4146
|
}
|
|
4143
4147
|
};
|
|
4144
|
-
const
|
|
4148
|
+
const Za = {
|
|
4145
4149
|
limit: 100,
|
|
4146
4150
|
offset: 0,
|
|
4147
4151
|
sortBy: {
|
|
@@ -4153,7 +4157,7 @@ const ei = {
|
|
|
4153
4157
|
contentType: "text/plain;charset=UTF-8",
|
|
4154
4158
|
upsert: !1
|
|
4155
4159
|
};
|
|
4156
|
-
var
|
|
4160
|
+
var ei = class extends It {
|
|
4157
4161
|
constructor(t, e = {}, r, s) {
|
|
4158
4162
|
super(t, e, s, "storage"), this.bucketId = r;
|
|
4159
4163
|
}
|
|
@@ -4604,7 +4608,7 @@ var ti = class extends It {
|
|
|
4604
4608
|
headers: this.headers,
|
|
4605
4609
|
noResolveJson: !0
|
|
4606
4610
|
}, r);
|
|
4607
|
-
return new
|
|
4611
|
+
return new Xa(o, this.shouldThrowOnError);
|
|
4608
4612
|
}
|
|
4609
4613
|
/**
|
|
4610
4614
|
* Retrieves the details of an existing file.
|
|
@@ -4645,13 +4649,13 @@ var ti = class extends It {
|
|
|
4645
4649
|
var e = this;
|
|
4646
4650
|
const r = e._getFinalPath(t);
|
|
4647
4651
|
try {
|
|
4648
|
-
return await
|
|
4652
|
+
return await Ya(e.fetch, `${e.url}/object/${r}`, { headers: e.headers }), {
|
|
4649
4653
|
data: !0,
|
|
4650
4654
|
error: null
|
|
4651
4655
|
};
|
|
4652
4656
|
} catch (s) {
|
|
4653
4657
|
if (e.shouldThrowOnError) throw s;
|
|
4654
|
-
if (xr(s) && s instanceof
|
|
4658
|
+
if (xr(s) && s instanceof mn) {
|
|
4655
4659
|
const n = s.originalError;
|
|
4656
4660
|
if ([400, 404].includes(n?.status)) return {
|
|
4657
4661
|
data: !1,
|
|
@@ -4817,7 +4821,7 @@ var ti = class extends It {
|
|
|
4817
4821
|
async list(t, e, r) {
|
|
4818
4822
|
var s = this;
|
|
4819
4823
|
return s.handleOperation(async () => {
|
|
4820
|
-
const n = R(R(R({},
|
|
4824
|
+
const n = R(R(R({}, Za), e), {}, { prefix: t || "" });
|
|
4821
4825
|
return await $e(s.fetch, `${s.url}/object/list/${s.bucketId}`, n, { headers: s.headers }, r);
|
|
4822
4826
|
});
|
|
4823
4827
|
}
|
|
@@ -4852,8 +4856,8 @@ var ti = class extends It {
|
|
|
4852
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("&");
|
|
4853
4857
|
}
|
|
4854
4858
|
};
|
|
4855
|
-
const
|
|
4856
|
-
var
|
|
4859
|
+
const ti = "2.98.0", tr = { "X-Client-Info": `storage-js/${ti}` };
|
|
4860
|
+
var ri = class extends It {
|
|
4857
4861
|
constructor(t, e = {}, r, s) {
|
|
4858
4862
|
const n = new URL(t);
|
|
4859
4863
|
s?.useNewHostname && /supabase\.(co|in|red)$/.test(n.hostname) && !n.hostname.includes("storage.supabase.") && (n.hostname = n.hostname.replace("supabase.", "storage.supabase."));
|
|
@@ -5090,7 +5094,7 @@ var si = class extends It {
|
|
|
5090
5094
|
const e = {};
|
|
5091
5095
|
return t && ("limit" in t && (e.limit = String(t.limit)), "offset" in t && (e.offset = String(t.offset)), t.search && (e.search = t.search), t.sortColumn && (e.sortColumn = t.sortColumn), t.sortOrder && (e.sortOrder = t.sortOrder)), Object.keys(e).length > 0 ? "?" + new URLSearchParams(e).toString() : "";
|
|
5092
5096
|
}
|
|
5093
|
-
},
|
|
5097
|
+
}, si = class extends It {
|
|
5094
5098
|
/**
|
|
5095
5099
|
* @alpha
|
|
5096
5100
|
*
|
|
@@ -5365,8 +5369,8 @@ var si = class extends It {
|
|
|
5365
5369
|
*/
|
|
5366
5370
|
from(t) {
|
|
5367
5371
|
var e = this;
|
|
5368
|
-
if (!
|
|
5369
|
-
const r = new
|
|
5372
|
+
if (!qa(t)) throw new Sr("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
|
+
const r = new Ba({
|
|
5370
5374
|
baseUrl: this.url,
|
|
5371
5375
|
catalogName: t,
|
|
5372
5376
|
auth: {
|
|
@@ -5393,7 +5397,7 @@ var si = class extends It {
|
|
|
5393
5397
|
};
|
|
5394
5398
|
} });
|
|
5395
5399
|
}
|
|
5396
|
-
},
|
|
5400
|
+
}, ni = class extends It {
|
|
5397
5401
|
/** Creates a new VectorIndexApi instance */
|
|
5398
5402
|
constructor(t, e = {}, r) {
|
|
5399
5403
|
const s = t.replace(/\/$/, ""), n = R(R({}, tr), {}, { "Content-Type": "application/json" }, e);
|
|
@@ -5425,7 +5429,7 @@ var si = class extends It {
|
|
|
5425
5429
|
indexName: e
|
|
5426
5430
|
}, { headers: r.headers }) || {});
|
|
5427
5431
|
}
|
|
5428
|
-
},
|
|
5432
|
+
}, ai = class extends It {
|
|
5429
5433
|
/** Creates a new VectorDataApi instance */
|
|
5430
5434
|
constructor(t, e = {}, r) {
|
|
5431
5435
|
const s = t.replace(/\/$/, ""), n = R(R({}, tr), {}, { "Content-Type": "application/json" }, e);
|
|
@@ -5463,7 +5467,7 @@ var si = class extends It {
|
|
|
5463
5467
|
if (t.keys.length < 1 || t.keys.length > 500) throw new Error("Keys batch size must be between 1 and 500 items");
|
|
5464
5468
|
return e.handleOperation(async () => await Pe.post(e.fetch, `${e.url}/DeleteVectors`, t, { headers: e.headers }) || {});
|
|
5465
5469
|
}
|
|
5466
|
-
},
|
|
5470
|
+
}, ii = class extends It {
|
|
5467
5471
|
/** Creates a new VectorBucketApi instance */
|
|
5468
5472
|
constructor(t, e = {}, r) {
|
|
5469
5473
|
const s = t.replace(/\/$/, ""), n = R(R({}, tr), {}, { "Content-Type": "application/json" }, e);
|
|
@@ -5489,7 +5493,7 @@ var si = class extends It {
|
|
|
5489
5493
|
var e = this;
|
|
5490
5494
|
return e.handleOperation(async () => await Pe.post(e.fetch, `${e.url}/DeleteVectorBucket`, { vectorBucketName: t }, { headers: e.headers }) || {});
|
|
5491
5495
|
}
|
|
5492
|
-
},
|
|
5496
|
+
}, oi = class extends ii {
|
|
5493
5497
|
/**
|
|
5494
5498
|
* @alpha
|
|
5495
5499
|
*
|
|
@@ -5529,7 +5533,7 @@ var si = class extends It {
|
|
|
5529
5533
|
* ```
|
|
5530
5534
|
*/
|
|
5531
5535
|
from(t) {
|
|
5532
|
-
return new
|
|
5536
|
+
return new li(this.url, this.headers, t, this.fetch);
|
|
5533
5537
|
}
|
|
5534
5538
|
/**
|
|
5535
5539
|
*
|
|
@@ -5635,7 +5639,7 @@ var si = class extends It {
|
|
|
5635
5639
|
var e = () => super.deleteBucket, r = this;
|
|
5636
5640
|
return e().call(r, t);
|
|
5637
5641
|
}
|
|
5638
|
-
},
|
|
5642
|
+
}, li = class extends ni {
|
|
5639
5643
|
/**
|
|
5640
5644
|
* @alpha
|
|
5641
5645
|
*
|
|
@@ -5785,9 +5789,9 @@ var si = class extends It {
|
|
|
5785
5789
|
* ```
|
|
5786
5790
|
*/
|
|
5787
5791
|
index(t) {
|
|
5788
|
-
return new
|
|
5792
|
+
return new ci(this.url, this.headers, this.vectorBucketName, t, this.fetch);
|
|
5789
5793
|
}
|
|
5790
|
-
},
|
|
5794
|
+
}, ci = class extends ai {
|
|
5791
5795
|
/**
|
|
5792
5796
|
*
|
|
5793
5797
|
* @alpha
|
|
@@ -5957,7 +5961,7 @@ var si = class extends It {
|
|
|
5957
5961
|
indexName: r.indexName
|
|
5958
5962
|
}));
|
|
5959
5963
|
}
|
|
5960
|
-
},
|
|
5964
|
+
}, ui = class extends ri {
|
|
5961
5965
|
/**
|
|
5962
5966
|
* Creates a client for Storage buckets, files, analytics, and vectors.
|
|
5963
5967
|
*
|
|
@@ -5987,7 +5991,7 @@ var si = class extends It {
|
|
|
5987
5991
|
* ```
|
|
5988
5992
|
*/
|
|
5989
5993
|
from(t) {
|
|
5990
|
-
return new
|
|
5994
|
+
return new ei(this.url, this.headers, t, this.fetch);
|
|
5991
5995
|
}
|
|
5992
5996
|
/**
|
|
5993
5997
|
*
|
|
@@ -6001,7 +6005,7 @@ var si = class extends It {
|
|
|
6001
6005
|
* @returns A StorageVectorsClient instance configured with the current storage settings.
|
|
6002
6006
|
*/
|
|
6003
6007
|
get vectors() {
|
|
6004
|
-
return new
|
|
6008
|
+
return new oi(this.url + "/vector", {
|
|
6005
6009
|
headers: this.headers,
|
|
6006
6010
|
fetch: this.fetch
|
|
6007
6011
|
});
|
|
@@ -6018,15 +6022,15 @@ var si = class extends It {
|
|
|
6018
6022
|
* @returns A StorageAnalyticsClient instance configured with the current storage settings.
|
|
6019
6023
|
*/
|
|
6020
6024
|
get analytics() {
|
|
6021
|
-
return new
|
|
6025
|
+
return new si(this.url + "/iceberg", this.headers, this.fetch);
|
|
6022
6026
|
}
|
|
6023
6027
|
};
|
|
6024
|
-
const
|
|
6028
|
+
const yn = "2.98.0", Rt = 30 * 1e3, qr = 3, Or = qr * Rt, di = "http://localhost:9999", hi = "supabase.auth.token", fi = { "X-Client-Info": `gotrue-js/${yn}` }, Wr = "X-Supabase-Api-Version", vn = {
|
|
6025
6029
|
"2024-01-01": {
|
|
6026
6030
|
timestamp: Date.parse("2024-01-01T00:00:00.0Z"),
|
|
6027
6031
|
name: "2024-01-01"
|
|
6028
6032
|
}
|
|
6029
|
-
},
|
|
6033
|
+
}, mi = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i, pi = 600 * 1e3;
|
|
6030
6034
|
class Xt extends Error {
|
|
6031
6035
|
constructor(e, r, s) {
|
|
6032
6036
|
super(e), this.__isAuthError = !0, this.name = "AuthError", this.status = r, this.code = s;
|
|
@@ -6035,25 +6039,25 @@ class Xt extends Error {
|
|
|
6035
6039
|
function A(t) {
|
|
6036
6040
|
return typeof t == "object" && t !== null && "__isAuthError" in t;
|
|
6037
6041
|
}
|
|
6038
|
-
class
|
|
6042
|
+
class gi extends Xt {
|
|
6039
6043
|
constructor(e, r, s) {
|
|
6040
6044
|
super(e, r, s), this.name = "AuthApiError", this.status = r, this.code = s;
|
|
6041
6045
|
}
|
|
6042
6046
|
}
|
|
6043
|
-
function
|
|
6047
|
+
function yi(t) {
|
|
6044
6048
|
return A(t) && t.name === "AuthApiError";
|
|
6045
6049
|
}
|
|
6046
|
-
class
|
|
6050
|
+
class ht extends Xt {
|
|
6047
6051
|
constructor(e, r) {
|
|
6048
6052
|
super(e), this.name = "AuthUnknownError", this.originalError = r;
|
|
6049
6053
|
}
|
|
6050
6054
|
}
|
|
6051
|
-
class
|
|
6055
|
+
class Ye extends Xt {
|
|
6052
6056
|
constructor(e, r, s, n) {
|
|
6053
6057
|
super(e, s, n), this.name = r, this.status = s;
|
|
6054
6058
|
}
|
|
6055
6059
|
}
|
|
6056
|
-
class Te extends
|
|
6060
|
+
class Te extends Ye {
|
|
6057
6061
|
constructor() {
|
|
6058
6062
|
super("Auth session missing!", "AuthSessionMissingError", 400, void 0);
|
|
6059
6063
|
}
|
|
@@ -6061,17 +6065,17 @@ class Te extends Je {
|
|
|
6061
6065
|
function Cr(t) {
|
|
6062
6066
|
return A(t) && t.name === "AuthSessionMissingError";
|
|
6063
6067
|
}
|
|
6064
|
-
class
|
|
6068
|
+
class xt extends Ye {
|
|
6065
6069
|
constructor() {
|
|
6066
6070
|
super("Auth session or user missing", "AuthInvalidTokenResponseError", 500, void 0);
|
|
6067
6071
|
}
|
|
6068
6072
|
}
|
|
6069
|
-
class ur extends
|
|
6073
|
+
class ur extends Ye {
|
|
6070
6074
|
constructor(e) {
|
|
6071
6075
|
super(e, "AuthInvalidCredentialsError", 400, void 0);
|
|
6072
6076
|
}
|
|
6073
6077
|
}
|
|
6074
|
-
class dr extends
|
|
6078
|
+
class dr extends Ye {
|
|
6075
6079
|
constructor(e, r = null) {
|
|
6076
6080
|
super(e, "AuthImplicitGrantRedirectError", 500, void 0), this.details = null, this.details = r;
|
|
6077
6081
|
}
|
|
@@ -6084,10 +6088,10 @@ class dr extends Je {
|
|
|
6084
6088
|
};
|
|
6085
6089
|
}
|
|
6086
6090
|
}
|
|
6087
|
-
function
|
|
6091
|
+
function vi(t) {
|
|
6088
6092
|
return A(t) && t.name === "AuthImplicitGrantRedirectError";
|
|
6089
6093
|
}
|
|
6090
|
-
class bs extends
|
|
6094
|
+
class bs extends Ye {
|
|
6091
6095
|
constructor(e, r = null) {
|
|
6092
6096
|
super(e, "AuthPKCEGrantCodeExchangeError", 500, void 0), this.details = null, this.details = r;
|
|
6093
6097
|
}
|
|
@@ -6100,12 +6104,12 @@ class bs extends Je {
|
|
|
6100
6104
|
};
|
|
6101
6105
|
}
|
|
6102
6106
|
}
|
|
6103
|
-
class
|
|
6107
|
+
class bi extends Ye {
|
|
6104
6108
|
constructor() {
|
|
6105
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");
|
|
6106
6110
|
}
|
|
6107
6111
|
}
|
|
6108
|
-
class Hr extends
|
|
6112
|
+
class Hr extends Ye {
|
|
6109
6113
|
constructor(e, r) {
|
|
6110
6114
|
super(e, "AuthRetryableFetchError", r, void 0);
|
|
6111
6115
|
}
|
|
@@ -6113,18 +6117,18 @@ class Hr extends Je {
|
|
|
6113
6117
|
function Nr(t) {
|
|
6114
6118
|
return A(t) && t.name === "AuthRetryableFetchError";
|
|
6115
6119
|
}
|
|
6116
|
-
class ws extends
|
|
6120
|
+
class ws extends Ye {
|
|
6117
6121
|
constructor(e, r, s) {
|
|
6118
6122
|
super(e, "AuthWeakPasswordError", r, "weak_password"), this.reasons = s;
|
|
6119
6123
|
}
|
|
6120
6124
|
}
|
|
6121
|
-
class Gr extends
|
|
6125
|
+
class Gr extends Ye {
|
|
6122
6126
|
constructor(e) {
|
|
6123
6127
|
super(e, "AuthInvalidJwtError", 400, "invalid_jwt");
|
|
6124
6128
|
}
|
|
6125
6129
|
}
|
|
6126
6130
|
const br = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""), _s = `
|
|
6127
|
-
\r=`.split(""),
|
|
6131
|
+
\r=`.split(""), wi = (() => {
|
|
6128
6132
|
const t = new Array(128);
|
|
6129
6133
|
for (let e = 0; e < t.length; e += 1)
|
|
6130
6134
|
t[e] = -1;
|
|
@@ -6146,8 +6150,8 @@ function ks(t, e, r) {
|
|
|
6146
6150
|
r(br[s]), e.queuedBits -= 6;
|
|
6147
6151
|
}
|
|
6148
6152
|
}
|
|
6149
|
-
function
|
|
6150
|
-
const s =
|
|
6153
|
+
function bn(t, e, r) {
|
|
6154
|
+
const s = wi[t];
|
|
6151
6155
|
if (s > -1)
|
|
6152
6156
|
for (e.queue = e.queue << 6 | s, e.queuedBits += 6; e.queuedBits >= 8; )
|
|
6153
6157
|
r(e.queue >> e.queuedBits - 8 & 255), e.queuedBits -= 8;
|
|
@@ -6164,13 +6168,13 @@ function Ss(t) {
|
|
|
6164
6168
|
utf8seq: 0,
|
|
6165
6169
|
codepoint: 0
|
|
6166
6170
|
}, n = { queue: 0, queuedBits: 0 }, a = (i) => {
|
|
6167
|
-
|
|
6171
|
+
Si(i, s, r);
|
|
6168
6172
|
};
|
|
6169
6173
|
for (let i = 0; i < t.length; i += 1)
|
|
6170
|
-
|
|
6174
|
+
bn(t.charCodeAt(i), n, a);
|
|
6171
6175
|
return e.join("");
|
|
6172
6176
|
}
|
|
6173
|
-
function
|
|
6177
|
+
function _i(t, e) {
|
|
6174
6178
|
if (t <= 127) {
|
|
6175
6179
|
e(t);
|
|
6176
6180
|
return;
|
|
@@ -6186,17 +6190,17 @@ function ki(t, e) {
|
|
|
6186
6190
|
}
|
|
6187
6191
|
throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`);
|
|
6188
6192
|
}
|
|
6189
|
-
function
|
|
6193
|
+
function ki(t, e) {
|
|
6190
6194
|
for (let r = 0; r < t.length; r += 1) {
|
|
6191
6195
|
let s = t.charCodeAt(r);
|
|
6192
6196
|
if (s > 55295 && s <= 56319) {
|
|
6193
6197
|
const n = (s - 55296) * 1024 & 65535;
|
|
6194
6198
|
s = (t.charCodeAt(r + 1) - 56320 & 65535 | n) + 65536, r += 1;
|
|
6195
6199
|
}
|
|
6196
|
-
|
|
6200
|
+
_i(s, e);
|
|
6197
6201
|
}
|
|
6198
6202
|
}
|
|
6199
|
-
function
|
|
6203
|
+
function Si(t, e, r) {
|
|
6200
6204
|
if (e.utf8seq === 0) {
|
|
6201
6205
|
if (t <= 127) {
|
|
6202
6206
|
r(t);
|
|
@@ -6227,29 +6231,29 @@ function Nt(t) {
|
|
|
6227
6231
|
e.push(n);
|
|
6228
6232
|
};
|
|
6229
6233
|
for (let n = 0; n < t.length; n += 1)
|
|
6230
|
-
|
|
6234
|
+
bn(t.charCodeAt(n), r, s);
|
|
6231
6235
|
return new Uint8Array(e);
|
|
6232
6236
|
}
|
|
6233
|
-
function
|
|
6237
|
+
function xi(t) {
|
|
6234
6238
|
const e = [];
|
|
6235
|
-
return
|
|
6239
|
+
return ki(t, (r) => e.push(r)), new Uint8Array(e);
|
|
6236
6240
|
}
|
|
6237
|
-
function
|
|
6241
|
+
function gt(t) {
|
|
6238
6242
|
const e = [], r = { queue: 0, queuedBits: 0 }, s = (n) => {
|
|
6239
6243
|
e.push(n);
|
|
6240
6244
|
};
|
|
6241
6245
|
return t.forEach((n) => ks(n, r, s)), ks(null, r, s), e.join("");
|
|
6242
6246
|
}
|
|
6243
|
-
function
|
|
6247
|
+
function ji(t) {
|
|
6244
6248
|
return Math.round(Date.now() / 1e3) + t;
|
|
6245
6249
|
}
|
|
6246
|
-
function
|
|
6250
|
+
function Ti() {
|
|
6247
6251
|
return /* @__PURE__ */ Symbol("auth-callback");
|
|
6248
6252
|
}
|
|
6249
|
-
const fe = () => typeof window < "u" && typeof document < "u",
|
|
6253
|
+
const fe = () => typeof window < "u" && typeof document < "u", lt = {
|
|
6250
6254
|
tested: !1,
|
|
6251
6255
|
writable: !1
|
|
6252
|
-
},
|
|
6256
|
+
}, wn = () => {
|
|
6253
6257
|
if (!fe())
|
|
6254
6258
|
return !1;
|
|
6255
6259
|
try {
|
|
@@ -6258,17 +6262,17 @@ const fe = () => typeof window < "u" && typeof document < "u", ot = {
|
|
|
6258
6262
|
} catch {
|
|
6259
6263
|
return !1;
|
|
6260
6264
|
}
|
|
6261
|
-
if (
|
|
6262
|
-
return
|
|
6265
|
+
if (lt.tested)
|
|
6266
|
+
return lt.writable;
|
|
6263
6267
|
const t = `lswt-${Math.random()}${Math.random()}`;
|
|
6264
6268
|
try {
|
|
6265
|
-
globalThis.localStorage.setItem(t, t), globalThis.localStorage.removeItem(t),
|
|
6269
|
+
globalThis.localStorage.setItem(t, t), globalThis.localStorage.removeItem(t), lt.tested = !0, lt.writable = !0;
|
|
6266
6270
|
} catch {
|
|
6267
|
-
|
|
6271
|
+
lt.tested = !0, lt.writable = !1;
|
|
6268
6272
|
}
|
|
6269
|
-
return
|
|
6273
|
+
return lt.writable;
|
|
6270
6274
|
};
|
|
6271
|
-
function
|
|
6275
|
+
function Pi(t) {
|
|
6272
6276
|
const e = {}, r = new URL(t);
|
|
6273
6277
|
if (r.hash && r.hash[0] === "#")
|
|
6274
6278
|
try {
|
|
@@ -6281,9 +6285,9 @@ function Ai(t) {
|
|
|
6281
6285
|
e[n] = s;
|
|
6282
6286
|
}), e;
|
|
6283
6287
|
}
|
|
6284
|
-
const
|
|
6288
|
+
const _n = (t) => t ? (...e) => t(...e) : (...e) => fetch(...e), Ai = (t) => typeof t == "object" && t !== null && "status" in t && "ok" in t && "json" in t && typeof t.json == "function", Ot = async (t, e, r) => {
|
|
6285
6289
|
await t.setItem(e, JSON.stringify(r));
|
|
6286
|
-
},
|
|
6290
|
+
}, ct = async (t, e) => {
|
|
6287
6291
|
const r = await t.getItem(e);
|
|
6288
6292
|
if (!r)
|
|
6289
6293
|
return null;
|
|
@@ -6308,7 +6312,7 @@ function hr(t) {
|
|
|
6308
6312
|
if (e.length !== 3)
|
|
6309
6313
|
throw new Gr("Invalid JWT structure");
|
|
6310
6314
|
for (let s = 0; s < e.length; s++)
|
|
6311
|
-
if (!
|
|
6315
|
+
if (!mi.test(e[s]))
|
|
6312
6316
|
throw new Gr("JWT not in base64url format");
|
|
6313
6317
|
return {
|
|
6314
6318
|
// using base64url lib
|
|
@@ -6321,12 +6325,12 @@ function hr(t) {
|
|
|
6321
6325
|
}
|
|
6322
6326
|
};
|
|
6323
6327
|
}
|
|
6324
|
-
async function
|
|
6328
|
+
async function Ei(t) {
|
|
6325
6329
|
return await new Promise((e) => {
|
|
6326
6330
|
setTimeout(() => e(null), t);
|
|
6327
6331
|
});
|
|
6328
6332
|
}
|
|
6329
|
-
function
|
|
6333
|
+
function Ri(t, e) {
|
|
6330
6334
|
return new Promise((s, n) => {
|
|
6331
6335
|
(async () => {
|
|
6332
6336
|
for (let a = 0; a < 1 / 0; a++)
|
|
@@ -6345,10 +6349,10 @@ function Oi(t, e) {
|
|
|
6345
6349
|
})();
|
|
6346
6350
|
});
|
|
6347
6351
|
}
|
|
6348
|
-
function
|
|
6352
|
+
function Oi(t) {
|
|
6349
6353
|
return ("0" + t.toString(16)).substr(-2);
|
|
6350
6354
|
}
|
|
6351
|
-
function
|
|
6355
|
+
function Ci() {
|
|
6352
6356
|
const e = new Uint32Array(56);
|
|
6353
6357
|
if (typeof crypto > "u") {
|
|
6354
6358
|
const r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", s = r.length;
|
|
@@ -6357,29 +6361,29 @@ function Ni() {
|
|
|
6357
6361
|
n += r.charAt(Math.floor(Math.random() * s));
|
|
6358
6362
|
return n;
|
|
6359
6363
|
}
|
|
6360
|
-
return crypto.getRandomValues(e), Array.from(e,
|
|
6364
|
+
return crypto.getRandomValues(e), Array.from(e, Oi).join("");
|
|
6361
6365
|
}
|
|
6362
|
-
async function
|
|
6366
|
+
async function Ni(t) {
|
|
6363
6367
|
const r = new TextEncoder().encode(t), s = await crypto.subtle.digest("SHA-256", r), n = new Uint8Array(s);
|
|
6364
6368
|
return Array.from(n).map((a) => String.fromCharCode(a)).join("");
|
|
6365
6369
|
}
|
|
6366
|
-
async function
|
|
6370
|
+
async function Ii(t) {
|
|
6367
6371
|
if (!(typeof crypto < "u" && typeof crypto.subtle < "u" && typeof TextEncoder < "u"))
|
|
6368
6372
|
return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."), t;
|
|
6369
|
-
const r = await
|
|
6373
|
+
const r = await Ni(t);
|
|
6370
6374
|
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
6371
6375
|
}
|
|
6372
|
-
async function
|
|
6373
|
-
const s =
|
|
6376
|
+
async function jt(t, e, r = !1) {
|
|
6377
|
+
const s = Ci();
|
|
6374
6378
|
let n = s;
|
|
6375
6379
|
r && (n += "/PASSWORD_RECOVERY"), await Ot(t, `${e}-code-verifier`, n);
|
|
6376
|
-
const a = await
|
|
6380
|
+
const a = await Ii(s);
|
|
6377
6381
|
return [a, s === a ? "plain" : "s256"];
|
|
6378
6382
|
}
|
|
6379
|
-
const
|
|
6380
|
-
function
|
|
6383
|
+
const Di = /^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;
|
|
6384
|
+
function $i(t) {
|
|
6381
6385
|
const e = t.headers.get(Wr);
|
|
6382
|
-
if (!e || !e.match(
|
|
6386
|
+
if (!e || !e.match(Di))
|
|
6383
6387
|
return null;
|
|
6384
6388
|
try {
|
|
6385
6389
|
return /* @__PURE__ */ new Date(`${e}T00:00:00.0Z`);
|
|
@@ -6387,14 +6391,14 @@ function Li(t) {
|
|
|
6387
6391
|
return null;
|
|
6388
6392
|
}
|
|
6389
6393
|
}
|
|
6390
|
-
function
|
|
6394
|
+
function Li(t) {
|
|
6391
6395
|
if (!t)
|
|
6392
6396
|
throw new Error("Missing exp claim");
|
|
6393
6397
|
const e = Math.floor(Date.now() / 1e3);
|
|
6394
6398
|
if (t <= e)
|
|
6395
6399
|
throw new Error("JWT has expired");
|
|
6396
6400
|
}
|
|
6397
|
-
function
|
|
6401
|
+
function Ui(t) {
|
|
6398
6402
|
switch (t) {
|
|
6399
6403
|
case "RS256":
|
|
6400
6404
|
return {
|
|
@@ -6411,9 +6415,9 @@ function Mi(t) {
|
|
|
6411
6415
|
throw new Error("Invalid alg claim");
|
|
6412
6416
|
}
|
|
6413
6417
|
}
|
|
6414
|
-
const
|
|
6415
|
-
function
|
|
6416
|
-
if (!
|
|
6418
|
+
const Mi = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
6419
|
+
function Tt(t) {
|
|
6420
|
+
if (!Mi.test(t))
|
|
6417
6421
|
throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not");
|
|
6418
6422
|
}
|
|
6419
6423
|
function Ir() {
|
|
@@ -6437,7 +6441,7 @@ function Ir() {
|
|
|
6437
6441
|
}
|
|
6438
6442
|
});
|
|
6439
6443
|
}
|
|
6440
|
-
function
|
|
6444
|
+
function Bi(t, e) {
|
|
6441
6445
|
return new Proxy(t, {
|
|
6442
6446
|
get: (r, s, n) => {
|
|
6443
6447
|
if (s === "__isInsecureUserWarningProxy")
|
|
@@ -6454,53 +6458,53 @@ function Fi(t, e) {
|
|
|
6454
6458
|
function xs(t) {
|
|
6455
6459
|
return JSON.parse(JSON.stringify(t));
|
|
6456
6460
|
}
|
|
6457
|
-
const
|
|
6461
|
+
const ut = (t) => t.msg || t.message || t.error_description || t.error || JSON.stringify(t), Fi = [502, 503, 504];
|
|
6458
6462
|
async function js(t) {
|
|
6459
6463
|
var e;
|
|
6460
|
-
if (!
|
|
6461
|
-
throw new Hr(
|
|
6462
|
-
if (
|
|
6463
|
-
throw new Hr(
|
|
6464
|
+
if (!Ai(t))
|
|
6465
|
+
throw new Hr(ut(t), 0);
|
|
6466
|
+
if (Fi.includes(t.status))
|
|
6467
|
+
throw new Hr(ut(t), t.status);
|
|
6464
6468
|
let r;
|
|
6465
6469
|
try {
|
|
6466
6470
|
r = await t.json();
|
|
6467
6471
|
} catch (a) {
|
|
6468
|
-
throw new
|
|
6472
|
+
throw new ht(ut(a), a);
|
|
6469
6473
|
}
|
|
6470
6474
|
let s;
|
|
6471
|
-
const n =
|
|
6472
|
-
if (n && n.getTime() >=
|
|
6475
|
+
const n = $i(t);
|
|
6476
|
+
if (n && n.getTime() >= vn["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) {
|
|
6473
6477
|
if (s === "weak_password")
|
|
6474
|
-
throw new ws(
|
|
6478
|
+
throw new ws(ut(r), t.status, ((e = r.weak_password) === null || e === void 0 ? void 0 : e.reasons) || []);
|
|
6475
6479
|
if (s === "session_not_found")
|
|
6476
6480
|
throw new Te();
|
|
6477
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))
|
|
6478
|
-
throw new ws(
|
|
6479
|
-
throw new
|
|
6482
|
+
throw new ws(ut(r), t.status, r.weak_password.reasons);
|
|
6483
|
+
throw new gi(ut(r), t.status || 500, s);
|
|
6480
6484
|
}
|
|
6481
|
-
const
|
|
6485
|
+
const Ki = (t, e, r, s) => {
|
|
6482
6486
|
const n = { method: t, headers: e?.headers || {} };
|
|
6483
6487
|
return t === "GET" ? n : (n.headers = Object.assign({ "Content-Type": "application/json;charset=UTF-8" }, e?.headers), n.body = JSON.stringify(s), Object.assign(Object.assign({}, n), r));
|
|
6484
6488
|
};
|
|
6485
6489
|
async function C(t, e, r, s) {
|
|
6486
6490
|
var n;
|
|
6487
6491
|
const a = Object.assign({}, s?.headers);
|
|
6488
|
-
a[Wr] || (a[Wr] =
|
|
6492
|
+
a[Wr] || (a[Wr] = vn["2024-01-01"].name), s?.jwt && (a.Authorization = `Bearer ${s.jwt}`);
|
|
6489
6493
|
const i = (n = s?.query) !== null && n !== void 0 ? n : {};
|
|
6490
6494
|
s?.redirectTo && (i.redirect_to = s.redirectTo);
|
|
6491
|
-
const o = Object.keys(i).length ? "?" + new URLSearchParams(i).toString() : "", c = await
|
|
6495
|
+
const o = Object.keys(i).length ? "?" + new URLSearchParams(i).toString() : "", c = await qi(t, e, r + o, {
|
|
6492
6496
|
headers: a,
|
|
6493
6497
|
noResolveJson: s?.noResolveJson
|
|
6494
6498
|
}, {}, s?.body);
|
|
6495
6499
|
return s?.xform ? s?.xform(c) : { data: Object.assign({}, c), error: null };
|
|
6496
6500
|
}
|
|
6497
|
-
async function
|
|
6498
|
-
const i =
|
|
6501
|
+
async function qi(t, e, r, s, n, a) {
|
|
6502
|
+
const i = Ki(e, s, n, a);
|
|
6499
6503
|
let o;
|
|
6500
6504
|
try {
|
|
6501
6505
|
o = await t(r, Object.assign({}, i));
|
|
6502
6506
|
} catch (c) {
|
|
6503
|
-
throw console.error(c), new Hr(
|
|
6507
|
+
throw console.error(c), new Hr(ut(c), 0);
|
|
6504
6508
|
}
|
|
6505
6509
|
if (o.ok || await js(o), s?.noResolveJson)
|
|
6506
6510
|
return o;
|
|
@@ -6513,7 +6517,7 @@ async function Wi(t, e, r, s, n, a) {
|
|
|
6513
6517
|
function De(t) {
|
|
6514
6518
|
var e;
|
|
6515
6519
|
let r = null;
|
|
6516
|
-
|
|
6520
|
+
Gi(t) && (r = Object.assign({}, t), t.expires_at || (r.expires_at = ji(t.expires_in)));
|
|
6517
6521
|
const s = (e = t.user) !== null && e !== void 0 ? e : t;
|
|
6518
6522
|
return { data: { session: r, user: s }, error: null };
|
|
6519
6523
|
}
|
|
@@ -6521,14 +6525,14 @@ function Ts(t) {
|
|
|
6521
6525
|
const e = De(t);
|
|
6522
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;
|
|
6523
6527
|
}
|
|
6524
|
-
function
|
|
6528
|
+
function rt(t) {
|
|
6525
6529
|
var e;
|
|
6526
6530
|
return { data: { user: (e = t.user) !== null && e !== void 0 ? e : t }, error: null };
|
|
6527
6531
|
}
|
|
6528
|
-
function
|
|
6532
|
+
function Wi(t) {
|
|
6529
6533
|
return { data: t, error: null };
|
|
6530
6534
|
}
|
|
6531
|
-
function
|
|
6535
|
+
function Hi(t) {
|
|
6532
6536
|
const { action_link: e, email_otp: r, hashed_token: s, redirect_to: n, verification_type: a } = t, i = kr(t, ["action_link", "email_otp", "hashed_token", "redirect_to", "verification_type"]), o = {
|
|
6533
6537
|
action_link: e,
|
|
6534
6538
|
email_otp: r,
|
|
@@ -6547,11 +6551,11 @@ function Gi(t) {
|
|
|
6547
6551
|
function Ps(t) {
|
|
6548
6552
|
return t;
|
|
6549
6553
|
}
|
|
6550
|
-
function
|
|
6554
|
+
function Gi(t) {
|
|
6551
6555
|
return t.access_token && t.refresh_token && t.expires_in;
|
|
6552
6556
|
}
|
|
6553
6557
|
const Dr = ["global", "local", "others"];
|
|
6554
|
-
class
|
|
6558
|
+
class Vi {
|
|
6555
6559
|
/**
|
|
6556
6560
|
* Creates an admin API client that can be used to manage users and OAuth clients.
|
|
6557
6561
|
*
|
|
@@ -6566,7 +6570,7 @@ class zi {
|
|
|
6566
6570
|
* ```
|
|
6567
6571
|
*/
|
|
6568
6572
|
constructor({ url: e = "", headers: r = {}, fetch: s }) {
|
|
6569
|
-
this.url = e, this.headers = r, this.fetch =
|
|
6573
|
+
this.url = e, this.headers = r, this.fetch = _n(s), this.mfa = {
|
|
6570
6574
|
listFactors: this._listFactors.bind(this),
|
|
6571
6575
|
deleteFactor: this._deleteFactor.bind(this)
|
|
6572
6576
|
}, this.oauth = {
|
|
@@ -6609,7 +6613,7 @@ class zi {
|
|
|
6609
6613
|
body: { email: e, data: r.data },
|
|
6610
6614
|
headers: this.headers,
|
|
6611
6615
|
redirectTo: r.redirectTo,
|
|
6612
|
-
xform:
|
|
6616
|
+
xform: rt
|
|
6613
6617
|
});
|
|
6614
6618
|
} catch (s) {
|
|
6615
6619
|
if (A(s))
|
|
@@ -6630,7 +6634,7 @@ class zi {
|
|
|
6630
6634
|
return "newEmail" in s && (n.new_email = s?.newEmail, delete n.newEmail), await C(this.fetch, "POST", `${this.url}/admin/generate_link`, {
|
|
6631
6635
|
body: n,
|
|
6632
6636
|
headers: this.headers,
|
|
6633
|
-
xform:
|
|
6637
|
+
xform: Hi,
|
|
6634
6638
|
redirectTo: r?.redirectTo
|
|
6635
6639
|
});
|
|
6636
6640
|
} catch (r) {
|
|
@@ -6655,7 +6659,7 @@ class zi {
|
|
|
6655
6659
|
return await C(this.fetch, "POST", `${this.url}/admin/users`, {
|
|
6656
6660
|
body: e,
|
|
6657
6661
|
headers: this.headers,
|
|
6658
|
-
xform:
|
|
6662
|
+
xform: rt
|
|
6659
6663
|
});
|
|
6660
6664
|
} catch (r) {
|
|
6661
6665
|
if (A(r))
|
|
@@ -6702,11 +6706,11 @@ class zi {
|
|
|
6702
6706
|
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
6703
6707
|
*/
|
|
6704
6708
|
async getUserById(e) {
|
|
6705
|
-
|
|
6709
|
+
Tt(e);
|
|
6706
6710
|
try {
|
|
6707
6711
|
return await C(this.fetch, "GET", `${this.url}/admin/users/${e}`, {
|
|
6708
6712
|
headers: this.headers,
|
|
6709
|
-
xform:
|
|
6713
|
+
xform: rt
|
|
6710
6714
|
});
|
|
6711
6715
|
} catch (r) {
|
|
6712
6716
|
if (A(r))
|
|
@@ -6747,12 +6751,12 @@ class zi {
|
|
|
6747
6751
|
* @see {@link GoTrueClient.updateUser} for client-side user updates (triggers listeners automatically)
|
|
6748
6752
|
*/
|
|
6749
6753
|
async updateUserById(e, r) {
|
|
6750
|
-
|
|
6754
|
+
Tt(e);
|
|
6751
6755
|
try {
|
|
6752
6756
|
return await C(this.fetch, "PUT", `${this.url}/admin/users/${e}`, {
|
|
6753
6757
|
body: r,
|
|
6754
6758
|
headers: this.headers,
|
|
6755
|
-
xform:
|
|
6759
|
+
xform: rt
|
|
6756
6760
|
});
|
|
6757
6761
|
} catch (s) {
|
|
6758
6762
|
if (A(s))
|
|
@@ -6770,14 +6774,14 @@ class zi {
|
|
|
6770
6774
|
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
6771
6775
|
*/
|
|
6772
6776
|
async deleteUser(e, r = !1) {
|
|
6773
|
-
|
|
6777
|
+
Tt(e);
|
|
6774
6778
|
try {
|
|
6775
6779
|
return await C(this.fetch, "DELETE", `${this.url}/admin/users/${e}`, {
|
|
6776
6780
|
headers: this.headers,
|
|
6777
6781
|
body: {
|
|
6778
6782
|
should_soft_delete: r
|
|
6779
6783
|
},
|
|
6780
|
-
xform:
|
|
6784
|
+
xform: rt
|
|
6781
6785
|
});
|
|
6782
6786
|
} catch (s) {
|
|
6783
6787
|
if (A(s))
|
|
@@ -6786,7 +6790,7 @@ class zi {
|
|
|
6786
6790
|
}
|
|
6787
6791
|
}
|
|
6788
6792
|
async _listFactors(e) {
|
|
6789
|
-
|
|
6793
|
+
Tt(e.userId);
|
|
6790
6794
|
try {
|
|
6791
6795
|
const { data: r, error: s } = await C(this.fetch, "GET", `${this.url}/admin/users/${e.userId}/factors`, {
|
|
6792
6796
|
headers: this.headers,
|
|
@@ -6800,7 +6804,7 @@ class zi {
|
|
|
6800
6804
|
}
|
|
6801
6805
|
}
|
|
6802
6806
|
async _deleteFactor(e) {
|
|
6803
|
-
|
|
6807
|
+
Tt(e.userId), Tt(e.id);
|
|
6804
6808
|
try {
|
|
6805
6809
|
return { data: await C(this.fetch, "DELETE", `${this.url}/admin/users/${e.userId}/factors/${e.id}`, {
|
|
6806
6810
|
headers: this.headers
|
|
@@ -6946,24 +6950,24 @@ function As(t = {}) {
|
|
|
6946
6950
|
}
|
|
6947
6951
|
};
|
|
6948
6952
|
}
|
|
6949
|
-
const
|
|
6953
|
+
const ze = {
|
|
6950
6954
|
/**
|
|
6951
6955
|
* @experimental
|
|
6952
6956
|
*/
|
|
6953
|
-
debug: !!(globalThis &&
|
|
6957
|
+
debug: !!(globalThis && wn() && globalThis.localStorage && globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug") === "true")
|
|
6954
6958
|
};
|
|
6955
|
-
class
|
|
6959
|
+
class kn extends Error {
|
|
6956
6960
|
constructor(e) {
|
|
6957
6961
|
super(e), this.isAcquireTimeout = !0;
|
|
6958
6962
|
}
|
|
6959
6963
|
}
|
|
6960
|
-
class
|
|
6964
|
+
class zi extends kn {
|
|
6961
6965
|
}
|
|
6962
6966
|
async function Ji(t, e, r) {
|
|
6963
|
-
|
|
6967
|
+
ze.debug && console.log("@supabase/gotrue-js: navigatorLock: acquire lock", t, e);
|
|
6964
6968
|
const s = new globalThis.AbortController();
|
|
6965
6969
|
e > 0 && setTimeout(() => {
|
|
6966
|
-
s.abort(),
|
|
6970
|
+
s.abort(), ze.debug && console.log("@supabase/gotrue-js: navigatorLock acquire timed out", t);
|
|
6967
6971
|
}, e), await Promise.resolve();
|
|
6968
6972
|
try {
|
|
6969
6973
|
return await globalThis.navigator.locks.request(t, e === 0 ? {
|
|
@@ -6974,16 +6978,16 @@ async function Ji(t, e, r) {
|
|
|
6974
6978
|
signal: s.signal
|
|
6975
6979
|
}, async (n) => {
|
|
6976
6980
|
if (n) {
|
|
6977
|
-
|
|
6981
|
+
ze.debug && console.log("@supabase/gotrue-js: navigatorLock: acquired", t, n.name);
|
|
6978
6982
|
try {
|
|
6979
6983
|
return await r();
|
|
6980
6984
|
} finally {
|
|
6981
|
-
|
|
6985
|
+
ze.debug && console.log("@supabase/gotrue-js: navigatorLock: released", t, n.name);
|
|
6982
6986
|
}
|
|
6983
6987
|
} else {
|
|
6984
6988
|
if (e === 0)
|
|
6985
|
-
throw
|
|
6986
|
-
if (
|
|
6989
|
+
throw ze.debug && console.log("@supabase/gotrue-js: navigatorLock: not immediately available", t), new zi(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);
|
|
6990
|
+
if (ze.debug)
|
|
6987
6991
|
try {
|
|
6988
6992
|
const a = await globalThis.navigator.locks.query();
|
|
6989
6993
|
console.log("@supabase/gotrue-js: Navigator LockManager state", JSON.stringify(a, null, " "));
|
|
@@ -6994,7 +6998,22 @@ async function Ji(t, e, r) {
|
|
|
6994
6998
|
}
|
|
6995
6999
|
});
|
|
6996
7000
|
} catch (n) {
|
|
6997
|
-
|
|
7001
|
+
if (n?.name === "AbortError" && e > 0)
|
|
7002
|
+
return ze.debug && console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock", t), console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`), await Promise.resolve().then(() => globalThis.navigator.locks.request(t, {
|
|
7003
|
+
mode: "exclusive",
|
|
7004
|
+
steal: !0
|
|
7005
|
+
}, async (a) => {
|
|
7006
|
+
if (a) {
|
|
7007
|
+
ze.debug && console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)", t, a.name);
|
|
7008
|
+
try {
|
|
7009
|
+
return await r();
|
|
7010
|
+
} finally {
|
|
7011
|
+
ze.debug && console.log("@supabase/gotrue-js: navigatorLock: released (stolen)", t, a.name);
|
|
7012
|
+
}
|
|
7013
|
+
} else
|
|
7014
|
+
return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"), await r();
|
|
7015
|
+
}));
|
|
7016
|
+
throw n;
|
|
6998
7017
|
}
|
|
6999
7018
|
}
|
|
7000
7019
|
function Yi() {
|
|
@@ -7010,7 +7029,7 @@ function Yi() {
|
|
|
7010
7029
|
typeof self < "u" && (self.globalThis = self);
|
|
7011
7030
|
}
|
|
7012
7031
|
}
|
|
7013
|
-
function
|
|
7032
|
+
function Sn(t) {
|
|
7014
7033
|
if (!/^0x[a-fA-F0-9]{40}$/.test(t))
|
|
7015
7034
|
throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);
|
|
7016
7035
|
return t.toLowerCase();
|
|
@@ -7040,7 +7059,7 @@ function Zi(t) {
|
|
|
7040
7059
|
`))
|
|
7041
7060
|
throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`);
|
|
7042
7061
|
}
|
|
7043
|
-
const p =
|
|
7062
|
+
const p = Sn(t.address), g = d ? `${d}://${s}` : s, y = t.statement ? `${t.statement}
|
|
7044
7063
|
` : "", v = `${g} wants you to sign in with your Ethereum account:
|
|
7045
7064
|
${p}
|
|
7046
7065
|
|
|
@@ -7141,7 +7160,7 @@ function eo({ error: t, options: e }) {
|
|
|
7141
7160
|
});
|
|
7142
7161
|
if (t.name === "SecurityError") {
|
|
7143
7162
|
const i = window.location.hostname;
|
|
7144
|
-
if (
|
|
7163
|
+
if (xn(i)) {
|
|
7145
7164
|
if (a.rp.id !== i)
|
|
7146
7165
|
return new ne({
|
|
7147
7166
|
message: `The RP ID "${a.rp.id}" is invalid for this domain`,
|
|
@@ -7193,7 +7212,7 @@ function to({ error: t, options: e }) {
|
|
|
7193
7212
|
});
|
|
7194
7213
|
if (t.name === "SecurityError") {
|
|
7195
7214
|
const s = window.location.hostname;
|
|
7196
|
-
if (
|
|
7215
|
+
if (xn(s)) {
|
|
7197
7216
|
if (r.rpId !== s)
|
|
7198
7217
|
return new ne({
|
|
7199
7218
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
@@ -7309,8 +7328,8 @@ function io(t) {
|
|
|
7309
7328
|
id: t.id,
|
|
7310
7329
|
rawId: t.id,
|
|
7311
7330
|
response: {
|
|
7312
|
-
attestationObject:
|
|
7313
|
-
clientDataJSON:
|
|
7331
|
+
attestationObject: gt(new Uint8Array(t.response.attestationObject)),
|
|
7332
|
+
clientDataJSON: gt(new Uint8Array(t.response.clientDataJSON))
|
|
7314
7333
|
},
|
|
7315
7334
|
type: "public-key",
|
|
7316
7335
|
clientExtensionResults: t.getClientExtensionResults(),
|
|
@@ -7328,10 +7347,10 @@ function oo(t) {
|
|
|
7328
7347
|
rawId: t.id,
|
|
7329
7348
|
// W3C spec expects rawId to match id for JSON format
|
|
7330
7349
|
response: {
|
|
7331
|
-
authenticatorData:
|
|
7332
|
-
clientDataJSON:
|
|
7333
|
-
signature:
|
|
7334
|
-
userHandle: n.userHandle ?
|
|
7350
|
+
authenticatorData: gt(new Uint8Array(n.authenticatorData)),
|
|
7351
|
+
clientDataJSON: gt(new Uint8Array(n.clientDataJSON)),
|
|
7352
|
+
signature: gt(new Uint8Array(n.signature)),
|
|
7353
|
+
userHandle: n.userHandle ? gt(new Uint8Array(n.userHandle)) : void 0
|
|
7335
7354
|
},
|
|
7336
7355
|
type: "public-key",
|
|
7337
7356
|
clientExtensionResults: s,
|
|
@@ -7339,13 +7358,13 @@ function oo(t) {
|
|
|
7339
7358
|
authenticatorAttachment: (e = r.authenticatorAttachment) !== null && e !== void 0 ? e : void 0
|
|
7340
7359
|
};
|
|
7341
7360
|
}
|
|
7342
|
-
function
|
|
7361
|
+
function xn(t) {
|
|
7343
7362
|
return (
|
|
7344
7363
|
// Consider localhost valid as well since it's okay wrt Secure Contexts
|
|
7345
7364
|
t === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)
|
|
7346
7365
|
);
|
|
7347
7366
|
}
|
|
7348
|
-
function
|
|
7367
|
+
function Es() {
|
|
7349
7368
|
var t, e;
|
|
7350
7369
|
return !!(fe() && "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");
|
|
7351
7370
|
}
|
|
@@ -7525,7 +7544,7 @@ class po {
|
|
|
7525
7544
|
} catch (o) {
|
|
7526
7545
|
return A(o) ? { data: null, error: o } : {
|
|
7527
7546
|
data: null,
|
|
7528
|
-
error: new
|
|
7547
|
+
error: new ht("Unexpected error in challenge", o)
|
|
7529
7548
|
};
|
|
7530
7549
|
}
|
|
7531
7550
|
}
|
|
@@ -7571,10 +7590,10 @@ class po {
|
|
|
7571
7590
|
error: new Xt("rpId is required for WebAuthn authentication")
|
|
7572
7591
|
};
|
|
7573
7592
|
try {
|
|
7574
|
-
if (!
|
|
7593
|
+
if (!Es())
|
|
7575
7594
|
return {
|
|
7576
7595
|
data: null,
|
|
7577
|
-
error: new
|
|
7596
|
+
error: new ht("Browser does not support WebAuthn", null)
|
|
7578
7597
|
};
|
|
7579
7598
|
const { data: i, error: o } = await this.challenge({
|
|
7580
7599
|
factorId: e,
|
|
@@ -7597,7 +7616,7 @@ class po {
|
|
|
7597
7616
|
} catch (i) {
|
|
7598
7617
|
return A(i) ? { data: null, error: i } : {
|
|
7599
7618
|
data: null,
|
|
7600
|
-
error: new
|
|
7619
|
+
error: new ht("Unexpected error in authenticate", i)
|
|
7601
7620
|
};
|
|
7602
7621
|
}
|
|
7603
7622
|
}
|
|
@@ -7623,10 +7642,10 @@ class po {
|
|
|
7623
7642
|
error: new Xt("rpId is required for WebAuthn registration")
|
|
7624
7643
|
};
|
|
7625
7644
|
try {
|
|
7626
|
-
if (!
|
|
7645
|
+
if (!Es())
|
|
7627
7646
|
return {
|
|
7628
7647
|
data: null,
|
|
7629
|
-
error: new
|
|
7648
|
+
error: new ht("Browser does not support WebAuthn", null)
|
|
7630
7649
|
};
|
|
7631
7650
|
const { data: i, error: o } = await this._enroll({
|
|
7632
7651
|
friendlyName: e
|
|
@@ -7657,28 +7676,28 @@ class po {
|
|
|
7657
7676
|
} catch (i) {
|
|
7658
7677
|
return A(i) ? { data: null, error: i } : {
|
|
7659
7678
|
data: null,
|
|
7660
|
-
error: new
|
|
7679
|
+
error: new ht("Unexpected error in register", i)
|
|
7661
7680
|
};
|
|
7662
7681
|
}
|
|
7663
7682
|
}
|
|
7664
7683
|
}
|
|
7665
7684
|
Yi();
|
|
7666
7685
|
const go = {
|
|
7667
|
-
url:
|
|
7668
|
-
storageKey:
|
|
7686
|
+
url: di,
|
|
7687
|
+
storageKey: hi,
|
|
7669
7688
|
autoRefreshToken: !0,
|
|
7670
7689
|
persistSession: !0,
|
|
7671
7690
|
detectSessionInUrl: !0,
|
|
7672
|
-
headers:
|
|
7691
|
+
headers: fi,
|
|
7673
7692
|
flowType: "implicit",
|
|
7674
7693
|
debug: !1,
|
|
7675
7694
|
hasCustomAuthorizationHeader: !1,
|
|
7676
7695
|
throwOnError: !1,
|
|
7677
|
-
lockAcquireTimeout:
|
|
7678
|
-
//
|
|
7696
|
+
lockAcquireTimeout: 5e3,
|
|
7697
|
+
// 5 seconds
|
|
7679
7698
|
skipAutoInitialize: !1
|
|
7680
7699
|
};
|
|
7681
|
-
async function
|
|
7700
|
+
async function Rs(t, e, r) {
|
|
7682
7701
|
return await r();
|
|
7683
7702
|
}
|
|
7684
7703
|
const Pt = {};
|
|
@@ -7722,11 +7741,11 @@ class Zt {
|
|
|
7722
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.`;
|
|
7723
7742
|
console.warn(i), this.logDebugMessages && console.trace(i);
|
|
7724
7743
|
}
|
|
7725
|
-
if (this.persistSession = a.persistSession, this.autoRefreshToken = a.autoRefreshToken, this.admin = new
|
|
7744
|
+
if (this.persistSession = a.persistSession, this.autoRefreshToken = a.autoRefreshToken, this.admin = new Vi({
|
|
7726
7745
|
url: a.url,
|
|
7727
7746
|
headers: a.headers,
|
|
7728
7747
|
fetch: a.fetch
|
|
7729
|
-
}), this.url = a.url, this.headers = a.headers, this.fetch =
|
|
7748
|
+
}), this.url = a.url, this.headers = a.headers, this.fetch = _n(a.fetch), this.lock = a.lock || Rs, 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 && fe() && (!((s = globalThis?.navigator) === null || s === void 0) && s.locks) ? this.lock = Ji : this.lock = Rs, this.jwks || (this.jwks = { keys: [] }, this.jwks_cached_at = Number.MIN_SAFE_INTEGER), this.mfa = {
|
|
7730
7749
|
verify: this._verify.bind(this),
|
|
7731
7750
|
enroll: this._enroll.bind(this),
|
|
7732
7751
|
unenroll: this._unenroll.bind(this),
|
|
@@ -7741,7 +7760,7 @@ class Zt {
|
|
|
7741
7760
|
denyAuthorization: this._denyAuthorization.bind(this),
|
|
7742
7761
|
listGrants: this._listOAuthGrants.bind(this),
|
|
7743
7762
|
revokeGrant: this._revokeOAuthGrant.bind(this)
|
|
7744
|
-
}, this.persistSession ? (a.storage ? this.storage = a.storage :
|
|
7763
|
+
}, this.persistSession ? (a.storage ? this.storage = a.storage : wn() ? this.storage = globalThis.localStorage : (this.memoryStorage = {}, this.storage = As(this.memoryStorage)), a.userStorage && (this.userStorage = a.userStorage)) : (this.memoryStorage = {}, this.storage = As(this.memoryStorage)), fe() && globalThis.BroadcastChannel && this.persistSession && this.storageKey) {
|
|
7745
7764
|
try {
|
|
7746
7765
|
this.broadcastChannel = new globalThis.BroadcastChannel(this.storageKey);
|
|
7747
7766
|
} catch (i) {
|
|
@@ -7777,7 +7796,7 @@ class Zt {
|
|
|
7777
7796
|
return e;
|
|
7778
7797
|
}
|
|
7779
7798
|
_logPrefix() {
|
|
7780
|
-
return `GoTrueClient@${this.storageKey}:${this.instanceID} (${
|
|
7799
|
+
return `GoTrueClient@${this.storageKey}:${this.instanceID} (${yn}) ${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
7781
7800
|
}
|
|
7782
7801
|
_debug(...e) {
|
|
7783
7802
|
return this.logDebugMessages && this.logger(this._logPrefix(), ...e), this;
|
|
@@ -7800,10 +7819,10 @@ class Zt {
|
|
|
7800
7819
|
var e;
|
|
7801
7820
|
try {
|
|
7802
7821
|
let r = {}, s = "none";
|
|
7803
|
-
if (fe() && (r =
|
|
7822
|
+
if (fe() && (r = Pi(window.location.href), this._isImplicitGrantCallback(r) ? s = "implicit" : await this._isPKCECallback(r) && (s = "pkce")), fe() && this.detectSessionInUrl && s !== "none") {
|
|
7804
7823
|
const { data: n, error: a } = await this._getSessionFromURL(r, s);
|
|
7805
7824
|
if (a) {
|
|
7806
|
-
if (this._debug("#_initialize()", "error detecting session from URL", a),
|
|
7825
|
+
if (this._debug("#_initialize()", "error detecting session from URL", a), vi(a)) {
|
|
7807
7826
|
const c = (e = a.details) === null || e === void 0 ? void 0 : e.code;
|
|
7808
7827
|
if (c === "identity_already_exists" || c === "identity_not_found" || c === "single_identity_not_deletable")
|
|
7809
7828
|
return { error: a };
|
|
@@ -7818,7 +7837,7 @@ class Zt {
|
|
|
7818
7837
|
return await this._recoverAndRefresh(), { error: null };
|
|
7819
7838
|
} catch (r) {
|
|
7820
7839
|
return A(r) ? this._returnResult({ error: r }) : this._returnResult({
|
|
7821
|
-
error: new
|
|
7840
|
+
error: new ht("Unexpected error during initialization", r)
|
|
7822
7841
|
});
|
|
7823
7842
|
} finally {
|
|
7824
7843
|
await this._handleVisibilityChange(), this._debug("#_initialize()", "end");
|
|
@@ -7867,7 +7886,7 @@ class Zt {
|
|
|
7867
7886
|
if ("email" in e) {
|
|
7868
7887
|
const { email: d, password: f, options: m } = e;
|
|
7869
7888
|
let p = null, g = null;
|
|
7870
|
-
this.flowType === "pkce" && ([p, g] = await
|
|
7889
|
+
this.flowType === "pkce" && ([p, g] = await jt(this.storage, this.storageKey)), a = await C(this.fetch, "POST", `${this.url}/signup`, {
|
|
7871
7890
|
headers: this.headers,
|
|
7872
7891
|
redirectTo: m?.emailRedirectTo,
|
|
7873
7892
|
body: {
|
|
@@ -7945,7 +7964,7 @@ class Zt {
|
|
|
7945
7964
|
if (n)
|
|
7946
7965
|
return this._returnResult({ data: { user: null, session: null }, error: n });
|
|
7947
7966
|
if (!s || !s.session || !s.user) {
|
|
7948
|
-
const a = new
|
|
7967
|
+
const a = new xt();
|
|
7949
7968
|
return this._returnResult({ data: { user: null, session: null }, error: a });
|
|
7950
7969
|
}
|
|
7951
7970
|
return s.session && (await this._saveSession(s.session), await this._notifyAllSubscribers("SIGNED_IN", s.session)), this._returnResult({
|
|
@@ -8025,7 +8044,7 @@ class Zt {
|
|
|
8025
8044
|
});
|
|
8026
8045
|
if (!x || x.length === 0)
|
|
8027
8046
|
throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");
|
|
8028
|
-
const N =
|
|
8047
|
+
const N = Sn(x[0]);
|
|
8029
8048
|
let $ = (s = _?.signInWithEthereum) === null || s === void 0 ? void 0 : s.chainId;
|
|
8030
8049
|
if (!$) {
|
|
8031
8050
|
const L = await w.request({
|
|
@@ -8065,7 +8084,7 @@ class Zt {
|
|
|
8065
8084
|
if (v)
|
|
8066
8085
|
throw v;
|
|
8067
8086
|
if (!y || !y.session || !y.user) {
|
|
8068
|
-
const k = new
|
|
8087
|
+
const k = new xt();
|
|
8069
8088
|
return this._returnResult({ data: { user: null, session: null }, error: k });
|
|
8070
8089
|
}
|
|
8071
8090
|
return y.session && (await this._saveSession(y.session), await this._notifyAllSubscribers("SIGNED_IN", y.session)), this._returnResult({ data: Object.assign({}, y), error: v });
|
|
@@ -8147,13 +8166,13 @@ class Zt {
|
|
|
8147
8166
|
try {
|
|
8148
8167
|
const { data: v, error: k } = await C(this.fetch, "POST", `${this.url}/token?grant_type=web3`, {
|
|
8149
8168
|
headers: this.headers,
|
|
8150
|
-
body: Object.assign({ chain: "solana", message: g, signature:
|
|
8169
|
+
body: Object.assign({ chain: "solana", message: g, signature: gt(y) }, !((m = e.options) === null || m === void 0) && m.captchaToken ? { gotrue_meta_security: { captcha_token: (p = e.options) === null || p === void 0 ? void 0 : p.captchaToken } } : null),
|
|
8151
8170
|
xform: De
|
|
8152
8171
|
});
|
|
8153
8172
|
if (k)
|
|
8154
8173
|
throw k;
|
|
8155
8174
|
if (!v || !v.session || !v.user) {
|
|
8156
|
-
const _ = new
|
|
8175
|
+
const _ = new xt();
|
|
8157
8176
|
return this._returnResult({ data: { user: null, session: null }, error: _ });
|
|
8158
8177
|
}
|
|
8159
8178
|
return v.session && (await this._saveSession(v.session), await this._notifyAllSubscribers("SIGNED_IN", v.session)), this._returnResult({ data: Object.assign({}, v), error: k });
|
|
@@ -8164,10 +8183,10 @@ class Zt {
|
|
|
8164
8183
|
}
|
|
8165
8184
|
}
|
|
8166
8185
|
async _exchangeCodeForSession(e) {
|
|
8167
|
-
const r = await
|
|
8186
|
+
const r = await ct(this.storage, `${this.storageKey}-code-verifier`), [s, n] = (r ?? "").split("/");
|
|
8168
8187
|
try {
|
|
8169
8188
|
if (!s && this.flowType === "pkce")
|
|
8170
|
-
throw new
|
|
8189
|
+
throw new bi();
|
|
8171
8190
|
const { data: a, error: i } = await C(this.fetch, "POST", `${this.url}/token?grant_type=pkce`, {
|
|
8172
8191
|
headers: this.headers,
|
|
8173
8192
|
body: {
|
|
@@ -8179,7 +8198,7 @@ class Zt {
|
|
|
8179
8198
|
if (await he(this.storage, `${this.storageKey}-code-verifier`), i)
|
|
8180
8199
|
throw i;
|
|
8181
8200
|
if (!a || !a.session || !a.user) {
|
|
8182
|
-
const o = new
|
|
8201
|
+
const o = new xt();
|
|
8183
8202
|
return this._returnResult({
|
|
8184
8203
|
data: { user: null, session: null, redirectType: null },
|
|
8185
8204
|
error: o
|
|
@@ -8215,7 +8234,7 @@ class Zt {
|
|
|
8215
8234
|
if (u)
|
|
8216
8235
|
return this._returnResult({ data: { user: null, session: null }, error: u });
|
|
8217
8236
|
if (!c || !c.session || !c.user) {
|
|
8218
|
-
const d = new
|
|
8237
|
+
const d = new xt();
|
|
8219
8238
|
return this._returnResult({ data: { user: null, session: null }, error: d });
|
|
8220
8239
|
}
|
|
8221
8240
|
return c.session && (await this._saveSession(c.session), await this._notifyAllSubscribers("SIGNED_IN", c.session)), this._returnResult({ data: c, error: u });
|
|
@@ -8248,7 +8267,7 @@ class Zt {
|
|
|
8248
8267
|
if ("email" in e) {
|
|
8249
8268
|
const { email: o, options: c } = e;
|
|
8250
8269
|
let u = null, d = null;
|
|
8251
|
-
this.flowType === "pkce" && ([u, d] = await
|
|
8270
|
+
this.flowType === "pkce" && ([u, d] = await jt(this.storage, this.storageKey));
|
|
8252
8271
|
const { error: f } = await C(this.fetch, "POST", `${this.url}/otp`, {
|
|
8253
8272
|
headers: this.headers,
|
|
8254
8273
|
body: {
|
|
@@ -8330,11 +8349,11 @@ class Zt {
|
|
|
8330
8349
|
var r, s, n, a, i;
|
|
8331
8350
|
try {
|
|
8332
8351
|
let o = null, c = null;
|
|
8333
|
-
this.flowType === "pkce" && ([o, c] = await
|
|
8352
|
+
this.flowType === "pkce" && ([o, c] = await jt(this.storage, this.storageKey));
|
|
8334
8353
|
const u = await C(this.fetch, "POST", `${this.url}/sso`, {
|
|
8335
8354
|
body: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, "providerId" in e ? { provider_id: e.providerId } : null), "domain" in e ? { domain: e.domain } : null), { redirect_to: (s = (r = e.options) === null || r === void 0 ? void 0 : r.redirectTo) !== null && s !== void 0 ? s : void 0 }), !((n = e?.options) === null || n === void 0) && n.captchaToken ? { gotrue_meta_security: { captcha_token: e.options.captchaToken } } : null), { skip_http_redirect: !0, code_challenge: o, code_challenge_method: c }),
|
|
8336
8355
|
headers: this.headers,
|
|
8337
|
-
xform:
|
|
8356
|
+
xform: Wi
|
|
8338
8357
|
});
|
|
8339
8358
|
return !((a = u.data) === null || a === void 0) && a.url && fe() && !(!((i = e.options) === null || i === void 0) && i.skipBrowserRedirect) && window.location.assign(u.data.url), this._returnResult(u);
|
|
8340
8359
|
} catch (o) {
|
|
@@ -8484,18 +8503,18 @@ class Zt {
|
|
|
8484
8503
|
this._debug("#__loadSession()", "begin"), this.lockAcquired || this._debug("#__loadSession()", "used outside of an acquired lock!", new Error().stack);
|
|
8485
8504
|
try {
|
|
8486
8505
|
let e = null;
|
|
8487
|
-
const r = await
|
|
8506
|
+
const r = await ct(this.storage, this.storageKey);
|
|
8488
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)
|
|
8489
8508
|
return { data: { session: null }, error: null };
|
|
8490
8509
|
const s = e.expires_at ? e.expires_at * 1e3 - Date.now() < Or : !1;
|
|
8491
8510
|
if (this._debug("#__loadSession()", `session has${s ? "" : " not"} expired`, "expires_at", e.expires_at), !s) {
|
|
8492
8511
|
if (this.userStorage) {
|
|
8493
|
-
const i = await
|
|
8512
|
+
const i = await ct(this.userStorage, this.storageKey + "-user");
|
|
8494
8513
|
i?.user ? e.user = i.user : e.user = Ir();
|
|
8495
8514
|
}
|
|
8496
8515
|
if (this.storage.isServer && e.user && !e.user.__isUserNotAvailableProxy) {
|
|
8497
8516
|
const i = { value: this.suppressGetSessionWarning };
|
|
8498
|
-
e.user =
|
|
8517
|
+
e.user = Bi(e.user, i), i.value && (this.suppressGetSessionWarning = !0);
|
|
8499
8518
|
}
|
|
8500
8519
|
return { data: { session: e }, error: null };
|
|
8501
8520
|
}
|
|
@@ -8524,7 +8543,7 @@ class Zt {
|
|
|
8524
8543
|
return e ? await C(this.fetch, "GET", `${this.url}/user`, {
|
|
8525
8544
|
headers: this.headers,
|
|
8526
8545
|
jwt: e,
|
|
8527
|
-
xform:
|
|
8546
|
+
xform: rt
|
|
8528
8547
|
}) : await this._useSession(async (r) => {
|
|
8529
8548
|
var s, n, a;
|
|
8530
8549
|
const { data: i, error: o } = r;
|
|
@@ -8533,7 +8552,7 @@ class Zt {
|
|
|
8533
8552
|
return !(!((s = i.session) === null || s === void 0) && s.access_token) && !this.hasCustomAuthorizationHeader ? { data: { user: null }, error: new Te() } : await C(this.fetch, "GET", `${this.url}/user`, {
|
|
8534
8553
|
headers: this.headers,
|
|
8535
8554
|
jwt: (a = (n = i.session) === null || n === void 0 ? void 0 : n.access_token) !== null && a !== void 0 ? a : void 0,
|
|
8536
|
-
xform:
|
|
8555
|
+
xform: rt
|
|
8537
8556
|
});
|
|
8538
8557
|
});
|
|
8539
8558
|
} catch (r) {
|
|
@@ -8558,13 +8577,13 @@ class Zt {
|
|
|
8558
8577
|
throw new Te();
|
|
8559
8578
|
const i = n.session;
|
|
8560
8579
|
let o = null, c = null;
|
|
8561
|
-
this.flowType === "pkce" && e.email != null && ([o, c] = await
|
|
8580
|
+
this.flowType === "pkce" && e.email != null && ([o, c] = await jt(this.storage, this.storageKey));
|
|
8562
8581
|
const { data: u, error: d } = await C(this.fetch, "PUT", `${this.url}/user`, {
|
|
8563
8582
|
headers: this.headers,
|
|
8564
8583
|
redirectTo: r?.emailRedirectTo,
|
|
8565
8584
|
body: Object.assign(Object.assign({}, e), { code_challenge: o, code_challenge_method: c }),
|
|
8566
8585
|
jwt: i.access_token,
|
|
8567
|
-
xform:
|
|
8586
|
+
xform: rt
|
|
8568
8587
|
});
|
|
8569
8588
|
if (d)
|
|
8570
8589
|
throw d;
|
|
@@ -8724,7 +8743,7 @@ class Zt {
|
|
|
8724
8743
|
* Checks if the current URL and backing storage contain parameters given by a PKCE flow
|
|
8725
8744
|
*/
|
|
8726
8745
|
async _isPKCECallback(e) {
|
|
8727
|
-
const r = await
|
|
8746
|
+
const r = await ct(this.storage, `${this.storageKey}-code-verifier`);
|
|
8728
8747
|
return !!(e.code && r);
|
|
8729
8748
|
}
|
|
8730
8749
|
/**
|
|
@@ -8747,14 +8766,14 @@ class Zt {
|
|
|
8747
8766
|
const i = (s = n.session) === null || s === void 0 ? void 0 : s.access_token;
|
|
8748
8767
|
if (i) {
|
|
8749
8768
|
const { error: o } = await this.admin.signOut(i, e);
|
|
8750
|
-
if (o && !(
|
|
8769
|
+
if (o && !(yi(o) && (o.status === 404 || o.status === 401 || o.status === 403) || Cr(o)))
|
|
8751
8770
|
return this._returnResult({ error: o });
|
|
8752
8771
|
}
|
|
8753
8772
|
return e !== "others" && (await this._removeSession(), await he(this.storage, `${this.storageKey}-code-verifier`)), this._returnResult({ error: null });
|
|
8754
8773
|
});
|
|
8755
8774
|
}
|
|
8756
8775
|
onAuthStateChange(e) {
|
|
8757
|
-
const r =
|
|
8776
|
+
const r = Ti(), s = {
|
|
8758
8777
|
id: r,
|
|
8759
8778
|
callback: e,
|
|
8760
8779
|
unsubscribe: () => {
|
|
@@ -8787,7 +8806,7 @@ class Zt {
|
|
|
8787
8806
|
*/
|
|
8788
8807
|
async resetPasswordForEmail(e, r = {}) {
|
|
8789
8808
|
let s = null, n = null;
|
|
8790
|
-
this.flowType === "pkce" && ([s, n] = await
|
|
8809
|
+
this.flowType === "pkce" && ([s, n] = await jt(
|
|
8791
8810
|
this.storage,
|
|
8792
8811
|
this.storageKey,
|
|
8793
8812
|
!0
|
|
@@ -8882,7 +8901,7 @@ class Zt {
|
|
|
8882
8901
|
}), { data: m, error: p } = f;
|
|
8883
8902
|
return p ? this._returnResult({ data: { user: null, session: null }, error: p }) : !m || !m.session || !m.user ? this._returnResult({
|
|
8884
8903
|
data: { user: null, session: null },
|
|
8885
|
-
error: new
|
|
8904
|
+
error: new xt()
|
|
8886
8905
|
}) : (m.session && (await this._saveSession(m.session), await this._notifyAllSubscribers("USER_UPDATED", m.session)), this._returnResult({ data: m, error: p }));
|
|
8887
8906
|
} catch (n) {
|
|
8888
8907
|
if (await he(this.storage, `${this.storageKey}-code-verifier`), A(n))
|
|
@@ -8921,7 +8940,7 @@ class Zt {
|
|
|
8921
8940
|
this._debug(r, "begin");
|
|
8922
8941
|
try {
|
|
8923
8942
|
const s = Date.now();
|
|
8924
|
-
return await
|
|
8943
|
+
return await Ri(async (n) => (n > 0 && await Ei(200 * Math.pow(2, n - 1)), this._debug(r, "refreshing attempt", n), await C(this.fetch, "POST", `${this.url}/token?grant_type=refresh_token`, {
|
|
8925
8944
|
body: { refresh_token: e },
|
|
8926
8945
|
headers: this.headers,
|
|
8927
8946
|
xform: De
|
|
@@ -8958,12 +8977,12 @@ class Zt {
|
|
|
8958
8977
|
const s = "#_recoverAndRefresh()";
|
|
8959
8978
|
this._debug(s, "begin");
|
|
8960
8979
|
try {
|
|
8961
|
-
const n = await
|
|
8980
|
+
const n = await ct(this.storage, this.storageKey);
|
|
8962
8981
|
if (n && this.userStorage) {
|
|
8963
|
-
let i = await
|
|
8982
|
+
let i = await ct(this.userStorage, this.storageKey + "-user");
|
|
8964
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 : Ir();
|
|
8965
8984
|
} else if (n && !n.user && !n.user) {
|
|
8966
|
-
const i = await
|
|
8985
|
+
const i = await ct(this.storage, this.storageKey + "-user");
|
|
8967
8986
|
i && i?.user ? (n.user = i.user, await he(this.storage, this.storageKey + "-user"), await Ot(this.storage, this.storageKey, n)) : n.user = Ir();
|
|
8968
8987
|
}
|
|
8969
8988
|
if (this._debug(s, "session from storage", n), !this._isValidSession(n)) {
|
|
@@ -9167,7 +9186,7 @@ class Zt {
|
|
|
9167
9186
|
}
|
|
9168
9187
|
});
|
|
9169
9188
|
} catch (e) {
|
|
9170
|
-
if (e.isAcquireTimeout || e instanceof
|
|
9189
|
+
if (e.isAcquireTimeout || e instanceof kn)
|
|
9171
9190
|
this._debug("auto refresh token tick lock not available");
|
|
9172
9191
|
else
|
|
9173
9192
|
throw e;
|
|
@@ -9215,7 +9234,7 @@ class Zt {
|
|
|
9215
9234
|
async _getUrlForProvider(e, r, s) {
|
|
9216
9235
|
const n = [`provider=${encodeURIComponent(r)}`];
|
|
9217
9236
|
if (s?.redirectTo && n.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`), s?.scopes && n.push(`scopes=${encodeURIComponent(s.scopes)}`), this.flowType === "pkce") {
|
|
9218
|
-
const [a, i] = await
|
|
9237
|
+
const [a, i] = await jt(this.storage, this.storageKey), o = new URLSearchParams({
|
|
9219
9238
|
code_challenge: `${encodeURIComponent(a)}`,
|
|
9220
9239
|
code_challenge_method: `${encodeURIComponent(i)}`
|
|
9221
9240
|
});
|
|
@@ -9519,7 +9538,7 @@ class Zt {
|
|
|
9519
9538
|
if (s)
|
|
9520
9539
|
return s;
|
|
9521
9540
|
const n = Date.now();
|
|
9522
|
-
if (s = this.jwks.keys.find((o) => o.kid === e), s && this.jwks_cached_at +
|
|
9541
|
+
if (s = this.jwks.keys.find((o) => o.kid === e), s && this.jwks_cached_at + pi > n)
|
|
9523
9542
|
return s;
|
|
9524
9543
|
const { data: a, error: i } = await C(this.fetch, "GET", `${this.url}/.well-known/jwks.json`, {
|
|
9525
9544
|
headers: this.headers
|
|
@@ -9554,7 +9573,7 @@ class Zt {
|
|
|
9554
9573
|
s = p.session.access_token;
|
|
9555
9574
|
}
|
|
9556
9575
|
const { header: n, payload: a, signature: i, raw: { header: o, payload: c } } = hr(s);
|
|
9557
|
-
r?.allowExpired ||
|
|
9576
|
+
r?.allowExpired || Li(a.exp);
|
|
9558
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);
|
|
9559
9578
|
if (!u) {
|
|
9560
9579
|
const { error: p } = await this.getUser(s);
|
|
@@ -9569,10 +9588,10 @@ class Zt {
|
|
|
9569
9588
|
error: null
|
|
9570
9589
|
};
|
|
9571
9590
|
}
|
|
9572
|
-
const d =
|
|
9591
|
+
const d = Ui(n.alg), f = await crypto.subtle.importKey("jwk", u, d, !0, [
|
|
9573
9592
|
"verify"
|
|
9574
9593
|
]);
|
|
9575
|
-
if (!await crypto.subtle.verify(d, f, i,
|
|
9594
|
+
if (!await crypto.subtle.verify(d, f, i, xi(`${o}.${c}`)))
|
|
9576
9595
|
throw new Gr("Invalid JWT signature");
|
|
9577
9596
|
return {
|
|
9578
9597
|
data: {
|
|
@@ -9590,7 +9609,7 @@ class Zt {
|
|
|
9590
9609
|
}
|
|
9591
9610
|
}
|
|
9592
9611
|
Zt.nextInstanceID = {};
|
|
9593
|
-
const yo = Zt, vo = "2.
|
|
9612
|
+
const yo = Zt, vo = "2.98.0";
|
|
9594
9613
|
let Wt = "";
|
|
9595
9614
|
typeof Deno < "u" ? Wt = "deno" : typeof document < "u" ? Wt = "web" : typeof navigator < "u" && navigator.product === "ReactNative" ? Wt = "react-native" : Wt = "node";
|
|
9596
9615
|
const bo = { "X-Client-Info": `supabase-js-${Wt}/${vo}` }, wo = { headers: bo }, _o = { schema: "public" }, ko = {
|
|
@@ -9629,7 +9648,7 @@ function To(t, e, r) {
|
|
|
9629
9648
|
writable: !0
|
|
9630
9649
|
}) : t[e] = r, t;
|
|
9631
9650
|
}
|
|
9632
|
-
function
|
|
9651
|
+
function Os(t, e) {
|
|
9633
9652
|
var r = Object.keys(t);
|
|
9634
9653
|
if (Object.getOwnPropertySymbols) {
|
|
9635
9654
|
var s = Object.getOwnPropertySymbols(t);
|
|
@@ -9642,9 +9661,9 @@ function Cs(t, e) {
|
|
|
9642
9661
|
function ee(t) {
|
|
9643
9662
|
for (var e = 1; e < arguments.length; e++) {
|
|
9644
9663
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
9645
|
-
e % 2 ?
|
|
9664
|
+
e % 2 ? Os(Object(r), !0).forEach(function(s) {
|
|
9646
9665
|
To(t, s, r[s]);
|
|
9647
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
9666
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Os(Object(r)).forEach(function(s) {
|
|
9648
9667
|
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(r, s));
|
|
9649
9668
|
});
|
|
9650
9669
|
}
|
|
@@ -9732,19 +9751,19 @@ var No = class extends yo {
|
|
|
9732
9751
|
this.fetch = Eo(e, this._getAccessToken.bind(this), c.global.fetch), this.realtime = this._initRealtimeClient(ee({
|
|
9733
9752
|
headers: this.headers,
|
|
9734
9753
|
accessToken: this._getAccessToken.bind(this)
|
|
9735
|
-
}, c.realtime)), this.accessToken && Promise.resolve(this.accessToken()).then((d) => this.realtime.setAuth(d)).catch((d) => console.warn("Failed to set initial Realtime auth token:", d)), this.rest = new
|
|
9754
|
+
}, c.realtime)), this.accessToken && Promise.resolve(this.accessToken()).then((d) => this.realtime.setAuth(d)).catch((d) => console.warn("Failed to set initial Realtime auth token:", d)), this.rest = new ya(new URL("rest/v1", a).href, {
|
|
9736
9755
|
headers: this.headers,
|
|
9737
9756
|
schema: c.db.schema,
|
|
9738
9757
|
fetch: this.fetch,
|
|
9739
9758
|
timeout: c.db.timeout,
|
|
9740
9759
|
urlLengthLimit: c.db.urlLengthLimit
|
|
9741
|
-
}), this.storage = new
|
|
9760
|
+
}), this.storage = new ui(this.storageUrl.href, this.headers, this.fetch, r?.storage), c.accessToken || this._listenForAuthEvents();
|
|
9742
9761
|
}
|
|
9743
9762
|
/**
|
|
9744
9763
|
* Supabase Functions allows you to deploy and invoke edge functions.
|
|
9745
9764
|
*/
|
|
9746
9765
|
get functions() {
|
|
9747
|
-
return new
|
|
9766
|
+
return new ca(this.functionsUrl.href, {
|
|
9748
9767
|
headers: this.headers,
|
|
9749
9768
|
customFetch: this.fetch
|
|
9750
9769
|
});
|
|
@@ -9857,7 +9876,7 @@ var No = class extends yo {
|
|
|
9857
9876
|
});
|
|
9858
9877
|
}
|
|
9859
9878
|
_initRealtimeClient(t) {
|
|
9860
|
-
return new
|
|
9879
|
+
return new Ia(this.realtimeUrl.href, ee(ee({}, t), {}, { params: ee(ee({}, { apikey: this.supabaseKey }), t?.params) }));
|
|
9861
9880
|
}
|
|
9862
9881
|
_listenForAuthEvents() {
|
|
9863
9882
|
return this.auth.onAuthStateChange((t, e) => {
|
|
@@ -9884,7 +9903,7 @@ function Lo(t, e) {
|
|
|
9884
9903
|
throw new Error("Supabase URL and anon key are required");
|
|
9885
9904
|
return Do(t, e);
|
|
9886
9905
|
}
|
|
9887
|
-
function
|
|
9906
|
+
function Cs(t) {
|
|
9888
9907
|
const e = [];
|
|
9889
9908
|
let r = "", s = !1;
|
|
9890
9909
|
for (let n = 0; n < t.length; n++) {
|
|
@@ -9907,9 +9926,9 @@ function Uo(t) {
|
|
|
9907
9926
|
`).trim().split(`
|
|
9908
9927
|
`);
|
|
9909
9928
|
if (r.length < 2) return [];
|
|
9910
|
-
const s =
|
|
9929
|
+
const s = Cs(r[0]), n = [];
|
|
9911
9930
|
for (let a = 1; a < r.length; a++) {
|
|
9912
|
-
const i =
|
|
9931
|
+
const i = Cs(r[a]);
|
|
9913
9932
|
if (i.length < s.length) continue;
|
|
9914
9933
|
const o = {};
|
|
9915
9934
|
s.forEach((d, f) => {
|
|
@@ -9939,7 +9958,7 @@ function Uo(t) {
|
|
|
9939
9958
|
}
|
|
9940
9959
|
return n;
|
|
9941
9960
|
}
|
|
9942
|
-
const
|
|
9961
|
+
const Ns = {
|
|
9943
9962
|
mangal: ["mangal", "manglik", "kuja", "मंगल", "मांगलिक", "30 day", "30-day", "30 din"],
|
|
9944
9963
|
"kaal-sarp": ["kaal sarp", "kaal-sarp", "kaalsarp", "काल सर्प", "कालसर्प", "sarp"],
|
|
9945
9964
|
kaalSarp: ["kaal sarp", "kaal-sarp", "kaalsarp", "काल सर्प", "कालसर्प", "sarp"],
|
|
@@ -9953,8 +9972,8 @@ function Mo(t) {
|
|
|
9953
9972
|
const r = parseInt(e[0], 10), s = parseInt(e[1], 10) - 1, n = parseInt(e[2], 10);
|
|
9954
9973
|
return new Date(n, s, r);
|
|
9955
9974
|
}
|
|
9956
|
-
function
|
|
9957
|
-
const r =
|
|
9975
|
+
function Is(t, e) {
|
|
9976
|
+
const r = Ns[e] || Ns[e.toLowerCase()];
|
|
9958
9977
|
if (!r || r.length === 0) return null;
|
|
9959
9978
|
const s = t.filter((i) => {
|
|
9960
9979
|
const o = (i.pooja_title || "").toLowerCase(), c = (i.pooja_title_english || "").toLowerCase();
|
|
@@ -9969,11 +9988,11 @@ function Ds(t, e) {
|
|
|
9969
9988
|
return o ? o.getTime() >= n.getTime() : !0;
|
|
9970
9989
|
})[0] ?? s[0]) || null;
|
|
9971
9990
|
}
|
|
9972
|
-
let At = [],
|
|
9991
|
+
let At = [], Ds = 0;
|
|
9973
9992
|
const Bo = 3600 * 1e3;
|
|
9974
9993
|
async function Fo(t) {
|
|
9975
9994
|
const e = Date.now();
|
|
9976
|
-
if (At.length > 0 && e -
|
|
9995
|
+
if (At.length > 0 && e - Ds < Bo) return At;
|
|
9977
9996
|
try {
|
|
9978
9997
|
const { data: r, error: s } = await t.functions.invoke("fetch-pujas");
|
|
9979
9998
|
if (s)
|
|
@@ -9981,12 +10000,12 @@ async function Fo(t) {
|
|
|
9981
10000
|
const n = typeof r == "string" ? r : "";
|
|
9982
10001
|
if (!n) return At;
|
|
9983
10002
|
const a = Uo(n);
|
|
9984
|
-
return At = a,
|
|
10003
|
+
return At = a, Ds = e, a;
|
|
9985
10004
|
} catch (r) {
|
|
9986
10005
|
return console.warn("[DoshaCalculator] fetchPujas error:", r), At;
|
|
9987
10006
|
}
|
|
9988
10007
|
}
|
|
9989
|
-
const
|
|
10008
|
+
const $s = {
|
|
9990
10009
|
"पितृ दोष निवारण महायज्ञ एवं काशी गंगा महाआरती": "Pitru Dosha Nivaran Mahayagya & Kashi Ganga Maha Aarti",
|
|
9991
10010
|
"पितृ दोष शांति महापूजा एवं काशी गंगा आरती": "Pitra Dosha Shanti Mahapuja & Kashi Ganga Aarti",
|
|
9992
10011
|
"पितृ दोष निवारण पूजा एवं काशी गंगा आरती": "Pitra Dosha Nivaran Puja & Kashi Ganga Aarti",
|
|
@@ -10060,7 +10079,7 @@ const Ls = {
|
|
|
10060
10079
|
काशी: "Kashi",
|
|
10061
10080
|
त्र्यंबकेश्वर: "Trimbakeshwar",
|
|
10062
10081
|
हथला: "Hathla"
|
|
10063
|
-
},
|
|
10082
|
+
}, Ls = {
|
|
10064
10083
|
"काशी विश्वनाथ मंदिर": "Kashi Vishwanath Temple",
|
|
10065
10084
|
"त्र्यंबकेश्वर मंदिर": "Trimbakeshwar Temple",
|
|
10066
10085
|
"त्र्यंबकेश्वर ज्योतिर्लिंग": "Trimbakeshwar Jyotirlinga",
|
|
@@ -10079,27 +10098,27 @@ function qo(t) {
|
|
|
10079
10098
|
const r = parseInt(e[0], 10), s = parseInt(e[1], 10) - 1, n = parseInt(e[2], 10);
|
|
10080
10099
|
return new Date(n, s, r);
|
|
10081
10100
|
}
|
|
10082
|
-
function
|
|
10101
|
+
function jn(t) {
|
|
10083
10102
|
let e = t;
|
|
10084
10103
|
return Object.entries(Ko).sort((s, n) => n[0].length - s[0].length).forEach(([s, n]) => {
|
|
10085
10104
|
const a = new RegExp(s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gi");
|
|
10086
10105
|
e = e.replace(a, n);
|
|
10087
10106
|
}), e.replace(/\s+/g, " ").trim();
|
|
10088
10107
|
}
|
|
10089
|
-
function
|
|
10108
|
+
function Tn(t, e) {
|
|
10090
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;
|
|
10091
10110
|
if (r) return s;
|
|
10092
10111
|
if (n?.trim()) return n;
|
|
10093
|
-
if (
|
|
10094
|
-
const a =
|
|
10112
|
+
if ($s[s]) return $s[s];
|
|
10113
|
+
const a = jn(s);
|
|
10095
10114
|
return a !== s ? a : s;
|
|
10096
10115
|
}
|
|
10097
10116
|
function Wo(t, e) {
|
|
10098
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;
|
|
10099
10118
|
if (r) return s;
|
|
10100
10119
|
if (n?.trim()) return n;
|
|
10101
|
-
if (
|
|
10102
|
-
const a =
|
|
10120
|
+
if (Ls[s]) return Ls[s];
|
|
10121
|
+
const a = jn(s);
|
|
10103
10122
|
return a !== s ? a : s;
|
|
10104
10123
|
}
|
|
10105
10124
|
function Ho(t, e = "en") {
|
|
@@ -10119,7 +10138,7 @@ function Go(t) {
|
|
|
10119
10138
|
return t;
|
|
10120
10139
|
}
|
|
10121
10140
|
}
|
|
10122
|
-
function
|
|
10141
|
+
function Pn(t, e) {
|
|
10123
10142
|
const s = e?.toLowerCase().startsWith("hi") ? t.puja_link_hindi || t.puja_link : t.puja_link || t.puja_link_hindi;
|
|
10124
10143
|
return Go(s || "");
|
|
10125
10144
|
}
|
|
@@ -10226,7 +10245,7 @@ function ml({
|
|
|
10226
10245
|
] });
|
|
10227
10246
|
}
|
|
10228
10247
|
const pl = 112;
|
|
10229
|
-
function
|
|
10248
|
+
function Xe({
|
|
10230
10249
|
section: t,
|
|
10231
10250
|
children: e,
|
|
10232
10251
|
onImpression: r
|
|
@@ -10803,7 +10822,7 @@ Brings steady progress and long-term protection.`,
|
|
|
10803
10822
|
whatFromAnalysisGeneric3Title: "उपाय की दिशा",
|
|
10804
10823
|
whatFromAnalysisGeneric3Desc: "कौन सा उपाय या पूजा आपके लिए सही रहेगा।"
|
|
10805
10824
|
}
|
|
10806
|
-
},
|
|
10825
|
+
}, An = Kn(null);
|
|
10807
10826
|
function ou({ locale: t, children: e }) {
|
|
10808
10827
|
const [r, s] = M(t);
|
|
10809
10828
|
ve(() => {
|
|
@@ -10813,10 +10832,10 @@ function ou({ locale: t, children: e }) {
|
|
|
10813
10832
|
() => (a) => gl[r]?.[a] ?? a,
|
|
10814
10833
|
[r]
|
|
10815
10834
|
);
|
|
10816
|
-
return /* @__PURE__ */ l.jsx(
|
|
10835
|
+
return /* @__PURE__ */ l.jsx(An.Provider, { value: { locale: r, setLocale: s, t: n }, children: e });
|
|
10817
10836
|
}
|
|
10818
10837
|
function yl() {
|
|
10819
|
-
return
|
|
10838
|
+
return qn(An);
|
|
10820
10839
|
}
|
|
10821
10840
|
const vl = "_wrap_pkduc_1", bl = "_input_pkduc_5", wl = "_iconBtn_pkduc_28", _l = "_iconImg_pkduc_42", mr = {
|
|
10822
10841
|
wrap: vl,
|
|
@@ -10896,7 +10915,7 @@ const xl = "_wrap_1af76_1", jl = "_input_1af76_5", Tl = "_iconBtn_1af76_21", Pl
|
|
|
10896
10915
|
timePopoverActions: Dl,
|
|
10897
10916
|
timePopoverBtn: $l,
|
|
10898
10917
|
timePopoverOk: Ll
|
|
10899
|
-
}, Ul = "https://srm-cdn.a4b.io/yoda/1770372014782.svg",
|
|
10918
|
+
}, Ul = "https://srm-cdn.a4b.io/yoda/1770372014782.svg", En = (t) => String(t).padStart(2, "0");
|
|
10900
10919
|
function Ml(t) {
|
|
10901
10920
|
const e = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(t);
|
|
10902
10921
|
if (!e) return t;
|
|
@@ -10912,7 +10931,7 @@ function Bl(t) {
|
|
|
10912
10931
|
function Fl(t) {
|
|
10913
10932
|
const e = Math.min(12, Math.max(1, t.hour12)), r = /^([0-5]\d)$/.test(t.minute) ? t.minute : "00";
|
|
10914
10933
|
let s = e % 12;
|
|
10915
|
-
return t.meridiem === "PM" && (s += 12), `${
|
|
10934
|
+
return t.meridiem === "PM" && (s += 12), `${En(s)}:${r}`;
|
|
10916
10935
|
}
|
|
10917
10936
|
function Kl({
|
|
10918
10937
|
id: t,
|
|
@@ -11003,7 +11022,7 @@ function Kl({
|
|
|
11003
11022
|
value: d.minute,
|
|
11004
11023
|
onChange: (g) => f((y) => ({ ...y, minute: g.target.value })),
|
|
11005
11024
|
"aria-label": "Minute",
|
|
11006
|
-
children: Array.from({ length: 60 }, (g, y) =>
|
|
11025
|
+
children: Array.from({ length: 60 }, (g, y) => En(y)).map((g) => /* @__PURE__ */ l.jsx("option", { value: g, children: g }, g))
|
|
11007
11026
|
}
|
|
11008
11027
|
),
|
|
11009
11028
|
/* @__PURE__ */ l.jsxs("div", { className: ce.meridiemToggle, "aria-label": "AM/PM", children: [
|
|
@@ -11324,7 +11343,7 @@ function Ql(t) {
|
|
|
11324
11343
|
const n = r.getMonth() - e.getMonth();
|
|
11325
11344
|
return (n < 0 || n === 0 && r.getDate() < e.getDate()) && s--, s;
|
|
11326
11345
|
}
|
|
11327
|
-
const
|
|
11346
|
+
const Us = Wn(
|
|
11328
11347
|
function({
|
|
11329
11348
|
t: e,
|
|
11330
11349
|
className: r = "",
|
|
@@ -11366,10 +11385,10 @@ const Ms = Hn(
|
|
|
11366
11385
|
P === "birthPlace" && I("dosha-place");
|
|
11367
11386
|
}, []), we = ue(!1), _e = ue(!1), He = ue(!1), Se = ue(!1), pe = ue(!1), Me = ue(null), {
|
|
11368
11387
|
predictions: Be,
|
|
11369
|
-
isSearching:
|
|
11388
|
+
isSearching: yt,
|
|
11370
11389
|
loadError: Ge,
|
|
11371
|
-
searchPlaces:
|
|
11372
|
-
getPlaceDetails:
|
|
11390
|
+
searchPlaces: vt,
|
|
11391
|
+
getPlaceDetails: bt,
|
|
11373
11392
|
clearPredictions: Fe
|
|
11374
11393
|
} = Vl({
|
|
11375
11394
|
apiKey: m,
|
|
@@ -11389,14 +11408,14 @@ const Ms = Hn(
|
|
|
11389
11408
|
return;
|
|
11390
11409
|
}
|
|
11391
11410
|
const P = window.setTimeout(async () => {
|
|
11392
|
-
await
|
|
11411
|
+
await vt(Z);
|
|
11393
11412
|
}, 300);
|
|
11394
11413
|
return () => window.clearTimeout(P);
|
|
11395
|
-
}, [Z, Fe, X,
|
|
11396
|
-
const
|
|
11414
|
+
}, [Z, Fe, X, vt]);
|
|
11415
|
+
const nt = y.trim() !== "" && (k === "male" || k === "female") && x !== "" && ($ !== "" || L) && Z.trim() !== "";
|
|
11397
11416
|
ve(() => {
|
|
11398
|
-
a?.(
|
|
11399
|
-
}, [
|
|
11417
|
+
a?.(nt);
|
|
11418
|
+
}, [nt, a]), ve(() => {
|
|
11400
11419
|
n?.({ name: y, gender: k, problems: w, dateOfBirth: x, birthTime: $, birthTimeUnknown: L, birthPlace: Z });
|
|
11401
11420
|
}, [y, k, w, x, $, L, Z, n]), ve(() => {
|
|
11402
11421
|
!w.includes("formProblemOther") && le && de("");
|
|
@@ -11444,7 +11463,7 @@ const Ms = Hn(
|
|
|
11444
11463
|
P(e("formPlaceRequired"), "birthPlace");
|
|
11445
11464
|
return;
|
|
11446
11465
|
}
|
|
11447
|
-
const Ee = Ql(x),
|
|
11466
|
+
const Ee = Ql(x), at = /* @__PURE__ */ new Set([
|
|
11448
11467
|
"formProblemMarriage",
|
|
11449
11468
|
"formProblemMoney",
|
|
11450
11469
|
"formProblemCareer",
|
|
@@ -11453,7 +11472,7 @@ const Ms = Hn(
|
|
|
11453
11472
|
"financial",
|
|
11454
11473
|
"career",
|
|
11455
11474
|
"business"
|
|
11456
|
-
]), qe = w.some((ae) =>
|
|
11475
|
+
]), qe = w.some((ae) => at.has(ae));
|
|
11457
11476
|
if (Ee < 18 && qe) {
|
|
11458
11477
|
P(e("formAgeMarriageRestriction"), void 0, !0);
|
|
11459
11478
|
return;
|
|
@@ -11504,12 +11523,12 @@ const Ms = Hn(
|
|
|
11504
11523
|
});
|
|
11505
11524
|
if (Lt.success) {
|
|
11506
11525
|
F(null);
|
|
11507
|
-
const [Re, Tr, Ut] = (H.date || "").split("-").map(Number), rr = H.time || "12:00", [
|
|
11526
|
+
const [Re, Tr, Ut] = (H.date || "").split("-").map(Number), rr = H.time || "12:00", [Qe, Mt] = rr.split(":").map((nr) => parseInt(nr, 10) || 0);
|
|
11508
11527
|
c?.(Lt, {
|
|
11509
11528
|
day: Ut || 1,
|
|
11510
11529
|
month: Tr || 1,
|
|
11511
11530
|
year: Re || 2e3,
|
|
11512
|
-
hour:
|
|
11531
|
+
hour: Qe,
|
|
11513
11532
|
minute: Mt,
|
|
11514
11533
|
lat: ae,
|
|
11515
11534
|
lon: ge,
|
|
@@ -11525,15 +11544,15 @@ const Ms = Hn(
|
|
|
11525
11544
|
d?.(!1);
|
|
11526
11545
|
}
|
|
11527
11546
|
}, [i, o, b, Z, y, k, x, $, L, w, e, u, d, f, c, Ke, me]);
|
|
11528
|
-
|
|
11529
|
-
const
|
|
11547
|
+
Hn(p, () => ({ submit: Ve }), [Ve]);
|
|
11548
|
+
const wt = zl.map((P) => ({
|
|
11530
11549
|
key: P,
|
|
11531
11550
|
label: e(P)
|
|
11532
11551
|
}));
|
|
11533
|
-
return /* @__PURE__ */ l.jsxs(
|
|
11534
|
-
/* @__PURE__ */ l.jsx(
|
|
11552
|
+
return /* @__PURE__ */ l.jsxs(Gn, { className: r, "aria-label": e("formTitle"), children: [
|
|
11553
|
+
/* @__PURE__ */ l.jsx(Vn, { text: e("formPrivacyBanner") }),
|
|
11535
11554
|
/* @__PURE__ */ l.jsx(
|
|
11536
|
-
|
|
11555
|
+
zn,
|
|
11537
11556
|
{
|
|
11538
11557
|
title: e("formTitle"),
|
|
11539
11558
|
subtitle: e("formSubtitle")
|
|
@@ -11541,7 +11560,7 @@ const Ms = Hn(
|
|
|
11541
11560
|
),
|
|
11542
11561
|
/* @__PURE__ */ l.jsx("div", { onFocusCapture: () => {
|
|
11543
11562
|
xe(), f?.trackNameSectionClicked?.();
|
|
11544
|
-
}, children: /* @__PURE__ */ l.jsxs(
|
|
11563
|
+
}, children: /* @__PURE__ */ l.jsxs(kt, { id: "dosha-name", label: e("formNameLabel"), children: [
|
|
11545
11564
|
/* @__PURE__ */ l.jsx(
|
|
11546
11565
|
ns,
|
|
11547
11566
|
{
|
|
@@ -11557,9 +11576,9 @@ const Ms = Hn(
|
|
|
11557
11576
|
),
|
|
11558
11577
|
E.name && /* @__PURE__ */ l.jsx("p", { style: { marginTop: "6px", fontSize: "12px", color: "#dc2626" }, children: E.name })
|
|
11559
11578
|
] }) }),
|
|
11560
|
-
/* @__PURE__ */ l.jsxs(
|
|
11579
|
+
/* @__PURE__ */ l.jsxs(kt, { id: "dosha-gender", label: e("formGenderLabel"), children: [
|
|
11561
11580
|
/* @__PURE__ */ l.jsx(
|
|
11562
|
-
|
|
11581
|
+
Jn,
|
|
11563
11582
|
{
|
|
11564
11583
|
id: "dosha-gender",
|
|
11565
11584
|
options: [
|
|
@@ -11574,12 +11593,12 @@ const Ms = Hn(
|
|
|
11574
11593
|
),
|
|
11575
11594
|
E.gender && /* @__PURE__ */ l.jsx("p", { style: { marginTop: "6px", fontSize: "12px", color: "#dc2626" }, children: E.gender })
|
|
11576
11595
|
] }),
|
|
11577
|
-
/* @__PURE__ */ l.jsxs(
|
|
11596
|
+
/* @__PURE__ */ l.jsxs(kt, { id: "dosha-problems", label: e("formProblemLabel"), children: [
|
|
11578
11597
|
/* @__PURE__ */ l.jsx(
|
|
11579
|
-
|
|
11598
|
+
Yn,
|
|
11580
11599
|
{
|
|
11581
11600
|
id: "dosha-problems",
|
|
11582
|
-
options:
|
|
11601
|
+
options: wt,
|
|
11583
11602
|
selected: w,
|
|
11584
11603
|
onChange: (P) => {
|
|
11585
11604
|
T(P), P.includes("formProblemOther") || de("");
|
|
@@ -11603,7 +11622,7 @@ const Ms = Hn(
|
|
|
11603
11622
|
] })
|
|
11604
11623
|
] }),
|
|
11605
11624
|
/* @__PURE__ */ l.jsxs(
|
|
11606
|
-
|
|
11625
|
+
kt,
|
|
11607
11626
|
{
|
|
11608
11627
|
id: "dosha-dob",
|
|
11609
11628
|
label: e("formDobLabel"),
|
|
@@ -11629,7 +11648,7 @@ const Ms = Hn(
|
|
|
11629
11648
|
}
|
|
11630
11649
|
),
|
|
11631
11650
|
/* @__PURE__ */ l.jsxs(
|
|
11632
|
-
|
|
11651
|
+
kt,
|
|
11633
11652
|
{
|
|
11634
11653
|
id: "dosha-time",
|
|
11635
11654
|
label: e("formTimeLabel"),
|
|
@@ -11656,7 +11675,7 @@ const Ms = Hn(
|
|
|
11656
11675
|
}
|
|
11657
11676
|
),
|
|
11658
11677
|
/* @__PURE__ */ l.jsx(
|
|
11659
|
-
|
|
11678
|
+
Qn,
|
|
11660
11679
|
{
|
|
11661
11680
|
id: "dosha-time-unknown",
|
|
11662
11681
|
checked: L,
|
|
@@ -11670,7 +11689,7 @@ const Ms = Hn(
|
|
|
11670
11689
|
/* @__PURE__ */ l.jsx("div", { onFocusCapture: () => {
|
|
11671
11690
|
xe(), f?.trackPlaceOfBirthClicked?.();
|
|
11672
11691
|
}, children: /* @__PURE__ */ l.jsx(
|
|
11673
|
-
|
|
11692
|
+
kt,
|
|
11674
11693
|
{
|
|
11675
11694
|
id: "dosha-place",
|
|
11676
11695
|
label: e("formPlaceLabel"),
|
|
@@ -11679,7 +11698,7 @@ const Ms = Hn(
|
|
|
11679
11698
|
infoAriaLabel: e("info"),
|
|
11680
11699
|
children: /* @__PURE__ */ l.jsxs("div", { ref: Me, style: { position: "relative" }, children: [
|
|
11681
11700
|
/* @__PURE__ */ l.jsx(
|
|
11682
|
-
|
|
11701
|
+
Xn,
|
|
11683
11702
|
{
|
|
11684
11703
|
id: "dosha-place",
|
|
11685
11704
|
value: Z,
|
|
@@ -11714,8 +11733,8 @@ const Ms = Hn(
|
|
|
11714
11733
|
{
|
|
11715
11734
|
type: "button",
|
|
11716
11735
|
onClick: async () => {
|
|
11717
|
-
if (oe(g(P.description)),
|
|
11718
|
-
const I = await
|
|
11736
|
+
if (oe(g(P.description)), bt) {
|
|
11737
|
+
const I = await bt(P.place_id);
|
|
11719
11738
|
I && (B({
|
|
11720
11739
|
lat: I.lat,
|
|
11721
11740
|
lon: I.lng
|
|
@@ -11756,7 +11775,7 @@ const Ms = Hn(
|
|
|
11756
11775
|
))
|
|
11757
11776
|
}
|
|
11758
11777
|
),
|
|
11759
|
-
X && m &&
|
|
11778
|
+
X && m && yt && /* @__PURE__ */ l.jsx(
|
|
11760
11779
|
"div",
|
|
11761
11780
|
{
|
|
11762
11781
|
style: {
|
|
@@ -11776,7 +11795,7 @@ const Ms = Hn(
|
|
|
11776
11795
|
children: "Loading…"
|
|
11777
11796
|
}
|
|
11778
11797
|
),
|
|
11779
|
-
X && m && !
|
|
11798
|
+
X && m && !yt && Ge && /* @__PURE__ */ l.jsx(
|
|
11780
11799
|
"div",
|
|
11781
11800
|
{
|
|
11782
11801
|
style: {
|
|
@@ -11799,7 +11818,7 @@ const Ms = Hn(
|
|
|
11799
11818
|
] })
|
|
11800
11819
|
}
|
|
11801
11820
|
) }),
|
|
11802
|
-
/* @__PURE__ */ l.jsxs(
|
|
11821
|
+
/* @__PURE__ */ l.jsxs(Zn, { children: [
|
|
11803
11822
|
"⚡ ",
|
|
11804
11823
|
e("formFooterNoteBefore"),
|
|
11805
11824
|
/* @__PURE__ */ l.jsx("strong", { children: e("formFooterNoteBold") }),
|
|
@@ -11849,7 +11868,7 @@ const Ms = Hn(
|
|
|
11849
11868
|
)
|
|
11850
11869
|
] });
|
|
11851
11870
|
}
|
|
11852
|
-
),
|
|
11871
|
+
), st = Ae.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx(
|
|
11853
11872
|
"div",
|
|
11854
11873
|
{
|
|
11855
11874
|
ref: r,
|
|
@@ -11857,10 +11876,10 @@ const Ms = Hn(
|
|
|
11857
11876
|
...e
|
|
11858
11877
|
}
|
|
11859
11878
|
));
|
|
11860
|
-
|
|
11861
|
-
const
|
|
11862
|
-
|
|
11863
|
-
const
|
|
11879
|
+
st.displayName = "Card";
|
|
11880
|
+
const ft = Ae.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx("div", { ref: r, className: `flex flex-col space-y-1.5 p-6 ${t}`, ...e }));
|
|
11881
|
+
ft.displayName = "CardHeader";
|
|
11882
|
+
const mt = Ae.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx(
|
|
11864
11883
|
"h3",
|
|
11865
11884
|
{
|
|
11866
11885
|
ref: r,
|
|
@@ -11868,11 +11887,11 @@ const ft = Ae.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.j
|
|
|
11868
11887
|
...e
|
|
11869
11888
|
}
|
|
11870
11889
|
));
|
|
11871
|
-
|
|
11890
|
+
mt.displayName = "CardTitle";
|
|
11872
11891
|
const yr = Ae.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx("p", { ref: r, className: `text-sm text-muted-foreground ${t}`, ...e }));
|
|
11873
11892
|
yr.displayName = "CardDescription";
|
|
11874
|
-
const
|
|
11875
|
-
|
|
11893
|
+
const pt = Ae.forwardRef(({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx("div", { ref: r, className: `p-6 pt-0 ${t}`, ...e }));
|
|
11894
|
+
pt.displayName = "CardContent";
|
|
11876
11895
|
const vr = Ae.forwardRef(
|
|
11877
11896
|
({ className: t = "", variant: e = "default", ...r }, s) => {
|
|
11878
11897
|
const n = {
|
|
@@ -11893,7 +11912,7 @@ const vr = Ae.forwardRef(
|
|
|
11893
11912
|
);
|
|
11894
11913
|
vr.displayName = "Badge";
|
|
11895
11914
|
const Ie = (t) => ({ width: t, height: t });
|
|
11896
|
-
function
|
|
11915
|
+
function Ms(t) {
|
|
11897
11916
|
const { size: e = 24, ...r } = t;
|
|
11898
11917
|
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", ...Ie(e), ...r, children: [
|
|
11899
11918
|
/* @__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" }),
|
|
@@ -11901,14 +11920,14 @@ function Bs(t) {
|
|
|
11901
11920
|
/* @__PURE__ */ l.jsx("path", { d: "M12 17h.01" })
|
|
11902
11921
|
] });
|
|
11903
11922
|
}
|
|
11904
|
-
function
|
|
11923
|
+
function Bs(t) {
|
|
11905
11924
|
const { size: e = 24, ...r } = t;
|
|
11906
11925
|
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", ...Ie(e), ...r, children: [
|
|
11907
11926
|
/* @__PURE__ */ l.jsx("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
11908
11927
|
/* @__PURE__ */ l.jsx("path", { d: "m9 11 3 3L22 4" })
|
|
11909
11928
|
] });
|
|
11910
11929
|
}
|
|
11911
|
-
function
|
|
11930
|
+
function Fs(t) {
|
|
11912
11931
|
const { size: e = 24, ...r } = t;
|
|
11913
11932
|
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", ...Ie(e), ...r, children: [
|
|
11914
11933
|
/* @__PURE__ */ l.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
@@ -11948,7 +11967,7 @@ function rc(t) {
|
|
|
11948
11967
|
/* @__PURE__ */ l.jsx("path", { d: "M12 19V5" })
|
|
11949
11968
|
] });
|
|
11950
11969
|
}
|
|
11951
|
-
function
|
|
11970
|
+
function Rn(t) {
|
|
11952
11971
|
const { size: e = 24, ...r } = t;
|
|
11953
11972
|
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", ...Ie(e), ...r, children: /* @__PURE__ */ l.jsx("path", { d: "m6 9 6 6 6-6" }) });
|
|
11954
11973
|
}
|
|
@@ -11972,7 +11991,7 @@ function ac(t) {
|
|
|
11972
11991
|
] });
|
|
11973
11992
|
}
|
|
11974
11993
|
const Qr = Ae.createContext(null);
|
|
11975
|
-
function
|
|
11994
|
+
function Ks({
|
|
11976
11995
|
type: t = "single",
|
|
11977
11996
|
collapsible: e = !0,
|
|
11978
11997
|
className: r = "",
|
|
@@ -11990,10 +12009,10 @@ function qs({
|
|
|
11990
12009
|
);
|
|
11991
12010
|
return /* @__PURE__ */ l.jsx(Qr.Provider, { value: { value: a, onToggle: o }, children: /* @__PURE__ */ l.jsx("div", { className: r, children: s }) });
|
|
11992
12011
|
}
|
|
11993
|
-
function
|
|
12012
|
+
function qs({ value: t, className: e = "", children: r }) {
|
|
11994
12013
|
return /* @__PURE__ */ l.jsx("div", { "data-state": t, className: `border-b border-border ${e}`, children: r });
|
|
11995
12014
|
}
|
|
11996
|
-
function
|
|
12015
|
+
function Ws({
|
|
11997
12016
|
className: t = "",
|
|
11998
12017
|
children: e,
|
|
11999
12018
|
value: r
|
|
@@ -12009,7 +12028,7 @@ function Hs({
|
|
|
12009
12028
|
children: [
|
|
12010
12029
|
e,
|
|
12011
12030
|
/* @__PURE__ */ l.jsx(
|
|
12012
|
-
|
|
12031
|
+
Rn,
|
|
12013
12032
|
{
|
|
12014
12033
|
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${n ? "rotate-180" : ""}`
|
|
12015
12034
|
}
|
|
@@ -12018,7 +12037,7 @@ function Hs({
|
|
|
12018
12037
|
}
|
|
12019
12038
|
);
|
|
12020
12039
|
}
|
|
12021
|
-
function
|
|
12040
|
+
function Hs({
|
|
12022
12041
|
className: t = "",
|
|
12023
12042
|
children: e,
|
|
12024
12043
|
value: r
|
|
@@ -12051,7 +12070,7 @@ const Vt = Ae.forwardRef(
|
|
|
12051
12070
|
}
|
|
12052
12071
|
);
|
|
12053
12072
|
Vt.displayName = "Button";
|
|
12054
|
-
const
|
|
12073
|
+
const On = Ae.forwardRef(
|
|
12055
12074
|
({ className: t = "", ...e }, r) => /* @__PURE__ */ l.jsx(
|
|
12056
12075
|
"div",
|
|
12057
12076
|
{
|
|
@@ -12061,20 +12080,20 @@ const Cn = Ae.forwardRef(
|
|
|
12061
12080
|
}
|
|
12062
12081
|
)
|
|
12063
12082
|
);
|
|
12064
|
-
|
|
12065
|
-
const Vr = /* @__PURE__ */ new Map(),
|
|
12083
|
+
On.displayName = "Skeleton";
|
|
12084
|
+
const Vr = /* @__PURE__ */ new Map(), Gs = 1800 * 1e3;
|
|
12066
12085
|
function ic(t, e, r) {
|
|
12067
12086
|
return `D1|${e}|svg|${t.day}-${t.month}-${t.year}-${t.hour}-${t.minute}-${t.lat}-${t.lon}-${t.tzone}|${r}`;
|
|
12068
12087
|
}
|
|
12069
12088
|
function oc(t) {
|
|
12070
12089
|
const e = Vr.get(t);
|
|
12071
|
-
if (e && Date.now() - e.timestamp <
|
|
12090
|
+
if (e && Date.now() - e.timestamp < Gs)
|
|
12072
12091
|
return e.svg;
|
|
12073
12092
|
try {
|
|
12074
12093
|
const r = sessionStorage.getItem(`kundali_${t}`);
|
|
12075
12094
|
if (r) {
|
|
12076
12095
|
const s = JSON.parse(r);
|
|
12077
|
-
if (Date.now() - s.timestamp <
|
|
12096
|
+
if (Date.now() - s.timestamp < Gs)
|
|
12078
12097
|
return Vr.set(t, s), s.svg;
|
|
12079
12098
|
sessionStorage.removeItem(`kundali_${t}`);
|
|
12080
12099
|
}
|
|
@@ -12147,9 +12166,9 @@ function dc({ birthDetails: t, supabase: e, language: r, t: s }) {
|
|
|
12147
12166
|
}, _ = () => {
|
|
12148
12167
|
v(n);
|
|
12149
12168
|
};
|
|
12150
|
-
return /* @__PURE__ */ l.jsxs(
|
|
12151
|
-
/* @__PURE__ */ l.jsxs(
|
|
12152
|
-
/* @__PURE__ */ l.jsx(
|
|
12169
|
+
return /* @__PURE__ */ l.jsxs(st, { ref: p, className: "spiritual-glow border border-primary/10", children: [
|
|
12170
|
+
/* @__PURE__ */ l.jsxs(ft, { className: "pb-3", children: [
|
|
12171
|
+
/* @__PURE__ */ l.jsx(mt, { className: "text-xl font-bold", children: s("drYourKundali") }),
|
|
12153
12172
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2 mt-3", children: [
|
|
12154
12173
|
/* @__PURE__ */ l.jsx(
|
|
12155
12174
|
Vt,
|
|
@@ -12175,8 +12194,8 @@ function dc({ birthDetails: t, supabase: e, language: r, t: s }) {
|
|
|
12175
12194
|
)
|
|
12176
12195
|
] })
|
|
12177
12196
|
] }),
|
|
12178
|
-
/* @__PURE__ */ l.jsx(
|
|
12179
|
-
i === "loading" && /* @__PURE__ */ l.jsx(
|
|
12197
|
+
/* @__PURE__ */ l.jsx(pt, { children: /* @__PURE__ */ l.jsxs("div", { className: "w-full max-w-[360px] mx-auto", children: [
|
|
12198
|
+
i === "loading" && /* @__PURE__ */ l.jsx(On, { className: "w-full aspect-square rounded-lg" }),
|
|
12180
12199
|
i === "success" && c && /* @__PURE__ */ l.jsx(
|
|
12181
12200
|
"div",
|
|
12182
12201
|
{
|
|
@@ -12208,7 +12227,7 @@ const hc = [
|
|
|
12208
12227
|
{ qKey: "faqQ1", aKey: "faqA1" },
|
|
12209
12228
|
{ qKey: "faqQ2", aKey: "faqA2" },
|
|
12210
12229
|
{ qKey: "faqQ3", aKey: "faqA3" }
|
|
12211
|
-
],
|
|
12230
|
+
], Vs = [
|
|
12212
12231
|
{
|
|
12213
12232
|
type: "kaal-sarp",
|
|
12214
12233
|
detailKey: "kaalSarp",
|
|
@@ -12276,7 +12295,7 @@ function fc(t, e) {
|
|
|
12276
12295
|
}
|
|
12277
12296
|
return Array.from(r);
|
|
12278
12297
|
}
|
|
12279
|
-
function
|
|
12298
|
+
function Ze(t) {
|
|
12280
12299
|
if (!t) return !1;
|
|
12281
12300
|
const e = t.toLowerCase();
|
|
12282
12301
|
return e === "present" || e === "active" || e === "partial" || e === "suggested";
|
|
@@ -12284,7 +12303,7 @@ function Xe(t) {
|
|
|
12284
12303
|
function $r(t) {
|
|
12285
12304
|
return t ? t.toLowerCase().includes("nullified") : !1;
|
|
12286
12305
|
}
|
|
12287
|
-
function
|
|
12306
|
+
function zs(t, e) {
|
|
12288
12307
|
if (Array.isArray(t)) {
|
|
12289
12308
|
const r = t.find(
|
|
12290
12309
|
(a) => (a.name ?? a.type) === e
|
|
@@ -12310,17 +12329,17 @@ function Js(t, e) {
|
|
|
12310
12329
|
};
|
|
12311
12330
|
}
|
|
12312
12331
|
}
|
|
12313
|
-
function
|
|
12332
|
+
function Js(t, e) {
|
|
12314
12333
|
if (!t) return "";
|
|
12315
12334
|
const r = t.toLowerCase();
|
|
12316
12335
|
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;
|
|
12317
12336
|
}
|
|
12318
|
-
function
|
|
12337
|
+
function Ys(t) {
|
|
12319
12338
|
if (!t) return 2;
|
|
12320
12339
|
const e = t.toLowerCase();
|
|
12321
12340
|
return e === "severe" || e === "high" ? 3 : e === "moderate" || e === "medium" ? 2 : e === "mild" || e === "low" ? 1 : 2;
|
|
12322
12341
|
}
|
|
12323
|
-
function
|
|
12342
|
+
function Qs(t, e) {
|
|
12324
12343
|
if (!t) return e("drSeverityMedium");
|
|
12325
12344
|
const r = t.toLowerCase();
|
|
12326
12345
|
return e(r === "severe" || r === "high" ? "drSeverityHigh" : r === "moderate" || r === "medium" ? "drSeverityMedium" : r === "mild" || r === "low" ? "drSeverityLow" : "drSeverityMedium");
|
|
@@ -12342,11 +12361,11 @@ function mc({
|
|
|
12342
12361
|
inlineEditForm: p,
|
|
12343
12362
|
analytics: g
|
|
12344
12363
|
}) {
|
|
12345
|
-
const y = !c && u && d, v = t.summary ?? {}, k = t.details ?? {}, _ = v.shaniSadeSati ?? v.sadeSati, w =
|
|
12346
|
-
for (const b of
|
|
12364
|
+
const y = !c && u && d, v = t.summary ?? {}, k = t.details ?? {}, _ = v.shaniSadeSati ?? v.sadeSati, w = Ze(v.mangal) && !$r(v.mangal) || Ze(v.kaalSarp) || Ze(v.pitra) || Ze(_), T = [];
|
|
12365
|
+
for (const b of Vs) {
|
|
12347
12366
|
const B = b.summaryKey === "shaniSadeSati" ? _ : v[b.summaryKey];
|
|
12348
|
-
if (!
|
|
12349
|
-
const X = v[b.severityKey], W = b.type === "shani" ? v.shaniPhase ?? v.shaniPhase : void 0, q =
|
|
12367
|
+
if (!Ze(B) || b.type === "mangal" && $r(B)) continue;
|
|
12368
|
+
const X = v[b.severityKey], W = b.type === "shani" ? v.shaniPhase ?? v.shaniPhase : void 0, q = zs(k, b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey), F = q?.explanation ?? e("drBasedOnPositions"), V = (q?.remedies ?? e(b.remediesKey)).split(`
|
|
12350
12369
|
`).map((_e) => _e.trim()).filter(Boolean), we = e(b.benefitsKey).split(`
|
|
12351
12370
|
`).map((_e) => _e.trim()).filter(Boolean);
|
|
12352
12371
|
T.push({
|
|
@@ -12364,7 +12383,7 @@ function mc({
|
|
|
12364
12383
|
benefits: we
|
|
12365
12384
|
});
|
|
12366
12385
|
}
|
|
12367
|
-
T.sort((b, B) =>
|
|
12386
|
+
T.sort((b, B) => Ys(B.severity) - Ys(b.severity));
|
|
12368
12387
|
const x = [
|
|
12369
12388
|
{ summaryKey: "grahan", detailKey: "grahan", labelKey: "drOtherGrahan" },
|
|
12370
12389
|
{ summaryKey: "shrapit", detailKey: "shrapit", labelKey: "drOtherShrapit" },
|
|
@@ -12377,7 +12396,7 @@ function mc({
|
|
|
12377
12396
|
{ summaryKey: "ketuNaga", detailKey: "ketuNaga", labelKey: "drOtherKetuNaga" },
|
|
12378
12397
|
{ summaryKey: "navagrahaUmbrella", detailKey: "navagraha", labelKey: "drOtherNavagraha" }
|
|
12379
12398
|
], $ = x.filter(
|
|
12380
|
-
(b) =>
|
|
12399
|
+
(b) => Ze(v[b.summaryKey])
|
|
12381
12400
|
).length > 0, [Y, L] = M(!1), be = /\b(house|lagna|ascendant|moon|mars|saturn|rahu|ketu|sun|jupiter|venus|mercury|sign|degree|H\d+|conjunction|aspect)\b|भाव|लग्न|चंद्र|मंगल|शनि|राहु|केतु|सूर्य|बृहस्पति|शुक्र|बुध/i, Z = k && typeof k == "object" && !Array.isArray(k) ? k : {}, oe = [];
|
|
12382
12401
|
T.forEach((b) => {
|
|
12383
12402
|
const B = Z[b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey] || {}, X = [
|
|
@@ -12387,7 +12406,7 @@ function mc({
|
|
|
12387
12406
|
].map((E) => String(E || "").trim()).filter(Boolean), W = Array.from(new Set(X)), q = W.filter((E) => be.test(E)), F = q.length > 0 ? q : W;
|
|
12388
12407
|
F.length > 0 && oe.push({ label: b.label, evidence: F });
|
|
12389
12408
|
}), x.forEach((b) => {
|
|
12390
|
-
if (!
|
|
12409
|
+
if (!Ze(v[b.summaryKey])) return;
|
|
12391
12410
|
const B = Z[b.detailKey] || {}, X = [
|
|
12392
12411
|
...B.placements || [],
|
|
12393
12412
|
...B.triggeredBy || [],
|
|
@@ -12441,31 +12460,31 @@ function mc({
|
|
|
12441
12460
|
}
|
|
12442
12461
|
) : null
|
|
12443
12462
|
] }),
|
|
12444
|
-
/* @__PURE__ */ l.jsxs(
|
|
12445
|
-
/* @__PURE__ */ l.jsx(
|
|
12446
|
-
|
|
12463
|
+
/* @__PURE__ */ l.jsxs(st, { className: "spiritual-glow border-2 border-primary/20 mx-4", children: [
|
|
12464
|
+
/* @__PURE__ */ l.jsx(ft, { children: /* @__PURE__ */ l.jsx(
|
|
12465
|
+
mt,
|
|
12447
12466
|
{
|
|
12448
12467
|
id: "dosha-results-heading",
|
|
12449
12468
|
className: `text-2xl sm:text-3xl font-bold break-words ${w ? "text-primary" : "text-success"}`,
|
|
12450
12469
|
children: w ? e("resultSomeDoshas") : `✓ ${e("resultNoDoshas")}`
|
|
12451
12470
|
}
|
|
12452
12471
|
) }),
|
|
12453
|
-
/* @__PURE__ */ l.jsx(
|
|
12472
|
+
/* @__PURE__ */ l.jsx(pt, { children: w ? /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: T.map((b) => /* @__PURE__ */ l.jsxs(
|
|
12454
12473
|
"div",
|
|
12455
12474
|
{
|
|
12456
12475
|
className: "inline-flex items-center gap-2 bg-accent/20 border border-accent/30 px-4 py-2 rounded-full",
|
|
12457
12476
|
children: [
|
|
12458
|
-
/* @__PURE__ */ l.jsx(
|
|
12477
|
+
/* @__PURE__ */ l.jsx(Ms, { className: "w-4 h-4 text-primary" }),
|
|
12459
12478
|
/* @__PURE__ */ l.jsxs("span", { className: "font-medium text-sm text-foreground", children: [
|
|
12460
12479
|
b.label,
|
|
12461
12480
|
": ",
|
|
12462
|
-
|
|
12481
|
+
Js(b.status, e)
|
|
12463
12482
|
] })
|
|
12464
12483
|
]
|
|
12465
12484
|
},
|
|
12466
12485
|
b.type
|
|
12467
12486
|
)) }) : /* @__PURE__ */ l.jsxs("div", { className: "text-center py-8", children: [
|
|
12468
|
-
/* @__PURE__ */ l.jsx(
|
|
12487
|
+
/* @__PURE__ */ l.jsx(Bs, { className: "w-12 h-12 mx-auto mb-4 text-success" }),
|
|
12469
12488
|
/* @__PURE__ */ l.jsx("p", { className: "text-lg font-medium text-foreground", children: e("resultNoDoshas") }),
|
|
12470
12489
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground mt-2", children: e("resultNoDoshasDesc") })
|
|
12471
12490
|
] }) })
|
|
@@ -12473,27 +12492,27 @@ function mc({
|
|
|
12473
12492
|
T.map((b, B) => {
|
|
12474
12493
|
const X = b.icon, W = b.type === "shani" && b.phase ? le(b.phase) : "", q = de[B % de.length], F = e("drDoshaOf").replace("{{index}}", String(B + 1)).replace("{{total}}", String(T.length));
|
|
12475
12494
|
return /* @__PURE__ */ l.jsxs(
|
|
12476
|
-
|
|
12495
|
+
st,
|
|
12477
12496
|
{
|
|
12478
12497
|
className: `spiritual-glow border border-primary/10 mx-4 ${q}`,
|
|
12479
12498
|
children: [
|
|
12480
12499
|
/* @__PURE__ */ l.jsx("div", { className: "px-4 pt-3", children: /* @__PURE__ */ l.jsx(vr, { variant: "outline", className: "text-xs font-normal text-muted-foreground", children: F }) }),
|
|
12481
|
-
/* @__PURE__ */ l.jsxs(
|
|
12482
|
-
/* @__PURE__ */ l.jsxs(
|
|
12500
|
+
/* @__PURE__ */ l.jsxs(ft, { className: "pb-3 pt-2", children: [
|
|
12501
|
+
/* @__PURE__ */ l.jsxs(mt, { className: "flex items-center gap-3 text-xl", children: [
|
|
12483
12502
|
/* @__PURE__ */ l.jsx(X, { className: "w-6 h-6 text-primary" }),
|
|
12484
12503
|
b.label
|
|
12485
12504
|
] }),
|
|
12486
12505
|
/* @__PURE__ */ l.jsxs(yr, { children: [
|
|
12487
12506
|
e("drSeverity"),
|
|
12488
12507
|
": ",
|
|
12489
|
-
|
|
12508
|
+
Qs(b.severity, e),
|
|
12490
12509
|
b.phase != null && ` • ${e("drPhase")}: ${b.phase}`
|
|
12491
12510
|
] })
|
|
12492
12511
|
] }),
|
|
12493
|
-
/* @__PURE__ */ l.jsxs(
|
|
12512
|
+
/* @__PURE__ */ l.jsxs(pt, { className: "space-y-4", children: [
|
|
12494
12513
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
12495
12514
|
/* @__PURE__ */ l.jsxs("h4", { className: "font-semibold text-base flex items-center gap-2", children: [
|
|
12496
|
-
/* @__PURE__ */ l.jsx(
|
|
12515
|
+
/* @__PURE__ */ l.jsx(Fs, { className: "w-4 h-4 text-primary" }),
|
|
12497
12516
|
e("drWhyMarked"),
|
|
12498
12517
|
n && /* @__PURE__ */ l.jsx(
|
|
12499
12518
|
"button",
|
|
@@ -12562,32 +12581,32 @@ function mc({
|
|
|
12562
12581
|
}
|
|
12563
12582
|
)
|
|
12564
12583
|
] }),
|
|
12565
|
-
/* @__PURE__ */ l.jsxs(
|
|
12566
|
-
/* @__PURE__ */ l.jsxs(
|
|
12567
|
-
/* @__PURE__ */ l.jsx(
|
|
12584
|
+
/* @__PURE__ */ l.jsxs(st, { className: "spiritual-glow mx-4", children: [
|
|
12585
|
+
/* @__PURE__ */ l.jsxs(ft, { children: [
|
|
12586
|
+
/* @__PURE__ */ l.jsx(mt, { className: "text-2xl font-bold text-center gradient-spiritual bg-clip-text text-transparent", children: e("drDetailedAnalysis") }),
|
|
12568
12587
|
/* @__PURE__ */ l.jsx(yr, { className: "text-center", children: e("drBasedOnChart") })
|
|
12569
12588
|
] }),
|
|
12570
|
-
/* @__PURE__ */ l.jsx(
|
|
12571
|
-
const B = b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey, X = b.summaryKey === "shaniSadeSati" ? _ : v[b.summaryKey], W =
|
|
12589
|
+
/* @__PURE__ */ l.jsx(pt, { className: "space-y-4", children: /* @__PURE__ */ l.jsx(Ks, { type: "single", collapsible: !0, className: "w-full space-y-4", children: Vs.map((b) => {
|
|
12590
|
+
const B = b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey, X = b.summaryKey === "shaniSadeSati" ? _ : v[b.summaryKey], W = zs(
|
|
12572
12591
|
k,
|
|
12573
12592
|
b.detailKey === "sadeSati" ? "sadeSati" : b.detailKey
|
|
12574
12593
|
), q = v[b.severityKey], F = b.type === "shani" ? v.shaniPhase : void 0, E = b.icon, me = (W?.remedies ?? e(b.remediesKey)).split(`
|
|
12575
12594
|
`).map((we) => we.trim()).filter(Boolean);
|
|
12576
|
-
return /* @__PURE__ */ l.jsxs(
|
|
12577
|
-
/* @__PURE__ */ l.jsx(
|
|
12595
|
+
return /* @__PURE__ */ l.jsxs(qs, { value: B, className: "border border-border rounded-lg px-4", children: [
|
|
12596
|
+
/* @__PURE__ */ l.jsx(Ws, { value: B, className: "hover:no-underline", children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
12578
12597
|
/* @__PURE__ */ l.jsx(E, { className: "w-5 h-5 text-destructive" }),
|
|
12579
12598
|
/* @__PURE__ */ l.jsxs("div", { className: "text-left", children: [
|
|
12580
12599
|
/* @__PURE__ */ l.jsx("h3", { className: "font-semibold text-lg", children: e(b.nameKey) }),
|
|
12581
12600
|
/* @__PURE__ */ l.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
12582
12601
|
e("drStatus"),
|
|
12583
12602
|
": ",
|
|
12584
|
-
|
|
12585
|
-
q && !$r(X) && ` • ${e("drSeverity")}: ${
|
|
12603
|
+
Js(X, e),
|
|
12604
|
+
q && !$r(X) && ` • ${e("drSeverity")}: ${Qs(q, e)}`,
|
|
12586
12605
|
b.type === "shani" && F != null && ` • ${e("drPhase")}: ${F}`
|
|
12587
12606
|
] })
|
|
12588
12607
|
] })
|
|
12589
12608
|
] }) }),
|
|
12590
|
-
/* @__PURE__ */ l.jsxs(
|
|
12609
|
+
/* @__PURE__ */ l.jsxs(Hs, { value: B, className: "pt-4 space-y-4", children: [
|
|
12591
12610
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground italic", children: e(b.descKey) }),
|
|
12592
12611
|
W?.explanation && /* @__PURE__ */ l.jsxs("div", { children: [
|
|
12593
12612
|
/* @__PURE__ */ l.jsx("h4", { className: "font-medium mb-2", children: e("drExplanation") }),
|
|
@@ -12605,19 +12624,19 @@ function mc({
|
|
|
12605
12624
|
] }, B);
|
|
12606
12625
|
}) }) })
|
|
12607
12626
|
] }),
|
|
12608
|
-
/* @__PURE__ */ l.jsxs(
|
|
12627
|
+
/* @__PURE__ */ l.jsxs(st, { className: "mx-4", children: [
|
|
12609
12628
|
/* @__PURE__ */ l.jsx(
|
|
12610
|
-
|
|
12629
|
+
ft,
|
|
12611
12630
|
{
|
|
12612
12631
|
className: "cursor-pointer hover:bg-accent/5 transition-colors",
|
|
12613
12632
|
onClick: () => L((b) => !b),
|
|
12614
12633
|
children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
12615
12634
|
/* @__PURE__ */ l.jsxs("div", { className: "text-left flex-1 min-w-0", children: [
|
|
12616
|
-
/* @__PURE__ */ l.jsx(
|
|
12635
|
+
/* @__PURE__ */ l.jsx(mt, { className: "text-xl font-semibold", children: e("drOtherDoshas") }),
|
|
12617
12636
|
/* @__PURE__ */ l.jsx(yr, { children: e($ ? "drOtherDoshasStatusActive" : "drOtherDoshasStatusNone") })
|
|
12618
12637
|
] }),
|
|
12619
12638
|
/* @__PURE__ */ l.jsx(
|
|
12620
|
-
|
|
12639
|
+
Rn,
|
|
12621
12640
|
{
|
|
12622
12641
|
className: `h-5 w-5 flex-shrink-0 text-muted-foreground transition-transform duration-200 ${Y ? "rotate-180" : ""}`
|
|
12623
12642
|
}
|
|
@@ -12625,28 +12644,28 @@ function mc({
|
|
|
12625
12644
|
] })
|
|
12626
12645
|
}
|
|
12627
12646
|
),
|
|
12628
|
-
Y && /* @__PURE__ */ l.jsx(
|
|
12629
|
-
const B = v[b.summaryKey], X =
|
|
12647
|
+
Y && /* @__PURE__ */ l.jsx(pt, { children: /* @__PURE__ */ l.jsx(Ks, { type: "single", collapsible: !0, className: "w-full space-y-2", children: x.map((b) => {
|
|
12648
|
+
const B = v[b.summaryKey], X = Ze(B), W = Z[b.detailKey] ?? {}, q = W.explanation, F = W.placements;
|
|
12630
12649
|
return /* @__PURE__ */ l.jsxs(
|
|
12631
|
-
|
|
12650
|
+
qs,
|
|
12632
12651
|
{
|
|
12633
12652
|
value: b.summaryKey,
|
|
12634
12653
|
className: "border border-border rounded-lg px-3",
|
|
12635
12654
|
children: [
|
|
12636
|
-
/* @__PURE__ */ l.jsx(
|
|
12655
|
+
/* @__PURE__ */ l.jsx(Ws, { 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: [
|
|
12637
12656
|
/* @__PURE__ */ l.jsx("span", { className: "font-semibold text-sm text-left leading-tight", children: e(b.labelKey) }),
|
|
12638
12657
|
X ? /* @__PURE__ */ l.jsxs(vr, { variant: "destructive", className: "flex-shrink-0 text-xs flex items-center gap-1", children: [
|
|
12639
|
-
/* @__PURE__ */ l.jsx(
|
|
12658
|
+
/* @__PURE__ */ l.jsx(Ms, { size: 10 }),
|
|
12640
12659
|
e("drStatusPresent")
|
|
12641
12660
|
] }) : /* @__PURE__ */ l.jsxs(vr, { variant: "secondary", className: "flex-shrink-0 text-xs flex items-center gap-1 bg-green-50 text-green-700 border border-green-200", children: [
|
|
12642
|
-
/* @__PURE__ */ l.jsx(
|
|
12661
|
+
/* @__PURE__ */ l.jsx(Bs, { size: 10 }),
|
|
12643
12662
|
e("drStatusAbsent")
|
|
12644
12663
|
] })
|
|
12645
12664
|
] }) }),
|
|
12646
|
-
/* @__PURE__ */ l.jsxs(
|
|
12665
|
+
/* @__PURE__ */ l.jsxs(Hs, { value: b.summaryKey, className: "space-y-3 pt-0 pb-3", children: [
|
|
12647
12666
|
F && F.length > 0 && /* @__PURE__ */ l.jsxs("div", { className: "p-3 bg-accent/10 rounded-md border border-accent/20", children: [
|
|
12648
12667
|
/* @__PURE__ */ l.jsxs("h5", { className: "font-medium mb-2 flex items-center gap-2 text-sm", children: [
|
|
12649
|
-
/* @__PURE__ */ l.jsx(
|
|
12668
|
+
/* @__PURE__ */ l.jsx(Fs, { size: 14 }),
|
|
12650
12669
|
e("drPlanetaryPositions")
|
|
12651
12670
|
] }),
|
|
12652
12671
|
/* @__PURE__ */ l.jsx("ul", { className: "list-disc list-inside text-sm text-muted-foreground space-y-1 leading-relaxed", children: F.map((E, V) => /* @__PURE__ */ l.jsx("li", { children: E }, V)) })
|
|
@@ -12685,9 +12704,9 @@ function mc({
|
|
|
12685
12704
|
t: e
|
|
12686
12705
|
}
|
|
12687
12706
|
) }) : null,
|
|
12688
|
-
oe.length > 0 && /* @__PURE__ */ l.jsxs(
|
|
12689
|
-
/* @__PURE__ */ l.jsx(
|
|
12690
|
-
/* @__PURE__ */ l.jsx(
|
|
12707
|
+
oe.length > 0 && /* @__PURE__ */ l.jsxs(st, { className: "mt-4 bg-accent/10 border border-accent/30", children: [
|
|
12708
|
+
/* @__PURE__ */ l.jsx(ft, { className: "pb-2", children: /* @__PURE__ */ l.jsx(mt, { className: "text-base font-semibold", children: e("drPlanetaryPositionsCausing") }) }),
|
|
12709
|
+
/* @__PURE__ */ l.jsx(pt, { className: "pt-0", children: /* @__PURE__ */ l.jsx("ul", { className: "space-y-3 text-sm text-muted-foreground", children: oe.map((b, B) => /* @__PURE__ */ l.jsxs("li", { children: [
|
|
12691
12710
|
/* @__PURE__ */ l.jsxs("div", { className: "font-semibold text-foreground mb-1", children: [
|
|
12692
12711
|
b.label,
|
|
12693
12712
|
":"
|
|
@@ -12701,16 +12720,16 @@ function mc({
|
|
|
12701
12720
|
] }) }),
|
|
12702
12721
|
/* @__PURE__ */ l.jsx("p", { className: "text-xs text-muted-foreground/70 text-center px-4", children: e("drDisclaimer") }),
|
|
12703
12722
|
/* @__PURE__ */ l.jsx(
|
|
12704
|
-
|
|
12723
|
+
an,
|
|
12705
12724
|
{
|
|
12706
12725
|
t: e,
|
|
12707
12726
|
readMoreHref: m,
|
|
12708
12727
|
onReadMore: g?.trackReadMoreReviewsClicked ? () => g.trackReadMoreReviewsClicked() : void 0
|
|
12709
12728
|
}
|
|
12710
12729
|
),
|
|
12711
|
-
/* @__PURE__ */ l.jsx(
|
|
12730
|
+
/* @__PURE__ */ l.jsx(on, { t: e, items: hc, defaultOpenIndex: 0 }),
|
|
12712
12731
|
/* @__PURE__ */ l.jsx(
|
|
12713
|
-
|
|
12732
|
+
ln,
|
|
12714
12733
|
{
|
|
12715
12734
|
title: e("contactTitle"),
|
|
12716
12735
|
brandName: e("contactBrandName"),
|
|
@@ -12726,7 +12745,7 @@ function pc({
|
|
|
12726
12745
|
language: r,
|
|
12727
12746
|
onBookClick: s
|
|
12728
12747
|
}) {
|
|
12729
|
-
const n = r?.toLowerCase().startsWith("hi"), a =
|
|
12748
|
+
const n = r?.toLowerCase().startsWith("hi"), a = Tn(t, r), i = Wo(t, r), o = Ho(t.schedule_date_ist, r), c = Pn(t, r), u = Vo(t, r), d = async () => {
|
|
12730
12749
|
if (s)
|
|
12731
12750
|
try {
|
|
12732
12751
|
await s();
|
|
@@ -12735,7 +12754,7 @@ function pc({
|
|
|
12735
12754
|
}
|
|
12736
12755
|
window.open(c, "_blank", "noopener,noreferrer");
|
|
12737
12756
|
};
|
|
12738
|
-
return /* @__PURE__ */ l.jsx(
|
|
12757
|
+
return /* @__PURE__ */ l.jsx(st, { className: "overflow-hidden hover:shadow-lg transition-shadow relative", children: /* @__PURE__ */ l.jsxs("div", { className: "relative", children: [
|
|
12739
12758
|
/* @__PURE__ */ l.jsx("div", { className: "absolute -top-1 -left-1 z-10", children: /* @__PURE__ */ l.jsx("span", { className: "inline-flex items-center px-2 py-1 text-[10px] font-medium bg-destructive/90 text-destructive-foreground rounded-br-md shadow-sm", children: n ? "सीमित सीटें" : "Limited Seats" }) }),
|
|
12740
12759
|
u && /* @__PURE__ */ l.jsx("div", { className: "relative aspect-[16/10] w-full overflow-hidden bg-muted", children: /* @__PURE__ */ l.jsx(
|
|
12741
12760
|
"img",
|
|
@@ -12768,7 +12787,7 @@ function pc({
|
|
|
12768
12787
|
] })
|
|
12769
12788
|
] }) });
|
|
12770
12789
|
}
|
|
12771
|
-
const gc = "_section_15ygl_1", yc = "_heading_15ygl_5", vc = "_list_15ygl_16", bc = "_item_15ygl_20", wc = "_stepNumber_15ygl_24", _c = "_itemContent_15ygl_30", kc = "_itemTitle_15ygl_34", Sc = "_itemDesc_15ygl_39",
|
|
12790
|
+
const gc = "_section_15ygl_1", yc = "_heading_15ygl_5", vc = "_list_15ygl_16", bc = "_item_15ygl_20", wc = "_stepNumber_15ygl_24", _c = "_itemContent_15ygl_30", kc = "_itemTitle_15ygl_34", Sc = "_itemDesc_15ygl_39", et = {
|
|
12772
12791
|
section: gc,
|
|
12773
12792
|
heading: yc,
|
|
12774
12793
|
list: vc,
|
|
@@ -12778,7 +12797,7 @@ const gc = "_section_15ygl_1", yc = "_heading_15ygl_5", vc = "_list_15ygl_16", b
|
|
|
12778
12797
|
itemTitle: kc,
|
|
12779
12798
|
itemDesc: Sc
|
|
12780
12799
|
};
|
|
12781
|
-
function
|
|
12800
|
+
function Xs({
|
|
12782
12801
|
t,
|
|
12783
12802
|
className: e = "",
|
|
12784
12803
|
bannerType: r = "generic"
|
|
@@ -12791,15 +12810,15 @@ function Zs({
|
|
|
12791
12810
|
return /* @__PURE__ */ l.jsxs(
|
|
12792
12811
|
"section",
|
|
12793
12812
|
{
|
|
12794
|
-
className: `${
|
|
12813
|
+
className: `${et.section} ${e}`,
|
|
12795
12814
|
"aria-labelledby": "what-from-analysis-heading",
|
|
12796
12815
|
children: [
|
|
12797
|
-
/* @__PURE__ */ l.jsx("h2", { id: "what-from-analysis-heading", className:
|
|
12798
|
-
/* @__PURE__ */ l.jsx("ol", { className:
|
|
12799
|
-
/* @__PURE__ */ l.jsx("span", { className:
|
|
12800
|
-
/* @__PURE__ */ l.jsxs("div", { className:
|
|
12801
|
-
/* @__PURE__ */ l.jsx("span", { className:
|
|
12802
|
-
/* @__PURE__ */ l.jsx("span", { className:
|
|
12816
|
+
/* @__PURE__ */ l.jsx("h2", { id: "what-from-analysis-heading", className: et.heading, children: s }),
|
|
12817
|
+
/* @__PURE__ */ l.jsx("ol", { className: et.list, children: a.map(({ titleKey: i, descKey: o }, c) => /* @__PURE__ */ l.jsxs("li", { className: et.item, children: [
|
|
12818
|
+
/* @__PURE__ */ l.jsx("span", { className: et.stepNumber, "aria-hidden": "true", children: c + 1 }),
|
|
12819
|
+
/* @__PURE__ */ l.jsxs("div", { className: et.itemContent, children: [
|
|
12820
|
+
/* @__PURE__ */ l.jsx("span", { className: et.itemTitle, children: t(i) }),
|
|
12821
|
+
/* @__PURE__ */ l.jsx("span", { className: et.itemDesc, children: t(o) })
|
|
12803
12822
|
] })
|
|
12804
12823
|
] }, i)) })
|
|
12805
12824
|
]
|
|
@@ -12837,7 +12856,7 @@ const xc = {
|
|
|
12837
12856
|
"generic-what-you'll-get-first": "generic",
|
|
12838
12857
|
"generic-form-first": "generic"
|
|
12839
12858
|
};
|
|
12840
|
-
function
|
|
12859
|
+
function Zs(t, e) {
|
|
12841
12860
|
let r = "generic";
|
|
12842
12861
|
if (t) {
|
|
12843
12862
|
for (const [s, n] of Object.entries(jc))
|
|
@@ -12851,11 +12870,11 @@ function en(t, e) {
|
|
|
12851
12870
|
function Tc(t) {
|
|
12852
12871
|
return typeof window > "u" ? null : new URLSearchParams(window.location.search).get(t);
|
|
12853
12872
|
}
|
|
12854
|
-
function
|
|
12873
|
+
function en() {
|
|
12855
12874
|
return Tc("utm_term");
|
|
12856
12875
|
}
|
|
12857
12876
|
const Pc = "https://srm-cdn.a4b.io/yoda/1770362904947.svg", Ac = "https://srm-cdn.a4b.io/yoda/1770375694934.svg", Ec = "https://srm-cdn.a4b.io/yoda/1770375720933.svg", Rc = "https://srm-cdn.a4b.io/yoda/1770707793537.svg", Oc = "https://srm-cdn.a4b.io/yoda/1770362713543.svg";
|
|
12858
|
-
function
|
|
12877
|
+
function tn(t) {
|
|
12859
12878
|
const e = /* @__PURE__ */ new Set([t]);
|
|
12860
12879
|
switch (t) {
|
|
12861
12880
|
case "kaal-sarp":
|
|
@@ -12878,7 +12897,7 @@ function gr(t) {
|
|
|
12878
12897
|
const e = t.toLowerCase();
|
|
12879
12898
|
return e === "present" || e === "active" || e === "partial" || e === "suggested";
|
|
12880
12899
|
}
|
|
12881
|
-
function
|
|
12900
|
+
function rn(t) {
|
|
12882
12901
|
if (!t) return 2;
|
|
12883
12902
|
const e = t.toLowerCase();
|
|
12884
12903
|
return e === "severe" || e === "high" ? 3 : e === "moderate" || e === "medium" ? 2 : e === "mild" || e === "low" ? 1 : 2;
|
|
@@ -12897,7 +12916,7 @@ function Cc(t) {
|
|
|
12897
12916
|
return t;
|
|
12898
12917
|
}
|
|
12899
12918
|
}
|
|
12900
|
-
function
|
|
12919
|
+
function sn(t) {
|
|
12901
12920
|
const e = [];
|
|
12902
12921
|
return gr(t.kaalSarp) && e.push({
|
|
12903
12922
|
type: "kaal-sarp",
|
|
@@ -12911,17 +12930,17 @@ function nn(t) {
|
|
|
12911
12930
|
}), gr(t.mangal) && !t.mangal?.toLowerCase().includes("nullified") && e.push({
|
|
12912
12931
|
type: "mangal",
|
|
12913
12932
|
severity: typeof t.mangalSeverity == "string" ? t.mangalSeverity : void 0
|
|
12914
|
-
}), e.length === 0 ? null : (e.sort((r, s) =>
|
|
12933
|
+
}), e.length === 0 ? null : (e.sort((r, s) => rn(s.severity) - rn(r.severity)), e[0]?.type ?? null);
|
|
12915
12934
|
}
|
|
12916
12935
|
function Nc({ t }) {
|
|
12917
|
-
return /* @__PURE__ */ l.jsxs("div", { className:
|
|
12918
|
-
/* @__PURE__ */ l.jsxs("span", { className:
|
|
12936
|
+
return /* @__PURE__ */ l.jsxs("div", { className: ot.marqueeContent, children: [
|
|
12937
|
+
/* @__PURE__ */ l.jsxs("span", { className: ot.badge, children: [
|
|
12919
12938
|
/* @__PURE__ */ l.jsx(
|
|
12920
12939
|
"img",
|
|
12921
12940
|
{
|
|
12922
12941
|
src: Ac,
|
|
12923
12942
|
alt: "",
|
|
12924
|
-
className:
|
|
12943
|
+
className: ot.badgeIcon,
|
|
12925
12944
|
width: 16,
|
|
12926
12945
|
height: 16,
|
|
12927
12946
|
"aria-hidden": "true"
|
|
@@ -12929,13 +12948,13 @@ function Nc({ t }) {
|
|
|
12929
12948
|
),
|
|
12930
12949
|
t("ctaKundliCreated")
|
|
12931
12950
|
] }),
|
|
12932
|
-
/* @__PURE__ */ l.jsxs("span", { className:
|
|
12951
|
+
/* @__PURE__ */ l.jsxs("span", { className: ot.badge, children: [
|
|
12933
12952
|
/* @__PURE__ */ l.jsx(
|
|
12934
12953
|
"img",
|
|
12935
12954
|
{
|
|
12936
12955
|
src: Ec,
|
|
12937
12956
|
alt: "",
|
|
12938
|
-
className:
|
|
12957
|
+
className: ot.badgeIcon,
|
|
12939
12958
|
width: 16,
|
|
12940
12959
|
height: 16,
|
|
12941
12960
|
"aria-hidden": "true"
|
|
@@ -12943,13 +12962,13 @@ function Nc({ t }) {
|
|
|
12943
12962
|
),
|
|
12944
12963
|
t("ctaCertified")
|
|
12945
12964
|
] }),
|
|
12946
|
-
/* @__PURE__ */ l.jsxs("span", { className:
|
|
12965
|
+
/* @__PURE__ */ l.jsxs("span", { className: ot.badge, children: [
|
|
12947
12966
|
/* @__PURE__ */ l.jsx(
|
|
12948
12967
|
"img",
|
|
12949
12968
|
{
|
|
12950
12969
|
src: Rc,
|
|
12951
12970
|
alt: "",
|
|
12952
|
-
className:
|
|
12971
|
+
className: ot.badgeIcon,
|
|
12953
12972
|
width: 16,
|
|
12954
12973
|
height: 16,
|
|
12955
12974
|
"aria-hidden": "true"
|
|
@@ -13016,9 +13035,9 @@ function lu({
|
|
|
13016
13035
|
O = !1;
|
|
13017
13036
|
};
|
|
13018
13037
|
}, [Be, w]);
|
|
13019
|
-
const
|
|
13038
|
+
const yt = Ue(
|
|
13020
13039
|
(O) => {
|
|
13021
|
-
const H =
|
|
13040
|
+
const H = Is(me, O);
|
|
13022
13041
|
return H ? /* @__PURE__ */ l.jsx(
|
|
13023
13042
|
pc,
|
|
13024
13043
|
{
|
|
@@ -13031,26 +13050,26 @@ function lu({
|
|
|
13031
13050
|
[me, N]
|
|
13032
13051
|
), Ge = Ue(
|
|
13033
13052
|
(O) => {
|
|
13034
|
-
const H =
|
|
13053
|
+
const H = Is(me, O);
|
|
13035
13054
|
return H ? {
|
|
13036
|
-
name:
|
|
13055
|
+
name: Tn(H, N),
|
|
13037
13056
|
price: H.individual_pack_price_inr,
|
|
13038
|
-
link:
|
|
13057
|
+
link: Pn(H, N)
|
|
13039
13058
|
} : null;
|
|
13040
13059
|
},
|
|
13041
13060
|
[me, N]
|
|
13042
|
-
),
|
|
13043
|
-
() =>
|
|
13061
|
+
), vt = m ?? yt, bt = k ?? Ge, Fe = p || !m && _e, [xe, nt] = M(
|
|
13062
|
+
() => Zs(null, N)
|
|
13044
13063
|
), [Ke, Ve] = M("generic");
|
|
13045
13064
|
ve(() => {
|
|
13046
|
-
const O =
|
|
13047
|
-
|
|
13065
|
+
const O = en(), H = Zs(O, N);
|
|
13066
|
+
nt(H);
|
|
13048
13067
|
let je = "generic";
|
|
13049
13068
|
O && O.toLowerCase().includes("marriage") && (je = "marriage"), Ve(je);
|
|
13050
13069
|
}, [N]);
|
|
13051
|
-
const [
|
|
13070
|
+
const [wt, P] = M(!1);
|
|
13052
13071
|
ve(() => {
|
|
13053
|
-
const O =
|
|
13072
|
+
const O = en();
|
|
13054
13073
|
O && O.toLowerCase().includes("what-you") && P(!0);
|
|
13055
13074
|
}, []);
|
|
13056
13075
|
const I = () => {
|
|
@@ -13065,9 +13084,9 @@ function lu({
|
|
|
13065
13084
|
[v]
|
|
13066
13085
|
), Ee = (O, H) => {
|
|
13067
13086
|
if (B(O), W(H ?? null), V(!1), O.summary) {
|
|
13068
|
-
const je = O.summary, We =
|
|
13087
|
+
const je = O.summary, We = sn(je);
|
|
13069
13088
|
if (We) {
|
|
13070
|
-
const Dt =
|
|
13089
|
+
const Dt = tn(We).map(($t) => bt($t)).find(Boolean) ?? null;
|
|
13071
13090
|
pe(Dt);
|
|
13072
13091
|
} else
|
|
13073
13092
|
pe(null);
|
|
@@ -13077,15 +13096,15 @@ function lu({
|
|
|
13077
13096
|
};
|
|
13078
13097
|
ve(() => {
|
|
13079
13098
|
if (k || !b?.summary) return;
|
|
13080
|
-
const O =
|
|
13099
|
+
const O = sn(b.summary);
|
|
13081
13100
|
if (!O) {
|
|
13082
13101
|
pe(null);
|
|
13083
13102
|
return;
|
|
13084
13103
|
}
|
|
13085
|
-
const H =
|
|
13104
|
+
const H = tn(O).map((je) => Ge(je)).find(Boolean) ?? null;
|
|
13086
13105
|
pe(H);
|
|
13087
13106
|
}, [Ge, k, b]);
|
|
13088
|
-
const
|
|
13107
|
+
const at = () => {
|
|
13089
13108
|
V(!0), window.scrollTo({ top: 0, behavior: "smooth" });
|
|
13090
13109
|
}, qe = () => {
|
|
13091
13110
|
if (b && !E && Se) {
|
|
@@ -13121,7 +13140,7 @@ function lu({
|
|
|
13121
13140
|
) : null) ?? r;
|
|
13122
13141
|
return /* @__PURE__ */ l.jsxs("div", { className: t, children: [
|
|
13123
13142
|
/* @__PURE__ */ l.jsx(
|
|
13124
|
-
|
|
13143
|
+
ea,
|
|
13125
13144
|
{
|
|
13126
13145
|
t: x,
|
|
13127
13146
|
logoUrl: e,
|
|
@@ -13129,9 +13148,9 @@ function lu({
|
|
|
13129
13148
|
showLanguageSelector: s
|
|
13130
13149
|
}
|
|
13131
13150
|
),
|
|
13132
|
-
/* @__PURE__ */ l.jsx(
|
|
13151
|
+
/* @__PURE__ */ l.jsx(ta, { children: /* @__PURE__ */ l.jsx(Nc, { t: x }) }),
|
|
13133
13152
|
!b && /* @__PURE__ */ l.jsx(
|
|
13134
|
-
|
|
13153
|
+
Xe,
|
|
13135
13154
|
{
|
|
13136
13155
|
section: "banner",
|
|
13137
13156
|
onImpression: z,
|
|
@@ -13139,7 +13158,7 @@ function lu({
|
|
|
13139
13158
|
}
|
|
13140
13159
|
),
|
|
13141
13160
|
/* @__PURE__ */ l.jsx("main", { className: "pb-28", children: b ? /* @__PURE__ */ l.jsx(
|
|
13142
|
-
|
|
13161
|
+
Xe,
|
|
13143
13162
|
{
|
|
13144
13163
|
section: "result",
|
|
13145
13164
|
onImpression: z,
|
|
@@ -13148,9 +13167,9 @@ function lu({
|
|
|
13148
13167
|
{
|
|
13149
13168
|
result: b,
|
|
13150
13169
|
t: x,
|
|
13151
|
-
onEdit: E ? void 0 :
|
|
13170
|
+
onEdit: E ? void 0 : at,
|
|
13152
13171
|
inlineEditForm: E ? /* @__PURE__ */ l.jsx(
|
|
13153
|
-
|
|
13172
|
+
Us,
|
|
13154
13173
|
{
|
|
13155
13174
|
ref: be,
|
|
13156
13175
|
t: x,
|
|
@@ -13166,7 +13185,7 @@ function lu({
|
|
|
13166
13185
|
analytics: v
|
|
13167
13186
|
}
|
|
13168
13187
|
) : void 0,
|
|
13169
|
-
renderPujaCard:
|
|
13188
|
+
renderPujaCard: vt,
|
|
13170
13189
|
isLoadingPujas: Fe,
|
|
13171
13190
|
renderKundali: g,
|
|
13172
13191
|
kundaliSectionId: y,
|
|
@@ -13181,21 +13200,21 @@ function lu({
|
|
|
13181
13200
|
) : (
|
|
13182
13201
|
/* Landing page */
|
|
13183
13202
|
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
13184
|
-
|
|
13185
|
-
|
|
13203
|
+
wt && /* @__PURE__ */ l.jsx(
|
|
13204
|
+
Xe,
|
|
13186
13205
|
{
|
|
13187
13206
|
section: "what_from_analysis",
|
|
13188
13207
|
onImpression: z,
|
|
13189
|
-
children: /* @__PURE__ */ l.jsx(
|
|
13208
|
+
children: /* @__PURE__ */ l.jsx(Xs, { t: x, bannerType: Ke })
|
|
13190
13209
|
}
|
|
13191
13210
|
),
|
|
13192
13211
|
/* @__PURE__ */ l.jsx(
|
|
13193
|
-
|
|
13212
|
+
Xe,
|
|
13194
13213
|
{
|
|
13195
13214
|
section: "form",
|
|
13196
13215
|
onImpression: z,
|
|
13197
13216
|
children: /* @__PURE__ */ l.jsx("div", { ref: L, children: /* @__PURE__ */ l.jsx(
|
|
13198
|
-
|
|
13217
|
+
Us,
|
|
13199
13218
|
{
|
|
13200
13219
|
ref: be,
|
|
13201
13220
|
t: x,
|
|
@@ -13213,21 +13232,21 @@ function lu({
|
|
|
13213
13232
|
) })
|
|
13214
13233
|
}
|
|
13215
13234
|
),
|
|
13216
|
-
!
|
|
13217
|
-
|
|
13235
|
+
!wt && /* @__PURE__ */ l.jsx(
|
|
13236
|
+
Xe,
|
|
13218
13237
|
{
|
|
13219
13238
|
section: "what_from_analysis",
|
|
13220
13239
|
onImpression: z,
|
|
13221
|
-
children: /* @__PURE__ */ l.jsx(
|
|
13240
|
+
children: /* @__PURE__ */ l.jsx(Xs, { t: x, bannerType: Ke })
|
|
13222
13241
|
}
|
|
13223
13242
|
),
|
|
13224
13243
|
/* @__PURE__ */ l.jsx(
|
|
13225
|
-
|
|
13244
|
+
Xe,
|
|
13226
13245
|
{
|
|
13227
13246
|
section: "user_reviews",
|
|
13228
13247
|
onImpression: z,
|
|
13229
13248
|
children: /* @__PURE__ */ l.jsx(
|
|
13230
|
-
|
|
13249
|
+
an,
|
|
13231
13250
|
{
|
|
13232
13251
|
t: (O) => {
|
|
13233
13252
|
if (Ke === "marriage") {
|
|
@@ -13247,12 +13266,12 @@ function lu({
|
|
|
13247
13266
|
}
|
|
13248
13267
|
),
|
|
13249
13268
|
/* @__PURE__ */ l.jsx(
|
|
13250
|
-
|
|
13269
|
+
Xe,
|
|
13251
13270
|
{
|
|
13252
13271
|
section: "faq",
|
|
13253
13272
|
onImpression: z,
|
|
13254
13273
|
children: /* @__PURE__ */ l.jsx(
|
|
13255
|
-
|
|
13274
|
+
on,
|
|
13256
13275
|
{
|
|
13257
13276
|
t: x,
|
|
13258
13277
|
items: Ke === "marriage" ? Dc : Ic,
|
|
@@ -13263,12 +13282,12 @@ function lu({
|
|
|
13263
13282
|
}
|
|
13264
13283
|
),
|
|
13265
13284
|
/* @__PURE__ */ l.jsx(
|
|
13266
|
-
|
|
13285
|
+
Xe,
|
|
13267
13286
|
{
|
|
13268
13287
|
section: "contact",
|
|
13269
13288
|
onImpression: z,
|
|
13270
13289
|
children: /* @__PURE__ */ l.jsx(
|
|
13271
|
-
|
|
13290
|
+
ln,
|
|
13272
13291
|
{
|
|
13273
13292
|
title: x("contactTitle"),
|
|
13274
13293
|
brandName: x("contactBrandName"),
|
|
@@ -13280,7 +13299,7 @@ function lu({
|
|
|
13280
13299
|
)
|
|
13281
13300
|
] })
|
|
13282
13301
|
) }),
|
|
13283
|
-
/* @__PURE__ */ l.jsxs(
|
|
13302
|
+
/* @__PURE__ */ l.jsxs(ra, { children: [
|
|
13284
13303
|
!(b && !E && Se) && /* @__PURE__ */ l.jsx(Yo, {}),
|
|
13285
13304
|
/* @__PURE__ */ l.jsx(
|
|
13286
13305
|
cl,
|
|
@@ -13412,7 +13431,7 @@ function uu(t) {
|
|
|
13412
13431
|
}
|
|
13413
13432
|
export {
|
|
13414
13433
|
lu as DoshaCalculator,
|
|
13415
|
-
|
|
13434
|
+
Us as DoshaFormSection,
|
|
13416
13435
|
mc as DoshaResultsFull,
|
|
13417
13436
|
cu as DoshaResultsView,
|
|
13418
13437
|
Ar as FLOATING_CTA_STATUS,
|
|
@@ -13426,8 +13445,8 @@ export {
|
|
|
13426
13445
|
uc as fetchKundaliSvg,
|
|
13427
13446
|
Ho as formatScheduleDate,
|
|
13428
13447
|
Vo as getCoverImageUrl,
|
|
13429
|
-
|
|
13430
|
-
|
|
13448
|
+
Pn as getPujaLink,
|
|
13449
|
+
Tn as getPujaTitle,
|
|
13431
13450
|
Wo as getTempleName,
|
|
13432
13451
|
ql as insertSessionProblemStatements,
|
|
13433
13452
|
Wl as invokeCalculateDosha,
|