vviinn-widgets 2.166.0 → 2.167.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/cjs/{index-B9ytLPxZ.js → index-DYvhURIh.js} +12 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{package-cwS3_cup.js → package-CTmKiTyO.js} +1 -1
  4. package/dist/cjs/vviinn-button_2.cjs.entry.js +2 -2
  5. package/dist/cjs/vviinn-camera_12.cjs.entry.js +16 -16
  6. package/dist/cjs/vviinn-carousel_10.cjs.entry.js +77 -32
  7. package/dist/cjs/vviinn-detected-object_7.cjs.entry.js +7 -7
  8. package/dist/cjs/vviinn-text-search.cjs.entry.js +3 -3
  9. package/dist/cjs/vviinn-vps-button.cjs.entry.js +2 -2
  10. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  11. package/dist/collection/Image/renderTitleImage.js +2 -0
  12. package/dist/collection/components/vviinn-modal/vviinn-modal.js +3 -3
  13. package/dist/collection/components/vviinn-product-card/render-helpers.js +29 -9
  14. package/dist/collection/components/vviinn-product-card/vviinn-energy-label/vviinn-energy-label.js +2 -2
  15. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +42 -0
  16. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +79 -16
  17. package/dist/collection/components/vviinn-results/vviinn-results.js +3 -3
  18. package/dist/collection/components/vviinn-skeleton/vviinn-skeleton.js +1 -1
  19. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +1 -1
  20. package/dist/collection/components/vviinn-slider/vviinn-slider.js +1 -1
  21. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +1 -1
  22. package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +2 -2
  23. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +1 -1
  24. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +2 -2
  25. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +1 -1
  26. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +2 -2
  27. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +9 -9
  28. package/dist/collection/cssParts/index.js +2 -1
  29. package/dist/collection/cssParts/product.js +10 -0
  30. package/dist/collection/helpers/url/getLastUrlPath.js +14 -0
  31. package/dist/collection/helpers/url/getLastUrlPath.test.js +23 -0
  32. package/dist/collection/store/search.store.js +1 -1
  33. package/dist/collection/utils/string/joinTruthy.js +3 -0
  34. package/dist/collection/utils/string/joinTruthy.test.js +17 -0
  35. package/dist/esm/{index-DJLLuTh-.js → index-CYUAT3RF.js} +12 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/{package-BRkye-3Y.js → package-Ds0qJGAs.js} +1 -1
  38. package/dist/esm/vviinn-button_2.entry.js +2 -2
  39. package/dist/esm/vviinn-camera_12.entry.js +16 -16
  40. package/dist/esm/vviinn-carousel_10.entry.js +77 -32
  41. package/dist/esm/vviinn-detected-object_7.entry.js +7 -7
  42. package/dist/esm/vviinn-text-search.entry.js +3 -3
  43. package/dist/esm/vviinn-vps-button.entry.js +2 -2
  44. package/dist/esm/vviinn-widgets.js +1 -1
  45. package/dist/types/Image/renderTitleImage.d.ts +1 -0
  46. package/dist/types/components/vviinn-product-card/render-helpers.d.ts +10 -2
  47. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +8 -1
  48. package/dist/types/components.d.ts +24 -0
  49. package/dist/types/cssParts/index.d.ts +1 -0
  50. package/dist/types/cssParts/product.d.ts +1 -0
  51. package/dist/types/helpers/url/getLastUrlPath.d.ts +1 -0
  52. package/dist/types/helpers/url/getLastUrlPath.test.d.ts +1 -0
  53. package/dist/types/utils/string/joinTruthy.d.ts +1 -0
  54. package/dist/types/utils/string/joinTruthy.test.d.ts +1 -0
  55. package/dist/vviinn-widgets/p-08c03082.entry.js +1 -0
  56. package/{www/build/p-f97aa42e.entry.js → dist/vviinn-widgets/p-177e130c.entry.js} +1 -1
  57. package/dist/vviinn-widgets/{p-d06c3d98.entry.js → p-53347933.entry.js} +1 -1
  58. package/dist/vviinn-widgets/{p-e70adb2f.entry.js → p-6e0b7760.entry.js} +1 -1
  59. package/dist/vviinn-widgets/{p-464d7e0c.entry.js → p-7d12f926.entry.js} +1 -1
  60. package/dist/vviinn-widgets/{p-DJLLuTh-.js → p-CYUAT3RF.js} +1 -1
  61. package/dist/vviinn-widgets/{p-BRkye-3Y.js → p-Ds0qJGAs.js} +1 -1
  62. package/dist/vviinn-widgets/{p-f4a75f92.entry.js → p-bb74e1b1.entry.js} +2 -2
  63. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  64. package/package.json +1 -1
  65. package/www/build/p-08c03082.entry.js +1 -0
  66. package/{dist/vviinn-widgets/p-f97aa42e.entry.js → www/build/p-177e130c.entry.js} +1 -1
  67. package/www/build/{p-d06c3d98.entry.js → p-53347933.entry.js} +1 -1
  68. package/www/build/{p-e70adb2f.entry.js → p-6e0b7760.entry.js} +1 -1
  69. package/www/build/{p-464d7e0c.entry.js → p-7d12f926.entry.js} +1 -1
  70. package/www/build/p-9fa69445.js +1 -0
  71. package/www/build/{p-DJLLuTh-.js → p-CYUAT3RF.js} +1 -1
  72. package/www/build/{p-BRkye-3Y.js → p-Ds0qJGAs.js} +1 -1
  73. package/www/build/{p-f4a75f92.entry.js → p-bb74e1b1.entry.js} +2 -2
  74. package/www/build/vviinn-widgets.esm.js +1 -1
  75. package/www/index.html +1 -1
  76. package/dist/collection/Image/renderImage.js +0 -2
  77. package/dist/collection/helpers/index.js +0 -1
  78. package/dist/collection/utils/string/index.js +0 -1
  79. package/dist/types/Image/renderImage.d.ts +0 -1
  80. package/dist/types/helpers/index.d.ts +0 -1
  81. package/dist/types/utils/string/index.d.ts +0 -1
  82. package/dist/vviinn-widgets/p-d6ea882d.entry.js +0 -1
  83. package/www/build/p-ca47d016.js +0 -1
  84. package/www/build/p-d6ea882d.entry.js +0 -1
