@getlupa/client 1.10.3 → 1.11.1
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/lupaSearch.iife.js +965 -239
- package/dist/lupaSearch.js +965 -239
- package/dist/lupaSearch.mjs +965 -239
- package/dist/lupaSearch.umd.js +965 -239
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/lupaSearch.umd.js
CHANGED
|
@@ -106,6 +106,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
106
106
|
const n = parseFloat(val);
|
|
107
107
|
return isNaN(n) ? val : n;
|
|
108
108
|
};
|
|
109
|
+
const toNumber = (val) => {
|
|
110
|
+
const n = isString(val) ? Number(val) : NaN;
|
|
111
|
+
return isNaN(n) ? val : n;
|
|
112
|
+
};
|
|
109
113
|
let _globalThis;
|
|
110
114
|
const getGlobalThis = () => {
|
|
111
115
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
@@ -2004,6 +2008,319 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2004
2008
|
}
|
|
2005
2009
|
}
|
|
2006
2010
|
}
|
|
2011
|
+
function useTransitionState() {
|
|
2012
|
+
const state = {
|
|
2013
|
+
isMounted: false,
|
|
2014
|
+
isLeaving: false,
|
|
2015
|
+
isUnmounting: false,
|
|
2016
|
+
leavingVNodes: /* @__PURE__ */ new Map()
|
|
2017
|
+
};
|
|
2018
|
+
onMounted(() => {
|
|
2019
|
+
state.isMounted = true;
|
|
2020
|
+
});
|
|
2021
|
+
onBeforeUnmount(() => {
|
|
2022
|
+
state.isUnmounting = true;
|
|
2023
|
+
});
|
|
2024
|
+
return state;
|
|
2025
|
+
}
|
|
2026
|
+
const TransitionHookValidator = [Function, Array];
|
|
2027
|
+
const BaseTransitionPropsValidators = {
|
|
2028
|
+
mode: String,
|
|
2029
|
+
appear: Boolean,
|
|
2030
|
+
persisted: Boolean,
|
|
2031
|
+
// enter
|
|
2032
|
+
onBeforeEnter: TransitionHookValidator,
|
|
2033
|
+
onEnter: TransitionHookValidator,
|
|
2034
|
+
onAfterEnter: TransitionHookValidator,
|
|
2035
|
+
onEnterCancelled: TransitionHookValidator,
|
|
2036
|
+
// leave
|
|
2037
|
+
onBeforeLeave: TransitionHookValidator,
|
|
2038
|
+
onLeave: TransitionHookValidator,
|
|
2039
|
+
onAfterLeave: TransitionHookValidator,
|
|
2040
|
+
onLeaveCancelled: TransitionHookValidator,
|
|
2041
|
+
// appear
|
|
2042
|
+
onBeforeAppear: TransitionHookValidator,
|
|
2043
|
+
onAppear: TransitionHookValidator,
|
|
2044
|
+
onAfterAppear: TransitionHookValidator,
|
|
2045
|
+
onAppearCancelled: TransitionHookValidator
|
|
2046
|
+
};
|
|
2047
|
+
const BaseTransitionImpl = {
|
|
2048
|
+
name: `BaseTransition`,
|
|
2049
|
+
props: BaseTransitionPropsValidators,
|
|
2050
|
+
setup(props, { slots }) {
|
|
2051
|
+
const instance = getCurrentInstance();
|
|
2052
|
+
const state = useTransitionState();
|
|
2053
|
+
let prevTransitionKey;
|
|
2054
|
+
return () => {
|
|
2055
|
+
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
2056
|
+
if (!children || !children.length) {
|
|
2057
|
+
return;
|
|
2058
|
+
}
|
|
2059
|
+
let child = children[0];
|
|
2060
|
+
if (children.length > 1) {
|
|
2061
|
+
for (const c2 of children) {
|
|
2062
|
+
if (c2.type !== Comment) {
|
|
2063
|
+
child = c2;
|
|
2064
|
+
break;
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
const rawProps = toRaw(props);
|
|
2069
|
+
const { mode } = rawProps;
|
|
2070
|
+
if (state.isLeaving) {
|
|
2071
|
+
return emptyPlaceholder(child);
|
|
2072
|
+
}
|
|
2073
|
+
const innerChild = getKeepAliveChild(child);
|
|
2074
|
+
if (!innerChild) {
|
|
2075
|
+
return emptyPlaceholder(child);
|
|
2076
|
+
}
|
|
2077
|
+
const enterHooks = resolveTransitionHooks(
|
|
2078
|
+
innerChild,
|
|
2079
|
+
rawProps,
|
|
2080
|
+
state,
|
|
2081
|
+
instance
|
|
2082
|
+
);
|
|
2083
|
+
setTransitionHooks(innerChild, enterHooks);
|
|
2084
|
+
const oldChild = instance.subTree;
|
|
2085
|
+
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
2086
|
+
let transitionKeyChanged = false;
|
|
2087
|
+
const { getTransitionKey } = innerChild.type;
|
|
2088
|
+
if (getTransitionKey) {
|
|
2089
|
+
const key = getTransitionKey();
|
|
2090
|
+
if (prevTransitionKey === void 0) {
|
|
2091
|
+
prevTransitionKey = key;
|
|
2092
|
+
} else if (key !== prevTransitionKey) {
|
|
2093
|
+
prevTransitionKey = key;
|
|
2094
|
+
transitionKeyChanged = true;
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
2098
|
+
const leavingHooks = resolveTransitionHooks(
|
|
2099
|
+
oldInnerChild,
|
|
2100
|
+
rawProps,
|
|
2101
|
+
state,
|
|
2102
|
+
instance
|
|
2103
|
+
);
|
|
2104
|
+
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
2105
|
+
if (mode === "out-in") {
|
|
2106
|
+
state.isLeaving = true;
|
|
2107
|
+
leavingHooks.afterLeave = () => {
|
|
2108
|
+
state.isLeaving = false;
|
|
2109
|
+
if (instance.update.active !== false) {
|
|
2110
|
+
instance.update();
|
|
2111
|
+
}
|
|
2112
|
+
};
|
|
2113
|
+
return emptyPlaceholder(child);
|
|
2114
|
+
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
2115
|
+
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
2116
|
+
const leavingVNodesCache = getLeavingNodesForType(
|
|
2117
|
+
state,
|
|
2118
|
+
oldInnerChild
|
|
2119
|
+
);
|
|
2120
|
+
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
2121
|
+
el._leaveCb = () => {
|
|
2122
|
+
earlyRemove();
|
|
2123
|
+
el._leaveCb = void 0;
|
|
2124
|
+
delete enterHooks.delayedLeave;
|
|
2125
|
+
};
|
|
2126
|
+
enterHooks.delayedLeave = delayedLeave;
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
return child;
|
|
2131
|
+
};
|
|
2132
|
+
}
|
|
2133
|
+
};
|
|
2134
|
+
const BaseTransition = BaseTransitionImpl;
|
|
2135
|
+
function getLeavingNodesForType(state, vnode) {
|
|
2136
|
+
const { leavingVNodes } = state;
|
|
2137
|
+
let leavingVNodesCache = leavingVNodes.get(vnode.type);
|
|
2138
|
+
if (!leavingVNodesCache) {
|
|
2139
|
+
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
|
|
2140
|
+
leavingVNodes.set(vnode.type, leavingVNodesCache);
|
|
2141
|
+
}
|
|
2142
|
+
return leavingVNodesCache;
|
|
2143
|
+
}
|
|
2144
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
2145
|
+
const {
|
|
2146
|
+
appear,
|
|
2147
|
+
mode,
|
|
2148
|
+
persisted = false,
|
|
2149
|
+
onBeforeEnter,
|
|
2150
|
+
onEnter,
|
|
2151
|
+
onAfterEnter,
|
|
2152
|
+
onEnterCancelled,
|
|
2153
|
+
onBeforeLeave,
|
|
2154
|
+
onLeave,
|
|
2155
|
+
onAfterLeave,
|
|
2156
|
+
onLeaveCancelled,
|
|
2157
|
+
onBeforeAppear,
|
|
2158
|
+
onAppear,
|
|
2159
|
+
onAfterAppear,
|
|
2160
|
+
onAppearCancelled
|
|
2161
|
+
} = props;
|
|
2162
|
+
const key = String(vnode.key);
|
|
2163
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
2164
|
+
const callHook2 = (hook, args) => {
|
|
2165
|
+
hook && callWithAsyncErrorHandling(
|
|
2166
|
+
hook,
|
|
2167
|
+
instance,
|
|
2168
|
+
9,
|
|
2169
|
+
args
|
|
2170
|
+
);
|
|
2171
|
+
};
|
|
2172
|
+
const callAsyncHook = (hook, args) => {
|
|
2173
|
+
const done = args[1];
|
|
2174
|
+
callHook2(hook, args);
|
|
2175
|
+
if (isArray(hook)) {
|
|
2176
|
+
if (hook.every((hook2) => hook2.length <= 1))
|
|
2177
|
+
done();
|
|
2178
|
+
} else if (hook.length <= 1) {
|
|
2179
|
+
done();
|
|
2180
|
+
}
|
|
2181
|
+
};
|
|
2182
|
+
const hooks = {
|
|
2183
|
+
mode,
|
|
2184
|
+
persisted,
|
|
2185
|
+
beforeEnter(el) {
|
|
2186
|
+
let hook = onBeforeEnter;
|
|
2187
|
+
if (!state.isMounted) {
|
|
2188
|
+
if (appear) {
|
|
2189
|
+
hook = onBeforeAppear || onBeforeEnter;
|
|
2190
|
+
} else {
|
|
2191
|
+
return;
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
if (el._leaveCb) {
|
|
2195
|
+
el._leaveCb(
|
|
2196
|
+
true
|
|
2197
|
+
/* cancelled */
|
|
2198
|
+
);
|
|
2199
|
+
}
|
|
2200
|
+
const leavingVNode = leavingVNodesCache[key];
|
|
2201
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {
|
|
2202
|
+
leavingVNode.el._leaveCb();
|
|
2203
|
+
}
|
|
2204
|
+
callHook2(hook, [el]);
|
|
2205
|
+
},
|
|
2206
|
+
enter(el) {
|
|
2207
|
+
let hook = onEnter;
|
|
2208
|
+
let afterHook = onAfterEnter;
|
|
2209
|
+
let cancelHook = onEnterCancelled;
|
|
2210
|
+
if (!state.isMounted) {
|
|
2211
|
+
if (appear) {
|
|
2212
|
+
hook = onAppear || onEnter;
|
|
2213
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
2214
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
2215
|
+
} else {
|
|
2216
|
+
return;
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
let called = false;
|
|
2220
|
+
const done = el._enterCb = (cancelled) => {
|
|
2221
|
+
if (called)
|
|
2222
|
+
return;
|
|
2223
|
+
called = true;
|
|
2224
|
+
if (cancelled) {
|
|
2225
|
+
callHook2(cancelHook, [el]);
|
|
2226
|
+
} else {
|
|
2227
|
+
callHook2(afterHook, [el]);
|
|
2228
|
+
}
|
|
2229
|
+
if (hooks.delayedLeave) {
|
|
2230
|
+
hooks.delayedLeave();
|
|
2231
|
+
}
|
|
2232
|
+
el._enterCb = void 0;
|
|
2233
|
+
};
|
|
2234
|
+
if (hook) {
|
|
2235
|
+
callAsyncHook(hook, [el, done]);
|
|
2236
|
+
} else {
|
|
2237
|
+
done();
|
|
2238
|
+
}
|
|
2239
|
+
},
|
|
2240
|
+
leave(el, remove2) {
|
|
2241
|
+
const key2 = String(vnode.key);
|
|
2242
|
+
if (el._enterCb) {
|
|
2243
|
+
el._enterCb(
|
|
2244
|
+
true
|
|
2245
|
+
/* cancelled */
|
|
2246
|
+
);
|
|
2247
|
+
}
|
|
2248
|
+
if (state.isUnmounting) {
|
|
2249
|
+
return remove2();
|
|
2250
|
+
}
|
|
2251
|
+
callHook2(onBeforeLeave, [el]);
|
|
2252
|
+
let called = false;
|
|
2253
|
+
const done = el._leaveCb = (cancelled) => {
|
|
2254
|
+
if (called)
|
|
2255
|
+
return;
|
|
2256
|
+
called = true;
|
|
2257
|
+
remove2();
|
|
2258
|
+
if (cancelled) {
|
|
2259
|
+
callHook2(onLeaveCancelled, [el]);
|
|
2260
|
+
} else {
|
|
2261
|
+
callHook2(onAfterLeave, [el]);
|
|
2262
|
+
}
|
|
2263
|
+
el._leaveCb = void 0;
|
|
2264
|
+
if (leavingVNodesCache[key2] === vnode) {
|
|
2265
|
+
delete leavingVNodesCache[key2];
|
|
2266
|
+
}
|
|
2267
|
+
};
|
|
2268
|
+
leavingVNodesCache[key2] = vnode;
|
|
2269
|
+
if (onLeave) {
|
|
2270
|
+
callAsyncHook(onLeave, [el, done]);
|
|
2271
|
+
} else {
|
|
2272
|
+
done();
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2275
|
+
clone(vnode2) {
|
|
2276
|
+
return resolveTransitionHooks(vnode2, props, state, instance);
|
|
2277
|
+
}
|
|
2278
|
+
};
|
|
2279
|
+
return hooks;
|
|
2280
|
+
}
|
|
2281
|
+
function emptyPlaceholder(vnode) {
|
|
2282
|
+
if (isKeepAlive(vnode)) {
|
|
2283
|
+
vnode = cloneVNode(vnode);
|
|
2284
|
+
vnode.children = null;
|
|
2285
|
+
return vnode;
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
function getKeepAliveChild(vnode) {
|
|
2289
|
+
return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;
|
|
2290
|
+
}
|
|
2291
|
+
function setTransitionHooks(vnode, hooks) {
|
|
2292
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
2293
|
+
setTransitionHooks(vnode.component.subTree, hooks);
|
|
2294
|
+
} else if (vnode.shapeFlag & 128) {
|
|
2295
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
2296
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
2297
|
+
} else {
|
|
2298
|
+
vnode.transition = hooks;
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
2302
|
+
let ret = [];
|
|
2303
|
+
let keyedFragmentCount = 0;
|
|
2304
|
+
for (let i = 0; i < children.length; i++) {
|
|
2305
|
+
let child = children[i];
|
|
2306
|
+
const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
|
|
2307
|
+
if (child.type === Fragment) {
|
|
2308
|
+
if (child.patchFlag & 128)
|
|
2309
|
+
keyedFragmentCount++;
|
|
2310
|
+
ret = ret.concat(
|
|
2311
|
+
getTransitionRawChildren(child.children, keepComment, key)
|
|
2312
|
+
);
|
|
2313
|
+
} else if (keepComment || child.type !== Comment) {
|
|
2314
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
if (keyedFragmentCount > 1) {
|
|
2318
|
+
for (let i = 0; i < ret.length; i++) {
|
|
2319
|
+
ret[i].patchFlag = -2;
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
return ret;
|
|
2323
|
+
}
|
|
2007
2324
|
function defineComponent(options, extraOptions) {
|
|
2008
2325
|
return isFunction(options) ? (
|
|
2009
2326
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -2375,7 +2692,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2375
2692
|
const ctx = instance.ctx;
|
|
2376
2693
|
shouldCacheAccess = false;
|
|
2377
2694
|
if (options.beforeCreate) {
|
|
2378
|
-
callHook(options.beforeCreate, instance, "bc");
|
|
2695
|
+
callHook$1(options.beforeCreate, instance, "bc");
|
|
2379
2696
|
}
|
|
2380
2697
|
const {
|
|
2381
2698
|
// state
|
|
@@ -2462,7 +2779,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2462
2779
|
});
|
|
2463
2780
|
}
|
|
2464
2781
|
if (created) {
|
|
2465
|
-
callHook(created, instance, "c");
|
|
2782
|
+
callHook$1(created, instance, "c");
|
|
2466
2783
|
}
|
|
2467
2784
|
function registerLifecycleHook(register, hook) {
|
|
2468
2785
|
if (isArray(hook)) {
|
|
@@ -2540,7 +2857,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2540
2857
|
}
|
|
2541
2858
|
}
|
|
2542
2859
|
}
|
|
2543
|
-
function callHook(hook, instance, type) {
|
|
2860
|
+
function callHook$1(hook, instance, type) {
|
|
2544
2861
|
callWithAsyncErrorHandling(
|
|
2545
2862
|
isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
|
|
2546
2863
|
instance,
|
|
@@ -5042,6 +5359,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
5042
5359
|
return instance;
|
|
5043
5360
|
}
|
|
5044
5361
|
let currentInstance = null;
|
|
5362
|
+
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
5045
5363
|
let internalSetCurrentInstance;
|
|
5046
5364
|
let globalCurrentInstanceSetters;
|
|
5047
5365
|
let settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
@@ -5572,6 +5890,268 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
5572
5890
|
}
|
|
5573
5891
|
return key in el;
|
|
5574
5892
|
}
|
|
5893
|
+
const TRANSITION = "transition";
|
|
5894
|
+
const ANIMATION = "animation";
|
|
5895
|
+
const Transition = (props, { slots }) => h$1(BaseTransition, resolveTransitionProps(props), slots);
|
|
5896
|
+
Transition.displayName = "Transition";
|
|
5897
|
+
const DOMTransitionPropsValidators = {
|
|
5898
|
+
name: String,
|
|
5899
|
+
type: String,
|
|
5900
|
+
css: {
|
|
5901
|
+
type: Boolean,
|
|
5902
|
+
default: true
|
|
5903
|
+
},
|
|
5904
|
+
duration: [String, Number, Object],
|
|
5905
|
+
enterFromClass: String,
|
|
5906
|
+
enterActiveClass: String,
|
|
5907
|
+
enterToClass: String,
|
|
5908
|
+
appearFromClass: String,
|
|
5909
|
+
appearActiveClass: String,
|
|
5910
|
+
appearToClass: String,
|
|
5911
|
+
leaveFromClass: String,
|
|
5912
|
+
leaveActiveClass: String,
|
|
5913
|
+
leaveToClass: String
|
|
5914
|
+
};
|
|
5915
|
+
Transition.props = /* @__PURE__ */ extend(
|
|
5916
|
+
{},
|
|
5917
|
+
BaseTransitionPropsValidators,
|
|
5918
|
+
DOMTransitionPropsValidators
|
|
5919
|
+
);
|
|
5920
|
+
const callHook = (hook, args = []) => {
|
|
5921
|
+
if (isArray(hook)) {
|
|
5922
|
+
hook.forEach((h2) => h2(...args));
|
|
5923
|
+
} else if (hook) {
|
|
5924
|
+
hook(...args);
|
|
5925
|
+
}
|
|
5926
|
+
};
|
|
5927
|
+
const hasExplicitCallback = (hook) => {
|
|
5928
|
+
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
5929
|
+
};
|
|
5930
|
+
function resolveTransitionProps(rawProps) {
|
|
5931
|
+
const baseProps = {};
|
|
5932
|
+
for (const key in rawProps) {
|
|
5933
|
+
if (!(key in DOMTransitionPropsValidators)) {
|
|
5934
|
+
baseProps[key] = rawProps[key];
|
|
5935
|
+
}
|
|
5936
|
+
}
|
|
5937
|
+
if (rawProps.css === false) {
|
|
5938
|
+
return baseProps;
|
|
5939
|
+
}
|
|
5940
|
+
const {
|
|
5941
|
+
name = "v",
|
|
5942
|
+
type,
|
|
5943
|
+
duration,
|
|
5944
|
+
enterFromClass = `${name}-enter-from`,
|
|
5945
|
+
enterActiveClass = `${name}-enter-active`,
|
|
5946
|
+
enterToClass = `${name}-enter-to`,
|
|
5947
|
+
appearFromClass = enterFromClass,
|
|
5948
|
+
appearActiveClass = enterActiveClass,
|
|
5949
|
+
appearToClass = enterToClass,
|
|
5950
|
+
leaveFromClass = `${name}-leave-from`,
|
|
5951
|
+
leaveActiveClass = `${name}-leave-active`,
|
|
5952
|
+
leaveToClass = `${name}-leave-to`
|
|
5953
|
+
} = rawProps;
|
|
5954
|
+
const durations = normalizeDuration(duration);
|
|
5955
|
+
const enterDuration = durations && durations[0];
|
|
5956
|
+
const leaveDuration = durations && durations[1];
|
|
5957
|
+
const {
|
|
5958
|
+
onBeforeEnter,
|
|
5959
|
+
onEnter,
|
|
5960
|
+
onEnterCancelled,
|
|
5961
|
+
onLeave,
|
|
5962
|
+
onLeaveCancelled,
|
|
5963
|
+
onBeforeAppear = onBeforeEnter,
|
|
5964
|
+
onAppear = onEnter,
|
|
5965
|
+
onAppearCancelled = onEnterCancelled
|
|
5966
|
+
} = baseProps;
|
|
5967
|
+
const finishEnter = (el, isAppear, done) => {
|
|
5968
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
5969
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
5970
|
+
done && done();
|
|
5971
|
+
};
|
|
5972
|
+
const finishLeave = (el, done) => {
|
|
5973
|
+
el._isLeaving = false;
|
|
5974
|
+
removeTransitionClass(el, leaveFromClass);
|
|
5975
|
+
removeTransitionClass(el, leaveToClass);
|
|
5976
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
5977
|
+
done && done();
|
|
5978
|
+
};
|
|
5979
|
+
const makeEnterHook = (isAppear) => {
|
|
5980
|
+
return (el, done) => {
|
|
5981
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
5982
|
+
const resolve2 = () => finishEnter(el, isAppear, done);
|
|
5983
|
+
callHook(hook, [el, resolve2]);
|
|
5984
|
+
nextFrame(() => {
|
|
5985
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
5986
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
5987
|
+
if (!hasExplicitCallback(hook)) {
|
|
5988
|
+
whenTransitionEnds(el, type, enterDuration, resolve2);
|
|
5989
|
+
}
|
|
5990
|
+
});
|
|
5991
|
+
};
|
|
5992
|
+
};
|
|
5993
|
+
return extend(baseProps, {
|
|
5994
|
+
onBeforeEnter(el) {
|
|
5995
|
+
callHook(onBeforeEnter, [el]);
|
|
5996
|
+
addTransitionClass(el, enterFromClass);
|
|
5997
|
+
addTransitionClass(el, enterActiveClass);
|
|
5998
|
+
},
|
|
5999
|
+
onBeforeAppear(el) {
|
|
6000
|
+
callHook(onBeforeAppear, [el]);
|
|
6001
|
+
addTransitionClass(el, appearFromClass);
|
|
6002
|
+
addTransitionClass(el, appearActiveClass);
|
|
6003
|
+
},
|
|
6004
|
+
onEnter: makeEnterHook(false),
|
|
6005
|
+
onAppear: makeEnterHook(true),
|
|
6006
|
+
onLeave(el, done) {
|
|
6007
|
+
el._isLeaving = true;
|
|
6008
|
+
const resolve2 = () => finishLeave(el, done);
|
|
6009
|
+
addTransitionClass(el, leaveFromClass);
|
|
6010
|
+
forceReflow();
|
|
6011
|
+
addTransitionClass(el, leaveActiveClass);
|
|
6012
|
+
nextFrame(() => {
|
|
6013
|
+
if (!el._isLeaving) {
|
|
6014
|
+
return;
|
|
6015
|
+
}
|
|
6016
|
+
removeTransitionClass(el, leaveFromClass);
|
|
6017
|
+
addTransitionClass(el, leaveToClass);
|
|
6018
|
+
if (!hasExplicitCallback(onLeave)) {
|
|
6019
|
+
whenTransitionEnds(el, type, leaveDuration, resolve2);
|
|
6020
|
+
}
|
|
6021
|
+
});
|
|
6022
|
+
callHook(onLeave, [el, resolve2]);
|
|
6023
|
+
},
|
|
6024
|
+
onEnterCancelled(el) {
|
|
6025
|
+
finishEnter(el, false);
|
|
6026
|
+
callHook(onEnterCancelled, [el]);
|
|
6027
|
+
},
|
|
6028
|
+
onAppearCancelled(el) {
|
|
6029
|
+
finishEnter(el, true);
|
|
6030
|
+
callHook(onAppearCancelled, [el]);
|
|
6031
|
+
},
|
|
6032
|
+
onLeaveCancelled(el) {
|
|
6033
|
+
finishLeave(el);
|
|
6034
|
+
callHook(onLeaveCancelled, [el]);
|
|
6035
|
+
}
|
|
6036
|
+
});
|
|
6037
|
+
}
|
|
6038
|
+
function normalizeDuration(duration) {
|
|
6039
|
+
if (duration == null) {
|
|
6040
|
+
return null;
|
|
6041
|
+
} else if (isObject(duration)) {
|
|
6042
|
+
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
6043
|
+
} else {
|
|
6044
|
+
const n = NumberOf(duration);
|
|
6045
|
+
return [n, n];
|
|
6046
|
+
}
|
|
6047
|
+
}
|
|
6048
|
+
function NumberOf(val) {
|
|
6049
|
+
const res = toNumber(val);
|
|
6050
|
+
return res;
|
|
6051
|
+
}
|
|
6052
|
+
function addTransitionClass(el, cls) {
|
|
6053
|
+
cls.split(/\s+/).forEach((c2) => c2 && el.classList.add(c2));
|
|
6054
|
+
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
6055
|
+
}
|
|
6056
|
+
function removeTransitionClass(el, cls) {
|
|
6057
|
+
cls.split(/\s+/).forEach((c2) => c2 && el.classList.remove(c2));
|
|
6058
|
+
const { _vtc } = el;
|
|
6059
|
+
if (_vtc) {
|
|
6060
|
+
_vtc.delete(cls);
|
|
6061
|
+
if (!_vtc.size) {
|
|
6062
|
+
el._vtc = void 0;
|
|
6063
|
+
}
|
|
6064
|
+
}
|
|
6065
|
+
}
|
|
6066
|
+
function nextFrame(cb) {
|
|
6067
|
+
requestAnimationFrame(() => {
|
|
6068
|
+
requestAnimationFrame(cb);
|
|
6069
|
+
});
|
|
6070
|
+
}
|
|
6071
|
+
let endId = 0;
|
|
6072
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
|
|
6073
|
+
const id = el._endId = ++endId;
|
|
6074
|
+
const resolveIfNotStale = () => {
|
|
6075
|
+
if (id === el._endId) {
|
|
6076
|
+
resolve2();
|
|
6077
|
+
}
|
|
6078
|
+
};
|
|
6079
|
+
if (explicitTimeout) {
|
|
6080
|
+
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
6081
|
+
}
|
|
6082
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
6083
|
+
if (!type) {
|
|
6084
|
+
return resolve2();
|
|
6085
|
+
}
|
|
6086
|
+
const endEvent = type + "end";
|
|
6087
|
+
let ended = 0;
|
|
6088
|
+
const end = () => {
|
|
6089
|
+
el.removeEventListener(endEvent, onEnd);
|
|
6090
|
+
resolveIfNotStale();
|
|
6091
|
+
};
|
|
6092
|
+
const onEnd = (e) => {
|
|
6093
|
+
if (e.target === el && ++ended >= propCount) {
|
|
6094
|
+
end();
|
|
6095
|
+
}
|
|
6096
|
+
};
|
|
6097
|
+
setTimeout(() => {
|
|
6098
|
+
if (ended < propCount) {
|
|
6099
|
+
end();
|
|
6100
|
+
}
|
|
6101
|
+
}, timeout + 1);
|
|
6102
|
+
el.addEventListener(endEvent, onEnd);
|
|
6103
|
+
}
|
|
6104
|
+
function getTransitionInfo(el, expectedType) {
|
|
6105
|
+
const styles = window.getComputedStyle(el);
|
|
6106
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
6107
|
+
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
6108
|
+
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
6109
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
6110
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
6111
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
6112
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
6113
|
+
let type = null;
|
|
6114
|
+
let timeout = 0;
|
|
6115
|
+
let propCount = 0;
|
|
6116
|
+
if (expectedType === TRANSITION) {
|
|
6117
|
+
if (transitionTimeout > 0) {
|
|
6118
|
+
type = TRANSITION;
|
|
6119
|
+
timeout = transitionTimeout;
|
|
6120
|
+
propCount = transitionDurations.length;
|
|
6121
|
+
}
|
|
6122
|
+
} else if (expectedType === ANIMATION) {
|
|
6123
|
+
if (animationTimeout > 0) {
|
|
6124
|
+
type = ANIMATION;
|
|
6125
|
+
timeout = animationTimeout;
|
|
6126
|
+
propCount = animationDurations.length;
|
|
6127
|
+
}
|
|
6128
|
+
} else {
|
|
6129
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
6130
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
6131
|
+
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
6132
|
+
}
|
|
6133
|
+
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
6134
|
+
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
6135
|
+
);
|
|
6136
|
+
return {
|
|
6137
|
+
type,
|
|
6138
|
+
timeout,
|
|
6139
|
+
propCount,
|
|
6140
|
+
hasTransform
|
|
6141
|
+
};
|
|
6142
|
+
}
|
|
6143
|
+
function getTimeout(delays, durations) {
|
|
6144
|
+
while (delays.length < durations.length) {
|
|
6145
|
+
delays = delays.concat(delays);
|
|
6146
|
+
}
|
|
6147
|
+
return Math.max(...durations.map((d2, i) => toMs(d2) + toMs(delays[i])));
|
|
6148
|
+
}
|
|
6149
|
+
function toMs(s) {
|
|
6150
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
6151
|
+
}
|
|
6152
|
+
function forceReflow() {
|
|
6153
|
+
return document.body.offsetHeight;
|
|
6154
|
+
}
|
|
5575
6155
|
const getModelAssigner = (vnode) => {
|
|
5576
6156
|
const fn = vnode.props["onUpdate:modelValue"] || false;
|
|
5577
6157
|
return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
|
|
@@ -7867,7 +8447,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
7867
8447
|
resetHighlightIndex
|
|
7868
8448
|
};
|
|
7869
8449
|
});
|
|
7870
|
-
const _hoisted_1$
|
|
8450
|
+
const _hoisted_1$1e = { id: "lupa-search-box-input-container" };
|
|
7871
8451
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
7872
8452
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
7873
8453
|
const _hoisted_4$s = ["value"];
|
|
@@ -7876,7 +8456,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
7876
8456
|
key: 0,
|
|
7877
8457
|
class: "lupa-close-label"
|
|
7878
8458
|
};
|
|
7879
|
-
const _sfc_main$
|
|
8459
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
7880
8460
|
__name: "SearchBoxInput",
|
|
7881
8461
|
props: {
|
|
7882
8462
|
options: {},
|
|
@@ -7957,7 +8537,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
7957
8537
|
};
|
|
7958
8538
|
__expose({ focus });
|
|
7959
8539
|
return (_ctx, _cache) => {
|
|
7960
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8540
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1e, [
|
|
7961
8541
|
createBaseVNode("div", _hoisted_2$P, [
|
|
7962
8542
|
createBaseVNode("div", {
|
|
7963
8543
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
@@ -7999,7 +8579,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
7999
8579
|
};
|
|
8000
8580
|
}
|
|
8001
8581
|
});
|
|
8002
|
-
const _sfc_main$
|
|
8582
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
8003
8583
|
__name: "SearchBoxMoreResults",
|
|
8004
8584
|
props: {
|
|
8005
8585
|
labels: {},
|
|
@@ -8031,9 +8611,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8031
8611
|
};
|
|
8032
8612
|
}
|
|
8033
8613
|
});
|
|
8034
|
-
const _hoisted_1$
|
|
8614
|
+
const _hoisted_1$1d = { class: "lupa-search-box-history-item" };
|
|
8035
8615
|
const _hoisted_2$O = { class: "lupa-search-box-history-item-content" };
|
|
8036
|
-
const _sfc_main$
|
|
8616
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
8037
8617
|
__name: "SearchBoxHistoryItem",
|
|
8038
8618
|
props: {
|
|
8039
8619
|
item: {},
|
|
@@ -8049,7 +8629,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8049
8629
|
emit2("click", { query: props.item });
|
|
8050
8630
|
};
|
|
8051
8631
|
return (_ctx, _cache) => {
|
|
8052
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8632
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1d, [
|
|
8053
8633
|
createBaseVNode("div", _hoisted_2$O, [
|
|
8054
8634
|
createBaseVNode("div", {
|
|
8055
8635
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
@@ -8064,11 +8644,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8064
8644
|
};
|
|
8065
8645
|
}
|
|
8066
8646
|
});
|
|
8067
|
-
const _hoisted_1$
|
|
8647
|
+
const _hoisted_1$1c = {
|
|
8068
8648
|
key: 0,
|
|
8069
8649
|
class: "lupa-search-box-history-panel"
|
|
8070
8650
|
};
|
|
8071
|
-
const _sfc_main$
|
|
8651
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
8072
8652
|
__name: "SearchBoxHistoryPanel",
|
|
8073
8653
|
props: {
|
|
8074
8654
|
options: {}
|
|
@@ -8109,9 +8689,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8109
8689
|
}
|
|
8110
8690
|
};
|
|
8111
8691
|
return (_ctx, _cache) => {
|
|
8112
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8692
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1c, [
|
|
8113
8693
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
|
|
8114
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8694
|
+
return openBlock(), createBlock(_sfc_main$1k, {
|
|
8115
8695
|
key: item,
|
|
8116
8696
|
item,
|
|
8117
8697
|
highlighted: index === highlightIndex.value,
|
|
@@ -8127,19 +8707,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8127
8707
|
};
|
|
8128
8708
|
}
|
|
8129
8709
|
});
|
|
8130
|
-
const _hoisted_1$
|
|
8131
|
-
const _sfc_main$
|
|
8710
|
+
const _hoisted_1$1b = { class: "lupa-search-box-no-results" };
|
|
8711
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
8132
8712
|
__name: "SearchBoxNoResults",
|
|
8133
8713
|
props: {
|
|
8134
8714
|
labels: {}
|
|
8135
8715
|
},
|
|
8136
8716
|
setup(__props) {
|
|
8137
8717
|
return (_ctx, _cache) => {
|
|
8138
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
8718
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1b, toDisplayString(_ctx.labels.noResults), 1);
|
|
8139
8719
|
};
|
|
8140
8720
|
}
|
|
8141
8721
|
});
|
|
8142
|
-
const _hoisted_1$
|
|
8722
|
+
const _hoisted_1$1a = ["innerHTML"];
|
|
8143
8723
|
const _hoisted_2$N = {
|
|
8144
8724
|
key: 1,
|
|
8145
8725
|
"data-cy": "lupa-suggestion-value",
|
|
@@ -8158,7 +8738,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8158
8738
|
class: "lupa-suggestion-facet-value",
|
|
8159
8739
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8160
8740
|
};
|
|
8161
|
-
const _sfc_main$
|
|
8741
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
8162
8742
|
__name: "SearchBoxSuggestion",
|
|
8163
8743
|
props: {
|
|
8164
8744
|
suggestion: {},
|
|
@@ -8194,7 +8774,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8194
8774
|
class: "lupa-suggestion-value",
|
|
8195
8775
|
"data-cy": "lupa-suggestion-value",
|
|
8196
8776
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8197
|
-
}, null, 8, _hoisted_1$
|
|
8777
|
+
}, null, 8, _hoisted_1$1a)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8198
8778
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8199
8779
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8200
8780
|
createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
@@ -8203,11 +8783,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8203
8783
|
};
|
|
8204
8784
|
}
|
|
8205
8785
|
});
|
|
8206
|
-
const _hoisted_1$
|
|
8786
|
+
const _hoisted_1$19 = {
|
|
8207
8787
|
id: "lupa-search-box-suggestions",
|
|
8208
8788
|
"data-cy": "lupa-search-box-suggestions"
|
|
8209
8789
|
};
|
|
8210
|
-
const _sfc_main$
|
|
8790
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
8211
8791
|
__name: "SearchBoxSuggestions",
|
|
8212
8792
|
props: {
|
|
8213
8793
|
items: {},
|
|
@@ -8267,9 +8847,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8267
8847
|
});
|
|
8268
8848
|
});
|
|
8269
8849
|
return (_ctx, _cache) => {
|
|
8270
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8850
|
+
return openBlock(), createElementBlock("div", _hoisted_1$19, [
|
|
8271
8851
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
8272
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8852
|
+
return openBlock(), createBlock(_sfc_main$1h, {
|
|
8273
8853
|
key: getSuggestionKey(item),
|
|
8274
8854
|
class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
|
|
8275
8855
|
suggestion: item,
|
|
@@ -8297,7 +8877,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8297
8877
|
}, timeout);
|
|
8298
8878
|
};
|
|
8299
8879
|
};
|
|
8300
|
-
const _sfc_main$
|
|
8880
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
8301
8881
|
__name: "SearchBoxSuggestionsWrapper",
|
|
8302
8882
|
props: {
|
|
8303
8883
|
panel: {},
|
|
@@ -8338,7 +8918,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8338
8918
|
};
|
|
8339
8919
|
const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
|
|
8340
8920
|
return (_ctx, _cache) => {
|
|
8341
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8921
|
+
return openBlock(), createBlock(_sfc_main$1g, {
|
|
8342
8922
|
items: searchResult.value,
|
|
8343
8923
|
highlight: _ctx.panel.highlight,
|
|
8344
8924
|
queryKey: _ctx.panel.queryKey,
|
|
@@ -8426,8 +9006,23 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8426
9006
|
}
|
|
8427
9007
|
return (_c = (_b = (_a = parts == null ? void 0 : parts.map((part) => part.replace(/(^\/+|\/+$)/g, ""))) == null ? void 0 : _a.filter((part) => part !== "")) == null ? void 0 : _b.join("/")) != null ? _c : "";
|
|
8428
9008
|
};
|
|
8429
|
-
const
|
|
8430
|
-
const
|
|
9009
|
+
const checkHasFullImageUrl = (imageUrl) => typeof imageUrl === "string" && (imageUrl.indexOf("http://") === 0 || imageUrl.indexOf("https://") === 0);
|
|
9010
|
+
const computeImageUrl = (imageUrl, rootImageUrl) => {
|
|
9011
|
+
const mainUrl = Array.isArray(imageUrl) ? imageUrl[0] : imageUrl;
|
|
9012
|
+
if (checkHasFullImageUrl(mainUrl)) {
|
|
9013
|
+
return mainUrl;
|
|
9014
|
+
}
|
|
9015
|
+
return rootImageUrl ? joinUrlParts(rootImageUrl, mainUrl) : `/${mainUrl}`;
|
|
9016
|
+
};
|
|
9017
|
+
const replaceImageWithPlaceholder = (e, placeholder) => {
|
|
9018
|
+
var _a;
|
|
9019
|
+
const targetImage = e == null ? void 0 : e.target;
|
|
9020
|
+
if (targetImage && !((_a = targetImage == null ? void 0 : targetImage.src) == null ? void 0 : _a.includes(placeholder))) {
|
|
9021
|
+
targetImage.src = placeholder;
|
|
9022
|
+
}
|
|
9023
|
+
};
|
|
9024
|
+
const _hoisted_1$18 = ["src"];
|
|
9025
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
8431
9026
|
__name: "ProductImage",
|
|
8432
9027
|
props: {
|
|
8433
9028
|
item: {},
|
|
@@ -8437,33 +9032,73 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8437
9032
|
},
|
|
8438
9033
|
setup(__props) {
|
|
8439
9034
|
const props = __props;
|
|
9035
|
+
const isHover = ref(false);
|
|
9036
|
+
const hoverImageIndex = ref(0);
|
|
9037
|
+
const hoverInterval = ref(0);
|
|
8440
9038
|
const rootImageUrl = computed(() => props.options.baseUrl);
|
|
8441
9039
|
const image = computed(() => props.item[props.options.key]);
|
|
8442
9040
|
const hasFullImageUrl = computed(() => {
|
|
8443
|
-
|
|
8444
|
-
return typeof imageUrl2 === "string" && (imageUrl2.indexOf("http://") === 0 || imageUrl2.indexOf("https://") === 0);
|
|
9041
|
+
return checkHasFullImageUrl(image.value);
|
|
8445
9042
|
});
|
|
8446
9043
|
const imageUrl = computed(() => {
|
|
8447
|
-
|
|
8448
|
-
if (hasFullImageUrl.value) {
|
|
8449
|
-
return imageUrl2;
|
|
8450
|
-
}
|
|
8451
|
-
return rootImageUrl.value ? joinUrlParts(rootImageUrl.value, imageUrl2) : `/${imageUrl2}`;
|
|
9044
|
+
return computeImageUrl(image.value, rootImageUrl.value);
|
|
8452
9045
|
});
|
|
8453
9046
|
const hasImage = computed(() => Boolean(hasFullImageUrl.value || image.value));
|
|
8454
9047
|
const placeholder = computed(() => props.options.placeholder);
|
|
8455
|
-
const
|
|
9048
|
+
const finalMainImageUrl = computed(() => {
|
|
8456
9049
|
if (props.options.customUrl) {
|
|
8457
9050
|
return props.options.customUrl(props.item);
|
|
8458
9051
|
}
|
|
8459
9052
|
return hasImage.value ? imageUrl.value : placeholder.value;
|
|
8460
9053
|
});
|
|
8461
|
-
const
|
|
9054
|
+
const hoverImages = computed(() => {
|
|
9055
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
9056
|
+
if ((_a = props.options.hoverImages) == null ? void 0 : _a.key) {
|
|
9057
|
+
return (_g = (_f = (_e = props.item[(_b = props.options.hoverImages) == null ? void 0 : _b.key]) == null ? void 0 : _e.slice(0, (_d = (_c = props.options.hoverImages) == null ? void 0 : _c.maxImages) != null ? _d : 5)) == null ? void 0 : _f.map((i) => computeImageUrl(i, rootImageUrl.value))) != null ? _g : [];
|
|
9058
|
+
}
|
|
9059
|
+
if (props.options.hoverImages) {
|
|
9060
|
+
return (_l = (_k = (_h = props.options.hoverImages) == null ? void 0 : _h.display(props.item)) == null ? void 0 : _k.slice(0, (_j = (_i = props.options.hoverImages) == null ? void 0 : _i.maxImages) != null ? _j : 5)) != null ? _l : [];
|
|
9061
|
+
}
|
|
9062
|
+
return [];
|
|
9063
|
+
});
|
|
9064
|
+
const hasHoverImages = computed(() => {
|
|
8462
9065
|
var _a;
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
9066
|
+
return Boolean((_a = hoverImages.value) == null ? void 0 : _a.length);
|
|
9067
|
+
});
|
|
9068
|
+
const replaceWithPlaceholder = (e) => {
|
|
9069
|
+
replaceImageWithPlaceholder(e, placeholder.value);
|
|
9070
|
+
};
|
|
9071
|
+
const setNextHoverImage = () => {
|
|
9072
|
+
hoverImageIndex.value = (hoverImageIndex.value + 1) % hoverImages.value.length;
|
|
9073
|
+
};
|
|
9074
|
+
const currentHoverImage = computed(() => {
|
|
9075
|
+
return hoverImages.value[hoverImageIndex.value];
|
|
9076
|
+
});
|
|
9077
|
+
const finalUrl = computed(() => {
|
|
9078
|
+
return isHover.value ? currentHoverImage.value : finalMainImageUrl.value;
|
|
9079
|
+
});
|
|
9080
|
+
const handleMouseEnter = () => {
|
|
9081
|
+
var _a, _b;
|
|
9082
|
+
if (!hasHoverImages.value) {
|
|
9083
|
+
return;
|
|
9084
|
+
}
|
|
9085
|
+
isHover.value = true;
|
|
9086
|
+
hoverImageIndex.value = 0;
|
|
9087
|
+
if (hoverInterval.value) {
|
|
9088
|
+
return;
|
|
8466
9089
|
}
|
|
9090
|
+
hoverInterval.value = setInterval(
|
|
9091
|
+
setNextHoverImage,
|
|
9092
|
+
(_b = (_a = props.options.hoverImages) == null ? void 0 : _a.cycleInterval) != null ? _b : 2e3
|
|
9093
|
+
);
|
|
9094
|
+
};
|
|
9095
|
+
const handleMouseLeave = () => {
|
|
9096
|
+
if (!hasHoverImages.value) {
|
|
9097
|
+
return;
|
|
9098
|
+
}
|
|
9099
|
+
isHover.value = false;
|
|
9100
|
+
clearInterval(hoverInterval.value);
|
|
9101
|
+
hoverInterval.value = 0;
|
|
8467
9102
|
};
|
|
8468
9103
|
const imageAlt = computed(() => {
|
|
8469
9104
|
const alt = props.options.alt;
|
|
@@ -8472,20 +9107,48 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8472
9107
|
}
|
|
8473
9108
|
return "";
|
|
8474
9109
|
});
|
|
9110
|
+
const preloadImages = (images) => {
|
|
9111
|
+
images.forEach((src) => {
|
|
9112
|
+
const img = new Image();
|
|
9113
|
+
img.src = src;
|
|
9114
|
+
});
|
|
9115
|
+
};
|
|
9116
|
+
onMounted(() => {
|
|
9117
|
+
if (hasHoverImages.value) {
|
|
9118
|
+
preloadImages(hoverImages.value);
|
|
9119
|
+
}
|
|
9120
|
+
});
|
|
9121
|
+
watch(hoverImages, (newImages) => {
|
|
9122
|
+
if (newImages.length) {
|
|
9123
|
+
preloadImages(newImages);
|
|
9124
|
+
}
|
|
9125
|
+
});
|
|
9126
|
+
onBeforeUnmount(() => {
|
|
9127
|
+
clearInterval(hoverInterval.value);
|
|
9128
|
+
});
|
|
8475
9129
|
return (_ctx, _cache) => {
|
|
8476
|
-
var _a, _b;
|
|
8477
9130
|
return openBlock(), createElementBlock("div", {
|
|
8478
|
-
class: normalizeClass(
|
|
9131
|
+
class: normalizeClass({ [_ctx.wrapperClass]: Boolean(_ctx.wrapperClass), "lupa-images-hover": isHover.value }),
|
|
9132
|
+
onMouseenter: handleMouseEnter,
|
|
9133
|
+
onMouseleave: handleMouseLeave
|
|
8479
9134
|
}, [
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
9135
|
+
createVNode(Transition, { name: "lupa-fade" }, {
|
|
9136
|
+
default: withCtx(() => [
|
|
9137
|
+
(openBlock(), createElementBlock("img", mergeProps({
|
|
9138
|
+
class: ["lupa-images-hover-image", { [_ctx.imageClass]: true, "lupa-images-hover-image": isHover.value }],
|
|
9139
|
+
src: finalUrl.value
|
|
9140
|
+
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
9141
|
+
onError: replaceWithPlaceholder,
|
|
9142
|
+
key: finalUrl.value
|
|
9143
|
+
}), null, 16, _hoisted_1$18))
|
|
9144
|
+
]),
|
|
9145
|
+
_: 1
|
|
9146
|
+
})
|
|
9147
|
+
], 34);
|
|
8485
9148
|
};
|
|
8486
9149
|
}
|
|
8487
9150
|
});
|
|
8488
|
-
const _sfc_main$
|
|
9151
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
8489
9152
|
__name: "SearchBoxProductImage",
|
|
8490
9153
|
props: {
|
|
8491
9154
|
item: {},
|
|
@@ -8493,7 +9156,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8493
9156
|
},
|
|
8494
9157
|
setup(__props) {
|
|
8495
9158
|
return (_ctx, _cache) => {
|
|
8496
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9159
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
8497
9160
|
item: _ctx.item,
|
|
8498
9161
|
options: _ctx.options,
|
|
8499
9162
|
"wrapper-class": "lupa-search-box-image-wrapper",
|
|
@@ -8502,12 +9165,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8502
9165
|
};
|
|
8503
9166
|
}
|
|
8504
9167
|
});
|
|
8505
|
-
const _hoisted_1$
|
|
9168
|
+
const _hoisted_1$17 = ["innerHTML"];
|
|
8506
9169
|
const _hoisted_2$M = {
|
|
8507
9170
|
key: 1,
|
|
8508
9171
|
class: "lupa-search-box-product-title"
|
|
8509
9172
|
};
|
|
8510
|
-
const _sfc_main$
|
|
9173
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
8511
9174
|
__name: "SearchBoxProductTitle",
|
|
8512
9175
|
props: {
|
|
8513
9176
|
item: {},
|
|
@@ -8527,18 +9190,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8527
9190
|
key: 0,
|
|
8528
9191
|
class: "lupa-search-box-product-title",
|
|
8529
9192
|
innerHTML: title.value
|
|
8530
|
-
}, null, 8, _hoisted_1$
|
|
9193
|
+
}, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$M, [
|
|
8531
9194
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
8532
9195
|
]));
|
|
8533
9196
|
};
|
|
8534
9197
|
}
|
|
8535
9198
|
});
|
|
8536
|
-
const _hoisted_1$
|
|
9199
|
+
const _hoisted_1$16 = ["innerHTML"];
|
|
8537
9200
|
const _hoisted_2$L = {
|
|
8538
9201
|
key: 1,
|
|
8539
9202
|
class: "lupa-search-box-product-description"
|
|
8540
9203
|
};
|
|
8541
|
-
const _sfc_main$
|
|
9204
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
8542
9205
|
__name: "SearchBoxProductDescription",
|
|
8543
9206
|
props: {
|
|
8544
9207
|
item: {},
|
|
@@ -8558,12 +9221,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8558
9221
|
key: 0,
|
|
8559
9222
|
class: "lupa-search-box-product-description",
|
|
8560
9223
|
innerHTML: description.value
|
|
8561
|
-
}, null, 8, _hoisted_1$
|
|
9224
|
+
}, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(description.value), 1));
|
|
8562
9225
|
};
|
|
8563
9226
|
}
|
|
8564
9227
|
});
|
|
8565
|
-
const _hoisted_1$
|
|
8566
|
-
const _sfc_main$
|
|
9228
|
+
const _hoisted_1$15 = { class: "lupa-search-box-product-price" };
|
|
9229
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
8567
9230
|
__name: "SearchBoxProductPrice",
|
|
8568
9231
|
props: {
|
|
8569
9232
|
item: {},
|
|
@@ -8581,14 +9244,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8581
9244
|
);
|
|
8582
9245
|
});
|
|
8583
9246
|
return (_ctx, _cache) => {
|
|
8584
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9247
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, [
|
|
8585
9248
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
8586
9249
|
]);
|
|
8587
9250
|
};
|
|
8588
9251
|
}
|
|
8589
9252
|
});
|
|
8590
|
-
const _hoisted_1$
|
|
8591
|
-
const _sfc_main$
|
|
9253
|
+
const _hoisted_1$14 = { class: "lupa-search-box-product-regular-price" };
|
|
9254
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
8592
9255
|
__name: "SearchBoxProductRegularPrice",
|
|
8593
9256
|
props: {
|
|
8594
9257
|
item: {},
|
|
@@ -8606,16 +9269,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8606
9269
|
);
|
|
8607
9270
|
});
|
|
8608
9271
|
return (_ctx, _cache) => {
|
|
8609
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9272
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, toDisplayString(price.value), 1);
|
|
8610
9273
|
};
|
|
8611
9274
|
}
|
|
8612
9275
|
});
|
|
8613
|
-
const _hoisted_1$
|
|
9276
|
+
const _hoisted_1$13 = ["innerHTML"];
|
|
8614
9277
|
const _hoisted_2$K = { key: 0 };
|
|
8615
9278
|
const _hoisted_3$y = { key: 1 };
|
|
8616
9279
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
8617
9280
|
const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
|
|
8618
|
-
const _sfc_main$
|
|
9281
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
8619
9282
|
__name: "SearchBoxProductCustom",
|
|
8620
9283
|
props: {
|
|
8621
9284
|
item: {},
|
|
@@ -8641,7 +9304,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8641
9304
|
key: 0,
|
|
8642
9305
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
8643
9306
|
innerHTML: text.value
|
|
8644
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9307
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$13)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
8645
9308
|
key: 1,
|
|
8646
9309
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
8647
9310
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
@@ -8653,8 +9316,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8653
9316
|
};
|
|
8654
9317
|
}
|
|
8655
9318
|
});
|
|
8656
|
-
const _hoisted_1$
|
|
8657
|
-
const _sfc_main$
|
|
9319
|
+
const _hoisted_1$12 = ["innerHTML"];
|
|
9320
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
8658
9321
|
__name: "SearchBoxProductCustomHtml",
|
|
8659
9322
|
props: {
|
|
8660
9323
|
item: {},
|
|
@@ -8674,7 +9337,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8674
9337
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
8675
9338
|
class: className.value,
|
|
8676
9339
|
innerHTML: text.value
|
|
8677
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9340
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$12);
|
|
8678
9341
|
};
|
|
8679
9342
|
}
|
|
8680
9343
|
});
|
|
@@ -8872,10 +9535,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8872
9535
|
clearSearchResult
|
|
8873
9536
|
};
|
|
8874
9537
|
});
|
|
8875
|
-
const _hoisted_1$
|
|
9538
|
+
const _hoisted_1$11 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
8876
9539
|
const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
|
|
8877
9540
|
const _hoisted_3$x = ["onClick", "disabled"];
|
|
8878
|
-
const _sfc_main$
|
|
9541
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
8879
9542
|
__name: "SearchBoxProductAddToCart",
|
|
8880
9543
|
props: {
|
|
8881
9544
|
item: {},
|
|
@@ -8902,7 +9565,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8902
9565
|
loading.value = false;
|
|
8903
9566
|
});
|
|
8904
9567
|
return (_ctx, _cache) => {
|
|
8905
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9568
|
+
return openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
8906
9569
|
createBaseVNode("div", _hoisted_2$J, [
|
|
8907
9570
|
createBaseVNode("button", {
|
|
8908
9571
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
@@ -8916,23 +9579,23 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8916
9579
|
};
|
|
8917
9580
|
}
|
|
8918
9581
|
});
|
|
8919
|
-
const _hoisted_1
|
|
9582
|
+
const _hoisted_1$10 = {
|
|
8920
9583
|
key: 1,
|
|
8921
9584
|
class: "lupa-search-box-element-badge-wrapper"
|
|
8922
9585
|
};
|
|
8923
9586
|
const __default__$4 = {
|
|
8924
9587
|
components: {
|
|
8925
|
-
SearchBoxProductImage: _sfc_main$
|
|
8926
|
-
SearchBoxProductTitle: _sfc_main$
|
|
8927
|
-
SearchBoxProductDescription: _sfc_main$
|
|
8928
|
-
SearchBoxProductPrice: _sfc_main$
|
|
8929
|
-
SearchBoxProductRegularPrice: _sfc_main$
|
|
8930
|
-
SearchBoxProductCustom: _sfc_main$
|
|
8931
|
-
SearchBoxProductCustomHtml: _sfc_main$
|
|
8932
|
-
SearchBoxProductAddToCart: _sfc_main$
|
|
9588
|
+
SearchBoxProductImage: _sfc_main$1d,
|
|
9589
|
+
SearchBoxProductTitle: _sfc_main$1c,
|
|
9590
|
+
SearchBoxProductDescription: _sfc_main$1b,
|
|
9591
|
+
SearchBoxProductPrice: _sfc_main$1a,
|
|
9592
|
+
SearchBoxProductRegularPrice: _sfc_main$19,
|
|
9593
|
+
SearchBoxProductCustom: _sfc_main$18,
|
|
9594
|
+
SearchBoxProductCustomHtml: _sfc_main$17,
|
|
9595
|
+
SearchBoxProductAddToCart: _sfc_main$16
|
|
8933
9596
|
}
|
|
8934
9597
|
};
|
|
8935
|
-
const _sfc_main$
|
|
9598
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
|
|
8936
9599
|
__name: "SearchBoxProductElement",
|
|
8937
9600
|
props: {
|
|
8938
9601
|
item: {},
|
|
@@ -8990,7 +9653,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8990
9653
|
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
|
|
8991
9654
|
inStock: _ctx.isInStock
|
|
8992
9655
|
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
|
|
8993
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1
|
|
9656
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
8994
9657
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
8995
9658
|
key: 0,
|
|
8996
9659
|
item: enhancedItem.value,
|
|
@@ -9004,14 +9667,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9004
9667
|
};
|
|
9005
9668
|
}
|
|
9006
9669
|
}));
|
|
9007
|
-
const _hoisted_1
|
|
9670
|
+
const _hoisted_1$$ = { class: "lupa-badge-title" };
|
|
9008
9671
|
const _hoisted_2$I = ["src"];
|
|
9009
9672
|
const _hoisted_3$w = { key: 1 };
|
|
9010
9673
|
const _hoisted_4$p = {
|
|
9011
9674
|
key: 0,
|
|
9012
9675
|
class: "lupa-badge-full-text"
|
|
9013
9676
|
};
|
|
9014
|
-
const _sfc_main$
|
|
9677
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
9015
9678
|
__name: "SearchResultGeneratedBadge",
|
|
9016
9679
|
props: {
|
|
9017
9680
|
options: {},
|
|
@@ -9044,7 +9707,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9044
9707
|
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
9045
9708
|
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
9046
9709
|
}, [
|
|
9047
|
-
createBaseVNode("span", _hoisted_1
|
|
9710
|
+
createBaseVNode("span", _hoisted_1$$, [
|
|
9048
9711
|
image.value ? (openBlock(), createElementBlock("img", {
|
|
9049
9712
|
key: 0,
|
|
9050
9713
|
src: image.value
|
|
@@ -9056,8 +9719,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9056
9719
|
};
|
|
9057
9720
|
}
|
|
9058
9721
|
});
|
|
9059
|
-
const _hoisted_1$
|
|
9060
|
-
const _sfc_main$
|
|
9722
|
+
const _hoisted_1$_ = { class: "lupa-generated-badges" };
|
|
9723
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
9061
9724
|
__name: "SearchResultGeneratedBadges",
|
|
9062
9725
|
props: {
|
|
9063
9726
|
options: {}
|
|
@@ -9083,9 +9746,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9083
9746
|
})).filter((b) => Boolean(b.id));
|
|
9084
9747
|
});
|
|
9085
9748
|
return (_ctx, _cache) => {
|
|
9086
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9749
|
+
return openBlock(), createElementBlock("div", _hoisted_1$_, [
|
|
9087
9750
|
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
9088
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9751
|
+
return openBlock(), createBlock(_sfc_main$14, {
|
|
9089
9752
|
key: badge.id,
|
|
9090
9753
|
badge,
|
|
9091
9754
|
options: _ctx.options
|
|
@@ -9095,8 +9758,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9095
9758
|
};
|
|
9096
9759
|
}
|
|
9097
9760
|
});
|
|
9098
|
-
const _hoisted_1$
|
|
9099
|
-
const _sfc_main$
|
|
9761
|
+
const _hoisted_1$Z = ["innerHTML"];
|
|
9762
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
9100
9763
|
__name: "CustomBadge",
|
|
9101
9764
|
props: {
|
|
9102
9765
|
badge: {}
|
|
@@ -9115,12 +9778,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9115
9778
|
return openBlock(), createElementBlock("div", {
|
|
9116
9779
|
class: normalizeClass(className.value),
|
|
9117
9780
|
innerHTML: text.value
|
|
9118
|
-
}, null, 10, _hoisted_1$
|
|
9781
|
+
}, null, 10, _hoisted_1$Z);
|
|
9119
9782
|
};
|
|
9120
9783
|
}
|
|
9121
9784
|
});
|
|
9122
|
-
const _hoisted_1$
|
|
9123
|
-
const _sfc_main$
|
|
9785
|
+
const _hoisted_1$Y = { class: "lupa-text-badges" };
|
|
9786
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
9124
9787
|
__name: "TextBadge",
|
|
9125
9788
|
props: {
|
|
9126
9789
|
badge: {}
|
|
@@ -9135,7 +9798,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9135
9798
|
return badges.value.slice(0, props.badge.maxItems);
|
|
9136
9799
|
});
|
|
9137
9800
|
return (_ctx, _cache) => {
|
|
9138
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9801
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
9139
9802
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9140
9803
|
return openBlock(), createElementBlock("div", {
|
|
9141
9804
|
class: "lupa-badge lupa-text-badge",
|
|
@@ -9146,9 +9809,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9146
9809
|
};
|
|
9147
9810
|
}
|
|
9148
9811
|
});
|
|
9149
|
-
const _hoisted_1$
|
|
9812
|
+
const _hoisted_1$X = { class: "lupa-image-badges" };
|
|
9150
9813
|
const _hoisted_2$H = ["src"];
|
|
9151
|
-
const _sfc_main
|
|
9814
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
9152
9815
|
__name: "ImageBadge",
|
|
9153
9816
|
props: {
|
|
9154
9817
|
badge: {}
|
|
@@ -9168,7 +9831,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9168
9831
|
return `${props.badge.rootImageUrl}${src}`;
|
|
9169
9832
|
};
|
|
9170
9833
|
return (_ctx, _cache) => {
|
|
9171
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9834
|
+
return openBlock(), createElementBlock("div", _hoisted_1$X, [
|
|
9172
9835
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9173
9836
|
return openBlock(), createElementBlock("div", {
|
|
9174
9837
|
class: "lupa-badge lupa-image-badge",
|
|
@@ -9183,15 +9846,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9183
9846
|
};
|
|
9184
9847
|
}
|
|
9185
9848
|
});
|
|
9186
|
-
const _hoisted_1$
|
|
9849
|
+
const _hoisted_1$W = { id: "lupa-search-results-badges" };
|
|
9187
9850
|
const __default__$3 = {
|
|
9188
9851
|
components: {
|
|
9189
|
-
CustomBadge: _sfc_main$
|
|
9190
|
-
TextBadge: _sfc_main$
|
|
9191
|
-
ImageBadge: _sfc_main
|
|
9852
|
+
CustomBadge: _sfc_main$12,
|
|
9853
|
+
TextBadge: _sfc_main$11,
|
|
9854
|
+
ImageBadge: _sfc_main$10
|
|
9192
9855
|
}
|
|
9193
9856
|
};
|
|
9194
|
-
const _sfc_main
|
|
9857
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
9195
9858
|
__name: "SearchResultsBadgeWrapper",
|
|
9196
9859
|
props: {
|
|
9197
9860
|
position: {},
|
|
@@ -9247,7 +9910,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9247
9910
|
}
|
|
9248
9911
|
};
|
|
9249
9912
|
return (_ctx, _cache) => {
|
|
9250
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9913
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
9251
9914
|
createBaseVNode("div", {
|
|
9252
9915
|
id: "lupa-badges",
|
|
9253
9916
|
class: normalizeClass(anchorPosition.value)
|
|
@@ -9258,7 +9921,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9258
9921
|
badge
|
|
9259
9922
|
}, null, 8, ["badge"]);
|
|
9260
9923
|
}), 128)),
|
|
9261
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$
|
|
9924
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$13, {
|
|
9262
9925
|
key: 0,
|
|
9263
9926
|
options: _ctx.options
|
|
9264
9927
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -9267,14 +9930,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9267
9930
|
};
|
|
9268
9931
|
}
|
|
9269
9932
|
}));
|
|
9270
|
-
const _hoisted_1$
|
|
9933
|
+
const _hoisted_1$V = ["href"];
|
|
9271
9934
|
const _hoisted_2$G = { class: "lupa-search-box-product-image-section" };
|
|
9272
9935
|
const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
|
|
9273
9936
|
const _hoisted_4$o = {
|
|
9274
9937
|
key: 0,
|
|
9275
9938
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
9276
9939
|
};
|
|
9277
|
-
const _sfc_main$
|
|
9940
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
9278
9941
|
__name: "SearchBoxProduct",
|
|
9279
9942
|
props: {
|
|
9280
9943
|
item: {},
|
|
@@ -9335,7 +9998,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9335
9998
|
}), [
|
|
9336
9999
|
createBaseVNode("div", _hoisted_2$G, [
|
|
9337
10000
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
9338
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10001
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
9339
10002
|
class: "lupa-search-box-product-element",
|
|
9340
10003
|
item: _ctx.item,
|
|
9341
10004
|
element,
|
|
@@ -9348,7 +10011,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9348
10011
|
createBaseVNode("div", _hoisted_3$v, [
|
|
9349
10012
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
9350
10013
|
var _a;
|
|
9351
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10014
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
9352
10015
|
key: element.key,
|
|
9353
10016
|
class: "lupa-search-box-product-element",
|
|
9354
10017
|
item: _ctx.item,
|
|
@@ -9359,7 +10022,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9359
10022
|
badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
|
|
9360
10023
|
name: "badges",
|
|
9361
10024
|
fn: withCtx(() => [
|
|
9362
|
-
createVNode(_sfc_main
|
|
10025
|
+
createVNode(_sfc_main$$, {
|
|
9363
10026
|
options: badgeOptions.value,
|
|
9364
10027
|
position: "card"
|
|
9365
10028
|
}, null, 8, ["options"])
|
|
@@ -9370,7 +10033,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9370
10033
|
}), 128))
|
|
9371
10034
|
]),
|
|
9372
10035
|
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
9373
|
-
createVNode(_sfc_main$
|
|
10036
|
+
createVNode(_sfc_main$15, {
|
|
9374
10037
|
class: "lupa-search-box-product-element",
|
|
9375
10038
|
item: _ctx.item,
|
|
9376
10039
|
element: addToCartElement.value,
|
|
@@ -9379,7 +10042,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9379
10042
|
isInStock: isInStock.value
|
|
9380
10043
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
9381
10044
|
])) : createCommentVNode("", true)
|
|
9382
|
-
], 16, _hoisted_1$
|
|
10045
|
+
], 16, _hoisted_1$V);
|
|
9383
10046
|
};
|
|
9384
10047
|
}
|
|
9385
10048
|
});
|
|
@@ -9440,8 +10103,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9440
10103
|
};
|
|
9441
10104
|
return { trackSearch, trackResults, trackEvent };
|
|
9442
10105
|
});
|
|
9443
|
-
const _hoisted_1$
|
|
9444
|
-
const _sfc_main$
|
|
10106
|
+
const _hoisted_1$U = { id: "lupa-search-box-products" };
|
|
10107
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
9445
10108
|
__name: "SearchBoxProducts",
|
|
9446
10109
|
props: {
|
|
9447
10110
|
items: {},
|
|
@@ -9502,7 +10165,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9502
10165
|
handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
|
|
9503
10166
|
};
|
|
9504
10167
|
return (_ctx, _cache) => {
|
|
9505
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10168
|
+
return openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
9506
10169
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
9507
10170
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
9508
10171
|
key: index,
|
|
@@ -9514,7 +10177,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9514
10177
|
itemClicked: handleProductClick
|
|
9515
10178
|
});
|
|
9516
10179
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
9517
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10180
|
+
return openBlock(), createBlock(_sfc_main$_, {
|
|
9518
10181
|
key: index,
|
|
9519
10182
|
item,
|
|
9520
10183
|
panelOptions: _ctx.panelOptions,
|
|
@@ -9528,7 +10191,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9528
10191
|
};
|
|
9529
10192
|
}
|
|
9530
10193
|
});
|
|
9531
|
-
const _sfc_main$
|
|
10194
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
9532
10195
|
__name: "SearchBoxProductsWrapper",
|
|
9533
10196
|
props: {
|
|
9534
10197
|
panel: {},
|
|
@@ -9580,7 +10243,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9580
10243
|
const getItemsDebounced = debounce$1(getItems, props.debounce);
|
|
9581
10244
|
return (_ctx, _cache) => {
|
|
9582
10245
|
var _a, _b;
|
|
9583
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10246
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
9584
10247
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
9585
10248
|
panelOptions: _ctx.panel,
|
|
9586
10249
|
labels: _ctx.labels,
|
|
@@ -9598,7 +10261,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9598
10261
|
};
|
|
9599
10262
|
}
|
|
9600
10263
|
});
|
|
9601
|
-
const _sfc_main$
|
|
10264
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
9602
10265
|
__name: "SearchBoxRelatedSourceWrapper",
|
|
9603
10266
|
props: {
|
|
9604
10267
|
panel: {},
|
|
@@ -9670,7 +10333,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9670
10333
|
});
|
|
9671
10334
|
return (_ctx, _cache) => {
|
|
9672
10335
|
var _a, _b;
|
|
9673
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10336
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
9674
10337
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
9675
10338
|
panelOptions: documentPanelOptions.value,
|
|
9676
10339
|
labels: _ctx.labels,
|
|
@@ -9688,7 +10351,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9688
10351
|
};
|
|
9689
10352
|
}
|
|
9690
10353
|
});
|
|
9691
|
-
const _hoisted_1$
|
|
10354
|
+
const _hoisted_1$T = {
|
|
9692
10355
|
key: 0,
|
|
9693
10356
|
id: "lupa-search-box-panel"
|
|
9694
10357
|
};
|
|
@@ -9707,12 +10370,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9707
10370
|
};
|
|
9708
10371
|
const __default__$2 = {
|
|
9709
10372
|
components: {
|
|
9710
|
-
SearchBoxSuggestionsWrapper: _sfc_main$
|
|
9711
|
-
SearchBoxProductsWrapper: _sfc_main$
|
|
9712
|
-
SearchBoxRelatedSourceWrapper: _sfc_main$
|
|
10373
|
+
SearchBoxSuggestionsWrapper: _sfc_main$1f,
|
|
10374
|
+
SearchBoxProductsWrapper: _sfc_main$Y,
|
|
10375
|
+
SearchBoxRelatedSourceWrapper: _sfc_main$X
|
|
9713
10376
|
}
|
|
9714
10377
|
};
|
|
9715
|
-
const _sfc_main$
|
|
10378
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
|
|
9716
10379
|
__name: "SearchBoxMainPanel",
|
|
9717
10380
|
props: {
|
|
9718
10381
|
options: {},
|
|
@@ -9858,7 +10521,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9858
10521
|
ref_key: "panelContainer",
|
|
9859
10522
|
ref: panelContainer
|
|
9860
10523
|
}, [
|
|
9861
|
-
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10524
|
+
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
9862
10525
|
labels.value.closePanel ? (openBlock(), createElementBlock("a", {
|
|
9863
10526
|
key: 0,
|
|
9864
10527
|
class: "lupa-search-box-close-panel",
|
|
@@ -9903,18 +10566,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9903
10566
|
], 10, _hoisted_2$F);
|
|
9904
10567
|
}), 128))
|
|
9905
10568
|
], 4),
|
|
9906
|
-
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$
|
|
10569
|
+
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1i, {
|
|
9907
10570
|
key: 1,
|
|
9908
10571
|
labels: labels.value
|
|
9909
10572
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
9910
|
-
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$
|
|
10573
|
+
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1l, {
|
|
9911
10574
|
key: 2,
|
|
9912
10575
|
labels: labels.value,
|
|
9913
10576
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
9914
10577
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
9915
10578
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
9916
10579
|
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
|
|
9917
|
-
createVNode(_sfc_main$
|
|
10580
|
+
createVNode(_sfc_main$1j, {
|
|
9918
10581
|
options: _ctx.options.history,
|
|
9919
10582
|
history: history.value,
|
|
9920
10583
|
onGoToResults: handleGoToResults,
|
|
@@ -9939,9 +10602,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9939
10602
|
const elements = getElements(triggers);
|
|
9940
10603
|
elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
|
|
9941
10604
|
};
|
|
9942
|
-
const _hoisted_1$
|
|
10605
|
+
const _hoisted_1$S = { id: "lupa-search-box" };
|
|
9943
10606
|
const _hoisted_2$E = { class: "lupa-search-box-wrapper" };
|
|
9944
|
-
const _sfc_main$
|
|
10607
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
9945
10608
|
__name: "SearchBox",
|
|
9946
10609
|
props: {
|
|
9947
10610
|
options: {},
|
|
@@ -10186,9 +10849,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10186
10849
|
};
|
|
10187
10850
|
return (_ctx, _cache) => {
|
|
10188
10851
|
var _a2;
|
|
10189
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10852
|
+
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
10190
10853
|
createBaseVNode("div", _hoisted_2$E, [
|
|
10191
|
-
createVNode(_sfc_main$
|
|
10854
|
+
createVNode(_sfc_main$1m, {
|
|
10192
10855
|
options: inputOptions.value,
|
|
10193
10856
|
suggestedValue: suggestedValue.value,
|
|
10194
10857
|
"can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
|
|
@@ -10199,7 +10862,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10199
10862
|
onFocus: _cache[0] || (_cache[0] = ($event) => opened.value = true),
|
|
10200
10863
|
onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
|
|
10201
10864
|
}, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
|
|
10202
|
-
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$
|
|
10865
|
+
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$W, {
|
|
10203
10866
|
key: 0,
|
|
10204
10867
|
options: panelOptions.value,
|
|
10205
10868
|
inputValue: inputValue.value,
|
|
@@ -10287,7 +10950,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10287
10950
|
}
|
|
10288
10951
|
return searchParams;
|
|
10289
10952
|
};
|
|
10290
|
-
const _hoisted_1$
|
|
10953
|
+
const _hoisted_1$R = {
|
|
10291
10954
|
key: 0,
|
|
10292
10955
|
id: "lupa-search-results-did-you-mean"
|
|
10293
10956
|
};
|
|
@@ -10300,7 +10963,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10300
10963
|
"data-cy": "did-you-mean-label"
|
|
10301
10964
|
};
|
|
10302
10965
|
const _hoisted_4$m = { key: 1 };
|
|
10303
|
-
const _sfc_main$
|
|
10966
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
10304
10967
|
__name: "SearchResultsDidYouMean",
|
|
10305
10968
|
props: {
|
|
10306
10969
|
labels: {}
|
|
@@ -10332,7 +10995,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10332
10995
|
paramStore.goToResults({ searchText, facet });
|
|
10333
10996
|
};
|
|
10334
10997
|
return (_ctx, _cache) => {
|
|
10335
|
-
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10998
|
+
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$R, [
|
|
10336
10999
|
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
|
|
10337
11000
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
|
|
10338
11001
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
@@ -10358,12 +11021,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10358
11021
|
};
|
|
10359
11022
|
}
|
|
10360
11023
|
});
|
|
10361
|
-
const _hoisted_1$
|
|
11024
|
+
const _hoisted_1$Q = {
|
|
10362
11025
|
key: 0,
|
|
10363
11026
|
class: "lupa-search-results-summary"
|
|
10364
11027
|
};
|
|
10365
11028
|
const _hoisted_2$C = ["innerHTML"];
|
|
10366
|
-
const _sfc_main$
|
|
11029
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
10367
11030
|
__name: "SearchResultsSummary",
|
|
10368
11031
|
props: {
|
|
10369
11032
|
label: {},
|
|
@@ -10378,7 +11041,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10378
11041
|
return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
|
|
10379
11042
|
});
|
|
10380
11043
|
return (_ctx, _cache) => {
|
|
10381
|
-
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11044
|
+
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
10382
11045
|
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$C),
|
|
10383
11046
|
_ctx.clearable ? (openBlock(), createElementBlock("span", {
|
|
10384
11047
|
key: 0,
|
|
@@ -10390,7 +11053,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10390
11053
|
};
|
|
10391
11054
|
}
|
|
10392
11055
|
});
|
|
10393
|
-
const _hoisted_1$
|
|
11056
|
+
const _hoisted_1$P = {
|
|
10394
11057
|
key: 0,
|
|
10395
11058
|
class: "lupa-result-page-title",
|
|
10396
11059
|
"data-cy": "lupa-result-page-title"
|
|
@@ -10401,7 +11064,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10401
11064
|
class: "lupa-results-total-count"
|
|
10402
11065
|
};
|
|
10403
11066
|
const _hoisted_4$l = ["innerHTML"];
|
|
10404
|
-
const _sfc_main$
|
|
11067
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
10405
11068
|
__name: "SearchResultsTitle",
|
|
10406
11069
|
props: {
|
|
10407
11070
|
options: {},
|
|
@@ -10436,12 +11099,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10436
11099
|
});
|
|
10437
11100
|
return (_ctx, _cache) => {
|
|
10438
11101
|
return openBlock(), createElementBlock("div", null, [
|
|
10439
|
-
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$
|
|
11102
|
+
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
10440
11103
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
10441
11104
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$B, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
10442
11105
|
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
|
|
10443
11106
|
])) : createCommentVNode("", true),
|
|
10444
|
-
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$
|
|
11107
|
+
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
10445
11108
|
key: 1,
|
|
10446
11109
|
label: summaryLabel.value
|
|
10447
11110
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
@@ -10454,7 +11117,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10454
11117
|
};
|
|
10455
11118
|
}
|
|
10456
11119
|
});
|
|
10457
|
-
const _hoisted_1$
|
|
11120
|
+
const _hoisted_1$O = { class: "lupa-search-result-filter-value" };
|
|
10458
11121
|
const _hoisted_2$A = {
|
|
10459
11122
|
class: "lupa-current-filter-label",
|
|
10460
11123
|
"data-cy": "lupa-current-filter-label"
|
|
@@ -10463,7 +11126,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10463
11126
|
class: "lupa-current-filter-value",
|
|
10464
11127
|
"data-cy": "lupa-current-filter-value"
|
|
10465
11128
|
};
|
|
10466
|
-
const _sfc_main$
|
|
11129
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
10467
11130
|
__name: "CurrentFilterDisplay",
|
|
10468
11131
|
props: {
|
|
10469
11132
|
filter: {}
|
|
@@ -10475,7 +11138,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10475
11138
|
emit2("remove", { filter: props.filter });
|
|
10476
11139
|
};
|
|
10477
11140
|
return (_ctx, _cache) => {
|
|
10478
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11141
|
+
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
10479
11142
|
createBaseVNode("div", {
|
|
10480
11143
|
class: "lupa-current-filter-action",
|
|
10481
11144
|
onClick: handleClick
|
|
@@ -10486,7 +11149,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10486
11149
|
};
|
|
10487
11150
|
}
|
|
10488
11151
|
});
|
|
10489
|
-
const _hoisted_1$
|
|
11152
|
+
const _hoisted_1$N = { class: "lupa-filter-title-text" };
|
|
10490
11153
|
const _hoisted_2$z = {
|
|
10491
11154
|
key: 0,
|
|
10492
11155
|
class: "lupa-filter-count"
|
|
@@ -10496,7 +11159,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10496
11159
|
class: "filter-values"
|
|
10497
11160
|
};
|
|
10498
11161
|
const _hoisted_4$k = { class: "lupa-current-filter-list" };
|
|
10499
|
-
const _sfc_main$
|
|
11162
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
10500
11163
|
__name: "CurrentFilters",
|
|
10501
11164
|
props: {
|
|
10502
11165
|
options: {},
|
|
@@ -10557,7 +11220,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10557
11220
|
class: "lupa-current-filter-title",
|
|
10558
11221
|
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
10559
11222
|
}, [
|
|
10560
|
-
createBaseVNode("div", _hoisted_1$
|
|
11223
|
+
createBaseVNode("div", _hoisted_1$N, [
|
|
10561
11224
|
createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
|
|
10562
11225
|
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$z, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
|
|
10563
11226
|
]),
|
|
@@ -10569,7 +11232,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10569
11232
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$q, [
|
|
10570
11233
|
createBaseVNode("div", _hoisted_4$k, [
|
|
10571
11234
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
10572
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11235
|
+
return openBlock(), createBlock(_sfc_main$R, {
|
|
10573
11236
|
key: filter.key + "_" + filter.value,
|
|
10574
11237
|
filter,
|
|
10575
11238
|
onRemove: handleRemove
|
|
@@ -10586,8 +11249,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10586
11249
|
};
|
|
10587
11250
|
}
|
|
10588
11251
|
});
|
|
10589
|
-
const _hoisted_1$
|
|
10590
|
-
const _sfc_main$
|
|
11252
|
+
const _hoisted_1$M = ["href"];
|
|
11253
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
10591
11254
|
__name: "CategoryFilterItem",
|
|
10592
11255
|
props: {
|
|
10593
11256
|
options: {},
|
|
@@ -10624,12 +11287,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10624
11287
|
"data-cy": "lupa-child-category-item",
|
|
10625
11288
|
href: urlLink.value,
|
|
10626
11289
|
onClick: handleNavigation
|
|
10627
|
-
}, toDisplayString(title.value), 9, _hoisted_1$
|
|
11290
|
+
}, toDisplayString(title.value), 9, _hoisted_1$M)
|
|
10628
11291
|
], 2);
|
|
10629
11292
|
};
|
|
10630
11293
|
}
|
|
10631
11294
|
});
|
|
10632
|
-
const _hoisted_1$
|
|
11295
|
+
const _hoisted_1$L = {
|
|
10633
11296
|
class: "lupa-category-filter",
|
|
10634
11297
|
"data-cy": "lupa-category-filter"
|
|
10635
11298
|
};
|
|
@@ -10637,7 +11300,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10637
11300
|
const _hoisted_3$p = ["href"];
|
|
10638
11301
|
const _hoisted_4$j = ["href"];
|
|
10639
11302
|
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
10640
|
-
const _sfc_main$
|
|
11303
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
10641
11304
|
__name: "CategoryFilter",
|
|
10642
11305
|
props: {
|
|
10643
11306
|
options: {}
|
|
@@ -10723,7 +11386,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10723
11386
|
};
|
|
10724
11387
|
__expose({ fetch: fetch2 });
|
|
10725
11388
|
return (_ctx, _cache) => {
|
|
10726
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11389
|
+
return openBlock(), createElementBlock("div", _hoisted_1$L, [
|
|
10727
11390
|
createBaseVNode("div", _hoisted_2$y, [
|
|
10728
11391
|
hasBackButton.value ? (openBlock(), createElementBlock("a", {
|
|
10729
11392
|
key: 0,
|
|
@@ -10744,7 +11407,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10744
11407
|
], 2),
|
|
10745
11408
|
createBaseVNode("div", _hoisted_5$d, [
|
|
10746
11409
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
10747
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11410
|
+
return openBlock(), createBlock(_sfc_main$P, {
|
|
10748
11411
|
key: getCategoryKey(child),
|
|
10749
11412
|
item: child,
|
|
10750
11413
|
options: _ctx.options
|
|
@@ -10755,7 +11418,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10755
11418
|
};
|
|
10756
11419
|
}
|
|
10757
11420
|
});
|
|
10758
|
-
const _hoisted_1$
|
|
11421
|
+
const _hoisted_1$K = {
|
|
10759
11422
|
class: "lupa-search-result-facet-term-values",
|
|
10760
11423
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
10761
11424
|
};
|
|
@@ -10771,7 +11434,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10771
11434
|
};
|
|
10772
11435
|
const _hoisted_9$1 = { key: 0 };
|
|
10773
11436
|
const _hoisted_10$1 = { key: 1 };
|
|
10774
|
-
const _sfc_main$
|
|
11437
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
10775
11438
|
__name: "TermFacet",
|
|
10776
11439
|
props: {
|
|
10777
11440
|
options: {},
|
|
@@ -10840,7 +11503,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10840
11503
|
return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
|
|
10841
11504
|
};
|
|
10842
11505
|
return (_ctx, _cache) => {
|
|
10843
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11506
|
+
return openBlock(), createElementBlock("div", _hoisted_1$K, [
|
|
10844
11507
|
isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
|
|
10845
11508
|
key: 0,
|
|
10846
11509
|
class: "lupa-term-filter",
|
|
@@ -11858,7 +12521,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11858
12521
|
m.render = function(e, t, r, i, n, o) {
|
|
11859
12522
|
return openBlock(), createElementBlock("div", mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
|
|
11860
12523
|
}, m.__file = "src/Slider.vue";
|
|
11861
|
-
const _hoisted_1$
|
|
12524
|
+
const _hoisted_1$J = { class: "lupa-search-result-facet-stats-values" };
|
|
11862
12525
|
const _hoisted_2$w = {
|
|
11863
12526
|
key: 0,
|
|
11864
12527
|
class: "lupa-stats-facet-summary"
|
|
@@ -11886,7 +12549,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11886
12549
|
key: 2,
|
|
11887
12550
|
class: "lupa-stats-slider-wrapper"
|
|
11888
12551
|
};
|
|
11889
|
-
const _sfc_main$
|
|
12552
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
11890
12553
|
__name: "StatsFacet",
|
|
11891
12554
|
props: {
|
|
11892
12555
|
options: {},
|
|
@@ -12055,7 +12718,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12055
12718
|
innerSliderRange.value = value;
|
|
12056
12719
|
};
|
|
12057
12720
|
return (_ctx, _cache) => {
|
|
12058
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12721
|
+
return openBlock(), createElementBlock("div", _hoisted_1$J, [
|
|
12059
12722
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$n, [
|
|
12060
12723
|
createBaseVNode("div", null, [
|
|
12061
12724
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
@@ -12122,7 +12785,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12122
12785
|
};
|
|
12123
12786
|
}
|
|
12124
12787
|
});
|
|
12125
|
-
const _hoisted_1$
|
|
12788
|
+
const _hoisted_1$I = { class: "lupa-term-checkbox-wrapper" };
|
|
12126
12789
|
const _hoisted_2$v = { class: "lupa-term-checkbox-label" };
|
|
12127
12790
|
const _hoisted_3$m = { class: "lupa-term-label" };
|
|
12128
12791
|
const _hoisted_4$g = {
|
|
@@ -12133,7 +12796,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12133
12796
|
key: 0,
|
|
12134
12797
|
class: "lupa-facet-level"
|
|
12135
12798
|
};
|
|
12136
|
-
const _sfc_main$
|
|
12799
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
12137
12800
|
__name: "HierarchyFacetLevel",
|
|
12138
12801
|
props: {
|
|
12139
12802
|
options: {},
|
|
@@ -12179,7 +12842,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12179
12842
|
"data-cy": "lupa-facet-term",
|
|
12180
12843
|
onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
|
|
12181
12844
|
}, [
|
|
12182
|
-
createBaseVNode("div", _hoisted_1$
|
|
12845
|
+
createBaseVNode("div", _hoisted_1$I, [
|
|
12183
12846
|
createBaseVNode("span", {
|
|
12184
12847
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
|
|
12185
12848
|
}, null, 2)
|
|
@@ -12205,13 +12868,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12205
12868
|
};
|
|
12206
12869
|
}
|
|
12207
12870
|
});
|
|
12208
|
-
const _hoisted_1$
|
|
12871
|
+
const _hoisted_1$H = {
|
|
12209
12872
|
class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
|
|
12210
12873
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
12211
12874
|
};
|
|
12212
12875
|
const _hoisted_2$u = { key: 0 };
|
|
12213
12876
|
const _hoisted_3$l = ["placeholder"];
|
|
12214
|
-
const _sfc_main$
|
|
12877
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
12215
12878
|
__name: "HierarchyFacet",
|
|
12216
12879
|
props: {
|
|
12217
12880
|
options: {},
|
|
@@ -12261,7 +12924,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12261
12924
|
showAll.value = true;
|
|
12262
12925
|
};
|
|
12263
12926
|
return (_ctx, _cache) => {
|
|
12264
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12927
|
+
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
12265
12928
|
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
|
|
12266
12929
|
withDirectives(createBaseVNode("input", {
|
|
12267
12930
|
class: "lupa-term-filter",
|
|
@@ -12273,7 +12936,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12273
12936
|
])
|
|
12274
12937
|
])) : createCommentVNode("", true),
|
|
12275
12938
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
12276
|
-
return openBlock(), createBlock(_sfc_main$
|
|
12939
|
+
return openBlock(), createBlock(_sfc_main$L, {
|
|
12277
12940
|
key: item.title,
|
|
12278
12941
|
options: _ctx.options,
|
|
12279
12942
|
item,
|
|
@@ -12293,7 +12956,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12293
12956
|
};
|
|
12294
12957
|
}
|
|
12295
12958
|
});
|
|
12296
|
-
const _hoisted_1$
|
|
12959
|
+
const _hoisted_1$G = { class: "lupa-facet-label-text" };
|
|
12297
12960
|
const _hoisted_2$t = {
|
|
12298
12961
|
key: 0,
|
|
12299
12962
|
class: "lupa-facet-content",
|
|
@@ -12301,12 +12964,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12301
12964
|
};
|
|
12302
12965
|
const __default__$1 = {
|
|
12303
12966
|
components: {
|
|
12304
|
-
TermFacet: _sfc_main$
|
|
12305
|
-
StatsFacet: _sfc_main$
|
|
12306
|
-
HierarchyFacet: _sfc_main$
|
|
12967
|
+
TermFacet: _sfc_main$N,
|
|
12968
|
+
StatsFacet: _sfc_main$M,
|
|
12969
|
+
HierarchyFacet: _sfc_main$K
|
|
12307
12970
|
}
|
|
12308
12971
|
};
|
|
12309
|
-
const _sfc_main$
|
|
12972
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
|
|
12310
12973
|
__name: "FacetDisplay",
|
|
12311
12974
|
props: {
|
|
12312
12975
|
options: {},
|
|
@@ -12418,7 +13081,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12418
13081
|
"data-cy": "lupa-search-result-facet-label",
|
|
12419
13082
|
onClick: toggleFacet
|
|
12420
13083
|
}, [
|
|
12421
|
-
createBaseVNode("div", _hoisted_1$
|
|
13084
|
+
createBaseVNode("div", _hoisted_1$G, toDisplayString(facet.value.label), 1),
|
|
12422
13085
|
createBaseVNode("div", {
|
|
12423
13086
|
class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
|
|
12424
13087
|
}, null, 2)
|
|
@@ -12441,12 +13104,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12441
13104
|
};
|
|
12442
13105
|
}
|
|
12443
13106
|
}));
|
|
12444
|
-
const _hoisted_1$
|
|
13107
|
+
const _hoisted_1$F = { class: "lupa-search-result-facet-section" };
|
|
12445
13108
|
const _hoisted_2$s = {
|
|
12446
13109
|
key: 0,
|
|
12447
13110
|
class: "lupa-facets-title"
|
|
12448
13111
|
};
|
|
12449
|
-
const _sfc_main$
|
|
13112
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
12450
13113
|
__name: "FacetList",
|
|
12451
13114
|
props: {
|
|
12452
13115
|
options: {},
|
|
@@ -12480,14 +13143,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12480
13143
|
};
|
|
12481
13144
|
return (_ctx, _cache) => {
|
|
12482
13145
|
var _a;
|
|
12483
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13146
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
12484
13147
|
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$s, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
|
|
12485
13148
|
createBaseVNode("div", {
|
|
12486
13149
|
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
|
|
12487
13150
|
}, [
|
|
12488
13151
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
|
|
12489
13152
|
var _a2;
|
|
12490
|
-
return openBlock(), createBlock(_sfc_main$
|
|
13153
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
12491
13154
|
key: facet.key,
|
|
12492
13155
|
facet,
|
|
12493
13156
|
currentFilters: currentFiltersValue.value,
|
|
@@ -12502,6 +13165,31 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12502
13165
|
};
|
|
12503
13166
|
}
|
|
12504
13167
|
});
|
|
13168
|
+
const _hoisted_1$E = ["onClick"];
|
|
13169
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
13170
|
+
__name: "FacetsButton",
|
|
13171
|
+
props: {
|
|
13172
|
+
options: {}
|
|
13173
|
+
},
|
|
13174
|
+
emits: ["filter"],
|
|
13175
|
+
setup(__props, { emit: emit2 }) {
|
|
13176
|
+
const props = __props;
|
|
13177
|
+
const label = computed(() => {
|
|
13178
|
+
var _a, _b;
|
|
13179
|
+
return (_b = (_a = props.options.labels) == null ? void 0 : _a.facetFilterButton) != null ? _b : "";
|
|
13180
|
+
});
|
|
13181
|
+
const handleClick = () => {
|
|
13182
|
+
emit2("filter");
|
|
13183
|
+
};
|
|
13184
|
+
return (_ctx, _cache) => {
|
|
13185
|
+
return label.value ? (openBlock(), createElementBlock("button", {
|
|
13186
|
+
key: 0,
|
|
13187
|
+
class: "lupa-facets-button-filter",
|
|
13188
|
+
onClick: withModifiers(handleClick, ["stop"])
|
|
13189
|
+
}, toDisplayString(label.value), 9, _hoisted_1$E)) : createCommentVNode("", true);
|
|
13190
|
+
};
|
|
13191
|
+
}
|
|
13192
|
+
});
|
|
12505
13193
|
const _hoisted_1$D = { class: "lupa-search-result-facets" };
|
|
12506
13194
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
12507
13195
|
__name: "Facets",
|
|
@@ -12510,7 +13198,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12510
13198
|
facetStyle: {},
|
|
12511
13199
|
clearable: { type: Boolean }
|
|
12512
13200
|
},
|
|
12513
|
-
|
|
13201
|
+
emits: ["filter"],
|
|
13202
|
+
setup(__props, { emit: emit2 }) {
|
|
12514
13203
|
const props = __props;
|
|
12515
13204
|
const paramStore = useParamsStore();
|
|
12516
13205
|
const searchResultStore = useSearchResultStore();
|
|
@@ -12540,6 +13229,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12540
13229
|
timeout: (_f = (_e = searchResultOptions.value.scrollToResults) == null ? void 0 : _e.timeout) != null ? _f : 500
|
|
12541
13230
|
};
|
|
12542
13231
|
});
|
|
13232
|
+
const showFilterButton = computed(() => {
|
|
13233
|
+
return props.options.filterBehavior === "withFilterButton";
|
|
13234
|
+
});
|
|
12543
13235
|
const handleFacetSelect = (facetAction) => {
|
|
12544
13236
|
switch (facetAction.type) {
|
|
12545
13237
|
case "terms":
|
|
@@ -12578,9 +13270,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12578
13270
|
const param = getFacetKey(facet.key, facet.type);
|
|
12579
13271
|
paramStore.removeParameters({ paramsToRemove: [param] });
|
|
12580
13272
|
};
|
|
13273
|
+
const filter = () => {
|
|
13274
|
+
emit2("filter");
|
|
13275
|
+
};
|
|
12581
13276
|
return (_ctx, _cache) => {
|
|
12582
13277
|
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
12583
|
-
regularFacets.value ? (openBlock(), createBlock(_sfc_main$
|
|
13278
|
+
regularFacets.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
12584
13279
|
key: 0,
|
|
12585
13280
|
options: _ctx.options,
|
|
12586
13281
|
facets: regularFacets.value,
|
|
@@ -12589,7 +13284,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12589
13284
|
clearable: _ctx.clearable,
|
|
12590
13285
|
onSelect: handleFacetSelect,
|
|
12591
13286
|
onClear: clear2
|
|
12592
|
-
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true)
|
|
13287
|
+
}, null, 8, ["options", "facets", "currentFilters", "facetStyle", "clearable"])) : createCommentVNode("", true),
|
|
13288
|
+
showFilterButton.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
13289
|
+
key: 1,
|
|
13290
|
+
options: _ctx.options,
|
|
13291
|
+
onFilter: filter
|
|
13292
|
+
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
12593
13293
|
]);
|
|
12594
13294
|
};
|
|
12595
13295
|
}
|
|
@@ -12604,7 +13304,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12604
13304
|
options: {},
|
|
12605
13305
|
expandable: { type: Boolean }
|
|
12606
13306
|
},
|
|
12607
|
-
|
|
13307
|
+
emits: ["filter"],
|
|
13308
|
+
setup(__props, { expose: __expose, emit: emit2 }) {
|
|
12608
13309
|
const props = __props;
|
|
12609
13310
|
const categoryFilters = ref(null);
|
|
12610
13311
|
const desktopFiltersVisible = computed(() => {
|
|
@@ -12618,6 +13319,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12618
13319
|
const showCurrentFilters = computed(() => {
|
|
12619
13320
|
return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
|
|
12620
13321
|
});
|
|
13322
|
+
const filter = () => {
|
|
13323
|
+
emit2("filter");
|
|
13324
|
+
};
|
|
12621
13325
|
const fetch2 = () => {
|
|
12622
13326
|
var _a;
|
|
12623
13327
|
if (categoryFilters.value) {
|
|
@@ -12628,12 +13332,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12628
13332
|
return (_ctx, _cache) => {
|
|
12629
13333
|
var _a;
|
|
12630
13334
|
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
12631
|
-
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
13335
|
+
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
12632
13336
|
key: 0,
|
|
12633
13337
|
options: _ctx.options.currentFilters,
|
|
12634
13338
|
expandable: (_a = _ctx.expandable) != null ? _a : false
|
|
12635
13339
|
}, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
|
|
12636
|
-
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$
|
|
13340
|
+
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$O, {
|
|
12637
13341
|
key: 1,
|
|
12638
13342
|
options: _ctx.options.categories,
|
|
12639
13343
|
ref_key: "categoryFilters",
|
|
@@ -12641,7 +13345,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12641
13345
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
12642
13346
|
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$G, {
|
|
12643
13347
|
key: 2,
|
|
12644
|
-
options: _ctx.options.facets
|
|
13348
|
+
options: _ctx.options.facets,
|
|
13349
|
+
onFilter: filter
|
|
12645
13350
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
12646
13351
|
]);
|
|
12647
13352
|
};
|
|
@@ -12665,7 +13370,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12665
13370
|
props: {
|
|
12666
13371
|
options: {}
|
|
12667
13372
|
},
|
|
12668
|
-
|
|
13373
|
+
emits: ["filter"],
|
|
13374
|
+
setup(__props, { emit: emit2 }) {
|
|
12669
13375
|
const props = __props;
|
|
12670
13376
|
const searchResultStore = useSearchResultStore();
|
|
12671
13377
|
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
@@ -12685,6 +13391,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12685
13391
|
const handleMobileToggle = () => {
|
|
12686
13392
|
searchResultStore.setSidebarState({ visible: false });
|
|
12687
13393
|
};
|
|
13394
|
+
const filter = () => {
|
|
13395
|
+
emit2("filter");
|
|
13396
|
+
handleMobileToggle();
|
|
13397
|
+
};
|
|
12688
13398
|
return (_ctx, _cache) => {
|
|
12689
13399
|
return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
12690
13400
|
createBaseVNode("div", {
|
|
@@ -12705,7 +13415,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12705
13415
|
createBaseVNode("div", _hoisted_7$4, [
|
|
12706
13416
|
createVNode(_sfc_main$F, {
|
|
12707
13417
|
options: _ctx.options,
|
|
12708
|
-
expandable: isActiveFiltersExpanded.value
|
|
13418
|
+
expandable: isActiveFiltersExpanded.value,
|
|
13419
|
+
onFilter: filter
|
|
12709
13420
|
}, null, 8, ["options", "expandable"])
|
|
12710
13421
|
])
|
|
12711
13422
|
])
|
|
@@ -12776,7 +13487,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12776
13487
|
props: {
|
|
12777
13488
|
options: {}
|
|
12778
13489
|
},
|
|
12779
|
-
|
|
13490
|
+
emits: ["filter"],
|
|
13491
|
+
setup(__props, { emit: emit2 }) {
|
|
13492
|
+
const filter = () => {
|
|
13493
|
+
emit2("filter");
|
|
13494
|
+
};
|
|
12780
13495
|
return (_ctx, _cache) => {
|
|
12781
13496
|
var _a;
|
|
12782
13497
|
return openBlock(), createElementBlock("div", _hoisted_1$z, [
|
|
@@ -12784,7 +13499,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12784
13499
|
key: 0,
|
|
12785
13500
|
options: _ctx.options.facets,
|
|
12786
13501
|
"facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
|
|
12787
|
-
clearable: true
|
|
13502
|
+
clearable: true,
|
|
13503
|
+
onFilter: filter
|
|
12788
13504
|
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
12789
13505
|
]);
|
|
12790
13506
|
};
|
|
@@ -13221,7 +13937,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13221
13937
|
}, [
|
|
13222
13938
|
createBaseVNode("div", _hoisted_1$t, [
|
|
13223
13939
|
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$B, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$m)),
|
|
13224
|
-
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$
|
|
13940
|
+
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$T, {
|
|
13225
13941
|
key: 2,
|
|
13226
13942
|
label: searchSummaryLabel.value,
|
|
13227
13943
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
@@ -13262,7 +13978,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13262
13978
|
},
|
|
13263
13979
|
setup(__props) {
|
|
13264
13980
|
return (_ctx, _cache) => {
|
|
13265
|
-
return openBlock(), createBlock(_sfc_main$
|
|
13981
|
+
return openBlock(), createBlock(_sfc_main$1e, {
|
|
13266
13982
|
item: _ctx.item,
|
|
13267
13983
|
options: _ctx.options,
|
|
13268
13984
|
"wrapper-class": "lupa-search-results-image-wrapper",
|
|
@@ -13900,7 +14616,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13900
14616
|
"data-cy": "lupa-search-result-product-card",
|
|
13901
14617
|
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
13902
14618
|
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
13903
|
-
createVNode(_sfc_main
|
|
14619
|
+
createVNode(_sfc_main$$, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
13904
14620
|
createBaseVNode("div", {
|
|
13905
14621
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
13906
14622
|
}, [
|
|
@@ -13920,7 +14636,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13920
14636
|
link: link.value
|
|
13921
14637
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
13922
14638
|
}), 128)),
|
|
13923
|
-
createVNode(_sfc_main
|
|
14639
|
+
createVNode(_sfc_main$$, {
|
|
13924
14640
|
options: badgesOptions.value,
|
|
13925
14641
|
position: "image",
|
|
13926
14642
|
class: "lupa-image-badges"
|
|
@@ -14263,7 +14979,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14263
14979
|
options: {},
|
|
14264
14980
|
ssr: { type: Boolean }
|
|
14265
14981
|
},
|
|
14266
|
-
|
|
14982
|
+
emits: ["filter"],
|
|
14983
|
+
setup(__props, { emit: emit2 }) {
|
|
14267
14984
|
const props = __props;
|
|
14268
14985
|
const searchResultStore = useSearchResultStore();
|
|
14269
14986
|
const paramStore = useParamsStore();
|
|
@@ -14354,6 +15071,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14354
15071
|
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: "1" }]
|
|
14355
15072
|
});
|
|
14356
15073
|
};
|
|
15074
|
+
const filter = () => {
|
|
15075
|
+
emit2("filter");
|
|
15076
|
+
};
|
|
14357
15077
|
return (_ctx, _cache) => {
|
|
14358
15078
|
var _a;
|
|
14359
15079
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
@@ -14370,9 +15090,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14370
15090
|
key: 1,
|
|
14371
15091
|
class: "lupa-toolbar-mobile",
|
|
14372
15092
|
options: _ctx.options,
|
|
14373
|
-
"pagination-location": "top"
|
|
15093
|
+
"pagination-location": "top",
|
|
15094
|
+
onFilter: filter
|
|
14374
15095
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14375
|
-
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
15096
|
+
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
14376
15097
|
key: 2,
|
|
14377
15098
|
class: normalizeClass(currentFiltersClass.value),
|
|
14378
15099
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -14727,8 +15448,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14727
15448
|
class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
|
|
14728
15449
|
}, [
|
|
14729
15450
|
_ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
14730
|
-
createVNode(_sfc_main$
|
|
14731
|
-
createVNode(_sfc_main$
|
|
15451
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15452
|
+
createVNode(_sfc_main$S, {
|
|
14732
15453
|
"show-summary": true,
|
|
14733
15454
|
options: _ctx.options,
|
|
14734
15455
|
"is-product-list": (_a = _ctx.isProductList) != null ? _a : false
|
|
@@ -14740,7 +15461,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14740
15461
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14741
15462
|
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$E, {
|
|
14742
15463
|
key: 2,
|
|
14743
|
-
options: _ctx.options.filters
|
|
15464
|
+
options: _ctx.options.filters,
|
|
15465
|
+
onFilter: handleParamsChange
|
|
14744
15466
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14745
15467
|
unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$D, {
|
|
14746
15468
|
key: 3,
|
|
@@ -14751,17 +15473,19 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14751
15473
|
key: 0,
|
|
14752
15474
|
options: (_b = _ctx.options.filters) != null ? _b : {},
|
|
14753
15475
|
ref_key: "searchResultsFilters",
|
|
14754
|
-
ref: searchResultsFilters
|
|
15476
|
+
ref: searchResultsFilters,
|
|
15477
|
+
onFilter: handleParamsChange
|
|
14755
15478
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14756
15479
|
createBaseVNode("div", _hoisted_3$4, [
|
|
14757
|
-
createVNode(_sfc_main$
|
|
14758
|
-
createVNode(_sfc_main$
|
|
15480
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15481
|
+
createVNode(_sfc_main$S, {
|
|
14759
15482
|
options: _ctx.options,
|
|
14760
15483
|
"is-product-list": (_c = _ctx.isProductList) != null ? _c : false
|
|
14761
15484
|
}, null, 8, ["options", "is-product-list"]),
|
|
14762
15485
|
createVNode(_sfc_main$e, {
|
|
14763
15486
|
options: _ctx.options,
|
|
14764
|
-
ssr: ssrEnabled.value
|
|
15487
|
+
ssr: ssrEnabled.value,
|
|
15488
|
+
onFilter: handleParamsChange
|
|
14765
15489
|
}, {
|
|
14766
15490
|
append: withCtx(() => [
|
|
14767
15491
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -14770,8 +15494,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14770
15494
|
}, 8, ["options", "ssr"])
|
|
14771
15495
|
])
|
|
14772
15496
|
])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
14773
|
-
createVNode(_sfc_main$
|
|
14774
|
-
createVNode(_sfc_main$
|
|
15497
|
+
createVNode(_sfc_main$U, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
15498
|
+
createVNode(_sfc_main$S, {
|
|
14775
15499
|
options: _ctx.options,
|
|
14776
15500
|
"is-product-list": (_d = _ctx.isProductList) != null ? _d : false
|
|
14777
15501
|
}, null, 8, ["options", "is-product-list"]),
|
|
@@ -14780,11 +15504,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14780
15504
|
key: 0,
|
|
14781
15505
|
options: (_e = _ctx.options.filters) != null ? _e : {},
|
|
14782
15506
|
ref_key: "searchResultsFilters",
|
|
14783
|
-
ref: searchResultsFilters
|
|
15507
|
+
ref: searchResultsFilters,
|
|
15508
|
+
onFilter: handleParamsChange
|
|
14784
15509
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14785
15510
|
createVNode(_sfc_main$e, {
|
|
14786
15511
|
options: _ctx.options,
|
|
14787
|
-
ssr: ssrEnabled.value
|
|
15512
|
+
ssr: ssrEnabled.value,
|
|
15513
|
+
onFilter: handleParamsChange
|
|
14788
15514
|
}, createSlots({
|
|
14789
15515
|
append: withCtx(() => [
|
|
14790
15516
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -17314,8 +18040,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
17314
18040
|
function createRelationalOperation(operator) {
|
|
17315
18041
|
return function(value, other) {
|
|
17316
18042
|
if (!(typeof value == "string" && typeof other == "string")) {
|
|
17317
|
-
value =
|
|
17318
|
-
other =
|
|
18043
|
+
value = toNumber2(value);
|
|
18044
|
+
other = toNumber2(other);
|
|
17319
18045
|
}
|
|
17320
18046
|
return operator(value, other);
|
|
17321
18047
|
};
|
|
@@ -17349,7 +18075,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
17349
18075
|
function createRound(methodName) {
|
|
17350
18076
|
var func = Math2[methodName];
|
|
17351
18077
|
return function(number, precision) {
|
|
17352
|
-
number =
|
|
18078
|
+
number = toNumber2(number);
|
|
17353
18079
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
|
17354
18080
|
if (precision && nativeIsFinite(number)) {
|
|
17355
18081
|
var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
|
|
@@ -18707,11 +19433,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
18707
19433
|
if (typeof func != "function") {
|
|
18708
19434
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
18709
19435
|
}
|
|
18710
|
-
wait =
|
|
19436
|
+
wait = toNumber2(wait) || 0;
|
|
18711
19437
|
if (isObject2(options)) {
|
|
18712
19438
|
leading = !!options.leading;
|
|
18713
19439
|
maxing = "maxWait" in options;
|
|
18714
|
-
maxWait = maxing ? nativeMax(
|
|
19440
|
+
maxWait = maxing ? nativeMax(toNumber2(options.maxWait) || 0, wait) : maxWait;
|
|
18715
19441
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
18716
19442
|
}
|
|
18717
19443
|
function invokeFunc(time) {
|
|
@@ -18787,7 +19513,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
18787
19513
|
return baseDelay(func, 1, args);
|
|
18788
19514
|
});
|
|
18789
19515
|
var delay = baseRest(function(func, wait, args) {
|
|
18790
|
-
return baseDelay(func,
|
|
19516
|
+
return baseDelay(func, toNumber2(wait) || 0, args);
|
|
18791
19517
|
});
|
|
18792
19518
|
function flip(func) {
|
|
18793
19519
|
return createWrap(func, WRAP_FLIP_FLAG);
|
|
@@ -19084,7 +19810,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
19084
19810
|
if (!value) {
|
|
19085
19811
|
return value === 0 ? value : 0;
|
|
19086
19812
|
}
|
|
19087
|
-
value =
|
|
19813
|
+
value = toNumber2(value);
|
|
19088
19814
|
if (value === INFINITY || value === -INFINITY) {
|
|
19089
19815
|
var sign = value < 0 ? -1 : 1;
|
|
19090
19816
|
return sign * MAX_INTEGER;
|
|
@@ -19098,7 +19824,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
19098
19824
|
function toLength(value) {
|
|
19099
19825
|
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
|
19100
19826
|
}
|
|
19101
|
-
function
|
|
19827
|
+
function toNumber2(value) {
|
|
19102
19828
|
if (typeof value == "number") {
|
|
19103
19829
|
return value;
|
|
19104
19830
|
}
|
|
@@ -19361,14 +20087,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
19361
20087
|
lower = undefined$1;
|
|
19362
20088
|
}
|
|
19363
20089
|
if (upper !== undefined$1) {
|
|
19364
|
-
upper =
|
|
20090
|
+
upper = toNumber2(upper);
|
|
19365
20091
|
upper = upper === upper ? upper : 0;
|
|
19366
20092
|
}
|
|
19367
20093
|
if (lower !== undefined$1) {
|
|
19368
|
-
lower =
|
|
20094
|
+
lower = toNumber2(lower);
|
|
19369
20095
|
lower = lower === lower ? lower : 0;
|
|
19370
20096
|
}
|
|
19371
|
-
return baseClamp(
|
|
20097
|
+
return baseClamp(toNumber2(number), lower, upper);
|
|
19372
20098
|
}
|
|
19373
20099
|
function inRange(number, start, end) {
|
|
19374
20100
|
start = toFinite(start);
|
|
@@ -19378,7 +20104,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
19378
20104
|
} else {
|
|
19379
20105
|
end = toFinite(end);
|
|
19380
20106
|
}
|
|
19381
|
-
number =
|
|
20107
|
+
number = toNumber2(number);
|
|
19382
20108
|
return baseInRange(number, start, end);
|
|
19383
20109
|
}
|
|
19384
20110
|
function random(lower, upper, floating) {
|
|
@@ -20164,7 +20890,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20164
20890
|
lodash2.toInteger = toInteger;
|
|
20165
20891
|
lodash2.toLength = toLength;
|
|
20166
20892
|
lodash2.toLower = toLower;
|
|
20167
|
-
lodash2.toNumber =
|
|
20893
|
+
lodash2.toNumber = toNumber2;
|
|
20168
20894
|
lodash2.toSafeInteger = toSafeInteger;
|
|
20169
20895
|
lodash2.toString = toString;
|
|
20170
20896
|
lodash2.toUpper = toUpper;
|
|
@@ -20406,7 +21132,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20406
21132
|
onClick: withModifiers(innerClick, ["stop"])
|
|
20407
21133
|
}, [
|
|
20408
21134
|
createBaseVNode("div", _hoisted_2$7, [
|
|
20409
|
-
createVNode(_sfc_main$
|
|
21135
|
+
createVNode(_sfc_main$V, {
|
|
20410
21136
|
options: fullSearchBoxOptions.value,
|
|
20411
21137
|
"is-search-container": true,
|
|
20412
21138
|
ref_key: "searchBox",
|
|
@@ -21777,7 +22503,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
21777
22503
|
class: "lupa-chat-spinner-main"
|
|
21778
22504
|
};
|
|
21779
22505
|
const _hoisted_5 = { class: "lupasearch-chat-input" };
|
|
21780
|
-
const _sfc_main$
|
|
22506
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
21781
22507
|
__name: "ChatContainer",
|
|
21782
22508
|
props: {
|
|
21783
22509
|
options: {}
|
|
@@ -24310,8 +25036,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
24310
25036
|
function createRelationalOperation(operator) {
|
|
24311
25037
|
return function(value, other) {
|
|
24312
25038
|
if (!(typeof value == "string" && typeof other == "string")) {
|
|
24313
|
-
value =
|
|
24314
|
-
other =
|
|
25039
|
+
value = toNumber2(value);
|
|
25040
|
+
other = toNumber2(other);
|
|
24315
25041
|
}
|
|
24316
25042
|
return operator(value, other);
|
|
24317
25043
|
};
|
|
@@ -24345,7 +25071,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
24345
25071
|
function createRound(methodName) {
|
|
24346
25072
|
var func = Math2[methodName];
|
|
24347
25073
|
return function(number, precision) {
|
|
24348
|
-
number =
|
|
25074
|
+
number = toNumber2(number);
|
|
24349
25075
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
|
24350
25076
|
if (precision && nativeIsFinite(number)) {
|
|
24351
25077
|
var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
|
|
@@ -25703,11 +26429,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
25703
26429
|
if (typeof func != "function") {
|
|
25704
26430
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
25705
26431
|
}
|
|
25706
|
-
wait =
|
|
26432
|
+
wait = toNumber2(wait) || 0;
|
|
25707
26433
|
if (isObject2(options)) {
|
|
25708
26434
|
leading = !!options.leading;
|
|
25709
26435
|
maxing = "maxWait" in options;
|
|
25710
|
-
maxWait = maxing ? nativeMax(
|
|
26436
|
+
maxWait = maxing ? nativeMax(toNumber2(options.maxWait) || 0, wait) : maxWait;
|
|
25711
26437
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
25712
26438
|
}
|
|
25713
26439
|
function invokeFunc(time) {
|
|
@@ -25783,7 +26509,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
25783
26509
|
return baseDelay(func, 1, args);
|
|
25784
26510
|
});
|
|
25785
26511
|
var delay = baseRest(function(func, wait, args) {
|
|
25786
|
-
return baseDelay(func,
|
|
26512
|
+
return baseDelay(func, toNumber2(wait) || 0, args);
|
|
25787
26513
|
});
|
|
25788
26514
|
function flip(func) {
|
|
25789
26515
|
return createWrap(func, WRAP_FLIP_FLAG);
|
|
@@ -26080,7 +26806,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
26080
26806
|
if (!value) {
|
|
26081
26807
|
return value === 0 ? value : 0;
|
|
26082
26808
|
}
|
|
26083
|
-
value =
|
|
26809
|
+
value = toNumber2(value);
|
|
26084
26810
|
if (value === INFINITY || value === -INFINITY) {
|
|
26085
26811
|
var sign = value < 0 ? -1 : 1;
|
|
26086
26812
|
return sign * MAX_INTEGER;
|
|
@@ -26094,7 +26820,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
26094
26820
|
function toLength(value) {
|
|
26095
26821
|
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
|
26096
26822
|
}
|
|
26097
|
-
function
|
|
26823
|
+
function toNumber2(value) {
|
|
26098
26824
|
if (typeof value == "number") {
|
|
26099
26825
|
return value;
|
|
26100
26826
|
}
|
|
@@ -26357,14 +27083,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
26357
27083
|
lower = undefined$1;
|
|
26358
27084
|
}
|
|
26359
27085
|
if (upper !== undefined$1) {
|
|
26360
|
-
upper =
|
|
27086
|
+
upper = toNumber2(upper);
|
|
26361
27087
|
upper = upper === upper ? upper : 0;
|
|
26362
27088
|
}
|
|
26363
27089
|
if (lower !== undefined$1) {
|
|
26364
|
-
lower =
|
|
27090
|
+
lower = toNumber2(lower);
|
|
26365
27091
|
lower = lower === lower ? lower : 0;
|
|
26366
27092
|
}
|
|
26367
|
-
return baseClamp(
|
|
27093
|
+
return baseClamp(toNumber2(number), lower, upper);
|
|
26368
27094
|
}
|
|
26369
27095
|
function inRange(number, start, end) {
|
|
26370
27096
|
start = toFinite(start);
|
|
@@ -26374,7 +27100,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
26374
27100
|
} else {
|
|
26375
27101
|
end = toFinite(end);
|
|
26376
27102
|
}
|
|
26377
|
-
number =
|
|
27103
|
+
number = toNumber2(number);
|
|
26378
27104
|
return baseInRange(number, start, end);
|
|
26379
27105
|
}
|
|
26380
27106
|
function random(lower, upper, floating) {
|
|
@@ -27160,7 +27886,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
27160
27886
|
lodash2.toInteger = toInteger;
|
|
27161
27887
|
lodash2.toLength = toLength;
|
|
27162
27888
|
lodash2.toLower = toLower;
|
|
27163
|
-
lodash2.toNumber =
|
|
27889
|
+
lodash2.toNumber = toNumber2;
|
|
27164
27890
|
lodash2.toSafeInteger = toSafeInteger;
|
|
27165
27891
|
lodash2.toString = toString;
|
|
27166
27892
|
lodash2.toUpper = toUpper;
|
|
@@ -27418,7 +28144,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
27418
28144
|
};
|
|
27419
28145
|
__expose({ fetch: fetch2 });
|
|
27420
28146
|
return (_ctx, _cache) => {
|
|
27421
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
28147
|
+
return openBlock(), createBlock(unref(_sfc_main$V), {
|
|
27422
28148
|
options: fullSearchBoxOptions.value,
|
|
27423
28149
|
ref_key: "searchBox",
|
|
27424
28150
|
ref: searchBox2
|
|
@@ -28255,7 +28981,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
28255
28981
|
}
|
|
28256
28982
|
return;
|
|
28257
28983
|
}
|
|
28258
|
-
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$
|
|
28984
|
+
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1n, {
|
|
28259
28985
|
options
|
|
28260
28986
|
});
|
|
28261
28987
|
if (!instance) {
|