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 +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 +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}
@@ -1 +0,0 @@
1
- const e={packageVersion:"1.1.2",packageName:"vviinn-widgets",environment:"local"};let t,n,l,o=!1,s=!1,c=!1,i=!1,r=null,a=!1;const f="undefined"!=typeof window?window:{},u=f.document||{head:{}},d={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},$=e=>Promise.resolve(e),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),h=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=e,c=m(t,o),i=y(n);d.ael(s,l,c,i),(t.o=t.o||[]).push((()=>d.rel(s,l,c,i)))}))},m=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){$e(e)}},y=e=>0!=(2&e),b=new WeakMap,w=e=>"sc-"+e.$,g={},v=e=>"object"==(e=typeof e)||"function"===e,k=(e,t,...n)=>{let l=null,o=null,s=!1,c=!1,i=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!v(l))&&(l+=""),s&&c?i[i.length-1].p+=l:i.push(s?j(null,l):l),c=s)};if(r(n),t){t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,i,O);const a=j(e,null);return a.h=t,i.length>0&&(a.m=i),a.g=o,a},j=(e,t)=>({t:0,v:e,p:t,k:null,m:null,h:null,g:null}),S={},O={forEach:(e,t)=>e.map(C).forEach(t),map:(e,t)=>e.map(C).map(t).map(M)},C=e=>({vattrs:e.h,vchildren:e.m,vkey:e.j,vname:e.g,vtag:e.v,vtext:e.p}),M=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),k(e.vtag,t,...e.vchildren||[])}const t=j(e.vtag,e.vtext);return t.h=e.vattrs,t.m=e.vchildren,t.j=e.vkey,t.g=e.vname,t},R=(e,t,n,l,o,s)=>{if(n!==l){let c=de(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,o=E(n),s=E(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if(c||"o"!==t[0]||"n"!==t[1]){const i=v(l);if((c||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&s||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):de(f,i)?i.slice(2):i[2]+t.slice(3),n&&d.rel(e,t,n,!1),l&&d.ael(e,t,l,!1)}},x=/\s/,E=e=>e?e.split(x):[],T=(e,t,n,l)=>{const o=11===t.k.nodeType&&t.k.host?t.k.host:t.k,s=e&&e.h||g,c=t.h||g;for(l in s)l in c||R(o,l,s[l],void 0,n,t.t);for(l in c)R(o,l,s[l],c[l],n,t.t)},L=(e,s,r,a)=>{let f,d,$,p=s.m[r],h=0;if(o||(c=!0,"slot"===p.v&&(t&&a.classList.add(t+"-s"),p.t|=p.m?2:1)),null!==p.p)f=p.k=u.createTextNode(p.p);else if(1&p.t)f=p.k=u.createTextNode("");else{if(i||(i="svg"===p.v),f=p.k=u.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&p.t?"slot-fb":p.v),i&&"foreignObject"===p.v&&(i=!1),T(null,p,i),null!=t&&f["s-si"]!==t&&f.classList.add(f["s-si"]=t),p.m)for(h=0;h<p.m.length;++h)d=L(e,p,h,f),d&&f.appendChild(d);"svg"===p.v?i=!1:"foreignObject"===f.tagName&&(i=!0)}return f["s-hn"]=l,3&p.t&&(f["s-sr"]=!0,f["s-cr"]=n,f["s-sn"]=p.g||"",$=e&&e.m&&e.m[r],$&&$.v===p.v&&e.k&&P(e.k,!1)),f},P=(e,t)=>{d.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==l&&o["s-ol"]&&(F(o).insertBefore(o,D(o)),o["s-ol"].remove(),o["s-ol"]=void 0,c=!0),t&&P(o,t)}d.t&=-2},N=(e,t,n,o,s,c)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===l&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=L(null,n,s,e),i&&(o[s].k=i,r.insertBefore(i,D(t))))},W=(e,t,n,l,o)=>{for(;t<=n;++t)(l=e[t])&&(s=!0,(o=l.k)["s-ol"]?o["s-ol"].remove():P(o,!0),o.remove())},A=(e,t)=>e.v===t.v&&("slot"!==e.v||e.g===t.g),D=e=>e&&e["s-ol"]||e,F=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,H=(e,t)=>{const n=t.k=e.k,l=e.m,o=t.m,s=t.v,c=t.p;let r;null===c?(i="svg"===s||"foreignObject"!==s&&i,"slot"===s||T(e,t,i),null!==l&&null!==o?((e,t,n,l)=>{let o,s=0,c=0,i=t.length-1,r=t[0],a=t[i],f=l.length-1,u=l[0],d=l[f];for(;s<=i&&c<=f;)null==r?r=t[++s]:null==a?a=t[--i]:null==u?u=l[++c]:null==d?d=l[--f]:A(r,u)?(H(r,u),r=t[++s],u=l[++c]):A(a,d)?(H(a,d),a=t[--i],d=l[--f]):A(r,d)?("slot"!==r.v&&"slot"!==d.v||P(r.k.parentNode,!1),H(r,d),e.insertBefore(r.k,a.k.nextSibling),r=t[++s],d=l[--f]):A(a,u)?("slot"!==r.v&&"slot"!==d.v||P(a.k.parentNode,!1),H(a,u),e.insertBefore(a.k,r.k),a=t[--i],u=l[++c]):(o=L(t&&t[c],n,c,e),u=l[++c],o&&F(r.k).insertBefore(o,D(r.k)));s>i?N(e,null==l[f+1]?null:l[f+1].k,n,l,c,f):c>f&&W(t,s,i)})(n,l,t,o):null!==o?(null!==e.p&&(n.textContent=""),N(n,null,t,o,0,o.length-1)):null!==l&&W(l,0,l.length-1),i&&"svg"===s&&(i=!1)):(r=n["s-cr"])?r.parentNode.textContent=c:e.p!==c&&(n.data=c)},U=e=>{let t,n,l,o,s,c,i=e.childNodes;for(n=0,l=i.length;n<l;n++)if(t=i[n],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<l;o++)if(c=i[o].nodeType,i[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===c&&s===i[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===c||3===c&&""!==i[o].textContent.trim()){t.hidden=!0;break}U(t)}},V=[],q=e=>{let t,n,l,o,c,i,r=0,a=e.childNodes,f=a.length;for(;r<f;r++){if(t=a[r],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,o=t["s-sn"],i=l.length-1;i>=0;i--)n=l[i],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(_(n,o)?(c=V.find((e=>e.S===n)),s=!0,n["s-sn"]=n["s-sn"]||o,c?c.O=t:V.push({O:t,S:n}),n["s-sr"]&&V.map((e=>{_(e.S,n["s-sn"])&&(c=V.find((e=>e.S===n)),c&&!e.O&&(e.O=c.O))}))):V.some((e=>e.S===n))||V.push({S:n}));1===t.nodeType&&q(t)}},_=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,z=e=>ae(e).C,B=(e,t,n)=>{const l=z(e);return{emit:e=>G(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},G=(e,t,n)=>{const l=d.ce(t,n);return e.dispatchEvent(l),l},I=(e,t)=>{t&&!e.M&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.M=t)))},J=(e,t)=>{if(e.t|=16,!(4&e.t))return I(e,e.R),je((()=>K(e,t)));e.t|=512},K=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>ne(n,e,t))),e.u=null),l=ne(n,"componentWillLoad")),le(l,(()=>Q(e,n,t)))},Q=async(e,t,n)=>{const l=e.C,o=l["s-rc"];n&&(e=>{const t=e.T,n=e.C,l=t.t,o=((e,t)=>{let n=w(t),l=me.get(n);if(e=11===e.nodeType?e:u,l)if("string"==typeof l){let t,o=b.get(e=e.head||e);o||b.set(e,o=new Set),o.has(n)||(t=u.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);X(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>Z(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},X=(e,i)=>{try{r=i,i=i.render(),e.t&=-17,e.t|=2,((e,i)=>{const r=e.C,a=e.T,f=e.L||j(null,null),$=(e=>e&&e.v===S)(i)?i:k(null,null,i);if(l=r.tagName,a.P&&($.h=$.h||{},a.P.map((([e,t])=>$.h[t]=r[e]))),$.v=null,$.t|=4,e.L=$,$.k=f.k=r.shadowRoot||r,t=r["s-sc"],n=r["s-cr"],o=0!=(1&a.t),s=!1,H(f,$),d.t|=1,c){let e,t,n,l,o,s;q($.k);let c=0;for(;c<V.length;c++)e=V[c],t=e.S,t["s-ol"]||(n=u.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(c=0;c<V.length;c++)if(e=V[c],t=e.S,e.O){for(l=e.O.parentNode,o=e.O.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}s&&U($.k),d.t&=-2,V.length=0})(e,i)}catch(t){$e(t,e.C)}return r=null,null},Y=()=>r,Z=e=>{const t=e.C,n=e.i,l=e.R;ne(n,"componentDidRender"),64&e.t||(e.t|=64,oe(t),ne(n,"componentDidLoad"),e.N(t),l||te()),e.M&&(e.M(),e.M=void 0),512&e.t&&ke((()=>J(e,!1))),e.t&=-517},ee=e=>{{const t=ae(e),n=t.C.isConnected;return n&&2==(18&t.t)&&J(t,!1),n}},te=()=>{oe(u.documentElement),ke((()=>G(f,"appload",{detail:{namespace:"vviinn-widgets"}})))},ne=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){$e(e)}},le=(e,t)=>e&&e.then?e.then(t):t(),oe=e=>e.classList.add("hydrated"),se=(e,t,n)=>{if(t.W){e.watchers&&(t.A=e.watchers);const l=Object.entries(t.W),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>ae(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=ae(e),s=o.C,c=o.D.get(t),i=o.t,r=o.i;if(n=((e,t)=>null==e||v(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),!(8&i&&void 0!==c||n===c)&&(o.D.set(t,n),r)){if(l.A&&128&i){const e=l.A[t];e&&e.map((e=>{try{r[e](n,c,t)}catch(e){$e(e,s)}}))}2==(18&i)&&J(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){d.jmp((()=>{const t=n.get(e);this.hasOwnProperty(t)&&(l=this[t],delete this[t]),this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.P.push([e,o]),o}))}}return e},ce=e=>{ne(e,"connectedCallback")},ie=(e,t={})=>{const n=[],l=t.exclude||[],o=f.customElements,s=u.head,c=s.querySelector("meta[charset]"),i=u.createElement("style"),r=[];let a,$=!0;Object.assign(d,t),d.l=new URL(t.resourcesUrl||"./",u.baseURI).href,e.map((e=>e[1].map((t=>{const s={t:t[0],$:t[1],W:t[2],F:t[3]};s.W=t[2],s.F=t[3],s.P=[],s.A={};const c=s.$,i=class extends HTMLElement{constructor(e){super(e),ue(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){a&&(clearTimeout(a),a=null),$?r.push(this):d.jmp((()=>(e=>{if(0==(1&d.t)){const t=ae(e),n=t.T,l=()=>{};if(1&t.t)h(e,t,n.F),ce(t.i);else{t.t|=1,12&n.t&&(e=>{const t=e["s-cr"]=u.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){I(t,t.R=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=he(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.A=o.watchers,se(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){$e(e)}t.t&=-9,t.t|=128,e(),ce(t.i)}if(o.style){let e=o.style;const t=w(n);if(!me.has(t)){const l=()=>{};((e,t,n)=>{let l=me.get(e);p&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,me.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.R,c=()=>J(t,!0);s&&s["s-rc"]?s["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){d.jmp((()=>(()=>{if(0==(1&d.t)){const e=ae(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),ne(t,"disconnectedCallback")}})()))}componentOnReady(){return ae(this).H}};s.U=e[0],l.includes(c)||o.get(c)||(n.push(c),o.define(c,se(i,s,1)))})))),i.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),s.insertBefore(i,c?c.nextSibling:s.firstChild),$=!1,r.length?r.map((e=>e.connectedCallback())):d.jmp((()=>a=setTimeout(te,30)))},re=new WeakMap,ae=e=>re.get(e),fe=(e,t)=>re.set(t.i=e,t),ue=(e,t)=>{const n={t:0,C:e,T:t,D:new Map};return n.H=new Promise((e=>n.N=e)),e["s-p"]=[],e["s-rc"]=[],h(e,n,t.F),re.set(e,n)},de=(e,t)=>t in e,$e=(e,t)=>(0,console.error)(e,t),pe=new Map,he=e=>{const t=e.$.replace(/-/g,"_"),n=e.U,l=pe.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(pe.set(n,e),e[t])),$e)},me=new Map,ye=[],be=[],we=(e,t)=>n=>{e.push(n),a||(a=!0,t&&4&d.t?ke(ve):d.raf(ve))},ge=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){$e(e)}e.length=0},ve=()=>{ge(ye),ge(be),(a=ye.length>0)&&d.raf(ve)},ke=e=>$().then(e),je=we(be,!0);export{e as E,S as H,Y as a,ie as b,B as c,ee as f,z as g,k as h,$ as p,fe as r}
@@ -1 +0,0 @@
1
- var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(n,r,t){return n(t={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},t.exports),t.exports}var t=r((function(n,r){function t(n){return n}function u(n){return function(){return n}}function e(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return r(n.apply(this,arguments))};case 3:return function(){return t(r(n.apply(this,arguments)))};case 4:return function(){return u(t(r(n.apply(this,arguments))))};case 5:return function(){return e(u(t(r(n.apply(this,arguments)))))};case 6:return function(){return o(e(u(t(r(n.apply(this,arguments))))))};case 7:return function(){return i(o(e(u(t(r(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(e(u(t(r(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(e(u(t(r(n.apply(this,arguments)))))))))}}}function o(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(r,"__esModule",{value:!0}),r.getEndomorphismMonoid=r.not=r.SK=r.hole=r.pipe=r.untupled=r.tupled=r.absurd=r.decrement=r.increment=r.tuple=r.flow=r.flip=r.constVoid=r.constUndefined=r.constNull=r.constFalse=r.constTrue=r.constant=r.unsafeCoerce=r.identity=r.apply=r.getRing=r.getSemiring=r.getMonoid=r.getSemigroup=r.getBooleanAlgebra=void 0,r.getBooleanAlgebra=function(n){return function(){return{meet:function(r,t){return function(u){return n.meet(r(u),t(u))}},join:function(r,t){return function(u){return n.join(r(u),t(u))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(r,t){return function(u){return n.implies(r(u),t(u))}},not:function(r){return function(t){return n.not(r(t))}}}}},r.getSemigroup=function(n){return function(){return{concat:function(r,t){return function(u){return n.concat(r(u),t(u))}}}}},r.getMonoid=function(n){var t=r.getSemigroup(n);return function(){return{concat:t().concat,empty:function(){return n.empty}}}},r.getSemiring=function(n){return{add:function(r,t){return function(u){return n.add(r(u),t(u))}},zero:function(){return n.zero},mul:function(r,t){return function(u){return n.mul(r(u),t(u))}},one:function(){return n.one}}},r.getRing=function(n){var t=r.getSemiring(n);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(r,t){return function(u){return n.sub(r(u),t(u))}}}},r.apply=function(n){return function(r){return r(n)}},r.identity=t,r.unsafeCoerce=t,r.constant=u,r.constTrue=u(!0),r.constFalse=u(!1),r.constNull=u(null),r.constUndefined=u(void 0),r.constVoid=r.constUndefined,r.flip=function(n){return function(r,t){return n(t,r)}},r.flow=e,r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n},r.increment=function(n){return n+1},r.decrement=function(n){return n-1},r.absurd=o,r.tupled=function(n){return function(r){return n.apply(void 0,r)}},r.untupled=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return n(r)}},r.pipe=function(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}},r.hole=o,r.SK=function(n,r){return r},r.not=function(n){return function(r){return!n(r)}},r.getEndomorphismMonoid=function(){return{concat:function(n,r){return e(n,r)},empty:t}}})),u=r((function(n,r){function u(n,r,t){return function(e){for(var o=Array(t.length+1),i=0;i<t.length;i++)o[i]=t[i];return o[t.length]=e,0===r?n.apply(null,o):u(n,r-1,o)}}Object.defineProperty(r,"__esModule",{value:!0}),r.sequenceS=r.sequenceT=r.getApplySemigroup=r.apS=r.apSecond=r.apFirst=r.ap=void 0,r.ap=function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}},r.apFirst=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(n){return function(){return n}})),r)}}},r.apSecond=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(){return function(n){return n}})),r)}}},r.apS=function(n){return function(r,t){return function(u){return n.ap(n.map(u,(function(n){return function(t){var u;return Object.assign({},n,((u={})[r]=t,u))}})),t)}}},r.getApplySemigroup=function(n){return function(r){return{concat:function(t,u){return n.ap(n.map(t,(function(n){return function(t){return r.concat(n,t)}})),u)}}}};var e={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};function o(n){return e.hasOwnProperty(n)||(e[n]=u(t.tuple,n-1,[])),e[n]}r.sequenceT=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,e=o(u),i=n.map(r[0],e),c=1;c<u;c++)i=n.ap(i,r[c]);return i}},r.sequenceS=function(n){return function(r){for(var t=Object.keys(r),e=t.length,o=function(n){var r=n.length;switch(r){case 1:return function(r){var t;return(t={})[n[0]]=r,t};case 2:return function(r){return function(t){var u;return(u={})[n[0]]=r,u[n[1]]=t,u}};case 3:return function(r){return function(t){return function(u){var e;return(e={})[n[0]]=r,e[n[1]]=t,e[n[2]]=u,e}}};case 4:return function(r){return function(t){return function(u){return function(e){var o;return(o={})[n[0]]=r,o[n[1]]=t,o[n[2]]=u,o[n[3]]=e,o}}}};case 5:return function(r){return function(t){return function(u){return function(e){return function(o){var i;return(i={})[n[0]]=r,i[n[1]]=t,i[n[2]]=u,i[n[3]]=e,i[n[4]]=o,i}}}}};default:return u((function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];for(var e={},o=0;o<r;o++)e[n[o]]=t[o];return e}),r-1,[])}}(t),i=n.map(r[t[0]],o),c=1;c<e;c++)i=n.ap(i,r[t[c]]);return i}}})),e=r((function(n,r){function u(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFunctorComposition=r.bindTo=r.flap=r.map=void 0,r.map=u,r.flap=function(n){return function(r){return function(t){return n.map(t,(function(n){return n(r)}))}}},r.bindTo=function(n){return function(r){return function(t){return n.map(t,(function(n){var t;return(t={})[r]=n,t}))}}},r.getFunctorComposition=function(n,r){var e=u(n,r);return{map:function(n,r){return t.pipe(n,e(r))}}}})),o=r((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bind=r.chainFirst=void 0,r.chainFirst=function(n){return function(r){return function(t){return n.chain(t,(function(t){return n.map(r(t),(function(){return t}))}))}}},r.bind=function(n){return function(r,t){return function(u){return n.chain(u,(function(u){return n.map(t(u),(function(n){var t;return Object.assign({},u,((t={})[r]=n,t))}))}))}}}})),i=r((function(r,t){var u=n&&n.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadonlyNonEmptyArray=t.has=t.emptyRecord=t.emptyReadonlyArray=t.tail=t.head=t.isNonEmpty=t.singleton=t.right=t.left=t.isRight=t.isLeft=t.some=t.none=t.isSome=t.isNone=void 0,t.isNone=function(n){return"None"===n._tag},t.isSome=function(n){return"Some"===n._tag},t.none={_tag:"None"},t.some=function(n){return{_tag:"Some",value:n}},t.isLeft=function(n){return"Left"===n._tag},t.isRight=function(n){return"Right"===n._tag},t.left=function(n){return{_tag:"Left",left:n}},t.right=function(n){return{_tag:"Right",right:n}},t.singleton=function(n){return[n]},t.isNonEmpty=function(n){return n.length>0},t.head=function(n){return n[0]},t.tail=function(n){return n.slice(1)},t.emptyReadonlyArray=[],t.emptyRecord={},t.has=Object.prototype.hasOwnProperty,t.fromReadonlyNonEmptyArray=function(n){return u([n[0]],n.slice(1))}})),c=r((function(r,u){var e=n&&n.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),o=n&&n.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),c=n&&n.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&e(r,n,t);return o(r,n),r};Object.defineProperty(u,"__esModule",{value:!0}),u.filterOrElse=u.chainEitherK=u.fromEitherK=u.chainOptionK=u.fromOptionK=u.fromPredicate=u.fromOption=void 0;var f=c(i);function a(n){return function(r){return function(t){return n.fromEither(f.isNone(t)?f.left(r()):f.right(t.value))}}}function v(n){var r=a(n);return function(n){var u=r(n);return function(n){return t.flow(n,u)}}}function d(n){return function(r){return t.flow(r,n.fromEither)}}u.fromOption=a,u.fromPredicate=function(n){return function(r,t){return function(u){return n.fromEither(r(u)?f.right(u):f.left(t(u)))}}},u.fromOptionK=v,u.chainOptionK=function(n,r){var t=v(n);return function(n){var u=t(n);return function(n){return function(t){return r.chain(t,u(n))}}}},u.fromEitherK=d,u.chainEitherK=function(n,r){var t=d(n);return function(n){return function(u){return r.chain(u,t(n))}}},u.filterOrElse=function(n,r){return function(t,u){return function(e){return r.chain(e,(function(r){return n.fromEither(t(r)?f.right(r):f.left(u(r)))}))}}}})),f=r((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.concatAll=r.endo=r.filterSecond=r.filterFirst=r.reverse=void 0,r.reverse=function(n){return{concat:function(r,t){return n.concat(t,r)}}},r.filterFirst=function(n){return function(r){return{concat:function(t,u){return n(t)?r.concat(t,u):u}}}},r.filterSecond=function(n){return function(r){return{concat:function(t,u){return n(u)?r.concat(t,u):t}}}},r.endo=function(n){return function(r){return{concat:function(t,u){return r.concat(n(t),n(u))}}}},r.concatAll=function(n){return function(r){return function(t){return t.reduce((function(r,t){return n.concat(r,t)}),r)}}}})),a=r((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.eqDate=r.eqNumber=r.eqString=r.eqBoolean=r.eq=r.strictEqual=r.getStructEq=r.getTupleEq=r.Contravariant=r.getMonoid=r.getSemigroup=r.eqStrict=r.URI=r.contramap=r.tuple=r.struct=r.fromEquals=void 0,r.fromEquals=function(n){return{equals:function(r,t){return r===t||n(r,t)}}},r.struct=function(n){return r.fromEquals((function(r,t){for(var u in n)if(!n[u].equals(r[u],t[u]))return!1;return!0}))},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r.fromEquals((function(r,t){return n.every((function(n,u){return n.equals(r[u],t[u])}))}))},r.contramap=function(n){return function(t){return r.fromEquals((function(r,u){return t.equals(n(r),n(u))}))}},r.URI="Eq",r.eqStrict={equals:function(n,r){return n===r}};var u={equals:function(){return!0}};r.getSemigroup=function(){return{concat:function(n,t){return r.fromEquals((function(r,u){return n.equals(r,u)&&t.equals(r,u)}))}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:u}},r.Contravariant={URI:r.URI,contramap:function(n,u){return t.pipe(n,r.contramap(u))}},r.getTupleEq=r.tuple,r.getStructEq=r.struct,r.strictEqual=r.eqStrict.equals,r.eq=r.Contravariant,r.eqBoolean=r.eqStrict,r.eqString=r.eqStrict,r.eqNumber=r.eqStrict,r.eqDate={equals:function(n,r){return n.valueOf()===r.valueOf()}}})),v=r((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ordDate=r.ordNumber=r.ordString=r.ordBoolean=r.ord=r.getDualOrd=r.getTupleOrd=r.between=r.clamp=r.max=r.min=r.geq=r.leq=r.gt=r.lt=r.equals=r.trivial=r.Contravariant=r.getMonoid=r.getSemigroup=r.URI=r.contramap=r.reverse=r.tuple=r.fromCompare=r.equalsDefault=void 0,r.equalsDefault=function(n){return function(r,t){return r===t||0===n(r,t)}},r.fromCompare=function(n){return{equals:r.equalsDefault(n),compare:function(r,t){return r===t?0:n(r,t)}}},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r.fromCompare((function(r,t){for(var u=0;u<n.length-1;u++){var e=n[u].compare(r[u],t[u]);if(0!==e)return e}return n[u].compare(r[u],t[u])}))},r.reverse=function(n){return r.fromCompare((function(r,t){return n.compare(t,r)}))},r.contramap=function(n){return function(t){return r.fromCompare((function(r,u){return t.compare(n(r),n(u))}))}},r.URI="Ord",r.getSemigroup=function(){return{concat:function(n,t){return r.fromCompare((function(r,u){var e=n.compare(r,u);return 0!==e?e:t.compare(r,u)}))}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:r.fromCompare((function(){return 0}))}},r.Contravariant={URI:r.URI,contramap:function(n,u){return t.pipe(n,r.contramap(u))}},r.trivial={equals:t.constTrue,compare:t.constant(0)},r.equals=function(n){return function(r){return function(t){return t===r||0===n.compare(t,r)}}},r.lt=function(n){return function(r,t){return-1===n.compare(r,t)}},r.gt=function(n){return function(r,t){return 1===n.compare(r,t)}},r.leq=function(n){return function(r,t){return 1!==n.compare(r,t)}},r.geq=function(n){return function(r,t){return-1!==n.compare(r,t)}},r.min=function(n){return function(r,t){return r===t||n.compare(r,t)<1?r:t}},r.max=function(n){return function(r,t){return r===t||n.compare(r,t)>-1?r:t}},r.clamp=function(n){var t=r.min(n),u=r.max(n);return function(n,r){return function(e){return u(t(e,r),n)}}},r.between=function(n){var t=r.lt(n),u=r.gt(n);return function(n,r){return function(e){return!t(e,n)&&!u(e,r)}}},r.getTupleOrd=r.tuple,r.getDualOrd=r.reverse,r.ord=r.Contravariant;var u={equals:a.eqStrict.equals,compare:function(n,r){return n<r?-1:n>r?1:0}};r.ordBoolean=u,r.ordString=u,r.ordNumber=u,r.ordDate=t.pipe(r.ordNumber,r.contramap((function(n){return n.valueOf()})))})),d=r((function(r,u){var e=n&&n.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),o=n&&n.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),c=n&&n.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&e(r,n,t);return o(r,n),r};Object.defineProperty(u,"__esModule",{value:!0}),u.semigroupProduct=u.semigroupSum=u.semigroupString=u.getFunctionSemigroup=u.semigroupAny=u.semigroupAll=u.fold=u.getIntercalateSemigroup=u.getMeetSemigroup=u.getJoinSemigroup=u.getDualSemigroup=u.getStructSemigroup=u.getTupleSemigroup=u.getFirstSemigroup=u.getLastSemigroup=u.getObjectSemigroup=u.semigroupVoid=u.concatAll=u.last=u.first=u.intercalate=u.tuple=u.struct=u.reverse=u.constant=u.max=u.min=void 0;var a=c(i),d=c(f),p=c(v);u.min=function(n){return{concat:p.min(n)}},u.max=function(n){return{concat:p.max(n)}},u.constant=function(n){return{concat:function(){return n}}},u.reverse=d.reverse,u.struct=function(n){return{concat:function(r,t){var u={};for(var e in n)a.has.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},u.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{concat:function(r,t){return n.map((function(n,u){return n.concat(r[u],t[u])}))}}},u.intercalate=function(n){return function(r){return{concat:function(t,u){return r.concat(t,r.concat(n,u))}}}},u.first=function(){return{concat:t.identity}},u.last=function(){return{concat:function(n,r){return r}}},u.concatAll=d.concatAll,u.semigroupVoid=u.constant(void 0),u.getObjectSemigroup=function(){return{concat:function(n,r){return Object.assign({},n,r)}}},u.getLastSemigroup=u.last,u.getFirstSemigroup=u.first,u.getTupleSemigroup=u.tuple,u.getStructSemigroup=u.struct,u.getDualSemigroup=u.reverse,u.getJoinSemigroup=u.max,u.getMeetSemigroup=u.min,u.getIntercalateSemigroup=u.intercalate,u.fold=function(n){var r=u.concatAll(n);return function(n,t){return void 0===t?r(n):r(n)(t)}},u.semigroupAll={concat:function(n,r){return n&&r}},u.semigroupAny={concat:function(n,r){return n||r}},u.getFunctionSemigroup=t.getSemigroup,u.semigroupString={concat:function(n,r){return n+r}},u.semigroupSum={concat:function(n,r){return n+r}},u.semigroupProduct={concat:function(n,r){return n*r}}})),p=r((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.right=r.left=r.flap=r.Functor=r.Bifunctor=r.URI=r.bimap=r.mapLeft=r.map=r.separated=void 0,r.separated=function(n,r){return{left:n,right:r}},r.map=function(n){return function(t){return r.separated(r.left(t),n(r.right(t)))}},r.mapLeft=function(n){return function(t){return r.separated(n(r.left(t)),r.right(t))}},r.bimap=function(n,t){return function(u){return r.separated(n(r.left(u)),t(r.right(u)))}},r.URI="Separated",r.Bifunctor={URI:r.URI,mapLeft:function(n,u){return t.pipe(n,r.mapLeft(u))},bimap:function(n,u,e){return t.pipe(n,r.bimap(u,e))}},r.Functor={URI:r.URI,map:function(n,u){return t.pipe(n,r.map(u))}},r.flap=e.flap(r.Functor),r.left=function(n){return n.left},r.right=function(n){return n.right}})),l=r((function(r,t){var u=n&&n.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),e=n&&n.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),o=n&&n.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return e(r,n),r};Object.defineProperty(t,"__esModule",{value:!0}),t.filterE=t.witherDefault=t.wiltDefault=void 0;var c=o(i);t.wiltDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.separate)}}},t.witherDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.compact)}}},t.filterE=function(n){return function(r){var t=n.wither(r);return function(n){return function(u){return t(u,(function(t){return r.map(n(t),(function(n){return n?c.some(t):c.none}))}))}}}}})),h=r((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.guard=void 0,r.guard=function(n,r){return function(t){return t?r.of(void 0):n.zero()}}})),I=r((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Field=r.MonoidProduct=r.MonoidSum=r.SemigroupProduct=r.SemigroupSum=r.MagmaSub=r.Show=r.Bounded=r.Ord=r.Eq=r.isNumber=void 0,r.isNumber=function(n){return"number"==typeof n},r.Eq={equals:function(n,r){return n===r}},r.Ord={equals:r.Eq.equals,compare:function(n,r){return n<r?-1:n>r?1:0}},r.Bounded={equals:r.Eq.equals,compare:r.Ord.compare,top:1/0,bottom:-1/0},r.Show={show:function(n){return JSON.stringify(n)}},r.MagmaSub={concat:function(n,r){return n-r}},r.SemigroupSum={concat:function(n,r){return n+r}},r.SemigroupProduct={concat:function(n,r){return n*r}},r.MonoidSum={concat:r.SemigroupSum.concat,empty:0},r.MonoidProduct={concat:r.SemigroupProduct.concat,empty:1},r.Field={add:r.SemigroupSum.concat,zero:0,mul:r.SemigroupProduct.concat,one:1,sub:r.MagmaSub.concat,degree:function(){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}})),s=r((function(r,c){var f=n&&n.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),p=n&&n.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),l=n&&n.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&f(r,n,t);return p(r,n),r},h=n&&n.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(c,"__esModule",{value:!0}),c.reduceRight=c.foldMap=c.reduce=c.mapWithIndex=c.map=c.flatten=c.duplicate=c.extend=c.chain=c.ap=c.alt=c.altW=c.of=c.chunksOf=c.splitAt=c.chop=c.chainWithIndex=c.intersperse=c.prependAll=c.unzip=c.zip=c.zipWith=c.modifyAt=c.updateAt=c.sort=c.groupBy=c.group=c.reverse=c.concat=c.concatW=c.fromArray=c.unappend=c.unprepend=c.range=c.replicate=c.makeBy=c.fromReadonlyArray=c.rotate=c.union=c.sortBy=c.uniq=c.unsafeUpdateAt=c.unsafeInsertAt=c.append=c.appendW=c.prepend=c.prependW=c.isOutOfBound=c.isNonEmpty=c.empty=void 0,c.uncons=c.filterWithIndex=c.filter=c.groupSort=c.updateLast=c.modifyLast=c.updateHead=c.modifyHead=c.matchRight=c.matchLeft=c.concatAll=c.max=c.min=c.init=c.last=c.tail=c.head=c.apS=c.bind=c.bindTo=c.Do=c.Comonad=c.Alt=c.TraversableWithIndex=c.Traversable=c.FoldableWithIndex=c.Foldable=c.Monad=c.chainFirst=c.Chain=c.Applicative=c.apSecond=c.apFirst=c.Apply=c.FunctorWithIndex=c.Pointed=c.flap=c.Functor=c.getUnionSemigroup=c.getEq=c.getSemigroup=c.getShow=c.URI=c.extract=c.traverseWithIndex=c.sequence=c.traverse=c.reduceRightWithIndex=c.foldMapWithIndex=c.reduceWithIndex=void 0,c.readonlyNonEmptyArray=c.fold=c.prependToAll=c.insertAt=c.snoc=c.cons=c.unsnoc=void 0;var I=l(i),s=l(d);function m(n){return function(r){return r.concat(n)}}function R(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function M(n){return function(r){var t=r.length;if(0===t)return c.empty;for(var u=[],e=r[0],o=[e],i=1;i<t;i++){var f=r[i];n.equals(f,e)?o.push(f):(u.push(o),o=[e=f])}return u.push(o),u}}c.empty=I.emptyReadonlyArray,c.isNonEmpty=I.isNonEmpty,c.isOutOfBound=function(n,r){return n<0||n>=r.length},c.prependW=function(n){return function(r){return h([n],r)}},c.prepend=c.prependW,c.appendW=function(n){return function(r){return h(h([],r),[n])}},c.append=c.appendW,c.unsafeInsertAt=function(n,r,t){if(c.isNonEmpty(t)){var u=I.fromReadonlyNonEmptyArray(t);return u.splice(n,0,r),u}return[r]},c.unsafeUpdateAt=function(n,r,t){if(t[n]===r)return t;var u=I.fromReadonlyNonEmptyArray(t);return u[n]=r,u},c.uniq=function(n){return function(r){if(1===r.length)return r;for(var t=[c.head(r)],u=function(r){t.every((function(t){return!n.equals(t,r)}))&&t.push(r)},e=0,o=c.tail(r);e<o.length;e++)u(o[e]);return t}},c.sortBy=function(n){if(c.isNonEmpty(n)){var r=v.getMonoid();return c.sort(n.reduce(r.concat,r.empty))}return t.identity},c.union=function(n){var r=c.uniq(n);return function(n){return function(u){return r(t.pipe(u,R(n)))}}},c.rotate=function(n){return function(r){var u=r.length,e=Math.round(n)%u;if(c.isOutOfBound(Math.abs(e),r)||0===e)return r;if(e<0){var o=c.splitAt(-e)(r);return t.pipe(o[1],R(o[0]))}return c.rotate(e-u)(r)}},c.fromReadonlyArray=function(n){return c.isNonEmpty(n)?I.some(n):I.none},c.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},c.replicate=function(n){return c.makeBy((function(){return n}))},c.range=function(n,r){return n<=r?c.makeBy((function(r){return n+r}))(r-n+1):[n]},c.unprepend=function(n){return[c.head(n),c.tail(n)]},c.unappend=function(n){return[c.init(n),c.last(n)]},c.fromArray=function(n){return c.fromReadonlyArray(n.slice())},c.concatW=m,c.concat=R,c.reverse=function(n){return 1===n.length?n:h([c.last(n)],n.slice(0,-1).reverse())},c.group=M,c.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);t.hasOwnProperty(i)?t[i].push(o):t[i]=[o]}return t}},c.sort=function(n){return function(r){return 1===r.length?r:r.slice().sort(n.compare)}},c.updateAt=function(n,r){return c.modifyAt(n,(function(){return r}))},c.modifyAt=function(n,r){return function(t){return c.isOutOfBound(n,t)?I.none:I.some(c.unsafeUpdateAt(n,r(t[n]),t))}},c.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},c.zip=function n(r,t){return void 0===t?function(t){return n(t,r)}:c.zipWith(r,t,(function(n,r){return[n,r]}))},c.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},c.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},c.intersperse=function(n){return function(r){var u=c.tail(r);return c.isNonEmpty(u)?t.pipe(u,c.prependAll(n),c.prepend(c.head(r))):r}},c.chainWithIndex=function(n){return function(r){for(var t=I.fromReadonlyNonEmptyArray(n(0,c.head(r))),u=1;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},c.chop=function(n){return function(r){for(var t=n(r),u=[t[0]],e=t[1];c.isNonEmpty(e);){var o=n(e),i=o[1];u.push(o[0]),e=i}return u}},c.splitAt=function(n){return function(r){var u=Math.max(1,n);return u>=r.length?[r,c.empty]:[t.pipe(r.slice(1,u),c.prepend(c.head(r))),r.slice(u)]}},c.chunksOf=function(n){return c.chop(c.splitAt(n))};var b=function(n,r){return t.pipe(n,c.map(r))},x=function(n,r){return t.pipe(n,c.mapWithIndex(r))},U=function(n,r){return t.pipe(n,c.ap(r))},W=function(n,r){return t.pipe(n,c.chain(r))},O=function(n,r){return t.pipe(n,c.extend(r))},j=function(n,r,u){return t.pipe(n,c.reduce(r,u))},g=function(n){var r=c.foldMap(n);return function(n,u){return t.pipe(n,r(u))}},_=function(n,r,u){return t.pipe(n,c.reduceRight(r,u))},y=function(n){var r=c.traverse(n);return function(n,u){return t.pipe(n,r(u))}},q=function(n,r){return t.pipe(n,c.alt(r))},w=function(n,r,u){return t.pipe(n,c.reduceWithIndex(r,u))},z=function(n){var r=c.foldMapWithIndex(n);return function(n,u){return t.pipe(n,r(u))}},A=function(n,r,u){return t.pipe(n,c.reduceRightWithIndex(r,u))},L=function(n){var r=c.traverseWithIndex(n);return function(n,u){return t.pipe(n,r(u))}};c.of=I.singleton,c.altW=function(n){return function(r){return t.pipe(r,m(n()))}},c.alt=c.altW,c.ap=function(n){return c.chain((function(r){return t.pipe(n,c.map(r))}))},c.chain=function(n){return c.chainWithIndex((function(r,t){return n(t)}))},c.extend=function(n){return function(r){for(var t=c.tail(r),u=[n(r)];c.isNonEmpty(t);)u.push(n(t)),t=c.tail(t);return u}},c.duplicate=c.extend(t.identity),c.flatten=c.chain(t.identity),c.map=function(n){return c.mapWithIndex((function(r,t){return n(t)}))},c.mapWithIndex=function(n){return function(r){for(var t=[n(0,c.head(r))],u=1;u<r.length;u++)t.push(n(u,r[u]));return t}},c.reduce=function(n,r){return c.reduceWithIndex(n,(function(n,t,u){return r(t,u)}))},c.foldMap=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u){return n.concat(t,r(u))}),r(t[0]))}}},c.reduceRight=function(n,r){return c.reduceRightWithIndex(n,(function(n,t,u){return r(t,u)}))},c.reduceWithIndex=function(n,r){return function(t){return t.reduce((function(n,t,u){return r(u,n,t)}),n)}},c.foldMapWithIndex=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u,e){return n.concat(t,r(e+1,u))}),r(0,t[0]))}}},c.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},c.traverse=function(n){var r=c.traverseWithIndex(n);return function(n){return r((function(r,t){return n(t)}))}},c.sequence=function(n){return c.traverseWithIndex(n)(t.SK)},c.traverseWithIndex=function(n){return function(r){return function(u){for(var e=n.map(r(0,c.head(u)),c.of),o=1;o<u.length;o++)e=n.ap(n.map(e,(function(n){return function(r){return t.pipe(n,c.append(r))}})),r(o,u[o]));return e}}},c.extract=I.head,c.URI="ReadonlyNonEmptyArray",c.getShow=function(n){return{show:function(r){return"["+r.map(n.show).join(", ")+"]"}}},c.getSemigroup=function(){return{concat:R}},c.getEq=function(n){return a.fromEquals((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},c.getUnionSemigroup=function(n){var r=c.union(n);return{concat:function(n,t){return r(t)(n)}}},c.Functor={URI:c.URI,map:b},c.flap=e.flap(c.Functor),c.Pointed={URI:c.URI,of:c.of},c.FunctorWithIndex={URI:c.URI,map:b,mapWithIndex:x},c.Apply={URI:c.URI,map:b,ap:U},c.apFirst=u.apFirst(c.Apply),c.apSecond=u.apSecond(c.Apply),c.Applicative={URI:c.URI,map:b,ap:U,of:c.of},c.Chain={URI:c.URI,map:b,ap:U,chain:W},c.chainFirst=o.chainFirst(c.Chain),c.Monad={URI:c.URI,map:b,ap:U,of:c.of,chain:W},c.Foldable={URI:c.URI,reduce:j,foldMap:g,reduceRight:_},c.FoldableWithIndex={URI:c.URI,reduce:j,foldMap:g,reduceRight:_,reduceWithIndex:w,foldMapWithIndex:z,reduceRightWithIndex:A},c.Traversable={URI:c.URI,map:b,reduce:j,foldMap:g,reduceRight:_,traverse:y,sequence:c.sequence},c.TraversableWithIndex={URI:c.URI,map:b,mapWithIndex:x,reduce:j,foldMap:g,reduceRight:_,traverse:y,sequence:c.sequence,reduceWithIndex:w,foldMapWithIndex:z,reduceRightWithIndex:A,traverseWithIndex:L},c.Alt={URI:c.URI,map:b,alt:q},c.Comonad={URI:c.URI,map:b,extend:O,extract:c.extract},c.Do=c.of(I.emptyRecord),c.bindTo=e.bindTo(c.Functor),c.bind=o.bind(c.Chain),c.apS=u.apS(c.Apply),c.head=c.extract,c.tail=I.tail,c.last=function(n){return n[n.length-1]},c.init=function(n){return n.slice(0,-1)},c.min=function(n){var r=s.min(n);return function(n){return n.reduce(r.concat)}},c.max=function(n){var r=s.max(n);return function(n){return n.reduce(r.concat)}},c.concatAll=function(n){return function(r){return r.reduce(n.concat)}},c.matchLeft=function(n){return function(r){return n(c.head(r),c.tail(r))}},c.matchRight=function(n){return function(r){return n(c.init(r),c.last(r))}},c.modifyHead=function(n){return function(r){return h([n(c.head(r))],c.tail(r))}},c.updateHead=function(n){return c.modifyHead((function(){return n}))},c.modifyLast=function(n){return function(r){return t.pipe(c.init(r),c.append(n(c.last(r))))}},c.updateLast=function(n){return c.modifyLast((function(){return n}))},c.groupSort=function(n){var r=c.sort(n),t=M(n);return function(n){return c.isNonEmpty(n)?t(r(n)):c.empty}},c.filter=function(n){return c.filterWithIndex((function(r,t){return n(t)}))},c.filterWithIndex=function(n){return function(r){return c.fromReadonlyArray(r.filter((function(r,t){return n(t,r)})))}},c.uncons=c.unprepend,c.unsnoc=c.unappend,c.cons=function(n,r){return void 0===r?c.prepend(n):t.pipe(r,c.prepend(n))},c.snoc=function(n,r){return t.pipe(n,R([r]))},c.insertAt=function(n,r){return function(t){return n<0||n>t.length?I.none:I.some(c.unsafeInsertAt(n,r,t))}},c.prependToAll=c.prependAll,c.fold=c.concatAll,c.readonlyNonEmptyArray={URI:c.URI,of:c.of,map:b,mapWithIndex:x,ap:U,chain:W,extend:O,extract:c.extract,reduce:j,foldMap:g,reduceRight:_,traverse:y,sequence:c.sequence,reduceWithIndex:w,foldMapWithIndex:z,reduceRightWithIndex:A,traverseWithIndex:L,alt:q}})),m=r((function(r,c){var f=n&&n.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),a=n&&n.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=n&&n.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&f(r,n,t);return a(r,n),r},p=n&&n.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(c,"__esModule",{value:!0}),c.mapWithIndex=c.map=c.flatten=c.duplicate=c.extend=c.chain=c.ap=c.alt=c.altW=c.chunksOf=c.splitAt=c.chop=c.chainWithIndex=c.foldMap=c.foldMapWithIndex=c.intersperse=c.prependAll=c.unzip=c.zip=c.zipWith=c.of=c.copy=c.modifyAt=c.updateAt=c.insertAt=c.sort=c.groupBy=c.group=c.reverse=c.concat=c.concatW=c.unappend=c.unprepend=c.range=c.replicate=c.makeBy=c.fromArray=c.fromReadonlyNonEmptyArray=c.rotate=c.union=c.sortBy=c.uniq=c.unsafeUpdateAt=c.unsafeInsertAt=c.append=c.appendW=c.prepend=c.prependW=c.isOutOfBound=c.isNonEmpty=void 0,c.filterWithIndex=c.filter=c.groupSort=c.updateLast=c.modifyLast=c.updateHead=c.modifyHead=c.matchRight=c.matchLeft=c.concatAll=c.max=c.min=c.init=c.last=c.tail=c.head=c.apS=c.bind=c.bindTo=c.Do=c.Comonad=c.Alt=c.TraversableWithIndex=c.Traversable=c.FoldableWithIndex=c.Foldable=c.Monad=c.chainFirst=c.Chain=c.Applicative=c.apSecond=c.apFirst=c.Apply=c.FunctorWithIndex=c.Pointed=c.flap=c.Functor=c.getUnionSemigroup=c.getEq=c.getSemigroup=c.getShow=c.URI=c.extract=c.traverseWithIndex=c.sequence=c.traverse=c.reduceRightWithIndex=c.reduceRight=c.reduceWithIndex=c.reduce=void 0,c.nonEmptyArray=c.fold=c.prependToAll=c.snoc=c.cons=c.unsnoc=c.uncons=void 0;var l=d(i),h=d(s);function I(n){return function(r){return r.concat(n)}}function m(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function R(n){return function(r){var t=r.length;if(0===t)return[];for(var u=[],e=r[0],o=[e],i=1;i<t;i++){var c=r[i];n.equals(c,e)?o.push(c):(u.push(o),o=[e=c])}return u.push(o),u}}c.isNonEmpty=function(n){return n.length>0},c.isOutOfBound=function(n,r){return n<0||n>=r.length},c.prependW=function(n){return function(r){return p([n],r)}},c.prepend=c.prependW,c.appendW=function(n){return function(r){return p(p([],r),[n])}},c.append=c.appendW,c.unsafeInsertAt=function(n,r,t){if(c.isNonEmpty(t)){var u=c.fromReadonlyNonEmptyArray(t);return u.splice(n,0,r),u}return[r]},c.unsafeUpdateAt=function(n,r,t){var u=c.fromReadonlyNonEmptyArray(t);return u[n]=r,u},c.uniq=function(n){return function(r){if(1===r.length)return c.copy(r);for(var t=[c.head(r)],u=function(r){t.every((function(t){return!n.equals(t,r)}))&&t.push(r)},e=0,o=c.tail(r);e<o.length;e++)u(o[e]);return t}},c.sortBy=function(n){if(c.isNonEmpty(n)){var r=v.getMonoid();return c.sort(n.reduce(r.concat,r.empty))}return c.copy},c.union=function(n){var r=c.uniq(n);return function(n){return function(u){return r(t.pipe(u,m(n)))}}},c.rotate=function(n){return function(r){var u=r.length,e=Math.round(n)%u;if(c.isOutOfBound(Math.abs(e),r)||0===e)return c.copy(r);if(e<0){var o=c.splitAt(-e)(r);return t.pipe(o[1],m(o[0]))}return c.rotate(e-u)(r)}},c.fromReadonlyNonEmptyArray=l.fromReadonlyNonEmptyArray,c.fromArray=function(n){return c.isNonEmpty(n)?l.some(n):l.none},c.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},c.replicate=function(n){return c.makeBy((function(){return n}))},c.range=function(n,r){return n<=r?c.makeBy((function(r){return n+r}))(r-n+1):[n]},c.unprepend=function(n){return[c.head(n),c.tail(n)]},c.unappend=function(n){return[c.init(n),c.last(n)]},c.concatW=I,c.concat=m,c.reverse=function(n){return p([c.last(n)],n.slice(0,-1).reverse())},c.group=R,c.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);t.hasOwnProperty(i)?t[i].push(o):t[i]=[o]}return t}},c.sort=function(n){return function(r){return r.slice().sort(n.compare)}},c.insertAt=function(n,r){return function(t){return n<0||n>t.length?l.none:l.some(c.unsafeInsertAt(n,r,t))}},c.updateAt=function(n,r){return c.modifyAt(n,(function(){return r}))},c.modifyAt=function(n,r){return function(t){return c.isOutOfBound(n,t)?l.none:l.some(c.unsafeUpdateAt(n,r(t[n]),t))}},c.copy=c.fromReadonlyNonEmptyArray,c.of=function(n){return[n]},c.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},c.zip=function n(r,t){return void 0===t?function(t){return n(t,r)}:c.zipWith(r,t,(function(n,r){return[n,r]}))},c.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},c.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},c.intersperse=function(n){return function(r){var u=c.tail(r);return c.isNonEmpty(u)?t.pipe(u,c.prependAll(n),c.prepend(c.head(r))):c.copy(r)}},c.foldMapWithIndex=h.foldMapWithIndex,c.foldMap=h.foldMap,c.chainWithIndex=function(n){return function(r){for(var t=c.fromReadonlyNonEmptyArray(n(0,c.head(r))),u=1;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},c.chop=function(n){return function(r){for(var t=n(r),u=[t[0]],e=t[1];c.isNonEmpty(e);){var o=n(e),i=o[1];u.push(o[0]),e=i}return u}},c.splitAt=function(n){return function(r){var u=Math.max(1,n);return u>=r.length?[c.copy(r),[]]:[t.pipe(r.slice(1,u),c.prepend(c.head(r))),r.slice(u)]}},c.chunksOf=function(n){return c.chop(c.splitAt(n))};var M=function(n,r){return t.pipe(n,c.map(r))},b=function(n,r){return t.pipe(n,c.mapWithIndex(r))},x=function(n,r){return t.pipe(n,c.ap(r))},U=function(n,r){return t.pipe(n,c.chain(r))},W=function(n,r){return t.pipe(n,c.extend(r))},O=function(n,r,u){return t.pipe(n,c.reduce(r,u))},j=function(n){var r=c.foldMap(n);return function(n,u){return t.pipe(n,r(u))}},g=function(n,r,u){return t.pipe(n,c.reduceRight(r,u))},_=function(n){var r=c.traverse(n);return function(n,u){return t.pipe(n,r(u))}},y=function(n,r){return t.pipe(n,c.alt(r))},q=function(n,r,u){return t.pipe(n,c.reduceWithIndex(r,u))},w=function(n){var r=c.foldMapWithIndex(n);return function(n,u){return t.pipe(n,r(u))}},z=function(n,r,u){return t.pipe(n,c.reduceRightWithIndex(r,u))},A=function(n){var r=c.traverseWithIndex(n);return function(n,u){return t.pipe(n,r(u))}};c.altW=function(n){return function(r){return t.pipe(r,I(n()))}},c.alt=c.altW,c.ap=function(n){return c.chain((function(r){return t.pipe(n,c.map(r))}))},c.chain=function(n){return c.chainWithIndex((function(r,t){return n(t)}))},c.extend=function(n){return function(r){for(var t=c.tail(r),u=[n(r)];c.isNonEmpty(t);)u.push(n(t)),t=c.tail(t);return u}},c.duplicate=c.extend(t.identity),c.flatten=c.chain(t.identity),c.map=function(n){return c.mapWithIndex((function(r,t){return n(t)}))},c.mapWithIndex=function(n){return function(r){for(var t=[n(0,c.head(r))],u=1;u<r.length;u++)t.push(n(u,r[u]));return t}},c.reduce=h.reduce,c.reduceWithIndex=h.reduceWithIndex,c.reduceRight=h.reduceRight,c.reduceRightWithIndex=h.reduceRightWithIndex,c.traverse=function(n){var r=c.traverseWithIndex(n);return function(n){return r((function(r,t){return n(t)}))}},c.sequence=function(n){return c.traverseWithIndex(n)((function(n,r){return r}))},c.traverseWithIndex=function(n){return function(r){return function(u){for(var e=n.map(r(0,c.head(u)),c.of),o=1;o<u.length;o++)e=n.ap(n.map(e,(function(n){return function(r){return t.pipe(n,c.append(r))}})),r(o,u[o]));return e}}},c.extract=h.head,c.URI="NonEmptyArray",c.getShow=h.getShow,c.getSemigroup=function(){return{concat:m}},c.getEq=h.getEq,c.getUnionSemigroup=function(n){var r=c.union(n);return{concat:function(n,t){return r(t)(n)}}},c.Functor={URI:c.URI,map:M},c.flap=e.flap(c.Functor),c.Pointed={URI:c.URI,of:c.of},c.FunctorWithIndex={URI:c.URI,map:M,mapWithIndex:b},c.Apply={URI:c.URI,map:M,ap:x},c.apFirst=u.apFirst(c.Apply),c.apSecond=u.apSecond(c.Apply),c.Applicative={URI:c.URI,map:M,ap:x,of:c.of},c.Chain={URI:c.URI,map:M,ap:x,chain:U},c.chainFirst=o.chainFirst(c.Chain),c.Monad={URI:c.URI,map:M,ap:x,of:c.of,chain:U},c.Foldable={URI:c.URI,reduce:O,foldMap:j,reduceRight:g},c.FoldableWithIndex={URI:c.URI,reduce:O,foldMap:j,reduceRight:g,reduceWithIndex:q,foldMapWithIndex:w,reduceRightWithIndex:z},c.Traversable={URI:c.URI,map:M,reduce:O,foldMap:j,reduceRight:g,traverse:_,sequence:c.sequence},c.TraversableWithIndex={URI:c.URI,map:M,mapWithIndex:b,reduce:O,foldMap:j,reduceRight:g,traverse:_,sequence:c.sequence,reduceWithIndex:q,foldMapWithIndex:w,reduceRightWithIndex:z,traverseWithIndex:A},c.Alt={URI:c.URI,map:M,alt:y},c.Comonad={URI:c.URI,map:M,extend:W,extract:c.extract},c.Do=c.of(l.emptyRecord),c.bindTo=e.bindTo(c.Functor),c.bind=o.bind(c.Chain),c.apS=u.apS(c.Apply),c.head=h.head,c.tail=function(n){return n.slice(1)},c.last=h.last,c.init=function(n){return n.slice(0,-1)},c.min=h.min,c.max=h.max,c.concatAll=function(n){return function(r){return r.reduce(n.concat)}},c.matchLeft=function(n){return function(r){return n(c.head(r),c.tail(r))}},c.matchRight=function(n){return function(r){return n(c.init(r),c.last(r))}},c.modifyHead=function(n){return function(r){return p([n(c.head(r))],c.tail(r))}},c.updateHead=function(n){return c.modifyHead((function(){return n}))},c.modifyLast=function(n){return function(r){return t.pipe(c.init(r),c.append(n(c.last(r))))}},c.updateLast=function(n){return c.modifyLast((function(){return n}))},c.groupSort=function(n){var r=c.sort(n),t=R(n);return function(n){return c.isNonEmpty(n)?t(r(n)):[]}},c.filter=function(n){return c.filterWithIndex((function(r,t){return n(t)}))},c.filterWithIndex=function(n){return function(r){return c.fromArray(r.filter((function(r,t){return n(t,r)})))}},c.uncons=c.unprepend,c.unsnoc=c.unappend,c.cons=function(n,r){return void 0===r?c.prepend(n):t.pipe(r,c.prepend(n))},c.snoc=function(n,r){return t.pipe(n,c.append(r))},c.prependToAll=c.prependAll,c.fold=h.concatAll,c.nonEmptyArray={URI:c.URI,of:c.of,map:M,mapWithIndex:b,ap:x,chain:U,extend:W,extract:c.extract,reduce:O,foldMap:j,reduceRight:g,traverse:_,sequence:c.sequence,reduceWithIndex:q,foldMapWithIndex:w,reduceRightWithIndex:z,traverseWithIndex:A,alt:y}})),R=r((function(r,f){var d=n&&n.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),m=n&&n.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),R=n&&n.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&d(r,n,t);return m(r,n),r},M=n&&n.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(f,"__esModule",{value:!0}),f.sort=f.lefts=f.rights=f.reverse=f.modifyAt=f.deleteAt=f.updateAt=f.insertAt=f.findLastIndex=f.findLastMap=f.findLast=f.findFirstMap=f.findFirst=f.findIndex=f.dropLeftWhile=f.dropRight=f.dropLeft=f.spanLeft=f.takeLeftWhile=f.takeRight=f.takeLeft=f.init=f.tail=f.last=f.head=f.lookup=f.isOutOfBound=f.size=f.scanRight=f.scanLeft=f.chainWithIndex=f.foldRight=f.matchRight=f.matchRightW=f.foldLeft=f.matchLeft=f.matchLeftW=f.match=f.matchW=f.fromEither=f.fromOption=f.fromPredicate=f.replicate=f.makeBy=f.appendW=f.append=f.prependW=f.prepend=f.isNonEmpty=f.isEmpty=void 0,f.sequence=f.traverse=f.reduceRightWithIndex=f.reduceRight=f.reduceWithIndex=f.foldMap=f.reduce=f.foldMapWithIndex=f.duplicate=f.extend=f.filterWithIndex=f.partitionMapWithIndex=f.partitionMap=f.partitionWithIndex=f.partition=f.compact=f.filterMap=f.filterMapWithIndex=f.filter=f.separate=f.mapWithIndex=f.map=f.flatten=f.chain=f.ap=f.alt=f.altW=f.zero=f.of=f._chainRecBreadthFirst=f._chainRecDepthFirst=f.difference=f.intersection=f.union=f.concat=f.concatW=f.comprehension=f.fromOptionK=f.chunksOf=f.splitAt=f.chop=f.sortBy=f.uniq=f.elem=f.rotate=f.intersperse=f.prependAll=f.unzip=f.zip=f.zipWith=void 0,f.toArray=f.unsafeDeleteAt=f.unsafeUpdateAt=f.unsafeInsertAt=f.fromEitherK=f.FromEither=f.filterE=f.Witherable=f.ChainRecBreadthFirst=f.chainRecBreadthFirst=f.ChainRecDepthFirst=f.chainRecDepthFirst=f.TraversableWithIndex=f.Traversable=f.FoldableWithIndex=f.Foldable=f.FilterableWithIndex=f.Filterable=f.Compactable=f.Extend=f.Alternative=f.guard=f.Zero=f.Alt=f.Unfoldable=f.chainFirst=f.Monad=f.Chain=f.Applicative=f.apSecond=f.apFirst=f.Apply=f.FunctorWithIndex=f.Pointed=f.flap=f.Functor=f.getDifferenceMagma=f.getIntersectionSemigroup=f.getUnionMonoid=f.getUnionSemigroup=f.getOrd=f.getEq=f.getMonoid=f.getSemigroup=f.getShow=f.URI=f.unfold=f.wilt=f.wither=f.traverseWithIndex=void 0,f.readonlyArray=f.prependToAll=f.snoc=f.cons=f.range=f.apS=f.bind=f.bindTo=f.Do=f.exists=f.some=f.every=f.empty=f.fromArray=void 0;var b=R(i),x=R(I),U=R(s);f.isEmpty=function(n){return 0===n.length},f.isNonEmpty=U.isNonEmpty,f.prepend=U.prepend,f.prependW=U.prependW,f.append=U.append,f.appendW=U.appendW,f.makeBy=function(n,r){return n<=0?f.empty:U.makeBy(r)(n)},f.replicate=function(n,r){return f.makeBy(n,(function(){return r}))},f.fromPredicate=function(n){return function(r){return n(r)?[r]:f.empty}},f.fromOption=function(n){return b.isNone(n)?f.empty:[n.value]},f.fromEither=function(n){return b.isLeft(n)?f.empty:[n.right]},f.matchW=function(n,r){return function(t){return f.isNonEmpty(t)?r(t):n()}},f.match=f.matchW,f.matchLeftW=function(n,r){return function(t){return f.isNonEmpty(t)?r(U.head(t),U.tail(t)):n()}},f.matchLeft=f.matchLeftW,f.foldLeft=f.matchLeft,f.matchRightW=function(n,r){return function(t){return f.isNonEmpty(t)?r(U.init(t),U.last(t)):n()}},f.matchRight=f.matchRightW,f.foldRight=f.matchRight,f.chainWithIndex=function(n){return function(r){if(f.isEmpty(r))return f.empty;for(var t=[],u=0;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},f.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},f.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},f.size=function(n){return n.length},f.isOutOfBound=U.isOutOfBound,f.lookup=function n(r,t){return void 0===t?function(t){return n(r,t)}:f.isOutOfBound(r,t)?b.none:b.some(t[r])},f.head=function(n){return f.isNonEmpty(n)?b.some(U.head(n)):b.none},f.last=function(n){return f.isNonEmpty(n)?b.some(U.last(n)):b.none},f.tail=function(n){return f.isNonEmpty(n)?b.some(U.tail(n)):b.none},f.init=function(n){return f.isNonEmpty(n)?b.some(U.init(n)):b.none},f.takeLeft=function(n){return function(r){return f.isOutOfBound(n,r)?r:0===n?f.empty:r.slice(0,n)}},f.takeRight=function(n){return function(r){return f.isOutOfBound(n,r)?r:0===n?f.empty:r.slice(-n)}},f.takeLeftWhile=function(n){return function(r){for(var t=[],u=0,e=r;u<e.length;u++){var o=e[u];if(!n(o))break;t.push(o)}var i=t.length;return i===r.length?r:0===i?f.empty:t}};var W=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function O(n){return function(r,t){if(void 0===t){var u=O(n);return function(n){return u(r,n)}}for(var e=0;e<t.length;e++)if(n.equals(t[e],r))return!0;return!1}}function j(n){var r=U.union(n);return function(t,u){if(void 0===u){var e=j(n);return function(n){return e(n,t)}}return f.isNonEmpty(t)&&f.isNonEmpty(u)?r(u)(t):f.isNonEmpty(t)?t:u}}function g(n){var r=O(n);return function(t,u){if(void 0===u){var e=g(n);return function(n){return e(n,t)}}return t.filter((function(n){return r(n,u)}))}}function _(n){var r=O(n);return function(t,u){if(void 0===u){var e=_(n);return function(n){return e(n,t)}}return t.filter((function(n){return!r(n,u)}))}}f.spanLeft=function(n){return function(r){var t=f.splitAt(W(r,n))(r);return{init:t[0],rest:t[1]}}},f.dropLeft=function(n){return function(r){return n<=0||f.isEmpty(r)?r:n>=r.length?f.empty:r.slice(n,r.length)}},f.dropRight=function(n){return function(r){return n<=0||f.isEmpty(r)?r:n>=r.length?f.empty:r.slice(0,r.length-n)}},f.dropLeftWhile=function(n){return function(r){var t=W(r,n);return 0===t?r:t===r.length?f.empty:r.slice(t)}},f.findIndex=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return b.some(t);return b.none}},f.findFirst=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return b.some(r[t]);return b.none}},f.findFirstMap=function(n){return function(r){for(var t=0;t<r.length;t++){var u=n(r[t]);if(b.isSome(u))return u}return b.none}},f.findLast=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return b.some(r[t]);return b.none}},f.findLastMap=function(n){return function(r){for(var t=r.length-1;t>=0;t--){var u=n(r[t]);if(b.isSome(u))return u}return b.none}},f.findLastIndex=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return b.some(t);return b.none}},f.insertAt=function(n,r){return function(t){return n<0||n>t.length?b.none:b.some(U.unsafeInsertAt(n,r,t))}},f.updateAt=function(n,r){return f.modifyAt(n,(function(){return r}))},f.deleteAt=function(n){return function(r){return f.isOutOfBound(n,r)?b.none:b.some(f.unsafeDeleteAt(n,r))}},f.modifyAt=function(n,r){return function(t){return f.isOutOfBound(n,t)?b.none:b.some(f.unsafeUpdateAt(n,r(t[n]),t))}},f.reverse=function(n){return n.length<=1?n:n.slice().reverse()},f.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},f.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},f.sort=function(n){return function(r){return r.length<=1?r:r.slice().sort(n.compare)}},f.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},f.zip=function n(r,t){return void 0===t?function(t){return n(t,r)}:f.zipWith(r,t,(function(n,r){return[n,r]}))},f.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},f.prependAll=function(n){var r=U.prependAll(n);return function(n){return f.isNonEmpty(n)?r(n):n}},f.intersperse=function(n){var r=U.intersperse(n);return function(n){return f.isNonEmpty(n)?r(n):n}},f.rotate=function(n){var r=U.rotate(n);return function(n){return f.isNonEmpty(n)?r(n):n}},f.elem=O,f.uniq=function(n){var r=U.uniq(n);return function(n){return f.isNonEmpty(n)?r(n):n}},f.sortBy=function(n){var r=U.sortBy(n);return function(n){return f.isNonEmpty(n)?r(n):n}},f.chop=function(n){var r=U.chop(n);return function(n){return f.isNonEmpty(n)?r(n):f.empty}},f.splitAt=function(n){return function(r){return n>=1&&f.isNonEmpty(r)?U.splitAt(n)(r):f.isEmpty(r)?[r,f.empty]:[f.empty,r]}},f.chunksOf=function(n){var r=U.chunksOf(n);return function(n){return f.isNonEmpty(n)?r(n):f.empty}},f.fromOptionK=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return f.fromOption(n.apply(void 0,r))}},f.comprehension=function(n,r,u){void 0===u&&(u=function(){return!0});var e=function(n,o){return f.isNonEmpty(o)?t.pipe(U.head(o),f.chain((function(r){return e(t.pipe(n,f.append(r)),U.tail(o))}))):u.apply(void 0,n)?[r.apply(void 0,n)]:f.empty};return e(f.empty,n)},f.concatW=function(n){return function(r){return f.isEmpty(r)?n:f.isEmpty(n)?r:r.concat(n)}},f.concat=f.concatW,f.union=j,f.intersection=g,f.difference=_;var y=function(n,r){return t.pipe(n,f.map(r))},q=function(n,r){return t.pipe(n,f.mapWithIndex(r))},w=function(n,r){return t.pipe(n,f.ap(r))},z=function(n,r){return t.pipe(n,f.chain(r))},A=function(n,r){return t.pipe(n,f.filter(r))},L=function(n,r){return t.pipe(n,f.filterMap(r))},E=function(n,r){return t.pipe(n,f.partition(r))},N=function(n,r){return t.pipe(n,f.partitionMap(r))},S=function(n,r){return t.pipe(n,f.partitionWithIndex(r))},k=function(n,r){return t.pipe(n,f.partitionMapWithIndex(r))},C=function(n,r){return t.pipe(n,f.alt(r))},T=function(n,r,u){return t.pipe(n,f.reduce(r,u))},D=function(n){var r=f.foldMap(n);return function(n,u){return t.pipe(n,r(u))}},F=function(n,r,u){return t.pipe(n,f.reduceRight(r,u))},J=function(n,r,u){return t.pipe(n,f.reduceWithIndex(r,u))},Z=function(n){var r=f.foldMapWithIndex(n);return function(n,u){return t.pipe(n,r(u))}},B=function(n,r,u){return t.pipe(n,f.reduceRightWithIndex(r,u))},G=function(n,r){return t.pipe(n,f.filterMapWithIndex(r))},H=function(n,r){return t.pipe(n,f.filterWithIndex(r))},K=function(n,r){return t.pipe(n,f.extend(r))},P=function(n){var r=f.traverse(n);return function(n,u){return t.pipe(n,r(u))}},Q=function(n){var r=f.traverseWithIndex(n);return function(n,u){return t.pipe(n,r(u))}};f._chainRecDepthFirst=function(n,r){return t.pipe(n,f.chainRecDepthFirst(r))},f._chainRecBreadthFirst=function(n,r){return t.pipe(n,f.chainRecBreadthFirst(r))},f.of=U.of,f.zero=function(){return f.empty},f.altW=function(n){return function(r){return r.concat(n())}},f.alt=f.altW,f.ap=function(n){return f.chain((function(r){return t.pipe(n,f.map(r))}))},f.chain=function(n){return function(r){return t.pipe(r,f.chainWithIndex((function(r,t){return n(t)})))}},f.flatten=f.chain(t.identity),f.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},f.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},f.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return p.separated(r,t)},f.filter=function(n){return function(r){return r.filter(n)}},f.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);b.isSome(e)&&t.push(e.value)}return t}},f.filterMap=function(n){return f.filterMapWithIndex((function(r,t){return n(t)}))},f.compact=f.filterMap(t.identity),f.partition=function(n){return f.partitionWithIndex((function(r,t){return n(t)}))},f.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return p.separated(t,u)}},f.partitionMap=function(n){return f.partitionMapWithIndex((function(r,t){return n(t)}))},f.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return p.separated(t,u)}},f.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},f.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},f.duplicate=f.extend(t.identity),f.foldMapWithIndex=function(n){return function(r){return function(t){return t.reduce((function(t,u,e){return n.concat(t,r(e,u))}),n.empty)}}},f.reduce=function(n,r){return f.reduceWithIndex(n,(function(n,t,u){return r(t,u)}))},f.foldMap=function(n){var r=f.foldMapWithIndex(n);return function(n){return r((function(r,t){return n(t)}))}},f.reduceWithIndex=function(n,r){return function(t){for(var u=t.length,e=n,o=0;o<u;o++)e=r(o,e,t[o]);return e}},f.reduceRight=function(n,r){return f.reduceRightWithIndex(n,(function(n,t,u){return r(t,u)}))},f.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},f.traverse=function(n){var r=f.traverseWithIndex(n);return function(n){return r((function(r,t){return n(t)}))}},f.sequence=function(n){return function(r){return T(r,n.of(f.zero()),(function(r,u){return n.ap(n.map(r,(function(n){return function(r){return t.pipe(n,f.append(r))}})),u)}))}},f.traverseWithIndex=function(n){return function(r){return f.reduceWithIndex(n.of(f.zero()),(function(u,e,o){return n.ap(n.map(e,(function(n){return function(r){return t.pipe(n,f.append(r))}})),r(u,o))}))}},f.wither=function(n){var r=V(n);return function(n){return function(t){return r(t,n)}}},f.wilt=function(n){var r=X(n);return function(n){return function(t){return r(t,n)}}},f.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!b.isSome(e))break;var o=e.value,i=o[1];t.push(o[0]),u=i}return t},f.URI="ReadonlyArray",f.getShow=function(n){return{show:function(r){return"["+r.map(n.show).join(", ")+"]"}}},f.getSemigroup=function(){return{concat:function(n,r){return f.isEmpty(n)?r:f.isEmpty(r)?n:n.concat(r)}}},f.getMonoid=function(){return{concat:f.getSemigroup().concat,empty:f.empty}},f.getEq=function(n){return a.fromEquals((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},f.getOrd=function(n){return v.fromCompare((function(r,t){for(var u=r.length,e=t.length,o=Math.min(u,e),i=0;i<o;i++){var c=n.compare(r[i],t[i]);if(0!==c)return c}return x.Ord.compare(u,e)}))},f.getUnionSemigroup=function(n){var r=j(n);return{concat:function(n,t){return r(t)(n)}}},f.getUnionMonoid=function(n){return{concat:f.getUnionSemigroup(n).concat,empty:f.empty}},f.getIntersectionSemigroup=function(n){var r=g(n);return{concat:function(n,t){return r(t)(n)}}},f.getDifferenceMagma=function(n){var r=_(n);return{concat:function(n,t){return r(t)(n)}}},f.Functor={URI:f.URI,map:y},f.flap=e.flap(f.Functor),f.Pointed={URI:f.URI,of:f.of},f.FunctorWithIndex={URI:f.URI,map:y,mapWithIndex:q},f.Apply={URI:f.URI,map:y,ap:w},f.apFirst=u.apFirst(f.Apply),f.apSecond=u.apSecond(f.Apply),f.Applicative={URI:f.URI,map:y,ap:w,of:f.of},f.Chain={URI:f.URI,map:y,ap:w,chain:z},f.Monad={URI:f.URI,map:y,ap:w,of:f.of,chain:z},f.chainFirst=o.chainFirst(f.Chain),f.Unfoldable={URI:f.URI,unfold:f.unfold},f.Alt={URI:f.URI,map:y,alt:C},f.Zero={URI:f.URI,zero:f.zero},f.guard=h.guard(f.Zero,f.Pointed),f.Alternative={URI:f.URI,map:y,ap:w,of:f.of,alt:C,zero:f.zero},f.Extend={URI:f.URI,map:y,extend:K},f.Compactable={URI:f.URI,compact:f.compact,separate:f.separate},f.Filterable={URI:f.URI,map:y,compact:f.compact,separate:f.separate,filter:A,filterMap:L,partition:E,partitionMap:N},f.FilterableWithIndex={URI:f.URI,map:y,mapWithIndex:q,compact:f.compact,separate:f.separate,filter:A,filterMap:L,partition:E,partitionMap:N,partitionMapWithIndex:k,partitionWithIndex:S,filterMapWithIndex:G,filterWithIndex:H},f.Foldable={URI:f.URI,reduce:T,foldMap:D,reduceRight:F},f.FoldableWithIndex={URI:f.URI,reduce:T,foldMap:D,reduceRight:F,reduceWithIndex:J,foldMapWithIndex:Z,reduceRightWithIndex:B},f.Traversable={URI:f.URI,map:y,reduce:T,foldMap:D,reduceRight:F,traverse:P,sequence:f.sequence},f.TraversableWithIndex={URI:f.URI,map:y,mapWithIndex:q,reduce:T,foldMap:D,reduceRight:F,reduceWithIndex:J,foldMapWithIndex:Z,reduceRightWithIndex:B,traverse:P,sequence:f.sequence,traverseWithIndex:Q},f.chainRecDepthFirst=function(n){return function(r){for(var t=M([],n(r)),u=[];t.length>0;){var e=t.shift();b.isLeft(e)?t.unshift.apply(t,n(e.left)):u.push(e.right)}return u}},f.ChainRecDepthFirst={URI:f.URI,map:y,ap:w,chain:z,chainRec:f._chainRecDepthFirst},f.chainRecBreadthFirst=function(n){return function(r){var t=n(r),u=[],e=[];function o(r){b.isLeft(r)?n(r.left).forEach((function(n){return u.push(n)})):e.push(r.right)}for(var i=0,c=t;i<c.length;i++)o(c[i]);for(;u.length>0;)o(u.shift());return e}},f.ChainRecBreadthFirst={URI:f.URI,map:y,ap:w,chain:z,chainRec:f._chainRecBreadthFirst};var V=l.witherDefault(f.Traversable,f.Compactable),X=l.wiltDefault(f.Traversable,f.Compactable);f.Witherable={URI:f.URI,map:y,compact:f.compact,separate:f.separate,filter:A,filterMap:L,partition:E,partitionMap:N,reduce:T,foldMap:D,reduceRight:F,traverse:P,sequence:f.sequence,wither:V,wilt:X},f.filterE=l.filterE(f.Witherable),f.FromEither={URI:f.URI,fromEither:f.fromEither},f.fromEitherK=c.fromEitherK(f.FromEither),f.unsafeInsertAt=U.unsafeInsertAt,f.unsafeUpdateAt=function(n,r,t){return f.isNonEmpty(t)?U.unsafeUpdateAt(n,r,t):t},f.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},f.toArray=function(n){return n.slice()},f.fromArray=function(n){return f.isEmpty(n)?f.empty:n.slice()},f.empty=U.empty,f.every=function(n){return function(r){return r.every(n)}},f.some=function(n){return function(r){return r.some(n)}},f.exists=f.some,f.Do=f.of(b.emptyRecord),f.bindTo=e.bindTo(f.Functor),f.bind=o.bind(f.Chain),f.apS=u.apS(f.Apply),f.range=U.range,f.cons=U.cons,f.snoc=U.snoc,f.prependToAll=f.prependAll,f.readonlyArray={URI:f.URI,compact:f.compact,separate:f.separate,map:y,ap:w,of:f.of,chain:z,filter:A,filterMap:L,partition:E,partitionMap:N,mapWithIndex:q,partitionMapWithIndex:k,partitionWithIndex:S,filterMapWithIndex:G,filterWithIndex:H,alt:C,zero:f.zero,unfold:f.unfold,reduce:T,foldMap:D,reduceRight:F,traverse:P,sequence:f.sequence,reduceWithIndex:J,foldMapWithIndex:Z,reduceRightWithIndex:B,traverseWithIndex:Q,extend:K,wither:V,wilt:X}})),M=r((function(r,f){var a=n&&n.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=n&&n.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=n&&n.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&a(r,n,t);return v(r,n),r};Object.defineProperty(f,"__esModule",{value:!0}),f.lefts=f.rights=f.reverse=f.modifyAt=f.deleteAt=f.updateAt=f.insertAt=f.copy=f.findLastIndex=f.findLastMap=f.findLast=f.findFirstMap=f.findFirst=f.findIndex=f.dropLeftWhile=f.dropRight=f.dropLeft=f.spanLeft=f.takeLeftWhile=f.takeRight=f.takeLeft=f.init=f.tail=f.last=f.head=f.lookup=f.isOutOfBound=f.size=f.scanRight=f.scanLeft=f.chainWithIndex=f.foldRight=f.matchRight=f.matchRightW=f.foldLeft=f.matchLeft=f.matchLeftW=f.match=f.matchW=f.fromEither=f.fromOption=f.fromPredicate=f.replicate=f.makeBy=f.appendW=f.append=f.prependW=f.prepend=f.isNonEmpty=f.isEmpty=void 0,f.traverseWithIndex=f.sequence=f.traverse=f.reduceRightWithIndex=f.reduceRight=f.reduceWithIndex=f.reduce=f.foldMapWithIndex=f.foldMap=f.duplicate=f.extend=f.filterWithIndex=f.alt=f.altW=f.partitionMapWithIndex=f.partitionMap=f.partitionWithIndex=f.partition=f.filter=f.separate=f.compact=f.filterMap=f.filterMapWithIndex=f.mapWithIndex=f.flatten=f.chain=f.ap=f.map=f.zero=f.of=f.difference=f.intersection=f.union=f.concat=f.concatW=f.comprehension=f.fromOptionK=f.chunksOf=f.splitAt=f.chop=f.sortBy=f.uniq=f.elem=f.rotate=f.intersperse=f.prependAll=f.unzip=f.zip=f.zipWith=f.sort=void 0,f.some=f.every=f.unsafeDeleteAt=f.unsafeUpdateAt=f.unsafeInsertAt=f.fromEitherK=f.FromEither=f.filterE=f.ChainRecBreadthFirst=f.chainRecBreadthFirst=f.ChainRecDepthFirst=f.chainRecDepthFirst=f.Witherable=f.TraversableWithIndex=f.Traversable=f.FoldableWithIndex=f.Foldable=f.FilterableWithIndex=f.Filterable=f.Compactable=f.Extend=f.Alternative=f.guard=f.Zero=f.Alt=f.Unfoldable=f.Monad=f.chainFirst=f.Chain=f.Applicative=f.apSecond=f.apFirst=f.Apply=f.FunctorWithIndex=f.Pointed=f.flap=f.Functor=f.getDifferenceMagma=f.getIntersectionSemigroup=f.getUnionMonoid=f.getUnionSemigroup=f.getOrd=f.getEq=f.getMonoid=f.getSemigroup=f.getShow=f.URI=f.unfold=f.wilt=f.wither=void 0,f.array=f.prependToAll=f.snoc=f.cons=f.empty=f.range=f.apS=f.bind=f.bindTo=f.Do=f.exists=void 0;var I=d(i),s=d(m),M=d(R);f.isEmpty=function(n){return 0===n.length},f.isNonEmpty=s.isNonEmpty,f.prepend=s.prepend,f.prependW=s.prependW,f.append=s.append,f.appendW=s.appendW,f.makeBy=function(n,r){return n<=0?[]:s.makeBy(r)(n)},f.replicate=function(n,r){return f.makeBy(n,(function(){return r}))},f.fromPredicate=function(n){return function(r){return n(r)?[r]:[]}},f.fromOption=function(n){return I.isNone(n)?[]:[n.value]},f.fromEither=function(n){return I.isLeft(n)?[]:[n.right]},f.matchW=function(n,r){return function(t){return f.isNonEmpty(t)?r(t):n()}},f.match=f.matchW,f.matchLeftW=function(n,r){return function(t){return f.isNonEmpty(t)?r(s.head(t),s.tail(t)):n()}},f.matchLeft=f.matchLeftW,f.foldLeft=f.matchLeft,f.matchRightW=function(n,r){return function(t){return f.isNonEmpty(t)?r(s.init(t),s.last(t)):n()}},f.matchRight=f.matchRightW,f.foldRight=f.matchRight,f.chainWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},f.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},f.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},f.size=function(n){return n.length},f.isOutOfBound=s.isOutOfBound,f.lookup=M.lookup,f.head=M.head,f.last=M.last,f.tail=function(n){return f.isNonEmpty(n)?I.some(s.tail(n)):I.none},f.init=function(n){return f.isNonEmpty(n)?I.some(s.init(n)):I.none},f.takeLeft=function(n){return function(r){return f.isOutOfBound(n,r)?f.copy(r):r.slice(0,n)}},f.takeRight=function(n){return function(r){return f.isOutOfBound(n,r)?f.copy(r):0===n?[]:r.slice(-n)}},f.takeLeftWhile=function(n){return function(r){for(var t=[],u=0,e=r;u<e.length;u++){var o=e[u];if(!n(o))break;t.push(o)}return t}};var b=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function x(n){var r=s.union(n);return function(t,u){if(void 0===u){var e=x(n);return function(n){return e(n,t)}}return f.isNonEmpty(t)&&f.isNonEmpty(u)?r(u)(t):f.isNonEmpty(t)?f.copy(t):f.copy(u)}}function U(n){var r=f.elem(n);return function(t,u){if(void 0===u){var e=U(n);return function(n){return e(n,t)}}return t.filter((function(n){return r(n,u)}))}}function W(n){var r=f.elem(n);return function(t,u){if(void 0===u){var e=W(n);return function(n){return e(n,t)}}return t.filter((function(n){return!r(n,u)}))}}f.spanLeft=function(n){return function(r){var t=f.splitAt(b(r,n))(r);return{init:t[0],rest:t[1]}}},f.dropLeft=function(n){return function(r){return n<=0||f.isEmpty(r)?f.copy(r):n>=r.length?[]:r.slice(n,r.length)}},f.dropRight=function(n){return function(r){return n<=0||f.isEmpty(r)?f.copy(r):n>=r.length?[]:r.slice(0,r.length-n)}},f.dropLeftWhile=function(n){return function(r){return r.slice(b(r,n))}},f.findIndex=M.findIndex,f.findFirst=function(n){return M.findFirst(n)},f.findFirstMap=M.findFirstMap,f.findLast=function(n){return M.findLast(n)},f.findLastMap=M.findLastMap,f.findLastIndex=M.findLastIndex,f.copy=function(n){return n.slice()},f.insertAt=function(n,r){return function(t){return n<0||n>t.length?I.none:I.some(f.unsafeInsertAt(n,r,t))}},f.updateAt=function(n,r){return f.modifyAt(n,(function(){return r}))},f.deleteAt=function(n){return function(r){return f.isOutOfBound(n,r)?I.none:I.some(f.unsafeDeleteAt(n,r))}},f.modifyAt=function(n,r){return function(t){return f.isOutOfBound(n,t)?I.none:I.some(f.unsafeUpdateAt(n,r(t[n]),t))}},f.reverse=function(n){return f.isEmpty(n)?[]:n.slice().reverse()},f.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},f.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},f.sort=function(n){return function(r){return r.length<=1?f.copy(r):r.slice().sort(n.compare)}},f.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},f.zip=function n(r,t){return void 0===t?function(t){return n(t,r)}:f.zipWith(r,t,(function(n,r){return[n,r]}))},f.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},f.prependAll=function(n){var r=s.prependAll(n);return function(n){return f.isNonEmpty(n)?r(n):[]}},f.intersperse=function(n){var r=s.intersperse(n);return function(n){return f.isNonEmpty(n)?r(n):f.copy(n)}},f.rotate=function(n){var r=s.rotate(n);return function(n){return f.isNonEmpty(n)?r(n):f.copy(n)}},f.elem=M.elem,f.uniq=function(n){var r=s.uniq(n);return function(n){return f.isNonEmpty(n)?r(n):f.copy(n)}},f.sortBy=function(n){var r=s.sortBy(n);return function(n){return f.isNonEmpty(n)?r(n):f.copy(n)}},f.chop=function(n){var r=s.chop(n);return function(n){return f.isNonEmpty(n)?r(n):[]}},f.splitAt=function(n){return function(r){return n>=1&&f.isNonEmpty(r)?s.splitAt(n)(r):f.isEmpty(r)?[f.copy(r),[]]:[[],f.copy(r)]}},f.chunksOf=function(n){var r=s.chunksOf(n);return function(n){return f.isNonEmpty(n)?r(n):[]}},f.fromOptionK=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return f.fromOption(n.apply(void 0,r))}},f.comprehension=function(n,r,u){void 0===u&&(u=function(){return!0});var e=function(n,o){return f.isNonEmpty(o)?t.pipe(s.head(o),f.chain((function(r){return e(t.pipe(n,f.append(r)),s.tail(o))}))):u.apply(void 0,n)?[r.apply(void 0,n)]:[]};return e([],n)},f.concatW=function(n){return function(r){return f.isEmpty(r)?f.copy(n):f.isEmpty(n)?f.copy(r):r.concat(n)}},f.concat=f.concatW,f.union=x,f.intersection=U,f.difference=W;var O=function(n,r){return t.pipe(n,f.map(r))},j=function(n,r){return t.pipe(n,f.mapWithIndex(r))},g=function(n,r){return t.pipe(n,f.ap(r))},_=function(n,r){return t.pipe(n,f.chain(r))},y=function(n,r){return t.pipe(n,f.filter(r))},q=function(n,r){return t.pipe(n,f.filterMap(r))},w=function(n,r){return t.pipe(n,f.partition(r))},z=function(n,r){return t.pipe(n,f.partitionMap(r))},A=function(n,r){return t.pipe(n,f.partitionWithIndex(r))},L=function(n,r){return t.pipe(n,f.partitionMapWithIndex(r))},E=function(n,r){return t.pipe(n,f.alt(r))},N=function(n,r,u){return t.pipe(n,f.reduce(r,u))},S=function(n){var r=f.foldMap(n);return function(n,u){return t.pipe(n,r(u))}},k=function(n,r,u){return t.pipe(n,f.reduceRight(r,u))},C=function(n,r,u){return t.pipe(n,f.reduceWithIndex(r,u))},T=function(n){var r=f.foldMapWithIndex(n);return function(n,u){return t.pipe(n,r(u))}},D=function(n,r,u){return t.pipe(n,f.reduceRightWithIndex(r,u))},F=function(n,r){return t.pipe(n,f.filterMapWithIndex(r))},J=function(n,r){return t.pipe(n,f.filterWithIndex(r))},Z=function(n,r){return t.pipe(n,f.extend(r))},B=function(n){var r=f.traverse(n);return function(n,u){return t.pipe(n,r(u))}},G=function(n){var r=f.traverseWithIndex(n);return function(n,u){return t.pipe(n,r(u))}},H=M._chainRecDepthFirst,K=M._chainRecBreadthFirst;f.of=s.of,f.zero=function(){return[]},f.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},f.ap=function(n){return f.chain((function(r){return t.pipe(n,f.map(r))}))},f.chain=function(n){return function(r){return t.pipe(r,f.chainWithIndex((function(r,t){return n(t)})))}},f.flatten=f.chain(t.identity),f.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},f.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);I.isSome(e)&&t.push(e.value)}return t}},f.filterMap=function(n){return f.filterMapWithIndex((function(r,t){return n(t)}))},f.compact=f.filterMap(t.identity),f.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return p.separated(r,t)},f.filter=function(n){return function(r){return r.filter(n)}},f.partition=function(n){return f.partitionWithIndex((function(r,t){return n(t)}))},f.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return p.separated(t,u)}},f.partitionMap=function(n){return f.partitionMapWithIndex((function(r,t){return n(t)}))},f.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return p.separated(t,u)}},f.altW=function(n){return function(r){return r.concat(n())}},f.alt=f.altW,f.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},f.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},f.duplicate=f.extend(t.identity),f.foldMap=M.foldMap,f.foldMapWithIndex=M.foldMapWithIndex,f.reduce=M.reduce,f.reduceWithIndex=M.reduceWithIndex,f.reduceRight=M.reduceRight,f.reduceRightWithIndex=M.reduceRightWithIndex,f.traverse=function(n){var r=f.traverseWithIndex(n);return function(n){return r((function(r,t){return n(t)}))}},f.sequence=function(n){return function(r){return N(r,n.of(f.zero()),(function(r,u){return n.ap(n.map(r,(function(n){return function(r){return t.pipe(n,f.append(r))}})),u)}))}},f.traverseWithIndex=function(n){return function(r){return f.reduceWithIndex(n.of(f.zero()),(function(u,e,o){return n.ap(n.map(e,(function(n){return function(r){return t.pipe(n,f.append(r))}})),r(u,o))}))}},f.wither=function(n){var r=P(n);return function(n){return function(t){return r(t,n)}}},f.wilt=function(n){var r=Q(n);return function(n){return function(t){return r(t,n)}}},f.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!I.isSome(e))break;var o=e.value,i=o[1];t.push(o[0]),u=i}return t},f.URI="Array",f.getShow=M.getShow,f.getSemigroup=function(){return{concat:function(n,r){return n.concat(r)}}},f.getMonoid=function(){return{concat:f.getSemigroup().concat,empty:[]}},f.getEq=M.getEq,f.getOrd=M.getOrd,f.getUnionSemigroup=function(n){var r=x(n);return{concat:function(n,t){return r(t)(n)}}},f.getUnionMonoid=function(n){return{concat:f.getUnionSemigroup(n).concat,empty:[]}},f.getIntersectionSemigroup=function(n){var r=U(n);return{concat:function(n,t){return r(t)(n)}}},f.getDifferenceMagma=function(n){var r=W(n);return{concat:function(n,t){return r(t)(n)}}},f.Functor={URI:f.URI,map:O},f.flap=e.flap(f.Functor),f.Pointed={URI:f.URI,of:f.of},f.FunctorWithIndex={URI:f.URI,map:O,mapWithIndex:j},f.Apply={URI:f.URI,map:O,ap:g},f.apFirst=u.apFirst(f.Apply),f.apSecond=u.apSecond(f.Apply),f.Applicative={URI:f.URI,map:O,ap:g,of:f.of},f.Chain={URI:f.URI,map:O,ap:g,chain:_},f.chainFirst=o.chainFirst(f.Chain),f.Monad={URI:f.URI,map:O,ap:g,of:f.of,chain:_},f.Unfoldable={URI:f.URI,unfold:f.unfold},f.Alt={URI:f.URI,map:O,alt:E},f.Zero={URI:f.URI,zero:f.zero},f.guard=h.guard(f.Zero,f.Pointed),f.Alternative={URI:f.URI,map:O,ap:g,of:f.of,alt:E,zero:f.zero},f.Extend={URI:f.URI,map:O,extend:Z},f.Compactable={URI:f.URI,compact:f.compact,separate:f.separate},f.Filterable={URI:f.URI,map:O,compact:f.compact,separate:f.separate,filter:y,filterMap:q,partition:w,partitionMap:z},f.FilterableWithIndex={URI:f.URI,map:O,mapWithIndex:j,compact:f.compact,separate:f.separate,filter:y,filterMap:q,partition:w,partitionMap:z,partitionMapWithIndex:L,partitionWithIndex:A,filterMapWithIndex:F,filterWithIndex:J},f.Foldable={URI:f.URI,reduce:N,foldMap:S,reduceRight:k},f.FoldableWithIndex={URI:f.URI,reduce:N,foldMap:S,reduceRight:k,reduceWithIndex:C,foldMapWithIndex:T,reduceRightWithIndex:D},f.Traversable={URI:f.URI,map:O,reduce:N,foldMap:S,reduceRight:k,traverse:B,sequence:f.sequence},f.TraversableWithIndex={URI:f.URI,map:O,mapWithIndex:j,reduce:N,foldMap:S,reduceRight:k,reduceWithIndex:C,foldMapWithIndex:T,reduceRightWithIndex:D,traverse:B,sequence:f.sequence,traverseWithIndex:G};var P=l.witherDefault(f.Traversable,f.Compactable),Q=l.wiltDefault(f.Traversable,f.Compactable);f.Witherable={URI:f.URI,map:O,compact:f.compact,separate:f.separate,filter:y,filterMap:q,partition:w,partitionMap:z,reduce:N,foldMap:S,reduceRight:k,traverse:B,sequence:f.sequence,wither:P,wilt:Q},f.chainRecDepthFirst=M.chainRecDepthFirst,f.ChainRecDepthFirst={URI:f.URI,map:O,ap:g,chain:_,chainRec:H},f.chainRecBreadthFirst=M.chainRecBreadthFirst,f.ChainRecBreadthFirst={URI:f.URI,map:O,ap:g,chain:_,chainRec:K},f.filterE=l.filterE(f.Witherable),f.FromEither={URI:f.URI,fromEither:f.fromEither},f.fromEitherK=c.fromEitherK(f.FromEither),f.unsafeInsertAt=s.unsafeInsertAt,f.unsafeUpdateAt=function(n,r,t){return f.isNonEmpty(t)?s.unsafeUpdateAt(n,r,t):[]},f.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},f.every=M.every,f.some=function(n){return function(r){return r.some(n)}},f.exists=f.some,f.Do=f.of(I.emptyRecord),f.bindTo=e.bindTo(f.Functor),f.bind=o.bind(f.Chain),f.apS=u.apS(f.Apply),f.range=s.range,f.empty=[],f.cons=s.cons,f.snoc=s.snoc,f.prependToAll=f.prependAll,f.array={URI:f.URI,compact:f.compact,separate:f.separate,map:O,ap:g,of:f.of,chain:_,filter:y,filterMap:q,partition:w,partitionMap:z,mapWithIndex:j,partitionMapWithIndex:L,partitionWithIndex:A,filterMapWithIndex:F,filterWithIndex:J,alt:E,zero:f.zero,unfold:f.unfold,reduce:N,foldMap:S,reduceRight:k,traverse:B,sequence:f.sequence,reduceWithIndex:C,foldMapWithIndex:T,reduceRightWithIndex:D,traverseWithIndex:G,extend:Z,wither:P,wilt:Q}}));export{u as A,o as C,e as F,m as N,v as O,d as S,l as W,h as Z,t as _,c as a,n as b,r as c,p as d,M as e,i,I as n}