vviinn-widgets 2.162.0 → 2.163.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/cjs/{package-8f6bcd6f.js → package-555b2eaa.js} +1 -1
- package/dist/cjs/vviinn-camera_12.cjs.entry.js +9 -2
- package/dist/cjs/vviinn-carousel_10.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-detected-object_7.cjs.entry.js +1 -1
- package/dist/collection/components/vviinn-results/vviinn-results.js +9 -0
- package/dist/esm/{package-8c6cbb74.js → package-b8f0d252.js} +1 -1
- package/dist/esm/vviinn-camera_12.entry.js +9 -2
- package/dist/esm/vviinn-carousel_10.entry.js +1 -1
- package/dist/esm/vviinn-detected-object_7.entry.js +1 -1
- package/dist/types/components/vviinn-results/vviinn-results.d.ts +1 -0
- package/{www/build/p-cc16c082.js → dist/vviinn-widgets/p-447a0df0.js} +1 -1
- package/dist/vviinn-widgets/{p-d3ad08eb.entry.js → p-706cd252.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-d1626359.entry.js → p-82193859.entry.js} +1 -1
- package/{www/build/p-3621ecd2.entry.js → dist/vviinn-widgets/p-84bbd7a6.entry.js} +2 -2
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/{dist/vviinn-widgets/p-cc16c082.js → www/build/p-447a0df0.js} +1 -1
- package/www/build/{p-d3ad08eb.entry.js → p-706cd252.entry.js} +1 -1
- package/www/build/{p-d1626359.entry.js → p-82193859.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-3621ecd2.entry.js → www/build/p-84bbd7a6.entry.js} +2 -2
- package/www/build/vviinn-widgets.esm.js +1 -1
|
@@ -8,7 +8,7 @@ const customizedSlots = require('./customized-slots-09407c18.js');
|
|
|
8
8
|
const index$2 = require('./index-c53c869d.js');
|
|
9
9
|
const index$1 = require('./index-1953bc5b.js');
|
|
10
10
|
const Rectangle = require('./Rectangle-baf86229.js');
|
|
11
|
-
const _package = require('./package-
|
|
11
|
+
const _package = require('./package-555b2eaa.js');
|
|
12
12
|
const resources = require('./resources-9a669f8f.js');
|
|
13
13
|
const index$3 = require('./index-8829b0f1.js');
|
|
14
14
|
const constants$1 = require('./constants-0a36f053.js');
|
|
@@ -4082,6 +4082,12 @@ const VviinnResults = class {
|
|
|
4082
4082
|
this.innerTextSearchQuery = newQuery;
|
|
4083
4083
|
this.getTextSearchResults();
|
|
4084
4084
|
}
|
|
4085
|
+
watchSearchId(newId) {
|
|
4086
|
+
if (this.showInWidget)
|
|
4087
|
+
return;
|
|
4088
|
+
if (newId)
|
|
4089
|
+
search_store.makeVisualSearchRequest(this.storeName, newId);
|
|
4090
|
+
}
|
|
4085
4091
|
trackProductLoad({ detail }) {
|
|
4086
4092
|
const productLoadEvent = this.getProductTrackEvent(detail, "load");
|
|
4087
4093
|
search_store.trackEvent(productLoadEvent);
|
|
@@ -4212,7 +4218,8 @@ const VviinnResults = class {
|
|
|
4212
4218
|
}
|
|
4213
4219
|
get el() { return index.getElement(this); }
|
|
4214
4220
|
static get watchers() { return {
|
|
4215
|
-
"textSearchQuery": ["watchTextSearchQuery"]
|
|
4221
|
+
"textSearchQuery": ["watchTextSearchQuery"],
|
|
4222
|
+
"searchId": ["watchSearchId"]
|
|
4216
4223
|
}; }
|
|
4217
4224
|
};
|
|
4218
4225
|
VviinnResults.style = vviinnResultsCss;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1a40d6c9.js');
|
|
6
6
|
const search_store = require('./search.store-a0492e39.js');
|
|
7
|
-
const _package = require('./package-
|
|
7
|
+
const _package = require('./package-555b2eaa.js');
|
|
8
8
|
const index$1 = require('./index-c53c869d.js');
|
|
9
9
|
const constants = require('./constants-5598c49b.js');
|
|
10
10
|
const Rectangle = require('./Rectangle-baf86229.js');
|
|
@@ -7,7 +7,7 @@ const search_store = require('./search.store-a0492e39.js');
|
|
|
7
7
|
const Rectangle = require('./Rectangle-baf86229.js');
|
|
8
8
|
const WarningIcon = require('./WarningIcon-db443b71.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-09407c18.js');
|
|
10
|
-
const _package = require('./package-
|
|
10
|
+
const _package = require('./package-555b2eaa.js');
|
|
11
11
|
const index$1 = require('./index-8829b0f1.js');
|
|
12
12
|
const constants = require('./constants-5598c49b.js');
|
|
13
13
|
|
|
@@ -297,6 +297,12 @@ export class VviinnResults {
|
|
|
297
297
|
this.innerTextSearchQuery = newQuery;
|
|
298
298
|
this.getTextSearchResults();
|
|
299
299
|
}
|
|
300
|
+
watchSearchId(newId) {
|
|
301
|
+
if (this.showInWidget)
|
|
302
|
+
return;
|
|
303
|
+
if (newId)
|
|
304
|
+
makeVisualSearchRequest(this.storeName, newId);
|
|
305
|
+
}
|
|
300
306
|
trackProductLoad({ detail }) {
|
|
301
307
|
const productLoadEvent = this.getProductTrackEvent(detail, "load");
|
|
302
308
|
trackEvent(productLoadEvent);
|
|
@@ -1260,6 +1266,9 @@ export class VviinnResults {
|
|
|
1260
1266
|
return [{
|
|
1261
1267
|
"propName": "textSearchQuery",
|
|
1262
1268
|
"methodName": "watchTextSearchQuery"
|
|
1269
|
+
}, {
|
|
1270
|
+
"propName": "searchId",
|
|
1271
|
+
"methodName": "watchSearchId"
|
|
1263
1272
|
}];
|
|
1264
1273
|
}
|
|
1265
1274
|
static get listeners() {
|
|
@@ -4,7 +4,7 @@ import { s as slotChangeListener, p as productCardSlotNames, v as vprIconSlotNam
|
|
|
4
4
|
import { P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, e as createWidgetEvent, j as createFilterEvent, v as v4, c as createAddToBasketEvent, d as createAddToWishlistEvent, f as createResultEventByType, h as createProductEventByType, g as getCustomLabels, k as createImageSearchEvent } from './index-e4a52727.js';
|
|
5
5
|
import { s as setLocalStorageItems, g as getLocalStorageItems, c as cleanLocalStorage } from './index-52ea1bdf.js';
|
|
6
6
|
import { f as fromImage, i as instance } from './Rectangle-abec127b.js';
|
|
7
|
-
import { c as campaignTypeNames, v as version } from './package-
|
|
7
|
+
import { c as campaignTypeNames, v as version } from './package-b8f0d252.js';
|
|
8
8
|
import { r as resources } from './resources-4651fe88.js';
|
|
9
9
|
import { b as productCardsGridPart, a as productCardParts, m as modalParts, f as filtersParts, c as extendedFiltersParts, s as searchBarParts, d as searchWidgetFilterParts, g as searchWidgetButtonParts } from './index-955afdff.js';
|
|
10
10
|
import { f as findSlotElements, g as getSlotNames, D as DEFAULT_EXAMPLE_IMAGE } from './constants-c2f6bdfe.js';
|
|
@@ -4078,6 +4078,12 @@ const VviinnResults = class {
|
|
|
4078
4078
|
this.innerTextSearchQuery = newQuery;
|
|
4079
4079
|
this.getTextSearchResults();
|
|
4080
4080
|
}
|
|
4081
|
+
watchSearchId(newId) {
|
|
4082
|
+
if (this.showInWidget)
|
|
4083
|
+
return;
|
|
4084
|
+
if (newId)
|
|
4085
|
+
makeVisualSearchRequest(this.storeName, newId);
|
|
4086
|
+
}
|
|
4081
4087
|
trackProductLoad({ detail }) {
|
|
4082
4088
|
const productLoadEvent = this.getProductTrackEvent(detail, "load");
|
|
4083
4089
|
trackEvent(productLoadEvent);
|
|
@@ -4208,7 +4214,8 @@ const VviinnResults = class {
|
|
|
4208
4214
|
}
|
|
4209
4215
|
get el() { return getElement(this); }
|
|
4210
4216
|
static get watchers() { return {
|
|
4211
|
-
"textSearchQuery": ["watchTextSearchQuery"]
|
|
4217
|
+
"textSearchQuery": ["watchTextSearchQuery"],
|
|
4218
|
+
"searchId": ["watchSearchId"]
|
|
4212
4219
|
}; }
|
|
4213
4220
|
};
|
|
4214
4221
|
VviinnResults.style = vviinnResultsCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, F as Fragment, H as Host, g as getElement } from './index-057b9128.js';
|
|
2
2
|
import { h as has, t as tuple, a as addIfNotEmpty, _ as _function, b as _Array, g as globalState, u as useSearchStore, O as Option, S as Semigroup, E as Either, s as searchState, p as pipe, c as chainW, m as makeRequest, f as fromEither, d as getApiPath, e as createInitPostRequest, A as Apply, i as updateGlobalState, j as trackEvent, T as TaskEither } from './search.store-e2fcd9a6.js';
|
|
3
|
-
import { c as campaignTypeNames, f as fromString, a as fold, v as version } from './package-
|
|
3
|
+
import { c as campaignTypeNames, f as fromString, a as fold, v as version } from './package-b8f0d252.js';
|
|
4
4
|
import { C as CAROUSEL_IMAGE_WIDTH_CSS_VAR, S as SET_MODE_IMAGE_WIDTH_CSS_VAR, a as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, b as CONTENT_GROUP_CSS_CLASS, g as getCustomLabels, P as PlusIcon, v as v4, c as createAddToBasketEvent, d as createAddToWishlistEvent, e as createWidgetEvent, f as createResultEventByType, h as createProductEventByType, i as getRecommendationsBody } from './index-e4a52727.js';
|
|
5
5
|
import { P as PRODUCT_CARD_IMAGE_WIDTH, D as DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH } from './constants-c02c4b27.js';
|
|
6
6
|
import { i as instance, a as isClickedInRectBound } from './Rectangle-abec127b.js';
|
|
@@ -3,7 +3,7 @@ import { _ as _function, O as Option, D as detectedObjectEq, s as searchState, a
|
|
|
3
3
|
import { s as scaleWithSized, c as center, i as instance } from './Rectangle-abec127b.js';
|
|
4
4
|
import { W as WarningIcon } from './WarningIcon-7896b328.js';
|
|
5
5
|
import { s as slotChangeListener } from './customized-slots-f8cebd42.js';
|
|
6
|
-
import { c as campaignTypeNames, v as version } from './package-
|
|
6
|
+
import { c as campaignTypeNames, v as version } from './package-b8f0d252.js';
|
|
7
7
|
import { m as modalParts } from './index-955afdff.js';
|
|
8
8
|
import { P as PRODUCT_CARD_IMAGE_WIDTH, D as DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH } from './constants-c02c4b27.js';
|
|
9
9
|
|
|
@@ -183,6 +183,7 @@ export declare class VviinnResults {
|
|
|
183
183
|
connectedCallback(): void;
|
|
184
184
|
disconnectedCallback(): void;
|
|
185
185
|
watchTextSearchQuery(newQuery: string): void;
|
|
186
|
+
watchSearchId(newId: string): void;
|
|
186
187
|
trackProductLoad({ detail }: ProductCardEvent): void;
|
|
187
188
|
trackProductView({ detail }: ProductCardEvent): void;
|
|
188
189
|
trackProductClick({ detail }: ProductCardEvent): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={VPR:"Similar Products",VPS:"Visual Search",VCS:"Cross-Selling",TPS:"Text Product Search"};function a(t,a){return r=>(t=>"VPR"===t._tag)(r)?t():a()}function r(t){return"VPR"===t?{_tag:"VPR"}:{_tag:"VCS"}}const s="2.
|
|
1
|
+
const t={VPR:"Similar Products",VPS:"Visual Search",VCS:"Cross-Selling",TPS:"Text Product Search"};function a(t,a){return r=>(t=>"VPR"===t._tag)(r)?t():a()}function r(t){return"VPR"===t?{_tag:"VPR"}:{_tag:"VCS"}}const s="2.163.1";export{a,t as c,r as f,s as v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as o,c as e,H as i,g as r}from"./p-cb343b7a.js";import{_ as s,O as n,D as a,s as l,a as c,u as h}from"./p-a433eef2.js";import{s as d,c as p,i as f}from"./p-cc05dbfb.js";import{W as b}from"./p-d66d9ba6.js";import{s as g}from"./p-c5497d92.js";import{c as u,v as x}from"./p-cc16c082.js";import{m as v}from"./p-3d13eb66.js";import{P as m,D as w}from"./p-689b9f1a.js";const C=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M7.82499 13L12.725 17.9C12.925 18.1 13.0208 18.3333 13.0125 18.6C13.0042 18.8667 12.9 19.1 12.7 19.3C12.5 19.4833 12.2667 19.5792 12 19.5875C11.7333 19.5958 11.5 19.5 11.3 19.3L4.69999 12.7C4.59999 12.6 4.52915 12.4917 4.48749 12.375C4.44582 12.2583 4.42499 12.1333 4.42499 12C4.42499 11.8667 4.44582 11.7417 4.48749 11.625C4.52915 11.5083 4.59999 11.4 4.69999 11.3L11.3 4.69999C11.4833 4.51665 11.7125 4.42499 11.9875 4.42499C12.2625 4.42499 12.5 4.51665 12.7 4.69999C12.9 4.89999 13 5.13749 13 5.41249C13 5.68749 12.9 5.92499 12.7 6.12499L7.82499 11H19C19.2833 11 19.5208 11.0958 19.7125 11.2875C19.9042 11.4792 20 11.7167 20 12C20 12.2833 19.9042 12.5208 19.7125 12.7125C19.5208 12.9042 19.2833 13 19 13H7.82499Z",fill:"currentColor"})),y=({width:o=24,height:e=24})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:e,viewBox:"0 0 24 24",fill:"currentColor"},t("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z"}),t("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z"}),t("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z"}),t("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z"}),t("path",{d:"M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z"}),t("path",{d:"M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z"}),t("path",{d:"M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z"}),t("path",{d:"M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z"})),k=({width:o=24,height:e=24})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:e,viewBox:"0 0 24 24",fill:"currentColor"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 13C20 13.55 20.45 14 21 14C21.55 14 22 13.55 22 13V5C22 3.35 20.65 2 19 2H11C10.45 2 10 2.45 10 3C10 3.55 10.45 4 11 4H19C19.55 4 20 4.45 20 5V13ZM2 19C2 20.65 3.35 22 5 22H13C13.55 22 14 21.55 14 21C14 20.45 13.55 20 13 20H5C4.45 20 4 19.55 4 19V11C4 10.45 3.55 10 3 10C2.45 10 2 10.45 2 11V19ZM12 16C11.45 16 11 15.55 11 15V13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H11V9C11 8.45 11.45 8 12 8C12.55 8 13 8.45 13 9V11H15C15.55 11 16 11.45 16 12C16 12.55 15.55 13 15 13H13V15C13 15.55 12.55 16 12 16Z"})),z=class{constructor(t){o(this,t),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.selectedDetectedObject=void 0,this.basicEventData=void 0,this.imageBounds=void 0,this.showInWidget=void 0,this.position=["0","0"]}getObjectPosition(){return s.pipe(n.fromNullable(this.imageBounds),n.map((t=>{const{left:o,top:e}=s.pipe(this.detectedObject,d(t),p);return[`${o}px`,`${e}px`]})),n.getOrElse((()=>["0","0"])))}selectDetectedObject(){const t=s.pipe(n.fromNullable(this.imageBounds),n.map((t=>d(t)(this.detectedObject))),n.toNullable);this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject,searchArea:t}))}isActive(){return!(!this.detectedObject||!this.selectedDetectedObject)&&a.equals(this.detectedObject,this.selectedDetectedObject)}render(){return t(i,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};z.style=':host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position));z-index:2}:host::before,:host::after{content:"";cursor:pointer;position:absolute;height:var(--size);width:var(--size);left:calc(-1 * var(--size) / 2);top:calc(-1 * var(--size) / 2)}:host::before{--size:36px;border-radius:50%;z-index:0;background:rgba(0, 0, 0, 0.16);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform 0.07s ease-in-out}:host::after{--size:13px;border-radius:50%;z-index:1;background:white;box-shadow:0px 2px 2px 0px rgba(0, 0, 0, 0.15);transition:transform 0.07s ease-in-out}:host(.active)::before{transform:scale(0.88);background:rgba(0, 0, 0, 0.4)}:host(.active)::after{transform:scale(0.67)}@media (min-width: 768px){:host(:not(.active):hover)::before{transform:scale(1.08);background:rgba(0, 0, 0, 0.32)}}';const V=class{constructor(t){o(this,t),this.handler=void 0}render(){return t(i,null,t("vviinn-error",null,t(b,null),t("h4",{slot:"title"},f.t("emptyResultsBlock.title")),"image"===l.searchType&&t("button",{slot:"action",onClick:this.handler},f.t("emptyResultsBlock.button"))))}},H=class{constructor(t){o(this,t),this.vviinnWidgetClose=e(this,"vviinnWidgetClose",7),this.active=!1,this.resetState=void 0,this.buttonElementId=void 0,this.widgetVersion=void 0,this.hideBackButton=!1,this.isFirstScreen=void 0,this.slider=!1}componentWillLoad(){g(this,this.el)}resetTopScroll(){const t=this.el.shadowRoot.querySelector(".body");null==t||t.scroll({top:0})}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit(Object.assign({campaignTypeId:"VPS",campaignTypeName:u.VPS,widgetVersion:this.widgetVersion},c("widgetId",this.buttonElementId)))}),this.slider?500:0)}handleAnimationEnd(t){"fade-in"===t.animationName&&(this.slider=!0)}render(){return t(i,{exportparts:v,class:{closed:!this.active,"first-screen":this.isFirstScreen},onAnimationEnd:t=>this.handleAnimationEnd(t)},t("div",{class:"head"},!this.hideBackButton&&t("button",{part:"secondary-action",onClick:()=>{this.resetState(),this.resetTopScroll()}},t(C,null)),t("div",{class:"title",part:"results-title"},(o=l.image)?t("img",{width:"28",height:"28",src:o.src,class:"title-image"}):null,t("slot",{name:"vviinn-image-search-modal-title"},f.t("imageSearchModalTitle"))),t("button",{onClick:()=>this.close(),class:"close-button",part:"close-button"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M12 13.3892L6.91958 18.4696C6.72248 18.6667 6.49095 18.7653 6.225 18.7653C5.95905 18.7653 5.72753 18.6667 5.53043 18.4696C5.33333 18.2725 5.23478 18.041 5.23478 17.775C5.23478 17.5091 5.33333 17.2776 5.53043 17.0805L10.6109 12L5.53043 6.9196C5.33333 6.7225 5.23478 6.49098 5.23478 6.22503C5.23478 5.95908 5.33333 5.72755 5.53043 5.53045C5.72753 5.33335 5.95905 5.2348 6.225 5.2348C6.49095 5.2348 6.72248 5.33335 6.91958 5.53045L12 10.6109L17.0804 5.53045C17.2775 5.33335 17.5091 5.2348 17.775 5.2348C18.041 5.2348 18.2725 5.33335 18.4696 5.53045C18.6667 5.72755 18.7652 5.95908 18.7652 6.22503C18.7652 6.49098 18.6667 6.7225 18.4696 6.9196L13.3892 12L18.4696 17.0805C18.6667 17.2776 18.7652 17.5091 18.7652 17.775C18.7652 18.041 18.6667 18.2725 18.4696 18.4696C18.2725 18.6667 18.041 18.7653 17.775 18.7653C17.5091 18.7653 17.2775 18.6667 17.0804 18.4696L12 13.3892Z",fill:"currentColor"})))),t("div",{class:"body"},t("slot",null)));var o}get el(){return r(this)}};H.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}:host{background:white;border-radius:var(--modal-border-radius, var(--border-radius-300));box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto;position:relative}.head{height:64px;font-family:var(--font-family, var(--font-family-base));position:absolute;width:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:var(--font-weight-600);font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:6px;color:#8d8d8d}button:hover{color:#000}@media (max-width: 768px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards;border-radius:24px 24px 0 0}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.head{z-index:1}:host(:not(.first-screen)) .head{position:sticky;background:#ffffff}.body{overflow-y:auto}:host(:not(.first-screen)) .body{padding-bottom:160px}.title{color:#161616;display:flex;align-items:center;font-weight:500;font-size:16px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;color:#6f6f6f;padding:0}button:hover{color:#000}:host(.first-screen) button,:host(.first-screen) button:hover{color:white}}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";const j=class{constructor(t){o(this,t)}render(){return t(i,null,t("slot",null))}};j.style=":host{animation:fade-in 0.5s ease-in-out;background:rgba(0, 0, 0, 0.5);display:block;height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100vw;z-index:9999}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}";const L=class{constructor(t){o(this,t)}render(){return t(i,null)}};L.style=":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:flex;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";const M=class{constructor(t){o(this,t),this.vviinnWidgetLoad=e(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=e(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=e(this,"vviinnWidgetClose",7),this.vviinnProductLoad=e(this,"vviinnProductLoad",7),this.vviinnProductClick=e(this,"vviinnProductClick",7),this.vviinnProductView=e(this,"vviinnProductView",7),this.vviinnResultLoad=e(this,"vviinnResultLoad",7),this.vviinnResultView=e(this,"vviinnResultView",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnAddToBasket=e(this,"vviinnAddToBasket",7),this.sidebar=null,this.sidebarCloseListener=()=>{var t;this.sidebar&&(null===(t=this.targetAppendSidebarTo)||void 0===t?void 0:t.contains(this.sidebar))&&this.targetAppendSidebarTo.removeChild(this.sidebar)},this.token=void 0,this.locale=void 0,this.currencySign=void 0,this.pricePrefix=void 0,this.productId=void 0,this.mode="continuity",this.campaigns="",this.excluded="",this.campaignType="set"===this.mode?"VCS":"VPR",this.color="",this.imageWidth=m,this.imageRatio=1,this.setItemsAmount=4,this.cssUrl=null,this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.productDetailsNewTab=!1,this.productDetailsRedirect=!0,this.addToBasketShow=!1,this.showFilters=!1,this.addPriceContainer=!1,this.setModeDiscounts="set"===this.mode?"5, 10, 15":"",this.updateButtonLocation="topAndItem",this.sidebarTitle=void 0,this.modalScrollbar=!1,this.position="bottom",this.addStyle=!0,this.favoriteShow=!1,this.appendSidebarToElement=void 0,this.appendSidebarToId=void 0,this.oneClickDiscoveryMode="standalone",this.apiPath=void 0,this.showInWidget=!1,this.imageResolutionWidth=w,this.targetAppendSidebarTo=void 0}connectedCallback(){this.iconSideSize="standalone"===this.oneClickDiscoveryMode?24:14;const{onChange:t}=h(this.showInWidget);this.disposeStoreListener=t("loading",(t=>{t&&this.sidebarCloseListener()}))}componentWillLoad(){this.appendSidebarToElement?this.targetAppendSidebarTo=this.appendSidebarToElement:this.appendSidebarToId&&(this.targetAppendSidebarTo=document.getElementById(this.appendSidebarToId))}appendSidebarToElementWatcher(){this.appendSidebarToElement&&(this.targetAppendSidebarTo=this.appendSidebarToElement)}render(){return t(i,{onClick:()=>{this.appendSidebarToId&&!this.targetAppendSidebarTo?setTimeout((()=>{this.handleClick()}),250):this.handleClick()},role:"button",tabindex:"0"},t("vviinn-button",{addStyle:this.addStyle,part:"vviinn-button"},t("slot",null,t("VCS"===this.campaignType?k:y,{width:this.iconSideSize,height:this.iconSideSize}))))}handleClick(){const t=document.createElement("vviinn-recommendations-sidebar");if(t.token=this.token,t.locale=this.locale,t.currencySign=this.currencySign,t.pricePrefix=this.pricePrefix,t.apiPath=this.apiPath,t.sidebarTitle=this.sidebarTitle,t.productId=this.productId,t.position=this.position,t.widgetScrollbar=this.modalScrollbar,t.campaigns=this.campaigns,t.campaignType=this.campaignType,t.color=this.color,t.imageWidth=this.imageWidth,t.buttonElementId=this.el.id,t.noResultText=this.noResultText,t.noResultShow=this.noResultShow,t.gridArrowsDynamic=this.gridArrowsDynamic,t.productDetailsNewTab=this.productDetailsNewTab,t.productDetailsRedirect=this.productDetailsRedirect,t.widgetVersion=x,t.showingInButton=!0,t.excluded=this.excluded,t.addToBasketShow=this.addToBasketShow,t.buttonChildren=this.el.children,t.showFilters=this.showFilters,t.cssUrl=this.cssUrl,t.imageRatio=this.imageRatio,t.setItemsAmount=this.setItemsAmount,t.setModeDiscounts=this.setModeDiscounts,t.updateButtonLocation=this.updateButtonLocation,t.addPriceContainer=this.addPriceContainer,t.favoriteShow=this.favoriteShow,t.showInModal="modal"===this.oneClickDiscoveryMode,t.isAppended=!!this.targetAppendSidebarTo||!!this.appendSidebarToElement,t.showInWidget=this.showInWidget,this.targetAppendSidebarTo?(t.mode="grid",t.useCarousel="append-slider"===this.oneClickDiscoveryMode):(t.mode="right"===this.position?"grid":this.mode,t.useCarousel="bottom"===this.position),this.sidebar=t,document.addEventListener("vviinnWidgetClose",this.sidebarCloseListener),this.targetAppendSidebarTo)return this.sidebar.showInCustomContainer=!0,this.targetAppendSidebarTo.innerHTML="",void this.targetAppendSidebarTo.append(this.sidebar);document.body.append(this.sidebar)}disconnectedCallback(){var t;this.sidebar&&document.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener),null===(t=this.disposeStoreListener)||void 0===t||t.call(this)}get el(){return r(this)}static get watchers(){return{appendSidebarToElement:["appendSidebarToElementWatcher"]}}};M.style=":host{display:block}";const Z=class{constructor(t){o(this,t),this.handler=void 0}render(){return t(i,null,t("vviinn-error",null,t(b,null),t("h4",{slot:"title"},f.t("wrongAspectRatioBlock.title")),t("button",{slot:"action",onClick:this.handler},f.t("wrongAspectRatioBlock.button"))))}};export{z as vviinn_detected_object,V as vviinn_empty_results,H as vviinn_modal,j as vviinn_overlay,L as vviinn_preloader,M as vviinn_vpr_button,Z as vviinn_wrong_aspect_ratio}
|
|
1
|
+
import{h as t,r as o,c as e,H as i,g as r}from"./p-cb343b7a.js";import{_ as s,O as n,D as a,s as l,a as c,u as h}from"./p-a433eef2.js";import{s as d,c as p,i as f}from"./p-cc05dbfb.js";import{W as b}from"./p-d66d9ba6.js";import{s as g}from"./p-c5497d92.js";import{c as u,v as x}from"./p-447a0df0.js";import{m as v}from"./p-3d13eb66.js";import{P as m,D as w}from"./p-689b9f1a.js";const C=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M7.82499 13L12.725 17.9C12.925 18.1 13.0208 18.3333 13.0125 18.6C13.0042 18.8667 12.9 19.1 12.7 19.3C12.5 19.4833 12.2667 19.5792 12 19.5875C11.7333 19.5958 11.5 19.5 11.3 19.3L4.69999 12.7C4.59999 12.6 4.52915 12.4917 4.48749 12.375C4.44582 12.2583 4.42499 12.1333 4.42499 12C4.42499 11.8667 4.44582 11.7417 4.48749 11.625C4.52915 11.5083 4.59999 11.4 4.69999 11.3L11.3 4.69999C11.4833 4.51665 11.7125 4.42499 11.9875 4.42499C12.2625 4.42499 12.5 4.51665 12.7 4.69999C12.9 4.89999 13 5.13749 13 5.41249C13 5.68749 12.9 5.92499 12.7 6.12499L7.82499 11H19C19.2833 11 19.5208 11.0958 19.7125 11.2875C19.9042 11.4792 20 11.7167 20 12C20 12.2833 19.9042 12.5208 19.7125 12.7125C19.5208 12.9042 19.2833 13 19 13H7.82499Z",fill:"currentColor"})),y=({width:o=24,height:e=24})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:e,viewBox:"0 0 24 24",fill:"currentColor"},t("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z"}),t("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z"}),t("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z"}),t("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z"}),t("path",{d:"M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z"}),t("path",{d:"M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z"}),t("path",{d:"M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z"}),t("path",{d:"M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z"})),k=({width:o=24,height:e=24})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:e,viewBox:"0 0 24 24",fill:"currentColor"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 13C20 13.55 20.45 14 21 14C21.55 14 22 13.55 22 13V5C22 3.35 20.65 2 19 2H11C10.45 2 10 2.45 10 3C10 3.55 10.45 4 11 4H19C19.55 4 20 4.45 20 5V13ZM2 19C2 20.65 3.35 22 5 22H13C13.55 22 14 21.55 14 21C14 20.45 13.55 20 13 20H5C4.45 20 4 19.55 4 19V11C4 10.45 3.55 10 3 10C2.45 10 2 10.45 2 11V19ZM12 16C11.45 16 11 15.55 11 15V13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H11V9C11 8.45 11.45 8 12 8C12.55 8 13 8.45 13 9V11H15C15.55 11 16 11.45 16 12C16 12.55 15.55 13 15 13H13V15C13 15.55 12.55 16 12 16Z"})),z=class{constructor(t){o(this,t),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.selectedDetectedObject=void 0,this.basicEventData=void 0,this.imageBounds=void 0,this.showInWidget=void 0,this.position=["0","0"]}getObjectPosition(){return s.pipe(n.fromNullable(this.imageBounds),n.map((t=>{const{left:o,top:e}=s.pipe(this.detectedObject,d(t),p);return[`${o}px`,`${e}px`]})),n.getOrElse((()=>["0","0"])))}selectDetectedObject(){const t=s.pipe(n.fromNullable(this.imageBounds),n.map((t=>d(t)(this.detectedObject))),n.toNullable);this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject,searchArea:t}))}isActive(){return!(!this.detectedObject||!this.selectedDetectedObject)&&a.equals(this.detectedObject,this.selectedDetectedObject)}render(){return t(i,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};z.style=':host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position));z-index:2}:host::before,:host::after{content:"";cursor:pointer;position:absolute;height:var(--size);width:var(--size);left:calc(-1 * var(--size) / 2);top:calc(-1 * var(--size) / 2)}:host::before{--size:36px;border-radius:50%;z-index:0;background:rgba(0, 0, 0, 0.16);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform 0.07s ease-in-out}:host::after{--size:13px;border-radius:50%;z-index:1;background:white;box-shadow:0px 2px 2px 0px rgba(0, 0, 0, 0.15);transition:transform 0.07s ease-in-out}:host(.active)::before{transform:scale(0.88);background:rgba(0, 0, 0, 0.4)}:host(.active)::after{transform:scale(0.67)}@media (min-width: 768px){:host(:not(.active):hover)::before{transform:scale(1.08);background:rgba(0, 0, 0, 0.32)}}';const V=class{constructor(t){o(this,t),this.handler=void 0}render(){return t(i,null,t("vviinn-error",null,t(b,null),t("h4",{slot:"title"},f.t("emptyResultsBlock.title")),"image"===l.searchType&&t("button",{slot:"action",onClick:this.handler},f.t("emptyResultsBlock.button"))))}},H=class{constructor(t){o(this,t),this.vviinnWidgetClose=e(this,"vviinnWidgetClose",7),this.active=!1,this.resetState=void 0,this.buttonElementId=void 0,this.widgetVersion=void 0,this.hideBackButton=!1,this.isFirstScreen=void 0,this.slider=!1}componentWillLoad(){g(this,this.el)}resetTopScroll(){const t=this.el.shadowRoot.querySelector(".body");null==t||t.scroll({top:0})}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit(Object.assign({campaignTypeId:"VPS",campaignTypeName:u.VPS,widgetVersion:this.widgetVersion},c("widgetId",this.buttonElementId)))}),this.slider?500:0)}handleAnimationEnd(t){"fade-in"===t.animationName&&(this.slider=!0)}render(){return t(i,{exportparts:v,class:{closed:!this.active,"first-screen":this.isFirstScreen},onAnimationEnd:t=>this.handleAnimationEnd(t)},t("div",{class:"head"},!this.hideBackButton&&t("button",{part:"secondary-action",onClick:()=>{this.resetState(),this.resetTopScroll()}},t(C,null)),t("div",{class:"title",part:"results-title"},(o=l.image)?t("img",{width:"28",height:"28",src:o.src,class:"title-image"}):null,t("slot",{name:"vviinn-image-search-modal-title"},f.t("imageSearchModalTitle"))),t("button",{onClick:()=>this.close(),class:"close-button",part:"close-button"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M12 13.3892L6.91958 18.4696C6.72248 18.6667 6.49095 18.7653 6.225 18.7653C5.95905 18.7653 5.72753 18.6667 5.53043 18.4696C5.33333 18.2725 5.23478 18.041 5.23478 17.775C5.23478 17.5091 5.33333 17.2776 5.53043 17.0805L10.6109 12L5.53043 6.9196C5.33333 6.7225 5.23478 6.49098 5.23478 6.22503C5.23478 5.95908 5.33333 5.72755 5.53043 5.53045C5.72753 5.33335 5.95905 5.2348 6.225 5.2348C6.49095 5.2348 6.72248 5.33335 6.91958 5.53045L12 10.6109L17.0804 5.53045C17.2775 5.33335 17.5091 5.2348 17.775 5.2348C18.041 5.2348 18.2725 5.33335 18.4696 5.53045C18.6667 5.72755 18.7652 5.95908 18.7652 6.22503C18.7652 6.49098 18.6667 6.7225 18.4696 6.9196L13.3892 12L18.4696 17.0805C18.6667 17.2776 18.7652 17.5091 18.7652 17.775C18.7652 18.041 18.6667 18.2725 18.4696 18.4696C18.2725 18.6667 18.041 18.7653 17.775 18.7653C17.5091 18.7653 17.2775 18.6667 17.0804 18.4696L12 13.3892Z",fill:"currentColor"})))),t("div",{class:"body"},t("slot",null)));var o}get el(){return r(this)}};H.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}:host{background:white;border-radius:var(--modal-border-radius, var(--border-radius-300));box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto;position:relative}.head{height:64px;font-family:var(--font-family, var(--font-family-base));position:absolute;width:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:var(--font-weight-600);font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:6px;color:#8d8d8d}button:hover{color:#000}@media (max-width: 768px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards;border-radius:24px 24px 0 0}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.head{z-index:1}:host(:not(.first-screen)) .head{position:sticky;background:#ffffff}.body{overflow-y:auto}:host(:not(.first-screen)) .body{padding-bottom:160px}.title{color:#161616;display:flex;align-items:center;font-weight:500;font-size:16px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;color:#6f6f6f;padding:0}button:hover{color:#000}:host(.first-screen) button,:host(.first-screen) button:hover{color:white}}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";const j=class{constructor(t){o(this,t)}render(){return t(i,null,t("slot",null))}};j.style=":host{animation:fade-in 0.5s ease-in-out;background:rgba(0, 0, 0, 0.5);display:block;height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100vw;z-index:9999}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}";const L=class{constructor(t){o(this,t)}render(){return t(i,null)}};L.style=":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:flex;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";const M=class{constructor(t){o(this,t),this.vviinnWidgetLoad=e(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=e(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=e(this,"vviinnWidgetClose",7),this.vviinnProductLoad=e(this,"vviinnProductLoad",7),this.vviinnProductClick=e(this,"vviinnProductClick",7),this.vviinnProductView=e(this,"vviinnProductView",7),this.vviinnResultLoad=e(this,"vviinnResultLoad",7),this.vviinnResultView=e(this,"vviinnResultView",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnAddToBasket=e(this,"vviinnAddToBasket",7),this.sidebar=null,this.sidebarCloseListener=()=>{var t;this.sidebar&&(null===(t=this.targetAppendSidebarTo)||void 0===t?void 0:t.contains(this.sidebar))&&this.targetAppendSidebarTo.removeChild(this.sidebar)},this.token=void 0,this.locale=void 0,this.currencySign=void 0,this.pricePrefix=void 0,this.productId=void 0,this.mode="continuity",this.campaigns="",this.excluded="",this.campaignType="set"===this.mode?"VCS":"VPR",this.color="",this.imageWidth=m,this.imageRatio=1,this.setItemsAmount=4,this.cssUrl=null,this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.productDetailsNewTab=!1,this.productDetailsRedirect=!0,this.addToBasketShow=!1,this.showFilters=!1,this.addPriceContainer=!1,this.setModeDiscounts="set"===this.mode?"5, 10, 15":"",this.updateButtonLocation="topAndItem",this.sidebarTitle=void 0,this.modalScrollbar=!1,this.position="bottom",this.addStyle=!0,this.favoriteShow=!1,this.appendSidebarToElement=void 0,this.appendSidebarToId=void 0,this.oneClickDiscoveryMode="standalone",this.apiPath=void 0,this.showInWidget=!1,this.imageResolutionWidth=w,this.targetAppendSidebarTo=void 0}connectedCallback(){this.iconSideSize="standalone"===this.oneClickDiscoveryMode?24:14;const{onChange:t}=h(this.showInWidget);this.disposeStoreListener=t("loading",(t=>{t&&this.sidebarCloseListener()}))}componentWillLoad(){this.appendSidebarToElement?this.targetAppendSidebarTo=this.appendSidebarToElement:this.appendSidebarToId&&(this.targetAppendSidebarTo=document.getElementById(this.appendSidebarToId))}appendSidebarToElementWatcher(){this.appendSidebarToElement&&(this.targetAppendSidebarTo=this.appendSidebarToElement)}render(){return t(i,{onClick:()=>{this.appendSidebarToId&&!this.targetAppendSidebarTo?setTimeout((()=>{this.handleClick()}),250):this.handleClick()},role:"button",tabindex:"0"},t("vviinn-button",{addStyle:this.addStyle,part:"vviinn-button"},t("slot",null,t("VCS"===this.campaignType?k:y,{width:this.iconSideSize,height:this.iconSideSize}))))}handleClick(){const t=document.createElement("vviinn-recommendations-sidebar");if(t.token=this.token,t.locale=this.locale,t.currencySign=this.currencySign,t.pricePrefix=this.pricePrefix,t.apiPath=this.apiPath,t.sidebarTitle=this.sidebarTitle,t.productId=this.productId,t.position=this.position,t.widgetScrollbar=this.modalScrollbar,t.campaigns=this.campaigns,t.campaignType=this.campaignType,t.color=this.color,t.imageWidth=this.imageWidth,t.buttonElementId=this.el.id,t.noResultText=this.noResultText,t.noResultShow=this.noResultShow,t.gridArrowsDynamic=this.gridArrowsDynamic,t.productDetailsNewTab=this.productDetailsNewTab,t.productDetailsRedirect=this.productDetailsRedirect,t.widgetVersion=x,t.showingInButton=!0,t.excluded=this.excluded,t.addToBasketShow=this.addToBasketShow,t.buttonChildren=this.el.children,t.showFilters=this.showFilters,t.cssUrl=this.cssUrl,t.imageRatio=this.imageRatio,t.setItemsAmount=this.setItemsAmount,t.setModeDiscounts=this.setModeDiscounts,t.updateButtonLocation=this.updateButtonLocation,t.addPriceContainer=this.addPriceContainer,t.favoriteShow=this.favoriteShow,t.showInModal="modal"===this.oneClickDiscoveryMode,t.isAppended=!!this.targetAppendSidebarTo||!!this.appendSidebarToElement,t.showInWidget=this.showInWidget,this.targetAppendSidebarTo?(t.mode="grid",t.useCarousel="append-slider"===this.oneClickDiscoveryMode):(t.mode="right"===this.position?"grid":this.mode,t.useCarousel="bottom"===this.position),this.sidebar=t,document.addEventListener("vviinnWidgetClose",this.sidebarCloseListener),this.targetAppendSidebarTo)return this.sidebar.showInCustomContainer=!0,this.targetAppendSidebarTo.innerHTML="",void this.targetAppendSidebarTo.append(this.sidebar);document.body.append(this.sidebar)}disconnectedCallback(){var t;this.sidebar&&document.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener),null===(t=this.disposeStoreListener)||void 0===t||t.call(this)}get el(){return r(this)}static get watchers(){return{appendSidebarToElement:["appendSidebarToElementWatcher"]}}};M.style=":host{display:block}";const Z=class{constructor(t){o(this,t),this.handler=void 0}render(){return t(i,null,t("vviinn-error",null,t(b,null),t("h4",{slot:"title"},f.t("wrongAspectRatioBlock.title")),t("button",{slot:"action",onClick:this.handler},f.t("wrongAspectRatioBlock.button"))))}};export{z as vviinn_detected_object,V as vviinn_empty_results,H as vviinn_modal,j as vviinn_overlay,L as vviinn_preloader,M as vviinn_vpr_button,Z as vviinn_wrong_aspect_ratio}
|