@nosto/search-js 3.25.4 → 3.25.6
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/AutocompletePageProvider-D48n1GB-.js +37 -0
- package/dist/AutocompletePageProvider-DzjwKsBp.cjs +1 -0
- package/dist/BaseElement-BnP6tQrH.cjs +1 -0
- package/dist/BaseElement-C25wjvSR.js +19 -0
- package/dist/CategoryPageProvider-B6w4FHhB.cjs +1 -0
- package/dist/CategoryPageProvider-BYw7KGoS.js +30 -0
- package/dist/ErrorBoundary-BtAe8lXu.cjs +1 -0
- package/dist/ErrorBoundary-Bxyssvki.js +11 -0
- package/dist/InfiniteScrollWithObserver-8imjYGGz.js +226 -0
- package/dist/InfiniteScrollWithObserver-k7oYk4f9.cjs +1 -0
- package/dist/SerpPageProvider-BgRZJNth.cjs +1 -0
- package/dist/SerpPageProvider-fg14kNV9.js +30 -0
- package/dist/baseConfig-Che6Adb6.js +50 -0
- package/dist/baseConfig-jLd7jchq.cjs +1 -0
- package/dist/cl-CYT5y6Dn.cjs +1 -0
- package/dist/cl-G5KK1qHD.js +6 -0
- package/dist/core/core.cjs.js +1 -1
- package/dist/core/core.es.js +8 -8
- package/dist/currencies/currencies.cjs.js +1 -1
- package/dist/currencies/currencies.es.js +61 -65
- package/dist/disableNativeAutocomplete-CcR_Ek_P.js +26 -0
- package/dist/disableNativeAutocomplete-CjBGhRWW.cjs +1 -0
- package/dist/eventBusDispatch-B6VswTu8.cjs +1 -0
- package/dist/eventBusDispatch-DnFmEqYe.js +15 -0
- package/dist/eventBusSubscribe-C6qT1aOO.js +22 -0
- package/dist/eventBusSubscribe-c9a_PP0j.cjs +1 -0
- package/dist/index.es-Ba4tuzxb.cjs +1 -0
- package/dist/index.es-jSYcbRvi.js +25 -0
- package/dist/{isBot-B05pQGIe.js → isBot-CPesLwHL.js} +18 -17
- package/dist/isBot-CkyQfegP.cjs +1 -0
- package/dist/jsxRuntime.module-BRdvPAre.js +30 -0
- package/dist/jsxRuntime.module-Ba9fccPy.cjs +1 -0
- package/dist/parseNumber-BH_92pM8.cjs +1 -0
- package/dist/parseNumber-DFsrGj64.js +9 -0
- package/dist/pick-0KNFTqKn.cjs +1 -0
- package/dist/pick-B8ymxJme.js +6 -0
- package/dist/preact/autocomplete/autocomplete.cjs.js +1 -1
- package/dist/preact/autocomplete/autocomplete.es.js +49 -42
- package/dist/preact/category/category.cjs.js +1 -1
- package/dist/preact/category/category.es.js +9 -4
- package/dist/preact/common/common.cjs.js +1 -1
- package/dist/preact/common/common.es.js +27 -31
- package/dist/preact/events/events.cjs.js +1 -1
- package/dist/preact/events/events.es.js +3 -8
- package/dist/preact/hooks/hooks.cjs.js +1 -1
- package/dist/preact/hooks/hooks.es.js +495 -508
- package/dist/preact/inject/inject.cjs.js +1 -1
- package/dist/preact/inject/inject.es.js +318 -301
- package/dist/preact/legacy/legacy.cjs.js +1 -1
- package/dist/preact/legacy/legacy.es.js +8 -10
- package/dist/preact/serp/serp.cjs.js +1 -1
- package/dist/preact/serp/serp.es.js +28 -18
- package/dist/search-BeFE0Ezr.cjs +1 -0
- package/dist/search-C2WGFf4C.js +155 -0
- package/dist/storage-B3FIcJQv.cjs +1 -0
- package/dist/storage-DeAo7M3s.js +115 -0
- package/dist/thumbnails/thumbnails.cjs.js +1 -1
- package/dist/thumbnails/thumbnails.es.js +93 -97
- package/dist/unique-BXFI_-3F.cjs +1 -0
- package/dist/unique-DSDxyj90.js +37 -0
- package/dist/useActions-BmWNZAES.js +182 -0
- package/dist/useActions-boQy-Vp0.cjs +1 -0
- package/dist/useHistory-BMkSr69f.js +24 -0
- package/dist/useHistory-GRnuHgQ5.cjs +1 -0
- package/dist/useLoadMore-B9LiuhfV.cjs +1 -0
- package/dist/useLoadMore-BkJV7F21.js +38 -0
- package/dist/utils/utils.cjs.js +1 -1
- package/dist/utils/utils.es.js +9 -28
- package/package.json +5 -5
- package/dist/AutocompletePageProvider-CFEbt11-.cjs +0 -1
- package/dist/AutocompletePageProvider-CQePqAhB.js +0 -35
- package/dist/BaseElement-CIHACCWd.cjs +0 -1
- package/dist/BaseElement-DD_4UwDm.js +0 -24
- package/dist/CategoryPageProvider-037sXEh9.cjs +0 -1
- package/dist/CategoryPageProvider-DVL9lsCU.js +0 -26
- package/dist/ErrorBoundary-DFs5vnv-.js +0 -11
- package/dist/ErrorBoundary-DNPL7EwP.cjs +0 -1
- package/dist/InfiniteScrollWithObserver-BliG4dEl.cjs +0 -1
- package/dist/InfiniteScrollWithObserver-DvkEUZUE.js +0 -205
- package/dist/SerpPageProvider-BzrNPc7g.js +0 -26
- package/dist/SerpPageProvider-CxqiX9Zo.cjs +0 -1
- package/dist/baseConfig-BOOw0mWW.cjs +0 -1
- package/dist/baseConfig-Cf28X268.js +0 -48
- package/dist/cl-B00bZ7jc.cjs +0 -1
- package/dist/cl-CcykAxZN.js +0 -6
- package/dist/disableNativeAutocomplete-Bkta_WR2.js +0 -27
- package/dist/disableNativeAutocomplete-DI6zaZII.cjs +0 -1
- package/dist/eventBusDispatch-BKQcSHAB.cjs +0 -1
- package/dist/eventBusDispatch-DPR2Vwd4.js +0 -20
- package/dist/eventBusSubscribe-B5E7dTzk.js +0 -26
- package/dist/eventBusSubscribe-C4H9Nv1Z.cjs +0 -1
- package/dist/index.es-Dp6Iaxz3.cjs +0 -1
- package/dist/index.es-XNBESE3P.js +0 -26
- package/dist/isBot-C-qPIZyF.cjs +0 -1
- package/dist/jsxRuntime.module-B3sGoTIU.cjs +0 -1
- package/dist/jsxRuntime.module-Bzuv3cXw.js +0 -13
- package/dist/parseNumber-FsZ8w61u.cjs +0 -1
- package/dist/parseNumber-QA48nJLp.js +0 -11
- package/dist/pick-DReBictn.js +0 -9
- package/dist/pick-rYi1lc2m.cjs +0 -1
- package/dist/search-BchLEATK.cjs +0 -1
- package/dist/search-D1jQPG6P.js +0 -156
- package/dist/storage-9KuhFI9v.cjs +0 -1
- package/dist/storage-B97DRj5i.js +0 -121
- package/dist/unique-C1G3v2Y8.cjs +0 -1
- package/dist/unique-CCu7ChUL.js +0 -39
- package/dist/useActions-BD6dgsX8.js +0 -260
- package/dist/useActions-DIlSparF.cjs +0 -1
- package/dist/useHistory-DLCyHMo1.cjs +0 -1
- package/dist/useHistory-sjFYeR68.js +0 -27
- package/dist/useLoadMore-BMOT8Dfn.js +0 -33
- package/dist/useLoadMore-vCpwy6JC.cjs +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { a as e, c as t, i as n } from "./useActions-BmWNZAES.js";
|
|
2
|
+
import { n as r, r as i, t as a } from "./baseConfig-Che6Adb6.js";
|
|
3
|
+
import { n as o } from "./useHistory-BMkSr69f.js";
|
|
4
|
+
import { n as s } from "./jsxRuntime.module-BRdvPAre.js";
|
|
5
|
+
import { useEffect as c } from "preact/hooks";
|
|
6
|
+
//#region packages/preact/autocomplete/src/AutocompleteConfig.ts
|
|
7
|
+
var l = {
|
|
8
|
+
...a,
|
|
9
|
+
memoryCache: !1,
|
|
10
|
+
historyEnabled: !0,
|
|
11
|
+
historySize: 5,
|
|
12
|
+
debounceDelay: 500,
|
|
13
|
+
minQueryLength: 2
|
|
14
|
+
};
|
|
15
|
+
function u(e = {}) {
|
|
16
|
+
return {
|
|
17
|
+
pageType: "autocomplete",
|
|
18
|
+
...l,
|
|
19
|
+
...e
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region packages/preact/autocomplete/src/AutocompletePageProvider.tsx
|
|
24
|
+
function d({ config: a, store: l, children: d }) {
|
|
25
|
+
let f = l ?? e();
|
|
26
|
+
return r(), c(() => {
|
|
27
|
+
f.updateState({ historyItems: o() });
|
|
28
|
+
}, [f]), /* @__PURE__ */ s(t, {
|
|
29
|
+
value: u(a),
|
|
30
|
+
children: /* @__PURE__ */ s(n, {
|
|
31
|
+
value: f,
|
|
32
|
+
children: [/* @__PURE__ */ s(i, {}), d]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { u as n, d as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useActions-boQy-Vp0.cjs`),t=require(`./baseConfig-jLd7jchq.cjs`),n=require(`./useHistory-GRnuHgQ5.cjs`),r=require(`./jsxRuntime.module-Ba9fccPy.cjs`);let i=require(`preact/hooks`);var a={...t.t,memoryCache:!1,historyEnabled:!0,historySize:5,debounceDelay:500,minQueryLength:2};function o(e={}){return{pageType:`autocomplete`,...a,...e}}function s({config:a,store:s,children:c}){let l=s??e.a();return t.n(),(0,i.useEffect)(()=>{l.updateState({historyItems:n.n()})},[l]),r.t(e.c,{value:o(a),children:r.t(e.i,{value:l,children:[r.t(t.r,{}),c]})})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./cl-CYT5y6Dn.cjs`),t=require(`./jsxRuntime.module-Ba9fccPy.cjs`);let n=require(`preact/hooks`);function r({onClick:r,as:i,children:a,componentProps:o,className:s}){let c={...o,onClick:(0,n.useCallback)(e=>{r(),o?.onClick?.(e)},[r,o])},l=e.t(`className`in c&&c.className,s);return t.t(i??(o&&`href`in o?`a`:`span`),{...c,className:l,children:a})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as e } from "./cl-G5KK1qHD.js";
|
|
2
|
+
import { n as t } from "./jsxRuntime.module-BRdvPAre.js";
|
|
3
|
+
import { useCallback as n } from "preact/hooks";
|
|
4
|
+
//#region packages/preact/common/src/components/BaseElement.tsx
|
|
5
|
+
function r({ onClick: r, as: i, children: a, componentProps: o, className: s }) {
|
|
6
|
+
let c = {
|
|
7
|
+
...o,
|
|
8
|
+
onClick: n((e) => {
|
|
9
|
+
r(), o?.onClick?.(e);
|
|
10
|
+
}, [r, o])
|
|
11
|
+
}, l = e("className" in c && c.className, s);
|
|
12
|
+
return /* @__PURE__ */ t(i ?? (o && "href" in o ? "a" : "span"), {
|
|
13
|
+
...c,
|
|
14
|
+
className: l,
|
|
15
|
+
children: a
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useActions-boQy-Vp0.cjs`),t=require(`./baseConfig-jLd7jchq.cjs`),n=require(`./jsxRuntime.module-Ba9fccPy.cjs`);var r={...t.t,persistentSearchCache:!1,preservePageScroll:!1};function i(e){return{pageType:`category`,...r,...e}}function a({config:r,store:a,children:o}){let s=a??e.a();return t.n(),n.t(e.c,{value:i(r),children:n.t(e.i,{value:s,children:[n.t(t.r,{}),o]})})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { a as e, c as t, i as n } from "./useActions-BmWNZAES.js";
|
|
2
|
+
import { n as r, r as i, t as a } from "./baseConfig-Che6Adb6.js";
|
|
3
|
+
import { n as o } from "./jsxRuntime.module-BRdvPAre.js";
|
|
4
|
+
//#region packages/preact/category/src/CategoryConfig.ts
|
|
5
|
+
var s = {
|
|
6
|
+
...a,
|
|
7
|
+
persistentSearchCache: !1,
|
|
8
|
+
preservePageScroll: !1
|
|
9
|
+
};
|
|
10
|
+
function c(e) {
|
|
11
|
+
return {
|
|
12
|
+
pageType: "category",
|
|
13
|
+
...s,
|
|
14
|
+
...e
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region packages/preact/category/src/CategoryPageProvider.tsx
|
|
19
|
+
function l({ config: a, store: s, children: l }) {
|
|
20
|
+
let u = s ?? e();
|
|
21
|
+
return r(), /* @__PURE__ */ o(t, {
|
|
22
|
+
value: c(a),
|
|
23
|
+
children: /* @__PURE__ */ o(n, {
|
|
24
|
+
value: u,
|
|
25
|
+
children: [/* @__PURE__ */ o(i, {}), l]
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { c as n, l as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./storage-B3FIcJQv.cjs`),t=require(`./jsxRuntime.module-Ba9fccPy.cjs`);let n=require(`preact`),r=require(`preact/hooks`);function i({children:i}){let[a]=(0,r.useErrorBoundary)();return a&&e.s.warn(`Error caught in ErrorBoundary`,a),t.t(n.Fragment,{children:i})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { s as e } from "./storage-DeAo7M3s.js";
|
|
2
|
+
import { n as t } from "./jsxRuntime.module-BRdvPAre.js";
|
|
3
|
+
import { Fragment as n } from "preact";
|
|
4
|
+
import { useErrorBoundary as r } from "preact/hooks";
|
|
5
|
+
//#region packages/preact/common/src/components/ErrorBoundary.tsx
|
|
6
|
+
function i({ children: i }) {
|
|
7
|
+
let [a] = r();
|
|
8
|
+
return a && e.warn("Error caught in ErrorBoundary", a), /* @__PURE__ */ t(n, { children: i });
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { i as t };
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { c as e } from "./storage-DeAo7M3s.js";
|
|
2
|
+
import { t } from "./pick-B8ymxJme.js";
|
|
3
|
+
import { n, t as r } from "./jsxRuntime.module-BRdvPAre.js";
|
|
4
|
+
import { r as i, t as a } from "./useLoadMore-BkJV7F21.js";
|
|
5
|
+
import { Component as o, Fragment as s, createElement as c, options as l, toChildArray as u } from "preact";
|
|
6
|
+
import { useEffect as d, useRef as f } from "preact/hooks";
|
|
7
|
+
//#region packages/preact/common/src/components/InfiniteScroll/utils.ts
|
|
8
|
+
function p(e, t) {
|
|
9
|
+
let n = t.products?.total ?? 0, r = e.products?.from ?? 0, i = e.products?.size ?? 0;
|
|
10
|
+
return n > 0 && n > r + i;
|
|
11
|
+
}
|
|
12
|
+
function m() {
|
|
13
|
+
return !!(window.IntersectionObserver && window.IntersectionObserverEntry && "intersectionRatio" in window.IntersectionObserverEntry.prototype);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region node_modules/preact/compat/dist/compat.module.js
|
|
17
|
+
function h(e, t) {
|
|
18
|
+
for (var n in t) e[n] = t[n];
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
function g(e, t) {
|
|
22
|
+
for (var n in e) if (n !== "__source" && !(n in t)) return !0;
|
|
23
|
+
for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
|
|
24
|
+
return !1;
|
|
25
|
+
}
|
|
26
|
+
function _(e, t) {
|
|
27
|
+
this.props = e, this.context = t;
|
|
28
|
+
}
|
|
29
|
+
function v(e, t) {
|
|
30
|
+
function n(e) {
|
|
31
|
+
var n = this.props.ref, r = n == e.ref;
|
|
32
|
+
return !r && n && (n.call ? n(null) : n.current = null), t ? !t(this.props, e) || !r : g(this.props, e);
|
|
33
|
+
}
|
|
34
|
+
function r(t) {
|
|
35
|
+
return this.shouldComponentUpdate = n, c(e, t);
|
|
36
|
+
}
|
|
37
|
+
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
|
|
38
|
+
}
|
|
39
|
+
(_.prototype = new o()).isPureReactComponent = !0, _.prototype.shouldComponentUpdate = function(e, t) {
|
|
40
|
+
return g(this.props, e) || g(this.state, t);
|
|
41
|
+
};
|
|
42
|
+
var y = l.__b;
|
|
43
|
+
l.__b = function(e) {
|
|
44
|
+
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), y && y(e);
|
|
45
|
+
}, typeof Symbol < "u" && Symbol.for;
|
|
46
|
+
var b = l.__e;
|
|
47
|
+
l.__e = function(e, t, n, r) {
|
|
48
|
+
if (e.then) {
|
|
49
|
+
for (var i, a = t; a = a.__;) if ((i = a.__c) && i.__c) return t.__e ?? (t.__e = n.__e, t.__k = n.__k), i.__c(e, t);
|
|
50
|
+
}
|
|
51
|
+
b(e, t, n, r);
|
|
52
|
+
};
|
|
53
|
+
var x = l.unmount;
|
|
54
|
+
function S(e, t, n) {
|
|
55
|
+
return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(e) {
|
|
56
|
+
typeof e.__c == "function" && e.__c();
|
|
57
|
+
}), e.__c.__H = null), (e = h({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(e) {
|
|
58
|
+
return S(e, t, n);
|
|
59
|
+
})), e;
|
|
60
|
+
}
|
|
61
|
+
function C(e, t, n) {
|
|
62
|
+
return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(e) {
|
|
63
|
+
return C(e, t, n);
|
|
64
|
+
}), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
|
|
65
|
+
}
|
|
66
|
+
function w() {
|
|
67
|
+
this.__u = 0, this.o = null, this.__b = null;
|
|
68
|
+
}
|
|
69
|
+
function T(e) {
|
|
70
|
+
var t = e.__.__c;
|
|
71
|
+
return t && t.__a && t.__a(e);
|
|
72
|
+
}
|
|
73
|
+
function E() {
|
|
74
|
+
this.i = null, this.l = null;
|
|
75
|
+
}
|
|
76
|
+
l.unmount = function(e) {
|
|
77
|
+
var t = e.__c;
|
|
78
|
+
t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), x && x(e);
|
|
79
|
+
}, (w.prototype = new o()).__c = function(e, t) {
|
|
80
|
+
var n = t.__c, r = this;
|
|
81
|
+
r.o ??= [], r.o.push(n);
|
|
82
|
+
var i = T(r.__v), a = !1, o = function() {
|
|
83
|
+
a || (a = !0, n.__R = null, i ? i(s) : s());
|
|
84
|
+
};
|
|
85
|
+
n.__R = o;
|
|
86
|
+
var s = function() {
|
|
87
|
+
if (!--r.__u) {
|
|
88
|
+
if (r.state.__a) {
|
|
89
|
+
var e = r.state.__a;
|
|
90
|
+
r.__v.__k[0] = C(e, e.__c.__P, e.__c.__O);
|
|
91
|
+
}
|
|
92
|
+
var t;
|
|
93
|
+
for (r.setState({ __a: r.__b = null }); t = r.o.pop();) t.forceUpdate();
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(o, o);
|
|
97
|
+
}, w.prototype.componentWillUnmount = function() {
|
|
98
|
+
this.o = [];
|
|
99
|
+
}, w.prototype.render = function(e, t) {
|
|
100
|
+
if (this.__b) {
|
|
101
|
+
if (this.__v.__k) {
|
|
102
|
+
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
103
|
+
this.__v.__k[0] = S(this.__b, n, r.__O = r.__P);
|
|
104
|
+
}
|
|
105
|
+
this.__b = null;
|
|
106
|
+
}
|
|
107
|
+
var i = t.__a && c(s, null, e.fallback);
|
|
108
|
+
return i && (i.__u &= -33), [c(s, null, t.__a ? null : e.children), i];
|
|
109
|
+
};
|
|
110
|
+
var D = function(e, t, n) {
|
|
111
|
+
if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n;) {
|
|
112
|
+
for (; n.length > 3;) n.pop()();
|
|
113
|
+
if (n[1] < n[0]) break;
|
|
114
|
+
e.i = n = n[2];
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
(E.prototype = new o()).__a = function(e) {
|
|
118
|
+
var t = this, n = T(t.__v), r = t.l.get(e);
|
|
119
|
+
return r[0]++, function(i) {
|
|
120
|
+
var a = function() {
|
|
121
|
+
t.props.revealOrder ? (r.push(i), D(t, e, r)) : i();
|
|
122
|
+
};
|
|
123
|
+
n ? n(a) : a();
|
|
124
|
+
};
|
|
125
|
+
}, E.prototype.render = function(e) {
|
|
126
|
+
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
127
|
+
var t = u(e.children);
|
|
128
|
+
e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
|
|
129
|
+
for (var n = t.length; n--;) this.l.set(t[n], this.i = [
|
|
130
|
+
1,
|
|
131
|
+
0,
|
|
132
|
+
this.i
|
|
133
|
+
]);
|
|
134
|
+
return e.children;
|
|
135
|
+
}, E.prototype.componentDidUpdate = E.prototype.componentDidMount = function() {
|
|
136
|
+
var e = this;
|
|
137
|
+
this.l.forEach(function(t, n) {
|
|
138
|
+
D(e, n, t);
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
var O = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, k = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, A = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, j = /[A-Z0-9]/g, M = typeof document < "u", N = function(e) {
|
|
142
|
+
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
|
|
143
|
+
};
|
|
144
|
+
o.prototype.isReactComponent = {}, [
|
|
145
|
+
"componentWillMount",
|
|
146
|
+
"componentWillReceiveProps",
|
|
147
|
+
"componentWillUpdate"
|
|
148
|
+
].forEach(function(e) {
|
|
149
|
+
Object.defineProperty(o.prototype, e, {
|
|
150
|
+
configurable: !0,
|
|
151
|
+
get: function() {
|
|
152
|
+
return this["UNSAFE_" + e];
|
|
153
|
+
},
|
|
154
|
+
set: function(t) {
|
|
155
|
+
Object.defineProperty(this, e, {
|
|
156
|
+
configurable: !0,
|
|
157
|
+
writable: !0,
|
|
158
|
+
value: t
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
var P = l.event;
|
|
164
|
+
function F() {}
|
|
165
|
+
function I() {
|
|
166
|
+
return this.cancelBubble;
|
|
167
|
+
}
|
|
168
|
+
function L() {
|
|
169
|
+
return this.defaultPrevented;
|
|
170
|
+
}
|
|
171
|
+
l.event = function(e) {
|
|
172
|
+
return P && (e = P(e)), e.persist = F, e.isPropagationStopped = I, e.isDefaultPrevented = L, e.nativeEvent = e;
|
|
173
|
+
};
|
|
174
|
+
var R = {
|
|
175
|
+
enumerable: !1,
|
|
176
|
+
configurable: !0,
|
|
177
|
+
get: function() {
|
|
178
|
+
return this.class;
|
|
179
|
+
}
|
|
180
|
+
}, z = l.vnode;
|
|
181
|
+
l.vnode = function(e) {
|
|
182
|
+
typeof e.type == "string" && function(e) {
|
|
183
|
+
var t = e.props, n = e.type, r = {}, i = n.indexOf("-") === -1;
|
|
184
|
+
for (var a in t) {
|
|
185
|
+
var o = t[a];
|
|
186
|
+
if (!(a === "value" && "defaultValue" in t && o == null || M && a === "children" && n === "noscript" || a === "class" || a === "className")) {
|
|
187
|
+
var s = a.toLowerCase();
|
|
188
|
+
a === "defaultValue" && "value" in t && t.value == null ? a = "value" : a === "download" && !0 === o ? o = "" : s === "translate" && o === "no" ? o = !1 : s[0] === "o" && s[1] === "n" ? s === "ondoubleclick" ? a = "ondblclick" : s !== "onchange" || n !== "input" && n !== "textarea" || N(t.type) ? s === "onfocus" ? a = "onfocusin" : s === "onblur" ? a = "onfocusout" : A.test(a) && (a = s) : s = a = "oninput" : i && k.test(a) ? a = a.replace(j, "-$&").toLowerCase() : o === null && (o = void 0), s === "oninput" && r[a = s] && (a = "oninputCapture"), r[a] = o;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
n == "select" && r.multiple && Array.isArray(r.value) && (r.value = u(t.children).forEach(function(e) {
|
|
192
|
+
e.props.selected = r.value.indexOf(e.props.value) != -1;
|
|
193
|
+
})), n == "select" && r.defaultValue != null && (r.value = u(t.children).forEach(function(e) {
|
|
194
|
+
e.props.selected = r.multiple ? r.defaultValue.indexOf(e.props.value) != -1 : r.defaultValue == e.props.value;
|
|
195
|
+
})), t.class && !t.className ? (r.class = t.class, Object.defineProperty(r, "className", R)) : (t.className && !t.class || t.class && t.className) && (r.class = r.className = t.className), e.props = r;
|
|
196
|
+
}(e), e.$$typeof = O, z && z(e);
|
|
197
|
+
};
|
|
198
|
+
var B = l.__r;
|
|
199
|
+
l.__r = function(e) {
|
|
200
|
+
B && B(e), e.__c;
|
|
201
|
+
};
|
|
202
|
+
var V = l.diffed;
|
|
203
|
+
l.diffed = function(e) {
|
|
204
|
+
V && V(e);
|
|
205
|
+
var t = e.props, n = e.__e;
|
|
206
|
+
n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value);
|
|
207
|
+
};
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region packages/preact/common/src/components/InfiniteScroll/InfiniteScrollWithObserver.tsx
|
|
210
|
+
function H({ children: e, pageSize: o, observerOptions: s }) {
|
|
211
|
+
let c = f(null), { query: l, response: u } = i((e) => t(e, "query", "response")), { loadMore: m } = a(o);
|
|
212
|
+
return d(() => {
|
|
213
|
+
let e, t;
|
|
214
|
+
return p(l, u) && (e = c.current, t = new IntersectionObserver((e) => {
|
|
215
|
+
e[0]?.isIntersecting && m();
|
|
216
|
+
}, s), e && t.observe(e)), () => {
|
|
217
|
+
e && t.unobserve(e);
|
|
218
|
+
};
|
|
219
|
+
}, [u]), /* @__PURE__ */ n(r, { children: [e, /* @__PURE__ */ n("div", {
|
|
220
|
+
ref: c,
|
|
221
|
+
style: { height: "1px" }
|
|
222
|
+
})] });
|
|
223
|
+
}
|
|
224
|
+
var U = v(H, e);
|
|
225
|
+
//#endregion
|
|
226
|
+
export { p as n, m as r, U as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./storage-B3FIcJQv.cjs`),t=require(`./pick-0KNFTqKn.cjs`),n=require(`./jsxRuntime.module-Ba9fccPy.cjs`),r=require(`./useLoadMore-B9LiuhfV.cjs`);let i=require(`preact`),a=require(`preact/hooks`);function o(e,t){let n=t.products?.total??0,r=e.products?.from??0,i=e.products?.size??0;return n>0&&n>r+i}function s(){return!!(window.IntersectionObserver&&window.IntersectionObserverEntry&&`intersectionRatio`in window.IntersectionObserverEntry.prototype)}function c(e,t){for(var n in t)e[n]=t[n];return e}function l(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function u(e,t){this.props=e,this.context=t}function d(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:l(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,i.createElement)(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.prototype.isReactComponent=!0,r.__f=!0,r}(u.prototype=new i.Component).isPureReactComponent=!0,u.prototype.shouldComponentUpdate=function(e,t){return l(this.props,e)||l(this.state,t)};var f=i.options.__b;i.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),f&&f(e)},typeof Symbol<`u`&&Symbol.for,i.toChildArray;var p=i.options.__e;i.options.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}p(e,t,n,r)};var m=i.options.unmount;function h(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=c({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return h(e,t,n)})),e}function g(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return g(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function _(){this.__u=0,this.o=null,this.__b=null}function v(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function y(){this.i=null,this.l=null}i.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),m&&m(e)},(_.prototype=new i.Component).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=v(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=g(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},_.prototype.componentWillUnmount=function(){this.o=[]},_.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=h(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&(0,i.createElement)(i.Fragment,null,e.fallback);return a&&(a.__u&=-33),[(0,i.createElement)(i.Fragment,null,t.__a?null:e.children),a]};var b=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(y.prototype=new i.Component).__a=function(e){var t=this,n=v(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),b(t,e,r)):i()};n?n(a):a()}},y.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,i.toChildArray)(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},y.prototype.componentDidUpdate=y.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){b(e,n,t)})};var x=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,S=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,w=/[A-Z0-9]/g,T=typeof document<`u`,E=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};i.Component.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(i.Component.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var D=i.options.event;function O(){}function k(){return this.cancelBubble}function A(){return this.defaultPrevented}i.options.event=function(e){return D&&(e=D(e)),e.persist=O,e.isPropagationStopped=k,e.isDefaultPrevented=A,e.nativeEvent=e};var j={enumerable:!1,configurable:!0,get:function(){return this.class}},M=i.options.vnode;i.options.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},a=n.indexOf(`-`)===-1;for(var o in t){var s=t[o];if(!(o===`value`&&`defaultValue`in t&&s==null||T&&o===`children`&&n===`noscript`||o===`class`||o===`className`)){var c=o.toLowerCase();o===`defaultValue`&&`value`in t&&t.value==null?o=`value`:o===`download`&&!0===s?s=``:c===`translate`&&s===`no`?s=!1:c[0]===`o`&&c[1]===`n`?c===`ondoubleclick`?o=`ondblclick`:c!==`onchange`||n!==`input`&&n!==`textarea`||E(t.type)?c===`onfocus`?o=`onfocusin`:c===`onblur`?o=`onfocusout`:C.test(o)&&(o=c):c=o=`oninput`:a&&S.test(o)?o=o.replace(w,`-$&`).toLowerCase():s===null&&(s=void 0),c===`oninput`&&r[o=c]&&(o=`oninputCapture`),r[o]=s}}n==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,i.toChildArray)(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),n==`select`&&r.defaultValue!=null&&(r.value=(0,i.toChildArray)(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,`className`,j)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=x,M&&M(e)};var N=i.options.__r;i.options.__r=function(e){N&&N(e),e.__c};var P=i.options.diffed;i.options.diffed=function(e){P&&P(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value)};function F({children:e,pageSize:s,observerOptions:c}){let l=(0,a.useRef)(null),{query:u,response:d}=r.r(e=>t.t(e,`query`,`response`)),{loadMore:f}=r.t(s);return(0,a.useEffect)(()=>{let e,t;return o(u,d)&&(e=l.current,t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&f()},c),e&&t.observe(e)),()=>{e&&t.unobserve(e)}},[d]),n.t(i.Fragment,{children:[e,n.t(`div`,{ref:l,style:{height:`1px`}})]})}var I=d(F,e.c);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return I}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useActions-boQy-Vp0.cjs`),t=require(`./baseConfig-jLd7jchq.cjs`),n=require(`./jsxRuntime.module-Ba9fccPy.cjs`);var r={...t.t,persistentSearchCache:!1,preservePageScroll:!1};function i(e={}){return{pageType:`search`,...r,...e}}function a({config:r,store:a,children:o}){let s=a??e.a();return t.n(),n.t(e.c,{value:i(r),children:n.t(e.i,{value:s,children:[n.t(t.r,{}),o]})})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { a as e, c as t, i as n } from "./useActions-BmWNZAES.js";
|
|
2
|
+
import { n as r, r as i, t as a } from "./baseConfig-Che6Adb6.js";
|
|
3
|
+
import { n as o } from "./jsxRuntime.module-BRdvPAre.js";
|
|
4
|
+
//#region packages/preact/serp/src/SerpConfig.ts
|
|
5
|
+
var s = {
|
|
6
|
+
...a,
|
|
7
|
+
persistentSearchCache: !1,
|
|
8
|
+
preservePageScroll: !1
|
|
9
|
+
};
|
|
10
|
+
function c(e = {}) {
|
|
11
|
+
return {
|
|
12
|
+
pageType: "search",
|
|
13
|
+
...s,
|
|
14
|
+
...e
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region packages/preact/serp/src/SerpPageProvider.tsx
|
|
19
|
+
function l({ config: a, store: s, children: l }) {
|
|
20
|
+
let u = s ?? e();
|
|
21
|
+
return r(), /* @__PURE__ */ o(t, {
|
|
22
|
+
value: c(a),
|
|
23
|
+
children: /* @__PURE__ */ o(n, {
|
|
24
|
+
value: u,
|
|
25
|
+
children: [/* @__PURE__ */ o(i, {}), l]
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { c as n, l as t };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { r as e } from "./index.es-jSYcbRvi.js";
|
|
2
|
+
import { s as t } from "./storage-DeAo7M3s.js";
|
|
3
|
+
import { d as n, t as r } from "./useActions-BmWNZAES.js";
|
|
4
|
+
import { n as i } from "./eventBusSubscribe-C6qT1aOO.js";
|
|
5
|
+
import { useEffect as a } from "preact/hooks";
|
|
6
|
+
//#region packages/preact/common/src/store/components/StoreActionsListener.tsx
|
|
7
|
+
function o() {
|
|
8
|
+
let { pageType: e } = n(), { newSearch: t, updateSearch: a, replaceFilter: o, toggleProductFilter: s } = r();
|
|
9
|
+
return i({
|
|
10
|
+
event: "actions/newSearch",
|
|
11
|
+
callback: ({ query: n, options: r, targetStore: i }) => {
|
|
12
|
+
e === i && t(n, r);
|
|
13
|
+
}
|
|
14
|
+
}), i({
|
|
15
|
+
event: "actions/updateSearch",
|
|
16
|
+
callback: ({ query: t, options: n, targetStore: r }) => {
|
|
17
|
+
e === r && a(t, n);
|
|
18
|
+
}
|
|
19
|
+
}), i({
|
|
20
|
+
event: "actions/replaceFilter",
|
|
21
|
+
callback: ({ field: t, value: n, targetStore: r }) => {
|
|
22
|
+
e === r && o(t, n);
|
|
23
|
+
}
|
|
24
|
+
}), i({
|
|
25
|
+
event: "actions/toggleProductFilter",
|
|
26
|
+
callback: ({ field: t, value: n, active: r, targetStore: i }) => {
|
|
27
|
+
e === i && s(t, n, r);
|
|
28
|
+
}
|
|
29
|
+
}), null;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region packages/preact/hooks/src/useCheckClientScript.tsx
|
|
33
|
+
function s() {
|
|
34
|
+
a(() => {
|
|
35
|
+
let n = window.setTimeout(() => {
|
|
36
|
+
t.error("Nosto client script has not loaded after 3 seconds.");
|
|
37
|
+
}, 3e3);
|
|
38
|
+
e(() => {
|
|
39
|
+
window.clearTimeout(n);
|
|
40
|
+
});
|
|
41
|
+
}, []);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region packages/preact/common/src/config/baseConfig.ts
|
|
45
|
+
var c = {
|
|
46
|
+
defaultCurrency: "EUR",
|
|
47
|
+
queryModifications: (e) => e
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { s as n, o as r, c as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./index.es-Ba4tuzxb.cjs`),t=require(`./storage-B3FIcJQv.cjs`),n=require(`./useActions-boQy-Vp0.cjs`),r=require(`./eventBusSubscribe-c9a_PP0j.cjs`);let i=require(`preact/hooks`);function a(){let{pageType:e}=n.d(),{newSearch:t,updateSearch:i,replaceFilter:a,toggleProductFilter:o}=n.t();return r.n({event:`actions/newSearch`,callback:({query:n,options:r,targetStore:i})=>{e===i&&t(n,r)}}),r.n({event:`actions/updateSearch`,callback:({query:t,options:n,targetStore:r})=>{e===r&&i(t,n)}}),r.n({event:`actions/replaceFilter`,callback:({field:t,value:n,targetStore:r})=>{e===r&&a(t,n)}}),r.n({event:`actions/toggleProductFilter`,callback:({field:t,value:n,active:r,targetStore:i})=>{e===i&&o(t,n,r)}}),null}function o(){(0,i.useEffect)(()=>{let n=window.setTimeout(()=>{t.s.error(`Nosto client script has not loaded after 3 seconds.`)},3e3);e.r(()=>{window.clearTimeout(n)})},[])}var s={defaultCurrency:`EUR`,queryModifications:e=>e};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(...e){return e.filter(Boolean).join(` `)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
package/dist/core/core.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../index.es-Ba4tuzxb.cjs`),t=require(`../search-BeFE0Ezr.cjs`);require(`../storage-B3FIcJQv.cjs`);async function n(t,n,r=1){await e.t(n,void 0,r),await(await new Promise(e.r)).recordSearchAddToCart(t,n)}exports.addToCart=n,exports.search=t.t;
|
package/dist/core/core.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { r as e, t } from "../index.es-jSYcbRvi.js";
|
|
2
|
+
import { t as n } from "../search-C2WGFf4C.js";
|
|
3
|
+
import "../storage-DeAo7M3s.js";
|
|
4
|
+
//#region packages/core/src/addToCart.ts
|
|
5
|
+
async function r(n, r, i = 1) {
|
|
6
|
+
await t(r, void 0, i), await (await new Promise(e)).recordSearchAddToCart(n, r);
|
|
5
7
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
p as search
|
|
9
|
-
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { r as addToCart, n as search };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../index.es-Ba4tuzxb.cjs`);var t={defaultCurrency:`EUR`,defaultLocale:`en-US`,currencySettings:{}},n={EUR:`de-DE`,GBP:`en-GB`,USD:`en-US`,AUD:`en-AU`,CAD:`en-CA`,INR:`en-IN`,AFN:`en-IN`,BDT:`en-IN`,BTN:`en-IN`,MMK:`en-IN`,NPR:`en-IN`,PKR:`en-IN`};function r(r={}){let i={...t,...r};r.currencySettings||e.r(e=>{i.currencySettings=e.internal.getSettings().currencySettings??{}});function a(e,t){let{defaultCurrency:r,currencySettings:a,defaultLocale:o}=i,s=t??r,c=n[s]??o;if(s in a){let t=a[s],n=new Intl.NumberFormat(c,{useGrouping:!!t.groupingSeparator,minimumFractionDigits:t.decimalPlaces,maximumFractionDigits:t.decimalPlaces}).formatToParts(e).map(e=>e.type===`group`?t.groupingSeparator:e.type===`decimal`?t.decimalCharacter:e.value).join(``);return t?.currencyBeforeAmount?`${t.currencyToken}${n}`:`${n}${t?.currencyToken}`}return new Intl.NumberFormat(c,{style:`currency`,currency:s}).format(e)}return{formatCurrency:a}}function i(e){let{formatCurrency:t}=r(e);function n(e,n){let r={};return e.price!==void 0&&(r.priceText=t(e.price,n)),e.listPrice!==void 0&&(r.listPriceText=t(e.listPrice,n)),Object.assign({},e,r)}function i(e){return e.price!==void 0||e.listPrice!==void 0}return function(e){if(!i(e))return e;let t=n(e,e.priceCurrencyCode);return t.skus&&t.skus.some(i)&&(t.skus=t.skus.map(t=>i(t)?n(t,e.priceCurrencyCode):t)),t}}exports.getCurrencyFormatting=r,exports.priceDecorator=i;
|
|
@@ -1,68 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
PKR: "en-IN"
|
|
1
|
+
import { r as e } from "../index.es-jSYcbRvi.js";
|
|
2
|
+
//#region packages/currencies/src/getCurrencyFormatting.ts
|
|
3
|
+
var t = {
|
|
4
|
+
defaultCurrency: "EUR",
|
|
5
|
+
defaultLocale: "en-US",
|
|
6
|
+
currencySettings: {}
|
|
7
|
+
}, n = {
|
|
8
|
+
EUR: "de-DE",
|
|
9
|
+
GBP: "en-GB",
|
|
10
|
+
USD: "en-US",
|
|
11
|
+
AUD: "en-AU",
|
|
12
|
+
CAD: "en-CA",
|
|
13
|
+
INR: "en-IN",
|
|
14
|
+
AFN: "en-IN",
|
|
15
|
+
BDT: "en-IN",
|
|
16
|
+
BTN: "en-IN",
|
|
17
|
+
MMK: "en-IN",
|
|
18
|
+
NPR: "en-IN",
|
|
19
|
+
PKR: "en-IN"
|
|
21
20
|
};
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
formatCurrency: s
|
|
47
|
-
};
|
|
21
|
+
function r(r = {}) {
|
|
22
|
+
let i = {
|
|
23
|
+
...t,
|
|
24
|
+
...r
|
|
25
|
+
};
|
|
26
|
+
r.currencySettings || e((e) => {
|
|
27
|
+
i.currencySettings = e.internal.getSettings().currencySettings ?? {};
|
|
28
|
+
});
|
|
29
|
+
function a(e, t) {
|
|
30
|
+
let { defaultCurrency: r, currencySettings: a, defaultLocale: o } = i, s = t ?? r, c = n[s] ?? o;
|
|
31
|
+
if (s in a) {
|
|
32
|
+
let t = a[s], n = new Intl.NumberFormat(c, {
|
|
33
|
+
useGrouping: !!t.groupingSeparator,
|
|
34
|
+
minimumFractionDigits: t.decimalPlaces,
|
|
35
|
+
maximumFractionDigits: t.decimalPlaces
|
|
36
|
+
}).formatToParts(e).map((e) => e.type === "group" ? t.groupingSeparator : e.type === "decimal" ? t.decimalCharacter : e.value).join("");
|
|
37
|
+
return t?.currencyBeforeAmount ? `${t.currencyToken}${n}` : `${n}${t?.currencyToken}`;
|
|
38
|
+
}
|
|
39
|
+
return new Intl.NumberFormat(c, {
|
|
40
|
+
style: "currency",
|
|
41
|
+
currency: s
|
|
42
|
+
}).format(e);
|
|
43
|
+
}
|
|
44
|
+
return { formatCurrency: a };
|
|
48
45
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region packages/currencies/src/priceDecorator.ts
|
|
48
|
+
function i(e) {
|
|
49
|
+
let { formatCurrency: t } = r(e);
|
|
50
|
+
function n(e, n) {
|
|
51
|
+
let r = {};
|
|
52
|
+
return e.price !== void 0 && (r.priceText = t(e.price, n)), e.listPrice !== void 0 && (r.listPriceText = t(e.listPrice, n)), Object.assign({}, e, r);
|
|
53
|
+
}
|
|
54
|
+
function i(e) {
|
|
55
|
+
return e.price !== void 0 || e.listPrice !== void 0;
|
|
56
|
+
}
|
|
57
|
+
return function(e) {
|
|
58
|
+
if (!i(e)) return e;
|
|
59
|
+
let t = n(e, e.priceCurrencyCode);
|
|
60
|
+
return t.skus && t.skus.some(i) && (t.skus = t.skus.map((t) => i(t) ? n(t, e.priceCurrencyCode) : t)), t;
|
|
61
|
+
};
|
|
64
62
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
S as priceDecorator
|
|
68
|
-
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { r as getCurrencyFormatting, i as priceDecorator };
|