vviinn-widgets 2.7.2 → 2.7.3

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 (51) hide show
  1. package/dist/cjs/{index-df6896e2.js → cropper-handler_30.cjs.entry.js} +2323 -165
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  4. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +5 -2
  5. package/dist/esm/{app-globals-865bc7a7.js → app-globals-2f864b5d.js} +1 -1
  6. package/dist/esm/{index-2fdd499d.js → cropper-handler_30.entry.js} +2294 -119
  7. package/dist/esm/{index-443468c7.js → index-040cfca9.js} +2 -2
  8. package/dist/esm/{index-51f71d18.js → index-2d36a726.js} +1 -1
  9. package/dist/esm/loader.js +3 -3
  10. package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
  11. package/dist/esm/vviinn-vpr-button.entry.js +2 -2
  12. package/dist/esm/vviinn-widgets.js +3 -3
  13. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +1 -0
  14. package/dist/vviinn-widgets/{p-3469b71a.js → p-334db07e.js} +1 -1
  15. package/dist/vviinn-widgets/{p-40bea5b5.entry.js → p-a98df480.entry.js} +1 -1
  16. package/dist/vviinn-widgets/p-da99b592.entry.js +1 -0
  17. package/dist/vviinn-widgets/{p-a6e0710f.entry.js → p-dc124f62.entry.js} +1 -1
  18. package/dist/vviinn-widgets/{p-465d043d.js → p-e5a7f685.js} +1 -1
  19. package/dist/vviinn-widgets/{p-166970f3.js → p-fe8dc0b9.js} +1 -1
  20. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  21. package/package.json +1 -1
  22. package/www/build/{p-3469b71a.js → p-334db07e.js} +1 -1
  23. package/www/build/{p-40bea5b5.entry.js → p-a98df480.entry.js} +1 -1
  24. package/www/build/p-c5ef37e7.js +125 -0
  25. package/www/build/p-da99b592.entry.js +1 -0
  26. package/www/build/{p-a6e0710f.entry.js → p-dc124f62.entry.js} +1 -1
  27. package/www/build/p-e0153ae2.css +6 -0
  28. package/www/build/{p-465d043d.js → p-e5a7f685.js} +1 -1
  29. package/www/build/{p-166970f3.js → p-fe8dc0b9.js} +1 -1
  30. package/www/build/vviinn-widgets.esm.js +1 -1
  31. package/www/index.html +2495 -1
  32. package/dist/cjs/cropper-handler_27.cjs.entry.js +0 -1135
  33. package/dist/cjs/customized-slots-06ca4007.js +0 -53
  34. package/dist/cjs/vviinn-carousel_2.cjs.entry.js +0 -1001
  35. package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -43
  36. package/dist/esm/cropper-handler_27.entry.js +0 -1105
  37. package/dist/esm/customized-slots-96902edf.js +0 -50
  38. package/dist/esm/vviinn-carousel_2.entry.js +0 -996
  39. package/dist/esm/vviinn-vps-button.entry.js +0 -39
  40. package/dist/vviinn-widgets/p-2dd35f19.entry.js +0 -1
  41. package/dist/vviinn-widgets/p-59bd2a99.js +0 -1
  42. package/dist/vviinn-widgets/p-74ed36af.entry.js +0 -1
  43. package/dist/vviinn-widgets/p-9def6b8b.entry.js +0 -1
  44. package/dist/vviinn-widgets/p-cd995515.js +0 -1
  45. package/www/build/p-2dd35f19.entry.js +0 -1
  46. package/www/build/p-59bd2a99.js +0 -1
  47. package/www/build/p-61933b75.js +0 -1
  48. package/www/build/p-74ed36af.entry.js +0 -1
  49. package/www/build/p-9def6b8b.entry.js +0 -1
  50. package/www/build/p-a67898be.css +0 -1
  51. package/www/build/p-cd995515.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as n,h as t,H as r,g as e,f as i,c as o,a as u}from"./p-334db07e.js";import{C as c,a,O as s,b as f,c as l,A as d,d as h}from"./p-fe8dc0b9.js";function p(n){return n}function v(n,t,r,e,i,o,u,c,a){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 i(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return o(i(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return u(o(i(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(u(o(i(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return a(c(u(o(i(e(r(t(n.apply(this,arguments)))))))))}}}function m(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n}function g(n,t,r,e,i,o,u,c,a){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 i(e(r(t(n))));case 6:return o(i(e(r(t(n)))));case 7:return u(o(i(e(r(t(n))))));case 8:return c(u(o(i(e(r(t(n)))))));case 9:return a(c(u(o(i(e(r(t(n))))))));default:for(var s=arguments[0],f=1;f<arguments.length;f++)s=arguments[f](s);return s}}var b={_tag:"None"},w=function(n){return{_tag:"Left",left:n}},y=function(n){return{_tag:"Right",right:n}},x=Object.prototype.hasOwnProperty,I=function(n){return{concat:function(t,r){var e={};for(var i in n)x.call(n,i)&&(e[i]=n[i].concat(t[i],r[i]));return e}}},_={concat:function(n,t){return n+t}};const j={concat:(n,t)=>n-t},k=({x:n,y:t})=>({x:n,y:t}),O=({clientX:n,clientY:t})=>({x:n,y:t}),R=I({x:j,y:j}),M=I({x:_,y:_});var U;!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"}(U||(U={}));const E=n=>{switch(n){case U.East:return"e-resize";case U.North:return"n-resize";case U.NorthEast:return"ne-resize";case U.NorthWest:return"nw-resize";case U.South:return"s-resize";case U.SouthEast:return"se-resize";case U.SouthWest:return"sw-resize";case U.West:return"w-resize";default:return"pointer"}};let z=class{constructor(t){n(this,t),this.disabled=!1}render(){return t(r,{part:`handle ${E(this.handler.direction)}`,class:{disabled:this.disabled,[E(this.handler.direction)]:!0},style:{"--size":"20px",cursor:E(this.handler.direction)},draggable:!1})}};z.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}";var C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(n,t,r){return n(r={path:t,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}var A=S((function(n,t){function r(n){return n}function e(n){return function(){return n}}function i(n,t,r,e,i,o,u,c,a){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 i(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return o(i(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return u(o(i(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(u(o(i(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return a(c(u(o(i(e(r(t(n.apply(this,arguments)))))))))}}}function o(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(t,"__esModule",{value:!0}),t.getEndomorphismMonoid=t.not=t.SK=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.unsafeCoerce=t.identity=t.apply=t.getRing=t.getSemiring=t.getMonoid=t.getSemigroup=t.getBooleanAlgebra=void 0,t.getBooleanAlgebra=function(n){return function(){return{meet:function(t,r){return function(e){return n.meet(t(e),r(e))}},join:function(t,r){return function(e){return n.join(t(e),r(e))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(t,r){return function(e){return n.implies(t(e),r(e))}},not:function(t){return function(r){return n.not(t(r))}}}}},t.getSemigroup=function(n){return function(){return{concat:function(t,r){return function(e){return n.concat(t(e),r(e))}}}}},t.getMonoid=function(n){var r=(0,t.getSemigroup)(n);return function(){return{concat:r().concat,empty:function(){return n.empty}}}},t.getSemiring=function(n){return{add:function(t,r){return function(e){return n.add(t(e),r(e))}},zero:function(){return n.zero},mul:function(t,r){return function(e){return n.mul(t(e),r(e))}},one:function(){return n.one}}},t.getRing=function(n){var r=(0,t.getSemiring)(n);return{add:r.add,mul:r.mul,one:r.one,zero:r.zero,sub:function(t,r){return function(e){return n.sub(t(e),r(e))}}}},t.apply=function(n){return function(t){return t(n)}},t.identity=r,t.unsafeCoerce=r,t.constant=e,t.constTrue=e(!0),t.constFalse=e(!1),t.constNull=e(null),t.constUndefined=e(void 0),t.constVoid=t.constUndefined,t.flip=function(n){return function(t,r){return n(r,t)}},t.flow=i,t.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n},t.increment=function(n){return n+1},t.decrement=function(n){return n-1},t.absurd=o,t.tupled=function(n){return function(t){return n.apply(void 0,t)}},t.untupled=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return n(t)}},t.pipe=function(n,t,r,e,i,o,u,c,a){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 i(e(r(t(n))));case 6:return o(i(e(r(t(n)))));case 7:return u(o(i(e(r(t(n))))));case 8:return c(u(o(i(e(r(t(n)))))));case 9:return a(c(u(o(i(e(r(t(n))))))));default:for(var s=arguments[0],f=1;f<arguments.length;f++)s=arguments[f](s);return s}},t.hole=o,t.SK=function(n,t){return t},t.not=function(n){return function(t){return!n(t)}},t.getEndomorphismMonoid=function(){return{concat:function(n,t){return i(n,t)},empty:r}}})),W=S((function(n,t){var r=C&&C.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,i=0,o=t.length;i<o;i++)!e&&i in t||(e||(e=Array.prototype.slice.call(t,0,i)),e[i]=t[i]);return n.concat(e||Array.prototype.slice.call(t))};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 r([n[0]],n.slice(1),!0)}})),P=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceS=t.sequenceT=t.getApplySemigroup=t.apS=t.apSecond=t.apFirst=t.ap=void 0;var o=i(W);function u(n,t,r){return function(e){for(var i=Array(r.length+1),o=0;o<r.length;o++)i[o]=r[o];return i[r.length]=e,0===t?n.apply(null,i):u(n,t-1,i)}}t.ap=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)}}},t.apFirst=function(n){return function(t){return function(r){return n.ap(n.map(r,(function(n){return function(){return n}})),t)}}},t.apSecond=function(n){return function(t){return function(r){return n.ap(n.map(r,(function(){return function(n){return n}})),t)}}},t.apS=function(n){return function(t,r){return function(e){return n.ap(n.map(e,(function(n){return function(r){var e;return Object.assign({},n,((e={})[t]=r,e))}})),r)}}},t.getApplySemigroup=function(n){return function(t){return{concat:function(r,e){return n.ap(n.map(r,(function(n){return function(r){return t.concat(n,r)}})),e)}}}};var c={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(i){return[n,t,r,e,i]}}}}}};function a(n){return o.has.call(c,n)||(c[n]=u(A.tuple,n-1,[])),c[n]}t.sequenceT=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=t.length,i=a(e),o=n.map(t[0],i),u=1;u<e;u++)o=n.ap(o,t[u]);return o}},t.sequenceS=function(n){return function(t){for(var r=Object.keys(t),e=r.length,i=function(n){var t=n.length;switch(t){case 1:return function(t){var r;return(r={})[n[0]]=t,r};case 2:return function(t){return function(r){var e;return(e={})[n[0]]=t,e[n[1]]=r,e}};case 3:return function(t){return function(r){return function(e){var i;return(i={})[n[0]]=t,i[n[1]]=r,i[n[2]]=e,i}}};case 4:return function(t){return function(r){return function(e){return function(i){var o;return(o={})[n[0]]=t,o[n[1]]=r,o[n[2]]=e,o[n[3]]=i,o}}}};case 5:return function(t){return function(r){return function(e){return function(i){return function(o){var u;return(u={})[n[0]]=t,u[n[1]]=r,u[n[2]]=e,u[n[3]]=i,u[n[4]]=o,u}}}}};default:return u((function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var i={},o=0;o<t;o++)i[n[o]]=r[o];return i}),t-1,[])}}(r),o=n.map(t[r[0]],i),c=1;c<e;c++)o=n.ap(o,t[r[c]]);return o}}})),T=S((function(n,t){function r(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctorComposition=t.bindTo=t.flap=t.map=void 0,t.map=r,t.flap=function(n){return function(t){return function(r){return n.map(r,(function(n){return n(t)}))}}},t.bindTo=function(n){return function(t){return function(r){return n.map(r,(function(n){var r;return(r={})[t]=n,r}))}}},t.getFunctorComposition=function(n,t){var e=r(n,t);return{map:function(n,t){return(0,A.pipe)(n,e(t))}}}})),N=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicativeComposition=t.getApplicativeMonoid=void 0,t.getApplicativeMonoid=function(n){var t=(0,P.getApplySemigroup)(n);return function(r){return{concat:t(r).concat,empty:n.of(r.empty)}}},t.getApplicativeComposition=function(n,t){var r=(0,T.getFunctorComposition)(n,t).map,e=(0,P.ap)(n,t);return{map:r,of:function(r){return n.of(t.of(r))},ap:function(n,t){return(0,A.pipe)(n,e(t))}}}})),F=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bind=t.chainFirst=void 0,t.chainFirst=function(n){return function(t){return function(r){return n.chain(r,(function(r){return n.map(t(r),(function(){return r}))}))}}},t.bind=function(n){return function(t,r){return function(e){return n.chain(e,(function(e){return n.map(r(e),(function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}))}))}}}})),D=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterOrElse=t.chainFirstEitherK=t.chainEitherK=t.fromEitherK=t.chainOptionK=t.fromOptionK=t.fromPredicate=t.fromOption=void 0;var o=i(W);function u(n){return function(t){return function(r){return n.fromEither(o.isNone(r)?o.left(t()):o.right(r.value))}}}function c(n){var t=u(n);return function(n){var r=t(n);return function(n){return(0,A.flow)(n,r)}}}function a(n){return function(t){return(0,A.flow)(t,n.fromEither)}}t.fromOption=u,t.fromPredicate=function(n){return function(t,r){return function(e){return n.fromEither(t(e)?o.right(e):o.left(r(e)))}}},t.fromOptionK=c,t.chainOptionK=function(n,t){var r=c(n);return function(n){var e=r(n);return function(n){return function(r){return t.chain(r,e(n))}}}},t.fromEitherK=a,t.chainEitherK=function(n,t){var r=a(n);return function(n){return function(e){return t.chain(e,r(n))}}},t.chainFirstEitherK=function(n,t){return(0,A.flow)(a(n),(0,F.chainFirst)(t))},t.filterOrElse=function(n,t){return function(r,e){return function(i){return t.chain(i,(function(t){return n.fromEither(r(t)?o.right(t):o.left(e(t)))}))}}}})),L=S((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(0,A.flow)(n,t)}},t.URI="Predicate",t.getSemigroupAny=function(){return{concat:function(n,r){return(0,A.pipe)(n,(0,t.or)(r))}}},t.getMonoidAny=function(){return{concat:(0,t.getSemigroupAny)().concat,empty:A.constFalse}},t.getSemigroupAll=function(){return{concat:function(n,r){return(0,A.pipe)(n,(0,t.and)(r))}}},t.getMonoidAll=function(){return{concat:(0,t.getSemigroupAll)().concat,empty:A.constTrue}},t.Contravariant={URI:t.URI,contramap:function(n,r){return(0,A.pipe)(n,(0,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)}}}})),q=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=t.endo=t.filterSecond=t.filterFirst=t.reverse=void 0,t.reverse=function(n){return{concat:function(t,r){return n.concat(r,t)}}},t.filterFirst=function(n){return function(t){return{concat:function(r,e){return n(r)?t.concat(r,e):e}}}},t.filterSecond=function(n){return function(t){return{concat:function(r,e){return n(e)?t.concat(r,e):r}}}},t.endo=function(n){return function(t){return{concat:function(r,e){return t.concat(n(r),n(e))}}}},t.concatAll=function(n){return function(t){return function(r){return r.reduce((function(t,r){return n.concat(t,r)}),t)}}}})),$=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.eqDate=t.eqNumber=t.eqString=t.eqBoolean=t.eq=t.strictEqual=t.getStructEq=t.getTupleEq=t.Contravariant=t.getMonoid=t.getSemigroup=t.eqStrict=t.URI=t.contramap=t.tuple=t.struct=t.fromEquals=void 0,t.fromEquals=function(n){return{equals:function(t,r){return t===r||n(t,r)}}},t.struct=function(n){return(0,t.fromEquals)((function(t,r){for(var e in n)if(!n[e].equals(t[e],r[e]))return!1;return!0}))},t.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(0,t.fromEquals)((function(t,r){return n.every((function(n,e){return n.equals(t[e],r[e])}))}))},t.contramap=function(n){return function(r){return(0,t.fromEquals)((function(t,e){return r.equals(n(t),n(e))}))}},t.URI="Eq",t.eqStrict={equals:function(n,t){return n===t}};var r={equals:function(){return!0}};t.getSemigroup=function(){return{concat:function(n,r){return(0,t.fromEquals)((function(t,e){return n.equals(t,e)&&r.equals(t,e)}))}}},t.getMonoid=function(){return{concat:(0,t.getSemigroup)().concat,empty:r}},t.Contravariant={URI:t.URI,contramap:function(n,r){return(0,A.pipe)(n,(0,t.contramap)(r))}},t.getTupleEq=t.tuple,t.getStructEq=t.struct,t.strictEqual=t.eqStrict.equals,t.eq=t.Contravariant,t.eqBoolean=t.eqStrict,t.eqString=t.eqStrict,t.eqNumber=t.eqStrict,t.eqDate={equals:function(n,t){return n.valueOf()===t.valueOf()}}})),V=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ordDate=t.ordNumber=t.ordString=t.ordBoolean=t.ord=t.getDualOrd=t.getTupleOrd=t.between=t.clamp=t.max=t.min=t.geq=t.leq=t.gt=t.lt=t.equals=t.trivial=t.Contravariant=t.getMonoid=t.getSemigroup=t.URI=t.contramap=t.reverse=t.tuple=t.fromCompare=t.equalsDefault=void 0,t.equalsDefault=function(n){return function(t,r){return t===r||0===n(t,r)}},t.fromCompare=function(n){return{equals:(0,t.equalsDefault)(n),compare:function(t,r){return t===r?0:n(t,r)}}},t.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(0,t.fromCompare)((function(t,r){for(var e=0;e<n.length-1;e++){var i=n[e].compare(t[e],r[e]);if(0!==i)return i}return n[e].compare(t[e],r[e])}))},t.reverse=function(n){return(0,t.fromCompare)((function(t,r){return n.compare(r,t)}))},t.contramap=function(n){return function(r){return(0,t.fromCompare)((function(t,e){return r.compare(n(t),n(e))}))}},t.URI="Ord",t.getSemigroup=function(){return{concat:function(n,r){return(0,t.fromCompare)((function(t,e){var i=n.compare(t,e);return 0!==i?i:r.compare(t,e)}))}}},t.getMonoid=function(){return{concat:(0,t.getSemigroup)().concat,empty:(0,t.fromCompare)((function(){return 0}))}},t.Contravariant={URI:t.URI,contramap:function(n,r){return(0,A.pipe)(n,(0,t.contramap)(r))}},t.trivial={equals:A.constTrue,compare:(0,A.constant)(0)},t.equals=function(n){return function(t){return function(r){return r===t||0===n.compare(r,t)}}},t.lt=function(n){return function(t,r){return-1===n.compare(t,r)}},t.gt=function(n){return function(t,r){return 1===n.compare(t,r)}},t.leq=function(n){return function(t,r){return 1!==n.compare(t,r)}},t.geq=function(n){return function(t,r){return-1!==n.compare(t,r)}},t.min=function(n){return function(t,r){return t===r||n.compare(t,r)<1?t:r}},t.max=function(n){return function(t,r){return t===r||n.compare(t,r)>-1?t:r}},t.clamp=function(n){var r=(0,t.min)(n),e=(0,t.max)(n);return function(n,t){return function(i){return e(r(i,t),n)}}},t.between=function(n){var r=(0,t.lt)(n),e=(0,t.gt)(n);return function(n,t){return function(i){return!r(i,n)&&!e(i,t)}}},t.getTupleOrd=t.tuple,t.getDualOrd=t.reverse,t.ord=t.Contravariant;var r={equals:$.eqStrict.equals,compare:function(n,t){return n<t?-1:n>t?1:0}};t.ordBoolean=r,t.ordString=r,t.ordNumber=r,t.ordDate=(0,A.pipe)(t.ordNumber,(0,t.contramap)((function(n){return n.valueOf()})))})),B=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.semigroupProduct=t.semigroupSum=t.semigroupString=t.getFunctionSemigroup=t.semigroupAny=t.semigroupAll=t.fold=t.getIntercalateSemigroup=t.getMeetSemigroup=t.getJoinSemigroup=t.getDualSemigroup=t.getStructSemigroup=t.getTupleSemigroup=t.getFirstSemigroup=t.getLastSemigroup=t.getObjectSemigroup=t.semigroupVoid=t.concatAll=t.last=t.first=t.intercalate=t.tuple=t.struct=t.reverse=t.constant=t.max=t.min=void 0;var o=i(W),u=i(q),c=i(V);t.min=function(n){return{concat:c.min(n)}},t.max=function(n){return{concat:c.max(n)}},t.constant=function(n){return{concat:function(){return n}}},t.reverse=u.reverse,t.struct=function(n){return{concat:function(t,r){var e={};for(var i in n)o.has.call(n,i)&&(e[i]=n[i].concat(t[i],r[i]));return e}}},t.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return{concat:function(t,r){return n.map((function(n,e){return n.concat(t[e],r[e])}))}}},t.intercalate=function(n){return function(t){return{concat:function(r,e){return t.concat(r,t.concat(n,e))}}}},t.first=function(){return{concat:A.identity}},t.last=function(){return{concat:function(n,t){return t}}},t.concatAll=u.concatAll,t.semigroupVoid=(0,t.constant)(void 0),t.getObjectSemigroup=function(){return{concat:function(n,t){return Object.assign({},n,t)}}},t.getLastSemigroup=t.last,t.getFirstSemigroup=t.first,t.getTupleSemigroup=t.tuple,t.getStructSemigroup=t.struct,t.getDualSemigroup=t.reverse,t.getJoinSemigroup=t.max,t.getMeetSemigroup=t.min,t.getIntercalateSemigroup=t.intercalate,t.fold=function(n){var r=(0,t.concatAll)(n);return function(n,t){return void 0===t?r(n):r(n)(t)}},t.semigroupAll={concat:function(n,t){return n&&t}},t.semigroupAny={concat:function(n,t){return n||t}},t.getFunctionSemigroup=A.getSemigroup,t.semigroupString={concat:function(n,t){return n+t}},t.semigroupSum={concat:function(n,t){return n+t}},t.semigroupProduct={concat:function(n,t){return n*t}}})),G=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.right=t.left=t.flap=t.Functor=t.Bifunctor=t.URI=t.bimap=t.mapLeft=t.map=t.separated=void 0,t.separated=function(n,t){return{left:n,right:t}},t.map=function(n){return function(r){return(0,t.separated)((0,t.left)(r),n((0,t.right)(r)))}},t.mapLeft=function(n){return function(r){return(0,t.separated)(n((0,t.left)(r)),(0,t.right)(r))}},t.bimap=function(n,r){return function(e){return(0,t.separated)(n((0,t.left)(e)),r((0,t.right)(e)))}},t.URI="Separated",t.Bifunctor={URI:t.URI,mapLeft:function(n,r){return(0,A.pipe)(n,(0,t.mapLeft)(r))},bimap:function(n,r,e){return(0,A.pipe)(n,(0,t.bimap)(r,e))}},t.Functor={URI:t.URI,map:function(n,r){return(0,A.pipe)(n,(0,t.map)(r))}},t.flap=(0,T.flap)(t.Functor),t.left=function(n){return n.left},t.right=function(n){return n.right}})),H=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterE=t.witherDefault=t.wiltDefault=void 0;var o=i(W);t.wiltDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,i){return r.map(e(n,i),t.separate)}}},t.witherDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,i){return r.map(e(n,i),t.compact)}}},t.filterE=function(n){return function(t){var r=n.wither(t);return function(n){return function(e){return r(e,(function(r){return t.map(n(r),(function(n){return n?o.some(r):o.none}))}))}}}}})),K=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.guard=void 0,t.guard=function(n,t){return function(r){return r?t.of(void 0):n.zero()}}})),Z=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(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.chainFirstEitherK=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 o=i(W);t.none=o.none,t.some=o.some,t.fromPredicate=function(n){return function(r){return n(r)?(0,t.some)(r):t.none}},t.getLeft=function(n){return"Right"===n._tag?t.none:(0,t.some)(n.left)},t.getRight=function(n){return"Left"===n._tag?t.none:(0,t.some)(n.right)};var u=function(n,r){return(0,A.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,A.pipe)(n,(0,t.ap)(r))},a=function(n,r){return(0,A.pipe)(n,(0,t.chain)(r))},s=function(n,r,e){return(0,A.pipe)(n,(0,t.reduce)(r,e))},f=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},l=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRight)(r,e))},d=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},h=function(n,r){return(0,A.pipe)(n,(0,t.alt)(r))},p=function(n,r){return(0,A.pipe)(n,(0,t.filter)(r))},v=function(n,r){return(0,A.pipe)(n,(0,t.filterMap)(r))},m=function(n,r){return(0,A.pipe)(n,(0,t.extend)(r))},g=function(n,r){return(0,A.pipe)(n,(0,t.partition)(r))},b=function(n,r){return(0,A.pipe)(n,(0,t.partitionMap)(r))};t.URI="Option",t.getShow=function(n){return{show:function(r){return(0,t.isNone)(r)?"none":"some(".concat(n.show(r.value),")")}}},t.getEq=function(n){return{equals:function(r,e){return r===e||((0,t.isNone)(r)?(0,t.isNone)(e):!(0,t.isNone)(e)&&n.equals(r.value,e.value))}}},t.getOrd=function(n){return{equals:(0,t.getEq)(n).equals,compare:function(r,e){return r===e?0:(0,t.isSome)(r)?(0,t.isSome)(e)?n.compare(r.value,e.value):1:-1}}},t.getMonoid=function(n){return{concat:function(r,e){return(0,t.isNone)(r)?e:(0,t.isNone)(e)?r:(0,t.some)(n.concat(r.value,e.value))},empty:t.none}},t.map=function(n){return function(r){return(0,t.isNone)(r)?t.none:(0,t.some)(n(r.value))}},t.Functor={URI:t.URI,map:u},t.of=t.some,t.Pointed={URI:t.URI,of:t.of},t.ap=function(n){return function(r){return(0,t.isNone)(r)||(0,t.isNone)(n)?t.none:(0,t.some)(r.value(n.value))}},t.Apply={URI:t.URI,map:u,ap:c},t.Applicative={URI:t.URI,map:u,ap:c,of:t.of},t.chain=function(n){return function(r){return(0,t.isNone)(r)?t.none:n(r.value)}},t.Chain={URI:t.URI,map:u,ap:c,chain:a},t.Monad={URI:t.URI,map:u,ap:c,of:t.of,chain:a},t.reduce=function(n,r){return function(e){return(0,t.isNone)(e)?n:r(n,e.value)}},t.foldMap=function(n){return function(r){return function(e){return(0,t.isNone)(e)?n.empty:r(e.value)}}},t.reduceRight=function(n,r){return function(e){return(0,t.isNone)(e)?n:r(e.value,n)}},t.Foldable={URI:t.URI,reduce:s,foldMap:f,reduceRight:l},t.altW=function(n){return function(r){return(0,t.isNone)(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:u,alt:h},t.zero=function(){return t.none},t.Zero={URI:t.URI,zero:t.zero},t.guard=(0,K.guard)(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:u,ap:c,of:t.of,alt:h,zero:t.zero},t.extend=function(n){return function(r){return(0,t.isNone)(r)?t.none:(0,t.some)(n(r))}},t.Extend={URI:t.URI,map:u,extend:m},t.compact=(0,t.chain)(A.identity);var w=(0,G.separated)(t.none,t.none);t.separate=function(n){return(0,t.isNone)(n)?w:(0,G.separated)((0,t.getLeft)(n.value),(0,t.getRight)(n.value))},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.filter=function(n){return function(r){return(0,t.isNone)(r)?t.none:n(r.value)?r:t.none}},t.filterMap=function(n){return function(r){return(0,t.isNone)(r)?t.none:n(r.value)}},t.partition=function(n){return function(t){return(0,G.separated)(p(t,(0,L.not)(n)),p(t,n))}},t.partitionMap=function(n){return(0,A.flow)((0,t.map)(n),t.separate)},t.Filterable={URI:t.URI,map:u,compact:t.compact,separate:t.separate,filter:p,filterMap:v,partition:g,partitionMap:b},t.traverse=function(n){return function(r){return function(e){return(0,t.isNone)(e)?n.of(t.none):n.map(r(e.value),t.some)}}},t.sequence=function(n){return function(r){return(0,t.isNone)(r)?n.of(t.none):n.map(r.value,t.some)}},t.Traversable={URI:t.URI,map:u,reduce:s,foldMap:f,reduceRight:l,traverse:d,sequence:t.sequence};var y=(0,H.witherDefault)(t.Traversable,t.Compactable),x=(0,H.wiltDefault)(t.Traversable,t.Compactable);t.wither=function(n){var t=y(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=x(n);return function(n){return function(r){return t(r,n)}}},t.Witherable={URI:t.URI,map:u,reduce:s,foldMap:f,reduceRight:l,traverse:d,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:p,filterMap:v,partition:g,partitionMap:b,wither:y,wilt:x},t.throwError=function(){return t.none},t.MonadThrow={URI:t.URI,map:u,ap:c,of:t.of,chain:a,throwError:t.throwError},t.fromEither=t.getRight,t.FromEither={URI:t.URI,fromEither:t.fromEither},t.isSome=o.isSome,t.isNone=function(n){return"None"===n._tag},t.matchW=function(n,r){return function(e){return(0,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(0,t.isNone)(r)?n():r.value}},t.getOrElse=t.getOrElseW,t.flap=(0,T.flap)(t.Functor),t.apFirst=(0,P.apFirst)(t.Apply),t.apSecond=(0,P.apSecond)(t.Apply),t.flatten=t.compact,t.chainFirst=(0,F.chainFirst)(t.Chain),t.duplicate=(0,t.extend)(A.identity),t.fromEitherK=(0,D.fromEitherK)(t.FromEither),t.chainEitherK=(0,D.chainEitherK)(t.FromEither,t.Chain),t.chainFirstEitherK=(0,D.chainFirstEitherK)(t.FromEither,t.Chain),t.fromNullable=function(n){return null==n?t.none:(0,t.some)(n)},t.tryCatch=function(n){try{return(0,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(0,t.tryCatch)((function(){return n.apply(void 0,r)}))}},t.fromNullableK=function(n){return(0,A.flow)(n,t.fromNullable)},t.chainNullableK=function(n){return function(r){return(0,t.isNone)(r)?t.none:(0,t.fromNullable)(n(r.value))}},t.toNullable=(0,t.match)(A.constNull,A.identity),t.toUndefined=(0,t.match)(A.constUndefined,A.identity),t.elem=function n(r){return function(e,i){if(void 0===i){var o=n(r);return function(n){return o(e,n)}}return!(0,t.isNone)(i)&&r.equals(e,i.value)}},t.exists=function(n){return function(r){return!(0,t.isNone)(r)&&n(r.value)}},t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,T.bindTo)(t.Functor),t.bind=(0,F.bind)(t.Chain),t.apS=(0,P.apS)(t.Apply),t.ApT=(0,t.of)(o.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,o.head(r));if((0,t.isNone)(e))return t.none;for(var i=[e.value],u=1;u<r.length;u++){var c=n(u,r[u]);if((0,t.isNone)(c))return t.none;i.push(c.value)}return(0,t.some)(i)}},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return o.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return(0,t.traverseReadonlyArrayWithIndex)((function(t,r){return n(r)}))},t.sequenceArray=(0,t.traverseArray)(A.identity),t.getRefinement=function(n){return function(r){return(0,t.isSome)(n(r))}},t.mapNullable=t.chainNullableK,t.option={URI:t.URI,map:u,of:t.of,ap:c,chain:a,reduce:s,foldMap:f,reduceRight:l,traverse:d,sequence:t.sequence,zero:t.zero,alt:h,extend:m,compact:t.compact,separate:t.separate,filter:p,filterMap:v,partition:g,partitionMap:b,wither:y,wilt:x,throwError:t.throwError},t.getApplySemigroup=(0,P.getApplySemigroup)(t.Apply),t.getApplyMonoid=(0,N.getApplicativeMonoid)(t.Applicative),t.getFirstMonoid=function(){return(0,t.getMonoid)((0,B.first)())},t.getLastMonoid=function(){return(0,t.getMonoid)((0,B.last)())}}));const Y=n=>!("isConnected"in n)||n.isConnected,J=(()=>{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(Y))})(...t)}),2e3)}})(),X=(n,t)=>{const r=((n,t=((n,t)=>n!==t))=>{let r=new Map(Object.entries(null!=n?n:{}));const e={dispose:[],get:[],set:[],reset:[]},i=()=>{r=new Map(Object.entries(null!=n?n:{})),e.reset.forEach((n=>n()))},o=n=>(e.get.forEach((t=>t(n))),r.get(n)),u=(n,i)=>{const o=r.get(n);t(i,o,n)&&(r.set(n,i),e.set.forEach((t=>t(n,i,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)=>(u(t,r),!0)}),a=(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:u,on:a,onChange:(t,r)=>{const e=a("set",((n,e)=>{n===t&&r(e)})),i=a("reset",(()=>r(n[t])));return()=>{e(),i()}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(a("set",t.set)),t.get&&n.push(a("get",t.get)),t.reset&&n.push(a("reset",t.reset)),t.dispose&&n.push(a("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{e.dispose.forEach((n=>n())),i()},reset:i,forceUpdate:n=>{const t=r.get(n);e.set.forEach((r=>r(n,t,t)))}}})(n,t);return r.use((()=>{if("function"!=typeof e)return{};const n=new Map;return{dispose:()=>n.clear(),get:t=>{const r=e();r&&((n,t,r)=>{const e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])})(n,t,r)},set:t=>{const r=n.get(t);r&&n.set(t,r.filter(i)),J(n)},reset:()=>{n.forEach((n=>n.forEach(i))),J(n)}}})()),r};function Q(n,t,r){return function(e){for(var i=Array(r.length+1),o=0;o<r.length;o++)i[o]=r[o];return i[r.length]=e,0===t?n.apply(null,i):Q(n,t-1,i)}}var nn={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(i){return[n,t,r,e,i]}}}}}};function tn(n){return x.call(nn,n)||(nn[n]=Q(m,n-1,[])),nn[n]}function rn(n){return function(t){return function(r){return n.fromEither("None"===r._tag?w(t()):y(r.value))}}}var en=w,on=y,un=function(n,t){return g(n,cn(t))},cn=function(n){return function(t){return dn(t)?t:on(n(t.right))}},an={URI:"Either",map:un},sn={URI:"Either",map:un,ap:function(n,t){return g(n,function(n){return function(t){return dn(t)?t:dn(n)?n:on(t.right(n.right))}}(t))}},fn=function(n){return function(t){return dn(t)?en(n(t.left)):t}},ln=rn({URI:"Either",fromEither:p}),dn=function(n){return"Left"===n._tag},hn=b,pn=function(n){return{_tag:"Some",value:n}},vn=function(n){return{concat:function(t,r){return gn(t)?r:gn(r)?t:pn(n.concat(t.value,r.value))},empty:hn}},mn=function(n){return function(t){return gn(t)?hn:pn(n(t.value))}},gn=function(n){return"None"===n._tag},bn=function(n,t){return function(r){return gn(r)?n():t(r.value)}},wn=bn,yn=function(n){return null==n?hn:pn(n)};function xn(n){return function(t){return n.map(t,on)}}function In(n){return function(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}(n,an)}function _n(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,sn)}function jn(n){return function(t){return function(r){return n.chain(r,(function(r){return dn(r)?n.of(r):t(r.right)}))}}}function kn(n){return function(t){return function(r){return n.map(r,fn(t))}}}function On(n,t){return function(r){var e=v(r,n.fromTask);return function(n){return t.chain(n,e)}}}var Rn=function(n){return function(){return Promise.resolve().then(n)}},Mn=function(n,t){return g(n,En(t))},Un=function(n,t){return g(n,zn(t))},En=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},zn=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])}))}}},Cn=function(n){return function(){return Promise.resolve(n)}},Sn={URI:"Task",map:Mn},An={URI:"Task",map:Mn,ap:Un},Wn={URI:"Task",map:Mn,of:Cn,ap:Un,chain:function(n,t){return g(n,function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}}(t))}},Pn=xn(Sn),Tn=v(Rn,Pn),Nn=Pn,Fn=Cn,Dn=In(Sn),Ln=kn(Sn),qn=_n(An),$n=jn(Wn),Vn=$n,Bn="TaskEither",Gn={URI:Bn,map:function(n,t){return g(n,Dn(t))},ap:function(n,t){return g(n,qn(t))},chain:function(n,t){return g(n,$n(t))}},Hn=rn({URI:Bn,fromEither:Fn}),Kn=On({URI:Bn,fromIO:Tn,fromTask:Nn},Gn),Zn=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactableComposition=t.separate=t.compact=void 0;var o=i(G);function u(n,t){return function(r){return n.map(r,t.compact)}}function c(n,t,r){var e=u(n,t),i=(0,T.map)(n,r);return function(n){return o.separated(e((0,A.pipe)(n,i(Z.getLeft))),e((0,A.pipe)(n,i(Z.getRight))))}}t.compact=u,t.separate=c,t.getCompactableComposition=function(n,t){return{map:(0,T.getFunctorComposition)(n,t).map,compact:u(n,t),separate:c(n,t,t)}}})),Yn=S((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}})),Jn=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(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.apSecondW=t.apSecond=t.apFirstW=t.apFirst=t.flap=t.getOrElse=t.getOrElseW=void 0;var o=i(W);t.left=o.left,t.right=o.right;var u=function(n,r){return(0,A.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,A.pipe)(n,(0,t.ap)(r))},a=function(n,r){return(0,A.pipe)(n,(0,t.chain)(r))},s=function(n,r,e){return(0,A.pipe)(n,(0,t.reduce)(r,e))},f=function(n){return function(r,e){var i=(0,t.foldMap)(n);return(0,A.pipe)(r,i(e))}},l=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRight)(r,e))},d=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},h=function(n,r,e){return(0,A.pipe)(n,(0,t.bimap)(r,e))},p=function(n,r){return(0,A.pipe)(n,(0,t.mapLeft)(r))},v=function(n,r){return(0,A.pipe)(n,(0,t.alt)(r))},m=function(n,r){return(0,A.pipe)(n,(0,t.extend)(r))},g=function(n,r){return(0,Yn.tailRec)(r(n),(function(n){return(0,t.isLeft)(n)?(0,t.right)((0,t.left)(n.left)):(0,t.isLeft)(n.right)?(0,t.left)(r(n.right.left)):(0,t.right)((0,t.right)(n.right.right))}))};t.URI="Either",t.getShow=function(n,r){return{show:function(e){return(0,t.isLeft)(e)?"left(".concat(n.show(e.left),")"):"right(".concat(r.show(e.right),")")}}},t.getEq=function(n,r){return{equals:function(e,i){return e===i||((0,t.isLeft)(e)?(0,t.isLeft)(i)&&n.equals(e.left,i.left):(0,t.isRight)(i)&&r.equals(e.right,i.right))}}},t.getSemigroup=function(n){return{concat:function(r,e){return(0,t.isLeft)(e)?r:(0,t.isLeft)(r)?e:(0,t.right)(n.concat(r.right,e.right))}}},t.getCompactable=function(n){var r=(0,t.left)(n.empty);return{URI:t.URI,_E:void 0,compact:function(n){return(0,t.isLeft)(n)?n:"None"===n.right._tag?r:(0,t.right)(n.right.value)},separate:function(n){return(0,t.isLeft)(n)?(0,G.separated)(n,n):(0,t.isLeft)(n.right)?(0,G.separated)((0,t.right)(n.right.left),r):(0,G.separated)(r,(0,t.right)(n.right.right))}}},t.getFilterable=function(n){var r=(0,t.left)(n.empty),e=(0,t.getCompactable)(n);return{URI:t.URI,_E:void 0,map:u,compact:e.compact,separate:e.separate,filter:function(n,e){return(0,t.isLeft)(n)||e(n.right)?n:r},filterMap:function(n,e){if((0,t.isLeft)(n))return n;var i=e(n.right);return"None"===i._tag?r:(0,t.right)(i.value)},partition:function(n,e){return(0,t.isLeft)(n)?(0,G.separated)(n,n):e(n.right)?(0,G.separated)(r,(0,t.right)(n.right)):(0,G.separated)((0,t.right)(n.right),r)},partitionMap:function(n,e){if((0,t.isLeft)(n))return(0,G.separated)(n,n);var i=e(n.right);return(0,t.isLeft)(i)?(0,G.separated)((0,t.right)(i.left),r):(0,G.separated)(r,(0,t.right)(i.right))}}},t.getWitherable=function(n){var r=(0,t.getFilterable)(n),e=(0,t.getCompactable)(n);return{URI:t.URI,_E:void 0,map:u,compact:r.compact,separate:r.separate,filter:r.filter,filterMap:r.filterMap,partition:r.partition,partitionMap:r.partitionMap,traverse:d,sequence:t.sequence,reduce:s,foldMap:f,reduceRight:l,wither:(0,H.witherDefault)(t.Traversable,e),wilt:(0,H.wiltDefault)(t.Traversable,e)}},t.getApplicativeValidation=function(n){return{URI:t.URI,_E:void 0,map:u,ap:function(r,e){return(0,t.isLeft)(r)?(0,t.isLeft)(e)?(0,t.left)(n.concat(r.left,e.left)):r:(0,t.isLeft)(e)?e:(0,t.right)(r.right(e.right))},of:t.of}},t.getAltValidation=function(n){return{URI:t.URI,_E:void 0,map:u,alt:function(r,e){if((0,t.isRight)(r))return r;var i=e();return(0,t.isLeft)(i)?(0,t.left)(n.concat(r.left,i.left)):i}}},t.map=function(n){return function(r){return(0,t.isLeft)(r)?r:(0,t.right)(n(r.right))}},t.Functor={URI:t.URI,map:u},t.of=t.right,t.Pointed={URI:t.URI,of:t.of},t.apW=function(n){return function(r){return(0,t.isLeft)(r)?r:(0,t.isLeft)(n)?n:(0,t.right)(r.right(n.right))}},t.ap=t.apW,t.Apply={URI:t.URI,map:u,ap:c},t.Applicative={URI:t.URI,map:u,ap:c,of:t.of},t.chainW=function(n){return function(r){return(0,t.isLeft)(r)?r:n(r.right)}},t.chain=t.chainW,t.Chain={URI:t.URI,map:u,ap:c,chain:a},t.Monad={URI:t.URI,map:u,ap:c,of:t.of,chain:a},t.reduce=function(n,r){return function(e){return(0,t.isLeft)(e)?n:r(n,e.right)}},t.foldMap=function(n){return function(r){return function(e){return(0,t.isLeft)(e)?n.empty:r(e.right)}}},t.reduceRight=function(n,r){return function(e){return(0,t.isLeft)(e)?n:r(e.right,n)}},t.Foldable={URI:t.URI,reduce:s,foldMap:f,reduceRight:l},t.traverse=function(n){return function(r){return function(e){return(0,t.isLeft)(e)?n.of((0,t.left)(e.left)):n.map(r(e.right),t.right)}}},t.sequence=function(n){return function(r){return(0,t.isLeft)(r)?n.of((0,t.left)(r.left)):n.map(r.right,t.right)}},t.Traversable={URI:t.URI,map:u,reduce:s,foldMap:f,reduceRight:l,traverse:d,sequence:t.sequence},t.bimap=function(n,r){return function(e){return(0,t.isLeft)(e)?(0,t.left)(n(e.left)):(0,t.right)(r(e.right))}},t.mapLeft=function(n){return function(r){return(0,t.isLeft)(r)?(0,t.left)(n(r.left)):r}},t.Bifunctor={URI:t.URI,bimap:h,mapLeft:p},t.altW=function(n){return function(r){return(0,t.isLeft)(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:u,alt:v},t.extend=function(n){return function(r){return(0,t.isLeft)(r)?r:(0,t.right)(n(r))}},t.Extend={URI:t.URI,map:u,extend:m},t.ChainRec={URI:t.URI,map:u,ap:c,chain:a,chainRec:g},t.throwError=t.left,t.MonadThrow={URI:t.URI,map:u,ap:c,of:t.of,chain:a,throwError:t.throwError},t.FromEither={URI:t.URI,fromEither:A.identity},t.fromPredicate=(0,D.fromPredicate)(t.FromEither),t.fromOption=(0,D.fromOption)(t.FromEither),t.isLeft=o.isLeft,t.isRight=o.isRight,t.matchW=function(n,r){return function(e){return(0,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(0,t.isLeft)(r)?n(r.left):r.right}},t.getOrElse=t.getOrElseW,t.flap=(0,T.flap)(t.Functor),t.apFirst=(0,P.apFirst)(t.Apply),t.apFirstW=t.apFirst,t.apSecond=(0,P.apSecond)(t.Apply),t.apSecondW=t.apSecond,t.chainFirst=(0,F.chainFirst)(t.Chain),t.chainFirstW=t.chainFirst,t.flattenW=(0,t.chainW)(A.identity),t.flatten=t.flattenW,t.duplicate=(0,t.extend)(A.identity),t.fromOptionK=(0,D.fromOptionK)(t.FromEither),t.chainOptionK=(0,D.chainOptionK)(t.FromEither,t.Chain),t.filterOrElse=(0,D.filterOrElse)(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.swap=function(n){return(0,t.isLeft)(n)?(0,t.right)(n.left):(0,t.left)(n.right)},t.orElseW=function(n){return function(r){return(0,t.isLeft)(r)?n(r.left):r}},t.orElse=t.orElseW,t.fromNullable=function(n){return function(r){return null==r?(0,t.left)(n):(0,t.right)(r)}},t.tryCatch=function(n,r){try{return(0,t.right)(n())}catch(n){return(0,t.left)(r(n))}},t.tryCatchK=function(n,r){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return(0,t.tryCatch)((function(){return n.apply(void 0,e)}),r)}},t.fromNullableK=function(n){var r=(0,t.fromNullable)(n);return function(n){return(0,A.flow)(n,r)}},t.chainNullableK=function(n){var r=(0,t.fromNullableK)(n);return function(n){return(0,t.chain)(r(n))}},t.toUnion=(0,t.foldW)(A.identity,A.identity),t.toError=function(n){return n instanceof Error?n:new Error(String(n))},t.elem=function n(r){return function(e,i){if(void 0===i){var o=n(r);return function(n){return o(e,n)}}return!(0,t.isLeft)(i)&&r.equals(e,i.right)}},t.exists=function(n){return function(r){return!(0,t.isLeft)(r)&&n(r.right)}},t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,T.bindTo)(t.Functor),t.bind=(0,F.bind)(t.Chain),t.bindW=t.bind,t.apS=(0,P.apS)(t.Apply),t.apSW=t.apS,t.ApT=(0,t.of)(o.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,o.head(r));if((0,t.isLeft)(e))return e;for(var i=[e.right],u=1;u<r.length;u++){var c=n(u,r[u]);if((0,t.isLeft)(c))return c;i.push(c.right)}return(0,t.right)(i)}},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return o.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return(0,t.traverseReadonlyArrayWithIndex)((function(t,r){return n(r)}))},t.sequenceArray=(0,t.traverseArray)(A.identity),t.parseJSON=function(n,r){return(0,t.tryCatch)((function(){return JSON.parse(n)}),r)},t.stringifyJSON=function(n,r){return(0,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:u,of:t.of,ap:c,chain:a,reduce:s,foldMap:f,reduceRight:l,traverse:d,sequence:t.sequence,bimap:h,mapLeft:p,alt:v,extend:m,chainRec:g,throwError:t.throwError},t.getApplySemigroup=(0,P.getApplySemigroup)(t.Apply),t.getApplyMonoid=(0,N.getApplicativeMonoid)(t.Applicative),t.getValidationSemigroup=function(n,r){return(0,P.getApplySemigroup)((0,t.getApplicativeValidation)(n))(r)},t.getValidationMonoid=function(n,r){return(0,N.getApplicativeMonoid)((0,t.getApplicativeValidation)(n))(r)},t.getValidation=function(n){var r=(0,t.getApplicativeValidation)(n).ap,e=(0,t.getAltValidation)(n).alt;return{URI:t.URI,_E:void 0,map:u,of:t.of,chain:a,bimap:h,mapLeft:p,reduce:s,foldMap:f,reduceRight:l,extend:m,traverse:d,sequence:t.sequence,chainRec:g,throwError:t.throwError,ap:r,alt:e}}})),Xn=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(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.chainNullableK=t.fromNullableK=t.fromNullable=t.leftF=t.rightF=t.left=t.right=void 0;var o=i(Jn);function u(n){return(0,A.flow)(o.right,n.of)}function c(n){return(0,A.flow)(o.left,n.of)}function a(n){return function(t){return n.map(t,o.right)}}function s(n){return function(t){return n.map(t,o.left)}}function f(n){return function(t){return(0,A.flow)(o.fromNullable(t),n.of)}}function l(n){var t=f(n);return function(n){var r=t(n);return function(n){return(0,A.flow)(n,r)}}}function d(n){return(0,T.map)(n,o.Functor)}function h(n){return(0,P.ap)(n,o.Apply)}function p(n){return function(t){return function(r){return n.chain(r,(function(r){return o.isLeft(r)?n.of(r):t(r.right)}))}}}function v(n){return function(t){return function(r){return n.chain(r,(function(r){return o.isLeft(r)?t():n.of(r)}))}}}function m(n){return function(t,r){return function(e){return n.map(e,o.bimap(t,r))}}}function g(n){return function(t){return function(r){return n.map(r,o.mapLeft(t))}}}function b(n){return function(t,r){return function(e){return n.chain(e,o.match(t,r))}}}function w(n){return function(t){return function(r){return n.chain(r,o.match(t,n.of))}}}function y(n){return function(t){return function(r){return n.chain(r,(function(r){return o.isLeft(r)?t(r.left):n.of(r)}))}}}function x(n){return function(t){return n.map(t,o.swap)}}t.right=u,t.left=c,t.rightF=a,t.leftF=s,t.fromNullable=f,t.fromNullableK=l,t.chainNullableK=function(n){var t=p(n),r=l(n);return function(n){var e=r(n);return function(n){return t(e(n))}}},t.map=d,t.ap=h,t.chain=p,t.alt=v,t.bimap=m,t.mapLeft=g,t.altValidation=function(n,t){return function(r){return function(e){return n.chain(e,o.match((function(e){return n.map(r(),o.mapLeft((function(n){return t.concat(e,n)})))}),u(n)))}}},t.match=function(n){return function(t,r){return function(e){return n.map(e,o.match(t,r))}}},t.matchE=b,t.getOrElse=w,t.orElse=y,t.orElseFirst=function(n){var t=y(n);return function(r){return t((function(t){return n.map(r(t),(function(n){return o.isLeft(n)?n:o.left(t)}))}))}},t.orLeft=function(n){return function(t){return function(r){return n.chain(r,o.match((function(r){return n.map(t(r),o.left)}),(function(t){return n.of(o.right(t))})))}}},t.swap=x,t.toUnion=function(n){return function(t){return n.map(t,o.toUnion)}},t.getEitherM=function(n){var t=h(n),r=d(n),e=p(n),i=v(n),o=m(n),f=g(n),l=b(n),I=w(n),_=y(n);return{map:function(n,t){return(0,A.pipe)(n,r(t))},ap:function(n,r){return(0,A.pipe)(n,t(r))},of:u(n),chain:function(n,t){return(0,A.pipe)(n,e(t))},alt:function(n,t){return(0,A.pipe)(n,i(t))},bimap:function(n,t,r){return(0,A.pipe)(n,o(t,r))},mapLeft:function(n,t){return(0,A.pipe)(n,f(t))},fold:function(n,t,r){return(0,A.pipe)(n,l(t,r))},getOrElse:function(n,t){return(0,A.pipe)(n,I(t))},orElse:function(n,t){return(0,A.pipe)(n,_(t))},swap:x(n),rightM:a(n),leftM:s(n),left:c(n)}}})),Qn=S((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((0,L.not)(n)),r=e(n);return function(n){return(0,G.separated)(t(n),r(n))}}}function o(n,t){var r=e(n,t);return function(n){return function(t){return(0,G.separated)((0,A.pipe)(t,r((function(t){return(0,Z.getLeft)(n(t))}))),(0,A.pipe)(t,r((function(t){return(0,Z.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=o,t.getFilterableComposition=function(n,t){var u=(0,T.getFunctorComposition)(n,t).map,c=(0,Zn.compact)(n,t),a=(0,Zn.separate)(n,t,t),s=r(n,t),f=e(n,t),l=i(n,t),d=o(n,t);return{map:u,compact:c,separate:a,filter:function(n,t){return(0,A.pipe)(n,s(t))},filterMap:function(n,t){return(0,A.pipe)(n,f(t))},partition:function(n,t){return(0,A.pipe)(n,l(t))},partitionMap:function(n,t){return(0,A.pipe)(n,d(t))}}}})),nt=S((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(0,A.flow)(t,n.fromIO)}},t.chainIOK=function(n,t){return function(r){var e=(0,A.flow)(r,n.fromIO);return function(n){return t.chain(n,e)}}},t.chainFirstIOK=function(n,t){var r=(0,F.chainFirst)(t);return function(t){return r((0,A.flow)(t,n.fromIO))}}})),tt=S((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(0,A.flow)(t,n.fromTask)}},t.chainTaskK=function(n,t){return function(r){var e=(0,A.flow)(r,n.fromTask);return function(n){return t.chain(n,e)}}},t.chainFirstTaskK=function(n,t){var r=(0,F.chainFirst)(t);return function(t){return r((0,A.flow)(t,n.fromTask))}}})),rt=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(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 o=i(W);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 u=function(n,r){return(0,A.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,A.pipe)(n,(0,t.ap)(r))},a=function(n,r){return(0,A.pipe)(n,(0,t.chain)((function(n){return(0,A.pipe)(r,(0,t.map)(n))})))},s=function(n,r){return(0,A.pipe)(n,(0,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=(0,t.chain)(A.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:u},t.flap=(0,T.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:u,ap:c},t.apFirst=(0,P.apFirst)(t.ApplyPar),t.apSecond=(0,P.apSecond)(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:u,ap:c,of:t.of},t.ApplySeq={URI:t.URI,map:u,ap:a},t.ApplicativeSeq={URI:t.URI,map:u,ap:a,of:t.of},t.Chain={URI:t.URI,map:u,ap:c,chain:s},t.Monad={URI:t.URI,map:u,of:t.of,ap:c,chain:s},t.MonadIO={URI:t.URI,map:u,of:t.of,ap:c,chain:s,fromIO:t.fromIO},t.fromTask=A.identity,t.MonadTask={URI:t.URI,map:u,of:t.of,ap:c,chain:s,fromIO:t.fromIO,fromTask:t.fromTask},t.chainFirst=(0,F.chainFirst)(t.Chain),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=(0,nt.fromIOK)(t.FromIO),t.chainIOK=(0,nt.chainIOK)(t.FromIO,t.Chain),t.chainFirstIOK=(0,nt.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=(0,t.of)(o.emptyRecord),t.bindTo=(0,T.bindTo)(t.Functor),t.bind=(0,F.bind)(t.Chain),t.apS=(0,P.apS)(t.ApplyPar),t.ApT=(0,t.of)(o.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=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return o.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return o.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,o.head(t))).then(o.singleton))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return o.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return(0,t.traverseReadonlyArrayWithIndex)((function(t,r){return n(r)}))},t.sequenceArray=(0,t.traverseArray)(A.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return(0,t.traverseReadonlyArrayWithIndexSeq)((function(t,r){return n(r)}))},t.sequenceSeqArray=(0,t.traverseSeqArray)(A.identity),t.task={URI:t.URI,map:u,of:t.of,ap:c,chain:s,fromIO:t.fromIO,fromTask:t.fromTask},t.taskSeq={URI:t.URI,map:u,of:t.of,ap:a,chain:s,fromIO:t.fromIO,fromTask:t.fromTask},t.getSemigroup=(0,P.getApplySemigroup)(t.ApplySeq),t.getMonoid=(0,N.getApplicativeMonoid)(t.ApplicativeSeq)})),et=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t},o=C&&C.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function u(n){try{a(e.next(n))}catch(n){o(n)}}function c(n){try{a(e.throw(n))}catch(n){o(n)}}function a(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(u,c)}a((e=e.apply(n,t||[])).next())}))},u=C&&C.__generator||function(n,t){var r,e,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,e&&(i=2&o[0]?e.return:o[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,o[1])).done)return i;switch(e=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,e=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(n,u)}catch(n){o=[6,n],e=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),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.chainTaskOptionKW=t.fromTaskOptionK=t.swap=t.orLeft=t.orElseFirstTaskK=t.orElseFirstIOK=t.orElseFirstW=t.orElseFirst=t.orElseW=t.orElse=t.chainNullableK=t.fromNullableK=t.fromNullable=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.bracketW=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.chainFirstEitherKW=t.chainFirstEitherK=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.apSecondW=t.apSecond=t.apFirstW=t.apFirst=t.ApplyPar=t.Pointed=t.flap=t.Functor=t.getFilterable=t.getCompactable=t.getAltTaskValidation=t.getApplicativeTaskValidation=t.URI=t.throwError=t.of=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=t.traverseReadonlyArrayWithIndexSeq=t.traverseReadonlyNonEmptyArrayWithIndexSeq=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apSW=t.apS=t.bindW=t.bind=t.bindTo=t.Do=void 0;var c=i(Jn),a=i(Xn),s=i(W),f=i(rt);t.left=a.left(f.Pointed),t.right=a.right(f.Pointed),t.rightTask=a.rightF(f.Functor),t.leftTask=a.leftF(f.Functor),t.rightIO=(0,A.flow)(f.fromIO,t.rightTask),t.leftIO=(0,A.flow)(f.fromIO,t.leftTask),t.fromIO=t.rightIO,t.fromTask=t.rightTask,t.fromEither=f.of,t.fromIOEither=f.fromIO,t.fromTaskOption=function(n){return f.map(c.fromOption(n))},t.match=a.match(f.Functor),t.matchW=t.match,t.matchE=a.matchE(f.Monad),t.fold=t.matchE,t.matchEW=t.matchE,t.foldW=t.matchEW,t.getOrElse=a.getOrElse(f.Monad),t.getOrElseW=t.getOrElse,t.tryCatch=function(n,t){return function(){return o(void 0,void 0,void 0,(function(){var r;return u(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,n().then(s.right)];case 1:return[2,e.sent()];case 2:return r=e.sent(),[2,s.left(t(r))];case 3:return[2]}}))}))}},t.tryCatchK=function(n,r){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return(0,t.tryCatch)((function(){return n.apply(void 0,e)}),r)}},t.toUnion=a.toUnion(f.Functor),t.fromNullable=a.fromNullable(f.Pointed),t.fromNullableK=a.fromNullableK(f.Pointed),t.chainNullableK=a.chainNullableK(f.Monad),t.orElse=a.orElse(f.Monad),t.orElseW=t.orElse,t.orElseFirst=a.orElseFirst(f.Monad),t.orElseFirstW=t.orElseFirst,t.orElseFirstIOK=function(n){return(0,t.orElseFirst)((0,t.fromIOK)(n))},t.orElseFirstTaskK=function(n){return(0,t.orElseFirst)((0,t.fromTaskK)(n))},t.orLeft=a.orLeft(f.Monad),t.swap=a.swap(f.Functor),t.fromTaskOptionK=function(n){var r=(0,t.fromTaskOption)(n);return function(n){return(0,A.flow)(n,r)}},t.chainTaskOptionKW=function(n){return function(r){return function(e){return(0,A.pipe)(e,(0,t.chain)((0,t.fromTaskOptionK)(n)(r)))}}},t.chainTaskOptionK=t.chainTaskOptionKW,t.fromIOEitherK=function(n){return(0,A.flow)(n,t.fromIOEither)},t.chainIOEitherKW=function(n){return(0,t.chainW)((0,t.fromIOEitherK)(n))},t.chainIOEitherK=t.chainIOEitherKW;var l=function(n,r){return(0,A.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,A.pipe)(n,(0,t.ap)(r))},h=function(n,r){return(0,A.pipe)(n,(0,t.chain)((function(n){return(0,A.pipe)(r,(0,t.map)(n))})))},p=function(n,r){return(0,A.pipe)(n,(0,t.chain)(r))},v=function(n,r,e){return(0,A.pipe)(n,(0,t.bimap)(r,e))},m=function(n,r){return(0,A.pipe)(n,(0,t.mapLeft)(r))},g=function(n,r){return(0,A.pipe)(n,(0,t.alt)(r))};function b(n,r){var e=(0,P.ap)(n,c.getApplicativeValidation(r));return{URI:t.URI,_E:void 0,map:l,ap:function(n,t){return(0,A.pipe)(n,e(t))},of:t.of}}function w(n){var r=a.altValidation(f.Monad,n);return{URI:t.URI,_E:void 0,map:l,alt:function(n,t){return(0,A.pipe)(n,r(t))}}}t.map=a.map(f.Functor),t.bimap=a.bimap(f.Functor),t.mapLeft=a.mapLeft(f.Functor),t.ap=a.ap(f.ApplyPar),t.apW=t.ap,t.chain=a.chain(f.Monad),t.chainW=t.chain,t.flattenW=(0,t.chainW)(A.identity),t.flatten=t.flattenW,t.alt=a.alt(f.Monad),t.altW=t.alt,t.of=t.right,t.throwError=t.left,t.URI="TaskEither",t.getApplicativeTaskValidation=b,t.getAltTaskValidation=w,t.getCompactable=function(n){var r=c.getCompactable(n);return{URI:t.URI,_E:void 0,compact:(0,Zn.compact)(f.Functor,r),separate:(0,Zn.separate)(f.Functor,r,c.Functor)}},t.getFilterable=function(n){var r=c.getFilterable(n),e=(0,t.getCompactable)(n),i=(0,Qn.filter)(f.Functor,r),o=(0,Qn.filterMap)(f.Functor,r),u=(0,Qn.partition)(f.Functor,r),a=(0,Qn.partitionMap)(f.Functor,r);return{URI:t.URI,_E:void 0,map:l,compact:e.compact,separate:e.separate,filter:function(n,t){return(0,A.pipe)(n,i(t))},filterMap:function(n,t){return(0,A.pipe)(n,o(t))},partition:function(n,t){return(0,A.pipe)(n,u(t))},partitionMap:function(n,t){return(0,A.pipe)(n,a(t))}}},t.Functor={URI:t.URI,map:l},t.flap=(0,T.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:l,ap:d},t.apFirst=(0,P.apFirst)(t.ApplyPar),t.apFirstW=t.apFirst,t.apSecond=(0,P.apSecond)(t.ApplyPar),t.apSecondW=t.apSecond,t.ApplicativePar={URI:t.URI,map:l,ap:d,of:t.of},t.ApplySeq={URI:t.URI,map:l,ap:h},t.ApplicativeSeq={URI:t.URI,map:l,ap:h,of:t.of},t.Chain={URI:t.URI,map:l,ap:d,chain:p},t.Monad={URI:t.URI,map:l,ap:d,chain:p,of:t.of},t.MonadIO={URI:t.URI,map:l,ap:d,chain:p,of:t.of,fromIO:t.fromIO},t.MonadTask={URI:t.URI,map:l,ap:d,chain:p,of:t.of,fromIO:t.fromIO,fromTask:t.fromTask},t.MonadThrow={URI:t.URI,map:l,ap:d,chain:p,of:t.of,throwError:t.throwError},t.chainFirst=(0,F.chainFirst)(t.Chain),t.chainFirstW=t.chainFirst,t.Bifunctor={URI:t.URI,bimap:v,mapLeft:m},t.Alt={URI:t.URI,map:l,alt:g},t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromOption=(0,D.fromOption)(t.FromEither),t.fromOptionK=(0,D.fromOptionK)(t.FromEither),t.chainOptionK=(0,D.chainOptionK)(t.FromEither,t.Chain),t.chainEitherK=(0,D.chainEitherK)(t.FromEither,t.Chain),t.chainEitherKW=t.chainEitherK,t.chainFirstEitherK=(0,D.chainFirstEitherK)(t.FromEither,t.Chain),t.chainFirstEitherKW=t.chainFirstEitherK,t.fromPredicate=(0,D.fromPredicate)(t.FromEither),t.filterOrElse=(0,D.filterOrElse)(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.fromEitherK=(0,D.fromEitherK)(t.FromEither),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=(0,nt.fromIOK)(t.FromIO),t.chainIOK=(0,nt.chainIOK)(t.FromIO,t.Chain),t.chainFirstIOK=(0,nt.chainFirstIOK)(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.fromTaskK=(0,tt.fromTaskK)(t.FromTask),t.chainTaskK=(0,tt.chainTaskK)(t.FromTask,t.Chain),t.chainFirstTaskK=(0,tt.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?s.left(n):s.right(t))})))}))}}},t.bracket=function(n,r,e){return(0,t.bracketW)(n,r,e)},t.bracketW=function(n,r,e){return(0,A.pipe)(n,(0,t.chainW)((function(n){return(0,A.pipe)(r(n),f.chain((function(r){return(0,A.pipe)(e(n,r),(0,t.chainW)((function(){return f.of(r)})))})))})))},t.Do=(0,t.of)(s.emptyRecord),t.bindTo=(0,T.bindTo)(t.Functor),t.bind=(0,F.bind)(t.Chain),t.bindW=t.bind,t.apS=(0,P.apS)(t.ApplyPar),t.apSW=t.apS,t.ApT=(0,t.of)(s.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return(0,A.flow)(f.traverseReadonlyNonEmptyArrayWithIndex(n),f.map(c.traverseReadonlyNonEmptyArrayWithIndex(A.SK)))},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return s.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return s.tail(t).reduce((function(t,r,e){return t.then((function(i){return s.isLeft(i)?t:n(e+1,r)().then((function(n){return s.isLeft(n)?n:(i.right.push(n.right),i)}))}))}),n(0,s.head(t))().then(c.map(s.singleton)))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return s.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return(0,t.traverseReadonlyArrayWithIndex)((function(t,r){return n(r)}))},t.sequenceArray=(0,t.traverseArray)(A.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return(0,t.traverseReadonlyArrayWithIndexSeq)((function(t,r){return n(r)}))},t.sequenceSeqArray=(0,t.traverseSeqArray)(A.identity),t.taskEither={URI:t.URI,bimap:v,mapLeft:m,map:l,of:t.of,ap:d,chain:p,alt:g,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.taskEitherSeq={URI:t.URI,bimap:v,mapLeft:m,map:l,of:t.of,ap:h,chain:p,alt:g,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.getApplySemigroup=(0,P.getApplySemigroup)(t.ApplySeq),t.getApplyMonoid=(0,N.getApplicativeMonoid)(t.ApplicativeSeq),t.getSemigroup=function(n){return(0,P.getApplySemigroup)(f.ApplySeq)(c.getSemigroup(n))},t.getTaskValidation=function(n){var r=b(f.ApplicativePar,n),e=w(n);return{URI:t.URI,_E:void 0,map:l,ap:r.ap,of:t.of,chain:p,bimap:v,mapLeft:m,alt:e.alt,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError}}}));const{state:it}=X(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0})),ot=n=>({kind:"server",inner:n}),ut={kind:"client",inner:"Token not exist or empty"},ct={kind:"client",inner:"Api path empty or missing"},at=vn({concat:function(n,t){return n+t},empty:""}),st=()=>g(vn({concat:p}).concat(yn(it.apiPath),yn("https://api.vviinn.com")),ln((()=>ct))),ft=I({method:{concat:(n,t)=>{return g(at.concat(yn(n),yn(t)),(r=()=>"GET",function(n){return gn(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}}}),lt=n=>({method:n}),dt=on(lt("GET")),ht=on(lt("POST")),pt=n=>n.status>=200&&n.status<300?et.right(n):et.left(n),vt=ft,mt=(n,t)=>([r,e])=>{const i=new URL(n,r),o=vt.concat(e,t);return A.pipe(((n,t={})=>A.pipe(((n,t={method:"GET"})=>et.tryCatch((()=>fetch(n,t)),(n=>n)))(n,t),et.chain(pt),et.chain((n=>function(n){return et.fromTask((()=>n.json()))}(n)))))(i.toString(),o),et.mapLeft(ot))},gt=n=>(n=>0===n.length)(n)?en("entity is empty"):on(n),bt=n=>{return g(n,("entity not exist",function(n){return null==n?en("entity not exist"):on(n)}),(t=gt,function(n){return dn(n)?n:t(n.right)}));var t},wt=n=>new Headers({Authorization:`Bearer ${n}`}),yt=n=>g(n,bt,Jn.mapLeft((()=>ut))),xt=n=>g(n,yt,Jn.map(wt)),It=P.sequenceT(Jn.Apply);var _t;!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"}(_t||(_t={}));const jt=n=>{switch(n.type){case"array":return n.value.map(jt);default:return n.value}},kt=n=>t=>g(It(st(),on(lt(n.method))),Fn,Vn(mt(n.href,t))),Ot=(n,t)=>{const r=k(n),e=M.concat(r,t);return Object.assign(Object.assign({},e),{width:n.width,height:n.height})},Rt=n=>Object.assign({x:n.left,y:n.top},n),Mt=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 Et;!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"}(Et||(Et={}));const zt=(n,t)=>{const r=new URLSearchParams(Object.entries(t));return[`${n.href}?${r.toString()}`,{method:"GET"}]},Ct=(n,t)=>[n.href,{body:JSON.stringify(t),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],St=(n,t={})=>r=>A.pipe(It(st(),A.pipe(((n,t)=>A.pipe(((n,t)=>{const r=n.map((n=>n.name)),e=Object.keys(t),i=r.filter((n=>!e.includes(n)));return 0===i.length?on(t):en(`Data should contains fields: ${i.join(", ")}`)})(n.value,t),cn((t=>n.rel.includes("query-form")?zt(n,t):Ct(n,t)))))(n,t),fn((n=>({kind:"app",inner:n}))))),Fn,Vn((n=>{const t=n[0],[e,i]=n[1];return mt(e,i)([t,r])}))),At=async n=>new Promise((t=>{const r=new FileReader;r.addEventListener("load",(()=>{t(r.result)})),r.readAsDataURL(n)})),Wt=P.sequenceT(Z.Apply);const Pt=["jpg","jpeg","png","webp"],Tt={kind:"client",inner:"File format not supported"},Nt=n=>{const t=n.type.split("/")[1],r=(e=r=>r===t?Z.some(n):Z.none,function(n){for(var t=0;t<n.length;t++){var r=e(n[t]);if("Some"===r._tag)return r}return b})(Pt);var e;return A.pipe(r,Jn.fromOption((()=>Tt)))},Ft={kind:"app",inner:"File doesnt exist"},Dt=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 Lt=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.copy=void 0,t.copy=(n,t,r=0,e=0,i=n.width-r,o=n.height-e,u=0,c=0)=>{if(r|=0,e|=0,o|=0,u|=0,c|=0,(i|=0)<=0||o<=0)return;const a=new Uint32Array(n.data.buffer),s=new Uint32Array(t.data.buffer);for(let f=0;f<o;f++){const o=e+f;if(o<0||o>=n.height)continue;const l=c+f;if(!(l<0||l>=t.height))for(let e=0;e<i;e++){const i=r+e;if(i<0||i>=n.width)continue;const c=u+e;c<0||c>=t.width||(s[l*t.width+c]=a[o*n.width+i])}}}})),qt=S((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,i,o)=>{if(void 0===e||void 0===i)throw TypeError("Not enough arguments");if(e=Math.floor(e),i=Math.floor(i),isNaN(e)||e<1||isNaN(i)||i<1)throw TypeError("Index or size is negative or greater than the allowed amount");const u=e*i*t;if(void 0===o&&(o=new Uint8ClampedArray(u)),o instanceof Uint8ClampedArray){if(o.length!==u)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let r=0;r<i;r++)for(let i=0;i<e;i++){const u=(r*e+i)*t;for(let r=0;r<t;r++)o[u+r]=n[r]}return{get width(){return e},get height(){return i},get data(){return o}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory()})),$t=S((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,i,o,u)=>{const c=u?2:3,a=1/i,s=Math.min(1,i),f=c/s,l=Math.floor(2*(f+1)),d=new Int16Array((l+2)*t);let h=0;for(let i=0;i<t;i++){const u=(i+.5)*a+o,l=Math.max(0,Math.floor(u-f)),p=Math.min(n-1,Math.ceil(u+f)),v=p-l+1,m=new Float32Array(v),g=new Int16Array(v);let b=0,w=0;for(let n=l;n<=p;n++){const t=r((n+.5-u)*s,c);b+=t,m[w]=t,w++}let y=0;for(let n=0;n<m.length;n++){const t=m[n]/b;y+=t,g[n]=e(t)}g[t>>1]+=e(1-y);let x=0;for(;x<g.length&&0===g[x];)x++;let I=g.length-1;for(;I>0&&0===g[I];)I--;const _=I-x+1;d[h++]=l+x,d[h++]=_,d.set(g.subarray(x,I+1),h),h+=_}return d}})),Vt=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convolve=void 0,t.convolve=(n,t,r,e,i,o)=>{let u=0,c=0;for(let a=0;a<e;a++){let s=0;for(let r=0;r<i;r++){let r=u+4*o[s++]|0,i=0,a=0,f=0,l=0;for(let t=o[s++];t>0;t--){const t=o[s++];i=i+t*n[r]|0,a=a+t*n[r+1]|0,f=f+t*n[r+2]|0,l=l+t*n[r+3]|0,r=r+4|0}t[c]=i+8192>>14,t[c+1]=a+8192>>14,t[c+2]=f+8192>>14,t[c+3]=l+8192>>14,c=c+4*e|0}c=4*(a+1)|0,u=(a+1)*r*4|0}}})),Bt=S((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,i=$t.filters(n.width,t.width,t.width/n.width,0,r),o=$t.filters(n.height,t.height,e,0,r),u=new Uint8ClampedArray(t.width*n.height*4);Vt.convolve(n.data,u,n.width,n.height,t.width,i),Vt.convolve(u,t.data,n.height,t.width,t.height,o)};t.lanczos=(n,t,e=0,i=0,o=n.width-e,u=n.height-i,c=0,a=0,s=t.width-c,f=t.height-a)=>{if(i|=0,u|=0,c|=0,a|=0,s|=0,f|=0,(o|=0)<=0||u<=0||s<=0||f<=0)return;if(0==(e|=0)&&0===i&&o===n.width&&u===n.height&&0===c&&0===a&&s===t.width&&f===t.height)return void r(n,t);const l=qt.createImage(o,u),d=qt.createImage(s,f);Lt.copy(n,l,e,i),r(l,d),Lt.copy(d,t,0,0,d.width,d.height,c,a)},t.lanczos2=(n,t,e=0,i=0,o=n.width-e,u=n.height-i,c=0,a=0,s=t.width-c,f=t.height-a)=>{if(i|=0,u|=0,c|=0,a|=0,s|=0,f|=0,(o|=0)<=0||u<=0||s<=0||f<=0)return;if(0==(e|=0)&&0===i&&o===n.width&&u===n.height&&0===c&&0===a&&s===t.width&&f===t.height)return void r(n,t,!0);const l=qt.createImage(o,u),d=qt.createImage(s,f);Lt.copy(n,l,e,i),r(l,d,!0),Lt.copy(d,t,0,0,d.width,d.height,c,a)}})),Gt=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Field=t.MonoidProduct=t.MonoidSum=t.SemigroupProduct=t.SemigroupSum=t.MagmaSub=t.Show=t.Bounded=t.Ord=t.Eq=t.isNumber=void 0,t.isNumber=function(n){return"number"==typeof n},t.Eq={equals:function(n,t){return n===t}},t.Ord={equals:t.Eq.equals,compare:function(n,t){return n<t?-1:n>t?1:0}},t.Bounded={equals:t.Eq.equals,compare:t.Ord.compare,top:1/0,bottom:-1/0},t.Show={show:function(n){return JSON.stringify(n)}},t.MagmaSub={concat:function(n,t){return n-t}},t.SemigroupSum={concat:function(n,t){return n+t}},t.SemigroupProduct={concat:function(n,t){return n*t}},t.MonoidSum={concat:t.SemigroupSum.concat,empty:0},t.MonoidProduct={concat:t.SemigroupProduct.concat,empty:1},t.Field={add:t.SemigroupSum.concat,zero:0,mul:t.SemigroupProduct.concat,one:1,sub:t.MagmaSub.concat,degree:function(){return 1},div:function(n,t){return n/t},mod:function(n,t){return n%t}}})),Ht=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t},o=C&&C.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,i=0,o=t.length;i<o;i++)!e&&i in t||(e||(e=Array.prototype.slice.call(t,0,i)),e[i]=t[i]);return n.concat(e||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.reduceRight=t.foldMap=t.reduce=t.mapWithIndex=t.map=t.flatten=t.duplicate=t.extend=t.chain=t.ap=t.alt=t.altW=t.of=t.chunksOf=t.splitAt=t.chop=t.chainWithIndex=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.modifyAt=t.updateAt=t.sort=t.groupBy=t.group=t.reverse=t.concat=t.concatW=t.fromArray=t.unappend=t.unprepend=t.range=t.replicate=t.makeBy=t.fromReadonlyArray=t.rotate=t.union=t.sortBy=t.uniq=t.unsafeUpdateAt=t.unsafeInsertAt=t.append=t.appendW=t.prepend=t.prependW=t.isOutOfBound=t.isNonEmpty=t.empty=void 0,t.filterWithIndex=t.filter=t.groupSort=t.intercalate=t.updateLast=t.modifyLast=t.updateHead=t.modifyHead=t.matchRight=t.matchLeft=t.concatAll=t.max=t.min=t.init=t.last=t.tail=t.head=t.apS=t.bind=t.bindTo=t.Do=t.Comonad=t.Alt=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getUnionSemigroup=t.getEq=t.getSemigroup=t.getShow=t.URI=t.extract=t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.foldMapWithIndex=t.reduceWithIndex=void 0,t.readonlyNonEmptyArray=t.fold=t.prependToAll=t.insertAt=t.snoc=t.cons=t.unsnoc=t.uncons=void 0;var u=i(W),c=i(B);function a(n){return function(t){return t.concat(n)}}function s(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function f(n){return function(r){var e=r.length;if(0===e)return t.empty;for(var i=[],o=r[0],u=[o],c=1;c<e;c++){var a=r[c];n.equals(a,o)?u.push(a):(i.push(u),u=[o=a])}return i.push(u),i}}t.empty=u.emptyReadonlyArray,t.isNonEmpty=u.isNonEmpty,t.isOutOfBound=function(n,t){return n<0||n>=t.length},t.prependW=function(n){return function(t){return o([n],t,!0)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return o(o([],t,!0),[n],!1)}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if((0,t.isNonEmpty)(e)){var i=u.fromReadonlyNonEmptyArray(e);return i.splice(n,0,r),i}return[r]},t.unsafeUpdateAt=function(n,t,r){if(r[n]===t)return r;var e=u.fromReadonlyNonEmptyArray(r);return e[n]=t,e},t.uniq=function(n){return function(r){if(1===r.length)return r;for(var e=[(0,t.head)(r)],i=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},o=0,u=(0,t.tail)(r);o<u.length;o++)i(u[o]);return e}},t.sortBy=function(n){if((0,t.isNonEmpty)(n)){var r=(0,V.getMonoid)();return(0,t.sort)(n.reduce(r.concat,r.empty))}return A.identity},t.union=function(n){var r=(0,t.uniq)(n);return function(n){return function(t){return r((0,A.pipe)(t,s(n)))}}},t.rotate=function(n){return function(r){var e=r.length,i=Math.round(n)%e;if((0,t.isOutOfBound)(Math.abs(i),r)||0===i)return r;if(i<0){var o=(0,t.splitAt)(-i)(r);return(0,A.pipe)(o[1],s(o[0]))}return(0,t.rotate)(i-e)(r)}},t.fromReadonlyArray=function(n){return(0,t.isNonEmpty)(n)?u.some(n):u.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],i=1;i<r;i++)e.push(n(i));return e}},t.replicate=function(n){return(0,t.makeBy)((function(){return n}))},t.range=function(n,r){return n<=r?(0,t.makeBy)((function(t){return n+t}))(r-n+1):[n]},t.unprepend=function(n){return[(0,t.head)(n),(0,t.tail)(n)]},t.unappend=function(n){return[(0,t.init)(n),(0,t.last)(n)]},t.fromArray=function(n){return(0,t.fromReadonlyArray)(n.slice())},t.concatW=a,t.concat=s,t.reverse=function(n){return 1===n.length?n:o([(0,t.last)(n)],n.slice(0,-1).reverse(),!0)},t.group=f,t.groupBy=function(n){return function(t){for(var r={},e=0,i=t;e<i.length;e++){var o=i[e],c=n(o);u.has.call(r,c)?r[c].push(o):r[c]=[o]}return r}},t.sort=function(n){return function(t){return 1===t.length?t:t.slice().sort(n.compare)}},t.updateAt=function(n,r){return(0,t.modifyAt)(n,(function(){return r}))},t.modifyAt=function(n,r){return function(e){return(0,t.isOutOfBound)(n,e)?u.none:u.some((0,t.unsafeUpdateAt)(n,r(e[n]),e))}},t.zipWith=function(n,t,r){for(var e=[r(n[0],t[0])],i=Math.min(n.length,t.length),o=1;o<i;o++)e[o]=r(n[o],t[o]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:(0,t.zipWith)(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[n[0][0]],r=[n[0][1]],e=1;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){return function(t){for(var r=[n,t[0]],e=1;e<t.length;e++)r.push(n,t[e]);return r}},t.intersperse=function(n){return function(r){var e=(0,t.tail)(r);return(0,t.isNonEmpty)(e)?(0,A.pipe)(e,(0,t.prependAll)(n),(0,t.prepend)((0,t.head)(r))):r}},t.chainWithIndex=function(n){return function(r){for(var e=u.fromReadonlyNonEmptyArray(n(0,(0,t.head)(r))),i=1;i<r.length;i++)e.push.apply(e,n(i,r[i]));return e}},t.chop=function(n){return function(r){for(var e=n(r),i=[e[0]],o=e[1];(0,t.isNonEmpty)(o);){var u=n(o),c=u[1];i.push(u[0]),o=c}return i}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[r,t.empty]:[(0,A.pipe)(r.slice(1,e),(0,t.prepend)((0,t.head)(r))),r.slice(e)]}},t.chunksOf=function(n){return(0,t.chop)((0,t.splitAt)(n))};var l=function(n,r){return(0,A.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,A.pipe)(n,(0,t.mapWithIndex)(r))},h=function(n,r){return(0,A.pipe)(n,(0,t.ap)(r))},p=function(n,r){return(0,A.pipe)(n,(0,t.chain)(r))},v=function(n,r){return(0,A.pipe)(n,(0,t.extend)(r))},m=function(n,r,e){return(0,A.pipe)(n,(0,t.reduce)(r,e))},g=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},b=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRight)(r,e))},w=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},y=function(n,r){return(0,A.pipe)(n,(0,t.alt)(r))},x=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceWithIndex)(r,e))},I=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},_=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},j=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,A.pipe)(n,r(t))}};t.of=u.singleton,t.altW=function(n){return function(t){return(0,A.pipe)(t,a(n()))}},t.alt=t.altW,t.ap=function(n){return(0,t.chain)((function(r){return(0,A.pipe)(n,(0,t.map)(r))}))},t.chain=function(n){return(0,t.chainWithIndex)((function(t,r){return n(r)}))},t.extend=function(n){return function(r){for(var e=(0,t.tail)(r),i=[n(r)];(0,t.isNonEmpty)(e);)i.push(n(e)),e=(0,t.tail)(e);return i}},t.duplicate=(0,t.extend)(A.identity),t.flatten=(0,t.chain)(A.identity),t.map=function(n){return(0,t.mapWithIndex)((function(t,r){return n(r)}))},t.mapWithIndex=function(n){return function(r){for(var e=[n(0,(0,t.head)(r))],i=1;i<r.length;i++)e.push(n(i,r[i]));return e}},t.reduce=function(n,r){return(0,t.reduceWithIndex)(n,(function(n,t,e){return r(t,e)}))},t.foldMap=function(n){return function(t){return function(r){return r.slice(1).reduce((function(r,e){return n.concat(r,t(e))}),t(r[0]))}}},t.reduceRight=function(n,r){return(0,t.reduceRightWithIndex)(n,(function(n,t,e){return r(t,e)}))},t.reduceWithIndex=function(n,t){return function(r){return r.reduce((function(n,r,e){return t(e,n,r)}),n)}},t.foldMapWithIndex=function(n){return function(t){return function(r){return r.slice(1).reduce((function(r,e,i){return n.concat(r,t(i+1,e))}),t(0,r[0]))}}},t.reduceRightWithIndex=function(n,t){return function(r){return r.reduceRight((function(n,r,e){return t(e,r,n)}),n)}},t.traverse=function(n){var r=(0,t.traverseWithIndex)(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return(0,t.traverseWithIndex)(n)(A.SK)},t.traverseWithIndex=function(n){return function(r){return function(e){for(var i=n.map(r(0,(0,t.head)(e)),t.of),o=1;o<e.length;o++)i=n.ap(n.map(i,(function(n){return function(r){return(0,A.pipe)(n,(0,t.append)(r))}})),r(o,e[o]));return i}}},t.extract=u.head,t.URI="ReadonlyNonEmptyArray",t.getShow=function(n){return{show:function(t){return"[".concat(t.map(n.show).join(", "),"]")}}},t.getSemigroup=function(){return{concat:s}},t.getEq=function(n){return(0,$.fromEquals)((function(t,r){return t.length===r.length&&t.every((function(t,e){return n.equals(t,r[e])}))}))},t.getUnionSemigroup=function(n){var r=(0,t.union)(n);return{concat:function(n,t){return r(t)(n)}}},t.Functor={URI:t.URI,map:l},t.flap=(0,T.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:l,mapWithIndex:d},t.Apply={URI:t.URI,map:l,ap:h},t.apFirst=(0,P.apFirst)(t.Apply),t.apSecond=(0,P.apSecond)(t.Apply),t.Applicative={URI:t.URI,map:l,ap:h,of:t.of},t.Chain={URI:t.URI,map:l,ap:h,chain:p},t.chainFirst=(0,F.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:l,ap:h,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:g,reduceRight:b},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:g,reduceRight:b,reduceWithIndex:x,foldMapWithIndex:I,reduceRightWithIndex:_},t.Traversable={URI:t.URI,map:l,reduce:m,foldMap:g,reduceRight:b,traverse:w,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:l,mapWithIndex:d,reduce:m,foldMap:g,reduceRight:b,traverse:w,sequence:t.sequence,reduceWithIndex:x,foldMapWithIndex:I,reduceRightWithIndex:_,traverseWithIndex:j},t.Alt={URI:t.URI,map:l,alt:y},t.Comonad={URI:t.URI,map:l,extend:v,extract:t.extract},t.Do=(0,t.of)(u.emptyRecord),t.bindTo=(0,T.bindTo)(t.Functor),t.bind=(0,F.bind)(t.Chain),t.apS=(0,P.apS)(t.Apply),t.head=t.extract,t.tail=u.tail,t.last=function(n){return n[n.length-1]},t.init=function(n){return n.slice(0,-1)},t.min=function(n){var t=c.min(n);return function(n){return n.reduce(t.concat)}},t.max=function(n){var t=c.max(n);return function(n){return n.reduce(t.concat)}},t.concatAll=function(n){return function(t){return t.reduce(n.concat)}},t.matchLeft=function(n){return function(r){return n((0,t.head)(r),(0,t.tail)(r))}},t.matchRight=function(n){return function(r){return n((0,t.init)(r),(0,t.last)(r))}},t.modifyHead=function(n){return function(r){return o([n((0,t.head)(r))],(0,t.tail)(r),!0)}},t.updateHead=function(n){return(0,t.modifyHead)((function(){return n}))},t.modifyLast=function(n){return function(r){return(0,A.pipe)((0,t.init)(r),(0,t.append)(n((0,t.last)(r))))}},t.updateLast=function(n){return(0,t.modifyLast)((function(){return n}))},t.intercalate=function(n){var r=(0,t.concatAll)(n);return function(n){return(0,A.flow)((0,t.intersperse)(n),r)}},t.groupSort=function(n){var r=(0,t.sort)(n),e=f(n);return function(n){return(0,t.isNonEmpty)(n)?e(r(n)):t.empty}},t.filter=function(n){return(0,t.filterWithIndex)((function(t,r){return n(r)}))},t.filterWithIndex=function(n){return function(r){return(0,t.fromReadonlyArray)(r.filter((function(t,r){return n(r,t)})))}},t.uncons=t.unprepend,t.unsnoc=t.unappend,t.cons=function(n,r){return void 0===r?(0,t.prepend)(n):(0,A.pipe)(r,(0,t.prepend)(n))},t.snoc=function(n,t){return(0,A.pipe)(n,s([t]))},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?u.none:u.some((0,t.unsafeInsertAt)(n,r,e))}},t.prependToAll=t.prependAll,t.fold=t.concatAll,t.readonlyNonEmptyArray={URI:t.URI,of:t.of,map:l,mapWithIndex:d,ap:h,chain:p,extend:v,extract:t.extract,reduce:m,foldMap:g,reduceRight:b,traverse:w,sequence:t.sequence,reduceWithIndex:x,foldMapWithIndex:I,reduceRightWithIndex:_,traverseWithIndex:j,alt:y}})),Kt=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t},o=C&&C.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,i=0,o=t.length;i<o;i++)!e&&i in t||(e||(e=Array.prototype.slice.call(t,0,i)),e[i]=t[i]);return n.concat(e||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.mapWithIndex=t.map=t.flatten=t.duplicate=t.extend=t.chain=t.ap=t.alt=t.altW=t.chunksOf=t.splitAt=t.chop=t.chainWithIndex=t.foldMap=t.foldMapWithIndex=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.of=t.copy=t.modifyAt=t.updateAt=t.insertAt=t.sort=t.groupBy=t.group=t.reverse=t.concat=t.concatW=t.unappend=t.unprepend=t.range=t.replicate=t.makeBy=t.fromArray=t.fromReadonlyNonEmptyArray=t.rotate=t.union=t.sortBy=t.uniq=t.unsafeUpdateAt=t.unsafeInsertAt=t.append=t.appendW=t.prepend=t.prependW=t.isOutOfBound=t.isNonEmpty=void 0,t.filter=t.groupSort=t.intercalate=t.updateLast=t.modifyLast=t.updateHead=t.modifyHead=t.matchRight=t.matchLeft=t.concatAll=t.max=t.min=t.init=t.last=t.tail=t.head=t.apS=t.bind=t.bindTo=t.Do=t.Comonad=t.Alt=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getUnionSemigroup=t.getEq=t.getSemigroup=t.getShow=t.URI=t.extract=t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.reduce=void 0,t.nonEmptyArray=t.fold=t.prependToAll=t.snoc=t.cons=t.unsnoc=t.uncons=t.filterWithIndex=void 0;var u=i(W),c=i(Ht);function a(n){return function(t){return t.concat(n)}}function s(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function f(n){return function(t){var r=t.length;if(0===r)return[];for(var e=[],i=t[0],o=[i],u=1;u<r;u++){var c=t[u];n.equals(c,i)?o.push(c):(e.push(o),o=[i=c])}return e.push(o),e}}t.isNonEmpty=function(n){return n.length>0},t.isOutOfBound=function(n,t){return n<0||n>=t.length},t.prependW=function(n){return function(t){return o([n],t,!0)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return o(o([],t,!0),[n],!1)}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if((0,t.isNonEmpty)(e)){var i=(0,t.fromReadonlyNonEmptyArray)(e);return i.splice(n,0,r),i}return[r]},t.unsafeUpdateAt=function(n,r,e){var i=(0,t.fromReadonlyNonEmptyArray)(e);return i[n]=r,i},t.uniq=function(n){return function(r){if(1===r.length)return(0,t.copy)(r);for(var e=[(0,t.head)(r)],i=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},o=0,u=(0,t.tail)(r);o<u.length;o++)i(u[o]);return e}},t.sortBy=function(n){if((0,t.isNonEmpty)(n)){var r=(0,V.getMonoid)();return(0,t.sort)(n.reduce(r.concat,r.empty))}return t.copy},t.union=function(n){var r=(0,t.uniq)(n);return function(n){return function(t){return r((0,A.pipe)(t,s(n)))}}},t.rotate=function(n){return function(r){var e=r.length,i=Math.round(n)%e;if((0,t.isOutOfBound)(Math.abs(i),r)||0===i)return(0,t.copy)(r);if(i<0){var o=(0,t.splitAt)(-i)(r);return(0,A.pipe)(o[1],s(o[0]))}return(0,t.rotate)(i-e)(r)}},t.fromReadonlyNonEmptyArray=u.fromReadonlyNonEmptyArray,t.fromArray=function(n){return(0,t.isNonEmpty)(n)?u.some(n):u.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],i=1;i<r;i++)e.push(n(i));return e}},t.replicate=function(n){return(0,t.makeBy)((function(){return n}))},t.range=function(n,r){return n<=r?(0,t.makeBy)((function(t){return n+t}))(r-n+1):[n]},t.unprepend=function(n){return[(0,t.head)(n),(0,t.tail)(n)]},t.unappend=function(n){return[(0,t.init)(n),(0,t.last)(n)]},t.concatW=a,t.concat=s,t.reverse=function(n){return o([(0,t.last)(n)],n.slice(0,-1).reverse(),!0)},t.group=f,t.groupBy=function(n){return function(t){for(var r={},e=0,i=t;e<i.length;e++){var o=i[e],c=n(o);u.has.call(r,c)?r[c].push(o):r[c]=[o]}return r}},t.sort=function(n){return function(t){return t.slice().sort(n.compare)}},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?u.none:u.some((0,t.unsafeInsertAt)(n,r,e))}},t.updateAt=function(n,r){return(0,t.modifyAt)(n,(function(){return r}))},t.modifyAt=function(n,r){return function(e){return(0,t.isOutOfBound)(n,e)?u.none:u.some((0,t.unsafeUpdateAt)(n,r(e[n]),e))}},t.copy=t.fromReadonlyNonEmptyArray,t.of=function(n){return[n]},t.zipWith=function(n,t,r){for(var e=[r(n[0],t[0])],i=Math.min(n.length,t.length),o=1;o<i;o++)e[o]=r(n[o],t[o]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:(0,t.zipWith)(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[n[0][0]],r=[n[0][1]],e=1;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){return function(t){for(var r=[n,t[0]],e=1;e<t.length;e++)r.push(n,t[e]);return r}},t.intersperse=function(n){return function(r){var e=(0,t.tail)(r);return(0,t.isNonEmpty)(e)?(0,A.pipe)(e,(0,t.prependAll)(n),(0,t.prepend)((0,t.head)(r))):(0,t.copy)(r)}},t.foldMapWithIndex=c.foldMapWithIndex,t.foldMap=c.foldMap,t.chainWithIndex=function(n){return function(r){for(var e=(0,t.fromReadonlyNonEmptyArray)(n(0,(0,t.head)(r))),i=1;i<r.length;i++)e.push.apply(e,n(i,r[i]));return e}},t.chop=function(n){return function(r){for(var e=n(r),i=[e[0]],o=e[1];(0,t.isNonEmpty)(o);){var u=n(o),c=u[1];i.push(u[0]),o=c}return i}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[(0,t.copy)(r),[]]:[(0,A.pipe)(r.slice(1,e),(0,t.prepend)((0,t.head)(r))),r.slice(e)]}},t.chunksOf=function(n){return(0,t.chop)((0,t.splitAt)(n))};var l=function(n,r){return(0,A.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,A.pipe)(n,(0,t.mapWithIndex)(r))},h=function(n,r){return(0,A.pipe)(n,(0,t.ap)(r))},p=function(n,r){return(0,A.pipe)(n,(0,t.chain)(r))},v=function(n,r){return(0,A.pipe)(n,(0,t.extend)(r))},m=function(n,r,e){return(0,A.pipe)(n,(0,t.reduce)(r,e))},g=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},b=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRight)(r,e))},w=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},y=function(n,r){return(0,A.pipe)(n,(0,t.alt)(r))},x=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceWithIndex)(r,e))},I=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},_=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},j=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,A.pipe)(n,r(t))}};t.altW=function(n){return function(t){return(0,A.pipe)(t,a(n()))}},t.alt=t.altW,t.ap=function(n){return(0,t.chain)((function(r){return(0,A.pipe)(n,(0,t.map)(r))}))},t.chain=function(n){return(0,t.chainWithIndex)((function(t,r){return n(r)}))},t.extend=function(n){return function(r){for(var e=(0,t.tail)(r),i=[n(r)];(0,t.isNonEmpty)(e);)i.push(n(e)),e=(0,t.tail)(e);return i}},t.duplicate=(0,t.extend)(A.identity),t.flatten=(0,t.chain)(A.identity),t.map=function(n){return(0,t.mapWithIndex)((function(t,r){return n(r)}))},t.mapWithIndex=function(n){return function(r){for(var e=[n(0,(0,t.head)(r))],i=1;i<r.length;i++)e.push(n(i,r[i]));return e}},t.reduce=c.reduce,t.reduceWithIndex=c.reduceWithIndex,t.reduceRight=c.reduceRight,t.reduceRightWithIndex=c.reduceRightWithIndex,t.traverse=function(n){var r=(0,t.traverseWithIndex)(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return(0,t.traverseWithIndex)(n)((function(n,t){return t}))},t.traverseWithIndex=function(n){return function(r){return function(e){for(var i=n.map(r(0,(0,t.head)(e)),t.of),o=1;o<e.length;o++)i=n.ap(n.map(i,(function(n){return function(r){return(0,A.pipe)(n,(0,t.append)(r))}})),r(o,e[o]));return i}}},t.extract=c.head,t.URI="NonEmptyArray",t.getShow=c.getShow,t.getSemigroup=function(){return{concat:s}},t.getEq=c.getEq,t.getUnionSemigroup=function(n){var r=(0,t.union)(n);return{concat:function(n,t){return r(t)(n)}}},t.Functor={URI:t.URI,map:l},t.flap=(0,T.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:l,mapWithIndex:d},t.Apply={URI:t.URI,map:l,ap:h},t.apFirst=(0,P.apFirst)(t.Apply),t.apSecond=(0,P.apSecond)(t.Apply),t.Applicative={URI:t.URI,map:l,ap:h,of:t.of},t.Chain={URI:t.URI,map:l,ap:h,chain:p},t.chainFirst=(0,F.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:l,ap:h,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:g,reduceRight:b},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:g,reduceRight:b,reduceWithIndex:x,foldMapWithIndex:I,reduceRightWithIndex:_},t.Traversable={URI:t.URI,map:l,reduce:m,foldMap:g,reduceRight:b,traverse:w,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:l,mapWithIndex:d,reduce:m,foldMap:g,reduceRight:b,traverse:w,sequence:t.sequence,reduceWithIndex:x,foldMapWithIndex:I,reduceRightWithIndex:_,traverseWithIndex:j},t.Alt={URI:t.URI,map:l,alt:y},t.Comonad={URI:t.URI,map:l,extend:v,extract:t.extract},t.Do=(0,t.of)(u.emptyRecord),t.bindTo=(0,T.bindTo)(t.Functor),t.bind=(0,F.bind)(t.Chain),t.apS=(0,P.apS)(t.Apply),t.head=c.head,t.tail=function(n){return n.slice(1)},t.last=c.last,t.init=function(n){return n.slice(0,-1)},t.min=c.min,t.max=c.max,t.concatAll=function(n){return function(t){return t.reduce(n.concat)}},t.matchLeft=function(n){return function(r){return n((0,t.head)(r),(0,t.tail)(r))}},t.matchRight=function(n){return function(r){return n((0,t.init)(r),(0,t.last)(r))}},t.modifyHead=function(n){return function(r){return o([n((0,t.head)(r))],(0,t.tail)(r),!0)}},t.updateHead=function(n){return(0,t.modifyHead)((function(){return n}))},t.modifyLast=function(n){return function(r){return(0,A.pipe)((0,t.init)(r),(0,t.append)(n((0,t.last)(r))))}},t.updateLast=function(n){return(0,t.modifyLast)((function(){return n}))},t.intercalate=c.intercalate,t.groupSort=function(n){var r=(0,t.sort)(n),e=f(n);return function(n){return(0,t.isNonEmpty)(n)?e(r(n)):[]}},t.filter=function(n){return(0,t.filterWithIndex)((function(t,r){return n(r)}))},t.filterWithIndex=function(n){return function(r){return(0,t.fromArray)(r.filter((function(t,r){return n(r,t)})))}},t.uncons=t.unprepend,t.unsnoc=t.unappend,t.cons=function(n,r){return void 0===r?(0,t.prepend)(n):(0,A.pipe)(r,(0,t.prepend)(n))},t.snoc=function(n,r){return(0,A.pipe)(n,(0,t.append)(r))},t.prependToAll=t.prependAll,t.fold=c.concatAll,t.nonEmptyArray={URI:t.URI,of:t.of,map:l,mapWithIndex:d,ap:h,chain:p,extend:v,extract:t.extract,reduce:m,foldMap:g,reduceRight:b,traverse:w,sequence:t.sequence,reduceWithIndex:x,foldMapWithIndex:I,reduceRightWithIndex:_,traverseWithIndex:j,alt:y}})),Zt=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t},o=C&&C.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,i=0,o=t.length;i<o;i++)!e&&i in t||(e||(e=Array.prototype.slice.call(t,0,i)),e[i]=t[i]);return n.concat(e||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.sort=t.lefts=t.rights=t.reverse=t.modifyAt=t.deleteAt=t.updateAt=t.insertAt=t.findLastIndex=t.findLastMap=t.findLast=t.findFirstMap=t.findFirst=t.findIndex=t.dropLeftWhile=t.dropRight=t.dropLeft=t.spanLeft=t.takeLeftWhile=t.takeRight=t.takeLeft=t.init=t.tail=t.last=t.head=t.lookup=t.isOutOfBound=t.size=t.scanRight=t.scanLeft=t.chainWithIndex=t.foldRight=t.matchRight=t.matchRightW=t.foldLeft=t.matchLeft=t.matchLeftW=t.match=t.matchW=t.fromEither=t.fromOption=t.fromPredicate=t.replicate=t.makeBy=t.appendW=t.append=t.prependW=t.prepend=t.isNonEmpty=t.isEmpty=void 0,t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.foldMap=t.reduce=t.foldMapWithIndex=t.duplicate=t.extend=t.filterWithIndex=t.partitionMapWithIndex=t.partitionMap=t.partitionWithIndex=t.partition=t.compact=t.filterMap=t.filterMapWithIndex=t.filter=t.separate=t.mapWithIndex=t.map=t.flatten=t.chain=t.ap=t.alt=t.altW=t.zero=t.of=t._chainRecBreadthFirst=t._chainRecDepthFirst=t.difference=t.intersection=t.union=t.concat=t.concatW=t.comprehension=t.fromOptionK=t.chunksOf=t.splitAt=t.chop=t.sortBy=t.uniq=t.elem=t.rotate=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=void 0,t.toArray=t.unsafeDeleteAt=t.unsafeUpdateAt=t.unsafeInsertAt=t.fromEitherK=t.FromEither=t.filterE=t.Witherable=t.ChainRecBreadthFirst=t.chainRecBreadthFirst=t.ChainRecDepthFirst=t.chainRecDepthFirst=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.FilterableWithIndex=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.guard=t.Zero=t.Alt=t.Unfoldable=t.chainFirst=t.Monad=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getDifferenceMagma=t.getIntersectionSemigroup=t.getUnionMonoid=t.getUnionSemigroup=t.getOrd=t.getEq=t.getMonoid=t.getSemigroup=t.getShow=t.URI=t.unfold=t.wilt=t.wither=t.traverseWithIndex=void 0,t.readonlyArray=t.prependToAll=t.snoc=t.cons=t.range=t.apS=t.bind=t.bindTo=t.Do=t.intercalate=t.exists=t.some=t.every=t.empty=t.fromArray=void 0;var u=i(W),c=i(Gt),a=i(Ht);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=a.isNonEmpty,t.prepend=a.prepend,t.prependW=a.prependW,t.append=a.append,t.appendW=a.appendW,t.makeBy=function(n,r){return n<=0?t.empty:a.makeBy(r)(n)},t.replicate=function(n,r){return(0,t.makeBy)(n,(function(){return r}))},t.fromPredicate=function(n){return function(r){return n(r)?[r]:t.empty}},t.fromOption=function(n){return u.isNone(n)?t.empty:[n.value]},t.fromEither=function(n){return u.isLeft(n)?t.empty:[n.right]},t.matchW=function(n,r){return function(e){return(0,t.isNonEmpty)(e)?r(e):n()}},t.match=t.matchW,t.matchLeftW=function(n,r){return function(e){return(0,t.isNonEmpty)(e)?r(a.head(e),a.tail(e)):n()}},t.matchLeft=t.matchLeftW,t.foldLeft=t.matchLeft,t.matchRightW=function(n,r){return function(e){return(0,t.isNonEmpty)(e)?r(a.init(e),a.last(e)):n()}},t.matchRight=t.matchRightW,t.foldRight=t.matchRight,t.chainWithIndex=function(n){return function(r){if((0,t.isEmpty)(r))return t.empty;for(var e=[],i=0;i<r.length;i++)e.push.apply(e,n(i,r[i]));return e}},t.scanLeft=function(n,t){return function(r){var e=r.length,i=new Array(e+1);i[0]=n;for(var o=0;o<e;o++)i[o+1]=t(i[o],r[o]);return i}},t.scanRight=function(n,t){return function(r){var e=r.length,i=new Array(e+1);i[e]=n;for(var o=e-1;o>=0;o--)i[o]=t(r[o],i[o+1]);return i}},t.size=function(n){return n.length},t.isOutOfBound=a.isOutOfBound,t.lookup=function n(r,e){return void 0===e?function(t){return n(r,t)}:(0,t.isOutOfBound)(r,e)?u.none:u.some(e[r])},t.head=function(n){return(0,t.isNonEmpty)(n)?u.some(a.head(n)):u.none},t.last=function(n){return(0,t.isNonEmpty)(n)?u.some(a.last(n)):u.none},t.tail=function(n){return(0,t.isNonEmpty)(n)?u.some(a.tail(n)):u.none},t.init=function(n){return(0,t.isNonEmpty)(n)?u.some(a.init(n)):u.none},t.takeLeft=function(n){return function(r){return(0,t.isOutOfBound)(n,r)?r:0===n?t.empty:r.slice(0,n)}},t.takeRight=function(n){return function(r){return(0,t.isOutOfBound)(n,r)?r:0===n?t.empty:r.slice(-n)}},t.takeLeftWhile=function(n){return function(r){for(var e=[],i=0,o=r;i<o.length;i++){var u=o[i];if(!n(u))break;e.push(u)}var c=e.length;return c===r.length?r:0===c?t.empty:e}};var s=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function f(n){return function(t,r){if(void 0===r){var e=f(n);return function(n){return e(t,n)}}for(var i=0;i<r.length;i++)if(n.equals(r[i],t))return!0;return!1}}function l(n){var r=a.union(n);return function(e,i){if(void 0===i){var o=l(n);return function(n){return o(n,e)}}return(0,t.isNonEmpty)(e)&&(0,t.isNonEmpty)(i)?r(i)(e):(0,t.isNonEmpty)(e)?e:i}}function d(n){var t=f(n);return function(r,e){if(void 0===e){var i=d(n);return function(n){return i(n,r)}}return r.filter((function(n){return t(n,e)}))}}function h(n){var t=f(n);return function(r,e){if(void 0===e){var i=h(n);return function(n){return i(n,r)}}return r.filter((function(n){return!t(n,e)}))}}t.spanLeft=function(n){return function(r){var e=(0,t.splitAt)(s(r,n))(r);return{init:e[0],rest:e[1]}}},t.dropLeft=function(n){return function(r){return n<=0||(0,t.isEmpty)(r)?r:n>=r.length?t.empty:r.slice(n,r.length)}},t.dropRight=function(n){return function(r){return n<=0||(0,t.isEmpty)(r)?r:n>=r.length?t.empty:r.slice(0,r.length-n)}},t.dropLeftWhile=function(n){return function(r){var e=s(r,n);return 0===e?r:e===r.length?t.empty:r.slice(e)}},t.findIndex=function(n){return function(t){for(var r=0;r<t.length;r++)if(n(t[r]))return u.some(r);return u.none}},t.findFirst=function(n){return function(t){for(var r=0;r<t.length;r++)if(n(t[r]))return u.some(t[r]);return u.none}},t.findFirstMap=function(n){return function(t){for(var r=0;r<t.length;r++){var e=n(t[r]);if(u.isSome(e))return e}return u.none}},t.findLast=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return u.some(t[r]);return u.none}},t.findLastMap=function(n){return function(t){for(var r=t.length-1;r>=0;r--){var e=n(t[r]);if(u.isSome(e))return e}return u.none}},t.findLastIndex=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return u.some(r);return u.none}},t.insertAt=function(n,t){return function(r){return n<0||n>r.length?u.none:u.some(a.unsafeInsertAt(n,t,r))}},t.updateAt=function(n,r){return(0,t.modifyAt)(n,(function(){return r}))},t.deleteAt=function(n){return function(r){return(0,t.isOutOfBound)(n,r)?u.none:u.some((0,t.unsafeDeleteAt)(n,r))}},t.modifyAt=function(n,r){return function(e){return(0,t.isOutOfBound)(n,e)?u.none:u.some((0,t.unsafeUpdateAt)(n,r(e[n]),e))}},t.reverse=function(n){return n.length<=1?n:n.slice().reverse()},t.rights=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Right"===e._tag&&t.push(e.right)}return t},t.lefts=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Left"===e._tag&&t.push(e.left)}return t},t.sort=function(n){return function(t){return t.length<=1?t:t.slice().sort(n.compare)}},t.zipWith=function(n,t,r){for(var e=[],i=Math.min(n.length,t.length),o=0;o<i;o++)e[o]=r(n[o],t[o]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:(0,t.zipWith)(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[],r=[],e=0;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){var r=a.prependAll(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.intersperse=function(n){var r=a.intersperse(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.rotate=function(n){var r=a.rotate(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.elem=f,t.uniq=function(n){var r=a.uniq(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.sortBy=function(n){var r=a.sortBy(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.chop=function(n){var r=a.chop(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):t.empty}},t.splitAt=function(n){return function(r){return n>=1&&(0,t.isNonEmpty)(r)?a.splitAt(n)(r):(0,t.isEmpty)(r)?[r,t.empty]:[t.empty,r]}},t.chunksOf=function(n){var r=a.chunksOf(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):t.empty}},t.fromOptionK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return(0,t.fromOption)(n.apply(void 0,r))}},t.comprehension=function(n,r,e){void 0===e&&(e=function(){return!0});var i=function(n,o){return(0,t.isNonEmpty)(o)?(0,A.pipe)(a.head(o),(0,t.chain)((function(r){return i((0,A.pipe)(n,(0,t.append)(r)),a.tail(o))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:t.empty};return i(t.empty,n)},t.concatW=function(n){return function(r){return(0,t.isEmpty)(r)?n:(0,t.isEmpty)(n)?r:r.concat(n)}},t.concat=t.concatW,t.union=l,t.intersection=d,t.difference=h;var p=function(n,r){return(0,A.pipe)(n,(0,t.map)(r))},v=function(n,r){return(0,A.pipe)(n,(0,t.mapWithIndex)(r))},m=function(n,r){return(0,A.pipe)(n,(0,t.ap)(r))},g=function(n,r){return(0,A.pipe)(n,(0,t.chain)(r))},b=function(n,r){return(0,A.pipe)(n,(0,t.filter)(r))},w=function(n,r){return(0,A.pipe)(n,(0,t.filterMap)(r))},y=function(n,r){return(0,A.pipe)(n,(0,t.partition)(r))},x=function(n,r){return(0,A.pipe)(n,(0,t.partitionMap)(r))},I=function(n,r){return(0,A.pipe)(n,(0,t.partitionWithIndex)(r))},_=function(n,r){return(0,A.pipe)(n,(0,t.partitionMapWithIndex)(r))},j=function(n,r){return(0,A.pipe)(n,(0,t.alt)(r))},k=function(n,r,e){return(0,A.pipe)(n,(0,t.reduce)(r,e))},O=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},R=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRight)(r,e))},M=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceWithIndex)(r,e))},U=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},E=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},z=function(n,r){return(0,A.pipe)(n,(0,t.filterMapWithIndex)(r))},S=function(n,r){return(0,A.pipe)(n,(0,t.filterWithIndex)(r))},N=function(n,r){return(0,A.pipe)(n,(0,t.extend)(r))},L=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},q=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,A.pipe)(n,r(t))}};t._chainRecDepthFirst=function(n,r){return(0,A.pipe)(n,(0,t.chainRecDepthFirst)(r))},t._chainRecBreadthFirst=function(n,r){return(0,A.pipe)(n,(0,t.chainRecBreadthFirst)(r))},t.of=a.of,t.zero=function(){return t.empty},t.altW=function(n){return function(t){return t.concat(n())}},t.alt=t.altW,t.ap=function(n){return(0,t.chain)((function(r){return(0,A.pipe)(n,(0,t.map)(r))}))},t.chain=function(n){return function(r){return(0,A.pipe)(r,(0,t.chainWithIndex)((function(t,r){return n(r)})))}},t.flatten=(0,t.chain)(A.identity),t.map=function(n){return function(t){return t.map((function(t){return n(t)}))}},t.mapWithIndex=function(n){return function(t){return t.map((function(t,r){return n(r,t)}))}},t.separate=function(n){for(var t=[],r=[],e=0,i=n;e<i.length;e++){var o=i[e];"Left"===o._tag?t.push(o.left):r.push(o.right)}return(0,G.separated)(t,r)},t.filter=function(n){return function(t){return t.filter(n)}},t.filterMapWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++){var i=n(e,t[e]);u.isSome(i)&&r.push(i.value)}return r}},t.filterMap=function(n){return(0,t.filterMapWithIndex)((function(t,r){return n(r)}))},t.compact=(0,t.filterMap)(A.identity),t.partition=function(n){return(0,t.partitionWithIndex)((function(t,r){return n(r)}))},t.partitionWithIndex=function(n){return function(t){for(var r=[],e=[],i=0;i<t.length;i++){var o=t[i];n(i,o)?e.push(o):r.push(o)}return(0,G.separated)(r,e)}},t.partitionMap=function(n){return(0,t.partitionMapWithIndex)((function(t,r){return n(r)}))},t.partitionMapWithIndex=function(n){return function(t){for(var r=[],e=[],i=0;i<t.length;i++){var o=n(i,t[i]);"Left"===o._tag?r.push(o.left):e.push(o.right)}return(0,G.separated)(r,e)}},t.filterWithIndex=function(n){return function(t){return t.filter((function(t,r){return n(r,t)}))}},t.extend=function(n){return function(t){return t.map((function(r,e){return n(t.slice(e))}))}},t.duplicate=(0,t.extend)(A.identity),t.foldMapWithIndex=function(n){return function(t){return function(r){return r.reduce((function(r,e,i){return n.concat(r,t(i,e))}),n.empty)}}},t.reduce=function(n,r){return(0,t.reduceWithIndex)(n,(function(n,t,e){return r(t,e)}))},t.foldMap=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n){return r((function(t,r){return n(r)}))}},t.reduceWithIndex=function(n,t){return function(r){for(var e=r.length,i=n,o=0;o<e;o++)i=t(o,i,r[o]);return i}},t.reduceRight=function(n,r){return(0,t.reduceRightWithIndex)(n,(function(n,t,e){return r(t,e)}))},t.reduceRightWithIndex=function(n,t){return function(r){return r.reduceRight((function(n,r,e){return t(e,r,n)}),n)}},t.traverse=function(n){var r=(0,t.traverseWithIndex)(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return function(r){return k(r,n.of((0,t.zero)()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return(0,A.pipe)(n,(0,t.append)(r))}})),e)}))}},t.traverseWithIndex=function(n){return function(r){return(0,t.reduceWithIndex)(n.of((0,t.zero)()),(function(e,i,o){return n.ap(n.map(i,(function(n){return function(r){return(0,A.pipe)(n,(0,t.append)(r))}})),r(e,o))}))}},t.wither=function(n){var t=B(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=Z(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var i=t(e);if(!u.isSome(i))break;var o=i.value,c=o[1];r.push(o[0]),e=c}return r},t.URI="ReadonlyArray",t.getShow=function(n){return{show:function(t){return"[".concat(t.map(n.show).join(", "),"]")}}},t.getSemigroup=function(){return{concat:function(n,r){return(0,t.isEmpty)(n)?r:(0,t.isEmpty)(r)?n:n.concat(r)}}},t.getMonoid=function(){return{concat:(0,t.getSemigroup)().concat,empty:t.empty}},t.getEq=function(n){return(0,$.fromEquals)((function(t,r){return t.length===r.length&&t.every((function(t,e){return n.equals(t,r[e])}))}))},t.getOrd=function(n){return(0,V.fromCompare)((function(t,r){for(var e=t.length,i=r.length,o=Math.min(e,i),u=0;u<o;u++){var a=n.compare(t[u],r[u]);if(0!==a)return a}return c.Ord.compare(e,i)}))},t.getUnionSemigroup=function(n){var t=l(n);return{concat:function(n,r){return t(r)(n)}}},t.getUnionMonoid=function(n){return{concat:(0,t.getUnionSemigroup)(n).concat,empty:t.empty}},t.getIntersectionSemigroup=function(n){var t=d(n);return{concat:function(n,r){return t(r)(n)}}},t.getDifferenceMagma=function(n){var t=h(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:p},t.flap=(0,T.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:p,mapWithIndex:v},t.Apply={URI:t.URI,map:p,ap:m},t.apFirst=(0,P.apFirst)(t.Apply),t.apSecond=(0,P.apSecond)(t.Apply),t.Applicative={URI:t.URI,map:p,ap:m,of:t.of},t.Chain={URI:t.URI,map:p,ap:m,chain:g},t.Monad={URI:t.URI,map:p,ap:m,of:t.of,chain:g},t.chainFirst=(0,F.chainFirst)(t.Chain),t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:p,alt:j},t.Zero={URI:t.URI,zero:t.zero},t.guard=(0,K.guard)(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:p,ap:m,of:t.of,alt:j,zero:t.zero},t.Extend={URI:t.URI,map:p,extend:N},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.Filterable={URI:t.URI,map:p,compact:t.compact,separate:t.separate,filter:b,filterMap:w,partition:y,partitionMap:x},t.FilterableWithIndex={URI:t.URI,map:p,mapWithIndex:v,compact:t.compact,separate:t.separate,filter:b,filterMap:w,partition:y,partitionMap:x,partitionMapWithIndex:_,partitionWithIndex:I,filterMapWithIndex:z,filterWithIndex:S},t.Foldable={URI:t.URI,reduce:k,foldMap:O,reduceRight:R},t.FoldableWithIndex={URI:t.URI,reduce:k,foldMap:O,reduceRight:R,reduceWithIndex:M,foldMapWithIndex:U,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:p,reduce:k,foldMap:O,reduceRight:R,traverse:L,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:p,mapWithIndex:v,reduce:k,foldMap:O,reduceRight:R,reduceWithIndex:M,foldMapWithIndex:U,reduceRightWithIndex:E,traverse:L,sequence:t.sequence,traverseWithIndex:q},t.chainRecDepthFirst=function(n){return function(t){for(var r=o([],n(t),!0),e=[];r.length>0;){var i=r.shift();u.isLeft(i)?r.unshift.apply(r,n(i.left)):e.push(i.right)}return e}},t.ChainRecDepthFirst={URI:t.URI,map:p,ap:m,chain:g,chainRec:t._chainRecDepthFirst},t.chainRecBreadthFirst=function(n){return function(t){var r=n(t),e=[],i=[];function o(t){u.isLeft(t)?n(t.left).forEach((function(n){return e.push(n)})):i.push(t.right)}for(var c=0,a=r;c<a.length;c++)o(a[c]);for(;e.length>0;)o(e.shift());return i}},t.ChainRecBreadthFirst={URI:t.URI,map:p,ap:m,chain:g,chainRec:t._chainRecBreadthFirst};var B=(0,H.witherDefault)(t.Traversable,t.Compactable),Z=(0,H.wiltDefault)(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:p,compact:t.compact,separate:t.separate,filter:b,filterMap:w,partition:y,partitionMap:x,reduce:k,foldMap:O,reduceRight:R,traverse:L,sequence:t.sequence,wither:B,wilt:Z},t.filterE=(0,H.filterE)(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=(0,D.fromEitherK)(t.FromEither),t.unsafeInsertAt=a.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return(0,t.isNonEmpty)(e)?a.unsafeUpdateAt(n,r,e):e},t.unsafeDeleteAt=function(n,t){var r=t.slice();return r.splice(n,1),r},t.toArray=function(n){return n.slice()},t.fromArray=function(n){return(0,t.isEmpty)(n)?t.empty:n.slice()},t.empty=a.empty,t.every=function(n){return function(t){return t.every(n)}},t.some=function(n){return function(t){return t.some(n)}},t.exists=t.some,t.intercalate=function(n){var r=a.intercalate(n);return function(e){return(0,t.match)((function(){return n.empty}),r(e))}},t.Do=(0,t.of)(u.emptyRecord),t.bindTo=(0,T.bindTo)(t.Functor),t.bind=(0,F.bind)(t.Chain),t.apS=(0,P.apS)(t.Apply),t.range=a.range,t.cons=a.cons,t.snoc=a.snoc,t.prependToAll=t.prependAll,t.readonlyArray={URI:t.URI,compact:t.compact,separate:t.separate,map:p,ap:m,of:t.of,chain:g,filter:b,filterMap:w,partition:y,partitionMap:x,mapWithIndex:v,partitionMapWithIndex:_,partitionWithIndex:I,filterMapWithIndex:z,filterWithIndex:S,alt:j,zero:t.zero,unfold:t.unfold,reduce:k,foldMap:O,reduceRight:R,traverse:L,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:U,reduceRightWithIndex:E,traverseWithIndex:q,extend:N,wither:B,wilt:Z}})),Yt=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),i=C&&C.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&r(t,n,i);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.lefts=t.rights=t.reverse=t.modifyAt=t.deleteAt=t.updateAt=t.insertAt=t.copy=t.findLastIndex=t.findLastMap=t.findLast=t.findFirstMap=t.findFirst=t.findIndex=t.dropLeftWhile=t.dropRight=t.dropLeft=t.spanLeft=t.takeLeftWhile=t.takeRight=t.takeLeft=t.init=t.tail=t.last=t.head=t.lookup=t.isOutOfBound=t.size=t.scanRight=t.scanLeft=t.chainWithIndex=t.foldRight=t.matchRight=t.matchRightW=t.foldLeft=t.matchLeft=t.matchLeftW=t.match=t.matchW=t.fromEither=t.fromOption=t.fromPredicate=t.replicate=t.makeBy=t.appendW=t.append=t.prependW=t.prepend=t.isNonEmpty=t.isEmpty=void 0,t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.reduce=t.foldMapWithIndex=t.foldMap=t.duplicate=t.extend=t.filterWithIndex=t.alt=t.altW=t.partitionMapWithIndex=t.partitionMap=t.partitionWithIndex=t.partition=t.filter=t.separate=t.compact=t.filterMap=t.filterMapWithIndex=t.mapWithIndex=t.flatten=t.chain=t.ap=t.map=t.zero=t.of=t.difference=t.intersection=t.union=t.concat=t.concatW=t.comprehension=t.fromOptionK=t.chunksOf=t.splitAt=t.chop=t.sortBy=t.uniq=t.elem=t.rotate=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.sort=void 0,t.some=t.every=t.unsafeDeleteAt=t.unsafeUpdateAt=t.unsafeInsertAt=t.fromEitherK=t.FromEither=t.filterE=t.ChainRecBreadthFirst=t.chainRecBreadthFirst=t.ChainRecDepthFirst=t.chainRecDepthFirst=t.Witherable=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.FilterableWithIndex=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.guard=t.Zero=t.Alt=t.Unfoldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getDifferenceMagma=t.getIntersectionSemigroup=t.getUnionMonoid=t.getUnionSemigroup=t.getOrd=t.getEq=t.getMonoid=t.getSemigroup=t.getShow=t.URI=t.unfold=t.wilt=t.wither=void 0,t.array=t.prependToAll=t.snoc=t.cons=t.empty=t.range=t.apS=t.bind=t.bindTo=t.Do=t.intercalate=t.exists=void 0;var o=i(W),u=i(Kt),c=i(Zt);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=u.isNonEmpty,t.prepend=u.prepend,t.prependW=u.prependW,t.append=u.append,t.appendW=u.appendW,t.makeBy=function(n,t){return n<=0?[]:u.makeBy(t)(n)},t.replicate=function(n,r){return(0,t.makeBy)(n,(function(){return r}))},t.fromPredicate=function(n){return function(t){return n(t)?[t]:[]}},t.fromOption=function(n){return o.isNone(n)?[]:[n.value]},t.fromEither=function(n){return o.isLeft(n)?[]:[n.right]},t.matchW=function(n,r){return function(e){return(0,t.isNonEmpty)(e)?r(e):n()}},t.match=t.matchW,t.matchLeftW=function(n,r){return function(e){return(0,t.isNonEmpty)(e)?r(u.head(e),u.tail(e)):n()}},t.matchLeft=t.matchLeftW,t.foldLeft=t.matchLeft,t.matchRightW=function(n,r){return function(e){return(0,t.isNonEmpty)(e)?r(u.init(e),u.last(e)):n()}},t.matchRight=t.matchRightW,t.foldRight=t.matchRight,t.chainWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++)r.push.apply(r,n(e,t[e]));return r}},t.scanLeft=function(n,t){return function(r){var e=r.length,i=new Array(e+1);i[0]=n;for(var o=0;o<e;o++)i[o+1]=t(i[o],r[o]);return i}},t.scanRight=function(n,t){return function(r){var e=r.length,i=new Array(e+1);i[e]=n;for(var o=e-1;o>=0;o--)i[o]=t(r[o],i[o+1]);return i}},t.size=function(n){return n.length},t.isOutOfBound=u.isOutOfBound,t.lookup=c.lookup,t.head=c.head,t.last=c.last,t.tail=function(n){return(0,t.isNonEmpty)(n)?o.some(u.tail(n)):o.none},t.init=function(n){return(0,t.isNonEmpty)(n)?o.some(u.init(n)):o.none},t.takeLeft=function(n){return function(r){return(0,t.isOutOfBound)(n,r)?(0,t.copy)(r):r.slice(0,n)}},t.takeRight=function(n){return function(r){return(0,t.isOutOfBound)(n,r)?(0,t.copy)(r):0===n?[]:r.slice(-n)}},t.takeLeftWhile=function(n){return function(t){for(var r=[],e=0,i=t;e<i.length;e++){var o=i[e];if(!n(o))break;r.push(o)}return r}};var a=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function s(n){var r=u.union(n);return function(e,i){if(void 0===i){var o=s(n);return function(n){return o(n,e)}}return(0,t.isNonEmpty)(e)&&(0,t.isNonEmpty)(i)?r(i)(e):(0,t.isNonEmpty)(e)?(0,t.copy)(e):(0,t.copy)(i)}}function f(n){var r=(0,t.elem)(n);return function(t,e){if(void 0===e){var i=f(n);return function(n){return i(n,t)}}return t.filter((function(n){return r(n,e)}))}}function l(n){var r=(0,t.elem)(n);return function(t,e){if(void 0===e){var i=l(n);return function(n){return i(n,t)}}return t.filter((function(n){return!r(n,e)}))}}t.spanLeft=function(n){return function(r){var e=(0,t.splitAt)(a(r,n))(r);return{init:e[0],rest:e[1]}}},t.dropLeft=function(n){return function(r){return n<=0||(0,t.isEmpty)(r)?(0,t.copy)(r):n>=r.length?[]:r.slice(n,r.length)}},t.dropRight=function(n){return function(r){return n<=0||(0,t.isEmpty)(r)?(0,t.copy)(r):n>=r.length?[]:r.slice(0,r.length-n)}},t.dropLeftWhile=function(n){return function(t){return t.slice(a(t,n))}},t.findIndex=c.findIndex,t.findFirst=function(n){return c.findFirst(n)},t.findFirstMap=c.findFirstMap,t.findLast=function(n){return c.findLast(n)},t.findLastMap=c.findLastMap,t.findLastIndex=c.findLastIndex,t.copy=function(n){return n.slice()},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?o.none:o.some((0,t.unsafeInsertAt)(n,r,e))}},t.updateAt=function(n,r){return(0,t.modifyAt)(n,(function(){return r}))},t.deleteAt=function(n){return function(r){return(0,t.isOutOfBound)(n,r)?o.none:o.some((0,t.unsafeDeleteAt)(n,r))}},t.modifyAt=function(n,r){return function(e){return(0,t.isOutOfBound)(n,e)?o.none:o.some((0,t.unsafeUpdateAt)(n,r(e[n]),e))}},t.reverse=function(n){return(0,t.isEmpty)(n)?[]:n.slice().reverse()},t.rights=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Right"===e._tag&&t.push(e.right)}return t},t.lefts=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Left"===e._tag&&t.push(e.left)}return t},t.sort=function(n){return function(r){return r.length<=1?(0,t.copy)(r):r.slice().sort(n.compare)}},t.zipWith=function(n,t,r){for(var e=[],i=Math.min(n.length,t.length),o=0;o<i;o++)e[o]=r(n[o],t[o]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:(0,t.zipWith)(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[],r=[],e=0;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){var r=u.prependAll(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):[]}},t.intersperse=function(n){var r=u.intersperse(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.rotate=function(n){var r=u.rotate(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.elem=c.elem,t.uniq=function(n){var r=u.uniq(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.sortBy=function(n){var r=u.sortBy(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.chop=function(n){var r=u.chop(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):[]}},t.splitAt=function(n){return function(r){return n>=1&&(0,t.isNonEmpty)(r)?u.splitAt(n)(r):(0,t.isEmpty)(r)?[(0,t.copy)(r),[]]:[[],(0,t.copy)(r)]}},t.chunksOf=function(n){var r=u.chunksOf(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):[]}},t.fromOptionK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return(0,t.fromOption)(n.apply(void 0,r))}},t.comprehension=function(n,r,e){void 0===e&&(e=function(){return!0});var i=function(n,o){return(0,t.isNonEmpty)(o)?(0,A.pipe)(u.head(o),(0,t.chain)((function(r){return i((0,A.pipe)(n,(0,t.append)(r)),u.tail(o))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:[]};return i([],n)},t.concatW=function(n){return function(r){return(0,t.isEmpty)(r)?(0,t.copy)(n):(0,t.isEmpty)(n)?(0,t.copy)(r):r.concat(n)}},t.concat=t.concatW,t.union=s,t.intersection=f,t.difference=l;var d=function(n,r){return(0,A.pipe)(n,(0,t.map)(r))},h=function(n,r){return(0,A.pipe)(n,(0,t.mapWithIndex)(r))},p=function(n,r){return(0,A.pipe)(n,(0,t.ap)(r))},v=function(n,r){return(0,A.pipe)(n,(0,t.chain)(r))},m=function(n,r){return(0,A.pipe)(n,(0,t.filter)(r))},g=function(n,r){return(0,A.pipe)(n,(0,t.filterMap)(r))},b=function(n,r){return(0,A.pipe)(n,(0,t.partition)(r))},w=function(n,r){return(0,A.pipe)(n,(0,t.partitionMap)(r))},y=function(n,r){return(0,A.pipe)(n,(0,t.partitionWithIndex)(r))},x=function(n,r){return(0,A.pipe)(n,(0,t.partitionMapWithIndex)(r))},I=function(n,r){return(0,A.pipe)(n,(0,t.alt)(r))},_=function(n,r,e){return(0,A.pipe)(n,(0,t.reduce)(r,e))},j=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},k=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRight)(r,e))},O=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceWithIndex)(r,e))},R=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},M=function(n,r,e){return(0,A.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},U=function(n,r){return(0,A.pipe)(n,(0,t.filterMapWithIndex)(r))},E=function(n,r){return(0,A.pipe)(n,(0,t.filterWithIndex)(r))},z=function(n,r){return(0,A.pipe)(n,(0,t.extend)(r))},S=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},N=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,A.pipe)(n,r(t))}},L=c._chainRecDepthFirst,q=c._chainRecBreadthFirst;t.of=u.of,t.zero=function(){return[]},t.map=function(n){return function(t){return t.map((function(t){return n(t)}))}},t.ap=function(n){return(0,t.chain)((function(r){return(0,A.pipe)(n,(0,t.map)(r))}))},t.chain=function(n){return function(r){return(0,A.pipe)(r,(0,t.chainWithIndex)((function(t,r){return n(r)})))}},t.flatten=(0,t.chain)(A.identity),t.mapWithIndex=function(n){return function(t){return t.map((function(t,r){return n(r,t)}))}},t.filterMapWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++){var i=n(e,t[e]);o.isSome(i)&&r.push(i.value)}return r}},t.filterMap=function(n){return(0,t.filterMapWithIndex)((function(t,r){return n(r)}))},t.compact=(0,t.filterMap)(A.identity),t.separate=function(n){for(var t=[],r=[],e=0,i=n;e<i.length;e++){var o=i[e];"Left"===o._tag?t.push(o.left):r.push(o.right)}return(0,G.separated)(t,r)},t.filter=function(n){return function(t){return t.filter(n)}},t.partition=function(n){return(0,t.partitionWithIndex)((function(t,r){return n(r)}))},t.partitionWithIndex=function(n){return function(t){for(var r=[],e=[],i=0;i<t.length;i++){var o=t[i];n(i,o)?e.push(o):r.push(o)}return(0,G.separated)(r,e)}},t.partitionMap=function(n){return(0,t.partitionMapWithIndex)((function(t,r){return n(r)}))},t.partitionMapWithIndex=function(n){return function(t){for(var r=[],e=[],i=0;i<t.length;i++){var o=n(i,t[i]);"Left"===o._tag?r.push(o.left):e.push(o.right)}return(0,G.separated)(r,e)}},t.altW=function(n){return function(t){return t.concat(n())}},t.alt=t.altW,t.filterWithIndex=function(n){return function(t){return t.filter((function(t,r){return n(r,t)}))}},t.extend=function(n){return function(t){return t.map((function(r,e){return n(t.slice(e))}))}},t.duplicate=(0,t.extend)(A.identity),t.foldMap=c.foldMap,t.foldMapWithIndex=c.foldMapWithIndex,t.reduce=c.reduce,t.reduceWithIndex=c.reduceWithIndex,t.reduceRight=c.reduceRight,t.reduceRightWithIndex=c.reduceRightWithIndex,t.traverse=function(n){var r=(0,t.traverseWithIndex)(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return function(r){return _(r,n.of((0,t.zero)()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return(0,A.pipe)(n,(0,t.append)(r))}})),e)}))}},t.traverseWithIndex=function(n){return function(r){return(0,t.reduceWithIndex)(n.of((0,t.zero)()),(function(e,i,o){return n.ap(n.map(i,(function(n){return function(r){return(0,A.pipe)(n,(0,t.append)(r))}})),r(e,o))}))}},t.wither=function(n){var t=$(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=V(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var i=t(e);if(!o.isSome(i))break;var u=i.value,c=u[1];r.push(u[0]),e=c}return r},t.URI="Array",t.getShow=c.getShow,t.getSemigroup=function(){return{concat:function(n,t){return n.concat(t)}}},t.getMonoid=function(){return{concat:(0,t.getSemigroup)().concat,empty:[]}},t.getEq=c.getEq,t.getOrd=c.getOrd,t.getUnionSemigroup=function(n){var t=s(n);return{concat:function(n,r){return t(r)(n)}}},t.getUnionMonoid=function(n){return{concat:(0,t.getUnionSemigroup)(n).concat,empty:[]}},t.getIntersectionSemigroup=function(n){var t=f(n);return{concat:function(n,r){return t(r)(n)}}},t.getDifferenceMagma=function(n){var t=l(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:d},t.flap=(0,T.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:d,mapWithIndex:h},t.Apply={URI:t.URI,map:d,ap:p},t.apFirst=(0,P.apFirst)(t.Apply),t.apSecond=(0,P.apSecond)(t.Apply),t.Applicative={URI:t.URI,map:d,ap:p,of:t.of},t.Chain={URI:t.URI,map:d,ap:p,chain:v},t.chainFirst=(0,F.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:d,ap:p,of:t.of,chain:v},t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:d,alt:I},t.Zero={URI:t.URI,zero:t.zero},t.guard=(0,K.guard)(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:d,ap:p,of:t.of,alt:I,zero:t.zero},t.Extend={URI:t.URI,map:d,extend:z},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.Filterable={URI:t.URI,map:d,compact:t.compact,separate:t.separate,filter:m,filterMap:g,partition:b,partitionMap:w},t.FilterableWithIndex={URI:t.URI,map:d,mapWithIndex:h,compact:t.compact,separate:t.separate,filter:m,filterMap:g,partition:b,partitionMap:w,partitionMapWithIndex:x,partitionWithIndex:y,filterMapWithIndex:U,filterWithIndex:E},t.Foldable={URI:t.URI,reduce:_,foldMap:j,reduceRight:k},t.FoldableWithIndex={URI:t.URI,reduce:_,foldMap:j,reduceRight:k,reduceWithIndex:O,foldMapWithIndex:R,reduceRightWithIndex:M},t.Traversable={URI:t.URI,map:d,reduce:_,foldMap:j,reduceRight:k,traverse:S,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:d,mapWithIndex:h,reduce:_,foldMap:j,reduceRight:k,reduceWithIndex:O,foldMapWithIndex:R,reduceRightWithIndex:M,traverse:S,sequence:t.sequence,traverseWithIndex:N};var $=(0,H.witherDefault)(t.Traversable,t.Compactable),V=(0,H.wiltDefault)(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:d,compact:t.compact,separate:t.separate,filter:m,filterMap:g,partition:b,partitionMap:w,reduce:_,foldMap:j,reduceRight:k,traverse:S,sequence:t.sequence,wither:$,wilt:V},t.chainRecDepthFirst=c.chainRecDepthFirst,t.ChainRecDepthFirst={URI:t.URI,map:d,ap:p,chain:v,chainRec:L},t.chainRecBreadthFirst=c.chainRecBreadthFirst,t.ChainRecBreadthFirst={URI:t.URI,map:d,ap:p,chain:v,chainRec:q},t.filterE=(0,H.filterE)(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=(0,D.fromEitherK)(t.FromEither),t.unsafeInsertAt=u.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return(0,t.isNonEmpty)(e)?u.unsafeUpdateAt(n,r,e):[]},t.unsafeDeleteAt=function(n,t){var r=t.slice();return r.splice(n,1),r},t.every=c.every,t.some=function(n){return function(t){return t.some(n)}},t.exists=t.some,t.intercalate=c.intercalate,t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,T.bindTo)(t.Functor),t.bind=(0,F.bind)(t.Chain),t.apS=(0,P.apS)(t.Apply),t.range=u.range,t.empty=[],t.cons=u.cons,t.snoc=u.snoc,t.prependToAll=t.prependAll,t.array={URI:t.URI,compact:t.compact,separate:t.separate,map:d,ap:p,of:t.of,chain:v,filter:m,filterMap:g,partition:b,partitionMap:w,mapWithIndex:h,partitionMapWithIndex:x,partitionWithIndex:y,filterMapWithIndex:U,filterWithIndex:E,alt:I,zero:t.zero,unfold:t.unfold,reduce:_,foldMap:j,reduceRight:k,traverse:S,sequence:t.sequence,reduceWithIndex:O,foldMapWithIndex:R,reduceRightWithIndex:M,traverseWithIndex:N,extend:z,wither:$,wilt:V}}));const Jt=n=>({kind:"height",size:n}),Xt=V.contramap((n=>n.size))(Gt.Ord),Qt=Yt.sort(Xt),nr=Yt.sort({equals:(n,t)=>n.kind===t.kind,compare:(n,t)=>n.kind===t.kind?0:"width"===n.kind?-1:1}),tr=n=>t=>{const r=Qt(t),e=(n=>{const[t,r]=n;return t.size/r.size})(r),i=Object.assign(Object.assign({},r[0]),{size:n*e}),o=Object.assign(Object.assign({},r[1]),{size:n});return nr([o,i])},rr=n=>{const{naturalWidth:t,naturalHeight:r}=n;return[(e=t,{kind:"width",size:e}),Jt(r)];var e},er=()=>{const n=document.createElement("canvas"),t=n.getContext("2d");return[n,t]},ir=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()}))})),or=(n,t)=>n.naturalWidth>t?((n,t)=>{const r=tr(n),[e,i]=er(),o=rr(t),[u,c]=r(o).map((n=>n.size)),a=new ImageData(u,c),s=(n=>{const{naturalWidth:t,naturalHeight:r}=n,[e,i]=er();return e.width=t,e.height=r,i.drawImage(n,0,0),i.getImageData(0,0,t,r)})(t);return e.width=u,e.height=c,Bt.lanczos(s,a),i.putImageData(a,0,0),e.toDataURL()})(t,n):(n=>{const t=document.createElement("canvas"),{naturalWidth:r,naturalHeight:e}=n,i=t.getContext("2d");return t.width=r,t.height=e,i.drawImage(n,0,0,r,e),t.toDataURL()})(n),ur=n=>g(n,xt,cn((n=>({headers:n})))),{state:cr,onChange:ar}=X({campaignId:Z.none,results:[],filters:[],cropperHandlers:[],detectedObjects:[],objectDetectionInProgress:!1,imageWidth:500,image:Z.none,imageUrl:Z.none,imageBounds:Z.none,searchArea:Z.none,resultsComponents:[],serverError:!1,loading:!1}),sr=async n=>{var t,r;cr.results=n.value,cr.filters=(r=jt(n.filters),Object.entries(r).map((([n,t])=>({name:n,filters:t})))),cr.rectangleSearchForm=n.searchArea,cr.resetCategoryLink=null===(t=n.links)||void 0===t?void 0:t.clearFilters,cr.loading=!1},fr=n=>g(ur(cr.token),Fn,Vn(kt(n))),lr=async()=>{cr.loading=!0,g(Wt(cr.imageBounds,cr.searchArea),Z.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 i={width:r.width,height:r.height,left:r.x,top:r.y};return await g(ur(cr.token),Fn,Vn(St(cr.rectangleSearchForm,i)),Dn(sr))()})))},dr=n=>{cr.loading=!0;const t=(n=>{const t=new FormData;return t.append("image",n),t})(n);return g(It(xt(cr.token),on(t)),cn((([n,t])=>({headers:n,body:t}))),Fn,$n((n=>((n,t=hn)=>{const r="search/session",e=A.pipe(t,wn((()=>r),(n=>`${r}?campaign-id=${n}`)));return A.pipe(It(st(),ht),Fn,Vn(mt(e,n)))})(n,cr.campaignId))),Dn((n=>(sr(n),(async n=>{cr.objectDetectionInProgress=!0;const t={kind:"server",inner:"Can not get a link for objects detection"};var r,e,i;await g((r=n,e="detectedObjects",g(r.links,yn,(i=n=>yn(n[e]),function(n){return gn(n)?hn:i(n.value)}))),Hn((()=>t)),$n(fr),Dn((n=>cr.detectedObjects=jt(n))))(),cr.objectDetectionInProgress=!1})(n),cr.loading=!1,n))),Ln((n=>(cr.serverError=!0,cr.loading=!1,n))))},hr=cr;ar("activeIonLink",(async n=>{cr.loading=!0;const t=n||cr.resetCategoryLink;await g(ur(cr.token),Fn,Vn(kt(t)),Dn(sr),Ln((n=>({kind:"network error",inner:n}))))()})),ar("searchArea",(n=>{g(n,Z.map((n=>{var t;cr.cropperHandlers=[{position:k(t=n),direction:U.NorthWest},{position:M.concat(k(t),{x:t.width,y:0}),direction:U.NorthEast},{position:M.concat(k(t),{x:0,y:t.height}),direction:U.SouthWest},{position:M.concat(k(t),{x:t.width,y:t.height}),direction:U.SouthEast}]})))})),ar("serverError",(()=>{cr.loading=!1}));const pr=n=>{hr.image=Z.some(n),hr.imageUrl=Z.some(n.src)},vr=async n=>{const t=(n=>A.pipe(n,Z.fromNullable,Jn.fromOption((()=>Ft)),Jn.chain(Nt)))(n),r=(500,n=>A.pipe(n,Dt,rt.map((n=>or(n,500))),rt.chain(ir)));const e=g(t,Fn,Kn(r)),i=await g(e,$n(dr))();return g(It(i,t),cn((([n,t])=>(async(n,t)=>{const r={image:await(async n=>({name:n.name,mediaType:n.type,value:await At(n)}))(t)},e=n.uploadHighResolutionImage;await g(ur(cr.token),Fn,Vn(St(e,r)))()})(n,t)))),await g(e,Kn(Dt),Dn(pr))(),i};let mr=class{constructor(t){n(this,t)}getInsetValue(){return g(Wt(hr.searchArea,hr.imageBounds),Z.map((([n,t])=>{return`inset(${(r=n,e=t,i={top:`${r.y}px`,right:e.width-(r.x+r.width)+"px",bottom:e.height-(r.y+r.height)+"px",left:`${r.x}px`}).top} ${i.right} ${i.bottom} ${i.left})`;var r,e,i})),Z.getOrElse((()=>"")))}renderImage(){return g(Wt(hr.imageUrl,hr.imageBounds),Z.map((([n,r])=>t("img",{src:n,width:r.width,height:r.height,style:{"clip-path":`${this.getInsetValue()}`}}))),Z.getOrElse((()=>"")))}render(){return t(r,null,this.renderImage())}};mr.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 gr=class{constructor(t){n(this,t),this.cropperChanged=o(this,"cropperChanged",7),this.disabled=!1,this.handleMove=!1,this.mouseStartPoint=void 0,this.bounds=void 0}componentDidLoad(){this.bounds=this.el.getBoundingClientRect()}handleHandlerMove(n){n.preventDefault(),n.stopPropagation();const t=O(n),r={position:R.concat(t,this.mouseStartPoint),direction:this.handlerMoveDirection};A.pipe(hr.searchArea,Z.map((n=>{const e=((n,t)=>{switch(t.direction){case U.NorthEast:return((n,t)=>{const r=M.concat(k(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 U.NorthWest:return((n,t)=>{const r=M.concat(k(n),t.position);return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height-t.position.y})})(n,t);case U.SouthEast:return((n,t)=>Object.assign(Object.assign({},n),{width:n.width+t.position.x,height:n.height+t.position.y}))(n,t);case U.SouthWest:return((n,t)=>{const r=M.concat(k(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)}})(n,r);this.outOfBounds(e)||(hr.searchArea=Z.some(e),this.mouseStartPoint=t,hr.detectedObject=void 0)})))}outOfBounds(n){return 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}handleCropperMove(n){n.preventDefault(),n.stopPropagation();const t=O(n),r=R.concat(t,this.mouseStartPoint);A.pipe(hr.searchArea,Z.map((n=>{const e=Ot(n,r);e.x<0||e.y<0||this.bounds.height-(e.y+e.height)<0||this.bounds.width-(e.x+e.width)<0||(hr.detectedObject=void 0,hr.searchArea=Z.some(e),this.mouseStartPoint=t)})))}handlePointerDown(n){n.stopPropagation(),this.mouseStartPoint=O(n);const t=n.target;"cropper-handler"===t.localName?(this.handlerMoveDirection=t.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,lr(),this.cropperChanged.emit()}getStyleMap(){return A.pipe(hr.searchArea,Z.map((n=>({width:`${n.width}px`,height:`${n.height}px`,transform:`translate3d(${n.x}px, ${n.y}px, 0)`,cursor:this.handleMove?"move":"default"}))),Z.getOrElse((()=>({}))))}render(){return t(r,{exportparts:"handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize"},t("div",{class:{"crop-area":!0,active:this.handleMove,disabled:this.disabled},draggable:!1,style:this.getStyleMap(),onContextMenu:()=>!1,onPointerDown:n=>this.handlePointerDown(n)},hr.cropperHandlers.map((n=>t("cropper-handler",{disabled:this.disabled,handler:n,onPointerDown:n=>this.handlePointerDown(n)})))))}get el(){return u(this)}};gr.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 br=n=>n.href.split("/").reverse()[0];let wr=class{constructor(t){n(this,t),this.filterSelected=o(this,"filterSelected",7),this.filter=null,this.selectedCategoryId=null,this.hideFilters=!0}handleFilterSelection(n){return this.isFilterSelected(n)?this.clearSelectedFilter():this.selectFilter(n)}selectFilter(n){this.selectedCategoryId=br(n),hr.activeIonLink=n,this.filterSelected.emit("select")}clearSelectedFilter(){this.selectedCategoryId=null,hr.activeIonLink=void 0,this.findSelectedFilter().blur(),this.filterSelected.emit("deselect")}findSelectedFilter(){return this.el.shadowRoot.querySelector(".filter.active")}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(n,t){"Enter"===n.key&&this.handleFilterSelection(t)}isFilterSelected(n){return this.selectedCategoryId===br(n)}render(){return t(r,{exportparts:"filter, show-more-filters"},t("div",{class:"filters"},this.filter.filters.filter(((n,t)=>!this.hideFilters||t<5)).map(((n,r)=>t("div",{role:"button",tabindex:"0",part:this.isFilterSelected(n)?"filter active":"filter",class:{filter:!0,active:this.selectedCategoryId===br(n)},style:{"animation-delay":10*r+"ms"},onPointerUp:t=>{t.stopPropagation(),this.handleFilterSelection(n)},onKeyPress:t=>this.handleEnter(t,n)},this.isFilterSelected(n)?t(c,null):null,n.name))),t("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:n=>{"Enter"===n.key&&this.toggleFilters()},part:"show-more-filters"},this.hideFilters?"Zeige mehr":"Zeige weniger")))}get el(){return u(this)}};wr.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 yr=class{constructor(t){n(this,t),this.moveDirection="right",this.contentGroups=[],this.activeContentGroup=0,this.mode="continuity",this.imageWidth=140,this.showScroll=!0,this.recommendations=[],this.columns=0,this.resizeObserver=new ResizeObserver((()=>this.handleResize())),this.mutationObserver=new MutationObserver((()=>this.cloneSlottedContent()))}connectedCallback(){this.setItemWidth()}disconnectedCallback(){this.resizeObserver.disconnect()}componentDidLoad(){this.setWidth(),this.processScrollbarWidth(),this.columns=this.getColumnsNumber();const n=this.el.querySelector(".content");this.mutationObserver.observe(n,{subtree:!0,childList:!0}),this.resizeObserver.observe(this.getHostParent())}getItemWidthFromDocument(){return parseInt(getComputedStyle(document.body).getPropertyValue("--vviinn-carousel-image-width"))}setItemWidth(){const n=this.getItemWidthFromDocument(),t=isNaN(n)?this.imageWidth:n;this.el.style.setProperty("--vviinn-carousel-image-width",`${t}px`)}getContentClassMap(){return{content:!0,[this.moveDirection]:!0,[this.mode]:!0,"show-scrollbar":this.showScroll}}handleResize(){this.setWidth(),this.processScrollbarWidth(),this.setItemWidth();const n=this.getColumnsNumber();n!==this.columns&&(this.columns=n)}calculateMoveStep(){const n=this.getContent().map((n=>n.getBoundingClientRect().width));return n.reduce(((n,t)=>n+t),0)/n.length}getHostParent(){return this.el.parentNode.host.parentElement}setWidth(){const n=this.getHostParent();if(!n)return;const t=getComputedStyle(n),r=n.getBoundingClientRect().width-(parseInt(t["padding-right"])+parseInt(t["padding-left"]));this.el.style.setProperty("--vviinn-carousel-content-width",`${r}px`)}getParent(){return this.el.parentNode.host.parentElement}cloneSlottedContent(){this.setWidth()}getActiveGroupIndex(){var n,t;if(!(null===(t=null===(n=this.getContentNode())||void 0===n?void 0:n.getBoundingClientRect())||void 0===t?void 0:t.left))return 0;const r=this.getContentGroups().map((n=>n.getBoundingClientRect().left)).map(((n,t)=>[n,t])).filter((n=>n[0]>=0));return r.length>0?r[0][1]:0}getContentNode(){return this.el.querySelector(".content")}getContent(){const n=this.getContentNode().children;return Array.from(n).map((n=>n))}getColumnsNumber(){const n=getComputedStyle(this.el).getPropertyValue("--vviinn-carousel-columns-internal");return parseInt(n)}getContentGroups(){return Array.from(this.el.querySelectorAll(".items-group"))}showNext(){this.moveDirection="right";const n=this.getContentNode();requestAnimationFrame((()=>{n.scrollTo({top:0,left:n.scrollLeft+this.calculateMoveStep(),behavior:"smooth"})}))}showPrev(){this.moveDirection="left";const n=this.getContentNode();requestAnimationFrame((()=>{n.scrollTo({top:0,left:n.scrollLeft-this.calculateMoveStep(),behavior:"smooth"})}))}scroll(n){const t=this.getContentNode();requestAnimationFrame((()=>{t.scrollTo({top:0,left:this.calculateMoveStep()*n,behavior:"smooth"})}))}processScrollbarWidth(){const n=this.getContentNode();this.el.style.setProperty("--vviinn-progressbar-width",n.clientWidth*((n.scrollLeft+n.clientWidth)/n.scrollWidth)+"px"),this.activeContentGroup=this.getActiveGroupIndex()}showBullets(){return"grid"===this.mode&&this.showScroll}showScrollbar(){return"continuity"===this.mode&&this.showScroll}getClassMap(){return{[this.mode]:!0,"show-scrollbar":this.showScrollbar()}}renderRecommendation(n,r){return t("vviinn-product-card",{part:"product-part",productId:n.productId,productTitle:n.title,deeplink:n.deeplink,image:n.image.thumbnail,brand:n.brand,imageWidth:this.imageWidth,imageRatio:1,price:n.price.actual,salePrice:n.price.sale,responsive:"grid"===this.mode,dimmedBackground:"continuity"===this.mode,index:r})}renderRecommendationGroup(n){return t("div",{class:"items-group"},n)}renderRecommendationGroups(n){return n.map((n=>this.renderRecommendationGroup(n)))}renderRecommendations(){return"grid"===this.mode?this.renderGrid():this.renderRecommendationsElements()}renderRecommendationsElements(){return this.recommendations.map(((n,t)=>this.renderRecommendation(n,t)))}renderGrid(){const n=this.renderRecommendationsElements(),t=Yt.chunksOf(this.getColumnsNumber())(n);return this.renderRecommendationGroups(t)}renderBullets(){const n=Math.ceil(this.recommendations.length/this.getColumnsNumber());return Array.from(Array(n).keys()).map((n=>t("div",{class:{bullet:!0,active:this.activeContentGroup===n},onClick:()=>this.scroll(n)})))}render(){return t(r,{class:this.getClassMap()},t("div",{class:Object.assign({body:!0},this.getClassMap())},t("button",{class:"prev",onClick:()=>this.showPrev(),part:"carousel-button"},t(a,null)),t("div",{class:this.getContentClassMap(),onScroll:()=>this.processScrollbarWidth()},this.renderRecommendations()),t("button",{class:"next",onClick:()=>this.showNext(),part:"carousel-button"},t(a,null))),this.showBullets()?t("div",{class:"bullets"},this.renderBullets()):"")}get el(){return u(this)}};yr.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%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.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;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) button{border-radius:2px}:host(.grid) 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{fill:#525252}button.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}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}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";let xr=class{constructor(t){n(this,t),this.detectedObjectClicked=o(this,"detectedObjectClicked",7),this.position=["0","0"]}getObjectPosition(){return A.pipe(hr.imageBounds,Z.map((n=>{const t=Rt(jt(this.detectedObject).rectangle),{x:r,y:e}=A.pipe(t,Mt(n),Ut);return[`${r}px`,`${e}px`]})),Z.getOrElse((()=>["0","0"])))}selectDetectedObject(){A.pipe(hr.imageBounds,Z.map((n=>{const t=jt(this.detectedObject).rectangle,r=Rt(t),e=Mt(n)(r);hr.detectedObject=this.detectedObject,hr.searchArea=Z.some(e)}))),lr(),this.detectedObjectClicked.emit()}isActive(){if(!this.detectedObject)return!1;if(!hr.detectedObject)return!1;const n=jt(this.detectedObject),t=jt(hr.detectedObject);return(r=n).class===(e=t).class&&r.score===e.score&&r.rectangle.left===e.rectangle.left&&r.rectangle.top===e.rectangle.top&&r.rectangle.height===e.rectangle.height&&r.rectangle.width===e.rectangle.width;var r,e}render(){return t(r,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};xr.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 Ir=class{constructor(t){n(this,t),this.actionClick=o(this,"actionClick",7)}render(){return t(r,null,t("vviinn-error",null,t("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}),t("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"})),t("h4",{slot:"title"},"Leider nichts gefunden"),t("span",{slot:"text"},"Leider konnten wir keine passenden Produkte finden. Bitte versuche es mit einem anderen Bildausschnitt noch einmal.")))}};Ir.style=":host{display:grid}vviinn-error{justify-items:center}";let _r=class{constructor(t){n(this,t)}render(){return t(r,null,t("slot",{name:"icon"}),t("slot",{name:"title"}),t("slot",{name:"text"}),t("slot",{name:"action"}))}};_r.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 jr=class{constructor(t){n(this,t),this.exampleImageSelected=o(this,"exampleImageSelected",7),this.exampleImageError=o(this,"exampleImageError",7),this.src="",this.width=0,this.height=0,this.selected=!1}async selectImage(n){this.selected=!0;const t=await(async n=>{const t=await fetch(n),r=await t.blob();return new File([r],"image",{type:r.type,lastModified:Date.now()})})(this.src),r=await vr(t);A.pipe(r,Jn.match((()=>this.exampleImageError.emit()),(()=>this.exampleImageSelected.emit()))),this.selected=!1}showPreloader(){return(hr.objectDetectionInProgress||hr.loading)&&this.selected}render(){return t(r,null,this.showPreloader()?t("div",{class:"image-preloader"},t("vviinn-preloader",null)):null,t("img",{onClick:n=>this.selectImage(n),src:this.src,width:this.width,height:this.height}))}};jr.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 kr=["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"],Or=n=>t("slot",{name:n}),Rr=()=>kr.map(Or),Mr=(n,t)=>{t.innerHTML=n.outerHTML},Ur=(n,t)=>{n.connectedCallback=function(){document.addEventListener("globalSlotsChanged",(({detail:n})=>{var r;(n=>Array.from(n.shadowRoot.querySelectorAll("slot")))(t).reduce((r=n,(n,t)=>{const e=r.find((i=t,n=>i.getAttribute("name")===n.getAttribute("slot")));var i;return e&&n.set(t,e),n}),new Map).forEach(Mr)}),!0)},n.connectedCallback.call(n)};let Er=class{constructor(t){n(this,t),this.imageSelected=o(this,"imageSelected",7),this.imageSelectedError=o(this,"imageSelectedError",7)}handleImageSelection(){this.imageSelected.emit()}handleImageSelectionError(){this.imageSelectedError.emit()}componentWillLoad(){Ur(this,this.el)}render(){return t(r,null,t("slot",{name:"vviinn-example-images-title"},t("h3",null,"Mit den Beispielbildern die Suche direkt ausprobieren")),t("div",{class:"images"},t("slot",{name:"vviinn-example-images-1"},t("vviinn-example-image",{width:480,height:640,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc="})),t("slot",{name:"vviinn-example-images-2"},t("vviinn-example-image",{width:280,height:480,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc="})),t("slot",{name:"vviinn-example-images-3"},t("vviinn-example-image",{width:280,height:480,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc="})),t("slot",{name:"vviinn-example-images-4"},t("vviinn-example-image",{width:480,height:640,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc="}))))}get el(){return u(this)}};Er.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 zr=class{constructor(t){n(this,t),this.imageSelected=o(this,"imageSelected",7),this.imageSelectedError=o(this,"imageSelectedError",7)}async handleInputChange(n){const t=n.target,r=await vr(t.files[0]);var e,i;A.pipe(r,(e=()=>this.imageSelectedError.emit(),i=()=>this.imageSelected.emit(),function(n){return dn(n)?e(n.left):i(n.right)})),t.value=null}isLoading(){return hr.loading||hr.objectDetectionInProgress}render(){return t(r,{exportparts:"button"},this.isLoading()?t("vviinn-preloader",null):null,this.isLoading()?null:t("label",{htmlFor:"fileInput",part:"button"},t("slot",{name:"upload-button-text"},"Upload image")),t("input",{id:"fileInput",class:"visually-hidden",type:"file",accept:"image/*",onChange:n=>this.handleInputChange(n)}))}};zr.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 Cr=class{constructor(t){n(this,t)}handleInitialImageLoad(n){const t={x:0,y:0,width:(r=n.target).width,height:r.height};var r;const{x:e,y:i}=Ot(t,{x:12,y:12}),o={x:e,y:i,width:t.width-24,height:t.height-24};hr.imageBounds=Z.some(t),hr.searchArea=Z.some(o)}renderDetectedObject(n){return t("vviinn-detected-object",{detectedObject:n})}renderImage(){return A.pipe(Wt(hr.imageUrl,hr.image),Z.map((([n,r])=>{const[e,i]=(n=>{const t=rr(n),r=tr(288)(t).map((n=>n.size));return[r[0],r[1]]})(r);return t("img",{decoding:"async",width:e,height:i,src:n,onLoad:n=>this.handleInitialImageLoad(n),draggable:!1})})),Z.getOrElse((()=>null)))}renderCropper(){return A.pipe(hr.imageUrl,Z.map((()=>t("image-cropper",null))),Z.getOrElse((()=>null)))}render(){return t(r,null,hr.loading||hr.objectDetectionInProgress?t("div",{class:"image-preloader"},t("vviinn-preloader",null)):null,t("highlight-box",null),this.renderImage(),this.renderCropper(),hr.detectedObjects.map((n=>this.renderDetectedObject(n))))}};Cr.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 Sr=class{constructor(t){n(this,t),this.modalClosed=o(this,"modalClosed",7),this.secondaryActionClicked=o(this,"secondaryActionClicked",7),this.active=!1,this.slider=!1}close(){this.active=!1,setTimeout((()=>{this.modalClosed.emit()}),this.slider?500:0)}handleAnimationEnd(n){"fade-in"===n.animationName&&(this.slider=!0)}render(){return t(r,{exportparts:"secondary-action, title, close-button",class:{closed:!this.active},onAnimationEnd:n=>this.handleAnimationEnd(n)},t("div",{class:"head"},t("button",{part:"secondary-action",onClick:()=>this.secondaryActionClicked.emit()},t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M20.25 12H3.75",stroke:"#161616","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("path",{d:"M10.5 5.25L3.75 12L10.5 18.75",stroke:"#161616","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),t("div",{class:"title",part:"title"},"Bildsuche"),t("button",{onClick:()=>this.close(),class:"close-button",part:"close-button"},t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"})))),t("div",{class:"body"},t("slot",null)))}};Sr.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 Ar=class{constructor(t){n(this,t)}componentWillLoad(){Ur(this,this.el)}render(){return t(r,null,t("slot",{name:"vviinn-onboarding-title"},t("h3",null,"So funktioniert es")),t("vviinn-slider",{showArrows:!0},t("vviinn-slide",null,t("vviinn-onboarding-card-1",null)),t("vviinn-slide",null,t("vviinn-onboarding-card-2",null)),t("vviinn-slide",null,t("vviinn-onboarding-card-3",null))))}get el(){return u(this)}};Ar.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 Wr=class{constructor(t){n(this,t)}componentWillLoad(){Ur(this,this.el)}render(){return t(r,null,t("slot",{name:"onboarding-card-1-icon"},t(s,null)),t("slot",{name:"onboarding-card-1-text"},t("div",{class:"text"},t("h4",null,"Starte die Bildsuche"),t("p",null,"Lade ein Bild aus Deiner Galerie hoch oder fotografiere ein Produkt mit Deiner Kamera."))))}get el(){return u(this)}};Wr.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 Pr=class{constructor(t){n(this,t)}componentWillLoad(){Ur(this,this.el)}render(){return t(r,null,t("slot",{name:"onboarding-card-2-icon"},t(f,null)),t("slot",{name:"onboarding-card-2-text"},t("div",{class:"text"},t("h4",null,"Verfeiner deine Suche"),t("p",null,"Du kannst den Bildrahmen selber festlegen und so die Produkte genau auswählen."))))}get el(){return u(this)}};Pr.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 Tr=class{constructor(t){n(this,t)}componentWillLoad(){Ur(this,this.el)}render(){return t(r,null,t("slot",{name:"onboarding-card-3-icon"},t(l,null)),t("slot",{name:"onboarding-card-3-text"},t("div",{class:"text"},t("h4",null,"Ohne Hintergrund"),t("p",null,"Die besten Ergebnisse erhältst Du, wenn das gesuchte Objekt mit einfarbigem und hellem Hintergrund zu sehen ist."))))}get el(){return u(this)}};Tr.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 Nr=class{constructor(t){n(this,t)}render(){return t(r,null,t("slot",null))}};Nr.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 Fr=class{constructor(t){n(this,t),this.secondaryActionClicked=o(this,"secondaryActionClicked",7),this.modalClosed=o(this,"modalClosed",7),this.active=!1}render(){return t(r,{class:{active:this.active}},t("vviinn-overlay",null,t("vviinn-modal",{onSecondaryActionClicked:()=>this.secondaryActionClicked.emit(),active:this.active},t("slot",null,"CONTENT"))))}};Fr.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 Dr=class{constructor(t){n(this,t)}isActive(){return hr.loading||hr.objectDetectionInProgress}render(){return t(r,{class:{active:this.isActive()}})}};Dr.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 Lr=class{constructor(t){n(this,t)}componentWillLoad(){Ur(this,this.el)}render(){return t(r,null,t("slot",null,t("div",{class:"content"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"},t("defs",null),t("path",{fill:"#525252",d:"M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z"}),t("path",{fill:"#525252",d:"M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z"})),t("slot",{name:"vviinn-privacy-badge-text"},t("p",null,"Wir gehen sorgfältig mit Deinen Daten um. Deine Bilder werden nur zum Zweck der Bildsuche gespeichert.")))))}get el(){return u(this)}};Lr.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 qr{sendImpression(n){var t,r,e;gtag("event","view_item_list",{items:[{id:n.productId,name:n.title,brand:null!==(t=n.brand)&&void 0!==t?t:"",category:null!==(r=n.productType)&&void 0!==r?r:"",list_name:"VI VPR View",price:Math.min(n.price.actual,null!==(e=n.price.sale)&&void 0!==e?e:1/0)}]})}sendClick(n){var t,r,e;gtag("event","select_content",{content_type:"product",items:[{id:n.productId,name:n.title,brand:null!==(t=n.brand)&&void 0!==t?t:"",category:null!==(r=n.productType)&&void 0!==r?r:"",list_name:"VI VPR View",price:Math.min(n.price.actual,null!==(e=n.price.sale)&&void 0!==e?e:1/0)}]})}}class $r{constructor(){ga("require","ec")}convertProduct(n){var t,r,e;return{id:n.productId,name:n.title,brand:null!==(t=n.brand)&&void 0!==t?t:"",category:null!==(r=n.productType)&&void 0!==r?r:"",list:"VI VPR View",price:Math.min(n.price.actual,null!==(e=n.price.sale)&&void 0!==e?e:1/0)}}sendImpression(n){ga("ec:addImpression",this.convertProduct(n))}sendClick(n){var t,r,e;ga("ec:addProduct",{id:n.productId,name:n.title,brand:null!==(t=n.brand)&&void 0!==t?t:"",category:null!==(r=n.productType)&&void 0!==r?r:"",price:Math.min(n.price.actual,null!==(e=n.price.sale)&&void 0!==e?e:1/0)}),ga("ec:setAction","click",{list:"VI VPR View"})}}const Vr=Z.getMonoid(B.first()).concat(A.pipe(Z.fromNullable(window.gtag),Z.map((()=>new qr))),A.pipe(Z.fromNullable(window.ga),Z.map((()=>new $r)))),Br=/fit\/\d+\//,Gr=(n,t)=>A.pipe((n=>A.pipe(n.match(Br),Jn.fromNullable(n),Jn.map((()=>n))))(n),Jn.map((n=>n.replace(Br,`fit/${t}/`))),Jn.getOrElse((()=>n))),Hr=(n,r)=>n.deeplink?t("a",{class:n.part,part:n.part,href:n.deeplink},r):r,Kr=n=>{var r;const e=new Intl.NumberFormat(n.locale,{minimumFractionDigits:2}).format(n.price),i=`${null!==(r=n.prefix)&&void 0!==r?r:""} ${e} ${n.currency}`;return t("span",{class:"price-amount",part:"price-amount"},i)},Zr=n=>{const r=t(Kr,{prefix:n.prefix,currency:n.currency,price:n.price,locale:n.locale});return t("span",{class:"price-container",part:"price-container"},n.salePrice?[t("span",{class:"price-sale",part:"price-sale"},t(Kr,{prefix:n.prefix,currency:n.currency,price:n.salePrice,locale:n.locale})),t("span",{class:"price-outdated",part:"price-outdated"},r)]:t("span",{class:"price-regular",part:"price-regular"},r))};let Yr=class{constructor(t){n(this,t),this.recommendationLoad=o(this,"recommendationLoad",7),this.recommendationView=o(this,"recommendationView",7),this.recommendationClick=o(this,"recommendationClick",7),this.productImageLoaded=o(this,"productImageLoaded",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.index=0,this.imageLoaded=!1,this.productData=null,this.intersectionObserver=new IntersectionObserver(this.intersectionCallback.bind(this),{threshold:1})}connectedCallback(){this.productData=this.getProductData()}getProductData(){return{product:this.productId,rank:this.index}}intersectionCallback(n){n.some((n=>n.isIntersecting))&&(A.pipe(Vr,Z.map((n=>n.sendImpression(this.getProduct())))),this.recommendationView.emit(this.productData),this.intersectionObserver.disconnect())}componentDidLoad(){this.recommendationLoad.emit(this.productData),this.intersectionObserver.observe(this.el),this.el.shadowRoot.querySelectorAll("a").forEach((n=>n.addEventListener("click",(n=>{n.preventDefault(),n.stopImmediatePropagation(),this.recommendationClick.emit(this.getProductData()),A.pipe(Vr,Z.match((()=>null),(n=>n.sendClick(this.getProduct()))))}))))}getProduct(){return hr.results.find((n=>n.productId===this.productId))}renderImage(){const n={width:this.imageWidth,height:this.imageWidth*this.imageRatio,src:this.image,title:this.productTitle,lazy:!1};return this.responsive?((n,r=(()=>{}))=>t("picture",null,t("img",{loading:n.lazy?"lazy":"eager",part:"image",class:"image responsive",src:Gr(n.src,n.width),alt:n.title,onLoad:r})))(n,(()=>this.kek())):((n,r=(()=>{}))=>t("picture",null,t("img",{loading:n.lazy?"lazy":"eager",part:"image",class:"image",width:n.width,height:n.height,src:Gr(n.src,n.width),alt:n.title,onLoad:r})))(n,(()=>this.kek()))}kek(){this.productImageLoaded.emit(this.productId)}render(){var n,e,i;return t(r,{part:"product-card",class:{dimmed:this.dimmedBackground},exportparts:"brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title"},t(Hr,{deeplink:this.deeplink,part:"image-link"},this.renderImage()),t(Hr,{deeplink:this.deeplink,part:"deeplink"},t("span",{class:"title",part:"title"},this.productTitle)),t("span",{class:"brand",part:"brand"},this.brand),t("span",{class:"type",part:"type"},this.productType),t(Zr,{prefix:null!==(n=this.pricePrefix)&&void 0!==n?n:it.pricePrefix,currency:null!==(e=this.currency)&&void 0!==e?e:it.currencySign,price:this.price,salePrice:this.salePrice,locale:null!==(i=this.locale)&&void 0!==i?i:it.locale}))}get el(){return u(this)}};Yr.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;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}.deeplink{text-decoration:none}.image-link{display:contents}picture{position:relative;width:100%}: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 Jr=class{constructor(t){n(this,t),this.actionClick=o(this,"actionClick",7)}render(){return t(r,null,t("vviinn-error",null,t("h4",{slot:"title"},"Keine Verbindung"),t("span",{slot:"text"},"Etwas hat leider nicht funktioniert. Bitte prüfen Sie Ihre Internetverbindung und laden Sie das Bild noch einmal hoch."),t("button",{slot:"action",onClick:()=>this.actionClick.emit()},"Erneut versuchen")))}};Jr.style=":host{display:block}";let Xr=class{constructor(t){n(this,t)}render(){return t(r,null,t("slot",null))}};Xr.style=":host{display:grid;justify-items:center}";const Qr=({kind:n,tabindex:r,disabled:e,onClick:i,onKeyDown:o})=>{return t("div",{class:(u={kind:n,disabled:e},{"arrow-wrapper":!0,[u.kind]:!0,disabled:u.disabled}),onClick:i,tabindex:r,onKeyDown:o},t(d,null));var u};let ne=class{constructor(t){n(this,t),this.elementsCount=0,this.internalPosition=0,this.swipeStartPosition=Z.none,this.showBullets=!0,this.position=0,this.showArrows=!1}positionWatchHandler(n){this.internalPosition=n,this.el.style.setProperty("--position",`${n}`),this.setActiveCssClassToSlide(n)}connectedCallback(){this.handleDomContentChanges()}handleDomContentChanges(){const n=this.el.querySelectorAll("vviinn-slide");this.elementsCount=n.length,this.el.style.setProperty("--num-items",`${this.elementsCount}`),this.setActiveCssClassToSlide(0)}setActiveCssClassToSlide(n){const t=this.el.querySelectorAll("vviinn-slide");t.forEach((n=>n.classList.remove("active"))),t[n].classList.add("active")}goToSlide(n){this.internalPosition=n,this.el.style.setProperty("--position",`${n}`),this.setActiveCssClassToSlide(n)}renderBullets(){return this.showBullets?t("div",{class:"controls"},Kt.range(0,this.elementsCount-1).map((n=>t("div",{class:{bullet:!0,active:n==this.internalPosition%this.elementsCount},onClick:()=>this.goToSlide(n)})))):null}nextSlide(){this.internalPosition++,this.renderSlidePosition()}prevSlide(){const n=this.internalPosition-1;this.internalPosition=n>-1?n:this.elementsCount-1,this.renderSlidePosition()}renderSlidePosition(){requestAnimationFrame((()=>{this.el.style.setProperty("--position",""+this.internalPosition%this.elementsCount)}))}handleKeyDown(n){if("Space"===n.key||"Enter"===n.key)switch(n.target.className.includes("prev")?"prev":"next"){case"prev":this.prevSlide();break;case"next":this.nextSlide()}}handleTouchStart(n){this.showBullets&&(this.swipeStartPosition=A.pipe(n.touches[0],Z.fromNullable,Z.map((n=>n.clientX))))}handleTouchEnd(n){if(!this.showBullets)return;const t=A.pipe(n.changedTouches[0],Z.fromNullable,Z.map((n=>n.clientX)));A.pipe(Wt(this.swipeStartPosition,t),Z.map((([n,t])=>{return(r=n)<(e=t)?-1:r>e?1:0;var r,e})),Z.map((n=>{switch(n){case 1:return this.nextSlide();case-1:return this.prevSlide()}})))}render(){return t(r,null,t("div",{class:"items-wrapper"},t("div",{class:"items",onTouchStart:n=>this.handleTouchStart(n),onTouchEnd:n=>this.handleTouchEnd(n)},t("slot",null))),this.showArrows?[t(Qr,{kind:"prev",onClick:()=>this.prevSlide(),onKeyDown:n=>this.handleKeyDown(n),tabindex:1,disabled:!1}),t(Qr,{kind:"next",onClick:()=>this.nextSlide(),onKeyDown:n=>this.handleKeyDown(n),tabindex:0,disabled:!1})]:null,this.renderBullets())}get el(){return u(this)}static get watchers(){return{position:["positionWatchHandler"]}}};ne.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 te=class{constructor(t){n(this,t)}componentWillLoad(){Ur(this,this.el)}render(){return t(r,null,t("slot",null,t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none"},t("defs",null),t("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"}),t("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"})),t("span",{class:"vviinn-teaser-text"},t("slot",{name:"vviinn-teaser-text"},"Finde Produkte auf ",t("br",null)," einem Foto"))))}get el(){return u(this)}};te.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}";const re=A.flow((n=>`Bearer ${n}`),(n=>new Headers({Authorization:n})),(n=>({headers:n}))),ee=(ie=sn,function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var r=n.length,e=tn(r),i=ie.map(n[0],e),o=1;o<r;o++)i=ie.ap(i,n[o]);return i});var ie;const oe=(n,t={})=>g(ee(st(),dt),Fn,Vn(mt(n,t))),ue=n=>t=>r=>{const e=A.pipe(t,mn(encodeURIComponent),bn((()=>`product/${n}/similar-products`),(t=>`product/${n}/similar-products?campaigns=${t}`)));return oe(e,r)},ce=n=>t=>r=>{const e=A.pipe(t,mn(encodeURIComponent),bn((()=>`product/${n}/cross-selling-products`),(t=>`product/${n}/cross-selling-products?campaigns=${t}`)));return oe(e,r)};function ae(n){return"function"==typeof n}function se(n){const t=n((n=>{Error.call(n),n.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const fe=se((n=>function(t){n(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map(((n,t)=>`${t+1}) ${n.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t}));function le(n,t){if(n){const r=n.indexOf(t);0<=r&&n.splice(r,1)}}class de{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const n of t)n.remove(this);else t.remove(this);const{initialTeardown:r}=this;if(ae(r))try{r()}catch(t){n=t instanceof fe?t.errors:[t]}const{_finalizers:e}=this;if(e){this._finalizers=null;for(const t of e)try{ve(t)}catch(t){n=null!=n?n:[],t instanceof fe?n=[...n,...t.errors]:n.push(t)}}if(n)throw new fe(n)}}add(n){var t;if(n&&n!==this)if(this.closed)ve(n);else{if(n instanceof de){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(n)}}_hasParent(n){const{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){const{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&le(t,n)}remove(n){const{_finalizers:t}=this;t&&le(t,n),n instanceof de&&n._removeParent(this)}}de.EMPTY=(()=>{const n=new de;return n.closed=!0,n})();const he=de.EMPTY;function pe(n){return n instanceof de||n&&"closed"in n&&ae(n.remove)&&ae(n.add)&&ae(n.unsubscribe)}function ve(n){ae(n)?n():n.unsubscribe()}const me={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ge={setTimeout(n,t,...r){const{delegate:e}=ge;return(null==e?void 0:e.setTimeout)?e.setTimeout(n,t,...r):setTimeout(n,t,...r)},clearTimeout(n){const{delegate:t}=ge;return((null==t?void 0:t.clearTimeout)||clearTimeout)(n)},delegate:void 0};function be(){}const we=ye("C",void 0,void 0);function ye(n,t,r){return{kind:n,value:t,error:r}}function xe(n){n()}class Ie extends de{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,pe(n)&&n.add(this)):this.destination=Ue}static create(n,t,r){return new Oe(n,t,r)}next(n){this.isStopped?Me(function(n){return ye("N",n,void 0)}(n),this):this._next(n)}error(n){this.isStopped?Me(ye("E",void 0,n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Me(we,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const _e=Function.prototype.bind;function je(n,t){return _e.call(n,t)}class ke{constructor(n){this.partialObserver=n}next(n){const{partialObserver:t}=this;if(t.next)try{t.next(n)}catch(n){Re(n)}}error(n){const{partialObserver:t}=this;if(t.error)try{t.error(n)}catch(n){Re(n)}else Re(n)}complete(){const{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(n){Re(n)}}}class Oe extends Ie{constructor(n,t,r){let e;if(super(),ae(n)||!n)e={next:null!=n?n:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0};else{let t;this&&me.useDeprecatedNextContext?(t=Object.create(n),t.unsubscribe=()=>this.unsubscribe(),e={next:n.next&&je(n.next,t),error:n.error&&je(n.error,t),complete:n.complete&&je(n.complete,t)}):e=n}this.destination=new ke(e)}}function Re(n){var t;t=n,ge.setTimeout((()=>{const{onUnhandledError:n}=me;if(!n)throw t;n(t)}))}function Me(n,t){const{onStoppedNotification:r}=me;r&&ge.setTimeout((()=>r(n,t)))}const Ue={closed:!0,next:be,error:function(n){throw n},complete:be},Ee="function"==typeof Symbol&&Symbol.observable||"@@observable";function ze(n){return n}class Ce{constructor(n){n&&(this._subscribe=n)}lift(n){const t=new Ce;return t.source=this,t.operator=n,t}subscribe(n,t,r){const e=(i=n)&&i instanceof Ie||function(n){return n&&ae(n.next)&&ae(n.error)&&ae(n.complete)}(i)&&pe(i)?n:new Oe(n,t,r);var i;return xe((()=>{const{operator:n,source:t}=this;e.add(n?n.call(e,t):t?this._subscribe(e):this._trySubscribe(e))})),e}_trySubscribe(n){try{return this._subscribe(n)}catch(t){n.error(t)}}forEach(n,t){return new(t=Se(t))(((t,r)=>{const e=new Oe({next:t=>{try{n(t)}catch(n){r(n),e.unsubscribe()}},error:r,complete:t});this.subscribe(e)}))}_subscribe(n){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(n)}[Ee](){return this}pipe(...n){return(0===(t=n).length?ze:1===t.length?t[0]:function(n){return t.reduce(((n,t)=>t(n)),n)})(this);var t}toPromise(n){return new(n=Se(n))(((n,t)=>{let r;this.subscribe((n=>r=n),(n=>t(n)),(()=>n(r)))}))}}function Se(n){var t;return null!==(t=null!=n?n:me.Promise)&&void 0!==t?t:Promise}Ce.create=n=>new Ce(n);const Ae=se((n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}));class We extends Ce{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){const t=new Pe(this,this);return t.operator=n,t}_throwIfClosed(){if(this.closed)throw new Ae}next(n){xe((()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const t of this.currentObservers)t.next(n)}}))}error(n){xe((()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;const{observers:t}=this;for(;t.length;)t.shift().error(n)}}))}complete(){xe((()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:n}=this;for(;n.length;)n.shift().complete()}}))}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return(null===(n=this.observers)||void 0===n?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){const{hasError:t,isStopped:r,observers:e}=this;return t||r?he:(this.currentObservers=null,e.push(n),new de((()=>{this.currentObservers=null,le(e,n)})))}_checkFinalizedStatuses(n){const{hasError:t,thrownError:r,isStopped:e}=this;t?n.error(r):e&&n.complete()}asObservable(){const n=new Ce;return n.source=this,n}}We.create=(n,t)=>new Pe(n,t);class Pe extends We{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,n)}error(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,n)}complete(){var n,t;null===(t=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===t||t.call(n)}_subscribe(n){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(n))&&void 0!==r?r:he}}var Te,Ne=new Uint8Array(16);function Fe(){if(!Te&&!(Te="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Te(Ne)}const De=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Le(n){return"string"==typeof n&&De.test(n)}for(var qe=[],$e=0;$e<256;++$e)qe.push(($e+256).toString(16).substr(1));function Ve(n,t,r){var e=(n=n||{}).random||(n.rng||Fe)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=e[i];return t}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(qe[n[t+0]]+qe[n[t+1]]+qe[n[t+2]]+qe[n[t+3]]+"-"+qe[n[t+4]]+qe[n[t+5]]+"-"+qe[n[t+6]]+qe[n[t+7]]+"-"+qe[n[t+8]]+qe[n[t+9]]+"-"+qe[n[t+10]]+qe[n[t+11]]+qe[n[t+12]]+qe[n[t+13]]+qe[n[t+14]]+qe[n[t+15]]).toLowerCase();if(!Le(r))throw TypeError("Stringified UUID is invalid");return r}(e)}var Be=function(n,t){if(t=t.split(":")[0],!(n=+n))return!1;switch(t){case"http":case"ws":return 80!==n;case"https":case"wss":return 443!==n;case"ftp":return 21!==n;case"gopher":return 70!==n;case"file":return!1}return 0!==n},Ge=Object.prototype.hasOwnProperty;function He(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch(n){return null}}function Ke(n){try{return encodeURIComponent(n)}catch(n){return null}}var Ze={stringify:function(n,t){t=t||"";var r,e,i=[];for(e in"string"!=typeof t&&(t="?"),n)if(Ge.call(n,e)){if((r=n[e])||null!=r&&!isNaN(r)||(r=""),e=Ke(e),r=Ke(r),null===e||null===r)continue;i.push(e+"="+r)}return i.length?t+i.join("&"):""},parse:function(n){for(var t,r=/([^=?#&]+)=?([^&]*)/g,e={};t=r.exec(n);){var i=He(t[1]),o=He(t[2]);null===i||null===o||i in e||(e[i]=o)}return e}},Ye=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Je=/[\n\r\t]/g,Xe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Qe=/:\d+$/,ni=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,ti=/^[a-zA-Z]:/;function ri(n){return(n||"").toString().replace(Ye,"")}var ei=[["#","hash"],["?","query"],function(n,t){return ui(t.protocol)?n.replace(/\\/g,"/"):n},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ii={hash:1,query:1};function oi(n){var t;t="undefined"!=typeof window?window:void 0!==C?C:"undefined"!=typeof self?self:{};var r,e={},i=typeof(n=n||t.location||{});if("blob:"===n.protocol)e=new ai(unescape(n.pathname),{});else if("string"===i)for(r in e=new ai(n,{}),ii)delete e[r];else if("object"===i){for(r in n)r in ii||(e[r]=n[r]);void 0===e.slashes&&(e.slashes=Xe.test(n.href))}return e}function ui(n){return"file:"===n||"ftp:"===n||"http:"===n||"https:"===n||"ws:"===n||"wss:"===n}function ci(n,t){n=(n=ri(n)).replace(Je,""),t=t||{};var r,e=ni.exec(n),i=e[1]?e[1].toLowerCase():"",o=!!e[2],u=!!e[3],c=0;return o?u?(r=e[2]+e[3]+e[4],c=e[2].length+e[3].length):(r=e[2]+e[4],c=e[2].length):u?(r=e[3]+e[4],c=e[3].length):r=e[4],"file:"===i?c>=2&&(r=r.slice(2)):ui(i)?r=e[4]:i?o&&(r=r.slice(2)):c>=2&&ui(t.protocol)&&(r=e[4]),{protocol:i,slashes:o||ui(i),slashesCount:c,rest:r}}function ai(n,t,r){if(n=(n=ri(n)).replace(Je,""),!(this instanceof ai))return new ai(n,t,r);var e,i,o,u,c,a,s=ei.slice(),f=typeof t,l=this,d=0;for("object"!==f&&"string"!==f&&(r=t,t=null),r&&"function"!=typeof r&&(r=Ze.parse),e=!(i=ci(n||"",t=oi(t))).protocol&&!i.slashes,l.slashes=i.slashes||e&&t.slashes,l.protocol=i.protocol||t.protocol||"",n=i.rest,("file:"===i.protocol&&(2!==i.slashesCount||ti.test(n))||!i.slashes&&(i.protocol||i.slashesCount<2||!ui(l.protocol)))&&(s[3]=[/(.*)/,"pathname"]);d<s.length;d++)"function"!=typeof(u=s[d])?(a=u[1],(o=u[0])!=o?l[a]=n:"string"==typeof o?~(c="@"===o?n.lastIndexOf(o):n.indexOf(o))&&("number"==typeof u[2]?(l[a]=n.slice(0,c),n=n.slice(c+u[2])):(l[a]=n.slice(c),n=n.slice(0,c))):(c=o.exec(n))&&(l[a]=c[1],n=n.slice(0,c.index)),l[a]=l[a]||e&&u[3]&&t[a]||"",u[4]&&(l[a]=l[a].toLowerCase())):n=u(n,l);r&&(l.query=r(l.query)),e&&t.slashes&&"/"!==l.pathname.charAt(0)&&(""!==l.pathname||""!==t.pathname)&&(l.pathname=function(n,t){if(""===n)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(n.split("/")),e=r.length,i=r[e-1],o=!1,u=0;e--;)"."===r[e]?r.splice(e,1):".."===r[e]?(r.splice(e,1),u++):u&&(0===e&&(o=!0),r.splice(e,1),u--);return o&&r.unshift(""),"."!==i&&".."!==i||r.push(""),r.join("/")}(l.pathname,t.pathname)),"/"!==l.pathname.charAt(0)&&ui(l.protocol)&&(l.pathname="/"+l.pathname),Be(l.port,l.protocol)||(l.host=l.hostname,l.port=""),l.username=l.password="",l.auth&&(~(c=l.auth.indexOf(":"))?(l.username=l.auth.slice(0,c),l.username=encodeURIComponent(decodeURIComponent(l.username)),l.password=l.auth.slice(c+1),l.password=encodeURIComponent(decodeURIComponent(l.password))):l.username=encodeURIComponent(decodeURIComponent(l.auth)),l.auth=l.password?l.username+":"+l.password:l.username),l.origin="file:"!==l.protocol&&ui(l.protocol)&&l.host?l.protocol+"//"+l.host:"null",l.href=l.toString()}ai.prototype={set:function(n,t,r){var e=this;switch(n){case"query":"string"==typeof t&&t.length&&(t=(r||Ze.parse)(t)),e[n]=t;break;case"port":e[n]=t,Be(t,e.protocol)?t&&(e.host=e.hostname+":"+t):(e.host=e.hostname,e[n]="");break;case"hostname":e[n]=t,e.port&&(t+=":"+e.port),e.host=t;break;case"host":e[n]=t,Qe.test(t)?(t=t.split(":"),e.port=t.pop(),e.hostname=t.join(":")):(e.hostname=t,e.port="");break;case"protocol":e.protocol=t.toLowerCase(),e.slashes=!r;break;case"pathname":case"hash":if(t){var i="pathname"===n?"/":"#";e[n]=t.charAt(0)!==i?i+t:t}else e[n]=t;break;case"username":case"password":e[n]=encodeURIComponent(t);break;case"auth":var o=t.indexOf(":");~o?(e.username=t.slice(0,o),e.username=encodeURIComponent(decodeURIComponent(e.username)),e.password=t.slice(o+1),e.password=encodeURIComponent(decodeURIComponent(e.password))):e.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<ei.length;u++){var c=ei[u];c[4]&&(e[c[1]]=e[c[1]].toLowerCase())}return e.auth=e.password?e.username+":"+e.password:e.username,e.origin="file:"!==e.protocol&&ui(e.protocol)&&e.host?e.protocol+"//"+e.host:"null",e.href=e.toString(),e},toString:function(n){n&&"function"==typeof n||(n=Ze.stringify);var t,r=this,e=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(r.protocol&&r.slashes||ui(r.protocol)?"//":"");return r.username?(o+=r.username,r.password&&(o+=":"+r.password),o+="@"):r.password?(o+=":"+r.password,o+="@"):"file:"!==r.protocol&&ui(r.protocol)&&!e&&"/"!==r.pathname&&(o+="@"),(":"===e[e.length-1]||Qe.test(r.hostname)&&!r.port)&&(e+=":"),o+=e+r.pathname,(t="object"==typeof r.query?n(r.query):r.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(o+=r.hash),o}},ai.extractProtocol=ci,ai.location=oi,ai.trimLeft=ri,ai.qs=Ze;var si=ai,fi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.map=t.mergeMap=t.of=t.from=t.Observable=void 0;var r=function(){function n(n){this.promise=n}return n.prototype.toPromise=function(){return this.promise},n.prototype.pipe=function(t){return new n(this.promise.then(t))},n}();t.Observable=r,t.from=function(n){return new r(n)},t.of=function(n){return new r(Promise.resolve(n))},t.mergeMap=function(n){return function(t){return n(t).toPromise()}},t.map=function(n){return n}})),li="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==li&&li,di="URLSearchParams"in li,hi="Symbol"in li&&"iterator"in Symbol,pi="FileReader"in li&&"Blob"in li&&function(){try{return new Blob,!0}catch(n){return!1}}(),vi="FormData"in li,mi="ArrayBuffer"in li;if(mi)var gi=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],bi=ArrayBuffer.isView||function(n){return n&&gi.indexOf(Object.prototype.toString.call(n))>-1};function wi(n){if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(n)||""===n)throw new TypeError('Invalid character in header field name: "'+n+'"');return n.toLowerCase()}function yi(n){return"string"!=typeof n&&(n=String(n)),n}function xi(n){var t={next:function(){var t=n.shift();return{done:void 0===t,value:t}}};return hi&&(t[Symbol.iterator]=function(){return t}),t}function Ii(n){this.map={},n instanceof Ii?n.forEach((function(n,t){this.append(t,n)}),this):Array.isArray(n)?n.forEach((function(n){this.append(n[0],n[1])}),this):n&&Object.getOwnPropertyNames(n).forEach((function(t){this.append(t,n[t])}),this)}function _i(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function ji(n){return new Promise((function(t,r){n.onload=function(){t(n.result)},n.onerror=function(){r(n.error)}}))}function ki(n){var t=new FileReader,r=ji(t);return t.readAsArrayBuffer(n),r}function Oi(n){if(n.slice)return n.slice(0);var t=new Uint8Array(n.byteLength);return t.set(new Uint8Array(n)),t.buffer}function Ri(){return this.bodyUsed=!1,this._initBody=function(n){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?"string"==typeof n?this._bodyText=n:pi&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:vi&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:di&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():mi&&pi&&(t=n)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=Oi(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):mi&&(ArrayBuffer.prototype.isPrototypeOf(n)||bi(n))?this._bodyArrayBuffer=Oi(n):this._bodyText=n=Object.prototype.toString.call(n):this._bodyText="",this.headers.get("content-type")||("string"==typeof n?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):di&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},pi&&(this.blob=function(){var n=_i(this);if(n)return n;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?_i(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(ki)}),this.text=function(){var n,t,r,e=_i(this);if(e)return e;if(this._bodyBlob)return n=this._bodyBlob,r=ji(t=new FileReader),t.readAsText(n),r;if(this._bodyArrayBuffer)return Promise.resolve(function(n){for(var t=new Uint8Array(n),r=new Array(t.length),e=0;e<t.length;e++)r[e]=String.fromCharCode(t[e]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},vi&&(this.formData=function(){return this.text().then(Ei)}),this.json=function(){return this.text().then(JSON.parse)},this}Ii.prototype.append=function(n,t){n=wi(n),t=yi(t);var r=this.map[n];this.map[n]=r?r+", "+t:t},Ii.prototype.delete=function(n){delete this.map[wi(n)]},Ii.prototype.get=function(n){return n=wi(n),this.has(n)?this.map[n]:null},Ii.prototype.has=function(n){return this.map.hasOwnProperty(wi(n))},Ii.prototype.set=function(n,t){this.map[wi(n)]=yi(t)},Ii.prototype.forEach=function(n,t){for(var r in this.map)this.map.hasOwnProperty(r)&&n.call(t,this.map[r],r,this)},Ii.prototype.keys=function(){var n=[];return this.forEach((function(t,r){n.push(r)})),xi(n)},Ii.prototype.values=function(){var n=[];return this.forEach((function(t){n.push(t)})),xi(n)},Ii.prototype.entries=function(){var n=[];return this.forEach((function(t,r){n.push([r,t])})),xi(n)},hi&&(Ii.prototype[Symbol.iterator]=Ii.prototype.entries);var Mi=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Ui(n,t){if(!(this instanceof Ui))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,e,i=(t=t||{}).body;if(n instanceof Ui){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,t.headers||(this.headers=new Ii(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,i||null==n._bodyInit||(i=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Ii(t.headers)),this.method=(e=(r=t.method||this.method||"GET").toUpperCase(),Mi.indexOf(e)>-1?e:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function Ei(n){var t=new FormData;return n.trim().split("&").forEach((function(n){if(n){var r=n.split("="),e=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(e),decodeURIComponent(i))}})),t}function zi(n,t){if(!(this instanceof zi))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Ii(t.headers),this.url=t.url||"",this._initBody(n)}Ui.prototype.clone=function(){return new Ui(this,{body:this._bodyInit})},Ri.call(Ui.prototype),Ri.call(zi.prototype),zi.prototype.clone=function(){return new zi(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Ii(this.headers),url:this.url})},zi.error=function(){var n=new zi(null,{status:0,statusText:""});return n.type="error",n};var Ci=[301,302,303,307,308];zi.redirect=function(n,t){if(-1===Ci.indexOf(t))throw new RangeError("Invalid status code");return new zi(null,{status:t,headers:{location:n}})};var Si=li.DOMException;try{new Si}catch(n){(Si=function(n,t){this.message=n,this.name=t;var r=Error(n);this.stack=r.stack}).prototype=Object.create(Error.prototype),Si.prototype.constructor=Si}function Ai(n,t){return new Promise((function(r,e){var i=new Ui(n,t);if(i.signal&&i.signal.aborted)return e(new Si("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var n,t,e={status:o.status,statusText:o.statusText,headers:(n=o.getAllResponseHeaders()||"",t=new Ii,n.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(n){return 0===n.indexOf("\n")?n.substr(1,n.length):n})).forEach((function(n){var r=n.split(":"),e=r.shift().trim();if(e){var i=r.join(":").trim();t.append(e,i)}})),t)};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){r(new zi(i,e))}),0)},o.onerror=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){e(new Si("Aborted","AbortError"))}),0)},o.open(i.method,function(n){try{return""===n&&li.location.href?li.location.href:n}catch(t){return n}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(pi?o.responseType="blob":mi&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Ii?i.headers.forEach((function(n,t){o.setRequestHeader(t,n)})):Object.getOwnPropertyNames(t.headers).forEach((function(n){o.setRequestHeader(n,yi(t.headers[n]))})),i.signal&&(i.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",u)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Ai.polyfill=!0,li.fetch||(li.fetch=Ai,li.Headers=Ii,li.Request=Ui,li.Response=zi);var Wi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.IsomorphicFetchHttpLibrary=void 0;var r=function(){function n(){}return n.prototype.send=function(n){var t=n.getHttpMethod().toString(),r=n.getBody(),e=fetch(n.getUrl(),{method:t,body:r,headers:n.getHeaders(),credentials:"same-origin"}).then((function(n){var t={};n.headers.forEach((function(n,r){t[r]=n}));var r={text:function(){return n.text()},binary:function(){return n.blob()}};return new Pi.ResponseContext(n.status,t,r)}));return(0,fi.from)(e)},n}();t.IsomorphicFetchHttpLibrary=r})),Pi=S((function(n,t){var r,e,i=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),o=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),u=C&&C.__exportStar||function(n,t){for(var r in n)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,n,r)},c=C&&C.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function u(n){try{a(e.next(n))}catch(n){o(n)}}function c(n){try{a(e.throw(n))}catch(n){o(n)}}function a(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(u,c)}a((e=e.apply(n,t||[])).next())}))},a=C&&C.__generator||function(n,t){var r,e,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,e&&(i=2&o[0]?e.return:o[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,o[1])).done)return i;switch(e=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,e=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(n,u)}catch(n){o=[6,n],e=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapHttpLibrary=t.ResponseContext=t.SelfDecodingBody=t.RequestContext=t.HttpException=t.HttpMethod=void 0,u(Wi,t),(e=t.HttpMethod||(t.HttpMethod={})).GET="GET",e.HEAD="HEAD",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.CONNECT="CONNECT",e.OPTIONS="OPTIONS",e.TRACE="TRACE",e.PATCH="PATCH";var s=function(n){function t(t){return n.call(this,t)||this}return i(t,n),t}(Error);t.HttpException=s;var f=function(){function n(n,t){this.httpMethod=t,this.headers={},this.body=void 0,this.url=new si(n,!0)}return n.prototype.getUrl=function(){return this.url.toString()},n.prototype.setUrl=function(n){this.url=new si(n,!0)},n.prototype.setBody=function(n){this.body=n},n.prototype.getHttpMethod=function(){return this.httpMethod},n.prototype.getHeaders=function(){return this.headers},n.prototype.getBody=function(){return this.body},n.prototype.setQueryParam=function(n,t){var r=this.url.query;r[n]=t,this.url.set("query",r)},n.prototype.addCookie=function(n,t){this.headers.Cookie||(this.headers.Cookie=""),this.headers.Cookie+=n+"="+t+"; "},n.prototype.setHeaderParam=function(n,t){this.headers[n]=t},n}();t.RequestContext=f;var l=function(){function n(n){this.dataSource=n}return n.prototype.binary=function(){return this.dataSource},n.prototype.text=function(){return c(this,void 0,void 0,(function(){var n;return a(this,(function(t){switch(t.label){case 0:return[4,this.dataSource];case 1:return(n=t.sent()).text?[2,n.text()]:[2,new Promise((function(t,r){var e=new FileReader;e.addEventListener("load",(function(){return t(e.result)})),e.addEventListener("error",(function(){return r(e.error)})),e.readAsText(n)}))]}}))}))},n}();t.SelfDecodingBody=l;var d=function(){function n(n,t,r){this.httpStatusCode=n,this.headers=t,this.body=r}return n.prototype.getParsedHeader=function(n){var t={};if(!this.headers[n])return t;for(var r=0,e=this.headers[n].split(";");r<e.length;r++){var i=e[r].split("=",2),o=i[0],u=i[1];o=o.toLowerCase().trim(),void 0===u?t[""]=o:((u=u.trim()).startsWith('"')&&u.endsWith('"')&&(u=u.substring(1,u.length-1)),t[o]=u)}return t},n.prototype.getBodyAsFile=function(){return c(this,void 0,void 0,(function(){var n,t,r;return a(this,(function(e){switch(e.label){case 0:return[4,this.body.binary()];case 1:n=e.sent(),t=this.getParsedHeader("content-disposition").filename||"",r=this.headers["content-type"]||"";try{return[2,new File([n],t,{type:r})]}catch(e){return[2,Object.assign(n,{name:t,type:r})]}return[2]}}))}))},n.prototype.getBodyAsAny=function(){try{return this.body.text()}catch(n){}try{return this.body.binary()}catch(n){}return Promise.resolve(void 0)},n}();t.ResponseContext=d,t.wrapHttpLibrary=function(n){return{send:function(t){return(0,fi.from)(n.send(t))}}}})),Ti=S((function(n,t){var r=C&&C.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function u(n){try{a(e.next(n))}catch(n){o(n)}}function c(n){try{a(e.throw(n))}catch(n){o(n)}}function a(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(u,c)}a((e=e.apply(n,t||[])).next())}))},e=C&&C.__generator||function(n,t){var r,e,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,e&&(i=2&o[0]?e.return:o[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,o[1])).done)return i;switch(e=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,e=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(n,u)}catch(n){o=[6,n],e=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.configureAuthMethods=t.BearerAuthAuthentication=void 0;var i=function(){function n(n){this.tokenProvider=n}return n.prototype.getName=function(){return"bearerAuth"},n.prototype.applySecurityAuthentication=function(n){return r(this,void 0,void 0,(function(){var t,r,i,o;return e(this,(function(e){switch(e.label){case 0:return r=(t=n).setHeaderParam,i=["Authorization"],o="Bearer ",[4,this.tokenProvider.getToken()];case 1:return r.apply(t,i.concat([o+e.sent()])),[2]}}))}))},n}();t.BearerAuthAuthentication=i,t.configureAuthMethods=function(n){var t={};return n?(t.default=n.default,n.bearerAuth&&(t.bearerAuth=new i(n.bearerAuth.tokenProvider)),t):t}})),Ni=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorObject=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"domain",baseName:"domain",type:"string",format:""},{name:"reason",baseName:"reason",type:"string",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"location",baseName:"location",type:"string",format:""},{name:"location_type",baseName:"location_type",type:"string",format:""},{name:"extended_help",baseName:"extended_help",type:"string",format:""},{name:"send_report",baseName:"send_report",type:"string",format:""}],n}();t.ErrorObject=r})),Fi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"code",baseName:"code",type:"number",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"errors",baseName:"errors",type:"Array<ErrorObject>",format:""}],n}();t.ErrorResponse=r})),Di=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var r=function(){function n(){this.typ="Event"}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator="typ",n.attributeTypeMap=[{name:"session_id",baseName:"session_id",type:"string",format:""},{name:"typ",baseName:"typ",type:"string",format:""}],n}();t.Event=r})),Li=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EventConfirmation=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"status",baseName:"status",type:"EventConfirmationStatusEnum",format:""}],n}();t.EventConfirmation=r})),qi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),$i=S((function(n,t){var r,e=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.FilterEvent=void 0;var i=function(n){function t(){var t=n.call(this)||this;return t.typ="FilterEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],t}(Di.Event);t.FilterEvent=i})),Vi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FilterEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],n}();t.FilterEventAllOf=r})),Bi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Gi=S((function(n,t){var r,e=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProductClickEvent=void 0;var i=function(n){function t(){var t=n.call(this)||this;return t.typ="ProductClickEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}(Di.Event);t.ProductClickEvent=i})),Hi=S((function(n,t){var r,e=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProductViewEvent=void 0;var i=function(n){function t(){var t=n.call(this)||this;return t.typ="ProductViewEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}(Di.Event);t.ProductViewEvent=i})),Ki=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProductViewEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],n}();t.ProductViewEventAllOf=r})),Zi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Yi=S((function(n,t){var r,e=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.SearchEvent=void 0;var i=function(n){function t(){var t=n.call(this)||this;return t.typ="SearchEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],t}(Di.Event);t.SearchEvent=i})),Ji=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SearchEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],n}();t.SearchEventAllOf=r})),Xi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Qi=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),no=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),to=S((function(n,t){var r,e=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetEvent=void 0;var i=function(n){function t(){var t=n.call(this)||this;return t.typ="WidgetEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],t}(Di.Event);t.WidgetEvent=i})),ro=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],n}();t.WidgetEventAllOf=r})),eo=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),e(Ni,t),e(Fi,t),e(Di,t),e(Li,t),e(qi,t),e($i,t),e(Vi,t),e(Bi,t),e(Gi,t),e(Hi,t),e(Ki,t),e(Zi,t),e(Yi,t),e(Ji,t),e(Xi,t),e(Qi,t),e(no,t),e(to,t),e(ro,t)})),io=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseMiddlewareWrapper=void 0;var r=function(){function n(n){this.middleware=n}return n.prototype.pre=function(n){return(0,fi.from)(this.middleware.pre(n))},n.prototype.post=function(n){return(0,fi.from)(this.middleware.post(n))},n}();t.PromiseMiddlewareWrapper=r})),oo=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.servers=t.server2=t.server1=t.ServerConfiguration=void 0;var r=function(){function n(n,t){this.url=n,this.variableConfiguration=t}return n.prototype.setVariables=function(n){Object.assign(this.variableConfiguration,n)},n.prototype.getConfiguration=function(){return this.variableConfiguration},n.prototype.getUrl=function(){var n=this.url;for(var t in this.variableConfiguration){var r=new RegExp("{"+t+"}","g");n=n.replace(r,this.variableConfiguration[t])}return n},n.prototype.makeRequestContext=function(n,t){return new Pi.RequestContext(this.getUrl()+n,t)},n}();t.ServerConfiguration=r,t.server1=new r("https://tracking.vviinn.com",{}),t.server2=new r("https://tracking.stage.vviinn.com",{}),t.servers=[t.server1,t.server2]})),uo=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createConfiguration=void 0,t.createConfiguration=function(n){void 0===n&&(n={});var t={baseServer:void 0!==n.baseServer?n.baseServer:oo.server1,httpApi:n.httpApi||new Wi.IsomorphicFetchHttpLibrary,middleware:n.middleware||[],authMethods:(0,Ti.configureAuthMethods)(n.authMethods)};return n.promiseMiddleware&&n.promiseMiddleware.forEach((function(n){return t.middleware.push(new io.PromiseMiddlewareWrapper(n))})),t}})),co=S((function(n,t){var r,e=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ApiException=void 0;var i=function(n){function t(t,r,e,i){var o=n.call(this,"HTTP-Code: "+t+"\nMessage: "+r+"\nBody: "+JSON.stringify(e)+"\nHeaders: "+JSON.stringify(i))||this;return o.code=t,o.body=e,o.headers=i,o}return e(t,n),t}(Error);t.ApiException=i})),ao=S((function(n,t){var r,e=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredError=t.BaseAPIRequestFactory=t.COLLECTION_FORMATS=void 0,t.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"},t.BaseAPIRequestFactory=function(n){this.configuration=n};var i=function(n){function t(t,r,e){var i=n.call(this,"Required parameter "+e+" was null or undefined when calling "+t+"."+r+".")||this;return i.api=t,i.method=r,i.field=e,i.name="RequiredError",i}return e(t,n),t}(Error);t.RequiredError=i})),so=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectSerializer=void 0,e(Ni,t),e(Fi,t),e(Di,t),e(Li,t),e(qi,t),e($i,t),e(Vi,t),e(Bi,t),e(Gi,t),e(Hi,t),e(Ki,t),e(Zi,t),e(Yi,t),e(Ji,t),e(Xi,t),e(Qi,t),e(no,t),e(to,t),e(ro,t);var i=Ni,o=Fi,u=Di,c=Li,a=$i,s=Vi,f=Gi,l=Hi,d=Ki,h=Yi,p=Ji,v=to,m=ro,g=["string","boolean","double","integer","long","float","number","any"],b={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},w=new Set(["EventConfirmationStatusEnum","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),y={ErrorObject:i.ErrorObject,ErrorResponse:o.ErrorResponse,Event:u.Event,EventConfirmation:c.EventConfirmation,FilterEvent:a.FilterEvent,FilterEventAllOf:s.FilterEventAllOf,ProductClickEvent:f.ProductClickEvent,ProductViewEvent:l.ProductViewEvent,ProductViewEventAllOf:d.ProductViewEventAllOf,SearchEvent:h.SearchEvent,SearchEventAllOf:p.SearchEventAllOf,WidgetEvent:v.WidgetEvent,WidgetEventAllOf:m.WidgetEventAllOf},x=function(){function n(){}return n.findCorrectType=function(n,t){if(null==n)return t;if(-1!==g.indexOf(t.toLowerCase()))return t;if("Date"===t)return t;if(w.has(t))return t;if(!y[t])return t;var r=y[t].discriminator;if(null==r)return t;if(n[r]){var e=n[r];return y[e]?e:t}return t},n.serialize=function(t,r,e){if(null==t)return t;if(-1!==g.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var i=r.replace("Array<","");i=i.substring(0,i.length-1);var o=[];for(var u in t)o.push(n.serialize(t[u],i,e));return o}if("Date"===r){if("date"==e){var c=t.getMonth()+1;c=c<10?"0"+c.toString():c.toString();var a=t.getDate();return a=a<10?"0"+a.toString():a.toString(),t.getFullYear()+"-"+c+"-"+a}return t.toISOString()}if(w.has(r))return t;if(!y[r])return t;r=this.findCorrectType(t,r);var s=y[r].getAttributeTypeMap(),f={};for(var u in s){var l=s[u];f[l.baseName]=n.serialize(t[l.name],l.type,l.format)}return f},n.deserialize=function(t,r,e){if(r=n.findCorrectType(t,r),null==t)return t;if(-1!==g.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var i=r.replace("Array<","");i=i.substring(0,i.length-1);var o=[];for(var u in t)o.push(n.deserialize(t[u],i,e));return o}if("Date"===r)return new Date(t);if(w.has(r))return t;if(!y[r])return t;var c=new y[r],a=y[r].getAttributeTypeMap();for(var u in a){var s=a[u];c[s.name]=n.deserialize(t[s.baseName],s.type,s.format)}return c},n.normalizeMediaType=function(n){if(void 0!==n)return n.split(";")[0].trim().toLowerCase()},n.getPreferredMediaType=function(n){if(!n)return"application/json";for(var t=void 0,r=-1/0,e=0,i=n.map(this.normalizeMediaType);e<i.length;e++){var o=i[e];b[o]>r&&(t=o,r=b[o])}if(void 0===t)throw new Error("None of the given media types are supported: "+n.join(", "));return t},n.stringify=function(n,t){if("application/json"===t)return JSON.stringify(n);throw new Error("The mediaType "+t+" is not supported by ObjectSerializer.stringify.")},n.parse=function(n,t){if(void 0===t)throw new Error("Cannot parse content. No Content-Type defined.");if("application/json"===t)return JSON.parse(n);throw new Error("The mediaType "+t+" is not supported by ObjectSerializer.parse.")},n}();t.ObjectSerializer=x})),fo=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.canConsumeForm=t.isCodeInRange=void 0,t.isCodeInRange=function(n,t){if("0"===n)return!0;if(n==t.toString())return!0;var r=t.toString();if(r.length!=n.length)return!1;for(var e=0;e<r.length;e++)if("X"!=n.charAt(e)&&n.charAt(e)!=r.charAt(e))return!1;return!0},t.canConsumeForm=function(n){return-1!==n.indexOf("multipart/form-data")}})),lo=S((function(n,t){var r,e=C&&C.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),i=C&&C.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function u(n){try{a(e.next(n))}catch(n){o(n)}}function c(n){try{a(e.throw(n))}catch(n){o(n)}}function a(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(u,c)}a((e=e.apply(n,t||[])).next())}))},o=C&&C.__generator||function(n,t){var r,e,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,e&&(i=2&o[0]?e.return:o[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,o[1])).done)return i;switch(e=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,e=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(n,u)}catch(n){o=[6,n],e=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultApiResponseProcessor=t.DefaultApiRequestFactory=void 0;var u=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e(t,n),t.prototype.trackEvent=function(n,t){var r,e,u;return i(this,void 0,void 0,(function(){var i,c,a,s,f,l;return o(this,(function(o){switch(o.label){case 0:return(c=(i=t||this.configuration).baseServer.makeRequestContext("/event",Pi.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),a=so.ObjectSerializer.getPreferredMediaType(["application/json"]),c.setHeaderParam("Content-Type",a),s=so.ObjectSerializer.stringify(so.ObjectSerializer.serialize(n,"ProductViewEvent | ProductClickEvent | WidgetEvent | FilterEvent | SearchEvent",""),a),c.setBody(s),(null==(f=i.authMethods.bearerAuth)?void 0:f.applySecurityAuthentication)?[4,null==f?void 0:f.applySecurityAuthentication(c)]:[3,2];case 1:o.sent(),o.label=2;case 2:return(null==(l=(null===(r=null==t?void 0:t.authMethods)||void 0===r?void 0:r.default)||(null===(u=null===(e=this.configuration)||void 0===e?void 0:e.authMethods)||void 0===u?void 0:u.default))?void 0:l.applySecurityAuthentication)?[4,null==l?void 0:l.applySecurityAuthentication(c)]:[3,4];case 3:o.sent(),o.label=4;case 4:return[2,c]}}))}))},t}(ao.BaseAPIRequestFactory);t.DefaultApiRequestFactory=u;var c=function(){function n(){}return n.prototype.trackEvent=function(n){return i(this,void 0,void 0,(function(){var t,r,e,i,u,c,a,s,f,l,d,h,p,v,m,g;return o(this,(function(o){switch(o.label){case 0:return t=so.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,fo.isCodeInRange)("200",n.httpStatusCode)?(e=(r=so.ObjectSerializer).deserialize,u=(i=so.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,l=e.apply(r,[u.apply(i,[o.sent(),t]),"EventConfirmation",""])];case 2:return(0,fo.isCodeInRange)("502",n.httpStatusCode)?(a=(c=so.ObjectSerializer).deserialize,f=(s=so.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:throw l=a.apply(c,[f.apply(s,[o.sent(),t]),"ErrorResponse",""]),new co.ApiException(502,"an error occurred",l,n.headers);case 4:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(h=(d=so.ObjectSerializer).deserialize,v=(p=so.ObjectSerializer).parse,[4,n.body.text()]):[3,6];case 5:return[2,l=h.apply(d,[v.apply(p,[o.sent(),t]),"EventConfirmation",""])];case 6:return m=co.ApiException.bind,g=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 7:throw new(m.apply(co.ApiException,g.concat([o.sent(),n.headers])))}}))}))},n}();t.DefaultApiResponseProcessor=c})),ho=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableDefaultApi=void 0;var r=fi,e=function(){function n(n,t,r){this.configuration=n,this.requestFactory=t||new lo.DefaultApiRequestFactory(n),this.responseProcessor=r||new lo.DefaultApiResponseProcessor}return n.prototype.trackEvent=function(n,t){for(var e=this,i=this.requestFactory.trackEvent(n,t),o=(0,fi.from)(i),u=function(n){o=o.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},c=0,a=this.configuration.middleware;c<a.length;c++)u(a[c]);return o.pipe((0,r.mergeMap)((function(n){return e.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,fi.of)(n),i=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},o=0,u=e.configuration.middleware;o<u.length;o++)i(u[o]);return t.pipe((0,r.map)((function(n){return e.responseProcessor.trackEvent(n)})))})))},n}();t.ObservableDefaultApi=e})),po=S((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseDefaultApi=void 0;var r=function(){function n(n,t,r){this.api=new ho.ObservableDefaultApi(n,t,r)}return n.prototype.trackEvent=function(n,t){return this.api.trackEvent(n,t).toPromise()},n}();t.PromiseDefaultApi=r})),vo=S((function(n,t){var r=C&&C.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,i)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=C&&C.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultApi=t.createConfiguration=void 0,e(Pi,t),e(Ti,t),e(eo,t),Object.defineProperty(t,"createConfiguration",{enumerable:!0,get:function(){return uo.createConfiguration}}),e(co,t),e(oo,t),Object.defineProperty(t,"DefaultApi",{enumerable:!0,get:function(){return po.PromiseDefaultApi}})}));const mo=(n,t)=>{const r=(n=>(n=>!n.includes("stage"))(n)?vo.servers[0]:vo.servers[1])(n),e=(n=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((t=>t(n)))}}}))(t);return new vo.DefaultApi(vo.createConfiguration({baseServer:r,authMethods:e}))},go=n=>t=>Object.assign(Object.assign({},t),n),bo=go({widget:"VPR",typ:"product_view_event"}),wo=go({widget:"VPS",typ:"product_view_event"}),yo=go({widget:"VPR",typ:"product_click_event"}),xo=go({widget:"VPS",typ:"product_click_event"}),Io=go({widget:"VPR",typ:"widget_event"}),_o=go({widget:"VPS",typ:"widget_event"}),jo=go({widget:"VPS",typ:"search_event"}),ko=go({widget:"VPS",typ:"filter_event"});let Oo=class{constructor(t){n(this,t),this.recommendationsLoaded=o(this,"recommendationsLoaded",7),this.blockTitle="Recommended products",this.imageRatio=1,this.imageWidth=300,this.currencySign="€",this.mode="continuity",this.campaignType="VPR",this.locale="de-DE",this.campaigns="",this.apiPath="https://api.vviinn.com",this.useCarousel=!0,this.showScroll=!0,this.cssUrl=null,this.recommendations=[],this.loaded=!1,this.productImageLoadedSubject=new We}handleProductIdChange(){this.getRecommendations()}handleCampaignTypeChange(){this.getRecommendations()}handleCampaignsChange(){this.getRecommendations()}handleApiPathChange(n){it.apiPath=n,this.getRecommendations()}handleImageLoading({detail:n}){this.productImageLoadedSubject.next(n)}trackRecommendationView({detail:n}){const t=bo(Object.assign({session_id:this.uiSessionId},n));this.trackingApi.trackEvent(t)}trackRecommendationClick({detail:n}){const t=yo(Object.assign({session_id:this.uiSessionId},n));this.trackingApi.trackEvent(t).finally((()=>{const t=this.recommendations.find((t=>t.productId===n.product));t&&t.deeplink&&(window.location.href=t.deeplink)}))}connectedCallback(){it.apiPath=this.apiPath,it.currencySign=this.currencySign,it.locale=this.locale,this.uiSessionId=Ve(),this.trackingApi=mo(this.apiPath,this.token);const n=Io({action:"open",session_id:this.uiSessionId});this.trackingApi.trackEvent(n)}disconnectedCallback(){const n=Io({action:"close",session_id:this.uiSessionId});this.trackingApi.trackEvent(n)}async componentWillLoad(){it.pricePrefix=this.pricePrefix,it.currencySign=this.currencySign,this.getRecommendations()}async getRecommendations(){if(void 0===this.productId||void 0===this.token)return;const n=this.campaignType.length>0?this.campaignType:"VPR",t=re(this.token),r=A.pipe(et.of((n=>{return A.pipe("VPR"===n?{_tag:"VPR"}:{_tag:"VCS"},(t=()=>ue,r=()=>ce,n=>(n=>"VPR"===n._tag)(n)?t():r()));var t,r})(n)),et.ap(et.of(this.productId)),et.ap(et.of((e=this.campaigns).length>0?Z.some(e):Z.none)),et.ap(et.of(t)),et.flatten);var e;const i=await r();A.pipe(i,Jn.fold((n=>this.handleError(n)),(n=>this.handleRecommendationsSucces(n))))}handleError(n){console.log("ERROR:",n)}handleRecommendationsSucces(n){var t;this.recommendations=null!==(t=null==n?void 0:n.extended)&&void 0!==t?t:n,hr.results=this.recommendations,this.loaded=!0,this.productIds=this.recommendations.map((n=>n.productId)),this.productImageLoadedSubject.subscribe((n=>{this.productIds=this.productIds.filter((t=>t!==n)),0===this.productIds.length&&this.recommendationsLoaded.emit()}))}isExternalCSS(){return this.cssUrl&&this.cssUrl.length>0}renderExternalCSS(){return this.isExternalCSS()?t("link",{href:this.cssUrl,rel:"stylesheet"}):""}render(){return t(r,{class:{loaded:this.loaded,empty:0==this.recommendations.length,[this.mode]:!0},"aria-hidden":this.loaded?"false":"true"},this.renderExternalCSS(),t("style",null,it.fallbackStyles),t("h2",{part:"recommendations-title"},this.blockTitle),this.useCarousel?this.renderCarousel():this.renderResults())}renderRecommendation(n,r){return t("vviinn-product-card",{part:"product-part",productId:n.productId,productTitle:n.title,deeplink:n.deeplink,image:n.image.thumbnail,brand:n.brand,imageWidth:this.imageWidth,imageRatio:1,price:n.price.actual,salePrice:n.price.sale,responsive:"grid"===this.mode,dimmedBackground:this.useDimmedBackgroundInCard(),index:r})}useDimmedBackgroundInCard(){return"continuity"===this.mode||!this.useCarousel}renderResults(){return t("div",{class:"recommendations-grid",part:"recommendations-grid"},this.recommendations.map(((n,t)=>this.renderRecommendation(n,t))))}renderCarousel(){return t("vviinn-carousel",{mode:this.mode,imageWidth:this.imageWidth,showScroll:this.showScroll,recommendations:this.recommendations})}get el(){return u(this)}static get watchers(){return{productId:["handleProductIdChange"],campaignType:["handleCampaignTypeChange"],campaigns:["handleCampaignsChange"],apiPath:["handleApiPathChange"]}}};Oo.style=":host{display:grid;grid-gap:1rem;width:100%}:host(:not(.loaded)){position:absolute;visibility:hidden}:host(.grid) vviinn-product-card::part(image){border:1px solid #DDDDDD;width:100%}h2{margin:0}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}h2{margin:0}:host(.grid) h2{justify-content:center}:host(.grid) vviinn-product-card::part(image){min-width:100%}:host(.grid) vviinn-product-card::part(image-link){width:100%}:host(.grid) vviinn-product-card::part(title),:host(.grid) vviinn-product-card::part(brand),:host(.grid) vviinn-product-card::part(type){text-align:center}:host(.grid) vviinn-product-card::part(price-container){align-self:center}:host(.continuity) vviinn-product-card::part(title),:host(.continuity) vviinn-product-card::part(brand),:host(.continuity) vviinn-product-card::part(type),:host(.continuity) vviinn-product-card::part(deeplink){text-align:left;max-width:unset;align-self:start}";let Ro=class{constructor(t){n(this,t),this.globalSlotsChanged=o(this,"globalSlotsChanged",7),this.currencySign="€",this.locale="de-DE",this.pressed=!1}handleModalClosed(){this.pressed=!1}componentDidLoad(){const n=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(n))}handleKeyDown(n){"Enter"!==n.code&&"Space"!==n.code||(this.pressed=!0)}handleClick(){this.pressed=!0}render(){return t(r,{tabindex:"0",role:"button",pressed:this.pressed,onClick:()=>this.handleClick(),onKeyDown:n=>this.handleKeyDown(n)},t("slot",null,t(h,null)),t(Rr,null),t("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, example-images",campaignId:this.campaignId}))}get el(){return u(this)}};Ro.style=":host{cursor:pointer}";const Mo=n=>/^[-+]?(\d+|Infinity)$/.test(n)?Number(n):NaN,Uo=n=>!function(n){return 0===n.length}(n),Eo=n=>!isNaN(n);let zo=class{constructor(t){n(this,t),this.apiPath="https://api.vviinn.com",this.active=!1,this.currencySign="€",this.locale="de-DE",this.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.imageSource=null}activeWatcher(n){n?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.trackOpenEvent()):document.body.style.overflow=this.overflow}trackRecommendationView({detail:n}){const t=wo(Object.assign({session_id:this.uiSessionId},n));this.trackingApi.trackEvent(t)}trackRecommendationClick({detail:n}){const t=xo(Object.assign({session_id:this.uiSessionId},n));this.trackingApi.trackEvent(t).finally((()=>{const t=hr.results.find((t=>t.productId===n.product));t&&t.deeplink&&(window.location.href=t.deeplink)}))}trachSearchAreaChanges(){const n=jo({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"});this.trackingApi.trackEvent(n)}trackDetectedObject(){const n=jo({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"});this.trackingApi.trackEvent(n)}trackFilter({detail:n}){const t=ko({session_id:this.uiSessionId,source:this.imageSource,kind:"category",action:n});this.trackingApi.trackEvent(t)}componentWillLoad(){Ur(this,this.el)}connectedCallback(){it.apiPath=this.apiPath,it.currencySign=this.currencySign,it.locale=this.locale,hr.token=this.token,hr.campaignId=A.pipe(this.campaignId,Z.fromNullable,Z.chain(Z.fromPredicate(Uo)),Z.map(Mo),Z.chain(Z.fromPredicate(Eo)),Z.map((n=>`${n}`))),this.uiSessionId=Ve(),this.trackingApi=mo(this.apiPath,this.token)}trackOpenEvent(){const n=_o({action:"open",session_id:this.uiSessionId});this.trackingApi.trackEvent(n)}handleImageSelection(n){this.imageSource=n,this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.trackInitialSearch()}trackInitialSearch(){const n=jo({session_id:this.uiSessionId,source:this.imageSource,search_area:"full"});this.trackingApi.trackEvent(n)}resetState(){this.resetScroll("onboarding-block"),this.slidePosition=0,hr.image=Z.none,hr.imageUrl=Z.none,hr.imageBounds=Z.none,hr.searchArea=Z.none,hr.results=[],hr.filters=[],hr.detectedObjects=[],hr.activeIonLink=void 0,hr.rectangleSearchForm=void 0,this.resetScroll("results-block")}haveErrors(){return this.wrongImageFormat||hr.serverError}resetScroll(n,t="auto"){this.el.shadowRoot.getElementById(n).scroll({top:0,left:0,behavior:t})}handleModalClose(){this.active=!1,this.resetState(),["onboarding-block","results-block"].forEach((n=>this.resetScroll(n)));const n=_o({action:"close",session_id:this.uiSessionId});this.trackingApi.trackEvent(n)}render(){return t(r,null,t("vviinn-overlayed-modal",{class:{"first-screen":0===this.slidePosition},active:this.active,onSecondaryActionClicked:()=>this.resetState(),onModalClosed:()=>this.handleModalClose(),exportparts:"secondary-action, title, close-button, example-images"},t("vviinn-slider",{showBullets:!1,position:this.slidePosition},t("vviinn-slide",{class:{"start-page":!0}},t("div",{class:{error:this.haveErrors(),"start-page_block":!0}},t("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},onActionClick:()=>this.wrongImageFormat=!1}),t("vviinn-server-error",{class:{hidden:!hr.serverError},onActionClick:()=>hr.serverError=!1}),t("vviinn-teaser",{class:{hidden:this.haveErrors()}}),t("vviinn-image-selector",{class:{hidden:this.haveErrors()},onImageSelected:()=>this.handleImageSelection("upload"),onImageSelectedError:()=>this.wrongImageFormat=!0,part:"select-image_button"},t("span",{slot:"upload-button-text",class:"upload-button-content"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"29",height:"28",fill:"none"},t("defs",null),t("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"}),t("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"})),t("slot",{name:"vviinn-image-upload-button-text"},t("span",null,"Kamera oder Bild auswählen")))),t("vviinn-privacy-badge",{class:{hidden:this.haveErrors()}})),t("div",{id:"onboarding-block",class:"start-page_block"},t("div",{class:"onboarding-wrapper"},t("vviinn-onboarding",null),t("vviinn-example-images",{part:"example-images",onImageSelected:()=>this.handleImageSelection("example"),onImageSelectedError:()=>this.resetScroll("onboarding-block","smooth")})))),t("vviinn-slide",{class:{"results-page":!0,active:1==this.slidePosition}},t("div",{class:"image-wrapper"},t("vviinn-image-view",null),t("div",{class:"filters-wrapper"},t("div",{class:"filters"},hr.filters.map((n=>t("search-filters",{filter:n})))))),t("div",{id:"results-block",class:"products-wrapper"},t("div",{class:{"nothing-found":!0,hidden:hr.results.length>0}},t("vviinn-empty-results",null),t("vviinn-onboarding",null)),t("div",{class:{hidden:hr.results.length<=0,products:!0}},hr.results.map(((n,r)=>{var e;return t("vviinn-product-card",{hidden:!0,productTitle:n.title,productId:n.productId,brand:n.brand,deeplink:n.deeplink,price:n.price.actual,salePrice:n.price.sale,imageWidth:160,image:null!==(e=n.image.thumbnail)&&void 0!==e?e:n.image.original,part:"product-card",index:r})}))))))))}get el(){return u(this)}static get watchers(){return{active:["activeWatcher"]}}};zo.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 Co=class{constructor(t){n(this,t),this.actionClick=o(this,"actionClick",7)}render(){return t(r,null,t("vviinn-error",null,t("h4",{slot:"title"},"Dateityp wird nicht unterstützt"),t("span",{slot:"text"},"Leider unterstützen wir dieses Format nicht. Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch."),t("button",{slot:"action",onClick:()=>this.actionClick.emit()},"Neues Bild hochladen")))}};Co.style=":host{display:block}";export{z as cropper_handler,mr as highlight_box,gr as image_cropper,wr as search_filters,yr as vviinn_carousel,xr as vviinn_detected_object,Ir as vviinn_empty_results,_r as vviinn_error,jr as vviinn_example_image,Er as vviinn_example_images,zr as vviinn_image_selector,Cr as vviinn_image_view,Sr as vviinn_modal,Ar as vviinn_onboarding,Wr as vviinn_onboarding_card_1,Pr as vviinn_onboarding_card_2,Tr as vviinn_onboarding_card_3,Nr as vviinn_overlay,Fr as vviinn_overlayed_modal,Dr as vviinn_preloader,Lr as vviinn_privacy_badge,Yr as vviinn_product_card,Jr as vviinn_server_error,Xr as vviinn_slide,ne as vviinn_slider,te as vviinn_teaser,Oo as vviinn_vpr_widget,Ro as vviinn_vps_button,zo as vviinn_vps_widget,Co as vviinn_wrong_format}