vviinn-widgets 2.0.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/cjs/Handler-d1a8a86a.js +329 -0
  2. package/dist/cjs/{app-globals-de6924b5.js → app-globals-d0251be8.js} +1 -1
  3. package/dist/cjs/cropper-handler.cjs.entry.js +27 -0
  4. package/dist/cjs/customized-slots-14b77e4a.js +53 -0
  5. package/dist/cjs/{cropper-handler_28.cjs.entry.js → highlight-box_22.cjs.entry.js} +48 -437
  6. package/dist/{esm/Array-e81cf4a3.js → cjs/imageSearch.store-d9ed1a5b.js} +10009 -3391
  7. package/dist/cjs/{index-7adce49f.js → index-141137b2.js} +14 -362
  8. package/dist/cjs/{index-8a276115.js → index-a5e15a0c.js} +7 -1
  9. package/dist/cjs/loader.cjs.js +3 -3
  10. package/dist/cjs/vviinn-carousel_5.cjs.entry.js +1232 -0
  11. package/dist/cjs/vviinn-error.cjs.entry.js +19 -0
  12. package/dist/cjs/vviinn-preloader.cjs.entry.js +26 -0
  13. package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
  14. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +97 -0
  15. package/dist/cjs/vviinn-widgets.cjs.js +3 -3
  16. package/dist/collection/collection-manifest.json +2 -0
  17. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +22 -18
  18. package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +78 -68
  19. package/dist/collection/components/vviinn-icons/index.js +4 -0
  20. package/dist/collection/components/vviinn-product-card/render-helpers.js +4 -4
  21. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +5 -6
  22. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +26 -5
  23. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
  24. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
  25. package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +18 -0
  26. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
  27. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +149 -0
  28. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +148 -28
  29. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +31 -8
  30. package/dist/esm/Handler-639a4cb3.js +308 -0
  31. package/dist/esm/{app-globals-0a626970.js → app-globals-b6113170.js} +1 -1
  32. package/dist/esm/cropper-handler.entry.js +23 -0
  33. package/dist/esm/customized-slots-a952fb80.js +50 -0
  34. package/dist/esm/{cropper-handler_28.entry.js → highlight-box_22.entry.js} +21 -404
  35. package/dist/{cjs/Array-cce2fde8.js → esm/imageSearch.store-4ca31230.js} +8705 -2137
  36. package/dist/esm/{index-e77e65ae.js → index-017f18de.js} +6 -2
  37. package/dist/esm/{index-0ccfcee5.js → index-3e85e294.js} +14 -362
  38. package/dist/esm/loader.js +3 -3
  39. package/dist/esm/vviinn-carousel_5.entry.js +1224 -0
  40. package/dist/esm/vviinn-error.entry.js +15 -0
  41. package/dist/esm/vviinn-preloader.entry.js +22 -0
  42. package/dist/esm/vviinn-vps-button.entry.js +39 -0
  43. package/dist/esm/vviinn-vps-widget.entry.js +93 -0
  44. package/dist/esm/vviinn-widgets.js +3 -3
  45. package/dist/types/campaign/Campaign.d.ts +1 -1
  46. package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +13 -7
  47. package/dist/types/components/vviinn-icons/index.d.ts +2 -0
  48. package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -2
  49. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +2 -0
  50. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +25 -0
  51. package/dist/types/components/vviinn-vpr-button/stories/kek.stories.d.ts +7 -0
  52. package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +14 -0
  53. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +36 -8
  54. package/dist/types/components.d.ts +62 -10
  55. package/dist/vviinn-widgets/p-0ed1ef7e.entry.js +1 -0
  56. package/dist/vviinn-widgets/{p-6c4fd1db.js → p-16e49514.js} +1 -1
  57. package/dist/vviinn-widgets/p-3da18d7f.js +1 -0
  58. package/dist/vviinn-widgets/p-62a1b042.entry.js +1 -0
  59. package/dist/vviinn-widgets/p-68900093.entry.js +1 -0
  60. package/dist/vviinn-widgets/p-6c4c240d.entry.js +1 -0
  61. package/dist/vviinn-widgets/p-95e53d99.entry.js +1 -0
  62. package/dist/vviinn-widgets/p-9fee20e7.entry.js +1 -0
  63. package/dist/vviinn-widgets/p-d7894eaf.js +1 -0
  64. package/dist/vviinn-widgets/p-db0be4cd.js +1 -0
  65. package/dist/vviinn-widgets/p-eb15116d.entry.js +1 -0
  66. package/dist/vviinn-widgets/{p-489aee23.js → p-f00fddbb.js} +1 -1
  67. package/dist/vviinn-widgets/p-f582db5c.js +1 -0
  68. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  69. package/package.json +3 -1
  70. package/www/build/p-0ed1ef7e.entry.js +1 -0
  71. package/www/build/{p-6c4fd1db.js → p-16e49514.js} +1 -1
  72. package/www/build/p-1cc0cdfd.js +1 -0
  73. package/www/build/p-3da18d7f.js +1 -0
  74. package/www/build/p-62a1b042.entry.js +1 -0
  75. package/www/build/p-68900093.entry.js +1 -0
  76. package/www/build/p-6c4c240d.entry.js +1 -0
  77. package/www/build/p-95e53d99.entry.js +1 -0
  78. package/www/build/p-9fee20e7.entry.js +1 -0
  79. package/www/build/p-a67898be.css +1 -0
  80. package/www/build/p-d7894eaf.js +1 -0
  81. package/www/build/p-db0be4cd.js +1 -0
  82. package/www/build/p-eb15116d.entry.js +1 -0
  83. package/www/build/{p-489aee23.js → p-f00fddbb.js} +1 -1
  84. package/www/build/p-f582db5c.js +1 -0
  85. package/www/build/vviinn-widgets.esm.js +1 -1
  86. package/www/index.html +177 -8
  87. package/dist/cjs/imageSearch.store-39fce56c.js +0 -6926
  88. package/dist/cjs/vviinn-carousel.cjs.entry.js +0 -222
  89. package/dist/cjs/vviinn-vpr-widget.cjs.entry.js +0 -106
  90. package/dist/esm/imageSearch.store-b887ff78.js +0 -6893
  91. package/dist/esm/vviinn-carousel.entry.js +0 -218
  92. package/dist/esm/vviinn-vpr-widget.entry.js +0 -102
  93. package/dist/vviinn-widgets/p-2bf74c28.js +0 -1
  94. package/dist/vviinn-widgets/p-3063e23a.js +0 -1
  95. package/dist/vviinn-widgets/p-9145c82e.entry.js +0 -1
  96. package/dist/vviinn-widgets/p-ddcac3f8.js +0 -1
  97. package/dist/vviinn-widgets/p-f05da9f1.entry.js +0 -1
  98. package/dist/vviinn-widgets/p-f12f823d.entry.js +0 -1
  99. package/www/build/p-2bf74c28.js +0 -1
  100. package/www/build/p-3063e23a.js +0 -1
  101. package/www/build/p-9145c82e.entry.js +0 -1
  102. package/www/build/p-cbae3071.js +0 -125
  103. package/www/build/p-ddcac3f8.js +0 -1
  104. package/www/build/p-e0153ae2.css +0 -6
  105. package/www/build/p-f05da9f1.entry.js +0 -1
  106. package/www/build/p-f12f823d.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as i,g as n,c as r}from"./p-2bf74c28.js";import{g as o,p as s,O as a,s as l,i as d,a as c,t as p,m as h,f as m,b as g,c as u,d as v,e as b,h as x,j as f,k as w,l as y,E as k,n as z,o as C,q as _,r as F,u as S,v as E}from"./p-ddcac3f8.js";import{_ as D,S as L,N as j}from"./p-3063e23a.js";import{C as A,O as M,a as I,b as W,A as V,c as P}from"./p-489aee23.js";let $=class{constructor(e){t(this,e),this.disabled=!1}render(){return e(i,{part:`handle ${o(this.handler.direction)}`,class:{disabled:this.disabled,[o(this.handler.direction)]:!0},style:{"--size":"20px",cursor:o(this.handler.direction)},draggable:!1})}};$.style=":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";let B=class{constructor(e){t(this,e)}getInsetValue(){return s(l(d.searchArea,d.imageBounds),a.map((([t,e])=>{return`inset(${(i=t,n=e,r={top:`${i.y}px`,right:n.width-(i.x+i.width)+"px",bottom:n.height-(i.y+i.height)+"px",left:`${i.x}px`}).top} ${r.right} ${r.bottom} ${r.left})`;var i,n,r})),a.getOrElse((()=>"")))}renderImage(){return s(l(d.imageUrl,d.imageBounds),a.map((([t,i])=>e("img",{src:t,width:i.width,height:i.height,style:{"clip-path":`${this.getInsetValue()}`}}))),a.getOrElse((()=>"")))}render(){return e(i,null,this.renderImage())}};B.style=':host{display:grid;position:absolute;box-sizing:border-box;border:none;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--size:10px;--x-position:0;--y-position:0}img{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pointer{position:absolute;width:var(--size);height:var(--size);background:black;border-radius:50%;z-index:2;cursor:pointer;transform:translate(var(--x-position), var(--y-position)) scale(0);-webkit-animation:0.25s linear fadein;animation:0.25s linear fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.pointer::after{content:"";cursor:pointer;border:5px solid black;border-radius:50%;width:var(--size);height:var(--size);display:block;transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));padding:calc(var(--size) * 0.5);opacity:.75}@-webkit-keyframes fadein{from{transform:translate(var(--x-position), var(--y-position)) scale(0)}to{transform:translate(var(--x-position), var(--y-position)) scale(1)}}@keyframes fadein{from{transform:translate(var(--x-position), var(--y-position)) scale(0)}to{transform:translate(var(--x-position), var(--y-position)) scale(1)}}';let G=class{constructor(e){t(this,e),this.disabled=!1,this.handleMove=!1,this.mouseStartPoint=void 0,this.bounds=void 0}componentDidLoad(){this.bounds=this.el.getBoundingClientRect()}handleHandlerMove(t){t.preventDefault(),t.stopPropagation();const e=m(t),i={position:c.concat(e,this.mouseStartPoint),direction:this.handlerMoveDirection};D.pipe(d.searchArea,a.map((t=>{const n=p(t,i);n.width<40||n.height<40||n.x<0||n.y<0||this.bounds.height-(n.y+n.height)<0||this.bounds.width-(n.x+n.width)<0||(d.searchArea=a.some(n),this.mouseStartPoint=e,d.detectedObject=void 0)})))}handleCropperMove(t){t.preventDefault(),t.stopPropagation();const e=m(t),i=c.concat(e,this.mouseStartPoint);D.pipe(d.searchArea,a.map((t=>{const n=h(t,i);n.x<0||n.y<0||this.bounds.height-(n.y+n.height)<0||this.bounds.width-(n.x+n.width)<0||(d.detectedObject=void 0,d.searchArea=a.some(n),this.mouseStartPoint=e)})))}handlePointerDown(t){t.stopPropagation(),this.mouseStartPoint=m(t);const e=t.target;"cropper-handler"===e.localName?(this.handlerMoveDirection=e.handler.direction,this.pointerMoveListener=this.handleHandlerMove.bind(this)):this.pointerMoveListener=this.handleCropperMove.bind(this),this.pointerReleaseListener=this.handleSearchAreaRelease.bind(this),this.el.addEventListener("pointermove",this.pointerMoveListener),window.addEventListener("pointerup",this.pointerReleaseListener,{once:!0})}handleSearchAreaRelease(){this.el.removeEventListener("pointermove",this.pointerMoveListener),document.removeEventListener("pointerup",this.pointerReleaseListener),this.mouseStartPoint=void 0,g()}getStyleMap(){return D.pipe(d.searchArea,a.map((t=>({width:`${t.width}px`,height:`${t.height}px`,transform:`translate3d(${t.x}px, ${t.y}px, 0)`,cursor:this.handleMove?"move":"default"}))),a.getOrElse((()=>({}))))}render(){return e(i,{exportparts:"handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize"},e("div",{class:{"crop-area":!0,active:this.handleMove,disabled:this.disabled},draggable:!1,style:this.getStyleMap(),onContextMenu:()=>!1,onPointerDown:t=>this.handlePointerDown(t)},d.cropperHandlers.map((t=>e("cropper-handler",{disabled:this.disabled,handler:t,onPointerDown:t=>this.handlePointerDown(t)})))))}get el(){return n(this)}};G.style=":host{display:block;height:100%;left:0;position:absolute;top:0;width:100%}:host(.hidden){visibility:hidden}.crop-area{border:1px solid white;box-sizing:border-box;position:absolute;touch-action:none;transition-property:border-color, opacity;transition-duration:.25s;transition-timing-function:ease-in-out;z-index:2;position:relative;will-change:transform}.crop-area.active{border-color:whitesmoke}.crop-area.disabled{opacity:0.25}";const T=t=>t.href.split("/").reverse()[0];let H=class{constructor(e){t(this,e),this.filter=null,this.selectedCategoryId=null,this.hideFilters=!0}handleFilterSelection(t){return this.isFilterSelected(t)?this.clearSelectedFilter():this.selectFilter(t)}selectFilter(t){this.selectedCategoryId=T(t),d.activeIonLink=t}clearSelectedFilter(){this.selectedCategoryId=null,d.activeIonLink=void 0,this.findSelectedFilter().blur()}findSelectedFilter(){return this.el.shadowRoot.querySelector(".filter.active")}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(t,e){"Enter"===t.key&&this.handleFilterSelection(e)}isFilterSelected(t){return this.selectedCategoryId===T(t)}render(){return e(i,{exportparts:"filter, show-more-filters"},e("div",{class:"filters"},this.filter.filters.filter(((t,e)=>!this.hideFilters||e<5)).map(((t,i)=>e("div",{role:"button",tabindex:"0",part:this.isFilterSelected(t)?"filter active":"filter",class:{filter:!0,active:this.selectedCategoryId===T(t)},style:{"animation-delay":10*i+"ms"},onPointerUp:e=>{e.stopPropagation(),this.handleFilterSelection(t)},onKeyPress:e=>this.handleEnter(e,t)},this.isFilterSelected(t)?e(A,null):null,t.name))),e("div",{class:{filter:!0,"show-more":!0,hidden:this.filter.filters.length<=5,active:!this.hideFilters},role:"button",tabindex:"0","aria-role":"button",onClick:()=>this.toggleFilters(),onKeyPress:t=>{"Enter"===t.key&&this.toggleFilters()},part:"show-more-filters"},this.hideFilters?"Zeige mehr":"Zeige weniger")))}get el(){return n(this)}};H.style=":host{display:grid;grid-gap:1rem}.filters{display:flex;flex-direction:row;flex-wrap:wrap;gap:0.5rem}.filter{align-items:center;-webkit-animation-duration:0.25s;animation-duration:0.25s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-name:scalein;animation-name:scalein;border:1px solid lightgray;cursor:pointer;display:flex;flex-direction:row;grid-gap:8px;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;padding:0.1rem;transform:scale(0);transition-property:background;transition-duration:0.25s;transition-timing-function:ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:6px 16px}.filter.active{border:1px solid black;padding:6px 8px}.filter:hover{border:1px solid gray}.show-more{display:flex}.show-more.hidden{display:none}.show-more::after{content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;height:16px;margin-top:1px;margin-left:8px}.show-more.active::after{transform:rotateX(180deg)}@-webkit-keyframes scalein{from{opacity:0;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}@keyframes scalein{from{opacity:0;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}@media (max-width: 415px){.show-more::after{transform:rotate(-90deg)}.show-more.active::after{transform:rotate(90deg)}}@media (max-width: 800px){.filters{flex-wrap:nowrap;overflow-x:scroll;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;grid-gap:unset}.filter{scroll-snap-align:end;margin-right:0.5rem}}";let Y=class{constructor(e){t(this,e),this.position=["0","0"]}getObjectPosition(){return D.pipe(d.imageBounds,a.map((t=>{const e=u(v(this.detectedObject).rectangle),{x:i,y:n}=D.pipe(e,b(t),x);return[`${i}px`,`${n}px`]})),a.getOrElse((()=>["0","0"])))}selectDetectedObject(){D.pipe(d.imageBounds,a.map((t=>{const e=v(this.detectedObject).rectangle,i=u(e),n=b(t)(i);d.detectedObject=this.detectedObject,d.searchArea=a.some(n)}))),g()}isActive(){if(!this.detectedObject)return!1;if(!d.detectedObject)return!1;const t=v(this.detectedObject),e=v(d.detectedObject);return f.equals(t,e)}render(){return e(i,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};Y.style=':host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--size:32px;--x-position:0;--y-position:0;background:rgba(22, 22, 22, 0.5);border-radius:50%;border:none;cursor:pointer;display:block;height:var(--size);position:absolute;transition:opacity 0.25s;width:var(--size);z-index:2;transform:translate(calc(var(--x-position) - (var(--size) * 0.5)), calc(var(--y-position) - (var(--size) * 0.5)));transition:background 0.1 ease-in-out}:host(:hover){background:rgba(22, 22, 22, 0.75)}:host(.active){background:var(--color-primary, var(--color-primary-system))!important;border:2px solid white}:host::after{--size:32px;border-radius:50%;content:"";cursor:pointer;display:block;height:calc(var(--size) * 0.25);transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));width:calc(var(--size) * 0.25);background:white}';let K=class{constructor(e){t(this,e),this.actionClick=r(this,"actionClick",7)}render(){return e(i,null,e("vviinn-error",null,e("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z",fill:"#525252"}),e("path",{d:"M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",fill:"#525252"})),e("h4",{slot:"title"},"Leider nichts gefunden"),e("span",{slot:"text"},"Leider konnten wir keine passenden Produkte finden. Bitte versuche es mit einem anderen Bildausschnitt noch einmal.")))}};K.style=":host{display:grid}vviinn-error{justify-items:center}";let Z=class{constructor(e){t(this,e)}render(){return e(i,null,e("slot",{name:"icon"}),e("slot",{name:"title"}),e("slot",{name:"text"}),e("slot",{name:"action"}))}};Z.style=":host{background:#F4F4F4;border-radius:8px;display:grid;grid-gap:20px;padding:24px;text-align:center}::slotted(svg){display:grid;align-self:center}::slotted(h4){margin:unset;font-weight:600;font-size:18px;line-height:24px}::slotted(span){font-size:14px;line-height:20px}::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;color:var(--color-primary, var(--color-primary-system));font-weight:600;font-size:16px;line-height:20px;cursor:pointer}";let O=class{constructor(e){t(this,e),this.exampleImageSelected=r(this,"exampleImageSelected",7),this.exampleImageError=r(this,"exampleImageError",7),this.src="",this.width=0,this.height=0,this.selected=!1}async selectImage(t){this.selected=!0;const e=await w(this.src),i=await y(e);D.pipe(i,k.match((()=>this.exampleImageError.emit()),(()=>this.exampleImageSelected.emit()))),this.selected=!1}showPreloader(){return(d.objectDetectionInProgress||d.loading)&&this.selected}render(){return e(i,null,this.showPreloader()?e("div",{class:"image-preloader"},e("vviinn-preloader",null)):null,e("img",{onClick:t=>this.selectImage(t),src:this.src,width:this.width,height:this.height}))}};O.style=":host{display:block;margin-bottom:8px;position:relative}img{width:100%;height:auto;cursor:pointer}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:12px;display:none;padding:4px 6px;pointer-events:none;position:absolute;right:12px;z-index:4}vviinn-preloader{--preloader-size:12px}@media (max-width: 640px){.image-preloader{display:block}}";const R=["vviinn-onboarding-title","vviinn-onboarding-card-1-icon","vviinn-onboarding-card-1-text","vviinn-onboarding-card-2-icon","vviinn-onboarding-card-2-text","vviinn-onboarding-card-3-icon","vviinn-onboarding-card-3-text","vviinn-example-images-title","vviinn-example-images-1","vviinn-example-images-2","vviinn-example-images-3","vviinn-example-images-4","vviinn-teaser-text","vviinn-image-upload-button-text","vviinn-privacy-badge-text"],q=t=>e("slot",{name:t}),X=()=>R.map(q),N=(t,e)=>{e.innerHTML=t.outerHTML},U=(t,e)=>{t.connectedCallback=function(){document.addEventListener("globalSlotsChanged",(({detail:t})=>{var i;(t=>Array.from(t.shadowRoot.querySelectorAll("slot")))(e).reduce((i=t,(t,e)=>{const n=i.find((r=e,t=>r.getAttribute("name")===t.getAttribute("slot")));var r;return n&&t.set(e,n),t}),new Map).forEach(N)}),!0)},t.connectedCallback.call(t)};let Q=class{constructor(e){t(this,e),this.imageSelected=r(this,"imageSelected",7),this.imageSelectedError=r(this,"imageSelectedError",7)}handleImageSelection(){this.imageSelected.emit()}handleImageSelectionError(){this.imageSelectedError.emit()}componentWillLoad(){U(this,this.el)}render(){return e(i,null,e("slot",{name:"vviinn-example-images-title"},e("h3",null,"Mit den Beispielbildern die Suche direkt ausprobieren")),e("div",{class:"images"},e("slot",{name:"vviinn-example-images-1"},e("vviinn-example-image",{width:240,height:320,src:"https://cdn.vviinn.com/0/fit/240/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc="})),e("slot",{name:"vviinn-example-images-2"},e("vviinn-example-image",{width:240,height:240,src:"https://cdn.vviinn.com/0/fit/240/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc="})),e("slot",{name:"vviinn-example-images-3"},e("vviinn-example-image",{width:240,height:240,src:"https://cdn.vviinn.com/0/fit/240/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc="})),e("slot",{name:"vviinn-example-images-4"},e("vviinn-example-image",{width:240,height:320,src:"https://cdn.vviinn.com/0/fit/240/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc="}))))}get el(){return n(this)}};Q.style="h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}.images{display:block;-moz-column-count:2;column-count:2;-moz-column-gap:16px;column-gap:16px}";let J=class{constructor(e){t(this,e),this.imageSelected=r(this,"imageSelected",7),this.imageSelectedError=r(this,"imageSelectedError",7)}async handleInputChange(t){const e=t.target,i=await y(e.files[0]);D.pipe(i,z((()=>this.imageSelectedError.emit()),(()=>this.imageSelected.emit()))),e.value=null}isLoading(){return d.loading||d.objectDetectionInProgress}render(){return e(i,{exportparts:"button"},this.isLoading()?e("vviinn-preloader",null):null,this.isLoading()?null:e("label",{htmlFor:"fileInput",part:"button"},e("slot",{name:"upload-button-text"},"Upload image")),e("input",{id:"fileInput",class:"visually-hidden",type:"file",accept:"image/*",onChange:t=>this.handleInputChange(t)}))}};J.style=":host{display:block}:host(::hover){background:whitesmoke}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}label{cursor:pointer;display:grid;padding:0.5rem;transition:background 0.1s ease-in-out}";let tt=class{constructor(e){t(this,e)}handleInitialImageLoad(t){const e=C(t.target),{x:i,y:n}=h(e,{x:12,y:12}),r={x:i,y:n,width:e.width-24,height:e.height-24};d.imageBounds=a.some(e),d.searchArea=a.some(r)}renderDetectedObject(t){return e("vviinn-detected-object",{detectedObject:t})}renderImage(){return D.pipe(l(d.imageUrl,d.image),a.map((([t,i])=>{const[n,r]=(t=>{const e=_(t),i=F(288)(e).map((t=>t.size));return[i[0],i[1]]})(i);return e("img",{decoding:"async",width:n,height:r,src:t,onLoad:t=>this.handleInitialImageLoad(t),draggable:!1})})),a.getOrElse((()=>null)))}renderCropper(){return D.pipe(d.imageUrl,a.map((()=>e("image-cropper",null))),a.getOrElse((()=>null)))}render(){return e(i,null,d.loading||d.objectDetectionInProgress?e("div",{class:"image-preloader"},e("vviinn-preloader",null)):null,e("highlight-box",null),this.renderImage(),this.renderCropper(),d.detectedObjects.map((t=>this.renderDetectedObject(t))))}};tt.style=":host{display:grid;position:relative;justify-self:center}img{box-sizing:border-box;filter:brightness(60%);position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:-1}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:18px;padding:4px 6px;pointer-events:none;position:absolute;right:18px;z-index:4}vviinn-preloader{--preloader-size:12px}";let et=class{constructor(e){t(this,e),this.modalClosed=r(this,"modalClosed",7),this.secondaryActionClicked=r(this,"secondaryActionClicked",7),this.active=!1,this.slider=!1}close(){this.active=!1,setTimeout((()=>{this.modalClosed.emit()}),this.slider?500:0)}handleAnimationEnd(t){"fade-in"===t.animationName&&(this.slider=!0)}render(){return e(i,{exportparts:"secondary-action, title, close-button",class:{closed:!this.active},onAnimationEnd:t=>this.handleAnimationEnd(t)},e("div",{class:"head"},e("button",{part:"secondary-action",onClick:()=>this.secondaryActionClicked.emit()},e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M20.25 12H3.75",stroke:"#161616","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M10.5 5.25L3.75 12L10.5 18.75",stroke:"#161616","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),e("div",{class:"title",part:"title"},"Bildsuche"),e("button",{onClick:()=>this.close(),class:"close-button",part:"close-button"},e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("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:"#333333"})))),e("div",{class:"body"},e("slot",null)))}};et.style=":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;max-width:960px}@media (max-width: 415px){:host{-webkit-animation-name:fade-in;animation-name:fade-in;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.closed){-webkit-animation-name:fade-out;animation-name:fade-out;-webkit-animation-fill-mode:none;animation-fill-mode:none}.body{overflow-y:auto}}@media (max-width: 640px) and (min-width: 415px){:host{max-width:80%}}.head{align-items:center;border-bottom:1px solid #F4F4F4;display:grid;grid-gap:16px;grid-template-columns:-webkit-min-content auto -webkit-min-content;grid-template-columns:min-content auto min-content;justify-items:center;padding:16px}.title{font-weight:600;font-size:18px;line-height:24px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:unset}@-webkit-keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";let it=class{constructor(e){t(this,e)}componentWillLoad(){U(this,this.el)}render(){return e(i,null,e("slot",{name:"vviinn-onboarding-title"},e("h3",null,"So funktioniert es")),e("vviinn-slider",{showArrows:!0},e("vviinn-slide",null,e("vviinn-onboarding-card-1",null)),e("vviinn-slide",null,e("vviinn-onboarding-card-2",null)),e("vviinn-slide",null,e("vviinn-onboarding-card-3",null))))}get el(){return n(this)}};it.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}::host{display:block}h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}vviinn-slide{background:#f4f4f4;padding:24px}svg{padding:16px 0}.text{display:grid;grid-gap:8px}.text>h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}.text>p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}";let nt=class{constructor(e){t(this,e)}componentWillLoad(){U(this,this.el)}render(){return e(i,null,e("slot",{name:"onboarding-card-1-icon"},e(M,null)),e("slot",{name:"onboarding-card-1-text"},e("div",{class:"text"},e("h4",null,"Starte die Bildsuche"),e("p",null,"Lade ein Bild aus Deiner Galerie hoch oder fotografiere ein Produkt mit Deiner Kamera."))))}get el(){return n(this)}};nt.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";let rt=class{constructor(e){t(this,e)}componentWillLoad(){U(this,this.el)}render(){return e(i,null,e("slot",{name:"onboarding-card-2-icon"},e(I,null)),e("slot",{name:"onboarding-card-2-text"},e("div",{class:"text"},e("h4",null,"Verfeiner deine Suche"),e("p",null,"Du kannst den Bildrahmen selber festlegen und so die Produkte genau auswählen."))))}get el(){return n(this)}};rt.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";let ot=class{constructor(e){t(this,e)}componentWillLoad(){U(this,this.el)}render(){return e(i,null,e("slot",{name:"onboarding-card-3-icon"},e(W,null)),e("slot",{name:"onboarding-card-3-text"},e("div",{class:"text"},e("h4",null,"Ohne Hintergrund"),e("p",null,"Die besten Ergebnisse erhältst Du, wenn das gesuchte Objekt mit einfarbigem und hellem Hintergrund zu sehen ist."))))}get el(){return n(this)}};ot.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";let st=class{constructor(e){t(this,e)}render(){return e(i,null,e("slot",null))}};st.style=":host{-webkit-animation:fade-in 0.5s ease-in-out;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}@-webkit-keyframes fade-in{from{opacity:0.1}to{opacity:1}}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}";let at=class{constructor(e){t(this,e),this.secondaryActionClicked=r(this,"secondaryActionClicked",7),this.modalClosed=r(this,"modalClosed",7),this.active=!1}render(){return e(i,{class:{active:this.active}},e("vviinn-overlay",null,e("vviinn-modal",{onSecondaryActionClicked:()=>this.secondaryActionClicked.emit(),active:this.active},e("slot",null,"CONTENT"))))}};at.style=":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center}@media (max-width: 415px){vviinn-modal{border-radius:4px 4px 0 0;height:100vh;margin-top:32px;transform:translateY(100%);width:100vw}vviinn-overlay{align-items:end;display:grid;justify-items:center}}";let lt=class{constructor(e){t(this,e)}isActive(){return d.loading||d.objectDetectionInProgress}render(){return e(i,{class:{active:this.isActive()}})}};lt.style=":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;-webkit-animation:rotate 3s linear infinite;animation:rotate 3s linear infinite;border:var(--preloader-width) solid white;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@-webkit-keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";let dt=class{constructor(e){t(this,e)}componentWillLoad(){U(this,this.el)}render(){return e(i,null,e("slot",null,e("div",{class:"content"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"},e("defs",null),e("path",{fill:"#525252",d:"M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z"}),e("path",{fill:"#525252",d:"M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z"})),e("slot",{name:"vviinn-privacy-badge-text"},e("p",null,"Wir gehen sorgfältig mit Deinen Daten um. Deine Bilder werden nur zum Zweck der Bildsuche gespeichert.")))))}get el(){return n(this)}};dt.style=":host{display:block;background:#F4F4F4;padding:17px}.content{display:grid;grid-template-columns:-webkit-min-content auto;grid-template-columns:min-content auto;grid-gap:9px}.content p{color:#525252;font-size:12px;line-height:16px;margin:unset}";class ct{sendImpression(t){var e,i,n;gtag("event","view_item_list",{items:[{id:t.productId,name:t.title,brand:null!==(e=t.brand)&&void 0!==e?e:"",category:null!==(i=t.productType)&&void 0!==i?i:"",list_name:"VI VPR View",price:Math.min(t.price.actual,null!==(n=t.price.sale)&&void 0!==n?n:1/0)}]})}sendClick(t){var e,i,n;gtag("event","select_content",{content_type:"product",items:[{id:t.productId,name:t.title,brand:null!==(e=t.brand)&&void 0!==e?e:"",category:null!==(i=t.productType)&&void 0!==i?i:"",list_name:"VI VPR View",price:Math.min(t.price.actual,null!==(n=t.price.sale)&&void 0!==n?n:1/0)}]})}}class pt{constructor(){ga("require","ec")}convertProduct(t){var e,i,n;return{id:t.productId,name:t.title,brand:null!==(e=t.brand)&&void 0!==e?e:"",category:null!==(i=t.productType)&&void 0!==i?i:"",list:"VI VPR View",price:Math.min(t.price.actual,null!==(n=t.price.sale)&&void 0!==n?n:1/0)}}sendImpression(t){ga("ec:addImpression",this.convertProduct(t))}sendClick(t){var e,i,n;ga("ec:addProduct",{id:t.productId,name:t.title,brand:null!==(e=t.brand)&&void 0!==e?e:"",category:null!==(i=t.productType)&&void 0!==i?i:"",price:Math.min(t.price.actual,null!==(n=t.price.sale)&&void 0!==n?n:1/0)}),ga("ec:setAction","click",{list:"VI VPR View"})}}const ht=a.getMonoid(L.first()).concat(D.pipe(a.fromNullable(window.gtag),a.map((()=>new ct))),D.pipe(a.fromNullable(window.ga),a.map((()=>new pt)))),mt=/fit\/\d+\//,gt=(t,e)=>D.pipe((t=>D.pipe(t.match(mt),k.fromNullable(t),k.map((()=>t))))(t),k.map((t=>t.replace(mt,`fit/${e}/`))),k.getOrElse((()=>t))),ut=(t,i)=>t.deeplink?e("a",{class:t.part,part:t.part,href:t.deeplink},i):i,vt=t=>{var i;const n=new Intl.NumberFormat(t.locale,{minimumFractionDigits:2}).format(t.price),r=`${null!==(i=t.prefix)&&void 0!==i?i:""} ${n} ${t.currency}`;return e("span",{class:"price-amount",part:"price-amount"},r)},bt=t=>{const i=e(vt,{prefix:t.prefix,currency:t.currency,price:t.price,locale:t.locale});return e("span",{class:"price-container",part:"price-container"},t.salePrice?[e("span",{class:"price-sale",part:"price-sale"},e(vt,{prefix:t.prefix,currency:t.currency,price:t.salePrice,locale:t.locale})),e("span",{class:"price-outdated",part:"price-outdated"},i)]:e("span",{class:"price-regular",part:"price-regular"},i))};let xt=class{constructor(e){t(this,e),this.recommendationLoad=r(this,"recommendationLoad",7),this.recommendationView=r(this,"recommendationView",7),this.recommendationClick=r(this,"recommendationClick",7),this.currency=void 0,this.imageRatio=1,this.imageWidth=200,this.locale=void 0,this.pricePrefix=void 0,this.responsive=!1,this.dimmedBackground=!1,this.imageLoaded=!1,this.intersectionObserver=new IntersectionObserver(this.intersectionCallback.bind(this),{threshold:1})}intersectionCallback(t){t.some((t=>t.isIntersecting))&&(D.pipe(ht,a.map((t=>t.sendImpression(this.getProduct())))),this.recommendationView.emit(this.productId),this.intersectionObserver.disconnect())}componentDidLoad(){this.recommendationLoad.emit(this.productId),this.intersectionObserver.observe(this.el),this.el.shadowRoot.querySelectorAll("a").forEach((t=>t.addEventListener("mousedown",(t=>{this.recommendationClick.emit(this.productId),window.ga&&t.preventDefault(),D.pipe(ht,a.match((()=>null),(t=>t.sendClick(this.getProduct())))),window.ga&&ga("send","event","UX","click","Results",{hitCallback:function(){document.location.href=this.deeplink}})}))))}getProduct(){return d.results.find((t=>t.productId===this.productId))}renderImage(){const t={width:this.imageWidth,height:this.imageWidth*this.imageRatio,src:this.image,title:this.productTitle};return this.responsive?(t=>e("picture",null,e("img",{loading:"lazy",part:"image",class:"image responsive",src:gt(t.src,t.width),alt:t.title})))(t):(t=>e("picture",null,e("img",{loading:"lazy",part:"image",class:"image",width:t.width,height:t.height,src:gt(t.src,t.width),alt:t.title})))(t)}render(){var t,n,r;return e(i,{exportparts:"brand, currency, deeplink, image, type, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title",class:{dimmed:this.dimmedBackground}},e(ut,{deeplink:this.deeplink,part:"image-link"},this.renderImage()),e(ut,{deeplink:this.deeplink,part:"deeplink"},e("span",{class:"title",part:"title"},this.productTitle)),e("span",{class:"brand",part:"brand"},this.brand),e("span",{class:"type",part:"type"},this.productType),e(bt,{prefix:null!==(t=this.pricePrefix)&&void 0!==t?t:S.pricePrefix,currency:null!==(n=this.currency)&&void 0!==n?n:S.currencySign,price:this.price,salePrice:this.salePrice,locale:null!==(r=this.locale)&&void 0!==r?r:S.locale}))}get el(){return n(this)}};xt.style=':host{align-items:center;display:flex;flex-direction:column;gap:8px;height:100%}.price-container{display:flex;flex-direction:column}.price-sale,.price-regular{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;color:#161616}.price-outdated{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;color:#757575;text-decoration:line-through}.product-type{word-wrap:anywhere}.image{display:grid;align-content:center;-o-object-position:50% 50%;object-position:50% 50%;-o-object-fit:contain;object-fit:contain;text-align:center;max-width:-webkit-min-content;max-width:-moz-min-content;max-width:min-content;box-sizing:border-box}img.responsive{width:100%;height:auto;aspect-ratio:1}.brand,.type{display:none}.title{-webkit-box-orient:vertical;-webkit-line-clamp:2;color:#161616;display:-webkit-box;font-size:16px;font-style:normal;font-weight:500;line-height:24px;margin-bottom:8px;overflow:hidden;max-width:-webkit-min-content;max-width:-moz-min-content;max-width:min-content}.deeplink{text-decoration:none}picture{position:relative}:host(.dimmed) picture::before{content:"";width:100%;height:100%;box-sizing:border-box;background:#f7f7f7;display:block;top:0;left:0;position:absolute;mix-blend-mode:multiply}';let ft=class{constructor(e){t(this,e),this.actionClick=r(this,"actionClick",7)}render(){return e(i,null,e("vviinn-error",null,e("h4",{slot:"title"},"Keine Verbindung"),e("span",{slot:"text"},"Etwas hat leider nicht funktioniert. Bitte prüfen Sie Ihre Internetverbindung und laden Sie das Bild noch einmal hoch."),e("button",{slot:"action",onClick:()=>this.actionClick.emit()},"Erneut versuchen")))}};ft.style=":host{display:block}";let wt=class{constructor(e){t(this,e)}render(){return e(i,null,e("slot",null))}};wt.style=":host{display:grid;justify-items:center}";const yt=({kind:t,tabindex:i,disabled:n,onClick:r,onKeyDown:o})=>{return e("div",{class:(s={kind:t,disabled:n},{"arrow-wrapper":!0,[s.kind]:!0,disabled:s.disabled}),onClick:r,tabindex:i,onKeyDown:o},e(V,null));var s};let kt=class{constructor(e){t(this,e),this.elementsCount=0,this.internalPosition=0,this.swipeStartPosition=a.none,this.showBullets=!0,this.position=0,this.showArrows=!1}positionWatchHandler(t){this.internalPosition=t,this.el.style.setProperty("--position",`${t}`),this.setActiveCssClassToSlide(t)}connectedCallback(){this.handleDomContentChanges()}handleDomContentChanges(){const t=this.el.querySelectorAll("vviinn-slide");this.elementsCount=t.length,this.el.style.setProperty("--num-items",`${this.elementsCount}`),this.setActiveCssClassToSlide(0)}setActiveCssClassToSlide(t){const e=this.el.querySelectorAll("vviinn-slide");e.forEach((t=>t.classList.remove("active"))),e[t].classList.add("active")}goToSlide(t){this.internalPosition=t,this.el.style.setProperty("--position",`${t}`),this.setActiveCssClassToSlide(t)}renderBullets(){return this.showBullets?e("div",{class:"controls"},j.range(0,this.elementsCount-1).map((t=>e("div",{class:{bullet:!0,active:t==this.internalPosition%this.elementsCount},onClick:()=>this.goToSlide(t)})))):null}nextSlide(){this.internalPosition++,this.renderSlidePosition()}prevSlide(){const t=this.internalPosition-1;this.internalPosition=t>-1?t:this.elementsCount-1,this.renderSlidePosition()}renderSlidePosition(){requestAnimationFrame((()=>{this.el.style.setProperty("--position",""+this.internalPosition%this.elementsCount)}))}handleKeyDown(t){if("Space"===t.key||"Enter"===t.key)switch(t.target.className.includes("prev")?"prev":"next"){case"prev":this.prevSlide();break;case"next":this.nextSlide()}}handleTouchStart(t){this.showBullets&&(this.swipeStartPosition=D.pipe(t.touches[0],a.fromNullable,a.map((t=>t.clientX))))}handleTouchEnd(t){if(!this.showBullets)return;const e=D.pipe(t.changedTouches[0],a.fromNullable,a.map((t=>t.clientX)));D.pipe(l(this.swipeStartPosition,e),a.map((([t,e])=>{return(i=t)<(n=e)?-1:i>n?1:0;var i,n})),a.map((t=>{switch(t){case 1:return this.nextSlide();case-1:return this.prevSlide()}})))}render(){return e(i,null,e("div",{class:"items-wrapper"},e("div",{class:"items",onTouchStart:t=>this.handleTouchStart(t),onTouchEnd:t=>this.handleTouchEnd(t)},e("slot",null))),this.showArrows?[e(yt,{kind:"prev",onClick:()=>this.prevSlide(),onKeyDown:t=>this.handleKeyDown(t),tabindex:1,disabled:!1}),e(yt,{kind:"next",onClick:()=>this.nextSlide(),onKeyDown:t=>this.handleKeyDown(t),tabindex:0,disabled:!1})]:null,this.renderBullets())}get el(){return n(this)}static get watchers(){return{position:["positionWatchHandler"]}}};kt.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--num-items:0;--position:0;display:grid;grid-gap:20px;justify-items:center;position:relative}.items-wrapper{overflow:hidden;width:100%}.items{box-sizing:border-box;display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--num-items), 100%);transform:translateX(calc(-100% * var(--position)));transition:transform 0.33s ease-in-out}.controls{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--num-items), -webkit-min-content);grid-template-columns:repeat(var(--num-items), min-content)}.bullet{background:#E0E0E0;border-radius:50%;box-sizing:border-box;cursor:pointer;height:8px;width:8px;transition:background 0.1s ease-in-out}.bullet:hover{background:#C6C6C6}.bullet.active{background:var(--color-primary, var(--color-primary-system))}.bullet:active{background:transparent;border:2px solid var(--color-primary, var(--color-primary-system))}.arrow-wrapper{align-items:center;background:white;border:2px solid white;bottom:0;box-sizing:border-box;display:grid;height:calc(var(--spacer) * 6);justify-items:center;margin:auto;position:absolute;top:0;transform:translate3d(0, -50%, 0);transition:border 0.25ms ease-in-out;width:calc(var(--spacer) * 4)}.arrow-wrapper:active{border-color:var(--color-primary, var(--color-primary-system));opacity:0.75}.arrow-wrapper:focus{border-color:var(--color-primary, var(--color-primary-system));opacity:0.5;outline:none}.prev{left:0}.next{right:0}.next>svg{transform:rotate3d(0, 1, 0, 180deg)}.arrow-wrapper>svg{transition:fill 0.25ms ease-in-out;fill:#A8A8A8}.arrow-wrapper:hover>svg{fill:#8D8D8D}";let zt=class{constructor(e){t(this,e)}componentWillLoad(){U(this,this.el)}render(){return e(i,null,e("slot",null,e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none"},e("defs",null),e("path",{fill:"#C6C6C6",d:"M48 28a11.98 11.98 0 00-9.77 18.942L28 57.172 30.828 60l10.23-10.23A11.994 11.994 0 1048 28zm0 20a8 8 0 118-8 8.009 8.009 0 01-8 8zM34 24a6 6 0 10-6-6 6.006 6.006 0 006 6zm0-8a2 2 0 110 4 2 2 0 010-4z"}),e("path",{fill:"#C6C6C6",d:"M24 48H8V35.993L18 26l11.172 11.172L32 34.336 20.828 23.165a4 4 0 00-5.656 0L8 30.336V8h40v12h4V8a4.004 4.004 0 00-4-4H8a4.004 4.004 0 00-4 4v40a4.005 4.005 0 004 4h16v-4z"})),e("span",{class:"vviinn-teaser-text"},e("slot",{name:"vviinn-teaser-text"},"Finde Produkte auf ",e("br",null)," einem Foto"))))}get el(){return n(this)}};zt.style=":host{align-items:center;display:grid;justify-items:center;grid-gap:16px}.vviinn-teaser-text{font-size:28px;font-weight:600;line-height:40px;size:28px;text-align:center}";let Ct=class{constructor(e){t(this,e),this.globalSlotsChanged=r(this,"globalSlotsChanged",7),this.currencySign="€",this.locale="de-DE",this.pressed=!1}handleModalClosed(){this.pressed=!1}componentDidLoad(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(t))}handleKeyDown(t){"Enter"!==t.code&&"Space"!==t.code||(this.pressed=!0)}handleClick(){this.pressed=!0}render(){return e(i,{tabindex:"0",role:"button",pressed:this.pressed,onClick:()=>this.handleClick(),onKeyDown:t=>this.handleKeyDown(t)},e("slot",null,e(P,null)),e(X,null),e("vviinn-vps-widget",{active:this.pressed,"currency-sign":"€",token:this.token,locale:this.locale,apiPath:this.apiPath,exportparts:"brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title, product-card"}))}get el(){return n(this)}};Ct.style="";let _t=class{constructor(e){t(this,e),this.active=!1,this.currencySign="€",this.locale="de-DE",this.slidePosition=0,this.width=0,this.wrongImageFormat=!1}activeWatcher(t){t?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=this.overflow}componentWillLoad(){U(this,this.el)}connectedCallback(){E.apiPath=this.apiPath,E.currencySign=this.currencySign,E.locale=this.locale,d.token=this.token}handleImageSelection(){this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0}resetState(){this.resetScroll("onboarding-block"),this.slidePosition=0,d.image=a.none,d.imageUrl=a.none,d.imageBounds=a.none,d.searchArea=a.none,d.results=[],d.filters=[],d.detectedObjects=[],d.activeIonLink=void 0,d.rectangleSearchForm=void 0,this.resetScroll("results-block")}haveErrors(){return this.wrongImageFormat||d.serverError}resetScroll(t,e="auto"){this.el.shadowRoot.getElementById(t).scroll({top:0,left:0,behavior:e})}handleModalClose(){this.active=!1,this.resetState(),["onboarding-block","results-block"].forEach((t=>this.resetScroll(t)))}render(){return e(i,null,e("vviinn-overlayed-modal",{class:{"first-screen":0===this.slidePosition},active:this.active,onSecondaryActionClicked:()=>this.resetState(),onModalClosed:()=>this.handleModalClose(),exportparts:"secondary-action, title, close-button"},e("vviinn-slider",{showBullets:!1,position:this.slidePosition},e("vviinn-slide",{class:{"start-page":!0}},e("div",{class:{error:this.haveErrors(),"start-page_block":!0}},e("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},onActionClick:()=>this.wrongImageFormat=!1}),e("vviinn-server-error",{class:{hidden:!d.serverError},onActionClick:()=>d.serverError=!1}),e("vviinn-teaser",{class:{hidden:this.haveErrors()}}),e("vviinn-image-selector",{class:{hidden:this.haveErrors()},onImageSelected:()=>this.handleImageSelection(),onImageSelectedError:()=>this.wrongImageFormat=!0,part:"select-image_button"},e("span",{slot:"upload-button-text",class:"upload-button-content"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"29",height:"28",fill:"none"},e("defs",null),e("path",{fill:"#fff","fill-rule":"evenodd",d:"M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z","clip-rule":"evenodd"}),e("path",{fill:"#fff","fill-rule":"evenodd",d:"M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z","clip-rule":"evenodd"})),e("slot",{name:"vviinn-image-upload-button-text"},e("span",null,"Kamera oder Bild auswählen")))),e("vviinn-privacy-badge",{class:{hidden:this.haveErrors()}})),e("div",{id:"onboarding-block",class:"start-page_block"},e("div",{class:"onboarding-wrapper"},e("vviinn-onboarding",null),e("vviinn-example-images",{onImageSelected:()=>this.handleImageSelection(),onImageSelectedError:()=>this.resetScroll("onboarding-block","smooth")})))),e("vviinn-slide",{class:{"results-page":!0,active:1==this.slidePosition}},e("div",{class:"image-wrapper"},e("vviinn-image-view",null),e("div",{class:"filters-wrapper"},e("div",{class:"filters"},d.filters.map((t=>e("search-filters",{filter:t})))))),e("div",{id:"results-block",class:"products-wrapper"},e("div",{class:{"nothing-found":!0,hidden:d.results.length>0}},e("vviinn-empty-results",null),e("vviinn-onboarding",null)),e("div",{class:{hidden:d.results.length<=0,products:!0}},d.results.map((t=>{var i;return e("vviinn-product-card",{hidden:!0,productTitle:t.title,productId:t.productId,brand:t.brand,deeplink:t.deeplink,price:t.price.actual,salePrice:t.price.sale,imageWidth:160,image:null!==(i=t.image.thumbnail)&&void 0!==i?i:t.image.original,part:"product-card"})}))))))))}get el(){return n(this)}static get watchers(){return{active:["activeWatcher"]}}};_t.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #F4F4F4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #F4F4F4;display:grid;grid-template-rows:-webkit-min-content 170px;grid-template-rows:min-content 170px;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#F4F4F4;border-radius:4px;border:1px solid #F4F4F4;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px}search-filters::part(show-more-filters){border:1px solid #f4f4f4;border-radius:4px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px}search-filters::part(show-more-filters):hover{background:#EAEAEA}search-filters::part(filter):hover{background:#EAEAEA}search-filters::part(filter):focus{outline:none;border:1px solid var(--color-primary, var(--color-primary-system))}search-filters::part(filter active){background:rgba(15, 98, 254, 0.15);color:var(--color-primary, var(--color-primary-system))}.filters-wrapper{overflow:auto}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:-webkit-min-content;grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px) and (min-width: 415px){.onboarding-wrapper{position:unset}#onboarding-block{overflow:unset}.start-page.active{height:1px;overflow:auto}}@media (max-width: 415px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";let Ft=class{constructor(e){t(this,e),this.actionClick=r(this,"actionClick",7)}render(){return e(i,null,e("vviinn-error",null,e("h4",{slot:"title"},"Dateityp wird nicht unterstützt"),e("span",{slot:"text"},"Leider unterstützen wir dieses Format nicht. Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch."),e("button",{slot:"action",onClick:()=>this.actionClick.emit()},"Neues Bild hochladen")))}};Ft.style=":host{display:block}";export{$ as cropper_handler,B as highlight_box,G as image_cropper,H as search_filters,Y as vviinn_detected_object,K as vviinn_empty_results,Z as vviinn_error,O as vviinn_example_image,Q as vviinn_example_images,J as vviinn_image_selector,tt as vviinn_image_view,et as vviinn_modal,it as vviinn_onboarding,nt as vviinn_onboarding_card_1,rt as vviinn_onboarding_card_2,ot as vviinn_onboarding_card_3,st as vviinn_overlay,at as vviinn_overlayed_modal,lt as vviinn_preloader,dt as vviinn_privacy_badge,xt as vviinn_product_card,ft as vviinn_server_error,wt as vviinn_slide,kt as vviinn_slider,zt as vviinn_teaser,Ct as vviinn_vps_button,_t as vviinn_vps_widget,Ft as vviinn_wrong_format}
@@ -1,125 +0,0 @@
1
- import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-b07d9c7d.js';
2
- import { g as globalScripts } from './app-globals-a6f63b6d.js';
3
-
4
- /*
5
- Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
6
- */
7
- const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
8
- const patchBrowser = () => {
9
- // NOTE!! This fn cannot use async/await!
10
- if (BUILD.isDev && !BUILD.isTesting) {
11
- consoleDevInfo('Running in development mode.');
12
- }
13
- if (BUILD.cssVarShim) {
14
- // shim css vars
15
- plt.$cssShim$ = win.__cssshim;
16
- }
17
- if (BUILD.cloneNodeFix) {
18
- // opted-in to polyfill cloneNode() for slot polyfilled components
19
- patchCloneNodeFix(H.prototype);
20
- }
21
- if (BUILD.profile && !performance.mark) {
22
- // not all browsers support performance.mark/measure (Safari 10)
23
- performance.mark = performance.measure = () => {
24
- /*noop*/
25
- };
26
- performance.getEntriesByName = () => [];
27
- }
28
- // @ts-ignore
29
- const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
30
- ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
31
- s.getAttribute('data-stencil-namespace') === NAMESPACE)
32
- : null;
33
- const importMeta = import.meta.url;
34
- const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
35
- if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
36
- // Safari < v11 support: This IF is true if it's Safari below v11.
37
- // This fn cannot use async/await since Safari didn't support it until v11,
38
- // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
39
- // so both the ESM file and nomodule file would get downloaded. Only Safari
40
- // has 'onbeforeload' in the script, and "history.scrollRestoration" was added
41
- // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
42
- // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
43
- return {
44
- then() {
45
- /* promise noop */
46
- },
47
- };
48
- }
49
- if (!BUILD.safari10 && importMeta !== '') {
50
- opts.resourcesUrl = new URL('.', importMeta).href;
51
- }
52
- else if (BUILD.dynamicImportShim || BUILD.safari10) {
53
- opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
54
- if (BUILD.dynamicImportShim) {
55
- patchDynamicImport(opts.resourcesUrl, scriptElm);
56
- }
57
- if (BUILD.dynamicImportShim && !win.customElements) {
58
- // module support, but no custom elements support (Old Edge)
59
- // @ts-ignore
60
- return import(/* webpackChunkName: "polyfills-dom" */ './dom-db0073f0.js').then(() => opts);
61
- }
62
- }
63
- return promiseResolve(opts);
64
- };
65
- const patchDynamicImport = (base, orgScriptElm) => {
66
- const importFunctionName = getDynamicImportFunction(NAMESPACE);
67
- try {
68
- // test if this browser supports dynamic imports
69
- // There is a caching issue in V8, that breaks using import() in Function
70
- // By generating a random string, we can workaround it
71
- // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
72
- win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
73
- }
74
- catch (e) {
75
- // this shim is specifically for browsers that do support "esm" imports
76
- // however, they do NOT support "dynamic" imports
77
- // basically this code is for old Edge, v18 and below
78
- const moduleMap = new Map();
79
- win[importFunctionName] = (src) => {
80
- const url = new URL(src, base).href;
81
- let mod = moduleMap.get(url);
82
- if (!mod) {
83
- const script = doc.createElement('script');
84
- script.type = 'module';
85
- script.crossOrigin = orgScriptElm.crossOrigin;
86
- script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
87
- type: 'application/javascript',
88
- }));
89
- mod = new Promise((resolve) => {
90
- script.onload = () => {
91
- resolve(win[importFunctionName].m);
92
- script.remove();
93
- };
94
- });
95
- moduleMap.set(url, mod);
96
- doc.head.appendChild(script);
97
- }
98
- return mod;
99
- };
100
- }
101
- };
102
- const patchCloneNodeFix = (HTMLElementPrototype) => {
103
- const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
104
- HTMLElementPrototype.cloneNode = function (deep) {
105
- if (this.nodeName === 'TEMPLATE') {
106
- return nativeCloneNodeFn.call(this, deep);
107
- }
108
- const clonedNode = nativeCloneNodeFn.call(this, false);
109
- const srcChildNodes = this.childNodes;
110
- if (deep) {
111
- for (let i = 0; i < srcChildNodes.length; i++) {
112
- // Node.ATTRIBUTE_NODE === 2, and checking because IE11
113
- if (srcChildNodes[i].nodeType !== 2) {
114
- clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
115
- }
116
- }
117
- }
118
- return clonedNode;
119
- };
120
- };
121
-
122
- patchBrowser().then(options => {
123
- globalScripts();
124
- return bootstrapLazy([["vviinn-vps-widget",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]}]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel",[[4,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["vviinn-vpr-widget",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"columns":[2],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"apiPath":[1,"api-path"],"showScroll":[4,"show-scroll"],"recommendations":[32],"loaded":[32]}]]],["vviinn-image-view",[[1,"vviinn-image-view"]]],["vviinn-onboarding",[[1,"vviinn-onboarding"]]],["vviinn-example-images",[[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]]]],["vviinn-overlayed-modal",[[1,"vviinn-overlayed-modal",{"active":[4]}]]],["vviinn-empty-results",[[1,"vviinn-empty-results"]]],["vviinn-image-selector",[[1,"vviinn-image-selector"]]],["vviinn-server-error",[[1,"vviinn-server-error"]]],["vviinn-wrong-format",[[1,"vviinn-wrong-format"]]],["search-filters",[[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}]]],["vviinn-privacy-badge",[[1,"vviinn-privacy-badge"]]],["vviinn-teaser",[[1,"vviinn-teaser"]]],["image-cropper",[[1,"image-cropper",{"disabled":[4],"handleMove":[32]}]]],["vviinn-example-image",[[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}]]],["highlight-box",[[1,"highlight-box"]]],["vviinn-detected-object",[[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}]]],["vviinn-modal",[[1,"vviinn-modal",{"active":[1540],"slider":[32]}]]],["vviinn-onboarding-card-1",[[1,"vviinn-onboarding-card-1"]]],["vviinn-onboarding-card-2",[[1,"vviinn-onboarding-card-2"]]],["vviinn-onboarding-card-3",[[1,"vviinn-onboarding-card-3"]]],["vviinn-overlay",[[1,"vviinn-overlay"]]],["vviinn-product-card",[[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"imageLoaded":[32]}]]],["vviinn-slide",[[1,"vviinn-slide"]]],["vviinn-slider",[[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}]]],["cropper-handler",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-preloader",[[1,"vviinn-preloader"]]]], options);
125
- });
@@ -1 +0,0 @@
1
- import{a as n,f as t}from"./p-2bf74c28.js";import{c as r,A as e,F as u,_ as o,i,Z as c,C as f,a,b as s,d as p,W as l,S as m,O as d,n as v,e as h}from"./p-3063e23a.js";function b(n){return n}function I(n,t,r,e,u,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return o(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return i(o(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(u(e(r(t(n.apply(this,arguments)))))))))}}}function R(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n}function w(n,t,r,e,u,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return o(u(e(r(t(n)))));case 7:return i(o(u(e(r(t(n))))));case 8:return c(i(o(u(e(r(t(n)))))));case 9:return f(c(i(o(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}}var U={_tag:"None"},O=function(n){return{_tag:"Left",left:n}},g=function(n){return{_tag:"Right",right:n}},y=Object.prototype.hasOwnProperty,j=function(n){return{concat:function(t,r){var e={};for(var u in n)y.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));return e}}},M={concat:function(n,t){return n+t}};const E={concat:(n,t)=>n-t},_=({x:n,y:t})=>({x:n,y:t}),P=({clientX:n,clientY:t})=>({x:n,y:t}),k=j({x:E,y:E}),x=j({x:M,y:M});var T;!function(n){n[n.East=0]="East",n[n.North=1]="North",n[n.NorthEast=2]="NorthEast",n[n.NorthWest=3]="NorthWest",n[n.South=4]="South",n[n.SouthEast=5]="SouthEast",n[n.SouthWest=6]="SouthWest",n[n.West=7]="West"}(T||(T={}));const z=n=>{switch(n){case T.East:return"e-resize";case T.North:return"n-resize";case T.NorthEast:return"ne-resize";case T.NorthWest:return"nw-resize";case T.South:return"s-resize";case T.SouthEast:return"se-resize";case T.SouthWest:return"sw-resize";case T.West:return"w-resize";default:return"pointer"}};var N=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicativeComposition=t.getApplicativeMonoid=void 0,t.getApplicativeMonoid=function(n){var t=e.getApplySemigroup(n);return function(r){return{concat:t(r).concat,empty:n.of(r.empty)}}},t.getApplicativeComposition=function(n,t){var r=u.getFunctorComposition(n,t).map,i=e.ap(n,t);return{map:r,of:function(r){return n.of(t.of(r))},ap:function(n,t){return o.pipe(n,i(t))}}}})),A=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.and=t.or=t.not=t.Contravariant=t.getMonoidAll=t.getSemigroupAll=t.getMonoidAny=t.getSemigroupAny=t.URI=t.contramap=void 0,t.contramap=function(n){return function(t){return o.flow(n,t)}},t.URI="Predicate",t.getSemigroupAny=function(){return{concat:function(n,r){return o.pipe(n,t.or(r))}}},t.getMonoidAny=function(){return{concat:t.getSemigroupAny().concat,empty:o.constFalse}},t.getSemigroupAll=function(){return{concat:function(n,r){return o.pipe(n,t.and(r))}}},t.getMonoidAll=function(){return{concat:t.getSemigroupAll().concat,empty:o.constTrue}},t.Contravariant={URI:t.URI,contramap:function(n,r){return o.pipe(n,t.contramap(r))}},t.not=function(n){return function(t){return!n(t)}},t.or=function(n){return function(t){return function(r){return t(r)||n(r)}}},t.and=function(n){return function(t){return function(r){return t(r)&&n(r)}}}})),L=r((function(n,t){var r=s&&s.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),d=s&&s.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),v=s&&s.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(t,n,e);return d(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEither=t.MonadThrow=t.throwError=t.Witherable=t.wilt=t.wither=t.Traversable=t.sequence=t.traverse=t.Filterable=t.partitionMap=t.partition=t.filterMap=t.filter=t.Compactable=t.separate=t.compact=t.Extend=t.extend=t.Alternative=t.guard=t.Zero=t.zero=t.Alt=t.alt=t.altW=t.Foldable=t.reduceRight=t.foldMap=t.reduce=t.Monad=t.Chain=t.chain=t.Applicative=t.Apply=t.ap=t.Pointed=t.of=t.Functor=t.map=t.getMonoid=t.getOrd=t.getEq=t.getShow=t.URI=t.getRight=t.getLeft=t.fromPredicate=t.some=t.none=void 0,t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=t.getApplySemigroup=t.option=t.mapNullable=t.getRefinement=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apS=t.bind=t.bindTo=t.Do=t.exists=t.elem=t.toUndefined=t.toNullable=t.chainNullableK=t.fromNullableK=t.tryCatchK=t.tryCatch=t.fromNullable=t.chainEitherK=t.fromEitherK=t.duplicate=t.chainFirst=t.flatten=t.apSecond=t.apFirst=t.flap=t.getOrElse=t.getOrElseW=t.fold=t.match=t.foldW=t.matchW=t.isNone=t.isSome=t.FromEither=void 0;var h=v(i);t.none=h.none,t.some=h.some,t.fromPredicate=function(n){return function(r){return n(r)?t.some(r):t.none}},t.getLeft=function(n){return"Right"===n._tag?t.none:t.some(n.left)},t.getRight=function(n){return"Left"===n._tag?t.none:t.some(n.right)};var b=function(n,r){return o.pipe(n,t.map(r))},I=function(n,r){return o.pipe(n,t.ap(r))},R=function(n,r){return o.pipe(n,t.chain(r))},w=function(n,r,e){return o.pipe(n,t.reduce(r,e))},U=function(n){var r=t.foldMap(n);return function(n,t){return o.pipe(n,r(t))}},O=function(n,r,e){return o.pipe(n,t.reduceRight(r,e))},g=function(n){var r=t.traverse(n);return function(n,t){return o.pipe(n,r(t))}},y=function(n,r){return o.pipe(n,t.alt(r))},j=function(n,r){return o.pipe(n,t.filter(r))},M=function(n,r){return o.pipe(n,t.filterMap(r))},E=function(n,r){return o.pipe(n,t.extend(r))},_=function(n,r){return o.pipe(n,t.partition(r))},P=function(n,r){return o.pipe(n,t.partitionMap(r))};t.URI="Option",t.getShow=function(n){return{show:function(r){return t.isNone(r)?"none":"some("+n.show(r.value)+")"}}},t.getEq=function(n){return{equals:function(r,e){return r===e||(t.isNone(r)?t.isNone(e):!t.isNone(e)&&n.equals(r.value,e.value))}}},t.getOrd=function(n){return{equals:t.getEq(n).equals,compare:function(r,e){return r===e?0:t.isSome(r)?t.isSome(e)?n.compare(r.value,e.value):1:-1}}},t.getMonoid=function(n){return{concat:function(r,e){return t.isNone(r)?e:t.isNone(e)?r:t.some(n.concat(r.value,e.value))},empty:t.none}},t.map=function(n){return function(r){return t.isNone(r)?t.none:t.some(n(r.value))}},t.Functor={URI:t.URI,map:b},t.of=t.some,t.Pointed={URI:t.URI,of:t.of},t.ap=function(n){return function(r){return t.isNone(r)||t.isNone(n)?t.none:t.some(r.value(n.value))}},t.Apply={URI:t.URI,map:b,ap:I},t.Applicative={URI:t.URI,map:b,ap:I,of:t.of},t.chain=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)}},t.Chain={URI:t.URI,map:b,ap:I,chain:R},t.Monad={URI:t.URI,map:b,ap:I,of:t.of,chain:R},t.reduce=function(n,r){return function(e){return t.isNone(e)?n:r(n,e.value)}},t.foldMap=function(n){return function(r){return function(e){return t.isNone(e)?n.empty:r(e.value)}}},t.reduceRight=function(n,r){return function(e){return t.isNone(e)?n:r(e.value,n)}},t.Foldable={URI:t.URI,reduce:w,foldMap:U,reduceRight:O},t.altW=function(n){return function(r){return t.isNone(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:b,alt:y},t.zero=function(){return t.none},t.Zero={URI:t.URI,zero:t.zero},t.guard=c.guard(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:b,ap:I,of:t.of,alt:y,zero:t.zero},t.extend=function(n){return function(r){return t.isNone(r)?t.none:t.some(n(r))}},t.Extend={URI:t.URI,map:b,extend:E},t.compact=t.chain(o.identity);var k=p.separated(t.none,t.none);t.separate=function(n){return t.isNone(n)?k:p.separated(t.getLeft(n.value),t.getRight(n.value))},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.filter=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)?r:t.none}},t.filterMap=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)}},t.partition=function(n){return function(t){return p.separated(j(t,A.not(n)),j(t,n))}},t.partitionMap=function(n){return o.flow(t.map(n),t.separate)},t.Filterable={URI:t.URI,map:b,compact:t.compact,separate:t.separate,filter:j,filterMap:M,partition:_,partitionMap:P},t.traverse=function(n){return function(r){return function(e){return t.isNone(e)?n.of(t.none):n.map(r(e.value),t.some)}}},t.sequence=function(n){return function(r){return t.isNone(r)?n.of(t.none):n.map(r.value,t.some)}},t.Traversable={URI:t.URI,map:b,reduce:w,foldMap:U,reduceRight:O,traverse:g,sequence:t.sequence};var x=l.witherDefault(t.Traversable,t.Compactable),T=l.wiltDefault(t.Traversable,t.Compactable);t.wither=function(n){var t=x(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=T(n);return function(n){return function(r){return t(r,n)}}},t.Witherable={URI:t.URI,map:b,reduce:w,foldMap:U,reduceRight:O,traverse:g,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:j,filterMap:M,partition:_,partitionMap:P,wither:x,wilt:T},t.throwError=function(){return t.none},t.MonadThrow={URI:t.URI,map:b,ap:I,of:t.of,chain:R,throwError:t.throwError},t.fromEither=t.getRight,t.FromEither={URI:t.URI,fromEither:t.fromEither},t.isSome=h.isSome,t.isNone=function(n){return"None"===n._tag},t.matchW=function(n,r){return function(e){return t.isNone(e)?n():r(e.value)}},t.foldW=t.matchW,t.match=t.matchW,t.fold=t.match,t.getOrElseW=function(n){return function(r){return t.isNone(r)?n():r.value}},t.getOrElse=t.getOrElseW,t.flap=u.flap(t.Functor),t.apFirst=e.apFirst(t.Apply),t.apSecond=e.apSecond(t.Apply),t.flatten=t.compact,t.chainFirst=f.chainFirst(t.Chain),t.duplicate=t.extend(o.identity),t.fromEitherK=a.fromEitherK(t.FromEither),t.chainEitherK=a.chainEitherK(t.FromEither,t.Chain),t.fromNullable=function(n){return null==n?t.none:t.some(n)},t.tryCatch=function(n){try{return t.some(n())}catch(n){return t.none}},t.tryCatchK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return t.tryCatch((function(){return n.apply(void 0,r)}))}},t.fromNullableK=function(n){return o.flow(n,t.fromNullable)},t.chainNullableK=function(n){return function(r){return t.isNone(r)?t.none:t.fromNullable(n(r.value))}},t.toNullable=t.match(o.constNull,o.identity),t.toUndefined=t.match(o.constUndefined,o.identity),t.elem=function n(r){return function(e,u){if(void 0===u){var o=n(r);return function(n){return o(e,n)}}return!t.isNone(u)&&r.equals(e,u.value)}},t.exists=function(n){return function(r){return!t.isNone(r)&&n(r.value)}},t.Do=t.of(h.emptyRecord),t.bindTo=u.bindTo(t.Functor),t.bind=f.bind(t.Chain),t.apS=e.apS(t.Apply),t.ApT=t.of(h.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,h.head(r));if(t.isNone(e))return t.none;for(var u=[e.value],o=1;o<r.length;o++){var i=n(o,r[o]);if(t.isNone(i))return t.none;u.push(i.value)}return t.some(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return h.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(o.identity),t.getRefinement=function(n){return function(r){return t.isSome(n(r))}},t.mapNullable=t.chainNullableK,t.option={URI:t.URI,map:b,of:t.of,ap:I,chain:R,reduce:w,foldMap:U,reduceRight:O,traverse:g,sequence:t.sequence,zero:t.zero,alt:y,extend:E,compact:t.compact,separate:t.separate,filter:j,filterMap:M,partition:_,partitionMap:P,wither:x,wilt:T,throwError:t.throwError},t.getApplySemigroup=e.getApplySemigroup(t.Apply),t.getApplyMonoid=N.getApplicativeMonoid(t.Applicative),t.getFirstMonoid=function(){return t.getMonoid(m.first())},t.getLastMonoid=function(){return t.getMonoid(m.last())}}));const C=n=>!("isConnected"in n)||n.isConnected,S=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys())n.set(t,n.get(t).filter(C))})(...t)}),2e3)}})(),q=(r,e)=>{const u=((n,t=((n,t)=>n!==t))=>{let r=new Map(Object.entries(null!=n?n:{}));const e={dispose:[],get:[],set:[],reset:[]},u=()=>{r=new Map(Object.entries(null!=n?n:{})),e.reset.forEach((n=>n()))},o=n=>(e.get.forEach((t=>t(n))),r.get(n)),i=(n,u)=>{const o=r.get(n);t(u,o,n)&&(r.set(n,u),e.set.forEach((t=>t(n,u,o))))},c="undefined"==typeof Proxy?{}:new Proxy(n,{get:(n,t)=>o(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>r.has(t),set:(n,t,r)=>(i(t,r),!0)}),f=(n,t)=>(e[n].push(t),()=>{((n,t)=>{const r=n.indexOf(t);r>=0&&(n[r]=n[n.length-1],n.length--)})(e[n],t)});return{state:c,get:o,set:i,on:f,onChange:(t,r)=>{const e=f("set",((n,e)=>{n===t&&r(e)})),u=f("reset",(()=>r(n[t])));return()=>{e(),u()}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(f("set",t.set)),t.get&&n.push(f("get",t.get)),t.reset&&n.push(f("reset",t.reset)),t.dispose&&n.push(f("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{e.dispose.forEach((n=>n())),u()},reset:u,forceUpdate:n=>{const t=r.get(n);e.set.forEach((r=>r(n,t,t)))}}})(r,e);return u.use((()=>{if("function"!=typeof n)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const e=n();e&&((n,t,r)=>{const e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])})(r,t,e)},set:n=>{const e=r.get(n);e&&r.set(n,e.filter(t)),S(r)},reset:()=>{r.forEach((n=>n.forEach(t))),S(r)}}})()),u};function F(n,t,r){return function(e){for(var u=Array(r.length+1),o=0;o<r.length;o++)u[o]=r[o];return u[r.length]=e,0===t?n.apply(null,u):F(n,t-1,u)}}var D={1:function(n){return[n]},2:function(n){return function(t){return[n,t]}},3:function(n){return function(t){return function(r){return[n,t,r]}}},4:function(n){return function(t){return function(r){return function(e){return[n,t,r,e]}}}},5:function(n){return function(t){return function(r){return function(e){return function(u){return[n,t,r,e,u]}}}}}};function W(n){return D.hasOwnProperty(n)||(D[n]=F(R,n-1,[])),D[n]}function H(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=t.length,u=W(e),o=n.map(t[0],u),i=1;i<e;i++)o=n.ap(o,t[i]);return o}}function $(n){return function(t){return function(r){return n.fromEither("None"===r._tag?O(t()):g(r.value))}}}var G=O,J=g,B=function(n,t){return w(n,K(t))},K=function(n){return function(t){return V(t)?t:J(n(t.right))}},X={URI:"Either",map:B},Y={URI:"Either",map:B,ap:function(n,t){return w(n,function(n){return function(t){return V(t)?t:V(n)?n:J(t.right(n.right))}}(t))}},Z=function(n){return function(t){return V(t)?G(n(t.left)):t}},Q=$({URI:"Either",fromEither:b}),V=function(n){return"Left"===n._tag},nn=function(n,t){return function(r){return V(r)?n(r.left):t(r.right)}},tn=U,rn=function(n){return{_tag:"Some",value:n}},en=function(n){return{concat:function(t,r){return un(t)?r:un(r)?t:rn(n.concat(t.value,r.value))},empty:tn}},un=function(n){return"None"===n._tag},on=function(n){return null==n?tn:rn(n)};function cn(n){return function(t){return n.map(t,J)}}function fn(n){return function(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}(n,X)}function an(n){return function(n,t){return function(r){return function(e){return n.ap(n.map(e,(function(n){return function(r){return t.ap(n,r)}})),r)}}}(n,Y)}function sn(n){return function(t){return function(r){return n.chain(r,(function(r){return V(r)?n.of(r):t(r.right)}))}}}function pn(n){return function(t){return function(r){return n.map(r,Z(t))}}}function ln(n,t){return function(r){var e=I(r,n.fromTask);return function(n){return t.chain(n,e)}}}var mn=function(n){return function(){return Promise.resolve().then(n)}},dn=function(n,t){return w(n,hn(t))},vn=function(n,t){return w(n,bn(t))},hn=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},bn=function(n){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},In=function(n){return function(){return Promise.resolve(n)}},Rn={URI:"Task",map:dn},wn={URI:"Task",map:dn,ap:vn},Un={URI:"Task",map:dn,of:In,ap:vn,chain:function(n,t){return w(n,function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}}(t))}},On=cn(Rn),gn=I(mn,On),yn=On,jn=In,Mn=fn(Rn),En=pn(Rn),_n=an(wn),Pn=sn(Un),kn=Pn,xn="TaskEither",Tn={URI:xn,map:function(n,t){return w(n,Mn(t))},ap:function(n,t){return w(n,_n(t))},chain:function(n,t){return w(n,Pn(t))}},zn=$({URI:xn,fromEither:jn}),Nn=ln({URI:xn,fromIO:gn,fromTask:yn},Tn),An=r((function(n,t){var r=s&&s.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=s&&s.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=s&&s.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactableComposition=t.separate=t.compact=void 0;var c=i(p);function f(n,t){return function(r){return n.map(r,t.compact)}}function a(n,t,r){var e=f(n,t),i=u.map(n,r);return function(n){return c.separated(e(o.pipe(n,i(L.getLeft))),e(o.pipe(n,i(L.getRight))))}}t.compact=f,t.separate=a,t.getCompactableComposition=function(n,t){return{map:u.getFunctorComposition(n,t).map,compact:f(n,t),separate:a(n,t,t)}}})),Ln=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.tailRec=void 0,t.tailRec=function(n,t){for(var r=t(n);"Left"===r._tag;)r=t(r.left);return r.right}})),Cn=r((function(n,t){var r=s&&s.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),c=s&&s.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),m=s&&s.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(t,n,e);return c(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fold=t.match=t.foldW=t.matchW=t.isRight=t.isLeft=t.fromOption=t.fromPredicate=t.FromEither=t.MonadThrow=t.throwError=t.ChainRec=t.Extend=t.extend=t.Alt=t.alt=t.altW=t.Bifunctor=t.mapLeft=t.bimap=t.Traversable=t.sequence=t.traverse=t.Foldable=t.reduceRight=t.foldMap=t.reduce=t.Monad=t.Chain=t.chain=t.chainW=t.Applicative=t.Apply=t.ap=t.apW=t.Pointed=t.of=t.Functor=t.map=t.getAltValidation=t.getApplicativeValidation=t.getWitherable=t.getFilterable=t.getCompactable=t.getSemigroup=t.getEq=t.getShow=t.URI=t.right=t.left=void 0,t.getValidation=t.getValidationMonoid=t.getValidationSemigroup=t.getApplyMonoid=t.getApplySemigroup=t.either=t.stringifyJSON=t.parseJSON=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apSW=t.apS=t.bindW=t.bind=t.bindTo=t.Do=t.exists=t.elem=t.toError=t.toUnion=t.chainNullableK=t.fromNullableK=t.tryCatchK=t.tryCatch=t.fromNullable=t.orElse=t.orElseW=t.swap=t.filterOrElseW=t.filterOrElse=t.chainOptionK=t.fromOptionK=t.duplicate=t.flatten=t.flattenW=t.chainFirstW=t.chainFirst=t.apSecond=t.apFirst=t.flap=t.getOrElse=t.getOrElseW=void 0;var d=m(i);t.left=d.left,t.right=d.right;var v=function(n,r){return o.pipe(n,t.map(r))},h=function(n,r){return o.pipe(n,t.ap(r))},b=function(n,r){return o.pipe(n,t.chain(r))},I=function(n,r,e){return o.pipe(n,t.reduce(r,e))},R=function(n){return function(r,e){var u=t.foldMap(n);return o.pipe(r,u(e))}},w=function(n,r,e){return o.pipe(n,t.reduceRight(r,e))},U=function(n){var r=t.traverse(n);return function(n,t){return o.pipe(n,r(t))}},O=function(n,r,e){return o.pipe(n,t.bimap(r,e))},g=function(n,r){return o.pipe(n,t.mapLeft(r))},y=function(n,r){return o.pipe(n,t.alt(r))},j=function(n,r){return o.pipe(n,t.extend(r))},M=function(n,r){return Ln.tailRec(r(n),(function(n){return t.isLeft(n)?t.right(t.left(n.left)):t.isLeft(n.right)?t.left(r(n.right.left)):t.right(t.right(n.right.right))}))};t.URI="Either",t.getShow=function(n,r){return{show:function(e){return t.isLeft(e)?"left("+n.show(e.left)+")":"right("+r.show(e.right)+")"}}},t.getEq=function(n,r){return{equals:function(e,u){return e===u||(t.isLeft(e)?t.isLeft(u)&&n.equals(e.left,u.left):t.isRight(u)&&r.equals(e.right,u.right))}}},t.getSemigroup=function(n){return{concat:function(r,e){return t.isLeft(e)?r:t.isLeft(r)?e:t.right(n.concat(r.right,e.right))}}},t.getCompactable=function(n){var r=t.left(n.empty);return{URI:t.URI,_E:void 0,compact:function(n){return t.isLeft(n)?n:"None"===n.right._tag?r:t.right(n.right.value)},separate:function(n){return t.isLeft(n)?p.separated(n,n):t.isLeft(n.right)?p.separated(t.right(n.right.left),r):p.separated(r,t.right(n.right.right))}}},t.getFilterable=function(n){var r=t.left(n.empty),e=t.getCompactable(n);return{URI:t.URI,_E:void 0,map:v,compact:e.compact,separate:e.separate,filter:function(n,e){return t.isLeft(n)||e(n.right)?n:r},filterMap:function(n,e){if(t.isLeft(n))return n;var u=e(n.right);return"None"===u._tag?r:t.right(u.value)},partition:function(n,e){return t.isLeft(n)?p.separated(n,n):e(n.right)?p.separated(r,t.right(n.right)):p.separated(t.right(n.right),r)},partitionMap:function(n,e){if(t.isLeft(n))return p.separated(n,n);var u=e(n.right);return t.isLeft(u)?p.separated(t.right(u.left),r):p.separated(r,t.right(u.right))}}},t.getWitherable=function(n){var r=t.getFilterable(n),e=t.getCompactable(n);return{URI:t.URI,_E:void 0,map:v,compact:r.compact,separate:r.separate,filter:r.filter,filterMap:r.filterMap,partition:r.partition,partitionMap:r.partitionMap,traverse:U,sequence:t.sequence,reduce:I,foldMap:R,reduceRight:w,wither:l.witherDefault(t.Traversable,e),wilt:l.wiltDefault(t.Traversable,e)}},t.getApplicativeValidation=function(n){return{URI:t.URI,_E:void 0,map:v,ap:function(r,e){return t.isLeft(r)?t.isLeft(e)?t.left(n.concat(r.left,e.left)):r:t.isLeft(e)?e:t.right(r.right(e.right))},of:t.of}},t.getAltValidation=function(n){return{URI:t.URI,_E:void 0,map:v,alt:function(r,e){if(t.isRight(r))return r;var u=e();return t.isLeft(u)?t.left(n.concat(r.left,u.left)):u}}},t.map=function(n){return function(r){return t.isLeft(r)?r:t.right(n(r.right))}},t.Functor={URI:t.URI,map:v},t.of=t.right,t.Pointed={URI:t.URI,of:t.of},t.apW=function(n){return function(r){return t.isLeft(r)?r:t.isLeft(n)?n:t.right(r.right(n.right))}},t.ap=t.apW,t.Apply={URI:t.URI,map:v,ap:h},t.Applicative={URI:t.URI,map:v,ap:h,of:t.of},t.chainW=function(n){return function(r){return t.isLeft(r)?r:n(r.right)}},t.chain=t.chainW,t.Chain={URI:t.URI,map:v,ap:h,chain:b},t.Monad={URI:t.URI,map:v,ap:h,of:t.of,chain:b},t.reduce=function(n,r){return function(e){return t.isLeft(e)?n:r(n,e.right)}},t.foldMap=function(n){return function(r){return function(e){return t.isLeft(e)?n.empty:r(e.right)}}},t.reduceRight=function(n,r){return function(e){return t.isLeft(e)?n:r(e.right,n)}},t.Foldable={URI:t.URI,reduce:I,foldMap:R,reduceRight:w},t.traverse=function(n){return function(r){return function(e){return t.isLeft(e)?n.of(t.left(e.left)):n.map(r(e.right),t.right)}}},t.sequence=function(n){return function(r){return t.isLeft(r)?n.of(t.left(r.left)):n.map(r.right,t.right)}},t.Traversable={URI:t.URI,map:v,reduce:I,foldMap:R,reduceRight:w,traverse:U,sequence:t.sequence},t.bimap=function(n,r){return function(e){return t.isLeft(e)?t.left(n(e.left)):t.right(r(e.right))}},t.mapLeft=function(n){return function(r){return t.isLeft(r)?t.left(n(r.left)):r}},t.Bifunctor={URI:t.URI,bimap:O,mapLeft:g},t.altW=function(n){return function(r){return t.isLeft(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:v,alt:y},t.extend=function(n){return function(r){return t.isLeft(r)?r:t.right(n(r))}},t.Extend={URI:t.URI,map:v,extend:j},t.ChainRec={URI:t.URI,map:v,ap:h,chain:b,chainRec:M},t.throwError=t.left,t.MonadThrow={URI:t.URI,map:v,ap:h,of:t.of,chain:b,throwError:t.throwError},t.FromEither={URI:t.URI,fromEither:o.identity},t.fromPredicate=a.fromPredicate(t.FromEither),t.fromOption=a.fromOption(t.FromEither),t.isLeft=d.isLeft,t.isRight=d.isRight,t.matchW=function(n,r){return function(e){return t.isLeft(e)?n(e.left):r(e.right)}},t.foldW=t.matchW,t.match=t.matchW,t.fold=t.match,t.getOrElseW=function(n){return function(r){return t.isLeft(r)?n(r.left):r.right}},t.getOrElse=t.getOrElseW,t.flap=u.flap(t.Functor),t.apFirst=e.apFirst(t.Apply),t.apSecond=e.apSecond(t.Apply),t.chainFirst=f.chainFirst(t.Chain),t.chainFirstW=t.chainFirst,t.flattenW=t.chainW(o.identity),t.flatten=t.flattenW,t.duplicate=t.extend(o.identity),t.fromOptionK=a.fromOptionK(t.FromEither),t.chainOptionK=a.chainOptionK(t.FromEither,t.Chain),t.filterOrElse=a.filterOrElse(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.swap=function(n){return t.isLeft(n)?t.right(n.left):t.left(n.right)},t.orElseW=function(n){return function(r){return t.isLeft(r)?n(r.left):r}},t.orElse=t.orElseW,t.fromNullable=function(n){return function(r){return null==r?t.left(n):t.right(r)}},t.tryCatch=function(n,r){try{return t.right(n())}catch(n){return t.left(r(n))}},t.tryCatchK=function(n,r){return function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];return t.tryCatch((function(){return n.apply(void 0,e)}),r)}},t.fromNullableK=function(n){var r=t.fromNullable(n);return function(n){return o.flow(n,r)}},t.chainNullableK=function(n){var r=t.fromNullableK(n);return function(n){return t.chain(r(n))}},t.toUnion=t.foldW(o.identity,o.identity),t.toError=function(n){return n instanceof Error?n:new Error(String(n))},t.elem=function n(r){return function(e,u){if(void 0===u){var o=n(r);return function(n){return o(e,n)}}return!t.isLeft(u)&&r.equals(e,u.right)}},t.exists=function(n){return function(r){return!t.isLeft(r)&&n(r.right)}},t.Do=t.of(d.emptyRecord),t.bindTo=u.bindTo(t.Functor),t.bind=f.bind(t.Chain),t.bindW=t.bind,t.apS=e.apS(t.Apply),t.apSW=t.apS,t.ApT=t.of(d.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,d.head(r));if(t.isLeft(e))return e;for(var u=[e.right],o=1;o<r.length;o++){var i=n(o,r[o]);if(t.isLeft(i))return i;u.push(i.right)}return t.right(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return d.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(o.identity),t.parseJSON=function(n,r){return t.tryCatch((function(){return JSON.parse(n)}),r)},t.stringifyJSON=function(n,r){return t.tryCatch((function(){var t=JSON.stringify(n);if("string"!=typeof t)throw new Error("Converting unsupported structure to JSON");return t}),r)},t.either={URI:t.URI,map:v,of:t.of,ap:h,chain:b,reduce:I,foldMap:R,reduceRight:w,traverse:U,sequence:t.sequence,bimap:O,mapLeft:g,alt:y,extend:j,chainRec:M,throwError:t.throwError},t.getApplySemigroup=e.getApplySemigroup(t.Apply),t.getApplyMonoid=N.getApplicativeMonoid(t.Applicative),t.getValidationSemigroup=function(n,r){return e.getApplySemigroup(t.getApplicativeValidation(n))(r)},t.getValidationMonoid=function(n,r){return N.getApplicativeMonoid(t.getApplicativeValidation(n))(r)},t.getValidation=function(n){var r=t.getApplicativeValidation(n).ap,e=t.getAltValidation(n).alt;return{URI:t.URI,_E:void 0,map:v,of:t.of,chain:b,bimap:O,mapLeft:g,reduce:I,foldMap:R,reduceRight:w,extend:j,traverse:U,sequence:t.sequence,chainRec:M,throwError:t.throwError,ap:r,alt:e}}})),Sn=r((function(n,t){var r=s&&s.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),i=s&&s.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),c=s&&s.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(t,n,e);return i(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEitherM=t.toUnion=t.swap=t.orLeft=t.orElseFirst=t.orElse=t.getOrElse=t.matchE=t.match=t.altValidation=t.mapLeft=t.bimap=t.alt=t.chain=t.ap=t.map=t.leftF=t.rightF=t.left=t.right=void 0;var f=c(Cn);function a(n){return o.flow(f.right,n.of)}function p(n){return o.flow(f.left,n.of)}function l(n){return function(t){return n.map(t,f.right)}}function m(n){return function(t){return n.map(t,f.left)}}function d(n){return u.map(n,f.Functor)}function v(n){return e.ap(n,f.Apply)}function h(n){return function(t){return function(r){return n.chain(r,(function(r){return f.isLeft(r)?n.of(r):t(r.right)}))}}}function b(n){return function(t){return function(r){return n.chain(r,(function(r){return f.isLeft(r)?t():n.of(r)}))}}}function I(n){return function(t,r){return function(e){return n.map(e,f.bimap(t,r))}}}function R(n){return function(t){return function(r){return n.map(r,f.mapLeft(t))}}}function w(n){return function(t,r){return function(e){return n.chain(e,f.match(t,r))}}}function U(n){return function(t){return function(r){return n.chain(r,f.match(t,n.of))}}}function O(n){return function(t){return function(r){return n.chain(r,(function(r){return f.isLeft(r)?t(r.left):n.of(r)}))}}}function g(n){return function(t){return n.map(t,f.swap)}}t.right=a,t.left=p,t.rightF=l,t.leftF=m,t.map=d,t.ap=v,t.chain=h,t.alt=b,t.bimap=I,t.mapLeft=R,t.altValidation=function(n,t){return function(r){return function(e){return n.chain(e,f.match((function(e){return n.map(r(),f.mapLeft((function(n){return t.concat(e,n)})))}),a(n)))}}},t.match=function(n){return function(t,r){return function(e){return n.map(e,f.match(t,r))}}},t.matchE=w,t.getOrElse=U,t.orElse=O,t.orElseFirst=function(n){var t=O(n);return function(r){return t((function(t){return n.map(r(t),(function(n){return f.isLeft(n)?n:f.left(t)}))}))}},t.orLeft=function(n){return function(t){return function(r){return n.chain(r,f.match((function(r){return n.map(t(r),f.left)}),(function(t){return n.of(f.right(t))})))}}},t.swap=g,t.toUnion=function(n){return function(t){return n.map(t,f.toUnion)}},t.getEitherM=function(n){var t=v(n),r=d(n),e=h(n),u=b(n),i=I(n),c=R(n),f=w(n),s=U(n),y=O(n);return{map:function(n,t){return o.pipe(n,r(t))},ap:function(n,r){return o.pipe(n,t(r))},of:a(n),chain:function(n,t){return o.pipe(n,e(t))},alt:function(n,t){return o.pipe(n,u(t))},bimap:function(n,t,r){return o.pipe(n,i(t,r))},mapLeft:function(n,t){return o.pipe(n,c(t))},fold:function(n,t,r){return o.pipe(n,f(t,r))},getOrElse:function(n,t){return o.pipe(n,s(t))},orElse:function(n,t){return o.pipe(n,y(t))},swap:g(n),rightM:l(n),leftM:m(n),left:p(n)}}})),qn=r((function(n,t){function r(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.filter(n,r)}))}}}function e(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.filterMap(n,r)}))}}}function i(n,t){var e=r(n,t);return function(n){var t=e(A.not(n)),r=e(n);return function(n){return p.separated(t(n),r(n))}}}function c(n,t){var r=e(n,t);return function(n){return function(t){return p.separated(o.pipe(t,r((function(t){return L.getLeft(n(t))}))),o.pipe(t,r((function(t){return L.getRight(n(t))}))))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterableComposition=t.partitionMap=t.partition=t.filterMap=t.filter=void 0,t.filter=r,t.filterMap=e,t.partition=i,t.partitionMap=c,t.getFilterableComposition=function(n,t){var f=u.getFunctorComposition(n,t).map,a=An.compact(n,t),s=An.separate(n,t,t),p=r(n,t),l=e(n,t),m=i(n,t),d=c(n,t);return{map:f,compact:a,separate:s,filter:function(n,t){return o.pipe(n,p(t))},filterMap:function(n,t){return o.pipe(n,l(t))},partition:function(n,t){return o.pipe(n,m(t))},partitionMap:function(n,t){return o.pipe(n,d(t))}}}})),Fn=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.chainFirstIOK=t.chainIOK=t.fromIOK=void 0,t.fromIOK=function(n){return function(t){return o.flow(t,n.fromIO)}},t.chainIOK=function(n,t){return function(r){var e=o.flow(r,n.fromIO);return function(n){return t.chain(n,e)}}},t.chainFirstIOK=function(n,t){var r=f.chainFirst(t);return function(t){return r(o.flow(t,n.fromIO))}}})),Dn=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.chainFirstTaskK=t.chainTaskK=t.fromTaskK=void 0,t.fromTaskK=function(n){return function(t){return o.flow(t,n.fromTask)}},t.chainTaskK=function(n,t){return function(r){var e=o.flow(r,n.fromTask);return function(n){return t.chain(n,e)}}},t.chainFirstTaskK=function(n,t){var r=f.chainFirst(t);return function(t){return r(o.flow(t,n.fromTask))}}})),Wn=r((function(n,t){var r=s&&s.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),c=s&&s.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),a=s&&s.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(t,n,e);return c(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getMonoid=t.getSemigroup=t.taskSeq=t.task=t.sequenceSeqArray=t.traverseSeqArray=t.traverseSeqArrayWithIndex=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq=t.traverseReadonlyNonEmptyArrayWithIndexSeq=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apS=t.bind=t.bindTo=t.Do=t.never=t.FromTask=t.chainFirstIOK=t.chainIOK=t.fromIOK=t.FromIO=t.chainFirst=t.MonadTask=t.fromTask=t.MonadIO=t.Monad=t.Chain=t.ApplicativeSeq=t.ApplySeq=t.ApplicativePar=t.apSecond=t.apFirst=t.ApplyPar=t.Pointed=t.flap=t.Functor=t.getRaceMonoid=t.URI=t.flatten=t.chain=t.of=t.ap=t.map=t.delay=t.fromIO=void 0;var p=a(i);t.fromIO=function(n){return function(){return Promise.resolve().then(n)}},t.delay=function(n){return function(t){return function(){return new Promise((function(r){setTimeout((function(){Promise.resolve().then(t).then(r)}),n)}))}}};var l=function(n,r){return o.pipe(n,t.map(r))},m=function(n,r){return o.pipe(n,t.ap(r))},d=function(n,r){return o.pipe(n,t.chain((function(n){return o.pipe(r,t.map(n))})))},v=function(n,r){return o.pipe(n,t.chain(r))};t.map=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},t.ap=function(n){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},t.of=function(n){return function(){return Promise.resolve(n)}},t.chain=function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}},t.flatten=t.chain(o.identity),t.URI="Task",t.getRaceMonoid=function(){return{concat:function(n,t){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(t)])}},empty:t.never}},t.Functor={URI:t.URI,map:l},t.flap=u.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:l,ap:m},t.apFirst=e.apFirst(t.ApplyPar),t.apSecond=e.apSecond(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:l,ap:m,of:t.of},t.ApplySeq={URI:t.URI,map:l,ap:d},t.ApplicativeSeq={URI:t.URI,map:l,ap:d,of:t.of},t.Chain={URI:t.URI,map:l,ap:m,chain:v},t.Monad={URI:t.URI,map:l,of:t.of,ap:m,chain:v},t.MonadIO={URI:t.URI,map:l,of:t.of,ap:m,chain:v,fromIO:t.fromIO},t.fromTask=o.identity,t.MonadTask={URI:t.URI,map:l,of:t.of,ap:m,chain:v,fromIO:t.fromIO,fromTask:t.fromTask},t.chainFirst=f.chainFirst(t.Chain),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=Fn.fromIOK(t.FromIO),t.chainIOK=Fn.chainIOK(t.FromIO,t.Chain),t.chainFirstIOK=Fn.chainFirstIOK(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.never=function(){return new Promise((function(){}))},t.Do=t.of(p.emptyRecord),t.bindTo=u.bindTo(t.Functor),t.bind=f.bind(t.Chain),t.apS=e.apS(t.ApplyPar),t.ApT=t.of(p.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){return function(){return Promise.all(t.map((function(t,r){return Promise.resolve().then((function(){return n(r,t)()}))})))}}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return p.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return p.tail(t).reduce((function(t,r,e){return t.then((function(t){return Promise.resolve().then(n(e+1,r)).then((function(n){return t.push(n),t}))}))}),Promise.resolve().then(n(0,p.head(t))).then(p.singleton))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return p.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(o.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return t.traverseReadonlyArrayWithIndexSeq((function(t,r){return n(r)}))},t.sequenceSeqArray=t.traverseSeqArray(o.identity),t.task={URI:t.URI,map:l,of:t.of,ap:m,chain:v,fromIO:t.fromIO,fromTask:t.fromTask},t.taskSeq={URI:t.URI,map:l,of:t.of,ap:d,chain:v,fromIO:t.fromIO,fromTask:t.fromTask},t.getSemigroup=e.getApplySemigroup(t.ApplySeq),t.getMonoid=N.getApplicativeMonoid(t.ApplicativeSeq)})),Hn=r((function(n,t){var r=s&&s.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),c=s&&s.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),p=s&&s.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(t,n,e);return c(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactable=t.getAltTaskValidation=t.getApplicativeTaskValidation=t.URI=t.throwError=t.of=t.altW=t.alt=t.flatten=t.flattenW=t.chainW=t.chain=t.apW=t.ap=t.mapLeft=t.bimap=t.map=t.chainIOEitherK=t.chainIOEitherKW=t.fromIOEitherK=t.chainTaskOptionK=t.fromTaskOptionK=t.swap=t.orLeft=t.orElseFirstW=t.orElseFirst=t.orElseW=t.orElse=t.toUnion=t.tryCatchK=t.tryCatch=t.getOrElseW=t.getOrElse=t.foldW=t.matchEW=t.fold=t.matchE=t.matchW=t.match=t.fromTaskOption=t.fromIOEither=t.fromEither=t.fromTask=t.fromIO=t.leftIO=t.rightIO=t.leftTask=t.rightTask=t.right=t.left=void 0,t.traverseReadonlyArrayWithIndexSeq=t.traverseReadonlyNonEmptyArrayWithIndexSeq=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apSW=t.apS=t.bindW=t.bind=t.bindTo=t.Do=t.bracket=t.taskify=t.chainFirstTaskK=t.chainTaskK=t.fromTaskK=t.FromTask=t.chainFirstIOK=t.chainIOK=t.fromIOK=t.FromIO=t.fromEitherK=t.filterOrElseW=t.filterOrElse=t.fromPredicate=t.chainEitherKW=t.chainEitherK=t.chainOptionK=t.fromOptionK=t.fromOption=t.FromEither=t.Alt=t.Bifunctor=t.chainFirstW=t.chainFirst=t.MonadThrow=t.MonadTask=t.MonadIO=t.Monad=t.Chain=t.ApplicativeSeq=t.ApplySeq=t.ApplicativePar=t.apSecond=t.apFirst=t.ApplyPar=t.Pointed=t.flap=t.Functor=t.getFilterable=void 0,t.getTaskValidation=t.getSemigroup=t.getApplyMonoid=t.getApplySemigroup=t.taskEitherSeq=t.taskEither=t.sequenceSeqArray=t.traverseSeqArray=t.traverseSeqArrayWithIndex=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=void 0;var l=p(Cn),m=p(Sn),d=p(i),v=p(Wn);t.left=m.left(v.Pointed),t.right=m.right(v.Pointed),t.rightTask=m.rightF(v.Functor),t.leftTask=m.leftF(v.Functor),t.rightIO=o.flow(v.fromIO,t.rightTask),t.leftIO=o.flow(v.fromIO,t.leftTask),t.fromIO=t.rightIO,t.fromTask=t.rightTask,t.fromEither=v.of,t.fromIOEither=v.fromIO,t.fromTaskOption=function(n){return v.map(l.fromOption(n))},t.match=m.match(v.Functor),t.matchW=t.match,t.matchE=m.matchE(v.Monad),t.fold=t.matchE,t.matchEW=t.matchE,t.foldW=t.matchEW,t.getOrElse=m.getOrElse(v.Monad),t.getOrElseW=t.getOrElse,t.tryCatch=function(n,t){return function(){return n().then(d.right,(function(n){return d.left(t(n))}))}},t.tryCatchK=function(n,r){return function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];return t.tryCatch((function(){return n.apply(void 0,e)}),r)}},t.toUnion=m.toUnion(v.Functor),t.orElse=m.orElse(v.Monad),t.orElseW=t.orElse,t.orElseFirst=m.orElseFirst(v.Monad),t.orElseFirstW=t.orElseFirst,t.orLeft=m.orLeft(v.Monad),t.swap=m.swap(v.Functor),t.fromTaskOptionK=function(n){var r=t.fromTaskOption(n);return function(n){return o.flow(n,r)}},t.chainTaskOptionK=function(n){return o.flow(t.fromTaskOptionK(n),t.chain)},t.fromIOEitherK=function(n){return o.flow(n,t.fromIOEither)},t.chainIOEitherKW=function(n){return t.chainW(t.fromIOEitherK(n))},t.chainIOEitherK=t.chainIOEitherKW;var h=function(n,r){return o.pipe(n,t.map(r))},b=function(n,r){return o.pipe(n,t.ap(r))},I=function(n,r){return o.pipe(n,t.chain((function(n){return o.pipe(r,t.map(n))})))},R=function(n,r){return o.pipe(n,t.chain(r))},w=function(n,r,e){return o.pipe(n,t.bimap(r,e))},U=function(n,r){return o.pipe(n,t.mapLeft(r))},O=function(n,r){return o.pipe(n,t.alt(r))};function g(n,r){var u=e.ap(n,l.getApplicativeValidation(r));return{URI:t.URI,_E:void 0,map:h,ap:function(n,t){return o.pipe(n,u(t))},of:t.of}}function y(n){var r=m.altValidation(v.Monad,n);return{URI:t.URI,_E:void 0,map:h,alt:function(n,t){return o.pipe(n,r(t))}}}t.map=m.map(v.Functor),t.bimap=m.bimap(v.Functor),t.mapLeft=m.mapLeft(v.Functor),t.ap=m.ap(v.ApplyPar),t.apW=t.ap,t.chain=m.chain(v.Monad),t.chainW=t.chain,t.flattenW=t.chainW(o.identity),t.flatten=t.flattenW,t.alt=m.alt(v.Monad),t.altW=t.alt,t.of=t.right,t.throwError=t.left,t.URI="TaskEither",t.getApplicativeTaskValidation=g,t.getAltTaskValidation=y,t.getCompactable=function(n){var r=l.getCompactable(n);return{URI:t.URI,_E:void 0,compact:An.compact(v.Functor,r),separate:An.separate(v.Functor,r,l.Functor)}},t.getFilterable=function(n){var r=l.getFilterable(n),e=t.getCompactable(n),u=qn.filter(v.Functor,r),i=qn.filterMap(v.Functor,r),c=qn.partition(v.Functor,r),f=qn.partitionMap(v.Functor,r);return{URI:t.URI,_E:void 0,map:h,compact:e.compact,separate:e.separate,filter:function(n,t){return o.pipe(n,u(t))},filterMap:function(n,t){return o.pipe(n,i(t))},partition:function(n,t){return o.pipe(n,c(t))},partitionMap:function(n,t){return o.pipe(n,f(t))}}},t.Functor={URI:t.URI,map:h},t.flap=u.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:h,ap:b},t.apFirst=e.apFirst(t.ApplyPar),t.apSecond=e.apSecond(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:h,ap:b,of:t.of},t.ApplySeq={URI:t.URI,map:h,ap:I},t.ApplicativeSeq={URI:t.URI,map:h,ap:I,of:t.of},t.Chain={URI:t.URI,map:h,ap:b,chain:R},t.Monad={URI:t.URI,map:h,ap:b,chain:R,of:t.of},t.MonadIO={URI:t.URI,map:h,ap:b,chain:R,of:t.of,fromIO:t.fromIO},t.MonadTask={URI:t.URI,map:h,ap:b,chain:R,of:t.of,fromIO:t.fromIO,fromTask:t.fromTask},t.MonadThrow={URI:t.URI,map:h,ap:b,chain:R,of:t.of,throwError:t.throwError},t.chainFirst=f.chainFirst(t.Chain),t.chainFirstW=t.chainFirst,t.Bifunctor={URI:t.URI,bimap:w,mapLeft:U},t.Alt={URI:t.URI,map:h,alt:O},t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromOption=a.fromOption(t.FromEither),t.fromOptionK=a.fromOptionK(t.FromEither),t.chainOptionK=a.chainOptionK(t.FromEither,t.Chain),t.chainEitherK=a.chainEitherK(t.FromEither,t.Chain),t.chainEitherKW=t.chainEitherK,t.fromPredicate=a.fromPredicate(t.FromEither),t.filterOrElse=a.filterOrElse(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.fromEitherK=a.fromEitherK(t.FromEither),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=Fn.fromIOK(t.FromIO),t.chainIOK=Fn.chainIOK(t.FromIO,t.Chain),t.chainFirstIOK=Fn.chainFirstIOK(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.fromTaskK=Dn.fromTaskK(t.FromTask),t.chainTaskK=Dn.chainTaskK(t.FromTask,t.Chain),t.chainFirstTaskK=Dn.chainFirstTaskK(t.FromTask,t.Chain),t.taskify=function(n){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise((function(r){n.apply(null,t.concat((function(n,t){return r(null!=n?d.left(n):d.right(t))})))}))}}},t.bracket=function(n,r,e){return o.pipe(n,t.chain((function(n){return o.pipe(r(n),v.chain((function(r){return o.pipe(e(n,r),t.chain((function(){return v.of(r)})))})))})))},t.Do=t.of(d.emptyRecord),t.bindTo=u.bindTo(t.Functor),t.bind=f.bind(t.Chain),t.bindW=t.bind,t.apS=e.apS(t.ApplyPar),t.apSW=t.apS,t.ApT=t.of(d.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return o.flow(v.traverseReadonlyNonEmptyArrayWithIndex(n),v.map(l.traverseReadonlyNonEmptyArrayWithIndex(o.SK)))},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return d.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return d.tail(t).reduce((function(t,r,e){return t.then((function(u){return d.isLeft(u)?t:n(e+1,r)().then((function(n){return d.isLeft(n)?n:(u.right.push(n.right),u)}))}))}),n(0,d.head(t))().then(l.map(d.singleton)))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return d.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(o.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return t.traverseReadonlyArrayWithIndexSeq((function(t,r){return n(r)}))},t.sequenceSeqArray=t.traverseSeqArray(o.identity),t.taskEither={URI:t.URI,bimap:w,mapLeft:U,map:h,of:t.of,ap:b,chain:R,alt:O,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.taskEitherSeq={URI:t.URI,bimap:w,mapLeft:U,map:h,of:t.of,ap:I,chain:R,alt:O,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.getApplySemigroup=e.getApplySemigroup(t.ApplySeq),t.getApplyMonoid=N.getApplicativeMonoid(t.ApplicativeSeq),t.getSemigroup=function(n){return e.getApplySemigroup(v.ApplySeq)(l.getSemigroup(n))},t.getTaskValidation=function(n){var r=g(v.ApplicativePar,n),e=y(n);return{URI:t.URI,_E:void 0,map:h,ap:r.ap,of:t.of,chain:R,bimap:w,mapLeft:U,alt:e.alt,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError}}}));const $n=q({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:void 0,locale:"de-DE"}),Gn=$n.state,Jn=$n.state,Bn=n=>({kind:"server",inner:n}),Kn={kind:"client",inner:"Token not exist or empty"},Xn={kind:"client",inner:"Api path empty or missing"},Yn=en({concat:function(n,t){return n+t},empty:""}),Zn=()=>w(en({concat:b}).concat(on(Gn.apiPath),on("https://api.vviinn.com")),Q((()=>Xn))),Qn=j({method:{concat:(n,t)=>{return w(Yn.concat(on(n),on(t)),(r=()=>"GET",function(n){return un(n)?r():n.value}));var r}},body:{concat:function(n,t){return t}},headers:{concat:(n,t)=>{const r=new Headers;return void 0!==n&&n.forEach(((n,t)=>r.append(t,n))),void 0!==t&&t.forEach(((n,t)=>r.append(t,n))),r}}}),Vn=n=>({method:n}),nt=J(Vn("GET")),tt=J(Vn("POST")),rt=n=>n.status>=200&&n.status<300?Hn.right(n):Hn.left(n),et=Qn,ut=(n,t)=>([r,e])=>{const u=new URL(n,r),i=et.concat(e,t);return o.pipe(((n,t={})=>o.pipe(((n,t={method:"GET"})=>Hn.tryCatch((()=>fetch(n,t)),(n=>n)))(n,t),Hn.chain(rt),Hn.chain((n=>function(n){return Hn.fromTask((()=>n.json()))}(n)))))(u.toString(),i),Hn.mapLeft(Bn))},ot=n=>(n=>0===n.length)(n)?G("entity is empty"):J(n),it=n=>{return w(n,("entity not exist",function(n){return null==n?G("entity not exist"):J(n)}),(t=ot,function(n){return V(n)?n:t(n.right)}));var t},ct=n=>new Headers({Authorization:`Bearer ${n}`}),ft=n=>w(n,it,Cn.mapLeft((()=>Kn))),at=n=>w(n,ft,Cn.map(ct)),st=e.sequenceT(Cn.Apply),pt={equals:(n,t)=>n.class===t.class&&n.score===t.score&&n.rectangle.left===t.rectangle.left&&n.rectangle.top===t.rectangle.top&&n.rectangle.height===t.rectangle.height&&n.rectangle.width===t.rectangle.width},lt=n=>o.pipe(st(Zn(),tt),jn,kn(ut("search/session",n)));var mt;!function(n){n.eform="eform",n.etype="etype",n.form="form",n.href="href",n.method="method",n.accepts="accepts",n.produces="produces",n.rel="rel",n.type="type",n.value="value"}(mt||(mt={}));const dt=n=>{switch(n.type){case"array":return n.value.map(dt);default:return n.value}},vt=n=>t=>w(st(Zn(),J(Vn(n.method))),jn,kn(ut(n.href,t))),ht=(n,t)=>{const r=_(n),e=x.concat(r,t);return Object.assign(Object.assign({},e),{width:n.width,height:n.height})},bt=(n,t)=>{switch(t.direction){case T.NorthEast:return((n,t)=>{const r=x.concat(_(n),{x:0,y:t.position.y});return Object.assign(Object.assign({},r),{width:n.width+t.position.x,height:n.height-t.position.y})})(n,t);case T.NorthWest:return((n,t)=>{const r=x.concat(_(n),t.position);return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height-t.position.y})})(n,t);case T.SouthEast:return((n,t)=>Object.assign(Object.assign({},n),{width:n.width+t.position.x,height:n.height+t.position.y}))(n,t);case T.SouthWest:return((n,t)=>{const r=x.concat(_(n),{x:t.position.x,y:0});return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height+t.position.y})})(n,t)}},It=n=>({x:0,y:0,width:n.width,height:n.height}),Rt=n=>Object.assign({x:n.left,y:n.top},n),wt=n=>t=>({x:t.x*n.width,y:t.y*n.height,width:t.width*n.width,height:t.height*n.height}),Ut=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var Ot;!function(n){n.desc="desc",n.eform="eform",n.enabled="enabled",n.etype="etype",n.form="form",n.label="label",n.max="max",n.maxlength="maxlength",n.maxsize="maxsize",n.min="min",n.minlength="minlength",n.minsize="minsize",n.mutable="mutable",n.name="name",n.options="options",n.pattern="pattern",n.placeholder="placeholder",n.required="required",n.secret="secret",n.type="type",n.value="value",n.visible="visible"}(Ot||(Ot={}));const gt=(n,t)=>{const r=new URLSearchParams(Object.entries(t));return[`${n.href}?${r.toString()}`,{method:"GET"}]},yt=(n,t)=>[n.href,{body:JSON.stringify(t),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],jt=(n,t={})=>r=>o.pipe(st(Zn(),o.pipe(((n,t)=>o.pipe(((n,t)=>{const r=n.map((n=>n.name)),e=Object.keys(t),u=r.filter((n=>!e.includes(n)));return 0===u.length?J(t):G(`Data should contains fields: ${u.join(", ")}`)})(n.value,t),K((t=>n.rel.includes("query-form")?gt(n,t):yt(n,t)))))(n,t),Z((n=>({kind:"app",inner:n}))))),jn,kn((n=>{const t=n[0],[e,u]=n[1];return ut(e,u)([t,r])}))),Mt=async n=>new Promise((t=>{const r=new FileReader;r.addEventListener("load",(()=>{t(r.result)})),r.readAsDataURL(n)})),Et=e.sequenceT(L.Apply);const _t=["jpg","jpeg","png","webp"],Pt={kind:"client",inner:"File format not supported"},kt=n=>{const t=n.type.split("/")[1],r=(e=r=>r===t?L.some(n):L.none,function(n){for(var t=0;t<n.length;t++){var r=e(n[t]);if("Some"===r._tag)return r}return U})(_t);var e;return o.pipe(r,Cn.fromOption((()=>Pt)))},xt={kind:"app",inner:"File doesnt exist"},Tt=n=>()=>new Promise((t=>{const r=new FileReader,e=new Image;r.onload=n=>{e.src=n.target.result},e.onload=()=>t(e),r.readAsDataURL(n)}));var zt=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.copy=void 0,t.copy=(n,t,r=0,e=0,u=n.width-r,o=n.height-e,i=0,c=0)=>{if(r|=0,e|=0,o|=0,i|=0,c|=0,(u|=0)<=0||o<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(t.data.buffer);for(let s=0;s<o;s++){const o=e+s;if(o<0||o>=n.height)continue;const p=c+s;if(!(p<0||p>=t.height))for(let e=0;e<u;e++){const u=r+e;if(u<0||u>=n.width)continue;const c=i+e;c<0||c>=t.width||(a[p*t.width+c]=f[o*n.width+u])}}}})),Nt=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CreateImageFactory=(n=[0,0,0,0],t=4)=>{if(t=Math.floor(t),isNaN(t)||t<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<t)throw TypeError(`fill should be iterable with at least ${t} members`);const r=(n=new Uint8ClampedArray(n).slice(0,t)).every((n=>0===n));return(e,u,o)=>{if(void 0===e||void 0===u)throw TypeError("Not enough arguments");if(e=Math.floor(e),u=Math.floor(u),isNaN(e)||e<1||isNaN(u)||u<1)throw TypeError("Index or size is negative or greater than the allowed amount");const i=e*u*t;if(void 0===o&&(o=new Uint8ClampedArray(i)),o instanceof Uint8ClampedArray){if(o.length!==i)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let r=0;r<u;r++)for(let u=0;u<e;u++){const i=(r*e+u)*t;for(let r=0;r<t;r++)o[i+r]=n[r]}return{get width(){return e},get height(){return u},get data(){return o}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory()})),At=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;const r=(n,t)=>{if(n<=-t||n>=t)return 0;if(0==n)return 0;const r=n*Math.PI;return Math.sin(r)/r*Math.sin(r/t)/(r/t)},e=n=>Math.round(16383*n);t.filters=(n,t,u,o,i)=>{const c=i?2:3,f=1/u,a=Math.min(1,u),s=c/a,p=Math.floor(2*(s+1)),l=new Int16Array((p+2)*t);let m=0;for(let u=0;u<t;u++){const i=(u+.5)*f+o,p=Math.max(0,Math.floor(i-s)),d=Math.min(n-1,Math.ceil(i+s)),v=d-p+1,h=new Float32Array(v),b=new Int16Array(v);let I=0,R=0;for(let n=p;n<=d;n++){const t=r((n+.5-i)*a,c);I+=t,h[R]=t,R++}let w=0;for(let n=0;n<h.length;n++){const t=h[n]/I;w+=t,b[n]=e(t)}b[t>>1]+=e(1-w);let U=0;for(;U<b.length&&0===b[U];)U++;let O=b.length-1;for(;O>0&&0===b[O];)O--;const g=O-U+1;l[m++]=p+U,l[m++]=g,l.set(b.subarray(U,O+1),m),m+=g}return l}})),Lt=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convolve=void 0,t.convolve=(n,t,r,e,u,o)=>{let i=0,c=0;for(let f=0;f<e;f++){let a=0;for(let r=0;r<u;r++){let r=i+4*o[a++]|0,u=0,f=0,s=0,p=0;for(let t=o[a++];t>0;t--){const t=o[a++];u=u+t*n[r]|0,f=f+t*n[r+1]|0,s=s+t*n[r+2]|0,p=p+t*n[r+3]|0,r=r+4|0}t[c]=u+8192>>14,t[c+1]=f+8192>>14,t[c+2]=s+8192>>14,t[c+3]=p+8192>>14,c=c+4*e|0}c=4*(f+1)|0,i=(f+1)*r*4|0}}})),Ct=r((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.lanczos2=t.lanczos=void 0;const r=(n,t,r=!1)=>{const e=t.height/n.height,u=At.filters(n.width,t.width,t.width/n.width,0,r),o=At.filters(n.height,t.height,e,0,r),i=new Uint8ClampedArray(t.width*n.height*4);Lt.convolve(n.data,i,n.width,n.height,t.width,u),Lt.convolve(i,t.data,n.height,t.width,t.height,o)};t.lanczos=(n,t,e=0,u=0,o=n.width-e,i=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,i|=0,c|=0,f|=0,a|=0,s|=0,(o|=0)<=0||i<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&o===n.width&&i===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t);const p=Nt.createImage(o,i),l=Nt.createImage(a,s);zt.copy(n,p,e,u),r(p,l),zt.copy(l,t,0,0,l.width,l.height,c,f)},t.lanczos2=(n,t,e=0,u=0,o=n.width-e,i=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,i|=0,c|=0,f|=0,a|=0,s|=0,(o|=0)<=0||i<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&o===n.width&&i===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t,!0);const p=Nt.createImage(o,i),l=Nt.createImage(a,s);zt.copy(n,p,e,u),r(p,l,!0),zt.copy(l,t,0,0,l.width,l.height,c,f)}}));const St=n=>({kind:"height",size:n}),qt=d.contramap((n=>n.size))(v.Ord),Ft=h.sort(qt),Dt=h.sort({equals:(n,t)=>n.kind===t.kind,compare:(n,t)=>n.kind===t.kind?0:"width"===n.kind?-1:1}),Wt=n=>t=>{const r=Ft(t),e=(n=>{const[t,r]=n;return t.size/r.size})(r),u=Object.assign(Object.assign({},r[0]),{size:n*e}),o=Object.assign(Object.assign({},r[1]),{size:n});return Dt([o,u])},Ht=n=>{const{naturalWidth:t,naturalHeight:r}=n;return[(e=t,{kind:"width",size:e}),St(r)];var e},$t=()=>{const n=document.createElement("canvas"),t=n.getContext("2d");return[n,t]},Gt=async n=>{const t=await fetch(n),r=await t.blob();return new File([r],"image",{type:r.type,lastModified:Date.now()})},Jt=n=>()=>new Promise((async t=>{const r=await fetch(n),e=await r.blob();t(new File([e],"image",{type:e.type,lastModified:Date.now()}))})),Bt=(n,t)=>n.naturalWidth>t?((n,t)=>{const r=Wt(n),[e,u]=$t(),o=Ht(t),[i,c]=r(o).map((n=>n.size)),f=new ImageData(i,c),a=(n=>{const{naturalWidth:t,naturalHeight:r}=n,[e,u]=$t();return e.width=t,e.height=r,u.drawImage(n,0,0),u.getImageData(0,0,t,r)})(t);return e.width=i,e.height=c,Ct.lanczos(a,f),u.putImageData(f,0,0),e.toDataURL()})(t,n):(n=>{const t=document.createElement("canvas"),{naturalWidth:r,naturalHeight:e}=n,u=t.getContext("2d");return t.width=r,t.height=e,u.drawImage(n,0,0,r,e),t.toDataURL()})(n),Kt=n=>w(n,at,K((n=>({headers:n})))),{state:Xt,onChange:Yt}=q({token:void 0,results:[],filters:[],resetCategoryLink:void 0,activeIonLink:void 0,cropperHandlers:[],selectedCropper:void 0,rectangleSearchForm:void 0,detectedObjects:[],detectedObject:void 0,objectDetectionInProgress:!1,imageWidth:500,image:L.none,imageUrl:L.none,imageBounds:L.none,searchArea:L.none,resultsComponents:[],serverError:!1,loading:!1}),Zt=async n=>{var t,r;Xt.results=n.value,Xt.filters=(r=dt(n.filters),Object.entries(r).map((([n,t])=>({name:n,filters:t})))),Xt.rectangleSearchForm=n.searchArea,Xt.resetCategoryLink=null===(t=n.links)||void 0===t?void 0:t.clearFilters,Xt.loading=!1},Qt=n=>w(Kt(Xt.token),jn,kn(vt(n))),Vt=async()=>{Xt.loading=!0,w(Et(Xt.imageBounds,Xt.searchArea),L.map((async([n,t])=>{const r=(e=n,n=>({x:n.x/e.width,y:n.y/e.height,width:n.width/e.width,height:n.height/e.height}))(t);var e;const u={width:r.width,height:r.height,left:r.x,top:r.y};return await w(Kt(Xt.token),jn,kn(jt(Xt.rectangleSearchForm,u)),Mn(Zt))()})))},nr=n=>{Xt.loading=!0;const t=(n=>{const t=new FormData;return t.append("image",n),t})(n);return w(st(at(Xt.token),J(t)),K((([n,t])=>({headers:n,body:t}))),jn,Pn(lt),Mn((n=>(Zt(n),(async n=>{Xt.objectDetectionInProgress=!0;const t={kind:"server",inner:"Can not get a link for objects detection"};var r,e,u;await w((r=n,e="detectedObjects",w(r.links,on,(u=n=>on(n[e]),function(n){return un(n)?tn:u(n.value)}))),zn((()=>t)),Pn(Qt),Mn((n=>Xt.detectedObjects=dt(n))))(),Xt.objectDetectionInProgress=!1})(n),Xt.loading=!1,n))),En((n=>(Xt.serverError=!0,Xt.loading=!1,n))))},tr=Xt;Yt("activeIonLink",(async n=>{Xt.loading=!0;const t=n||Xt.resetCategoryLink;await w(Kt(Xt.token),jn,kn(vt(t)),Mn(Zt),En((n=>({kind:"network error",inner:n}))))()})),Yt("searchArea",(n=>{w(n,L.map((n=>{var t;Xt.cropperHandlers=[{position:_(t=n),direction:T.NorthWest},{position:x.concat(_(t),{x:t.width,y:0}),direction:T.NorthEast},{position:x.concat(_(t),{x:0,y:t.height}),direction:T.SouthWest},{position:x.concat(_(t),{x:t.width,y:t.height}),direction:T.SouthEast}]})))})),Yt("serverError",(()=>{Xt.loading=!1}));const rr=n=>{tr.image=L.some(n),tr.imageUrl=L.some(n.src)},er=async n=>{const t=(n=>o.pipe(n,L.fromNullable,Cn.fromOption((()=>xt)),Cn.chain(kt)))(n),r=(500,n=>o.pipe(n,Tt,Wn.map((n=>Bt(n,500))),Wn.chain(Jt)));const e=w(t,jn,Nn(r)),u=await w(e,Pn(nr))();return w(st(u,t),K((([n,t])=>(async(n,t)=>{const r={image:await(async n=>({name:n.name,mediaType:n.type,value:await Mt(n)}))(t)},e=n.uploadHighResolutionImage;await w(Kt(Xt.token),jn,kn(jt(e,r)))()})(n,t)))),await w(e,Nn(Tt),Mn(rr))(),u};export{nt as A,H as B,Y as C,Cn as E,L as O,Hn as T,k as a,Vt as b,Rt as c,dt as d,wt as e,P as f,z as g,Ut as h,tr as i,pt as j,Gt as k,er as l,ht as m,nn as n,It as o,w as p,Ht as q,Wt as r,Et as s,bt as t,Jn as u,Gn as v,kn as w,ut as x,jn as y,Zn as z}
@@ -1,6 +0,0 @@
1
- :host {
2
- --color-primary-system: #0F62FE;
3
- --color-primary-hover-system: #014CDA;
4
- --color-icons-system: #2F8EDF;
5
- --spacer: 8px;
6
- }
@@ -1 +0,0 @@
1
- import{r as t,h as i,H as s,g as e}from"./p-2bf74c28.js";import{e as n}from"./p-3063e23a.js";import{d as r}from"./p-489aee23.js";let o=class{constructor(i){t(this,i),this.moveDirection="right",this.contentGroups=[],this.activeContentGroup=0,this.mode="modern",this.imageWidth=140,this.showScroll=!0,this.content=[],this.columns=0,this.resizeObserver=new ResizeObserver((()=>this.handleResize())),this.mutationObserver=new MutationObserver((()=>this.cloneSlottedContent()))}connectedCallback(){this.setItemWidth()}disconnectedCallback(){this.resizeObserver.disconnect()}componentDidRender(){this.setWidth(),this.processScrollbarWidth(),this.columns=this.getColumnsNumber();const t=this.el.querySelector("#slot");this.mutationObserver.observe(t,{subtree:!0,childList:!0})}getItemWidthFromDocument(){return parseInt(getComputedStyle(document.body).getPropertyValue("--vviinn-carousel-image-width"))}setItemWidth(){const t=this.getItemWidthFromDocument(),i=isNaN(t)?this.imageWidth:t;this.el.style.setProperty("--vviinn-carousel-image-width",`${i}px`)}getContentClassMap(){return{content:!0,[this.moveDirection]:!0,[this.mode]:!0}}handleResize(){this.setWidth(),this.processScrollbarWidth(),this.setItemWidth();const t=this.getColumnsNumber();t!==this.columns&&(this.renderContent(),this.columns=t)}calculateMoveStep(){const t=this.getContent().map((t=>t.getBoundingClientRect().width));return t.reduce(((t,i)=>t+i),0)/t.length}setWidth(){const t=this.el.offsetParent;if(!t)return;const i=getComputedStyle(t),s=t.getBoundingClientRect().width-(parseInt(i["padding-right"])+parseInt(i["padding-left"]));this.el.style.setProperty("--vviinn-carousel-content-width",`${s}px`)}cloneSlottedContent(){const t=this.el.querySelector("#slot"),i=Array.from(t.children);i.length>0&&(this.content=i,this.renderContent(),this.setWidth(),this.resizeObserver.observe(this.el.offsetParent),this.mutationObserver.disconnect())}renderContent(){const t="classic"===this.mode?n.chunksOf(this.getColumnsNumber())(this.content):this.content.reduce(((t,i)=>(t.append(i),t)),new DocumentFragment);"classic"===this.mode?this.renderGroup(t):this.renderLine(t)}renderGroup(t){const i=this.getColumnsNumber(),s=t.map((t=>{const s=document.createElement("div");return s.classList.add(...t.length<i?["items-group","incomplete"]:["items-group"]),t.reduce(((t,i)=>(t.append(i),t)),s)})).reduce(((t,i)=>(t.append(i),t)),new DocumentFragment);this.appendToContent(s),this.contentGroups=this.getContentGroups()}renderLine(t){this.appendToContent(t)}getActiveGroupIndex(){var t,i;if(!(null===(i=null===(t=this.getContentNode())||void 0===t?void 0:t.getBoundingClientRect())||void 0===i?void 0:i.left))return 0;const s=this.getContentGroups().map((t=>t.getBoundingClientRect().left)).map(((t,i)=>[t,i])).filter((t=>t[0]>=0));return s.length>0?s[0][1]:0}getContentNode(){return this.el.querySelector(".content")}getContent(){const t=this.getContentNode().children;return Array.from(t).map((t=>t))}getColumnsNumber(){const t=getComputedStyle(this.el).getPropertyValue("--vviinn-carousel-columns-internal");return parseInt(t)}getContentGroups(){return Array.from(this.el.querySelectorAll(".items-group"))}appendToContent(t){const i=this.getContentNode();i.innerHTML="",i.append(t)}showNext(){this.moveDirection="right";const t=this.getContentNode();requestAnimationFrame((()=>{t.scrollTo({top:0,left:t.scrollLeft+this.calculateMoveStep(),behavior:"smooth"})}))}showPrev(){this.moveDirection="left";const t=this.getContentNode();requestAnimationFrame((()=>{t.scrollTo({top:0,left:t.scrollLeft-this.calculateMoveStep(),behavior:"smooth"})}))}scroll(t){const i=this.getContentNode();requestAnimationFrame((()=>{i.scrollTo({top:0,left:this.calculateMoveStep()*t,behavior:"smooth"})}))}processScrollbarWidth(){const t=this.getContentNode();this.el.style.setProperty("--vviinn-progressbar-width",t.clientWidth*((t.scrollLeft+t.clientWidth)/t.scrollWidth)+"px"),this.activeContentGroup=this.getActiveGroupIndex()}showBullets(){return"classic"===this.mode&&this.showScroll}showScrollbar(){return"modern"===this.mode&&this.showScroll}getClassMap(){return{[this.mode]:!0,"show-scrollbar":this.showScrollbar()}}render(){return i(s,{class:this.getClassMap()},i("div",{class:"body"},i("button",{class:"prev",onClick:()=>this.showPrev()},i(r,null)),i("div",{class:this.getContentClassMap(),onScroll:()=>this.processScrollbarWidth()}),i("button",{class:"next",onClick:()=>this.showNext()},i(r,null))),this.showBullets()?i("div",{class:"bullets"},this.contentGroups.map(((t,i)=>i)).map((t=>i("div",{class:{bullet:!0,active:this.activeContentGroup===t},onClick:()=>this.scroll(t)})))):"",i("div",{id:"slot"},i("slot",null)))}get el(){return e(this)}};o.style=":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#E0E0E0;border-radius:50%}.bullet.active{background:#161616}:host(:not(.show-scrollbar)) .content{-ms-overflow-style:none;scrollbar-width:none;overflow:hidden}@media (max-width: 480px){:host(.modern) button{display:none}}.content{display:flex;flex-direction:row;grid-gap:8px;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-y:hidden;overflow-x:auto;flex-grow:1}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.modern) button{border-radius:2px}:host(.classic) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;min-width:100%;grid-template-columns:repeat(auto-fit, minmax(var(--vviinn-carousel-image-width, --vviinn-carousel-image-width-system), 1fr));align-items:center;justify-items:center;grid-gap:16px}.items-group.incomplete{grid-template-columns:repeat(auto-fit, minmax(var(--vviinn-carousel-image-width, --vviinn-carousel-image-width-system), 1fr))}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}";export{o as vviinn_carousel}
@@ -1 +0,0 @@
1
- import{r as t,h as i,H as s,g as e}from"./p-2bf74c28.js";import{_ as r}from"./p-3063e23a.js";import{p as a,w as d,x as n,y as o,z as c,A as h,B as l,C as p,v as u,T as m,E as v,i as g}from"./p-ddcac3f8.js";const f=r.flow((t=>`Bearer ${t}`),(t=>new Headers({Authorization:t})),(t=>({headers:t}))),y=l(p),x=(t,i={})=>a(y(c(),h),o,d(n(t,i))),R=t=>i=>x(`product/${t}/similar-products`,i),b=t=>i=>x(`product/${t}/cross-selling-products`,i);let w=class{constructor(i){t(this,i),this.blockTitle="Recommended products",this.imageRatio=1,this.imageWidth=300,this.currencySign="€",this.mode="modern",this.campaignType="VPR",this.locale="de-DE",this.showScroll=!0,this.recommendations=[],this.loaded=!1}handleProductIdChange(){this.getRecommendations()}connectedCallback(){u.apiPath=this.apiPath,u.currencySign=this.currencySign,u.locale=this.locale}async componentWillLoad(){u.pricePrefix=this.pricePrefix,u.currencySign=this.currencySign,this.getRecommendations()}async getRecommendations(){if(void 0===this.productId||void 0===this.token)return;const t=f(this.token),i=r.pipe(m.of(r.pipe("VPR"===this.campaignType?{_tag:"VPR"}:{_tag:"VCS"},(s=()=>R,e=()=>b,t=>(t=>"VPR"===t._tag)(t)?s():e()))),m.ap(m.of(this.productId)),m.ap(m.of(t)),m.flatten);var s,e;const a=await i();r.pipe(a,v.fold((t=>this.handleError(t)),(t=>this.handleRecommendationsSucces(t))))}handleError(t){console.log("ERROR:",t)}handleRecommendationsSucces(t){var i;this.recommendations=null!==(i=null==t?void 0:t.extended)&&void 0!==i?i:t,g.results=this.recommendations,this.loaded=!0}render(){return i(s,{class:{loaded:this.loaded,empty:0==this.recommendations.length,[this.mode]:!0},"aria-hidden":this.loaded?"false":"true"},i("style",null,u.fallbackStyles),i("h2",{part:"recommendations-title"},this.blockTitle),i("vviinn-carousel",{exportparts:"brand, currency, deeplink, image, type, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title, title: product-title",mode:this.mode,imageWidth:this.imageWidth,showScroll:this.showScroll},this.recommendations.map((t=>i("vviinn-product-card",{productId:t.productId,productTitle:t.title,image:t.image.thumbnail,brand:t.brand,imageWidth:this.imageWidth,imageRatio:this.imageRatio,price:t.price.actual,salePrice:t.price.sale,responsive:"classic"===this.mode,dimmedBackground:"modern"===this.mode,exportparts:"title"})))))}get el(){return e(this)}static get watchers(){return{productId:["handleProductIdChange"]}}};w.style=":host{display:grid;grid-gap:1rem;width:100%}:host(:not(.loaded)){position:absolute;visibility:hidden}:host(.classic) vviinn-product-card::part(image){border:1px solid #DDDDDD}vviinn-product-card::part(price-container){align-self:flex-start;text-align:left;display:flex}.results{display:grid;grid-gap:1rem}.visually-hidden{position:absolute;top:0;left:0;z-index:-1;height:0;width:0}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}:host(.classic) vviinn-product-card::part(price-container){align-self:center}:host(.modern) vviinn-product-card::part(title),:host(.modern) vviinn-product-card::part(brand),:host(.modern) vviinn-product-card::part(type){text-align:left;max-width:unset}";export{w as vviinn_vpr_widget}