@@ -1 +1 @@
1
- import{h as e,r as t,c as o,H as i,g as r}from"./p-BcMtFp89.js";import{_ as s,O as a,d as n,s as c,c as l,u as d}from"./p-HTOQ7YPT.js";import{s as h,c as f,i as p}from"./p-Blhy9XN1.js";import{W as b}from"./p-Da89HZrn.js";import{s as g}from"./p-etuZ8m3J.js";import{c as u,v as x}from"./p-BRkye-3Y.js";import{m as v}from"./p-DJLLuTh-.js";import{P as m,D as y}from"./p-CR1-OmNa.js";const w=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e("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"})),C=({width:t=24,height:o=24})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"currentColor"},e("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z"}),e("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z"}),e("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z"}),e("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z"}),e("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"}),e("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"}),e("path",{d:"M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z"}),e("path",{d:"M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z"})),k=({width:t=24,height:o=24})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"currentColor"},e("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(e){t(this,e),this.vviinnSelectObject=o(this,"vviinnSelectObject"),this.position=["0","0"]}getObjectPosition(){return s.pipe(a.fromNullable(this.imageBounds),a.map((e=>{const{left:t,top:o}=s.pipe(this.detectedObject,h(e),f);return[`${t}px`,`${o}px`]})),a.getOrElse((()=>["0","0"])))}selectDetectedObject(){const e=s.pipe(a.fromNullable(this.imageBounds),a.map((e=>h(e)(this.detectedObject))),a.toNullable);this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject,searchArea:e}))}isActive(){return!(!this.detectedObject||!this.selectedDetectedObject)&&n.equals(this.detectedObject,this.selectedDetectedObject)}render(){return e(i,{key:"1b53ca2bf845842ba5ae4bedfa8c248f6f3e285e",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(e){t(this,e)}render(){return e(i,{key:"ed65fddf4c54b580f7d7fb98a64a75374adf4a8b"},e("vviinn-error",{key:"c3419e7d33a1651da65d6430b79837ffbeeb40bb"},e(b,{key:"9738a9867dbec40fe3c2581b0f87bebaeb954507"}),e("h4",{key:"454a1b9e35ad476bc4630150b78d8f0c802286c8",slot:"title"},p.t("emptyResultsBlock.title")),"image"===c.searchType&&e("button",{key:"c77a796fdf37fde776f78fbbceff2c75344dd8c7",slot:"action",onClick:this.handler},p.t("emptyResultsBlock.button"))))}},H=class{constructor(e){t(this,e),this.vviinnWidgetClose=o(this,"vviinnWidgetClose"),this.active=!1,this.hideBackButton=!1,this.slider=!1}componentWillLoad(){g(this,this.el)}resetTopScroll(){const e=this.el.shadowRoot.querySelector(".body");null==e||e.scroll({top:0})}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit(Object.assign({campaignTypeId:"VPS",campaignTypeName:u.VPS,widgetVersion:this.widgetVersion},l("widgetId",this.buttonElementId)))}),this.slider?500:0)}handleAnimationEnd(e){"fade-in"===e.animationName&&(this.slider=!0)}render(){return e(i,{key:"e6008534642fb543ed667c82154df5c91cdf661c",exportparts:v,class:{closed:!this.active,"first-screen":this.isFirstScreen},onAnimationEnd:e=>this.handleAnimationEnd(e)},e("div",{key:"c3d57c092a9ac2f3037b1385a0389eb22c4c7965",class:"head"},!this.hideBackButton&&e("button",{key:"faa3f5d2e4da15e6a988875e9553a45f38540695",part:"secondary-action",onClick:()=>{this.resetState(),this.resetTopScroll()}},e(w,{key:"96c95e076b462a3bdeba8918941c3922c41b4bd2"})),e("div",{key:"6b32deba8baeebb5095452dff4428682e69efb13",class:"title",part:"results-title"},(t=c.image)?e("img",{width:"28",height:"28",src:t.src,class:"title-image"}):null,e("slot",{key:"7afa8824c1faf611df220af8ca2e9c544f46f499",name:"vviinn-image-search-modal-title"},p.t("imageSearchModalTitle"))),e("button",{key:"eea6caff0dd54414cdc9e79038615deb38740da2",onClick:()=>this.close(),class:"close-button",part:"close-button"},e("svg",{key:"b88941fd4689430292f3827b2bc99b58b8f374a0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e("path",{key:"1aaa800ac58360486e2186c103cdb622cdc7aa6c",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"})))),e("div",{key:"e96b98b285f63b78f80d4c47a4e81f2e04b043ad",class:"body"},e("slot",{key:"27f6ce02ee4a772a98dbc3d619494144cf2f8244"})));var t}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(e){t(this,e)}render(){return e(i,{key:"5cfe8e5a92010584a11f507ea763bab5b519c5d0"},e("slot",{key:"6c74aac3b97dfac8fe819ecd85ccfdfdbe13ff50"}))}};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(e){t(this,e)}render(){return e(i,{key:"d22ab031c51bd092cfa163aafe2df9b138bc1cac"})}};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(e){t(this,e),this.vviinnWidgetLoad=o(this,"vviinnWidgetLoad"),this.vviinnWidgetOpen=o(this,"vviinnWidgetOpen"),this.vviinnWidgetClose=o(this,"vviinnWidgetClose"),this.vviinnProductLoad=o(this,"vviinnProductLoad"),this.vviinnProductClick=o(this,"vviinnProductClick"),this.vviinnProductView=o(this,"vviinnProductView"),this.vviinnResultLoad=o(this,"vviinnResultLoad"),this.vviinnResultView=o(this,"vviinnResultView"),this.vviinnNoResult=o(this,"vviinnNoResult"),this.vviinnAddToBasket=o(this,"vviinnAddToBasket"),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.modalScrollbar=!1,this.position="bottom",this.addStyle=!0,this.favoriteShow=!1,this.oneClickDiscoveryMode="standalone",this.showInWidget=!1,this.imageResolutionWidth=y,this.sidebar=null,this.sidebarCloseListener=()=>{var e;this.sidebar&&(null===(e=this.targetAppendSidebarTo)||void 0===e?void 0:e.contains(this.sidebar))&&this.targetAppendSidebarTo.removeChild(this.sidebar)}}connectedCallback(){this.iconSideSize="standalone"===this.oneClickDiscoveryMode?24:14;const{onChange:e}=d(this.showInWidget);this.disposeStoreListener=e("loading",(e=>{e&&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 e(i,{key:"87aa8b75fca93a8ecfa4a6dde703196dc30d338b",onClick:()=>{this.appendSidebarToId&&!this.targetAppendSidebarTo?setTimeout((()=>{this.handleClick()}),250):this.handleClick()},role:"button",tabindex:"0"},e("vviinn-button",{key:"ef75f37eeeadc8155b23d0f2787cd62e30806195",addStyle:this.addStyle,part:"vviinn-button"},e("slot",{key:"8307b99a1b93514a512225544e643c5a6e367cee"},e("VCS"===this.campaignType?k:C,{width:this.iconSideSize,height:this.iconSideSize}))))}handleClick(){const e=document.createElement("vviinn-recommendations-sidebar");if(e.token=this.token,e.locale=this.locale,e.currencySign=this.currencySign,e.pricePrefix=this.pricePrefix,e.apiPath=this.apiPath,e.sidebarTitle=this.sidebarTitle,e.productId=this.productId,e.position=this.position,e.widgetScrollbar=this.modalScrollbar,e.campaigns=this.campaigns,e.campaignType=this.campaignType,e.color=this.color,e.imageWidth=this.imageWidth,e.buttonElementId=this.el.id,e.noResultText=this.noResultText,e.noResultShow=this.noResultShow,e.gridArrowsDynamic=this.gridArrowsDynamic,e.productDetailsNewTab=this.productDetailsNewTab,e.productDetailsRedirect=this.productDetailsRedirect,e.widgetVersion=x,e.showingInButton=!0,e.excluded=this.excluded,e.addToBasketShow=this.addToBasketShow,e.buttonChildren=this.el.children,e.showFilters=this.showFilters,e.cssUrl=this.cssUrl,e.imageRatio=this.imageRatio,e.setItemsAmount=this.setItemsAmount,e.setModeDiscounts=this.setModeDiscounts,e.updateButtonLocation=this.updateButtonLocation,e.addPriceContainer=this.addPriceContainer,e.favoriteShow=this.favoriteShow,e.showInModal="modal"===this.oneClickDiscoveryMode,e.isAppended=!!this.targetAppendSidebarTo||!!this.appendSidebarToElement,e.showInWidget=this.showInWidget,this.targetAppendSidebarTo?(e.mode="grid",e.useCarousel="append-slider"===this.oneClickDiscoveryMode):(e.mode="right"===this.position?"grid":this.mode,e.useCarousel="bottom"===this.position),this.sidebar=e,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 e;this.sidebar&&document.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener),null===(e=this.disposeStoreListener)||void 0===e||e.call(this)}get el(){return r(this)}static get watchers(){return{appendSidebarToElement:["appendSidebarToElementWatcher"]}}};M.style=":host{display:block}";const Z=class{constructor(e){t(this,e)}render(){return e(i,{key:"6512772d29140da399cd11cb470f56da28516ac8"},e("vviinn-error",{key:"2b0b45dd8cb808cea73ec0e48c278701fcc40802"},e(b,{key:"de578a894ce74f8ded3c7a06e5e7cdd0b877fe71"}),e("h4",{key:"785aefb156e80ca51d444ea5ea4b5c7f477cef57",slot:"title"},p.t("wrongAspectRatioBlock.title")),e("button",{key:"b81da21e92957e74ca116eb118b9d1c1367e3e7f",slot:"action",onClick:this.handler},p.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 e,r as t,c as o,H as i,g as r}from"./p-BcMtFp89.js";import{_ as s,O as a,d as n,s as c,c as l,u as d}from"./p-HTOQ7YPT.js";import{s as h,c as f,i as p}from"./p-Blhy9XN1.js";import{W as b}from"./p-Da89HZrn.js";import{s as g}from"./p-etuZ8m3J.js";import{c as u,v as x}from"./p-Ds0qJGAs.js";import{m as v}from"./p-CYUAT3RF.js";import{P as m,D as y}from"./p-CR1-OmNa.js";const C=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e("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"})),w=({width:t=24,height:o=24})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"currentColor"},e("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z"}),e("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z"}),e("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z"}),e("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z"}),e("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"}),e("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"}),e("path",{d:"M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z"}),e("path",{d:"M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z"})),k=({width:t=24,height:o=24})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"currentColor"},e("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(e){t(this,e),this.vviinnSelectObject=o(this,"vviinnSelectObject"),this.position=["0","0"]}getObjectPosition(){return s.pipe(a.fromNullable(this.imageBounds),a.map((e=>{const{left:t,top:o}=s.pipe(this.detectedObject,h(e),f);return[`${t}px`,`${o}px`]})),a.getOrElse((()=>["0","0"])))}selectDetectedObject(){const e=s.pipe(a.fromNullable(this.imageBounds),a.map((e=>h(e)(this.detectedObject))),a.toNullable);this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject,searchArea:e}))}isActive(){return!(!this.detectedObject||!this.selectedDetectedObject)&&n.equals(this.detectedObject,this.selectedDetectedObject)}render(){return e(i,{key:"1b53ca2bf845842ba5ae4bedfa8c248f6f3e285e",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(e){t(this,e)}render(){return e(i,{key:"ed65fddf4c54b580f7d7fb98a64a75374adf4a8b"},e("vviinn-error",{key:"c3419e7d33a1651da65d6430b79837ffbeeb40bb"},e(b,{key:"9738a9867dbec40fe3c2581b0f87bebaeb954507"}),e("h4",{key:"454a1b9e35ad476bc4630150b78d8f0c802286c8",slot:"title"},p.t("emptyResultsBlock.title")),"image"===c.searchType&&e("button",{key:"c77a796fdf37fde776f78fbbceff2c75344dd8c7",slot:"action",onClick:this.handler},p.t("emptyResultsBlock.button"))))}},H=class{constructor(e){t(this,e),this.vviinnWidgetClose=o(this,"vviinnWidgetClose"),this.active=!1,this.hideBackButton=!1,this.slider=!1}componentWillLoad(){g(this,this.el)}resetTopScroll(){const e=this.el.shadowRoot.querySelector(".body");null==e||e.scroll({top:0})}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit(Object.assign({campaignTypeId:"VPS",campaignTypeName:u.VPS,widgetVersion:this.widgetVersion},l("widgetId",this.buttonElementId)))}),this.slider?500:0)}handleAnimationEnd(e){"fade-in"===e.animationName&&(this.slider=!0)}render(){return e(i,{key:"2b55d24feb158395efb28601b6dd4ea7cb44c8ac",exportparts:v,class:{closed:!this.active,"first-screen":this.isFirstScreen},onAnimationEnd:e=>this.handleAnimationEnd(e)},e("div",{key:"ee63734e3825bc1d1a84bae2e0c16a458145c0fc",class:"head"},!this.hideBackButton&&e("button",{key:"504e4e580cb092883d423f51cafb0188e8466566",part:"secondary-action",onClick:()=>{this.resetState(),this.resetTopScroll()}},e(C,{key:"f8f41fee98264906fa76666eeb11fc24c507853c"})),e("div",{key:"ace69d25186ed7eba74d408a2cf97ed6ce780159",class:"title",part:"results-title"},(t=c.image)?e("img",{width:"28",height:"28",src:t.src,class:"title-image"}):null,e("slot",{key:"183a67aa73731bda97a7401d7d7581913f021f5c",name:"vviinn-image-search-modal-title"},p.t("imageSearchModalTitle"))),e("button",{key:"ce0803f9b42a861a01d5672fc983f0dcbd93b763",onClick:()=>this.close(),class:"close-button",part:"close-button"},e("svg",{key:"186c273af33ab58b785759e74f5e6d0f9a056137",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e("path",{key:"0c444b987ec0d748fe7f4339c7be78973ef02774",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"})))),e("div",{key:"a6f61fc03402c68460b981c5e7a5e1c5fed3f521",class:"body"},e("slot",{key:"e7ee82a4e8add5bf2bb0f3adc0e5e76761fdb5d7"})));var t}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(e){t(this,e)}render(){return e(i,{key:"5cfe8e5a92010584a11f507ea763bab5b519c5d0"},e("slot",{key:"6c74aac3b97dfac8fe819ecd85ccfdfdbe13ff50"}))}};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(e){t(this,e)}render(){return e(i,{key:"d22ab031c51bd092cfa163aafe2df9b138bc1cac"})}};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(e){t(this,e),this.vviinnWidgetLoad=o(this,"vviinnWidgetLoad"),this.vviinnWidgetOpen=o(this,"vviinnWidgetOpen"),this.vviinnWidgetClose=o(this,"vviinnWidgetClose"),this.vviinnProductLoad=o(this,"vviinnProductLoad"),this.vviinnProductClick=o(this,"vviinnProductClick"),this.vviinnProductView=o(this,"vviinnProductView"),this.vviinnResultLoad=o(this,"vviinnResultLoad"),this.vviinnResultView=o(this,"vviinnResultView"),this.vviinnNoResult=o(this,"vviinnNoResult"),this.vviinnAddToBasket=o(this,"vviinnAddToBasket"),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.modalScrollbar=!1,this.position="bottom",this.addStyle=!0,this.favoriteShow=!1,this.oneClickDiscoveryMode="standalone",this.showInWidget=!1,this.imageResolutionWidth=y,this.sidebar=null,this.sidebarCloseListener=()=>{var e;this.sidebar&&(null===(e=this.targetAppendSidebarTo)||void 0===e?void 0:e.contains(this.sidebar))&&this.targetAppendSidebarTo.removeChild(this.sidebar)}}connectedCallback(){this.iconSideSize="standalone"===this.oneClickDiscoveryMode?24:14;const{onChange:e}=d(this.showInWidget);this.disposeStoreListener=e("loading",(e=>{e&&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 e(i,{key:"09dfd61dbbc3bc43ae2d4cc034faa105d676999f",onClick:()=>{this.appendSidebarToId&&!this.targetAppendSidebarTo?setTimeout((()=>{this.handleClick()}),250):this.handleClick()},role:"button",tabindex:"0"},e("vviinn-button",{key:"60b4167b9189c9b396c003a043ed231776bf8210",addStyle:this.addStyle,part:"vviinn-button"},e("slot",{key:"158ae74be03b06097840931dba71301354368ac8"},e("VCS"===this.campaignType?k:w,{width:this.iconSideSize,height:this.iconSideSize}))))}handleClick(){const e=document.createElement("vviinn-recommendations-sidebar");if(e.token=this.token,e.locale=this.locale,e.currencySign=this.currencySign,e.pricePrefix=this.pricePrefix,e.apiPath=this.apiPath,e.sidebarTitle=this.sidebarTitle,e.productId=this.productId,e.position=this.position,e.widgetScrollbar=this.modalScrollbar,e.campaigns=this.campaigns,e.campaignType=this.campaignType,e.color=this.color,e.imageWidth=this.imageWidth,e.buttonElementId=this.el.id,e.noResultText=this.noResultText,e.noResultShow=this.noResultShow,e.gridArrowsDynamic=this.gridArrowsDynamic,e.productDetailsNewTab=this.productDetailsNewTab,e.productDetailsRedirect=this.productDetailsRedirect,e.widgetVersion=x,e.showingInButton=!0,e.excluded=this.excluded,e.addToBasketShow=this.addToBasketShow,e.buttonChildren=this.el.children,e.showFilters=this.showFilters,e.cssUrl=this.cssUrl,e.imageRatio=this.imageRatio,e.setItemsAmount=this.setItemsAmount,e.setModeDiscounts=this.setModeDiscounts,e.updateButtonLocation=this.updateButtonLocation,e.addPriceContainer=this.addPriceContainer,e.favoriteShow=this.favoriteShow,e.showInModal="modal"===this.oneClickDiscoveryMode,e.isAppended=!!this.targetAppendSidebarTo||!!this.appendSidebarToElement,e.showInWidget=this.showInWidget,this.targetAppendSidebarTo?(e.mode="grid",e.useCarousel="append-slider"===this.oneClickDiscoveryMode):(e.mode="right"===this.position?"grid":this.mode,e.useCarousel="bottom"===this.position),this.sidebar=e,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 e;this.sidebar&&document.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener),null===(e=this.disposeStoreListener)||void 0===e||e.call(this)}get el(){return r(this)}static get watchers(){return{appendSidebarToElement:["appendSidebarToElementWatcher"]}}};M.style=":host{display:block}";const Z=class{constructor(e){t(this,e)}render(){return e(i,{key:"6512772d29140da399cd11cb470f56da28516ac8"},e("vviinn-error",{key:"2b0b45dd8cb808cea73ec0e48c278701fcc40802"},e(b,{key:"de578a894ce74f8ded3c7a06e5e7cdd0b877fe71"}),e("h4",{key:"785aefb156e80ca51d444ea5ea4b5c7f477cef57",slot:"title"},p.t("wrongAspectRatioBlock.title")),e("button",{key:"b81da21e92957e74ca116eb118b9d1c1367e3e7f",slot:"action",onClick:this.handler},p.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 +1 @@
1
- import{h as t,r as i,c as s,H as h,g as e}from"./p-BcMtFp89.js";import{S as n}from"./p-etuZ8m3J.js";import{D as o,f as l}from"./p-BPu6OLhB.js";import{S as a}from"./p-CR1-OmNa.js";const d=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 4H20C22.21 4 24 5.79 24 8V16H22V8C22 6.9 21.1 6 20 6H16.93L16.34 5.11L14.93 3H9.07L7.66 5.11L7.07 6H4C2.9 6 2 6.9 2 8V18C2 19.1 2.9 20 4 20H9V22H4C1.79 22 0 20.21 0 18V8C0 5.79 1.79 4 4 4H6L8 1H16L18 4ZM12 8C14.76 8 17 10.24 17 13L16.99 13.01C16.99 14.02 16.68 14.97 16.16 15.76L20.7 20.3L19.29 21.71L14.75 17.17C13.96 17.69 13.02 18 12 18C9.24 18 7 15.76 7 13C7 10.24 9.24 8 12 8ZM9 13C9 14.65 10.35 16 12 16C13.65 16 15 14.65 15 13C15 11.35 13.65 10 12 10C10.35 10 9 11.35 9 13Z",fill:"#161616"})),r=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z",fill:"#161616"}),t("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z",fill:"#161616"}),t("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z",fill:"#161616"}),t("path",{d:"M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C13.02 17 13.96 16.69 14.75 16.17L19.29 20.71L20.7 19.3L16.16 14.76C16.68 13.97 16.99 13.02 16.99 12.01L17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z",fill:"#161616"})),C=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z",fill:"#161616"}),t("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z",fill:"#161616"}),t("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z",fill:"#161616"}),t("path",{d:"M16 2H15V4H16C18.21 4 20 5.79 20 8V9H22V8C22 4.69 19.31 2 16 2Z",fill:"#161616"}),t("path",{d:"M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z",fill:"#161616"})),c=class{constructor(t){i(this,t),this.vviinnWidgetLoad=s(this,"vviinnWidgetLoad"),this.vviinnWidgetOpen=s(this,"vviinnWidgetOpen"),this.vviinnWidgetClose=s(this,"vviinnWidgetClose"),this.vviinnImageUploadStarted=s(this,"vviinnImageUploadStarted"),this.vviinnProductLoad=s(this,"vviinnProductLoad"),this.vviinnProductClick=s(this,"vviinnProductClick"),this.vviinnProductView=s(this,"vviinnProductView"),this.vviinnResultLoad=s(this,"vviinnResultLoad"),this.vviinnResultView=s(this,"vviinnResultView"),this.vviinnNoResult=s(this,"vviinnNoResult"),this.vviinnImageCrop=s(this,"vviinnImageCrop"),this.vviinnSelectObject=s(this,"vviinnSelectObject"),this.vviinnSelectFilter=s(this,"vviinnSelectFilter"),this.globalSlotsChanged=s(this,"globalSlotsChanged"),this.campaignId="",this.campaignIdTextSearch="",this.campaignIdVisualSearch="",this.addStyle=!1,this.mode="modal",this.excluded="",this.productDetailsNewTab=!0,this.productDetailsRedirect=!0,this.imageResolutionWidth=a,this.exampleImageSource=o,this.textSearchShow=!1,this.addToBasketShow=!1,this.favoriteShow=!1,this.oneClickDiscoveryShow=!1,this.oneClickDiscoveryMode="append-grid",this.oneClickDiscoveryCampaigns="",this.addPriceContainer=!1,this.showInWidget=!0,this.buttonPressed=!1,this.slots=[]}handleModalClosed({detail:t}){"VPS"===t.campaignTypeId&&(this.buttonPressed=!1)}componentWillLoad(){this.slots=l(this.el)}componentDidLoad(){this.replaceSlotsContent()}replaceSlotsContent(t){this.globalSlotsChanged.emit({slots:Array.from(this.slots),element:this.el}),t&&this.globalSlotsChanged.emit({slots:Array.from(this.slots),element:t})}handleClick(){this.buttonPressed=!0}resetButton(){this.buttonPressed=!1}render(){var i;return t(h,{key:"e82401ed7aee7a1fa97df083fc19dd62e84a3e48",tabindex:"0",role:"button"},t("vviinn-button",{key:"e2f188230715175e419776f7e890f148bd8854b4",onClick:()=>{this.handleClick()},addStyle:this.addStyle,part:"vviinn-button"},t("slot",{key:"679712c82fca1e5c00d78b9581c32032960f73cd"},t("camera"===this.mode?d:this.textSearchShow?r:C,null))),n("search"),t("vviinn-vps-widget",{key:"a0708052c0995085bba613b7cad11d9ffb686eb1",mode:this.mode,"currency-sign":this.currencySign,token:this.token,locale:this.locale,apiPath:this.apiPath,pricePrefix:this.pricePrefix,campaignId:this.campaignId,campaignIdTextSearch:this.campaignIdTextSearch,campaignIdVisualSearch:this.campaignIdVisualSearch,showingInButton:!0,buttonPressed:this.buttonPressed,resetVpsButton:this.resetButton.bind(this),buttonElementId:this.el.id,active:this.buttonPressed&&("modal"===this.mode||"camera"===this.mode),excluded:this.excluded,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,imageResolutionWidth:this.imageResolutionWidth,exampleImageSource:this.exampleImageSource,textSearchShow:this.textSearchShow,addToBasketShow:this.addToBasketShow,addPriceContainer:this.addPriceContainer,replaceSlotsContentInButton:this.replaceSlotsContent.bind(this),oneClickDiscoveryShow:null!==(i=this.oneClickDiscoveryShow)&&void 0!==i?i:!!this.oneClickDiscoveryMode,oneClickDiscoveryMode:this.oneClickDiscoveryMode,oneClickDiscoveryCampaigns:this.oneClickDiscoveryCampaigns,favoriteShow:this.favoriteShow,showInWidget:this.showInWidget,parentSlots:this.slots}))}get el(){return e(this)}};c.style=":host{display:block;line-height:0}";export{c as vviinn_vps_button}
1
+ import{h as t,r as i,c as s,H as h,g as e}from"./p-BcMtFp89.js";import{S as n}from"./p-etuZ8m3J.js";import{D as o,f as l}from"./p-BPu6OLhB.js";import{S as a}from"./p-CR1-OmNa.js";const d=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 4H20C22.21 4 24 5.79 24 8V16H22V8C22 6.9 21.1 6 20 6H16.93L16.34 5.11L14.93 3H9.07L7.66 5.11L7.07 6H4C2.9 6 2 6.9 2 8V18C2 19.1 2.9 20 4 20H9V22H4C1.79 22 0 20.21 0 18V8C0 5.79 1.79 4 4 4H6L8 1H16L18 4ZM12 8C14.76 8 17 10.24 17 13L16.99 13.01C16.99 14.02 16.68 14.97 16.16 15.76L20.7 20.3L19.29 21.71L14.75 17.17C13.96 17.69 13.02 18 12 18C9.24 18 7 15.76 7 13C7 10.24 9.24 8 12 8ZM9 13C9 14.65 10.35 16 12 16C13.65 16 15 14.65 15 13C15 11.35 13.65 10 12 10C10.35 10 9 11.35 9 13Z",fill:"#161616"})),r=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z",fill:"#161616"}),t("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z",fill:"#161616"}),t("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z",fill:"#161616"}),t("path",{d:"M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C13.02 17 13.96 16.69 14.75 16.17L19.29 20.71L20.7 19.3L16.16 14.76C16.68 13.97 16.99 13.02 16.99 12.01L17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z",fill:"#161616"})),C=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z",fill:"#161616"}),t("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z",fill:"#161616"}),t("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z",fill:"#161616"}),t("path",{d:"M16 2H15V4H16C18.21 4 20 5.79 20 8V9H22V8C22 4.69 19.31 2 16 2Z",fill:"#161616"}),t("path",{d:"M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z",fill:"#161616"})),c=class{constructor(t){i(this,t),this.vviinnWidgetLoad=s(this,"vviinnWidgetLoad"),this.vviinnWidgetOpen=s(this,"vviinnWidgetOpen"),this.vviinnWidgetClose=s(this,"vviinnWidgetClose"),this.vviinnImageUploadStarted=s(this,"vviinnImageUploadStarted"),this.vviinnProductLoad=s(this,"vviinnProductLoad"),this.vviinnProductClick=s(this,"vviinnProductClick"),this.vviinnProductView=s(this,"vviinnProductView"),this.vviinnResultLoad=s(this,"vviinnResultLoad"),this.vviinnResultView=s(this,"vviinnResultView"),this.vviinnNoResult=s(this,"vviinnNoResult"),this.vviinnImageCrop=s(this,"vviinnImageCrop"),this.vviinnSelectObject=s(this,"vviinnSelectObject"),this.vviinnSelectFilter=s(this,"vviinnSelectFilter"),this.globalSlotsChanged=s(this,"globalSlotsChanged"),this.campaignId="",this.campaignIdTextSearch="",this.campaignIdVisualSearch="",this.addStyle=!1,this.mode="modal",this.excluded="",this.productDetailsNewTab=!0,this.productDetailsRedirect=!0,this.imageResolutionWidth=a,this.exampleImageSource=o,this.textSearchShow=!1,this.addToBasketShow=!1,this.favoriteShow=!1,this.oneClickDiscoveryShow=!1,this.oneClickDiscoveryMode="append-grid",this.oneClickDiscoveryCampaigns="",this.addPriceContainer=!1,this.showInWidget=!0,this.buttonPressed=!1,this.slots=[]}handleModalClosed({detail:t}){"VPS"===t.campaignTypeId&&(this.buttonPressed=!1)}componentWillLoad(){this.slots=l(this.el)}componentDidLoad(){this.replaceSlotsContent()}replaceSlotsContent(t){this.globalSlotsChanged.emit({slots:Array.from(this.slots),element:this.el}),t&&this.globalSlotsChanged.emit({slots:Array.from(this.slots),element:t})}handleClick(){this.buttonPressed=!0}resetButton(){this.buttonPressed=!1}render(){var i;return t(h,{key:"1dd180283436297aae545d11108190958b847077",tabindex:"0",role:"button"},t("vviinn-button",{key:"51c208321957d7d448316935ec63cc42ef3f0d5d",onClick:()=>{this.handleClick()},addStyle:this.addStyle,part:"vviinn-button"},t("slot",{key:"916552c8f50c743b4604b2596234ef7e612a218e"},t("camera"===this.mode?d:this.textSearchShow?r:C,null))),n("search"),t("vviinn-vps-widget",{key:"2a375cf4b45c81595756939062e35080bee051c4",mode:this.mode,"currency-sign":this.currencySign,token:this.token,locale:this.locale,apiPath:this.apiPath,pricePrefix:this.pricePrefix,campaignId:this.campaignId,campaignIdTextSearch:this.campaignIdTextSearch,campaignIdVisualSearch:this.campaignIdVisualSearch,showingInButton:!0,buttonPressed:this.buttonPressed,resetVpsButton:this.resetButton.bind(this),buttonElementId:this.el.id,active:this.buttonPressed&&("modal"===this.mode||"camera"===this.mode),excluded:this.excluded,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,imageResolutionWidth:this.imageResolutionWidth,exampleImageSource:this.exampleImageSource,textSearchShow:this.textSearchShow,addToBasketShow:this.addToBasketShow,addPriceContainer:this.addPriceContainer,replaceSlotsContentInButton:this.replaceSlotsContent.bind(this),oneClickDiscoveryShow:null!==(i=this.oneClickDiscoveryShow)&&void 0!==i?i:!!this.oneClickDiscoveryMode,oneClickDiscoveryMode:this.oneClickDiscoveryMode,oneClickDiscoveryCampaigns:this.oneClickDiscoveryCampaigns,favoriteShow:this.favoriteShow,showInWidget:this.showInWidget,parentSlots:this.slots}))}get el(){return e(this)}};c.style=":host{display:block;line-height:0}";export{c as vviinn_vps_button}
@@ -1 +1 @@
1
- import{h as o,r as e,H as t,c as i,F as r,g as a}from"./p-BcMtFp89.js";import{r as s}from"./p-DcA7Zxs5.js";import{a as n,i as c}from"./p-Blhy9XN1.js";import{c as l,p as d}from"./p-DJLLuTh-.js";import{P as p,D as f}from"./p-CR1-OmNa.js";const h=()=>o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z",fill:"currentColor"})),b=()=>o("svg",{width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 2C3.35 2 2 3.35 2 5v2H0V5c0-2.76 2.24-5 5-5h2v2H5Zm5 3c1.28 0 2.56.48 3.54 1.46h-.01a4.994 4.994 0 0 1 .64 6.29l3.05 3.05-1.41 1.41-3.05-3.05c-.84.55-1.8.83-2.76.83a4.98 4.98 0 0 1-3.54-1.46 5.003 5.003 0 0 1 0-7.07C7.44 5.49 8.72 5 10 5Zm-2.77 5c0 .74.29 1.44.81 1.96s1.22.81 1.96.81 1.44-.29 1.96-.81.81-1.22.81-1.96-.29-1.44-.81-1.96-1.22-.81-1.96-.81-1.44.29-1.96.81-.81 1.22-.81 1.96ZM2 15v-2H0v2c0 2.76 2.24 5 5 5h2v-2H5c-1.65 0-3-1.35-3-3ZM13 0h2c2.76 0 5 2.24 5 5v2h-2V5c0-1.65-1.35-3-3-3h-2V0Z",fill:"#161616"})),g=class{constructor(o){e(this,o),this.addStyle=!0}render(){return o(t,{key:"74ea27f58af018b66ed118e4b8720ddc656dcb1e",exportparts:"button"},o("button",{key:"b73a57077ac0cfeb911387ea696c38ffb366e617",class:this.addStyle?"open-button":"raw-open-button",part:"button"},o("slot",{key:"39239a801de587d482dbae595ad3e174f10a1fdc"},o(b,{key:"9208de8142fbb3e74a75b2449e4a9d317c76cd30"}))))}};g.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}:host button{border:none;cursor:pointer;color:inherit}.open-button{background-color:var(--button-bg-color-secondary);align-items:center;border-radius:50%;box-sizing:border-box;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:background-color 0.2s ease-in-out}.open-button:hover{background-color:var(--button-bg-color-secondary-hover)}.open-button:active{background-color:var(--button-bg-color-secondary-active)}.raw-open-button{display:contents;background:none}";const u=class{constructor(o){e(this,o),this.vviinnWidgetClose=i(this,"vviinnWidgetClose"),this.position="bottom",this.widgetScrollbar=!1,this.mode="continuity",this.campaigns="",this.imageWidth=p,this.imageRatio=1,this.addToBasketShow=!1,this.addPriceContainer=!1,this.showFilters=!1,this.setItemsAmount=4,this.favoriteShow=!1,this.useCarousel=!0,this.showInWidget=!1,this.imageResolutionWidth=f,this.showInCustomContainer=!1,this.showInModal=!1,this.isAppended=!1,this.sidebarState="idle",this.showLoadingClass=!1,this.recommendationsLoading=!1,this.hidden=!1,this.setRecommendationsLoading=o=>{this.recommendationsLoading=o},this.isSourceImageValid=()=>{var o;return!!(null===(o=this.sourceProduct)||void 0===o?void 0:o.image)}}updatingAllCardsStarted(){const{height:o}=this.getSidebarRectangle(),e=this.getAsideElement();e.style.height!==`${o}px`&&(e.style.height=`${o}px`)}updatingAllCardsFinished(){const o=this.getAsideElement();"auto"!==o.style.height&&(o.style.height="auto")}bodyClickListener(o){const e=this.getSidebarRectangle();e&&this.showInModal&&!n(o,e)&&(this.sidebarState="closed")}sourceProductReceived(o){this.sourceProduct=o.detail}handleLoadingChange(o){o?(this.showLoadingClass=!0,clearTimeout(this.loadingClassTimeout)):this.loadingClassTimeout=setTimeout((()=>{this.showLoadingClass=!1}),500)}getClassMap(){return{[this.position]:!0,[this.sidebarState]:!0,"no-carousel":!this.useCarousel,"no-fixed":this.showInCustomContainer,appended:this.isAppended,loading:this.showLoadingClass}}getAsideElement(){return this.el.shadowRoot.querySelector("aside")}getSidebarRectangle(){var o;return null===(o=this.getAsideElement())||void 0===o?void 0:o.getBoundingClientRect()}async componentWillLoad(){await c.init({lng:this.locale,fallbackLng:"en",resources:s})}componentDidLoad(){const o=this.el.shadowRoot.querySelector("vviinn-vpr-widget");Array.from(this.buttonChildren).forEach((e=>{const t=e.cloneNode(!0);e.hasAttribute("slot")&&o.appendChild(t)}))}disconnectedCallback(){clearTimeout(this.loadingClassTimeout)}render(){var e;return o(t,{key:"22f22c826ee2f06b713a81d1fdf9333ea4c6b49a",class:this.getClassMap(),style:{display:this.hidden?"none":void 0},exportparts:`body, close-sidebar, ${l}, ${d}`},o("aside",{key:"305c32dfdd18503f97724688dee951895cff3828",class:"sidebar",part:"body",onAnimationEnd:o=>this.handleAnimationEnd(o)},o("header",{key:"54749d4f22c6f45ec7becf3ccbbba680f51f96a4",class:{"contains-source-img":this.isSourceImageValid()},part:"sidebar-header"},"set"!==this.mode&&o(r,{key:"4bb68874250d5702e5e3a0b5a6b631939c8ae778"},this.renderSourceImage(),0!==(null===(e=this.sidebarTitle)||void 0===e?void 0:e.length)&&o("span",{key:"3261c3a65ef16bcc2ca9368dbf60539290e95fe3",class:"title",part:"recommendations-title"},this.sidebarTitle||c.t("discoveryWidgetTitle"))),o("button",{key:"f50551b9a6a96b2b7759fcbe2e6c929382b0acad",class:"close-sidebar",onClick:()=>this.sidebarState="closed",part:"close-sidebar"},o(h,{key:"0f09e22615091f32864c0e39c1fb2b8a5000649e"}))),o("main",{key:"ed0e0d0918c7c5a42e3fea5c7557710cdd9da5b4",part:"sidebar-content"},o("vviinn-vpr-widget",{key:"4bc347f029c897843f3743b2ba449fe82798d380",token:this.token,currencySign:this.currencySign,pricePrefix:this.pricePrefix,apiPath:this.apiPath,locale:this.locale,productId:this.productId,exportparts:`${l}, ${d}`,imageWidth:this.imageWidth,imageRatio:this.imageRatio,setItemsAmount:this.setItemsAmount,blockTitle:"",mode:this.mode,"campaign-type":this.campaignType,useCarousel:this.useCarousel,onVviinnRecommendationsLoaded:()=>{this.hidden=!1,this.sidebarState="open"},showScroll:this.widgetScrollbar,campaigns:this.campaigns,color:this.color,buttonElementId:this.buttonElementId,noResultText:this.noResultText,noResultShow:this.noResultShow,gridArrowsDynamic:this.gridArrowsDynamic,showingInButton:this.showingInButton,excluded:this.excluded,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,closed:"closed"===this.sidebarState,opened:"open"===this.sidebarState,addToBasketShow:this.addToBasketShow,cssUrl:this.cssUrl,showFilters:this.showFilters,setModeDiscounts:this.setModeDiscounts,updateButtonLocation:this.updateButtonLocation,addPriceContainer:this.addPriceContainer,favoriteShow:this.favoriteShow,isAppended:this.isAppended,showInWidget:this.showInWidget,recommendationsLoading:this.recommendationsLoading,setRecommendationsLoading:this.setRecommendationsLoading,imageResolutionWidth:this.imageResolutionWidth}))))}renderSourceImage(){var e,t,i,r;const a=(null===(t=null===(e=this.sourceProduct)||void 0===e?void 0:e.image)||void 0===t?void 0:t.thumbnail)||(null===(r=null===(i=this.sourceProduct)||void 0===i?void 0:i.image)||void 0===r?void 0:r.original)||null;return a?o("img",{class:"source-image",part:"source-image",src:a}):null}handleAnimationEnd({animationName:o}){o.includes("slideOut")&&(this.hidden=!0)}get el(){return a(this)}static get watchers(){return{recommendationsLoading:["handleLoadingChange"]}}};u.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{--vviinn-carousel-columns:4;box-sizing:border-box;position:fixed;z-index:2;display:block;display:flex;height:100vh;left:0;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.bottom){flex-direction:column;justify-content:end}:host(.no-fixed){position:unset;display:block;width:100%;height:auto}:host(.no-fixed.no-carousel.appended.loading){min-height:calc((var(--product-card-calculated-height) * 3) + 48px)}:host(.right){flex-direction:row;justify-content:flex-end}:host [slot]{visibility:hidden;position:absolute}header{position:relative;text-align:center;padding:var(--spacing-300);padding-top:0px}header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;padding:6px;border:1px solid var(--color-border-02);-o-object-fit:contain;object-fit:contain}:host(.right) header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}main{padding:0 var(--spacing-300)}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;padding-top:var(--spacing-300);display:flex;flex-direction:column;max-height:100vh;overflow-y:auto}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.no-fixed) .sidebar{transform:unset !important}:host(.bottom.closed) .sidebar{animation-name:slideOutFromBottom;animation-duration:0.5s;animation-fill-mode:forwards}:host(.open){transition:background 0.3s ease-in-out;background:rgba(0, 0, 0, 0.2)}:host(.bottom.open) .sidebar{animation-name:slideInFromBottom;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{animation-name:slideOutFromRight;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right.open) .sidebar{animation-name:slideInFromRight;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-results){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:var(--spacing-300)}:host(.right) vviinn-vpr-widget{overflow:auto}.title{font-style:normal;font-weight:var(--font-weight-600);font-size:var(--font-size-title);font-family:var(--font-family, var(--font-family-base));line-height:40px;text-align:center;color:#000000}.close-sidebar{position:absolute;background:transparent;border:none;cursor:pointer;margin:0;top:0;color:var(--color-icon-secondary);transition:color 0.1s ease-in-out;padding:var(--spacing-100);right:var(--spacing-200)}.close-sidebar:hover{color:var(--color-icon-primary)}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";export{g as vviinn_button,u as vviinn_recommendations_sidebar}
1
+ import{h as o,r as e,H as t,c as i,F as r,g as a}from"./p-BcMtFp89.js";import{r as s}from"./p-DcA7Zxs5.js";import{a as n,i as c}from"./p-Blhy9XN1.js";import{c as l,p as d}from"./p-CYUAT3RF.js";import{P as p,D as f}from"./p-CR1-OmNa.js";const h=()=>o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z",fill:"currentColor"})),b=()=>o("svg",{width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 2C3.35 2 2 3.35 2 5v2H0V5c0-2.76 2.24-5 5-5h2v2H5Zm5 3c1.28 0 2.56.48 3.54 1.46h-.01a4.994 4.994 0 0 1 .64 6.29l3.05 3.05-1.41 1.41-3.05-3.05c-.84.55-1.8.83-2.76.83a4.98 4.98 0 0 1-3.54-1.46 5.003 5.003 0 0 1 0-7.07C7.44 5.49 8.72 5 10 5Zm-2.77 5c0 .74.29 1.44.81 1.96s1.22.81 1.96.81 1.44-.29 1.96-.81.81-1.22.81-1.96-.29-1.44-.81-1.96-1.22-.81-1.96-.81-1.44.29-1.96.81-.81 1.22-.81 1.96ZM2 15v-2H0v2c0 2.76 2.24 5 5 5h2v-2H5c-1.65 0-3-1.35-3-3ZM13 0h2c2.76 0 5 2.24 5 5v2h-2V5c0-1.65-1.35-3-3-3h-2V0Z",fill:"#161616"})),g=class{constructor(o){e(this,o),this.addStyle=!0}render(){return o(t,{key:"74ea27f58af018b66ed118e4b8720ddc656dcb1e",exportparts:"button"},o("button",{key:"b73a57077ac0cfeb911387ea696c38ffb366e617",class:this.addStyle?"open-button":"raw-open-button",part:"button"},o("slot",{key:"39239a801de587d482dbae595ad3e174f10a1fdc"},o(b,{key:"9208de8142fbb3e74a75b2449e4a9d317c76cd30"}))))}};g.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}:host button{border:none;cursor:pointer;color:inherit}.open-button{background-color:var(--button-bg-color-secondary);align-items:center;border-radius:50%;box-sizing:border-box;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:background-color 0.2s ease-in-out}.open-button:hover{background-color:var(--button-bg-color-secondary-hover)}.open-button:active{background-color:var(--button-bg-color-secondary-active)}.raw-open-button{display:contents;background:none}";const u=class{constructor(o){e(this,o),this.vviinnWidgetClose=i(this,"vviinnWidgetClose"),this.position="bottom",this.widgetScrollbar=!1,this.mode="continuity",this.campaigns="",this.imageWidth=p,this.imageRatio=1,this.addToBasketShow=!1,this.addPriceContainer=!1,this.showFilters=!1,this.setItemsAmount=4,this.favoriteShow=!1,this.useCarousel=!0,this.showInWidget=!1,this.imageResolutionWidth=f,this.showInCustomContainer=!1,this.showInModal=!1,this.isAppended=!1,this.sidebarState="idle",this.showLoadingClass=!1,this.recommendationsLoading=!1,this.hidden=!1,this.setRecommendationsLoading=o=>{this.recommendationsLoading=o},this.isSourceImageValid=()=>{var o;return!!(null===(o=this.sourceProduct)||void 0===o?void 0:o.image)}}updatingAllCardsStarted(){const{height:o}=this.getSidebarRectangle(),e=this.getAsideElement();e.style.height!==`${o}px`&&(e.style.height=`${o}px`)}updatingAllCardsFinished(){const o=this.getAsideElement();"auto"!==o.style.height&&(o.style.height="auto")}bodyClickListener(o){const e=this.getSidebarRectangle();e&&this.showInModal&&!n(o,e)&&(this.sidebarState="closed")}sourceProductReceived(o){this.sourceProduct=o.detail}handleLoadingChange(o){o?(this.showLoadingClass=!0,clearTimeout(this.loadingClassTimeout)):this.loadingClassTimeout=setTimeout((()=>{this.showLoadingClass=!1}),500)}getClassMap(){return{[this.position]:!0,[this.sidebarState]:!0,"no-carousel":!this.useCarousel,"no-fixed":this.showInCustomContainer,appended:this.isAppended,loading:this.showLoadingClass}}getAsideElement(){return this.el.shadowRoot.querySelector("aside")}getSidebarRectangle(){var o;return null===(o=this.getAsideElement())||void 0===o?void 0:o.getBoundingClientRect()}async componentWillLoad(){await c.init({lng:this.locale,fallbackLng:"en",resources:s})}componentDidLoad(){const o=this.el.shadowRoot.querySelector("vviinn-vpr-widget");Array.from(this.buttonChildren).forEach((e=>{const t=e.cloneNode(!0);e.hasAttribute("slot")&&o.appendChild(t)}))}disconnectedCallback(){clearTimeout(this.loadingClassTimeout)}render(){var e;return o(t,{key:"4b9ea1751cd51a239447d8fe1178cff375aeb465",class:this.getClassMap(),style:{display:this.hidden?"none":void 0},exportparts:`body, close-sidebar, ${l}, ${d}`},o("aside",{key:"f4037c3e828eef19454a6d1a73059a6ba0047dff",class:"sidebar",part:"body",onAnimationEnd:o=>this.handleAnimationEnd(o)},o("header",{key:"4c7c02c45247b2daef79b8c0d06b29f945ed02f6",class:{"contains-source-img":this.isSourceImageValid()},part:"sidebar-header"},"set"!==this.mode&&o(r,{key:"9f1824fcce22445521533ff55a8d92ada9548ee3"},this.renderSourceImage(),0!==(null===(e=this.sidebarTitle)||void 0===e?void 0:e.length)&&o("span",{key:"a32d884502443b3d722d5554f04e0d979c26652b",class:"title",part:"recommendations-title"},this.sidebarTitle||c.t("discoveryWidgetTitle"))),o("button",{key:"3bfca729d6755feaf774c3e7d71f2f9d930255bc",class:"close-sidebar",onClick:()=>this.sidebarState="closed",part:"close-sidebar"},o(h,{key:"717f9d0f1be9765e153a51def68e6a636ada7675"}))),o("main",{key:"0dbf46ad6c85e9b2f5541808be5a549ac25fd525",part:"sidebar-content"},o("vviinn-vpr-widget",{key:"891406847848a737acdc61de3220b18893160891",token:this.token,currencySign:this.currencySign,pricePrefix:this.pricePrefix,apiPath:this.apiPath,locale:this.locale,productId:this.productId,exportparts:`${l}, ${d}`,imageWidth:this.imageWidth,imageRatio:this.imageRatio,setItemsAmount:this.setItemsAmount,blockTitle:"",mode:this.mode,"campaign-type":this.campaignType,useCarousel:this.useCarousel,onVviinnRecommendationsLoaded:()=>{this.hidden=!1,this.sidebarState="open"},showScroll:this.widgetScrollbar,campaigns:this.campaigns,color:this.color,buttonElementId:this.buttonElementId,noResultText:this.noResultText,noResultShow:this.noResultShow,gridArrowsDynamic:this.gridArrowsDynamic,showingInButton:this.showingInButton,excluded:this.excluded,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,closed:"closed"===this.sidebarState,opened:"open"===this.sidebarState,addToBasketShow:this.addToBasketShow,cssUrl:this.cssUrl,showFilters:this.showFilters,setModeDiscounts:this.setModeDiscounts,updateButtonLocation:this.updateButtonLocation,addPriceContainer:this.addPriceContainer,favoriteShow:this.favoriteShow,isAppended:this.isAppended,showInWidget:this.showInWidget,recommendationsLoading:this.recommendationsLoading,setRecommendationsLoading:this.setRecommendationsLoading,imageResolutionWidth:this.imageResolutionWidth}))))}renderSourceImage(){var e,t,i,r;const a=(null===(t=null===(e=this.sourceProduct)||void 0===e?void 0:e.image)||void 0===t?void 0:t.thumbnail)||(null===(r=null===(i=this.sourceProduct)||void 0===i?void 0:i.image)||void 0===r?void 0:r.original)||null;return a?o("img",{class:"source-image",part:"source-image",src:a}):null}handleAnimationEnd({animationName:o}){o.includes("slideOut")&&(this.hidden=!0)}get el(){return a(this)}static get watchers(){return{recommendationsLoading:["handleLoadingChange"]}}};u.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{--vviinn-carousel-columns:4;box-sizing:border-box;position:fixed;z-index:2;display:block;display:flex;height:100vh;left:0;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.bottom){flex-direction:column;justify-content:end}:host(.no-fixed){position:unset;display:block;width:100%;height:auto}:host(.no-fixed.no-carousel.appended.loading){min-height:calc((var(--product-card-calculated-height) * 3) + 48px)}:host(.right){flex-direction:row;justify-content:flex-end}:host [slot]{visibility:hidden;position:absolute}header{position:relative;text-align:center;padding:var(--spacing-300);padding-top:0px}header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;padding:6px;border:1px solid var(--color-border-02);-o-object-fit:contain;object-fit:contain}:host(.right) header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}main{padding:0 var(--spacing-300)}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;padding-top:var(--spacing-300);display:flex;flex-direction:column;max-height:100vh;overflow-y:auto}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.no-fixed) .sidebar{transform:unset !important}:host(.bottom.closed) .sidebar{animation-name:slideOutFromBottom;animation-duration:0.5s;animation-fill-mode:forwards}:host(.open){transition:background 0.3s ease-in-out;background:rgba(0, 0, 0, 0.2)}:host(.bottom.open) .sidebar{animation-name:slideInFromBottom;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{animation-name:slideOutFromRight;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right.open) .sidebar{animation-name:slideInFromRight;animation-duration:0.5s;animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-results){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:var(--spacing-300)}:host(.right) vviinn-vpr-widget{overflow:auto}.title{font-style:normal;font-weight:var(--font-weight-600);font-size:var(--font-size-title);font-family:var(--font-family, var(--font-family-base));line-height:40px;text-align:center;color:#000000}.close-sidebar{position:absolute;background:transparent;border:none;cursor:pointer;margin:0;top:0;color:var(--color-icon-secondary);transition:color 0.1s ease-in-out;padding:var(--spacing-100);right:var(--spacing-200)}.close-sidebar:hover{color:var(--color-icon-primary)}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";export{g as vviinn_button,u as vviinn_recommendations_sidebar}
@@ -1 +1 @@
1
- import{h as e,r as t,c as i,H as o,g as r}from"./p-BcMtFp89.js";import{a as s,u as a,g as n,_ as c,m as l,b as h}from"./p-HTOQ7YPT.js";import{s as d}from"./p-etuZ8m3J.js";import{i as p}from"./p-Blhy9XN1.js";import{r as f}from"./p-DcA7Zxs5.js";import{s as b}from"./p-DJLLuTh-.js";const g=()=>e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M20.6 4.57C17.39 4.19 16.88 3.68 16.42 0.37C16.38 0.15 16.22 0 16.01 0C15.8 0 15.63 0.15 15.59 0.37C15.12 3.66 14.63 4.13 11.41 4.57C11.17 4.61 11.01 4.77 11.01 5C11.01 5.23 11.17 5.39 11.41 5.42C14.63 5.81 15.14 6.31 15.59 9.62C15.63 9.84 15.8 10 16.01 10C16.22 10 16.39 9.84 16.42 9.62C16.89 6.31 17.39 5.81 20.6 5.42C20.84 5.38 21 5.22 21 5C21 4.78 20.83 4.6 20.6 4.57Z",fill:"#525252"}),e("path",{d:"M14 12C14 9.24 11.76 7 9 7C6.24 7 4 9.24 4 12C4 14.76 6.24 17 9 17C10.02 17 10.96 16.69 11.75 16.17L16.29 20.71L17.7 19.3L13.16 14.76C13.68 13.97 13.99 13.02 13.99 12.01L14 12ZM9 15C7.35 15 6 13.65 6 12C6 10.35 7.35 9 9 9C10.65 9 12 10.35 12 12C12 13.65 10.65 15 9 15Z",fill:"#525252"})),x=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",width:"24",height:"24"},e("path",{d:"M12 14C11.1667 14 10.4583 13.7083 9.87501 13.125C9.29168 12.5417 9.00001 11.8333 9.00001 11V5C9.00001 4.16667 9.29168 3.45833 9.87501 2.875C10.4583 2.29167 11.1667 2 12 2C12.8333 2 13.5417 2.29167 14.125 2.875C14.7083 3.45833 15 4.16667 15 5V11C15 11.8333 14.7083 12.5417 14.125 13.125C13.5417 13.7083 12.8333 14 12 14ZM11 20V17.925C9.46668 17.7083 8.15418 17.0583 7.06251 15.975C5.97085 14.8917 5.30835 13.575 5.07501 12.025C5.04168 11.7417 5.11668 11.5 5.30001 11.3C5.48335 11.1 5.71668 11 6.00001 11C6.28335 11 6.52085 11.0958 6.71251 11.2875C6.90418 11.4792 7.03335 11.7167 7.10001 12C7.33335 13.1667 7.91251 14.125 8.83751 14.875C9.76251 15.625 10.8167 16 12 16C13.2 16 14.2583 15.6208 15.175 14.8625C16.0917 14.1042 16.6667 13.15 16.9 12C16.9667 11.7167 17.0958 11.4792 17.2875 11.2875C17.4792 11.0958 17.7167 11 18 11C18.2833 11 18.5167 11.1 18.7 11.3C18.8833 11.5 18.9583 11.7417 18.925 12.025C18.6917 13.5417 18.0333 14.85 16.95 15.95C15.8667 17.05 14.55 17.7083 13 17.925V20C13 20.2833 12.9042 20.5208 12.7125 20.7125C12.5208 20.9042 12.2833 21 12 21C11.7167 21 11.4792 20.9042 11.2875 20.7125C11.0958 20.5208 11 20.2833 11 20Z",fill:"#161616"})),u=()=>{var e;const t=window,i=window.navigator,o=i.vendor,r=[void 0!==t.opr,i.userAgent.indexOf("Firefox")>-1,i.userAgent.indexOf("Edg")>-1].some((e=>!0===e)),s=void 0!==i.userAgentData?"Google Chrome"===(null===(e=i.userAgentData.brands[0])||void 0===e?void 0:e.brand):"Google Inc."===o;return{forbiddenBrowser:r,isChrome:s,isSafari:i.userAgent.indexOf("Safari")>-1&&!s}},v=class{constructor(e){t(this,e),this.vviinnImageUploadFinished=i(this,"vviinnImageUploadFinished"),this.vviinnFilterTriggered=i(this,"vviinnFilterTriggered"),this.vviinnTextSearchStarted=i(this,"vviinnTextSearchStarted"),this.widgetTextSearchFinished=i(this,"widgetTextSearchFinished"),this.vviinnSelectedFiltersReset=i(this,"vviinnSelectedFiltersReset"),this.mode="basic",this.placeholder="",this.showInWidget=!1,this.showOnFirstScreen=!1,this.isRecording=!1,this.showTooltip=!1,this.isShowPreloader=()=>this.state.loading&&"text"===this.state.searchType,this.skipStateChanges=e=>this.showInWidget!==e,this.isShowRecording=()=>this.isRecording,this.showRecording=()=>this.isRecording=!0,this.hideRecording=()=>this.isRecording=!1,this.setShowTooltip=e=>{this.showTooltip=e},this.tooltipText=(()=>{const{isSafari:e}=u();return e?"speechRecognition.tooltip.siri":"speechRecognition.tooltip.general"})(),this.getPlaceholderText=()=>this.isShowRecording()?p.t("speechRecognition.placeholder"):this.placeholder.length?this.placeholder:p.t("textSearchPlaceholder"),this.recognition=((e,t,i,o)=>{const r=(()=>{const e=window,t=e.webkitSpeechRecognition||e.SpeechRecognition;if(!t)return;const{forbiddenBrowser:i,isChrome:o,isSafari:r}=u();return i?void 0:o||r?t:void 0})();if(!r)return;const s=new r;let a;return s.interimResults=!1,s.maxAlternatives=1,s.continuous=!1,s.lang=e,s.onstart=()=>{t(),a=setTimeout((()=>{s.stop()}),1e4)},s.onspeechend=()=>{s.stop(),i(),clearTimeout(a)},s.onend=i,s.onresult=e=>{o(e.results[0][0].transcript)},s})(n.locale,(()=>{this.showRecording(),this.setShowTooltip(!1),clearTimeout(this.triggerTooltipStart)}),this.hideRecording,(e=>{this.setSearchQuery(e),this.handleTextSearch()})),this.imageUploadFinishedHandler=({detail:e})=>{this.skipStateChanges(e.isTriggeredByVpsWidget)||(this.searchQuery="")},this.filterTriggeredHandler=({detail:e})=>{const{action:t,customTrigger:i}=e;"deselect"===t&&"TPS"===i&&(this.searchQuery="")},this.trackTextSearch=()=>this.vviinnFilterTriggered.emit({kind:this.searchQuery,action:"select",customTrigger:"TPS",isTriggeredByVpsWidget:this.showInWidget}),this.setSearchQuery=e=>{this.searchQuery=e}}connectedCallback(){s(this);const{state:e,storeName:t}=a(this.showInWidget);this.state=e,this.storeName=t,document.addEventListener("vviinnFilterTriggered",this.filterTriggeredHandler),document.addEventListener("vviinnImageUploadFinished",this.imageUploadFinishedHandler)}disconnectedCallback(){document.removeEventListener("vviinnFilterTriggered",this.filterTriggeredHandler),document.removeEventListener("vviinnImageUploadFinished",this.imageUploadFinishedHandler),clearTimeout(this.triggerTooltipStart),clearTimeout(this.triggerTooltipEnd)}async componentWillLoad(){var e;await p.init({lng:n.locale,fallbackLng:"en",resources:f}),d(this,this.el),!this.showInWidget&&(null===(e=this.searchQuery)||void 0===e?void 0:e.length)>0&&(this.vviinnTextSearchStarted.emit({query:this.searchQuery,isTriggeredByVpsWidget:this.showInWidget}),this.trackTextSearch())}handleInputChange(e){this.setSearchQuery(e.target.value)}async handleSpeech(){this.isRecording?(this.recognition.stop(),this.hideRecording(),this.setShowTooltip(!1)):(this.recognition.start(),this.setSearchQuery(""),this.triggerTooltipStart=setTimeout((()=>{this.isRecording||(this.setShowTooltip(!0),this.triggerTooltipEnd=setTimeout((()=>{this.setShowTooltip(!1)}),5e3))}),1e3))}async handleTextSearch(){if(this.searchQuery&&(this.trackTextSearch(),this.vviinnTextSearchStarted.emit({query:this.searchQuery,isTriggeredByVpsWidget:this.showInWidget}),this.showInWidget&&this.showOnFirstScreen)){const e=c.pipe(await l(this.storeName,this.searchQuery),h((()=>null)),(e=>e));e&&(this.widgetTextSearchFinished.emit({query:this.searchQuery,requestId:e.requestId}),this.vviinnSelectedFiltersReset.emit({isTriggeredByVpsWidget:this.showInWidget}))}}handleKeyPress(e){"Enter"===e.key&&this.handleTextSearch()}render(){return e(o,{key:"a066fa697365db3c9c5e54a46298e29d811e421d",exportparts:b},e("div",{key:"bd9405c73b5b3d57573e22c57867a62e6476d424",class:"text-search-container",part:"text-search-container"},e("input",{key:"a10326c55a1e0388869d937b18832ab5e5242b88",class:"text-search-input",part:"text-search-input",type:"text",placeholder:this.getPlaceholderText(),value:this.searchQuery,onInput:e=>this.handleInputChange(e),onKeyUp:e=>this.handleKeyPress(e)}),"extended"===this.mode&&e("vviinn-vps-button",{key:"e1761d5971f891e66fe8c202d83247419de9d0d3",token:n.token,locale:n.locale,apiPath:n.apiPath,addStyle:!1,showInWidget:!1,exportparts:"vviinn-button"}),"basic"===this.mode&&e("slot",{key:"be7158671ace61a4171a2cc9ba50208c3192e1ec",name:"vviinn-text-search-actions"}),("extended"===this.mode||this.showInWidget)&&this.recognition&&e("button",{key:"a8f654025d2870aae5850bf17ee2a3d5769b4380",class:"speech-button",part:"speech-button",onClick:()=>this.handleSpeech()},e(x,{key:"636b4c426410f1a7f45923718462940b494cfe91"}),this.isShowRecording()&&e("span",{key:"d0d64aecf6b9850237cdabee58595652a6568c32",class:"recording-indicator"})),e("button",{key:"6c21d014e94e087ed3b8b9dc5f2654d9d31ca633",class:"text-search-button",part:"text-search-button",onClick:()=>this.handleTextSearch(),disabled:this.state.loading},this.isShowPreloader()?e("vviinn-preloader",null):e("slot",{name:"vviinn-text-search-icon"},e(g,null)))),this.showTooltip&&e("p",{key:"ce6634b658ae8535e0ee007370c728cafa941387",class:"text-search-tooltip",part:"text-search-tooltip"},p.t(this.tooltipText)))}get el(){return r(this)}};v.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:relative;width:100%;}.text-search-container{display:flex;align-items:center;gap:var(--spacing-50);width:100%;height:46px;border:1px solid var(--color-border-02);border-radius:8px;transition:border-color 0.2s;overflow:hidden;box-sizing:border-box}.text-search-container:focus-within{border-color:#8d8d8d}.text-search-input,.text-search-tooltip{font-size:16px;font-style:normal;font-weight:400;font-family:var(--font-family, var(--font-family-base))}.text-search-input{height:100%;padding-left:16px;box-sizing:border-box;border:none;outline:none;overflow:hidden;text-overflow:ellipsis;flex-grow:2;width:150px}.text-search-input::-moz-placeholder{color:#a8a8a8}.text-search-input::placeholder{color:#a8a8a8}.text-search-input:focus,.text-search-input:active{border-color:#8d8d8d}vviinn-vps-button{height:100%}.text-search-button,.speech-button,vviinn-vps-button::part(vviinn-button){border:none;height:100%;display:flex;justify-content:center;align-items:center;cursor:pointer}.speech-button,vviinn-vps-button::part(vviinn-button){padding:0 8px}.upload-button-text{display:contents}.text-search-button{background-color:#f4f4f4;transition:background-color 0.2s;aspect-ratio:1 / 1}.speech-button{background-color:transparent;position:relative}@keyframes recordingSpeech{0%{background-color:#ff0000;scale:1}100%{background-color:#ff8888;scale:1.5}}.recording-indicator{border-radius:50%;width:8px;height:8px;left:24px;top:24px;background-color:#ff0000;position:absolute;animation:recordingSpeech 1s infinite alternate ease-in-out}@keyframes fade-out{0%{opacity:0}20%{opacity:1}80%{opacity:1}100%{opacity:0;display:none}}.text-search-tooltip{position:absolute;right:0;top:80%;background:#f4f4f4;animation:fade-out 5s forwards;width:-moz-fit-content;width:fit-content;padding:24px;border-radius:8px;border:1px solid #8d8d8d;box-sizing:border-box}.text-search-button:not(:disabled):hover{background-color:#e0e0e0}.text-search-button:disabled{cursor:unset}vviinn-image-selector,::slotted([slot="vviinn-text-search-actions"]){margin:auto 8px}vviinn-preloader{--preloader-size:16px;display:flex;color:#525252}';export{v as vviinn_text_search}
1
+ import{h as e,r as t,c as i,H as o,g as r}from"./p-BcMtFp89.js";import{a as s,u as a,g as n,_ as c,m as l,b as h}from"./p-HTOQ7YPT.js";import{s as d}from"./p-etuZ8m3J.js";import{i as p}from"./p-Blhy9XN1.js";import{r as f}from"./p-DcA7Zxs5.js";import{s as b}from"./p-CYUAT3RF.js";const g=()=>e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M20.6 4.57C17.39 4.19 16.88 3.68 16.42 0.37C16.38 0.15 16.22 0 16.01 0C15.8 0 15.63 0.15 15.59 0.37C15.12 3.66 14.63 4.13 11.41 4.57C11.17 4.61 11.01 4.77 11.01 5C11.01 5.23 11.17 5.39 11.41 5.42C14.63 5.81 15.14 6.31 15.59 9.62C15.63 9.84 15.8 10 16.01 10C16.22 10 16.39 9.84 16.42 9.62C16.89 6.31 17.39 5.81 20.6 5.42C20.84 5.38 21 5.22 21 5C21 4.78 20.83 4.6 20.6 4.57Z",fill:"#525252"}),e("path",{d:"M14 12C14 9.24 11.76 7 9 7C6.24 7 4 9.24 4 12C4 14.76 6.24 17 9 17C10.02 17 10.96 16.69 11.75 16.17L16.29 20.71L17.7 19.3L13.16 14.76C13.68 13.97 13.99 13.02 13.99 12.01L14 12ZM9 15C7.35 15 6 13.65 6 12C6 10.35 7.35 9 9 9C10.65 9 12 10.35 12 12C12 13.65 10.65 15 9 15Z",fill:"#525252"})),x=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",width:"24",height:"24"},e("path",{d:"M12 14C11.1667 14 10.4583 13.7083 9.87501 13.125C9.29168 12.5417 9.00001 11.8333 9.00001 11V5C9.00001 4.16667 9.29168 3.45833 9.87501 2.875C10.4583 2.29167 11.1667 2 12 2C12.8333 2 13.5417 2.29167 14.125 2.875C14.7083 3.45833 15 4.16667 15 5V11C15 11.8333 14.7083 12.5417 14.125 13.125C13.5417 13.7083 12.8333 14 12 14ZM11 20V17.925C9.46668 17.7083 8.15418 17.0583 7.06251 15.975C5.97085 14.8917 5.30835 13.575 5.07501 12.025C5.04168 11.7417 5.11668 11.5 5.30001 11.3C5.48335 11.1 5.71668 11 6.00001 11C6.28335 11 6.52085 11.0958 6.71251 11.2875C6.90418 11.4792 7.03335 11.7167 7.10001 12C7.33335 13.1667 7.91251 14.125 8.83751 14.875C9.76251 15.625 10.8167 16 12 16C13.2 16 14.2583 15.6208 15.175 14.8625C16.0917 14.1042 16.6667 13.15 16.9 12C16.9667 11.7167 17.0958 11.4792 17.2875 11.2875C17.4792 11.0958 17.7167 11 18 11C18.2833 11 18.5167 11.1 18.7 11.3C18.8833 11.5 18.9583 11.7417 18.925 12.025C18.6917 13.5417 18.0333 14.85 16.95 15.95C15.8667 17.05 14.55 17.7083 13 17.925V20C13 20.2833 12.9042 20.5208 12.7125 20.7125C12.5208 20.9042 12.2833 21 12 21C11.7167 21 11.4792 20.9042 11.2875 20.7125C11.0958 20.5208 11 20.2833 11 20Z",fill:"#161616"})),u=()=>{var e;const t=window,i=window.navigator,o=i.vendor,r=[void 0!==t.opr,i.userAgent.indexOf("Firefox")>-1,i.userAgent.indexOf("Edg")>-1].some((e=>!0===e)),s=void 0!==i.userAgentData?"Google Chrome"===(null===(e=i.userAgentData.brands[0])||void 0===e?void 0:e.brand):"Google Inc."===o;return{forbiddenBrowser:r,isChrome:s,isSafari:i.userAgent.indexOf("Safari")>-1&&!s}},v=class{constructor(e){t(this,e),this.vviinnImageUploadFinished=i(this,"vviinnImageUploadFinished"),this.vviinnFilterTriggered=i(this,"vviinnFilterTriggered"),this.vviinnTextSearchStarted=i(this,"vviinnTextSearchStarted"),this.widgetTextSearchFinished=i(this,"widgetTextSearchFinished"),this.vviinnSelectedFiltersReset=i(this,"vviinnSelectedFiltersReset"),this.mode="basic",this.placeholder="",this.showInWidget=!1,this.showOnFirstScreen=!1,this.isRecording=!1,this.showTooltip=!1,this.isShowPreloader=()=>this.state.loading&&"text"===this.state.searchType,this.skipStateChanges=e=>this.showInWidget!==e,this.isShowRecording=()=>this.isRecording,this.showRecording=()=>this.isRecording=!0,this.hideRecording=()=>this.isRecording=!1,this.setShowTooltip=e=>{this.showTooltip=e},this.tooltipText=(()=>{const{isSafari:e}=u();return e?"speechRecognition.tooltip.siri":"speechRecognition.tooltip.general"})(),this.getPlaceholderText=()=>this.isShowRecording()?p.t("speechRecognition.placeholder"):this.placeholder.length?this.placeholder:p.t("textSearchPlaceholder"),this.recognition=((e,t,i,o)=>{const r=(()=>{const e=window,t=e.webkitSpeechRecognition||e.SpeechRecognition;if(!t)return;const{forbiddenBrowser:i,isChrome:o,isSafari:r}=u();return i?void 0:o||r?t:void 0})();if(!r)return;const s=new r;let a;return s.interimResults=!1,s.maxAlternatives=1,s.continuous=!1,s.lang=e,s.onstart=()=>{t(),a=setTimeout((()=>{s.stop()}),1e4)},s.onspeechend=()=>{s.stop(),i(),clearTimeout(a)},s.onend=i,s.onresult=e=>{o(e.results[0][0].transcript)},s})(n.locale,(()=>{this.showRecording(),this.setShowTooltip(!1),clearTimeout(this.triggerTooltipStart)}),this.hideRecording,(e=>{this.setSearchQuery(e),this.handleTextSearch()})),this.imageUploadFinishedHandler=({detail:e})=>{this.skipStateChanges(e.isTriggeredByVpsWidget)||(this.searchQuery="")},this.filterTriggeredHandler=({detail:e})=>{const{action:t,customTrigger:i}=e;"deselect"===t&&"TPS"===i&&(this.searchQuery="")},this.trackTextSearch=()=>this.vviinnFilterTriggered.emit({kind:this.searchQuery,action:"select",customTrigger:"TPS",isTriggeredByVpsWidget:this.showInWidget}),this.setSearchQuery=e=>{this.searchQuery=e}}connectedCallback(){s(this);const{state:e,storeName:t}=a(this.showInWidget);this.state=e,this.storeName=t,document.addEventListener("vviinnFilterTriggered",this.filterTriggeredHandler),document.addEventListener("vviinnImageUploadFinished",this.imageUploadFinishedHandler)}disconnectedCallback(){document.removeEventListener("vviinnFilterTriggered",this.filterTriggeredHandler),document.removeEventListener("vviinnImageUploadFinished",this.imageUploadFinishedHandler),clearTimeout(this.triggerTooltipStart),clearTimeout(this.triggerTooltipEnd)}async componentWillLoad(){var e;await p.init({lng:n.locale,fallbackLng:"en",resources:f}),d(this,this.el),!this.showInWidget&&(null===(e=this.searchQuery)||void 0===e?void 0:e.length)>0&&(this.vviinnTextSearchStarted.emit({query:this.searchQuery,isTriggeredByVpsWidget:this.showInWidget}),this.trackTextSearch())}handleInputChange(e){this.setSearchQuery(e.target.value)}async handleSpeech(){this.isRecording?(this.recognition.stop(),this.hideRecording(),this.setShowTooltip(!1)):(this.recognition.start(),this.setSearchQuery(""),this.triggerTooltipStart=setTimeout((()=>{this.isRecording||(this.setShowTooltip(!0),this.triggerTooltipEnd=setTimeout((()=>{this.setShowTooltip(!1)}),5e3))}),1e3))}async handleTextSearch(){if(this.searchQuery&&(this.trackTextSearch(),this.vviinnTextSearchStarted.emit({query:this.searchQuery,isTriggeredByVpsWidget:this.showInWidget}),this.showInWidget&&this.showOnFirstScreen)){const e=c.pipe(await l(this.storeName,this.searchQuery),h((()=>null)),(e=>e));e&&(this.widgetTextSearchFinished.emit({query:this.searchQuery,requestId:e.requestId}),this.vviinnSelectedFiltersReset.emit({isTriggeredByVpsWidget:this.showInWidget}))}}handleKeyPress(e){"Enter"===e.key&&this.handleTextSearch()}render(){return e(o,{key:"c4929073c1229ccdc941c4168ce4c20e7ab86748",exportparts:b},e("div",{key:"6b18110e89fce5f80de212cdcd8bb4aa93c9a252",class:"text-search-container",part:"text-search-container"},e("input",{key:"d65c310e2ead8f2e918e29c23c6ee6810d3f023f",class:"text-search-input",part:"text-search-input",type:"text",placeholder:this.getPlaceholderText(),value:this.searchQuery,onInput:e=>this.handleInputChange(e),onKeyUp:e=>this.handleKeyPress(e)}),"extended"===this.mode&&e("vviinn-vps-button",{key:"63c12d90c876c52d3b1ac0672657ba9034d566e2",token:n.token,locale:n.locale,apiPath:n.apiPath,addStyle:!1,showInWidget:!1,exportparts:"vviinn-button"}),"basic"===this.mode&&e("slot",{key:"b0d3250b809ea692bff4a0c9f8ae9c88e4afe702",name:"vviinn-text-search-actions"}),("extended"===this.mode||this.showInWidget)&&this.recognition&&e("button",{key:"f59432039bddcae76e224e9ad4dd1dc4a57f56da",class:"speech-button",part:"speech-button",onClick:()=>this.handleSpeech()},e(x,{key:"155bee4ac5cb4e7b86ffcd28483027d36a378caa"}),this.isShowRecording()&&e("span",{key:"da1ab308baab739ccb48f0eb68f32c6c40b68e30",class:"recording-indicator"})),e("button",{key:"bbe403e8e4a5940fa43f884782a788765d55b846",class:"text-search-button",part:"text-search-button",onClick:()=>this.handleTextSearch(),disabled:this.state.loading},this.isShowPreloader()?e("vviinn-preloader",null):e("slot",{name:"vviinn-text-search-icon"},e(g,null)))),this.showTooltip&&e("p",{key:"8e40fff9010c28394a8896d5387a5c4141d72f19",class:"text-search-tooltip",part:"text-search-tooltip"},p.t(this.tooltipText)))}get el(){return r(this)}};v.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:relative;width:100%;}.text-search-container{display:flex;align-items:center;gap:var(--spacing-50);width:100%;height:46px;border:1px solid var(--color-border-02);border-radius:8px;transition:border-color 0.2s;overflow:hidden;box-sizing:border-box}.text-search-container:focus-within{border-color:#8d8d8d}.text-search-input,.text-search-tooltip{font-size:16px;font-style:normal;font-weight:400;font-family:var(--font-family, var(--font-family-base))}.text-search-input{height:100%;padding-left:16px;box-sizing:border-box;border:none;outline:none;overflow:hidden;text-overflow:ellipsis;flex-grow:2;width:150px}.text-search-input::-moz-placeholder{color:#a8a8a8}.text-search-input::placeholder{color:#a8a8a8}.text-search-input:focus,.text-search-input:active{border-color:#8d8d8d}vviinn-vps-button{height:100%}.text-search-button,.speech-button,vviinn-vps-button::part(vviinn-button){border:none;height:100%;display:flex;justify-content:center;align-items:center;cursor:pointer}.speech-button,vviinn-vps-button::part(vviinn-button){padding:0 8px}.upload-button-text{display:contents}.text-search-button{background-color:#f4f4f4;transition:background-color 0.2s;aspect-ratio:1 / 1}.speech-button{background-color:transparent;position:relative}@keyframes recordingSpeech{0%{background-color:#ff0000;scale:1}100%{background-color:#ff8888;scale:1.5}}.recording-indicator{border-radius:50%;width:8px;height:8px;left:24px;top:24px;background-color:#ff0000;position:absolute;animation:recordingSpeech 1s infinite alternate ease-in-out}@keyframes fade-out{0%{opacity:0}20%{opacity:1}80%{opacity:1}100%{opacity:0;display:none}}.text-search-tooltip{position:absolute;right:0;top:80%;background:#f4f4f4;animation:fade-out 5s forwards;width:-moz-fit-content;width:fit-content;padding:24px;border-radius:8px;border:1px solid #8d8d8d;box-sizing:border-box}.text-search-button:not(:disabled):hover{background-color:#e0e0e0}.text-search-button:disabled{cursor:unset}vviinn-image-selector,::slotted([slot="vviinn-text-search-actions"]){margin:auto 8px}vviinn-preloader{--preloader-size:16px;display:flex;color:#525252}';export{v as vviinn_text_search}
@@ -1 +1 @@
1
- const e=["filters-sub-row","filters-option-button","filters-option-image","filters-option-color-dot","filters-option-text","filters-option-icon-wrapper"],t=["extended-filters-button","extended-filters-modal","extended-filters-modal-wrapper","extended-filters-header","extended-filters-modal-close","extended-filters-list","extended-filters-main","extended-filters-row","extended-filters-row-wrapper","extended-filters-main-button","extended-filters-selected-wrapper","extended-filters-sub-list","extended-filters-actions","extended-filters-apply","extended-filters-reset"],r=["filters-wrapper","filters-list","filters-main-button","filters-footer","filters-footer-list","filters-sub-button"],a=["histogram","histogram-bar","histogram-range-container","histogram-sliders-control","histogram-from-slider","histogram-to-slider","histogram-label-wrapper","histogram-label"],o=["energy-label-container","energy-label-icon","energy-label-product-type","energy-label-data-sheet-link"],s=(...e)=>e.flat().join(", "),i=s(t,a,e),l=s(r,a,e);s(["selected-filters-list"],e);const n=s(a),d=s(o),c="products",p=s(["product-card","content-container","brand","product-type","currency","deeplink","image","image-container","image-link","image-picture","image-placeholder","title","basket-button","basket-button-container","update-button-item","product-card-actions","product-card-actions-top","discount-label","discount-percentage"],["price-container","price-regular","price-sale","price-outdated","price-amount-regular","price-amount-sale","price-amount-outdated","price-amount-base-regular","price-amount-base-sale","price-amount-base-outdated","price-prefix"],["custom-label-0","custom-label-1","custom-label-2","custom-label-3","custom-label-4"],o),u=s(t,r,a,e),m=s(["upload-photo_button","start-camera_button"]),b=s(["text-search-input","text-search-button","speech-button","text-search-tooltip","text-search-container"]),f=s(["items-group","carousel-button","recommendations-results"]),g=s(["results-title","close-button","secondary-action"]);export{c as a,u as b,f as c,m as d,i as e,l as f,d as g,n as h,g as m,p,b as s}
1
+ const e=["filters-sub-row","filters-option-button","filters-option-image","filters-option-color-dot","filters-option-text","filters-option-icon-wrapper"],t=["extended-filters-button","extended-filters-modal","extended-filters-modal-wrapper","extended-filters-header","extended-filters-modal-close","extended-filters-list","extended-filters-main","extended-filters-row","extended-filters-row-wrapper","extended-filters-main-button","extended-filters-selected-wrapper","extended-filters-sub-list","extended-filters-actions","extended-filters-apply","extended-filters-reset"],r=["filters-wrapper","filters-list","filters-main-button","filters-footer","filters-footer-list","filters-sub-button"],a=["histogram","histogram-bar","histogram-range-container","histogram-sliders-control","histogram-from-slider","histogram-to-slider","histogram-label-wrapper","histogram-label"],o=["energy-label-container","energy-label-icon","energy-label-product-type","energy-label-data-sheet-link"],n=(...e)=>e.flat().join(", "),i=n(t,a,e),s=n(r,a,e);n(["selected-filters-list"],e);const l=n(a),c=n(o),d="products",p=n(["product-card","content-container","brand","product-type","currency","deeplink","image","image-container","image-link","image-picture","image-placeholder","title","basket-button","basket-button-container","update-button-item","product-card-actions","product-card-actions-top","discount-label","discount-percentage"],["price-container","price-regular","price-sale","price-outdated","price-amount-regular","price-amount-sale","price-amount-outdated","price-amount-base-regular","price-amount-base-sale","price-amount-base-outdated","price-prefix"],["custom-label-0","custom-label-1","custom-label-2","custom-label-3","custom-label-4"],o),u=n(["content-card","content-card-image-container","content-card-content-container","content-card-image-picture","content-card-image","content-label","content-text","content-link"]),m=n(t,r,a,e),b=n(["upload-photo_button","start-camera_button"]),f=n(["text-search-input","text-search-button","speech-button","text-search-tooltip","text-search-container"]),g=n(["items-group","carousel-button","recommendations-results"]),x=n(["results-title","close-button","secondary-action"]);export{d as a,m as b,g as c,b as d,i as e,s as f,c as g,l as h,u as i,x as m,p,f as s}
@@ -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.166.0";export{a,t as c,r as f,s as v}
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.167.0";export{a,t as c,r as f,s as v}