@nosto/search-js 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{InfiniteScrollWithObserver-BOtsS3zB.cjs → InfiniteScrollWithObserver-C3ILy8X_.cjs} +1 -1
- package/dist/{InfiniteScrollWithObserver-D47sKLiT.js → InfiniteScrollWithObserver-DGZxUITY.js} +1 -1
- package/dist/baseConfig-BlLNh6Jn.cjs +1 -0
- package/dist/{baseConfig-C_tlTx1w.js → baseConfig-XyA_9NDR.js} +8 -7
- package/dist/{storeContext-jWZFJ8Kf.js → configContext-CDTtcin_.js} +19 -20
- package/dist/configContext-CGXeJcqj.cjs +1 -0
- package/dist/core/core.cjs.js +1 -1
- package/dist/core/core.es.js +1 -1
- package/dist/logger-DW5RVLX8.js +17 -0
- package/dist/logger-DbHGgDgO.cjs +1 -0
- package/dist/preact/autocomplete.cjs.js +1 -1
- package/dist/preact/autocomplete.es.js +2 -2
- package/dist/preact/category.cjs.js +1 -1
- package/dist/preact/category.es.js +2 -2
- package/dist/preact/common.cjs.js +1 -1
- package/dist/preact/common.es.js +4 -4
- package/dist/preact/hooks.cjs.js +1 -1
- package/dist/preact/hooks.es.js +3 -3
- package/dist/preact/legacy.cjs.js +1 -1
- package/dist/preact/legacy.es.js +2 -2
- package/dist/preact/serp.cjs.js +1 -1
- package/dist/preact/serp.es.js +2 -2
- package/dist/preact/src/hooks/useLoadMore/getNextPageQuery.d.ts +7 -5
- package/dist/preact/src/search/resultCaching.d.ts +8 -1
- package/dist/preact/src/search/searchWithCache.d.ts +4 -0
- package/dist/search-DJ_ktWg-.cjs +1 -0
- package/dist/search-DaZVHDP9.js +44 -0
- package/dist/unique-BCAEb4ek.cjs +1 -0
- package/dist/unique-CyAMhegX.js +44 -0
- package/dist/useLoadMore-CHLvVMm8.js +293 -0
- package/dist/useLoadMore-Co6PDmam.cjs +1 -0
- package/dist/utils/src/bindInput.d.ts +14 -0
- package/dist/utils/src/logger.d.ts +6 -0
- package/dist/utils/utils.cjs.js +1 -1
- package/dist/utils/utils.d.ts +1 -0
- package/dist/utils/utils.es.js +9 -7
- package/package.json +6 -6
- package/dist/baseConfig-DEAGSRSp.cjs +0 -1
- package/dist/search-B0-bVNMy.js +0 -43
- package/dist/search-BVJZK90N.cjs +0 -1
- package/dist/storeContext-DVs7r6Qm.cjs +0 -1
- package/dist/unique-CGVAnKZy.cjs +0 -1
- package/dist/unique-Dwtu7vXB.js +0 -44
- package/dist/useLoadMore-BbcvS5k5.js +0 -261
- package/dist/useLoadMore-VMNS8y7r.cjs +0 -1
package/dist/{InfiniteScrollWithObserver-BOtsS3zB.cjs → InfiniteScrollWithObserver-C3ILy8X_.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./jsxRuntime.module-B3sGoTIU.cjs"),p=require("./useLoadMore-
|
|
1
|
+
"use strict";const l=require("./jsxRuntime.module-B3sGoTIU.cjs"),p=require("./useLoadMore-Co6PDmam.cjs"),a=require("./pick-rYi1lc2m.cjs"),d=require("preact/hooks"),b=require("preact");function f(s,i){var o,e,r;const t=((o=i.products)==null?void 0:o.total)??0,c=((e=s.products)==null?void 0:e.from)??0,n=((r=s.products)==null?void 0:r.size)??0;return t>0&&t>c+n}function h(){return!!(window.IntersectionObserver&&window.IntersectionObserverEntry&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)}function O({children:s,pageSize:i}){const t=d.useRef(null),{query:c,response:n}=p.useNostoAppState(e=>a.pick(e,"query","response")),{loadMore:o}=p.useLoadMore(i);return d.useEffect(()=>{let e,r;return f(c,n)&&(e=t.current,r=new IntersectionObserver(v=>{const u=v[0];u!=null&&u.isIntersecting&&o()}),e&&r.observe(e)),()=>{e&&r.unobserve(e)}},[n]),l.u(b.Fragment,{children:[s,l.u("div",{ref:t,style:{height:"1px"}})]})}exports.InfiniteScrollWithObserver=O;exports.hasMoreResults=f;exports.intersectionObserverSupported=h;
|
package/dist/{InfiniteScrollWithObserver-D47sKLiT.js → InfiniteScrollWithObserver-DGZxUITY.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as f } from "./jsxRuntime.module-Bzuv3cXw.js";
|
|
2
|
-
import { u as a, a as l } from "./useLoadMore-
|
|
2
|
+
import { u as a, a as l } from "./useLoadMore-CHLvVMm8.js";
|
|
3
3
|
import { p as d } from "./pick-DReBictn.js";
|
|
4
4
|
import { useRef as m, useEffect as v } from "preact/hooks";
|
|
5
5
|
import { Fragment as b } from "preact";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./index.es-DlUp67LT.cjs"),o=require("./logger-DbHGgDgO.cjs"),i=require("preact/hooks");function s(){i.useEffect(()=>{const e=window.setTimeout(()=>{o.logger.error("Nosto client script has not loaded after 3 seconds.")},3e3);t.s(()=>{window.clearTimeout(e)})},[])}const r={defaultCurrency:"EUR",queryModifications:e=>e};exports.defaultBaseConfig=r;exports.useCheckClientScript=s;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { s as e } from "./index.es-B8mbAxS4.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { l as t } from "./logger-DW5RVLX8.js";
|
|
3
|
+
import { useEffect as r } from "preact/hooks";
|
|
4
|
+
function c() {
|
|
5
|
+
r(() => {
|
|
5
6
|
const o = window.setTimeout(() => {
|
|
6
|
-
|
|
7
|
+
t.error("Nosto client script has not loaded after 3 seconds.");
|
|
7
8
|
}, 3e3);
|
|
8
9
|
e(() => {
|
|
9
10
|
window.clearTimeout(o);
|
|
10
11
|
});
|
|
11
12
|
}, []);
|
|
12
13
|
}
|
|
13
|
-
const
|
|
14
|
+
const a = {
|
|
14
15
|
defaultCurrency: "EUR",
|
|
15
16
|
queryModifications: (o) => o
|
|
16
17
|
};
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
a as d,
|
|
20
|
+
c as u
|
|
20
21
|
};
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { createContext as c } from "preact";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const t = x(b);
|
|
6
|
-
if (!t)
|
|
7
|
-
throw new Error("useConfig must be used within a ConfigProvider");
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
function w(t, i = {}) {
|
|
2
|
+
import { b as u, i as x } from "./isEqual-BzZ3d1JM.js";
|
|
3
|
+
import { useContext as h } from "preact/hooks";
|
|
4
|
+
function b(t, i = {}) {
|
|
11
5
|
const a = /* @__PURE__ */ new Map();
|
|
12
6
|
let o = u(t, i ?? {});
|
|
13
7
|
const f = u(t, i);
|
|
@@ -29,7 +23,7 @@ function w(t, i = {}) {
|
|
|
29
23
|
let s;
|
|
30
24
|
a.set(n, (m) => {
|
|
31
25
|
const r = e(m);
|
|
32
|
-
|
|
26
|
+
x(r, s) || (s = r, n(r));
|
|
33
27
|
});
|
|
34
28
|
}
|
|
35
29
|
function S(e) {
|
|
@@ -43,21 +37,26 @@ function w(t, i = {}) {
|
|
|
43
37
|
clearOnChange: S
|
|
44
38
|
};
|
|
45
39
|
}
|
|
46
|
-
const
|
|
40
|
+
const w = {
|
|
47
41
|
loading: !0,
|
|
48
42
|
query: {},
|
|
49
43
|
response: {},
|
|
50
44
|
initialized: !1
|
|
51
45
|
};
|
|
52
|
-
function
|
|
53
|
-
return w
|
|
46
|
+
function E(t = {}) {
|
|
47
|
+
return b(w, t);
|
|
54
48
|
}
|
|
55
|
-
const
|
|
49
|
+
const v = c(E()), q = c(null), y = () => {
|
|
50
|
+
const t = h(q);
|
|
51
|
+
if (!t)
|
|
52
|
+
throw new Error("useConfig must be used within a ConfigProvider");
|
|
53
|
+
return t;
|
|
54
|
+
};
|
|
56
55
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
q as C,
|
|
57
|
+
v as S,
|
|
58
|
+
b as a,
|
|
59
|
+
E as c,
|
|
60
|
+
w as d,
|
|
61
|
+
y as u
|
|
63
62
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("preact"),i=require("./isEqual-DQXR__da.cjs"),w=require("preact/hooks");function l(e,u={}){const r=new Map;let o=i.deepMergePlain(e,u??{});const S=i.deepMergePlain(e,u);function d(t){o=t(o);for(const n of r.values())n(o)}function x(t){d(n=>({...n,...t}))}function p(){return o}function h(){return structuredClone(S)}function q(t,n){let c;r.set(n,b=>{const a=t(b);i.isEqual(a,c)||(c=a,n(a))})}function E(t){r.delete(t)}return{updateState:x,getState:p,getInitialState:h,onChange:q,clearOnChange:E}}const f={loading:!0,query:{},response:{},initialized:!1};function C(e={}){return l(f,e)}const M=s.createContext(C()),g=s.createContext(null),P=()=>{const e=w.useContext(g);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};exports.ConfigContext=g;exports.StoreContext=M;exports.createExtendableStore=l;exports.createStore=C;exports.defaultState=f;exports.useConfig=P;
|
package/dist/core/core.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.es-DlUp67LT.cjs"),o=require("../search-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.es-DlUp67LT.cjs"),o=require("../search-DJ_ktWg-.cjs");async function d(r,a,t=1){await e.L(a,void 0,t),await e.s(async c=>await c.recordSearchAddToCart(r,a))}exports.search=o.search;exports.addToCart=d;
|
package/dist/core/core.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as c, s as d } from "../index.es-B8mbAxS4.js";
|
|
2
|
-
import { s as f } from "../search-
|
|
2
|
+
import { s as f } from "../search-DaZVHDP9.js";
|
|
3
3
|
async function e(r, a, o = 1) {
|
|
4
4
|
await c(a, void 0, o), await d(async (t) => await t.recordSearchAddToCart(r, a));
|
|
5
5
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { s as g } from "./index.es-B8mbAxS4.js";
|
|
2
|
+
function r(o) {
|
|
3
|
+
return (...n) => {
|
|
4
|
+
g((e) => {
|
|
5
|
+
(e.internal.context.mode.isPreview() ? console[o] : e.internal.logger[o])(...n);
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
const c = {
|
|
10
|
+
debug: r("debug"),
|
|
11
|
+
info: r("info"),
|
|
12
|
+
warn: r("warn"),
|
|
13
|
+
error: r("error")
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
c as l
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const g=require("./index.es-DlUp67LT.cjs");function e(r){return(...n)=>{g.s(o=>{(o.internal.context.mode.isPreview()?console[r]:o.internal.logger[r])(...n)})}}const t={debug:e("debug"),info:e("info"),warn:e("warn"),error:e("error")};exports.logger=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../index.es-DlUp67LT.cjs"),a=require("preact"),u=require("../renderHeadless-xhkLegO4.cjs"),i=require("../jsxRuntime.module-B3sGoTIU.cjs"),r=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../index.es-DlUp67LT.cjs"),a=require("preact"),u=require("../renderHeadless-xhkLegO4.cjs"),i=require("../jsxRuntime.module-B3sGoTIU.cjs"),r=require("../configContext-CGXeJcqj.cjs"),c=require("../baseConfig-BlLNh6Jn.cjs");function f(e){return e!==null&&typeof e=="object"&&"props"in e&&typeof e.type=="string"}function m({children:e,hit:n}){var o;if(!f(e))throw new Error("AutocompleteElement expects a single valid HTML element as its child (e.g., <div>, <a>). Custom components are not supported.");const t=(o=e.props)==null?void 0:o.onClick;return a.cloneElement(e,{onClick:p=>{n&&l.s(s=>s.recordSearchClick("autocomplete",n)),typeof t=="function"&&t(p)}})}function g({children:e,onSearchInput:n}){return u.renderHeadless({children:e,updateElement:t=>(!u.isHTMLInput(t)||t.props.type!=="search"||(t.props={...t.props,onInput:o=>{o.target instanceof HTMLInputElement&&n(o.target)}}),t)})}const C={...c.defaultBaseConfig};function d(e){return{pageType:"autocomplete",...C,...e}}function S({config:e,store:n,children:t}){const o=n??r.createStore();return c.useCheckClientScript(),i.u(r.ConfigContext,{value:d(e),children:i.u(r.StoreContext,{value:o,children:t})})}exports.AutocompleteElement=m;exports.AutocompletePageProvider=S;exports.SearchInput=g;
|
|
@@ -2,8 +2,8 @@ import { s as u } from "../index.es-B8mbAxS4.js";
|
|
|
2
2
|
import { cloneElement as a } from "preact";
|
|
3
3
|
import { r as s, i as c } from "../renderHeadless-BteGML1G.js";
|
|
4
4
|
import { u as n } from "../jsxRuntime.module-Bzuv3cXw.js";
|
|
5
|
-
import { c as l, S as m, C as f } from "../
|
|
6
|
-
import { d as C, u as g } from "../baseConfig-
|
|
5
|
+
import { c as l, S as m, C as f } from "../configContext-CDTtcin_.js";
|
|
6
|
+
import { d as C, u as g } from "../baseConfig-XyA_9NDR.js";
|
|
7
7
|
function E(t) {
|
|
8
8
|
return t !== null && typeof t == "object" && "props" in t && typeof t.type == "string";
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../jsxRuntime.module-B3sGoTIU.cjs"),t=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../jsxRuntime.module-B3sGoTIU.cjs"),t=require("../configContext-CGXeJcqj.cjs"),o=require("../baseConfig-BlLNh6Jn.cjs"),u={...o.defaultBaseConfig,persistentSearchCache:!1,preservePageScroll:!1};function c(e){return{pageType:"category",...u,...e}}function g({config:e,store:n,children:a}){const i=n??t.createStore();return o.useCheckClientScript(),r.u(t.ConfigContext,{value:c(e),children:r.u(t.StoreContext,{value:i,children:a})})}exports.CategoryPageProvider=g;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as t } from "../jsxRuntime.module-Bzuv3cXw.js";
|
|
2
|
-
import { c as n, S as c, C as i } from "../
|
|
3
|
-
import { d as s, u as f } from "../baseConfig-
|
|
2
|
+
import { c as n, S as c, C as i } from "../configContext-CDTtcin_.js";
|
|
3
|
+
import { d as s, u as f } from "../baseConfig-XyA_9NDR.js";
|
|
4
4
|
const C = {
|
|
5
5
|
...s,
|
|
6
6
|
persistentSearchCache: !1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../unique-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../unique-BCAEb4ek.cjs"),t=require("../jsxRuntime.module-B3sGoTIU.cjs"),c=require("../useLoadMore-Co6PDmam.cjs"),p=require("../pick-rYi1lc2m.cjs"),n=require("../InfiniteScrollWithObserver-C3ILy8X_.cjs"),q=require("preact"),r=require("../configContext-CGXeJcqj.cjs");function b({pageSize:o}){const{loadMore:e}=c.useLoadMore(o);return t.u("button",{onClick:e,children:"More results"})}function u({children:o,loadMoreComponent:e,pageSize:i}){const{loading:s,query:l,response:a}=c.useNostoAppState(S=>p.pick(S,"loading","query","response")),d=!s&&n.hasMoreResults(l,a);return t.u(q.Fragment,{children:[o,d&&(e?t.u(e,{pageSize:i}):t.u(b,{pageSize:i}))]})}const M=!f.isBot()&&n.intersectionObserverSupported()?n.InfiniteScrollWithObserver:u;exports.StoreContext=r.StoreContext;exports.createExtendableStore=r.createExtendableStore;exports.createStore=r.createStore;exports.defaultState=r.defaultState;exports.InfiniteScroll=M;exports.InfiniteScrollWithLink=u;
|
package/dist/preact/common.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as l } from "../unique-
|
|
1
|
+
import { i as l } from "../unique-CyAMhegX.js";
|
|
2
2
|
import { u as r } from "../jsxRuntime.module-Bzuv3cXw.js";
|
|
3
|
-
import { a as p, u as m } from "../useLoadMore-
|
|
3
|
+
import { a as p, u as m } from "../useLoadMore-CHLvVMm8.js";
|
|
4
4
|
import { p as u } from "../pick-DReBictn.js";
|
|
5
|
-
import { h as d, i as f, I as S } from "../InfiniteScrollWithObserver-
|
|
5
|
+
import { h as d, i as f, I as S } from "../InfiniteScrollWithObserver-DGZxUITY.js";
|
|
6
6
|
import { Fragment as h } from "preact";
|
|
7
|
-
import { S as O, a as W, c as A, d as B } from "../
|
|
7
|
+
import { S as O, a as W, c as A, d as B } from "../configContext-CDTtcin_.js";
|
|
8
8
|
function M({ pageSize: e }) {
|
|
9
9
|
const { loadMore: o } = p(e);
|
|
10
10
|
return /* @__PURE__ */ r("button", { onClick: o, children: "More results" });
|
package/dist/preact/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../useLoadMore-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../useLoadMore-Co6PDmam.cjs"),P=require("../isEqual-DQXR__da.cjs"),v=require("preact/hooks"),q=require("../index.es-DlUp67LT.cjs"),N=require("../parseNumber-FsZ8w61u.cjs");function C(e){const o=m.useNostoAppState(t=>t.response);return e&&Array.isArray(e)||e&&P.isPlainObject(e)?e:o}function z(e){var a;const o=((a=e.data)==null?void 0:a.filter(c=>c.selected).length)??0,[t,n]=v.useState(o>0),{toggleProductFilter:u}=m.useActions();return{active:t,selectedFiltersCount:o,toggleActive:()=>{n(!t)},toggleProductFilter:u}}function x(){const{loading:e,facets:o}=m.useNostoAppState(t=>{var n,u;return{loading:t.loading,facets:((u=(n=t.response)==null?void 0:n.products)==null?void 0:u.facets)??[]}});return{loading:e,facets:o}}function k(e,o){const t=o-e;return!isNaN(t)&&t>0?new Array(o-e).fill(void 0).map((n,u)=>u+e):[]}function w(e){const{query:o,products:t}=m.useNostoAppState(n=>({query:n.query,products:n.response.products}));return v.useMemo(()=>{var F;if(!t)return{totalPages:0,resultsFrom:0,resultsTo:0,pages:[]};const n=((F=o.products)==null?void 0:F.from)??0,u=(e==null?void 0:e.width)??1/0,i=Math.max(Math.floor(u-1)/2,1),a=t.size>0?Math.floor(n/t.size)+1:1,c=t.size>0?Math.ceil(t.total/t.size):0,g=A=>A>=a-i&&A<=a+i,s=n+1,l=Math.min(n+t.total,t.total),r={from:n,page:a,current:!0},p=A=>({from:(A-1)*t.size,page:A,current:A===a}),S=a>1?p(a-1):void 0,d=a<c?p(a+1):void 0,y=i===1/0||a-i-1>1?p(1):void 0,f=i===1/0||a+i+1<c?p(c):void 0,h=k(1,c+1).filter(g).map(p);return{totalPages:c,resultsFrom:s,resultsTo:l,current:r,prev:S,next:d,first:y,last:f,pages:h}},[o,t,e==null?void 0:e.width])}function T(){const[e,o]=v.useState([]),[t,n]=v.useState([]);return v.useEffect(()=>{q.s(async u=>{const{products:i,segments:a}=await u.getSearchSessionParams();o(a??[]),n((i==null?void 0:i.personalizationBoost)??[])})},[]),{segments:e,boost:t}}function B(){const{facets:e}=m.useNostoAppState(s=>{var l;return{facets:((l=s.response.products)==null?void 0:l.facets)??[]}}),{replaceFilter:o,toggleProductFilter:t}=m.useActions(),n=v.useCallback(s=>{const l=e==null?void 0:e.find(r=>r.type==="stats"&&r.field===s);if(l&&"min"in l&&"max"in l)return l},[e]),u=v.useCallback(s=>{var l;return((l=e==null?void 0:e.find(r=>r.field===s))==null?void 0:l.name)??s},[e]),i=v.useCallback(s=>"field"in s&&(s.value instanceof Array||s.range instanceof Array),[]),a=v.useCallback(s=>{var l;return{...s,range:(l=s.range)==null?void 0:l.map(r=>({gt:r.gt?Number(r.gt):r.gt,gte:r.gte?Number(r.gte):r.gte,lt:r.lt?Number(r.lt):r.lt,lte:r.lte?Number(r.lte):r.lte}))}},[]),c=v.useCallback(s=>(s.value??[]).map(r=>({value:r,field:s.field,name:u(s.field),filter:a(s),remove:()=>{t(s.field,r,!1)}})),[a,u,t]),g=v.useCallback(s=>(s.range??[]).map(r=>{var d,y;const p=r.gte??r.gt??((d=n(s.field))==null?void 0:d.min),S=r.lte??r.lt??((y=n(s.field))==null?void 0:y.max);if(p!==void 0&&S!==void 0)return{value:`${p} - ${S}`,field:s.field,name:u(s.field),filter:a(s),remove:()=>{o(s.field,void 0)}}}).filter(Boolean),[a,n,u,o]);return{selectFilters:i,toValueFilter:c,toRangeFilter:g}}function M(){const{filter:e}=m.useNostoAppState(c=>{var g;return{filter:((g=c.query.products)==null?void 0:g.filter)??[]}}),{updateSearch:o}=m.useActions(),{selectFilters:t,toValueFilter:n,toRangeFilter:u}=B(),i=v.useMemo(()=>e?e.filter(t).flatMap(c=>"value"in c?n(c):"range"in c?u(c):[]).filter(Boolean):[],[e,t,u,n]),a=v.useCallback(()=>{o({products:{filter:[]}})},[o]);return{filters:i,removeAll:a}}function R(e){var r,p,S;const{replaceFilter:o}=m.useActions(),{query:t,products:n}=m.useNostoAppState(d=>({query:d.query,products:d.response.products})),u=(r=n==null?void 0:n.facets)==null?void 0:r.find(d=>d.id===e);if(!u)return{min:0,max:0,range:[0,0],updateRange:()=>{}};const i=(S=(p=t.products)==null?void 0:p.filter)==null?void 0:S.find(d=>d.field===u.field),a=i!=null&&i.range?i.range[0]:void 0,c=typeof a=="object"&&("gte"in a||"lte"in a)?[N.parseNumber(a.gte),N.parseNumber(a.lte)]:[void 0,void 0],g="min"in u?Math.floor(u.min):0,s="max"in u?Math.ceil(u.max):0,l=([d,y])=>{const f=d!==void 0?Math.floor(d):void 0,h=y!==void 0?Math.ceil(y):void 0,F=f!==void 0,A=h!==void 0;(g===f||!F)&&(s===h||!A)?o(u.field,void 0):(g===f||!F)&&A?o(u.field,{lte:h.toString()}):(s===h||!A)&&F?o(u.field,{gte:f.toString()}):F&&A&&o(u.field,{gte:f.toString(),lte:h.toString()})};return{min:g,max:s,range:[c[0]??g,c[1]??s],updateRange:l}}function D(e,o){const{min:t,max:n,range:u,updateRange:i}=R(e),{filters:a}=M(),c=v.useMemo(()=>{var y;const r=a.find(f=>{var h;return(h=f==null?void 0:f.filter)==null?void 0:h.range});let p=null;if(r){const f=(y=r.filter.range)==null?void 0:y[0];p=[N.parseNumber(f==null?void 0:f.gte),N.parseNumber(f==null?void 0:f.lte)]}const S=[];let d=Math.floor(t/o)*o;for(;d<n;){const f=d+o,h=p&&p[0]===d&&p[1]===f;S.push({min:d,max:f,selected:h}),d=f}return S},[a,t,n,o]),g=r=>{i([r,u[1]])},s=r=>{i([u[0],r])},l=t!==u[0]||n!==u[1];return{min:t,max:n,range:u,updateRange:i,ranges:c,handleMinChange:g,handleMaxChange:s,isSelected:l}}function j(){const{products:e,keywords:o}=m.useNostoAppState(t=>t.response);return{products:e??{hits:[],total:0},keywords:o??{hits:[],total:0}}}function I(){const e=m.useNostoAppState(t=>{var n;return(n=t.query.products)==null?void 0:n.filter});return v.useMemo(()=>e?e.reduce((t,n)=>t+(Array.isArray(n.value)?n.value.length:1),0):0,[e])}function b(e){return e&&!Number.isNaN(e)?e:0}function L(e,o){const{from:t,size:n,total:u}=m.useNostoAppState(s=>{var l,r,p,S,d;return{from:b(((l=s.query.products)==null?void 0:l.from)??0),size:b(((p=(r=s.response)==null?void 0:r.products)==null?void 0:p.size)??0),total:b(((d=(S=s.response)==null?void 0:S.products)==null?void 0:d.total)??0)}}),{updateSearch:i}=m.useActions(),a=t+n,c=[...e].reverse().filter(s=>s+o<u);return{from:t,to:a,total:u,size:n,sizeOptions:c,handleSizeChange:s=>{i({products:{size:N.parseNumber(s)}})}}}function O(e,o){return e.length!==o.length?!1:e.every(t=>o.find(n=>t.field===n.field&&t.order===n.order))}function V(e){var i,a;const o=m.useNostoAppState(c=>c.query),{updateSearch:t}=m.useActions();return{activeSort:((i=e.find(c=>{var g;return O(c.value.sort,((g=o.products)==null?void 0:g.sort)||[])}))==null?void 0:i.id)??((a=e[0])==null?void 0:a.id),setSort:c=>{const g=e.find(s=>s.id===c);g&&t({products:{sort:g.value.sort}})}}}exports.useActions=m.useActions;exports.useLoadMore=m.useLoadMore;exports.useNostoAppState=m.useNostoAppState;exports.useDecoratedSearchResults=C;exports.useFacet=z;exports.useFacets=x;exports.usePagination=w;exports.usePersonalization=T;exports.useProductFilters=M;exports.useRange=R;exports.useRangeSelector=D;exports.useResponse=j;exports.useSelectedFiltersCount=I;exports.useSizeOptions=L;exports.useSort=V;
|
package/dist/preact/hooks.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as F, b as R } from "../useLoadMore-
|
|
2
|
-
import { a as Y } from "../useLoadMore-
|
|
1
|
+
import { u as F, b as R } from "../useLoadMore-CHLvVMm8.js";
|
|
2
|
+
import { a as Y } from "../useLoadMore-CHLvVMm8.js";
|
|
3
3
|
import { a as N } from "../isEqual-BzZ3d1JM.js";
|
|
4
4
|
import { useState as P, useMemo as z, useEffect as b, useCallback as M } from "preact/hooks";
|
|
5
5
|
import { s as q } from "../index.es-B8mbAxS4.js";
|
|
@@ -301,7 +301,7 @@ function K(e, o) {
|
|
|
301
301
|
handleSizeChange: (n) => {
|
|
302
302
|
a({
|
|
303
303
|
products: {
|
|
304
|
-
size: n
|
|
304
|
+
size: x(n)
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../InfiniteScrollWithObserver-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../InfiniteScrollWithObserver-C3ILy8X_.cjs"),r=require("../useLoadMore-Co6PDmam.cjs");exports.InfiniteScrollWithObserver=e.InfiniteScrollWithObserver;exports.intersectionObserverSupported=e.intersectionObserverSupported;exports.getNextPageQuery=r.getNextPageQuery;
|
package/dist/preact/legacy.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as t, i as o } from "../InfiniteScrollWithObserver-
|
|
2
|
-
import { g as s } from "../useLoadMore-
|
|
1
|
+
import { I as t, i as o } from "../InfiniteScrollWithObserver-DGZxUITY.js";
|
|
2
|
+
import { g as s } from "../useLoadMore-CHLvVMm8.js";
|
|
3
3
|
export {
|
|
4
4
|
t as InfiniteScrollWithObserver,
|
|
5
5
|
s as getNextPageQuery,
|
package/dist/preact/serp.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../index.es-DlUp67LT.cjs"),s=require("../configContext-CGXeJcqj.cjs"),S=require("../renderHeadless-xhkLegO4.cjs"),a=require("../jsxRuntime.module-B3sGoTIU.cjs"),i=require("../baseConfig-BlLNh6Jn.cjs"),g="nosto:search:scrollPos";function d(){window.sessionStorage.setItem(g,window.scrollY.toString())}function C({children:e,hit:t,onClick:o}){const{pageType:r}=s.useConfig(),c=r==="autocomplete"?void 0:r==="search"?"serp":r;return S.renderHeadless({children:e,updateElement:(n,u)=>(u.depth>0||(n.props={...n.props,onClick:l=>{t&&c&&p.s(f=>f.recordSearchClick(c,t)),d(),typeof o=="function"&&o(l)}}),n)})}const h={...i.defaultBaseConfig,persistentSearchCache:!1,preservePageScroll:!1};function m(e={}){return{pageType:"search",...h,...e}}function P({config:e,store:t,children:o}){const r=t??s.createStore();return i.useCheckClientScript(),a.u(s.ConfigContext,{value:m(e),children:a.u(s.StoreContext,{value:r,children:o})})}exports.SearchPageProvider=P;exports.SerpElement=C;
|
package/dist/preact/serp.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as l } from "../index.es-B8mbAxS4.js";
|
|
2
|
-
import { u as f, c as u, S, C as m } from "../
|
|
2
|
+
import { u as f, c as u, S, C as m } from "../configContext-CDTtcin_.js";
|
|
3
3
|
import { r as g } from "../renderHeadless-BteGML1G.js";
|
|
4
4
|
import { u as n } from "../jsxRuntime.module-Bzuv3cXw.js";
|
|
5
|
-
import { d as C, u as d } from "../baseConfig-
|
|
5
|
+
import { d as C, u as d } from "../baseConfig-XyA_9NDR.js";
|
|
6
6
|
const h = "nosto:search:scrollPos";
|
|
7
7
|
function P() {
|
|
8
8
|
window.sessionStorage.setItem(h, window.scrollY.toString());
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
* Function to calculate the new query values for loading more products
|
|
3
|
-
*/
|
|
4
|
-
export declare function getNextPageQuery({ from, size, pageSize }: {
|
|
1
|
+
type NextPageQueryProps = {
|
|
5
2
|
from: number;
|
|
6
3
|
size: number;
|
|
7
4
|
pageSize: number;
|
|
8
|
-
}
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Function to calculate the new query values for loading more products
|
|
8
|
+
*/
|
|
9
|
+
export declare function getNextPageQuery({ from, size, pageSize }: NextPageQueryProps): {
|
|
9
10
|
products: {
|
|
10
11
|
from: number;
|
|
11
12
|
size?: undefined;
|
|
@@ -16,3 +17,4 @@ export declare function getNextPageQuery({ from, size, pageSize }: {
|
|
|
16
17
|
from?: undefined;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
20
|
+
export {};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { SearchQuery, SearchResult } from '@nosto/nosto-js/client';
|
|
2
2
|
export declare const STORAGE_ENTRY_NAME = "nosto:search:searchResult";
|
|
3
|
+
export type SearchResultDto = {
|
|
4
|
+
query: ReturnType<typeof getCacheKey>;
|
|
5
|
+
result: SearchResult;
|
|
6
|
+
};
|
|
3
7
|
export declare function cacheSearchResult(usePersistentCache: boolean, query: SearchQuery, result: SearchResult): void;
|
|
4
|
-
export declare function loadCachedResultIfApplicable(usePersistentCache: boolean, query: SearchQuery):
|
|
8
|
+
export declare function loadCachedResultIfApplicable(usePersistentCache: boolean, query: SearchQuery): SearchResultDto | null;
|
|
9
|
+
declare function getCacheKey(query: SearchQuery): SearchQuery;
|
|
10
|
+
export declare function isValueShapeCorrect(value: unknown): value is SearchResultDto;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SearchOptions } from '../../../core/src/types';
|
|
2
|
+
import { SearchQuery } from '@nosto/nosto-js/client';
|
|
3
|
+
import { Config } from '../config/config';
|
|
4
|
+
export declare function searchWithCache(config: Config, searchQuery: SearchQuery, options: SearchOptions): Promise<import('@nosto/nosto-js/client').SearchResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./index.es-DlUp67LT.cjs"),a=require("./logger-DbHGgDgO.cjs");function o(t,e){if(!t.products||!(e!=null&&e.length))return t;const r=n=>e.reduce((u,i)=>i(u),n);return{...t,products:{...t.products,hits:t.products.hits.map(r)}}}function f(t){return new Promise(e=>setTimeout(e,t))}async function h(t,e,r){const{maxRetries:n=0,retryInterval:u=1e3}=r;let i=0;for(;;)try{return await t.search(e,r)}catch(c){if(!l(c))throw a.logger.info("Skipping retry logic for",c),c;if(i>=n)throw c;i++,await f(u)}}function l(t){return!t||typeof t!="object"?!1:!("status"in t)||y(t.status)}function y(t){return typeof t=="number"&&(t<400||t>=500)}async function w(t,e={}){const{hitDecorators:r,...n}=e,u=await new Promise(s.s),i=await h(u,t,n);return o(i,r)}exports.search=w;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { s as a } from "./index.es-B8mbAxS4.js";
|
|
2
|
+
import { l as s } from "./logger-DW5RVLX8.js";
|
|
3
|
+
function o(t, r) {
|
|
4
|
+
if (!t.products || !(r != null && r.length))
|
|
5
|
+
return t;
|
|
6
|
+
const e = (n) => r.reduce((u, i) => i(u), n);
|
|
7
|
+
return {
|
|
8
|
+
...t,
|
|
9
|
+
products: {
|
|
10
|
+
...t.products,
|
|
11
|
+
hits: t.products.hits.map(e)
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function f(t) {
|
|
16
|
+
return new Promise((r) => setTimeout(r, t));
|
|
17
|
+
}
|
|
18
|
+
async function l(t, r, e) {
|
|
19
|
+
const { maxRetries: n = 0, retryInterval: u = 1e3 } = e;
|
|
20
|
+
let i = 0;
|
|
21
|
+
for (; ; )
|
|
22
|
+
try {
|
|
23
|
+
return await t.search(r, e);
|
|
24
|
+
} catch (c) {
|
|
25
|
+
if (!h(c))
|
|
26
|
+
throw s.info("Skipping retry logic for", c), c;
|
|
27
|
+
if (i >= n)
|
|
28
|
+
throw c;
|
|
29
|
+
i++, await f(u);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function h(t) {
|
|
33
|
+
return !t || typeof t != "object" ? !1 : !("status" in t) || m(t.status);
|
|
34
|
+
}
|
|
35
|
+
function m(t) {
|
|
36
|
+
return typeof t == "number" && (t < 400 || t >= 500);
|
|
37
|
+
}
|
|
38
|
+
async function w(t, r = {}) {
|
|
39
|
+
const { hitDecorators: e, ...n } = r, u = await new Promise(a), i = await l(u, t, n);
|
|
40
|
+
return o(i, e);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
w as s
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var s=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/",i=/bot|crawl|http|lighthouse|scan|search|spider/i,t;function c(){if(t instanceof RegExp)return t;try{t=new RegExp(s,"i")}catch{t=i}return t}function d(e){return!!e&&c().test(e)}function u(){return d(navigator.userAgent)}function l(...e){if(!e.every(r=>r==null))return e.filter(r=>Array.isArray(r)).reduce((r,a)=>r.concat(a),[])}const n="nosto.search.";function p(e){var a;const r=`${n}${e}`;(a=window.performance)==null||a.mark(`${r}.start`)}function m(e){var a,o;const r=`${n}${e}`;(a=window.performance)==null||a.mark(`${r}.end`),(o=window.performance)==null||o.measure(r,`${r}.start`,`${r}.end`)}function h(e){return p(e),()=>m(e)}function w(e){return Array.from(new Set(e))}exports.isBot=u;exports.measure=h;exports.mergeArrays=l;exports.unique=w;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var s = " daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/", i = /bot|crawl|http|lighthouse|scan|search|spider/i, t;
|
|
2
|
+
function c() {
|
|
3
|
+
if (t instanceof RegExp)
|
|
4
|
+
return t;
|
|
5
|
+
try {
|
|
6
|
+
t = new RegExp(s, "i");
|
|
7
|
+
} catch {
|
|
8
|
+
t = i;
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
function d(e) {
|
|
13
|
+
return !!e && c().test(e);
|
|
14
|
+
}
|
|
15
|
+
function u() {
|
|
16
|
+
return d(navigator.userAgent);
|
|
17
|
+
}
|
|
18
|
+
function m(...e) {
|
|
19
|
+
if (!e.every((r) => r == null))
|
|
20
|
+
return e.filter((r) => Array.isArray(r)).reduce((r, a) => r.concat(a), []);
|
|
21
|
+
}
|
|
22
|
+
const n = "nosto.search.";
|
|
23
|
+
function l(e) {
|
|
24
|
+
var a;
|
|
25
|
+
const r = `${n}${e}`;
|
|
26
|
+
(a = window.performance) == null || a.mark(`${r}.start`);
|
|
27
|
+
}
|
|
28
|
+
function p(e) {
|
|
29
|
+
var a, o;
|
|
30
|
+
const r = `${n}${e}`;
|
|
31
|
+
(a = window.performance) == null || a.mark(`${r}.end`), (o = window.performance) == null || o.measure(r, `${r}.start`, `${r}.end`);
|
|
32
|
+
}
|
|
33
|
+
function h(e) {
|
|
34
|
+
return l(e), () => p(e);
|
|
35
|
+
}
|
|
36
|
+
function w(e) {
|
|
37
|
+
return Array.from(new Set(e));
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
h as a,
|
|
41
|
+
u as i,
|
|
42
|
+
m,
|
|
43
|
+
w as u
|
|
44
|
+
};
|