vviinn-widgets 2.7.1 → 2.7.2

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 (55) hide show
  1. package/dist/cjs/{app-globals-047a582c.js → app-globals-8db3bcbe.js} +1 -1
  2. package/dist/cjs/cropper-handler_27.cjs.entry.js +5 -5
  3. package/dist/cjs/{customized-slots-cb722e68.js → customized-slots-06ca4007.js} +1 -1
  4. package/dist/cjs/{index-bd771524.js → index-3c3ab815.js} +1 -1
  5. package/dist/cjs/{index-d07466b9.js → index-df6896e2.js} +1 -1
  6. package/dist/cjs/{index-fcafbfe5.js → index-f66cd8d1.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/vviinn-carousel_2.cjs.entry.js +3 -3
  9. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
  10. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
  11. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  12. package/dist/cjs/vviinn-widgets.cjs.js +2 -2
  13. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +1 -1
  14. package/dist/esm/{app-globals-68b1d848.js → app-globals-865bc7a7.js} +1 -1
  15. package/dist/esm/cropper-handler_27.entry.js +5 -5
  16. package/dist/esm/{customized-slots-95a05ceb.js → customized-slots-96902edf.js} +1 -1
  17. package/dist/esm/{index-33fe5a25.js → index-2fdd499d.js} +1 -1
  18. package/dist/esm/{index-f9df412f.js → index-443468c7.js} +1 -1
  19. package/dist/esm/{index-75a1f589.js → index-51f71d18.js} +1 -1
  20. package/dist/esm/loader.js +2 -2
  21. package/dist/esm/vviinn-carousel_2.entry.js +3 -3
  22. package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
  23. package/dist/esm/vviinn-vpr-button.entry.js +2 -2
  24. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  25. package/dist/esm/vviinn-widgets.js +2 -2
  26. package/dist/vviinn-widgets/{p-f6e59cb2.js → p-166970f3.js} +1 -1
  27. package/dist/vviinn-widgets/{p-5aca8be2.entry.js → p-2dd35f19.entry.js} +1 -1
  28. package/dist/vviinn-widgets/{p-4e55513e.js → p-3469b71a.js} +1 -1
  29. package/dist/vviinn-widgets/{p-5358970c.entry.js → p-40bea5b5.entry.js} +1 -1
  30. package/{www/build/p-66015ad7.js → dist/vviinn-widgets/p-465d043d.js} +1 -1
  31. package/dist/vviinn-widgets/{p-9de1b0e7.js → p-59bd2a99.js} +1 -1
  32. package/dist/vviinn-widgets/p-74ed36af.entry.js +1 -0
  33. package/dist/vviinn-widgets/{p-c1cd51ef.entry.js → p-9def6b8b.entry.js} +1 -1
  34. package/dist/vviinn-widgets/{p-8080679b.entry.js → p-a6e0710f.entry.js} +1 -1
  35. package/dist/vviinn-widgets/{p-b254eee7.js → p-cd995515.js} +1 -1
  36. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  37. package/package.json +1 -1
  38. package/www/build/{p-f6e59cb2.js → p-166970f3.js} +1 -1
  39. package/www/build/{p-5aca8be2.entry.js → p-2dd35f19.entry.js} +1 -1
  40. package/www/build/{p-4e55513e.js → p-3469b71a.js} +1 -1
  41. package/www/build/{p-5358970c.entry.js → p-40bea5b5.entry.js} +1 -1
  42. package/{dist/vviinn-widgets/p-66015ad7.js → www/build/p-465d043d.js} +1 -1
  43. package/www/build/{p-9de1b0e7.js → p-59bd2a99.js} +1 -1
  44. package/www/build/p-61933b75.js +1 -0
  45. package/www/build/p-74ed36af.entry.js +1 -0
  46. package/www/build/{p-c1cd51ef.entry.js → p-9def6b8b.entry.js} +1 -1
  47. package/www/build/p-a67898be.css +1 -0
  48. package/www/build/{p-8080679b.entry.js → p-a6e0710f.entry.js} +1 -1
  49. package/www/build/{p-b254eee7.js → p-cd995515.js} +1 -1
  50. package/www/build/vviinn-widgets.esm.js +1 -1
  51. package/www/index.html +1 -1
  52. package/dist/vviinn-widgets/p-e32c30d4.entry.js +0 -1
  53. package/www/build/p-e0153ae2.css +0 -6
  54. package/www/build/p-e32c30d4.entry.js +0 -1
  55. package/www/build/p-f6566a1f.js +0 -125
@@ -1 +1 @@
1
- import{a as n,f as t}from"./p-4e55513e.js";function r(n){return n}function e(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return o(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(o(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(o(i(u(e(r(t(n.apply(this,arguments)))))))))}}}function u(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n}function i(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return o(i(u(e(r(t(n))))));case 8:return c(o(i(u(e(r(t(n)))))));case 9:return f(c(o(i(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}}var o={_tag:"None"},c=function(n){return{_tag:"Left",left:n}},f=function(n){return{_tag:"Right",right:n}},a=Object.prototype.hasOwnProperty,s=function(n){return{concat:function(t,r){var e={};for(var u in n)a.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));return e}}},v={concat:function(n,t){return n+t}};const d={concat:(n,t)=>n-t},l=({x:n,y:t})=>({x:n,y:t}),p=({clientX:n,clientY:t})=>({x:n,y:t}),h=s({x:d,y:d}),m=s({x:v,y:v});var b;!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"}(b||(b={}));const y=n=>{switch(n){case b.East:return"e-resize";case b.North:return"n-resize";case b.NorthEast:return"ne-resize";case b.NorthWest:return"nw-resize";case b.South:return"s-resize";case b.SouthEast:return"se-resize";case b.SouthWest:return"sw-resize";case b.West:return"w-resize";default:return"pointer"}};var w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(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 I=g((function(n,t){function r(n){return n}function e(n){return function(){return n}}function u(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return o(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(o(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(o(i(u(e(r(t(n.apply(this,arguments)))))))))}}}function i(){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=u,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=i,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,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return o(i(u(e(r(t(n))))));case 8:return c(o(i(u(e(r(t(n)))))));case 9:return f(c(o(i(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}},t.hole=i,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 u(n,t)},empty:r}}})),O=g((function(n,t){var r=w&&w.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,u=0,i=t.length;u<i;u++)!e&&u in t||(e||(e=Array.prototype.slice.call(t,0,u)),e[u]=t[u]);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)}})),j=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceS=t.sequenceT=t.getApplySemigroup=t.apS=t.apSecond=t.apFirst=t.ap=void 0;var i=u(O);function o(n,t,r){return function(e){for(var u=Array(r.length+1),i=0;i<r.length;i++)u[i]=r[i];return u[r.length]=e,0===t?n.apply(null,u):o(n,t-1,u)}}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(u){return[n,t,r,e,u]}}}}}};function f(n){return i.has.call(c,n)||(c[n]=o(I.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,u=f(e),i=n.map(t[0],u),o=1;o<e;o++)i=n.ap(i,t[o]);return i}},t.sequenceS=function(n){return function(t){for(var r=Object.keys(t),e=r.length,u=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 u;return(u={})[n[0]]=t,u[n[1]]=r,u[n[2]]=e,u}}};case 4:return function(t){return function(r){return function(e){return function(u){var i;return(i={})[n[0]]=t,i[n[1]]=r,i[n[2]]=e,i[n[3]]=u,i}}}};case 5:return function(t){return function(r){return function(e){return function(u){return function(i){var o;return(o={})[n[0]]=t,o[n[1]]=r,o[n[2]]=e,o[n[3]]=u,o[n[4]]=i,o}}}}};default:return o((function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var u={},i=0;i<t;i++)u[n[i]]=r[i];return u}),t-1,[])}}(r),i=n.map(t[r[0]],u),c=1;c<e;c++)i=n.ap(i,t[r[c]]);return i}}})),R=g((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,I.pipe)(n,e(t))}}}})),_=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicativeComposition=t.getApplicativeMonoid=void 0,t.getApplicativeMonoid=function(n){var t=(0,j.getApplySemigroup)(n);return function(r){return{concat:t(r).concat,empty:n.of(r.empty)}}},t.getApplicativeComposition=function(n,t){var r=(0,R.getFunctorComposition)(n,t).map,e=(0,j.ap)(n,t);return{map:r,of:function(r){return n.of(t.of(r))},ap:function(n,t){return(0,I.pipe)(n,e(t))}}}})),U=g((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))}))}))}}}})),M=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterOrElse=t.chainFirstEitherK=t.chainEitherK=t.fromEitherK=t.chainOptionK=t.fromOptionK=t.fromPredicate=t.fromOption=void 0;var i=u(O);function o(n){return function(t){return function(r){return n.fromEither(i.isNone(r)?i.left(t()):i.right(r.value))}}}function c(n){var t=o(n);return function(n){var r=t(n);return function(n){return(0,I.flow)(n,r)}}}function f(n){return function(t){return(0,I.flow)(t,n.fromEither)}}t.fromOption=o,t.fromPredicate=function(n){return function(t,r){return function(e){return n.fromEither(t(e)?i.right(e):i.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=f,t.chainEitherK=function(n,t){var r=f(n);return function(n){return function(e){return t.chain(e,r(n))}}},t.chainFirstEitherK=function(n,t){return(0,I.flow)(f(n),(0,U.chainFirst)(t))},t.filterOrElse=function(n,t){return function(r,e){return function(u){return t.chain(u,(function(t){return n.fromEither(r(t)?i.right(t):i.left(e(t)))}))}}}})),x=g((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,I.flow)(n,t)}},t.URI="Predicate",t.getSemigroupAny=function(){return{concat:function(n,r){return(0,I.pipe)(n,(0,t.or)(r))}}},t.getMonoidAny=function(){return{concat:(0,t.getSemigroupAny)().concat,empty:I.constFalse}},t.getSemigroupAll=function(){return{concat:function(n,r){return(0,I.pipe)(n,(0,t.and)(r))}}},t.getMonoidAll=function(){return{concat:(0,t.getSemigroupAll)().concat,empty:I.constTrue}},t.Contravariant={URI:t.URI,contramap:function(n,r){return(0,I.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)}}}})),E=g((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)}}}})),A=g((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,I.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()}}})),T=g((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 u=n[e].compare(t[e],r[e]);if(0!==u)return u}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 u=n.compare(t,e);return 0!==u?u: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,I.pipe)(n,(0,t.contramap)(r))}},t.trivial={equals:I.constTrue,compare:(0,I.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(u){return e(r(u,t),n)}}},t.between=function(n){var r=(0,t.lt)(n),e=(0,t.gt)(n);return function(n,t){return function(u){return!r(u,n)&&!e(u,t)}}},t.getTupleOrd=t.tuple,t.getDualOrd=t.reverse,t.ord=t.Contravariant;var r={equals:A.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,I.pipe)(t.ordNumber,(0,t.contramap)((function(n){return n.valueOf()})))})),W=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O),o=u(E),c=u(T);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=o.reverse,t.struct=function(n){return{concat:function(t,r){var e={};for(var u in n)i.has.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));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:I.identity}},t.last=function(){return{concat:function(n,t){return t}}},t.concatAll=o.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=I.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}}})),P=g((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,I.pipe)(n,(0,t.mapLeft)(r))},bimap:function(n,r,e){return(0,I.pipe)(n,(0,t.bimap)(r,e))}},t.Functor={URI:t.URI,map:function(n,r){return(0,I.pipe)(n,(0,t.map)(r))}},t.flap=(0,R.flap)(t.Functor),t.left=function(n){return n.left},t.right=function(n){return n.right}})),S=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterE=t.witherDefault=t.wiltDefault=void 0;var i=u(O);t.wiltDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,u){return r.map(e(n,u),t.separate)}}},t.witherDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,u){return r.map(e(n,u),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?i.some(r):i.none}))}))}}}}})),k=g((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()}}})),N=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O);t.none=i.none,t.some=i.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 o=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},f=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},a=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},s=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},v=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},d=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},l=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},p=function(n,r){return(0,I.pipe)(n,(0,t.filter)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.filterMap)(r))},m=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},b=function(n,r){return(0,I.pipe)(n,(0,t.partition)(r))},y=function(n,r){return(0,I.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:o},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:o,ap:c},t.Applicative={URI:t.URI,map:o,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:o,ap:c,chain:f},t.Monad={URI:t.URI,map:o,ap:c,of:t.of,chain:f},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:a,foldMap:s,reduceRight:v},t.altW=function(n){return function(r){return(0,t.isNone)(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:o,alt:l},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:o,ap:c,of:t.of,alt:l,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:o,extend:m},t.compact=(0,t.chain)(I.identity);var g=(0,P.separated)(t.none,t.none);t.separate=function(n){return(0,t.isNone)(n)?g:(0,P.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,P.separated)(p(t,(0,x.not)(n)),p(t,n))}},t.partitionMap=function(n){return(0,I.flow)((0,t.map)(n),t.separate)},t.Filterable={URI:t.URI,map:o,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y},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:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence};var E=(0,S.witherDefault)(t.Traversable,t.Compactable),A=(0,S.wiltDefault)(t.Traversable,t.Compactable);t.wither=function(n){var t=E(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=A(n);return function(n){return function(r){return t(r,n)}}},t.Witherable={URI:t.URI,map:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y,wither:E,wilt:A},t.throwError=function(){return t.none},t.MonadThrow={URI:t.URI,map:o,ap:c,of:t.of,chain:f,throwError:t.throwError},t.fromEither=t.getRight,t.FromEither={URI:t.URI,fromEither:t.fromEither},t.isSome=i.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,R.flap)(t.Functor),t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.apSecond)(t.Apply),t.flatten=t.compact,t.chainFirst=(0,U.chainFirst)(t.Chain),t.duplicate=(0,t.extend)(I.identity),t.fromEitherK=(0,M.fromEitherK)(t.FromEither),t.chainEitherK=(0,M.chainEitherK)(t.FromEither,t.Chain),t.chainFirstEitherK=(0,M.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,I.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)(I.constNull,I.identity),t.toUndefined=(0,t.match)(I.constUndefined,I.identity),t.elem=function n(r){return function(e,u){if(void 0===u){var i=n(r);return function(n){return i(e,n)}}return!(0,t.isNone)(u)&&r.equals(e,u.value)}},t.exists=function(n){return function(r){return!(0,t.isNone)(r)&&n(r.value)}},t.Do=(0,t.of)(i.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.Apply),t.ApT=(0,t.of)(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,i.head(r));if((0,t.isNone)(e))return t.none;for(var u=[e.value],o=1;o<r.length;o++){var c=n(o,r[o]);if((0,t.isNone)(c))return t.none;u.push(c.value)}return(0,t.some)(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return i.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)(I.identity),t.getRefinement=function(n){return function(r){return(0,t.isSome)(n(r))}},t.mapNullable=t.chainNullableK,t.option={URI:t.URI,map:o,of:t.of,ap:c,chain:f,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,zero:t.zero,alt:l,extend:m,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y,wither:E,wilt:A,throwError:t.throwError},t.getApplySemigroup=(0,j.getApplySemigroup)(t.Apply),t.getApplyMonoid=(0,_.getApplicativeMonoid)(t.Applicative),t.getFirstMonoid=function(){return(0,t.getMonoid)((0,W.first)())},t.getLastMonoid=function(){return(0,t.getMonoid)((0,W.last)())}}));const C=n=>!("isConnected"in n)||n.isConnected,q=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys())n.set(t,n.get(t).filter(C))})(...t)}),2e3)}})(),z=(r,e)=>{const u=((n,t=((n,t)=>n!==t))=>{let r=new Map(Object.entries(null!=n?n:{}));const e={dispose:[],get:[],set:[],reset:[]},u=()=>{r=new Map(Object.entries(null!=n?n:{})),e.reset.forEach((n=>n()))},i=n=>(e.get.forEach((t=>t(n))),r.get(n)),o=(n,u)=>{const i=r.get(n);t(u,i,n)&&(r.set(n,u),e.set.forEach((t=>t(n,u,i))))},c="undefined"==typeof Proxy?{}:new Proxy(n,{get:(n,t)=>i(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>r.has(t),set:(n,t,r)=>(o(t,r),!0)}),f=(n,t)=>(e[n].push(t),()=>{((n,t)=>{const r=n.indexOf(t);r>=0&&(n[r]=n[n.length-1],n.length--)})(e[n],t)});return{state:c,get:i,set:o,on:f,onChange:(t,r)=>{const e=f("set",((n,e)=>{n===t&&r(e)})),u=f("reset",(()=>r(n[t])));return()=>{e(),u()}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(f("set",t.set)),t.get&&n.push(f("get",t.get)),t.reset&&n.push(f("reset",t.reset)),t.dispose&&n.push(f("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{e.dispose.forEach((n=>n())),u()},reset:u,forceUpdate:n=>{const t=r.get(n);e.set.forEach((r=>r(n,t,t)))}}})(r,e);return u.use((()=>{if("function"!=typeof n)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const e=n();e&&((n,t,r)=>{const e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])})(r,t,e)},set:n=>{const e=r.get(n);e&&r.set(n,e.filter(t)),q(r)},reset:()=>{r.forEach((n=>n.forEach(t))),q(r)}}})()),u};function D(n,t,r){return function(e){for(var u=Array(r.length+1),i=0;i<r.length;i++)u[i]=r[i];return u[r.length]=e,0===t?n.apply(null,u):D(n,t-1,u)}}var F={1:function(n){return[n]},2:function(n){return function(t){return[n,t]}},3:function(n){return function(t){return function(r){return[n,t,r]}}},4:function(n){return function(t){return function(r){return function(e){return[n,t,r,e]}}}},5:function(n){return function(t){return function(r){return function(e){return function(u){return[n,t,r,e,u]}}}}}};function L(n){return a.call(F,n)||(F[n]=D(u,n-1,[])),F[n]}function H(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=t.length,u=L(e),i=n.map(t[0],u),o=1;o<e;o++)i=n.ap(i,t[o]);return i}}function B(n){return function(t){return function(r){return n.fromEither("None"===r._tag?c(t()):f(r.value))}}}var G=c,V=f,$=function(n,t){return i(n,J(t))},J=function(n){return function(t){return Y(t)?t:V(n(t.right))}},K={URI:"Either",map:$},X={URI:"Either",map:$,ap:function(n,t){return i(n,function(n){return function(t){return Y(t)?t:Y(n)?n:V(t.right(n.right))}}(t))}},Z=function(n){return function(t){return Y(t)?G(n(t.left)):t}},Q=B({URI:"Either",fromEither:r}),Y=function(n){return"Left"===n._tag},nn=function(n,t){return function(r){return Y(r)?n(r.left):t(r.right)}},tn=o,rn=function(n){return{_tag:"Some",value:n}},en=function(n){return{concat:function(t,r){return on(t)?r:on(r)?t:rn(n.concat(t.value,r.value))},empty:tn}},un=function(n){return function(t){return on(t)?tn:rn(n(t.value))}},on=function(n){return"None"===n._tag},cn=function(n,t){return function(r){return on(r)?n():t(r.value)}},fn=cn,an=function(n){return null==n?tn:rn(n)};function sn(n){return function(t){return n.map(t,V)}}function vn(n){return function(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}(n,K)}function dn(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,X)}function ln(n){return function(t){return function(r){return n.chain(r,(function(r){return Y(r)?n.of(r):t(r.right)}))}}}function pn(n){return function(t){return function(r){return n.map(r,Z(t))}}}function hn(n,t){return function(r){var u=e(r,n.fromTask);return function(n){return t.chain(n,u)}}}var mn=function(n){return function(){return Promise.resolve().then(n)}},bn=function(n,t){return i(n,wn(t))},yn=function(n,t){return i(n,gn(t))},wn=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},gn=function(n){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},In=function(n){return function(){return Promise.resolve(n)}},On={URI:"Task",map:bn},jn={URI:"Task",map:bn,ap:yn},Rn={URI:"Task",map:bn,of:In,ap:yn,chain:function(n,t){return i(n,function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}}(t))}},_n=sn(On),Un=e(mn,_n),Mn=_n,xn=In,En=vn(On),An=pn(On),Tn=dn(jn),Wn=ln(Rn),Pn=Wn,Sn="TaskEither",kn={URI:Sn,map:function(n,t){return i(n,En(t))},ap:function(n,t){return i(n,Tn(t))},chain:function(n,t){return i(n,Wn(t))}},Nn=B({URI:Sn,fromEither:xn}),Cn=hn({URI:Sn,fromIO:Un,fromTask:Mn},kn),qn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactableComposition=t.separate=t.compact=void 0;var i=u(P);function o(n,t){return function(r){return n.map(r,t.compact)}}function c(n,t,r){var e=o(n,t),u=(0,R.map)(n,r);return function(n){return i.separated(e((0,I.pipe)(n,u(N.getLeft))),e((0,I.pipe)(n,u(N.getRight))))}}t.compact=o,t.separate=c,t.getCompactableComposition=function(n,t){return{map:(0,R.getFunctorComposition)(n,t).map,compact:o(n,t),separate:c(n,t,t)}}})),zn=g((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}})),Dn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O);t.left=i.left,t.right=i.right;var o=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},f=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},a=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},s=function(n){return function(r,e){var u=(0,t.foldMap)(n);return(0,I.pipe)(r,u(e))}},v=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},d=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},l=function(n,r,e){return(0,I.pipe)(n,(0,t.bimap)(r,e))},p=function(n,r){return(0,I.pipe)(n,(0,t.mapLeft)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},m=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},b=function(n,r){return(0,zn.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,u){return e===u||((0,t.isLeft)(e)?(0,t.isLeft)(u)&&n.equals(e.left,u.left):(0,t.isRight)(u)&&r.equals(e.right,u.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,P.separated)(n,n):(0,t.isLeft)(n.right)?(0,P.separated)((0,t.right)(n.right.left),r):(0,P.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:o,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 u=e(n.right);return"None"===u._tag?r:(0,t.right)(u.value)},partition:function(n,e){return(0,t.isLeft)(n)?(0,P.separated)(n,n):e(n.right)?(0,P.separated)(r,(0,t.right)(n.right)):(0,P.separated)((0,t.right)(n.right),r)},partitionMap:function(n,e){if((0,t.isLeft)(n))return(0,P.separated)(n,n);var u=e(n.right);return(0,t.isLeft)(u)?(0,P.separated)((0,t.right)(u.left),r):(0,P.separated)(r,(0,t.right)(u.right))}}},t.getWitherable=function(n){var r=(0,t.getFilterable)(n),e=(0,t.getCompactable)(n);return{URI:t.URI,_E:void 0,map:o,compact:r.compact,separate:r.separate,filter:r.filter,filterMap:r.filterMap,partition:r.partition,partitionMap:r.partitionMap,traverse:d,sequence:t.sequence,reduce:a,foldMap:s,reduceRight:v,wither:(0,S.witherDefault)(t.Traversable,e),wilt:(0,S.wiltDefault)(t.Traversable,e)}},t.getApplicativeValidation=function(n){return{URI:t.URI,_E:void 0,map:o,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:o,alt:function(r,e){if((0,t.isRight)(r))return r;var u=e();return(0,t.isLeft)(u)?(0,t.left)(n.concat(r.left,u.left)):u}}},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:o},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:o,ap:c},t.Applicative={URI:t.URI,map:o,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:o,ap:c,chain:f},t.Monad={URI:t.URI,map:o,ap:c,of:t.of,chain:f},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:a,foldMap:s,reduceRight:v},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:o,reduce:a,foldMap:s,reduceRight:v,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:l,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:o,alt:h},t.extend=function(n){return function(r){return(0,t.isLeft)(r)?r:(0,t.right)(n(r))}},t.Extend={URI:t.URI,map:o,extend:m},t.ChainRec={URI:t.URI,map:o,ap:c,chain:f,chainRec:b},t.throwError=t.left,t.MonadThrow={URI:t.URI,map:o,ap:c,of:t.of,chain:f,throwError:t.throwError},t.FromEither={URI:t.URI,fromEither:I.identity},t.fromPredicate=(0,M.fromPredicate)(t.FromEither),t.fromOption=(0,M.fromOption)(t.FromEither),t.isLeft=i.isLeft,t.isRight=i.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,R.flap)(t.Functor),t.apFirst=(0,j.apFirst)(t.Apply),t.apFirstW=t.apFirst,t.apSecond=(0,j.apSecond)(t.Apply),t.apSecondW=t.apSecond,t.chainFirst=(0,U.chainFirst)(t.Chain),t.chainFirstW=t.chainFirst,t.flattenW=(0,t.chainW)(I.identity),t.flatten=t.flattenW,t.duplicate=(0,t.extend)(I.identity),t.fromOptionK=(0,M.fromOptionK)(t.FromEither),t.chainOptionK=(0,M.chainOptionK)(t.FromEither,t.Chain),t.filterOrElse=(0,M.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=[],u=0;u<arguments.length;u++)e[u]=arguments[u];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,I.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)(I.identity,I.identity),t.toError=function(n){return n instanceof Error?n:new Error(String(n))},t.elem=function n(r){return function(e,u){if(void 0===u){var i=n(r);return function(n){return i(e,n)}}return!(0,t.isLeft)(u)&&r.equals(e,u.right)}},t.exists=function(n){return function(r){return!(0,t.isLeft)(r)&&n(r.right)}},t.Do=(0,t.of)(i.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.bindW=t.bind,t.apS=(0,j.apS)(t.Apply),t.apSW=t.apS,t.ApT=(0,t.of)(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,i.head(r));if((0,t.isLeft)(e))return e;for(var u=[e.right],o=1;o<r.length;o++){var c=n(o,r[o]);if((0,t.isLeft)(c))return c;u.push(c.right)}return(0,t.right)(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return i.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)(I.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:o,of:t.of,ap:c,chain:f,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,bimap:l,mapLeft:p,alt:h,extend:m,chainRec:b,throwError:t.throwError},t.getApplySemigroup=(0,j.getApplySemigroup)(t.Apply),t.getApplyMonoid=(0,_.getApplicativeMonoid)(t.Applicative),t.getValidationSemigroup=function(n,r){return(0,j.getApplySemigroup)((0,t.getApplicativeValidation)(n))(r)},t.getValidationMonoid=function(n,r){return(0,_.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:o,of:t.of,chain:f,bimap:l,mapLeft:p,reduce:a,foldMap:s,reduceRight:v,extend:m,traverse:d,sequence:t.sequence,chainRec:b,throwError:t.throwError,ap:r,alt:e}}})),Fn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(Dn);function o(n){return(0,I.flow)(i.right,n.of)}function c(n){return(0,I.flow)(i.left,n.of)}function f(n){return function(t){return n.map(t,i.right)}}function a(n){return function(t){return n.map(t,i.left)}}function s(n){return function(t){return(0,I.flow)(i.fromNullable(t),n.of)}}function v(n){var t=s(n);return function(n){var r=t(n);return function(n){return(0,I.flow)(n,r)}}}function d(n){return(0,R.map)(n,i.Functor)}function l(n){return(0,j.ap)(n,i.Apply)}function p(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?n.of(r):t(r.right)}))}}}function h(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?t():n.of(r)}))}}}function m(n){return function(t,r){return function(e){return n.map(e,i.bimap(t,r))}}}function b(n){return function(t){return function(r){return n.map(r,i.mapLeft(t))}}}function y(n){return function(t,r){return function(e){return n.chain(e,i.match(t,r))}}}function g(n){return function(t){return function(r){return n.chain(r,i.match(t,n.of))}}}function O(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?t(r.left):n.of(r)}))}}}function _(n){return function(t){return n.map(t,i.swap)}}t.right=o,t.left=c,t.rightF=f,t.leftF=a,t.fromNullable=s,t.fromNullableK=v,t.chainNullableK=function(n){var t=p(n),r=v(n);return function(n){var e=r(n);return function(n){return t(e(n))}}},t.map=d,t.ap=l,t.chain=p,t.alt=h,t.bimap=m,t.mapLeft=b,t.altValidation=function(n,t){return function(r){return function(e){return n.chain(e,i.match((function(e){return n.map(r(),i.mapLeft((function(n){return t.concat(e,n)})))}),o(n)))}}},t.match=function(n){return function(t,r){return function(e){return n.map(e,i.match(t,r))}}},t.matchE=y,t.getOrElse=g,t.orElse=O,t.orElseFirst=function(n){var t=O(n);return function(r){return t((function(t){return n.map(r(t),(function(n){return i.isLeft(n)?n:i.left(t)}))}))}},t.orLeft=function(n){return function(t){return function(r){return n.chain(r,i.match((function(r){return n.map(t(r),i.left)}),(function(t){return n.of(i.right(t))})))}}},t.swap=_,t.toUnion=function(n){return function(t){return n.map(t,i.toUnion)}},t.getEitherM=function(n){var t=l(n),r=d(n),e=p(n),u=h(n),i=m(n),s=b(n),v=y(n),w=g(n),j=O(n);return{map:function(n,t){return(0,I.pipe)(n,r(t))},ap:function(n,r){return(0,I.pipe)(n,t(r))},of:o(n),chain:function(n,t){return(0,I.pipe)(n,e(t))},alt:function(n,t){return(0,I.pipe)(n,u(t))},bimap:function(n,t,r){return(0,I.pipe)(n,i(t,r))},mapLeft:function(n,t){return(0,I.pipe)(n,s(t))},fold:function(n,t,r){return(0,I.pipe)(n,v(t,r))},getOrElse:function(n,t){return(0,I.pipe)(n,w(t))},orElse:function(n,t){return(0,I.pipe)(n,j(t))},swap:_(n),rightM:f(n),leftM:a(n),left:c(n)}}})),Ln=g((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 u(n,t){var e=r(n,t);return function(n){var t=e((0,x.not)(n)),r=e(n);return function(n){return(0,P.separated)(t(n),r(n))}}}function i(n,t){var r=e(n,t);return function(n){return function(t){return(0,P.separated)((0,I.pipe)(t,r((function(t){return(0,N.getLeft)(n(t))}))),(0,I.pipe)(t,r((function(t){return(0,N.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=u,t.partitionMap=i,t.getFilterableComposition=function(n,t){var o=(0,R.getFunctorComposition)(n,t).map,c=(0,qn.compact)(n,t),f=(0,qn.separate)(n,t,t),a=r(n,t),s=e(n,t),v=u(n,t),d=i(n,t);return{map:o,compact:c,separate:f,filter:function(n,t){return(0,I.pipe)(n,a(t))},filterMap:function(n,t){return(0,I.pipe)(n,s(t))},partition:function(n,t){return(0,I.pipe)(n,v(t))},partitionMap:function(n,t){return(0,I.pipe)(n,d(t))}}}})),Hn=g((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,I.flow)(t,n.fromIO)}},t.chainIOK=function(n,t){return function(r){var e=(0,I.flow)(r,n.fromIO);return function(n){return t.chain(n,e)}}},t.chainFirstIOK=function(n,t){var r=(0,U.chainFirst)(t);return function(t){return r((0,I.flow)(t,n.fromIO))}}})),Bn=g((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,I.flow)(t,n.fromTask)}},t.chainTaskK=function(n,t){return function(r){var e=(0,I.flow)(r,n.fromTask);return function(n){return t.chain(n,e)}}},t.chainFirstTaskK=function(n,t){var r=(0,U.chainFirst)(t);return function(t){return r((0,I.flow)(t,n.fromTask))}}})),Gn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O);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 o=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},f=function(n,r){return(0,I.pipe)(n,(0,t.chain)((function(n){return(0,I.pipe)(r,(0,t.map)(n))})))},a=function(n,r){return(0,I.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)(I.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:o},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:o,ap:c},t.apFirst=(0,j.apFirst)(t.ApplyPar),t.apSecond=(0,j.apSecond)(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:o,ap:c,of:t.of},t.ApplySeq={URI:t.URI,map:o,ap:f},t.ApplicativeSeq={URI:t.URI,map:o,ap:f,of:t.of},t.Chain={URI:t.URI,map:o,ap:c,chain:a},t.Monad={URI:t.URI,map:o,of:t.of,ap:c,chain:a},t.MonadIO={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO},t.fromTask=I.identity,t.MonadTask={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.chainFirst=(0,U.chainFirst)(t.Chain),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=(0,Hn.fromIOK)(t.FromIO),t.chainIOK=(0,Hn.chainIOK)(t.FromIO,t.Chain),t.chainFirstIOK=(0,Hn.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)(i.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.ApplyPar),t.ApT=(0,t.of)(i.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 i.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return i.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,i.head(t))).then(i.singleton))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return i.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)(I.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return(0,t.traverseReadonlyArrayWithIndexSeq)((function(t,r){return n(r)}))},t.sequenceSeqArray=(0,t.traverseSeqArray)(I.identity),t.task={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.taskSeq={URI:t.URI,map:o,of:t.of,ap:f,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.getSemigroup=(0,j.getApplySemigroup)(t.ApplySeq),t.getMonoid=(0,_.getApplicativeMonoid)(t.ApplicativeSeq)})),Vn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},o=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,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=u(Dn),f=u(Fn),a=u(O),s=u(Gn);t.left=f.left(s.Pointed),t.right=f.right(s.Pointed),t.rightTask=f.rightF(s.Functor),t.leftTask=f.leftF(s.Functor),t.rightIO=(0,I.flow)(s.fromIO,t.rightTask),t.leftIO=(0,I.flow)(s.fromIO,t.leftTask),t.fromIO=t.rightIO,t.fromTask=t.rightTask,t.fromEither=s.of,t.fromIOEither=s.fromIO,t.fromTaskOption=function(n){return s.map(c.fromOption(n))},t.match=f.match(s.Functor),t.matchW=t.match,t.matchE=f.matchE(s.Monad),t.fold=t.matchE,t.matchEW=t.matchE,t.foldW=t.matchEW,t.getOrElse=f.getOrElse(s.Monad),t.getOrElseW=t.getOrElse,t.tryCatch=function(n,t){return function(){return i(void 0,void 0,void 0,(function(){var r;return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,n().then(a.right)];case 1:return[2,e.sent()];case 2:return r=e.sent(),[2,a.left(t(r))];case 3:return[2]}}))}))}},t.tryCatchK=function(n,r){return function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];return(0,t.tryCatch)((function(){return n.apply(void 0,e)}),r)}},t.toUnion=f.toUnion(s.Functor),t.fromNullable=f.fromNullable(s.Pointed),t.fromNullableK=f.fromNullableK(s.Pointed),t.chainNullableK=f.chainNullableK(s.Monad),t.orElse=f.orElse(s.Monad),t.orElseW=t.orElse,t.orElseFirst=f.orElseFirst(s.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=f.orLeft(s.Monad),t.swap=f.swap(s.Functor),t.fromTaskOptionK=function(n){var r=(0,t.fromTaskOption)(n);return function(n){return(0,I.flow)(n,r)}},t.chainTaskOptionKW=function(n){return function(r){return function(e){return(0,I.pipe)(e,(0,t.chain)((0,t.fromTaskOptionK)(n)(r)))}}},t.chainTaskOptionK=t.chainTaskOptionKW,t.fromIOEitherK=function(n){return(0,I.flow)(n,t.fromIOEither)},t.chainIOEitherKW=function(n){return(0,t.chainW)((0,t.fromIOEitherK)(n))},t.chainIOEitherK=t.chainIOEitherKW;var v=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},l=function(n,r){return(0,I.pipe)(n,(0,t.chain)((function(n){return(0,I.pipe)(r,(0,t.map)(n))})))},p=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},h=function(n,r,e){return(0,I.pipe)(n,(0,t.bimap)(r,e))},m=function(n,r){return(0,I.pipe)(n,(0,t.mapLeft)(r))},b=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))};function y(n,r){var e=(0,j.ap)(n,c.getApplicativeValidation(r));return{URI:t.URI,_E:void 0,map:v,ap:function(n,t){return(0,I.pipe)(n,e(t))},of:t.of}}function g(n){var r=f.altValidation(s.Monad,n);return{URI:t.URI,_E:void 0,map:v,alt:function(n,t){return(0,I.pipe)(n,r(t))}}}t.map=f.map(s.Functor),t.bimap=f.bimap(s.Functor),t.mapLeft=f.mapLeft(s.Functor),t.ap=f.ap(s.ApplyPar),t.apW=t.ap,t.chain=f.chain(s.Monad),t.chainW=t.chain,t.flattenW=(0,t.chainW)(I.identity),t.flatten=t.flattenW,t.alt=f.alt(s.Monad),t.altW=t.alt,t.of=t.right,t.throwError=t.left,t.URI="TaskEither",t.getApplicativeTaskValidation=y,t.getAltTaskValidation=g,t.getCompactable=function(n){var r=c.getCompactable(n);return{URI:t.URI,_E:void 0,compact:(0,qn.compact)(s.Functor,r),separate:(0,qn.separate)(s.Functor,r,c.Functor)}},t.getFilterable=function(n){var r=c.getFilterable(n),e=(0,t.getCompactable)(n),u=(0,Ln.filter)(s.Functor,r),i=(0,Ln.filterMap)(s.Functor,r),o=(0,Ln.partition)(s.Functor,r),f=(0,Ln.partitionMap)(s.Functor,r);return{URI:t.URI,_E:void 0,map:v,compact:e.compact,separate:e.separate,filter:function(n,t){return(0,I.pipe)(n,u(t))},filterMap:function(n,t){return(0,I.pipe)(n,i(t))},partition:function(n,t){return(0,I.pipe)(n,o(t))},partitionMap:function(n,t){return(0,I.pipe)(n,f(t))}}},t.Functor={URI:t.URI,map:v},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:v,ap:d},t.apFirst=(0,j.apFirst)(t.ApplyPar),t.apFirstW=t.apFirst,t.apSecond=(0,j.apSecond)(t.ApplyPar),t.apSecondW=t.apSecond,t.ApplicativePar={URI:t.URI,map:v,ap:d,of:t.of},t.ApplySeq={URI:t.URI,map:v,ap:l},t.ApplicativeSeq={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:d,chain:p},t.Monad={URI:t.URI,map:v,ap:d,chain:p,of:t.of},t.MonadIO={URI:t.URI,map:v,ap:d,chain:p,of:t.of,fromIO:t.fromIO},t.MonadTask={URI:t.URI,map:v,ap:d,chain:p,of:t.of,fromIO:t.fromIO,fromTask:t.fromTask},t.MonadThrow={URI:t.URI,map:v,ap:d,chain:p,of:t.of,throwError:t.throwError},t.chainFirst=(0,U.chainFirst)(t.Chain),t.chainFirstW=t.chainFirst,t.Bifunctor={URI:t.URI,bimap:h,mapLeft:m},t.Alt={URI:t.URI,map:v,alt:b},t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromOption=(0,M.fromOption)(t.FromEither),t.fromOptionK=(0,M.fromOptionK)(t.FromEither),t.chainOptionK=(0,M.chainOptionK)(t.FromEither,t.Chain),t.chainEitherK=(0,M.chainEitherK)(t.FromEither,t.Chain),t.chainEitherKW=t.chainEitherK,t.chainFirstEitherK=(0,M.chainFirstEitherK)(t.FromEither,t.Chain),t.chainFirstEitherKW=t.chainFirstEitherK,t.fromPredicate=(0,M.fromPredicate)(t.FromEither),t.filterOrElse=(0,M.filterOrElse)(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.fromEitherK=(0,M.fromEitherK)(t.FromEither),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=(0,Hn.fromIOK)(t.FromIO),t.chainIOK=(0,Hn.chainIOK)(t.FromIO,t.Chain),t.chainFirstIOK=(0,Hn.chainFirstIOK)(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.fromTaskK=(0,Bn.fromTaskK)(t.FromTask),t.chainTaskK=(0,Bn.chainTaskK)(t.FromTask,t.Chain),t.chainFirstTaskK=(0,Bn.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?a.left(n):a.right(t))})))}))}}},t.bracket=function(n,r,e){return(0,t.bracketW)(n,r,e)},t.bracketW=function(n,r,e){return(0,I.pipe)(n,(0,t.chainW)((function(n){return(0,I.pipe)(r(n),s.chain((function(r){return(0,I.pipe)(e(n,r),(0,t.chainW)((function(){return s.of(r)})))})))})))},t.Do=(0,t.of)(a.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.bindW=t.bind,t.apS=(0,j.apS)(t.ApplyPar),t.apSW=t.apS,t.ApT=(0,t.of)(a.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return(0,I.flow)(s.traverseReadonlyNonEmptyArrayWithIndex(n),s.map(c.traverseReadonlyNonEmptyArrayWithIndex(I.SK)))},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return a.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return a.tail(t).reduce((function(t,r,e){return t.then((function(u){return a.isLeft(u)?t:n(e+1,r)().then((function(n){return a.isLeft(n)?n:(u.right.push(n.right),u)}))}))}),n(0,a.head(t))().then(c.map(a.singleton)))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return a.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)(I.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return(0,t.traverseReadonlyArrayWithIndexSeq)((function(t,r){return n(r)}))},t.sequenceSeqArray=(0,t.traverseSeqArray)(I.identity),t.taskEither={URI:t.URI,bimap:h,mapLeft:m,map:v,of:t.of,ap:d,chain:p,alt:b,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.taskEitherSeq={URI:t.URI,bimap:h,mapLeft:m,map:v,of:t.of,ap:l,chain:p,alt:b,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.getApplySemigroup=(0,j.getApplySemigroup)(t.ApplySeq),t.getApplyMonoid=(0,_.getApplicativeMonoid)(t.ApplicativeSeq),t.getSemigroup=function(n){return(0,j.getApplySemigroup)(s.ApplySeq)(c.getSemigroup(n))},t.getTaskValidation=function(n){var r=y(s.ApplicativePar,n),e=g(n);return{URI:t.URI,_E:void 0,map:v,ap:r.ap,of:t.of,chain:p,bimap:h,mapLeft:m,alt:e.alt,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError}}})),$n=function(n){return 0===n.length};const{state:Jn}=z(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0})),Kn=n=>({kind:"server",inner:n}),Xn={kind:"client",inner:"Token not exist or empty"},Zn={kind:"client",inner:"Api path empty or missing"},Qn=en({concat:function(n,t){return n+t},empty:""}),Yn=()=>i(en({concat:r}).concat(an(Jn.apiPath),an("https://api.vviinn.com")),Q((()=>Zn))),nt=s({method:{concat:(n,t)=>{return i(Qn.concat(an(n),an(t)),(r=()=>"GET",function(n){return on(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}}}),tt=n=>({method:n}),rt=V(tt("GET")),et=V(tt("POST")),ut=n=>n.status>=200&&n.status<300?Vn.right(n):Vn.left(n),it=nt,ot=(n,t)=>([r,e])=>{const u=new URL(n,r),i=it.concat(e,t);return I.pipe(((n,t={})=>I.pipe(((n,t={method:"GET"})=>Vn.tryCatch((()=>fetch(n,t)),(n=>n)))(n,t),Vn.chain(ut),Vn.chain((n=>function(n){return Vn.fromTask((()=>n.json()))}(n)))))(u.toString(),i),Vn.mapLeft(Kn))},ct=n=>(n=>0===n.length)(n)?G("entity is empty"):V(n),ft=n=>{return i(n,("entity not exist",function(n){return null==n?G("entity not exist"):V(n)}),(t=ct,function(n){return Y(n)?n:t(n.right)}));var t},at=n=>new Headers({Authorization:`Bearer ${n}`}),st=n=>i(n,ft,Dn.mapLeft((()=>Xn))),vt=n=>i(n,st,Dn.map(at)),dt=j.sequenceT(Dn.Apply),lt={equals:(n,t)=>n.class===t.class&&n.score===t.score&&n.rectangle.left===t.rectangle.left&&n.rectangle.top===t.rectangle.top&&n.rectangle.height===t.rectangle.height&&n.rectangle.width===t.rectangle.width};var pt;!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"}(pt||(pt={}));const ht=n=>{switch(n.type){case"array":return n.value.map(ht);default:return n.value}},mt=n=>t=>i(dt(Yn(),V(tt(n.method))),xn,Pn(ot(n.href,t))),bt=(n,t)=>{const r=l(n),e=m.concat(r,t);return Object.assign(Object.assign({},e),{width:n.width,height:n.height})},yt=(n,t)=>{switch(t.direction){case b.NorthEast:return((n,t)=>{const r=m.concat(l(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 b.NorthWest:return((n,t)=>{const r=m.concat(l(n),t.position);return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height-t.position.y})})(n,t);case b.SouthEast:return((n,t)=>Object.assign(Object.assign({},n),{width:n.width+t.position.x,height:n.height+t.position.y}))(n,t);case b.SouthWest:return((n,t)=>{const r=m.concat(l(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)}},wt=n=>({x:0,y:0,width:n.width,height:n.height}),gt=n=>Object.assign({x:n.left,y:n.top},n),It=n=>t=>({x:t.x*n.width,y:t.y*n.height,width:t.width*n.width,height:t.height*n.height}),Ot=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var jt;!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"}(jt||(jt={}));const Rt=(n,t)=>{const r=new URLSearchParams(Object.entries(t));return[`${n.href}?${r.toString()}`,{method:"GET"}]},_t=(n,t)=>[n.href,{body:JSON.stringify(t),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],Ut=(n,t={})=>r=>I.pipe(dt(Yn(),I.pipe(((n,t)=>I.pipe(((n,t)=>{const r=n.map((n=>n.name)),e=Object.keys(t),u=r.filter((n=>!e.includes(n)));return 0===u.length?V(t):G(`Data should contains fields: ${u.join(", ")}`)})(n.value,t),J((t=>n.rel.includes("query-form")?Rt(n,t):_t(n,t)))))(n,t),Z((n=>({kind:"app",inner:n}))))),xn,Pn((n=>{const t=n[0],[e,u]=n[1];return ot(e,u)([t,r])}))),Mt=async n=>new Promise((t=>{const r=new FileReader;r.addEventListener("load",(()=>{t(r.result)})),r.readAsDataURL(n)})),xt=j.sequenceT(N.Apply),Et=n=>n.length>0?N.some(n):N.none;const At=["jpg","jpeg","png","webp"],Tt={kind:"client",inner:"File format not supported"},Wt=n=>{const t=n.type.split("/")[1],r=(e=r=>r===t?N.some(n):N.none,function(n){for(var t=0;t<n.length;t++){var r=e(n[t]);if("Some"===r._tag)return r}return o})(At);var e;return I.pipe(r,Dn.fromOption((()=>Tt)))},Pt={kind:"app",inner:"File doesnt exist"},St=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 kt=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.copy=void 0,t.copy=(n,t,r=0,e=0,u=n.width-r,i=n.height-e,o=0,c=0)=>{if(r|=0,e|=0,i|=0,o|=0,c|=0,(u|=0)<=0||i<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(t.data.buffer);for(let s=0;s<i;s++){const i=e+s;if(i<0||i>=n.height)continue;const v=c+s;if(!(v<0||v>=t.height))for(let e=0;e<u;e++){const u=r+e;if(u<0||u>=n.width)continue;const c=o+e;c<0||c>=t.width||(a[v*t.width+c]=f[i*n.width+u])}}}})),Nt=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CreateImageFactory=(n=[0,0,0,0],t=4)=>{if(t=Math.floor(t),isNaN(t)||t<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<t)throw TypeError(`fill should be iterable with at least ${t} members`);const r=(n=new Uint8ClampedArray(n).slice(0,t)).every((n=>0===n));return(e,u,i)=>{if(void 0===e||void 0===u)throw TypeError("Not enough arguments");if(e=Math.floor(e),u=Math.floor(u),isNaN(e)||e<1||isNaN(u)||u<1)throw TypeError("Index or size is negative or greater than the allowed amount");const o=e*u*t;if(void 0===i&&(i=new Uint8ClampedArray(o)),i instanceof Uint8ClampedArray){if(i.length!==o)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let r=0;r<u;r++)for(let u=0;u<e;u++){const o=(r*e+u)*t;for(let r=0;r<t;r++)i[o+r]=n[r]}return{get width(){return e},get height(){return u},get data(){return i}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory()})),Ct=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;const r=(n,t)=>{if(n<=-t||n>=t)return 0;if(0==n)return 0;const r=n*Math.PI;return Math.sin(r)/r*Math.sin(r/t)/(r/t)},e=n=>Math.round(16383*n);t.filters=(n,t,u,i,o)=>{const c=o?2:3,f=1/u,a=Math.min(1,u),s=c/a,v=Math.floor(2*(s+1)),d=new Int16Array((v+2)*t);let l=0;for(let u=0;u<t;u++){const o=(u+.5)*f+i,v=Math.max(0,Math.floor(o-s)),p=Math.min(n-1,Math.ceil(o+s)),h=p-v+1,m=new Float32Array(h),b=new Int16Array(h);let y=0,w=0;for(let n=v;n<=p;n++){const t=r((n+.5-o)*a,c);y+=t,m[w]=t,w++}let g=0;for(let n=0;n<m.length;n++){const t=m[n]/y;g+=t,b[n]=e(t)}b[t>>1]+=e(1-g);let I=0;for(;I<b.length&&0===b[I];)I++;let O=b.length-1;for(;O>0&&0===b[O];)O--;const j=O-I+1;d[l++]=v+I,d[l++]=j,d.set(b.subarray(I,O+1),l),l+=j}return d}})),qt=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convolve=void 0,t.convolve=(n,t,r,e,u,i)=>{let o=0,c=0;for(let f=0;f<e;f++){let a=0;for(let r=0;r<u;r++){let r=o+4*i[a++]|0,u=0,f=0,s=0,v=0;for(let t=i[a++];t>0;t--){const t=i[a++];u=u+t*n[r]|0,f=f+t*n[r+1]|0,s=s+t*n[r+2]|0,v=v+t*n[r+3]|0,r=r+4|0}t[c]=u+8192>>14,t[c+1]=f+8192>>14,t[c+2]=s+8192>>14,t[c+3]=v+8192>>14,c=c+4*e|0}c=4*(f+1)|0,o=(f+1)*r*4|0}}})),zt=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.lanczos2=t.lanczos=void 0;const r=(n,t,r=!1)=>{const e=t.height/n.height,u=Ct.filters(n.width,t.width,t.width/n.width,0,r),i=Ct.filters(n.height,t.height,e,0,r),o=new Uint8ClampedArray(t.width*n.height*4);qt.convolve(n.data,o,n.width,n.height,t.width,u),qt.convolve(o,t.data,n.height,t.width,t.height,i)};t.lanczos=(n,t,e=0,u=0,i=n.width-e,o=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,o|=0,c|=0,f|=0,a|=0,s|=0,(i|=0)<=0||o<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&i===n.width&&o===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t);const v=Nt.createImage(i,o),d=Nt.createImage(a,s);kt.copy(n,v,e,u),r(v,d),kt.copy(d,t,0,0,d.width,d.height,c,f)},t.lanczos2=(n,t,e=0,u=0,i=n.width-e,o=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,o|=0,c|=0,f|=0,a|=0,s|=0,(i|=0)<=0||o<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&i===n.width&&o===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t,!0);const v=Nt.createImage(i,o),d=Nt.createImage(a,s);kt.copy(n,v,e,u),r(v,d,!0),kt.copy(d,t,0,0,d.width,d.height,c,f)}})),Dt=g((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}}})),Ft=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,u=0,i=t.length;u<i;u++)!e&&u in t||(e||(e=Array.prototype.slice.call(t,0,u)),e[u]=t[u]);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 o=u(O),c=u(W);function f(n){return function(t){return t.concat(n)}}function a(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function s(n){return function(r){var e=r.length;if(0===e)return t.empty;for(var u=[],i=r[0],o=[i],c=1;c<e;c++){var f=r[c];n.equals(f,i)?o.push(f):(u.push(o),o=[i=f])}return u.push(o),u}}t.empty=o.emptyReadonlyArray,t.isNonEmpty=o.isNonEmpty,t.isOutOfBound=function(n,t){return n<0||n>=t.length},t.prependW=function(n){return function(t){return i([n],t,!0)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return i(i([],t,!0),[n],!1)}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if((0,t.isNonEmpty)(e)){var u=o.fromReadonlyNonEmptyArray(e);return u.splice(n,0,r),u}return[r]},t.unsafeUpdateAt=function(n,t,r){if(r[n]===t)return r;var e=o.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)],u=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},i=0,o=(0,t.tail)(r);i<o.length;i++)u(o[i]);return e}},t.sortBy=function(n){if((0,t.isNonEmpty)(n)){var r=(0,T.getMonoid)();return(0,t.sort)(n.reduce(r.concat,r.empty))}return I.identity},t.union=function(n){var r=(0,t.uniq)(n);return function(n){return function(t){return r((0,I.pipe)(t,a(n)))}}},t.rotate=function(n){return function(r){var e=r.length,u=Math.round(n)%e;if((0,t.isOutOfBound)(Math.abs(u),r)||0===u)return r;if(u<0){var i=(0,t.splitAt)(-u)(r);return(0,I.pipe)(i[1],a(i[0]))}return(0,t.rotate)(u-e)(r)}},t.fromReadonlyArray=function(n){return(0,t.isNonEmpty)(n)?o.some(n):o.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],u=1;u<r;u++)e.push(n(u));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=f,t.concat=a,t.reverse=function(n){return 1===n.length?n:i([(0,t.last)(n)],n.slice(0,-1).reverse(),!0)},t.group=s,t.groupBy=function(n){return function(t){for(var r={},e=0,u=t;e<u.length;e++){var i=u[e],c=n(i);o.has.call(r,c)?r[c].push(i):r[c]=[i]}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)?o.none:o.some((0,t.unsafeUpdateAt)(n,r(e[n]),e))}},t.zipWith=function(n,t,r){for(var e=[r(n[0],t[0])],u=Math.min(n.length,t.length),i=1;i<u;i++)e[i]=r(n[i],t[i]);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,I.pipe)(e,(0,t.prependAll)(n),(0,t.prepend)((0,t.head)(r))):r}},t.chainWithIndex=function(n){return function(r){for(var e=o.fromReadonlyNonEmptyArray(n(0,(0,t.head)(r))),u=1;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.chop=function(n){return function(r){for(var e=n(r),u=[e[0]],i=e[1];(0,t.isNonEmpty)(i);){var o=n(i),c=o[1];u.push(o[0]),i=c}return u}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[r,t.empty]:[(0,I.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 v=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,I.pipe)(n,(0,t.mapWithIndex)(r))},l=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},p=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},m=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},b=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},y=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},g=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},_=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},M=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceWithIndex)(r,e))},x=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},E=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},P=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}};t.of=o.singleton,t.altW=function(n){return function(t){return(0,I.pipe)(t,f(n()))}},t.alt=t.altW,t.ap=function(n){return(0,t.chain)((function(r){return(0,I.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),u=[n(r)];(0,t.isNonEmpty)(e);)u.push(n(e)),e=(0,t.tail)(e);return u}},t.duplicate=(0,t.extend)(I.identity),t.flatten=(0,t.chain)(I.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))],u=1;u<r.length;u++)e.push(n(u,r[u]));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,u){return n.concat(r,t(u+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)(I.SK)},t.traverseWithIndex=function(n){return function(r){return function(e){for(var u=n.map(r(0,(0,t.head)(e)),t.of),i=1;i<e.length;i++)u=n.ap(n.map(u,(function(n){return function(r){return(0,I.pipe)(n,(0,t.append)(r))}})),r(i,e[i]));return u}}},t.extract=o.head,t.URI="ReadonlyNonEmptyArray",t.getShow=function(n){return{show:function(t){return"[".concat(t.map(n.show).join(", "),"]")}}},t.getSemigroup=function(){return{concat:a}},t.getEq=function(n){return(0,A.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:v},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:v,mapWithIndex:d},t.Apply={URI:t.URI,map:v,ap:l},t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.apSecond)(t.Apply),t.Applicative={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:l,chain:p},t.chainFirst=(0,U.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:v,ap:l,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:b,reduceRight:y},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:b,reduceRight:y,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:v,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:v,mapWithIndex:d,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:P},t.Alt={URI:t.URI,map:v,alt:_},t.Comonad={URI:t.URI,map:v,extend:h,extract:t.extract},t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.Apply),t.head=t.extract,t.tail=o.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 i([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,I.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,I.flow)((0,t.intersperse)(n),r)}},t.groupSort=function(n){var r=(0,t.sort)(n),e=s(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,I.pipe)(r,(0,t.prepend)(n))},t.snoc=function(n,t){return(0,I.pipe)(n,a([t]))},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.prependToAll=t.prependAll,t.fold=t.concatAll,t.readonlyNonEmptyArray={URI:t.URI,of:t.of,map:v,mapWithIndex:d,ap:l,chain:p,extend:h,extract:t.extract,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:P,alt:_}})),Lt=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,u=0,i=t.length;u<i;u++)!e&&u in t||(e||(e=Array.prototype.slice.call(t,0,u)),e[u]=t[u]);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 o=u(O),c=u(Ft);function f(n){return function(t){return t.concat(n)}}function a(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function s(n){return function(t){var r=t.length;if(0===r)return[];for(var e=[],u=t[0],i=[u],o=1;o<r;o++){var c=t[o];n.equals(c,u)?i.push(c):(e.push(i),i=[u=c])}return e.push(i),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 i([n],t,!0)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return i(i([],t,!0),[n],!1)}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if((0,t.isNonEmpty)(e)){var u=(0,t.fromReadonlyNonEmptyArray)(e);return u.splice(n,0,r),u}return[r]},t.unsafeUpdateAt=function(n,r,e){var u=(0,t.fromReadonlyNonEmptyArray)(e);return u[n]=r,u},t.uniq=function(n){return function(r){if(1===r.length)return(0,t.copy)(r);for(var e=[(0,t.head)(r)],u=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},i=0,o=(0,t.tail)(r);i<o.length;i++)u(o[i]);return e}},t.sortBy=function(n){if((0,t.isNonEmpty)(n)){var r=(0,T.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,I.pipe)(t,a(n)))}}},t.rotate=function(n){return function(r){var e=r.length,u=Math.round(n)%e;if((0,t.isOutOfBound)(Math.abs(u),r)||0===u)return(0,t.copy)(r);if(u<0){var i=(0,t.splitAt)(-u)(r);return(0,I.pipe)(i[1],a(i[0]))}return(0,t.rotate)(u-e)(r)}},t.fromReadonlyNonEmptyArray=o.fromReadonlyNonEmptyArray,t.fromArray=function(n){return(0,t.isNonEmpty)(n)?o.some(n):o.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],u=1;u<r;u++)e.push(n(u));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=f,t.concat=a,t.reverse=function(n){return i([(0,t.last)(n)],n.slice(0,-1).reverse(),!0)},t.group=s,t.groupBy=function(n){return function(t){for(var r={},e=0,u=t;e<u.length;e++){var i=u[e],c=n(i);o.has.call(r,c)?r[c].push(i):r[c]=[i]}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?o.none:o.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)?o.none:o.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])],u=Math.min(n.length,t.length),i=1;i<u;i++)e[i]=r(n[i],t[i]);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,I.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))),u=1;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.chop=function(n){return function(r){for(var e=n(r),u=[e[0]],i=e[1];(0,t.isNonEmpty)(i);){var o=n(i),c=o[1];u.push(o[0]),i=c}return u}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[(0,t.copy)(r),[]]:[(0,I.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 v=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,I.pipe)(n,(0,t.mapWithIndex)(r))},l=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},p=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},m=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},b=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},y=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},g=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},_=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},M=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceWithIndex)(r,e))},x=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},E=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},A=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}};t.altW=function(n){return function(t){return(0,I.pipe)(t,f(n()))}},t.alt=t.altW,t.ap=function(n){return(0,t.chain)((function(r){return(0,I.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),u=[n(r)];(0,t.isNonEmpty)(e);)u.push(n(e)),e=(0,t.tail)(e);return u}},t.duplicate=(0,t.extend)(I.identity),t.flatten=(0,t.chain)(I.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))],u=1;u<r.length;u++)e.push(n(u,r[u]));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 u=n.map(r(0,(0,t.head)(e)),t.of),i=1;i<e.length;i++)u=n.ap(n.map(u,(function(n){return function(r){return(0,I.pipe)(n,(0,t.append)(r))}})),r(i,e[i]));return u}}},t.extract=c.head,t.URI="NonEmptyArray",t.getShow=c.getShow,t.getSemigroup=function(){return{concat:a}},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:v},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:v,mapWithIndex:d},t.Apply={URI:t.URI,map:v,ap:l},t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.apSecond)(t.Apply),t.Applicative={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:l,chain:p},t.chainFirst=(0,U.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:v,ap:l,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:b,reduceRight:y},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:b,reduceRight:y,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:v,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:v,mapWithIndex:d,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:A},t.Alt={URI:t.URI,map:v,alt:_},t.Comonad={URI:t.URI,map:v,extend:h,extract:t.extract},t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.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 i([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,I.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=s(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,I.pipe)(r,(0,t.prepend)(n))},t.snoc=function(n,r){return(0,I.pipe)(n,(0,t.append)(r))},t.prependToAll=t.prependAll,t.fold=c.concatAll,t.nonEmptyArray={URI:t.URI,of:t.of,map:v,mapWithIndex:d,ap:l,chain:p,extend:h,extract:t.extract,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:A,alt:_}})),Ht=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,u=0,i=t.length;u<i;u++)!e&&u in t||(e||(e=Array.prototype.slice.call(t,0,u)),e[u]=t[u]);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 o=u(O),c=u(Dt),f=u(Ft);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=f.isNonEmpty,t.prepend=f.prepend,t.prependW=f.prependW,t.append=f.append,t.appendW=f.appendW,t.makeBy=function(n,r){return n<=0?t.empty:f.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 o.isNone(n)?t.empty:[n.value]},t.fromEither=function(n){return o.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(f.head(e),f.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(f.init(e),f.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=[],u=0;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.scanLeft=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=t(u[i],r[i]);return u}},t.scanRight=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=t(r[i],u[i+1]);return u}},t.size=function(n){return n.length},t.isOutOfBound=f.isOutOfBound,t.lookup=function n(r,e){return void 0===e?function(t){return n(r,t)}:(0,t.isOutOfBound)(r,e)?o.none:o.some(e[r])},t.head=function(n){return(0,t.isNonEmpty)(n)?o.some(f.head(n)):o.none},t.last=function(n){return(0,t.isNonEmpty)(n)?o.some(f.last(n)):o.none},t.tail=function(n){return(0,t.isNonEmpty)(n)?o.some(f.tail(n)):o.none},t.init=function(n){return(0,t.isNonEmpty)(n)?o.some(f.init(n)):o.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=[],u=0,i=r;u<i.length;u++){var o=i[u];if(!n(o))break;e.push(o)}var c=e.length;return c===r.length?r:0===c?t.empty:e}};var a=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function s(n){return function(t,r){if(void 0===r){var e=s(n);return function(n){return e(t,n)}}for(var u=0;u<r.length;u++)if(n.equals(r[u],t))return!0;return!1}}function v(n){var r=f.union(n);return function(e,u){if(void 0===u){var i=v(n);return function(n){return i(n,e)}}return(0,t.isNonEmpty)(e)&&(0,t.isNonEmpty)(u)?r(u)(e):(0,t.isNonEmpty)(e)?e:u}}function d(n){var t=s(n);return function(r,e){if(void 0===e){var u=d(n);return function(n){return u(n,r)}}return r.filter((function(n){return t(n,e)}))}}function l(n){var t=s(n);return function(r,e){if(void 0===e){var u=l(n);return function(n){return u(n,r)}}return r.filter((function(n){return!t(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)?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=a(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 o.some(r);return o.none}},t.findFirst=function(n){return function(t){for(var r=0;r<t.length;r++)if(n(t[r]))return o.some(t[r]);return o.none}},t.findFirstMap=function(n){return function(t){for(var r=0;r<t.length;r++){var e=n(t[r]);if(o.isSome(e))return e}return o.none}},t.findLast=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return o.some(t[r]);return o.none}},t.findLastMap=function(n){return function(t){for(var r=t.length-1;r>=0;r--){var e=n(t[r]);if(o.isSome(e))return e}return o.none}},t.findLastIndex=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return o.some(r);return o.none}},t.insertAt=function(n,t){return function(r){return n<0||n>r.length?o.none:o.some(f.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)?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 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=[],u=Math.min(n.length,t.length),i=0;i<u;i++)e[i]=r(n[i],t[i]);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=f.prependAll(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.intersperse=function(n){var r=f.intersperse(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.rotate=function(n){var r=f.rotate(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.elem=s,t.uniq=function(n){var r=f.uniq(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.sortBy=function(n){var r=f.sortBy(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.chop=function(n){var r=f.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)?f.splitAt(n)(r):(0,t.isEmpty)(r)?[r,t.empty]:[t.empty,r]}},t.chunksOf=function(n){var r=f.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 u=function(n,i){return(0,t.isNonEmpty)(i)?(0,I.pipe)(f.head(i),(0,t.chain)((function(r){return u((0,I.pipe)(n,(0,t.append)(r)),f.tail(i))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:t.empty};return u(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=v,t.intersection=d,t.difference=l;var p=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.mapWithIndex)(r))},m=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},b=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},y=function(n,r){return(0,I.pipe)(n,(0,t.filter)(r))},g=function(n,r){return(0,I.pipe)(n,(0,t.filterMap)(r))},_=function(n,r){return(0,I.pipe)(n,(0,t.partition)(r))},x=function(n,r){return(0,I.pipe)(n,(0,t.partitionMap)(r))},E=function(n,r){return(0,I.pipe)(n,(0,t.partitionWithIndex)(r))},W=function(n,r){return(0,I.pipe)(n,(0,t.partitionMapWithIndex)(r))},N=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},C=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},q=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},z=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},D=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceWithIndex)(r,e))},F=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},L=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},H=function(n,r){return(0,I.pipe)(n,(0,t.filterMapWithIndex)(r))},B=function(n,r){return(0,I.pipe)(n,(0,t.filterWithIndex)(r))},G=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},V=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},$=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}};t._chainRecDepthFirst=function(n,r){return(0,I.pipe)(n,(0,t.chainRecDepthFirst)(r))},t._chainRecBreadthFirst=function(n,r){return(0,I.pipe)(n,(0,t.chainRecBreadthFirst)(r))},t.of=f.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,I.pipe)(n,(0,t.map)(r))}))},t.chain=function(n){return function(r){return(0,I.pipe)(r,(0,t.chainWithIndex)((function(t,r){return n(r)})))}},t.flatten=(0,t.chain)(I.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,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?t.push(i.left):r.push(i.right)}return(0,P.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 u=n(e,t[e]);o.isSome(u)&&r.push(u.value)}return r}},t.filterMap=function(n){return(0,t.filterMapWithIndex)((function(t,r){return n(r)}))},t.compact=(0,t.filterMap)(I.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=[],u=0;u<t.length;u++){var i=t[u];n(u,i)?e.push(i):r.push(i)}return(0,P.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=[],u=0;u<t.length;u++){var i=n(u,t[u]);"Left"===i._tag?r.push(i.left):e.push(i.right)}return(0,P.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)(I.identity),t.foldMapWithIndex=function(n){return function(t){return function(r){return r.reduce((function(r,e,u){return n.concat(r,t(u,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,u=n,i=0;i<e;i++)u=t(i,u,r[i]);return u}},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 C(r,n.of((0,t.zero)()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return(0,I.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,u,i){return n.ap(n.map(u,(function(n){return function(r){return(0,I.pipe)(n,(0,t.append)(r))}})),r(e,i))}))}},t.wither=function(n){var t=J(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=K(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var u=t(e);if(!o.isSome(u))break;var i=u.value,c=i[1];r.push(i[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,A.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,T.fromCompare)((function(t,r){for(var e=t.length,u=r.length,i=Math.min(e,u),o=0;o<i;o++){var f=n.compare(t[o],r[o]);if(0!==f)return f}return c.Ord.compare(e,u)}))},t.getUnionSemigroup=function(n){var t=v(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=l(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:p},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:p,mapWithIndex:h},t.Apply={URI:t.URI,map:p,ap:m},t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.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:b},t.Monad={URI:t.URI,map:p,ap:m,of:t.of,chain:b},t.chainFirst=(0,U.chainFirst)(t.Chain),t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:p,alt:N},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:N,zero:t.zero},t.Extend={URI:t.URI,map:p,extend:G},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:y,filterMap:g,partition:_,partitionMap:x},t.FilterableWithIndex={URI:t.URI,map:p,mapWithIndex:h,compact:t.compact,separate:t.separate,filter:y,filterMap:g,partition:_,partitionMap:x,partitionMapWithIndex:W,partitionWithIndex:E,filterMapWithIndex:H,filterWithIndex:B},t.Foldable={URI:t.URI,reduce:C,foldMap:q,reduceRight:z},t.FoldableWithIndex={URI:t.URI,reduce:C,foldMap:q,reduceRight:z,reduceWithIndex:D,foldMapWithIndex:F,reduceRightWithIndex:L},t.Traversable={URI:t.URI,map:p,reduce:C,foldMap:q,reduceRight:z,traverse:V,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:p,mapWithIndex:h,reduce:C,foldMap:q,reduceRight:z,reduceWithIndex:D,foldMapWithIndex:F,reduceRightWithIndex:L,traverse:V,sequence:t.sequence,traverseWithIndex:$},t.chainRecDepthFirst=function(n){return function(t){for(var r=i([],n(t),!0),e=[];r.length>0;){var u=r.shift();o.isLeft(u)?r.unshift.apply(r,n(u.left)):e.push(u.right)}return e}},t.ChainRecDepthFirst={URI:t.URI,map:p,ap:m,chain:b,chainRec:t._chainRecDepthFirst},t.chainRecBreadthFirst=function(n){return function(t){var r=n(t),e=[],u=[];function i(t){o.isLeft(t)?n(t.left).forEach((function(n){return e.push(n)})):u.push(t.right)}for(var c=0,f=r;c<f.length;c++)i(f[c]);for(;e.length>0;)i(e.shift());return u}},t.ChainRecBreadthFirst={URI:t.URI,map:p,ap:m,chain:b,chainRec:t._chainRecBreadthFirst};var J=(0,S.witherDefault)(t.Traversable,t.Compactable),K=(0,S.wiltDefault)(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:p,compact:t.compact,separate:t.separate,filter:y,filterMap:g,partition:_,partitionMap:x,reduce:C,foldMap:q,reduceRight:z,traverse:V,sequence:t.sequence,wither:J,wilt:K},t.filterE=(0,S.filterE)(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=(0,M.fromEitherK)(t.FromEither),t.unsafeInsertAt=f.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return(0,t.isNonEmpty)(e)?f.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=f.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=f.intercalate(n);return function(e){return(0,t.match)((function(){return n.empty}),r(e))}},t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.Apply),t.range=f.range,t.cons=f.cons,t.snoc=f.snoc,t.prependToAll=t.prependAll,t.readonlyArray={URI:t.URI,compact:t.compact,separate:t.separate,map:p,ap:m,of:t.of,chain:b,filter:y,filterMap:g,partition:_,partitionMap:x,mapWithIndex:h,partitionMapWithIndex:W,partitionWithIndex:E,filterMapWithIndex:H,filterWithIndex:B,alt:N,zero:t.zero,unfold:t.unfold,reduce:C,foldMap:q,reduceRight:z,traverse:V,sequence:t.sequence,reduceWithIndex:D,foldMapWithIndex:F,reduceRightWithIndex:L,traverseWithIndex:$,extend:G,wither:J,wilt:K}})),Bt=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O),o=u(Lt),c=u(Ht);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=o.isNonEmpty,t.prepend=o.prepend,t.prependW=o.prependW,t.append=o.append,t.appendW=o.appendW,t.makeBy=function(n,t){return n<=0?[]:o.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 i.isNone(n)?[]:[n.value]},t.fromEither=function(n){return i.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(o.head(e),o.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(o.init(e),o.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,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=t(u[i],r[i]);return u}},t.scanRight=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=t(r[i],u[i+1]);return u}},t.size=function(n){return n.length},t.isOutOfBound=o.isOutOfBound,t.lookup=c.lookup,t.head=c.head,t.last=c.last,t.tail=function(n){return(0,t.isNonEmpty)(n)?i.some(o.tail(n)):i.none},t.init=function(n){return(0,t.isNonEmpty)(n)?i.some(o.init(n)):i.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,u=t;e<u.length;e++){var i=u[e];if(!n(i))break;r.push(i)}return r}};var f=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function a(n){var r=o.union(n);return function(e,u){if(void 0===u){var i=a(n);return function(n){return i(n,e)}}return(0,t.isNonEmpty)(e)&&(0,t.isNonEmpty)(u)?r(u)(e):(0,t.isNonEmpty)(e)?(0,t.copy)(e):(0,t.copy)(u)}}function s(n){var r=(0,t.elem)(n);return function(t,e){if(void 0===e){var u=s(n);return function(n){return u(n,t)}}return t.filter((function(n){return r(n,e)}))}}function v(n){var r=(0,t.elem)(n);return function(t,e){if(void 0===e){var u=v(n);return function(n){return u(n,t)}}return t.filter((function(n){return!r(n,e)}))}}t.spanLeft=function(n){return function(r){var e=(0,t.splitAt)(f(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(f(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?i.none:i.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)?i.none:i.some((0,t.unsafeDeleteAt)(n,r))}},t.modifyAt=function(n,r){return function(e){return(0,t.isOutOfBound)(n,e)?i.none:i.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=[],u=Math.min(n.length,t.length),i=0;i<u;i++)e[i]=r(n[i],t[i]);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=o.prependAll(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):[]}},t.intersperse=function(n){var r=o.intersperse(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.rotate=function(n){var r=o.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=o.uniq(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.sortBy=function(n){var r=o.sortBy(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.chop=function(n){var r=o.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)?o.splitAt(n)(r):(0,t.isEmpty)(r)?[(0,t.copy)(r),[]]:[[],(0,t.copy)(r)]}},t.chunksOf=function(n){var r=o.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 u=function(n,i){return(0,t.isNonEmpty)(i)?(0,I.pipe)(o.head(i),(0,t.chain)((function(r){return u((0,I.pipe)(n,(0,t.append)(r)),o.tail(i))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:[]};return u([],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=a,t.intersection=s,t.difference=v;var d=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},l=function(n,r){return(0,I.pipe)(n,(0,t.mapWithIndex)(r))},p=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},m=function(n,r){return(0,I.pipe)(n,(0,t.filter)(r))},b=function(n,r){return(0,I.pipe)(n,(0,t.filterMap)(r))},y=function(n,r){return(0,I.pipe)(n,(0,t.partition)(r))},g=function(n,r){return(0,I.pipe)(n,(0,t.partitionMap)(r))},_=function(n,r){return(0,I.pipe)(n,(0,t.partitionWithIndex)(r))},x=function(n,r){return(0,I.pipe)(n,(0,t.partitionMapWithIndex)(r))},E=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},A=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},T=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},W=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},N=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceWithIndex)(r,e))},C=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},q=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},z=function(n,r){return(0,I.pipe)(n,(0,t.filterMapWithIndex)(r))},D=function(n,r){return(0,I.pipe)(n,(0,t.filterWithIndex)(r))},F=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},L=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},H=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},B=c._chainRecDepthFirst,G=c._chainRecBreadthFirst;t.of=o.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,I.pipe)(n,(0,t.map)(r))}))},t.chain=function(n){return function(r){return(0,I.pipe)(r,(0,t.chainWithIndex)((function(t,r){return n(r)})))}},t.flatten=(0,t.chain)(I.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 u=n(e,t[e]);i.isSome(u)&&r.push(u.value)}return r}},t.filterMap=function(n){return(0,t.filterMapWithIndex)((function(t,r){return n(r)}))},t.compact=(0,t.filterMap)(I.identity),t.separate=function(n){for(var t=[],r=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?t.push(i.left):r.push(i.right)}return(0,P.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=[],u=0;u<t.length;u++){var i=t[u];n(u,i)?e.push(i):r.push(i)}return(0,P.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=[],u=0;u<t.length;u++){var i=n(u,t[u]);"Left"===i._tag?r.push(i.left):e.push(i.right)}return(0,P.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)(I.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 A(r,n.of((0,t.zero)()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return(0,I.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,u,i){return n.ap(n.map(u,(function(n){return function(r){return(0,I.pipe)(n,(0,t.append)(r))}})),r(e,i))}))}},t.wither=function(n){var t=V(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=$(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var u=t(e);if(!i.isSome(u))break;var o=u.value,c=o[1];r.push(o[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=a(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=s(n);return{concat:function(n,r){return t(r)(n)}}},t.getDifferenceMagma=function(n){var t=v(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:d},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:d,mapWithIndex:l},t.Apply={URI:t.URI,map:d,ap:p},t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.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:h},t.chainFirst=(0,U.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:d,ap:p,of:t.of,chain:h},t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:d,alt:E},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:E,zero:t.zero},t.Extend={URI:t.URI,map:d,extend:F},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:b,partition:y,partitionMap:g},t.FilterableWithIndex={URI:t.URI,map:d,mapWithIndex:l,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:g,partitionMapWithIndex:x,partitionWithIndex:_,filterMapWithIndex:z,filterWithIndex:D},t.Foldable={URI:t.URI,reduce:A,foldMap:T,reduceRight:W},t.FoldableWithIndex={URI:t.URI,reduce:A,foldMap:T,reduceRight:W,reduceWithIndex:N,foldMapWithIndex:C,reduceRightWithIndex:q},t.Traversable={URI:t.URI,map:d,reduce:A,foldMap:T,reduceRight:W,traverse:L,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:d,mapWithIndex:l,reduce:A,foldMap:T,reduceRight:W,reduceWithIndex:N,foldMapWithIndex:C,reduceRightWithIndex:q,traverse:L,sequence:t.sequence,traverseWithIndex:H};var V=(0,S.witherDefault)(t.Traversable,t.Compactable),$=(0,S.wiltDefault)(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:d,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:g,reduce:A,foldMap:T,reduceRight:W,traverse:L,sequence:t.sequence,wither:V,wilt:$},t.chainRecDepthFirst=c.chainRecDepthFirst,t.ChainRecDepthFirst={URI:t.URI,map:d,ap:p,chain:h,chainRec:B},t.chainRecBreadthFirst=c.chainRecBreadthFirst,t.ChainRecBreadthFirst={URI:t.URI,map:d,ap:p,chain:h,chainRec:G},t.filterE=(0,S.filterE)(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=(0,M.fromEitherK)(t.FromEither),t.unsafeInsertAt=o.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return(0,t.isNonEmpty)(e)?o.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)(i.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.Apply),t.range=o.range,t.empty=[],t.cons=o.cons,t.snoc=o.snoc,t.prependToAll=t.prependAll,t.array={URI:t.URI,compact:t.compact,separate:t.separate,map:d,ap:p,of:t.of,chain:h,filter:m,filterMap:b,partition:y,partitionMap:g,mapWithIndex:l,partitionMapWithIndex:x,partitionWithIndex:_,filterMapWithIndex:z,filterWithIndex:D,alt:E,zero:t.zero,unfold:t.unfold,reduce:A,foldMap:T,reduceRight:W,traverse:L,sequence:t.sequence,reduceWithIndex:N,foldMapWithIndex:C,reduceRightWithIndex:q,traverseWithIndex:H,extend:F,wither:V,wilt:$}}));const Gt=n=>({kind:"height",size:n}),Vt=T.contramap((n=>n.size))(Dt.Ord),$t=Bt.sort(Vt),Jt=Bt.sort({equals:(n,t)=>n.kind===t.kind,compare:(n,t)=>n.kind===t.kind?0:"width"===n.kind?-1:1}),Kt=n=>t=>{const r=$t(t),e=(n=>{const[t,r]=n;return t.size/r.size})(r),u=Object.assign(Object.assign({},r[0]),{size:n*e}),i=Object.assign(Object.assign({},r[1]),{size:n});return Jt([i,u])},Xt=n=>{const{naturalWidth:t,naturalHeight:r}=n;return[(e=t,{kind:"width",size:e}),Gt(r)];var e},Zt=()=>{const n=document.createElement("canvas"),t=n.getContext("2d");return[n,t]},Qt=async n=>{const t=await fetch(n),r=await t.blob();return new File([r],"image",{type:r.type,lastModified:Date.now()})},Yt=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()}))})),nr=(n,t)=>n.naturalWidth>t?((n,t)=>{const r=Kt(n),[e,u]=Zt(),i=Xt(t),[o,c]=r(i).map((n=>n.size)),f=new ImageData(o,c),a=(n=>{const{naturalWidth:t,naturalHeight:r}=n,[e,u]=Zt();return e.width=t,e.height=r,u.drawImage(n,0,0),u.getImageData(0,0,t,r)})(t);return e.width=o,e.height=c,zt.lanczos(a,f),u.putImageData(f,0,0),e.toDataURL()})(t,n):(n=>{const t=document.createElement("canvas"),{naturalWidth:r,naturalHeight:e}=n,u=t.getContext("2d");return t.width=r,t.height=e,u.drawImage(n,0,0,r,e),t.toDataURL()})(n),tr=n=>i(n,vt,J((n=>({headers:n})))),{state:rr,onChange:er}=z({campaignId:N.none,results:[],filters:[],cropperHandlers:[],detectedObjects:[],objectDetectionInProgress:!1,imageWidth:500,image:N.none,imageUrl:N.none,imageBounds:N.none,searchArea:N.none,resultsComponents:[],serverError:!1,loading:!1}),ur=async n=>{var t,r;rr.results=n.value,rr.filters=(r=ht(n.filters),Object.entries(r).map((([n,t])=>({name:n,filters:t})))),rr.rectangleSearchForm=n.searchArea,rr.resetCategoryLink=null===(t=n.links)||void 0===t?void 0:t.clearFilters,rr.loading=!1},ir=n=>i(tr(rr.token),xn,Pn(mt(n))),or=async()=>{rr.loading=!0,i(xt(rr.imageBounds,rr.searchArea),N.map((async([n,t])=>{const r=(e=n,n=>({x:n.x/e.width,y:n.y/e.height,width:n.width/e.width,height:n.height/e.height}))(t);var e;const u={width:r.width,height:r.height,left:r.x,top:r.y};return await i(tr(rr.token),xn,Pn(Ut(rr.rectangleSearchForm,u)),En(ur))()})))},cr=n=>{rr.loading=!0;const t=(n=>{const t=new FormData;return t.append("image",n),t})(n);return i(dt(vt(rr.token),V(t)),J((([n,t])=>({headers:n,body:t}))),xn,Wn((n=>((n,t=tn)=>{const r="search/session",e=I.pipe(t,fn((()=>r),(n=>`${r}?campaign-id=${n}`)));return I.pipe(dt(Yn(),et),xn,Pn(ot(e,n)))})(n,rr.campaignId))),En((n=>(ur(n),(async n=>{rr.objectDetectionInProgress=!0;const t={kind:"server",inner:"Can not get a link for objects detection"};var r,e,u;await i((r=n,e="detectedObjects",i(r.links,an,(u=n=>an(n[e]),function(n){return on(n)?tn:u(n.value)}))),Nn((()=>t)),Wn(ir),En((n=>rr.detectedObjects=ht(n))))(),rr.objectDetectionInProgress=!1})(n),rr.loading=!1,n))),An((n=>(rr.serverError=!0,rr.loading=!1,n))))},fr=rr;er("activeIonLink",(async n=>{rr.loading=!0;const t=n||rr.resetCategoryLink;await i(tr(rr.token),xn,Pn(mt(t)),En(ur),An((n=>({kind:"network error",inner:n}))))()})),er("searchArea",(n=>{i(n,N.map((n=>{var t;rr.cropperHandlers=[{position:l(t=n),direction:b.NorthWest},{position:m.concat(l(t),{x:t.width,y:0}),direction:b.NorthEast},{position:m.concat(l(t),{x:0,y:t.height}),direction:b.SouthWest},{position:m.concat(l(t),{x:t.width,y:t.height}),direction:b.SouthEast}]})))})),er("serverError",(()=>{rr.loading=!1}));const ar=n=>{fr.image=N.some(n),fr.imageUrl=N.some(n.src)},sr=async n=>{const t=(n=>I.pipe(n,N.fromNullable,Dn.fromOption((()=>Pt)),Dn.chain(Wt)))(n),r=(500,n=>I.pipe(n,St,Gn.map((n=>nr(n,500))),Gn.chain(Yt)));const e=i(t,xn,Cn(r)),u=await i(e,Wn(cr))();return i(dt(u,t),J((([n,t])=>(async(n,t)=>{const r={image:await(async n=>({name:n.name,mediaType:n.type,value:await Mt(n)}))(t)},e=n.uploadHighResolutionImage;await i(tr(rr.token),xn,Pn(Ut(e,r)))()})(n,t)))),await i(e,Cn(St),En(ar))(),u};var vr,dr=new Uint8Array(16);function lr(){if(!vr&&!(vr="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 vr(dr)}const pr=/^(?:[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 hr(n){return"string"==typeof n&&pr.test(n)}for(var mr=[],br=0;br<256;++br)mr.push((br+256).toString(16).substr(1));function yr(n,t,r){var e=(n=n||{}).random||(n.rng||lr)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,t){r=r||0;for(var u=0;u<16;++u)t[r+u]=e[u];return t}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(mr[n[t+0]]+mr[n[t+1]]+mr[n[t+2]]+mr[n[t+3]]+"-"+mr[n[t+4]]+mr[n[t+5]]+"-"+mr[n[t+6]]+mr[n[t+7]]+"-"+mr[n[t+8]]+mr[n[t+9]]+"-"+mr[n[t+10]]+mr[n[t+11]]+mr[n[t+12]]+mr[n[t+13]]+mr[n[t+14]]+mr[n[t+15]]).toLowerCase();if(!hr(r))throw TypeError("Stringified UUID is invalid");return r}(e)}var wr=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},gr=Object.prototype.hasOwnProperty;function Ir(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch(n){return null}}function Or(n){try{return encodeURIComponent(n)}catch(n){return null}}var jr={stringify:function(n,t){t=t||"";var r,e,u=[];for(e in"string"!=typeof t&&(t="?"),n)if(gr.call(n,e)){if((r=n[e])||null!=r&&!isNaN(r)||(r=""),e=Or(e),r=Or(r),null===e||null===r)continue;u.push(e+"="+r)}return u.length?t+u.join("&"):""},parse:function(n){for(var t,r=/([^=?#&]+)=?([^&]*)/g,e={};t=r.exec(n);){var u=Ir(t[1]),i=Ir(t[2]);null===u||null===i||u in e||(e[u]=i)}return e}},Rr=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,_r=/[\n\r\t]/g,Ur=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Mr=/:\d+$/,xr=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Er=/^[a-zA-Z]:/;function Ar(n){return(n||"").toString().replace(Rr,"")}var Tr=[["#","hash"],["?","query"],function(n,t){return Sr(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]],Wr={hash:1,query:1};function Pr(n){var t;t="undefined"!=typeof window?window:void 0!==w?w:"undefined"!=typeof self?self:{};var r,e={},u=typeof(n=n||t.location||{});if("blob:"===n.protocol)e=new Nr(unescape(n.pathname),{});else if("string"===u)for(r in e=new Nr(n,{}),Wr)delete e[r];else if("object"===u){for(r in n)r in Wr||(e[r]=n[r]);void 0===e.slashes&&(e.slashes=Ur.test(n.href))}return e}function Sr(n){return"file:"===n||"ftp:"===n||"http:"===n||"https:"===n||"ws:"===n||"wss:"===n}function kr(n,t){n=(n=Ar(n)).replace(_r,""),t=t||{};var r,e=xr.exec(n),u=e[1]?e[1].toLowerCase():"",i=!!e[2],o=!!e[3],c=0;return i?o?(r=e[2]+e[3]+e[4],c=e[2].length+e[3].length):(r=e[2]+e[4],c=e[2].length):o?(r=e[3]+e[4],c=e[3].length):r=e[4],"file:"===u?c>=2&&(r=r.slice(2)):Sr(u)?r=e[4]:u?i&&(r=r.slice(2)):c>=2&&Sr(t.protocol)&&(r=e[4]),{protocol:u,slashes:i||Sr(u),slashesCount:c,rest:r}}function Nr(n,t,r){if(n=(n=Ar(n)).replace(_r,""),!(this instanceof Nr))return new Nr(n,t,r);var e,u,i,o,c,f,a=Tr.slice(),s=typeof t,v=this,d=0;for("object"!==s&&"string"!==s&&(r=t,t=null),r&&"function"!=typeof r&&(r=jr.parse),e=!(u=kr(n||"",t=Pr(t))).protocol&&!u.slashes,v.slashes=u.slashes||e&&t.slashes,v.protocol=u.protocol||t.protocol||"",n=u.rest,("file:"===u.protocol&&(2!==u.slashesCount||Er.test(n))||!u.slashes&&(u.protocol||u.slashesCount<2||!Sr(v.protocol)))&&(a[3]=[/(.*)/,"pathname"]);d<a.length;d++)"function"!=typeof(o=a[d])?(f=o[1],(i=o[0])!=i?v[f]=n:"string"==typeof i?~(c="@"===i?n.lastIndexOf(i):n.indexOf(i))&&("number"==typeof o[2]?(v[f]=n.slice(0,c),n=n.slice(c+o[2])):(v[f]=n.slice(c),n=n.slice(0,c))):(c=i.exec(n))&&(v[f]=c[1],n=n.slice(0,c.index)),v[f]=v[f]||e&&o[3]&&t[f]||"",o[4]&&(v[f]=v[f].toLowerCase())):n=o(n,v);r&&(v.query=r(v.query)),e&&t.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==t.pathname)&&(v.pathname=function(n,t){if(""===n)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(n.split("/")),e=r.length,u=r[e-1],i=!1,o=0;e--;)"."===r[e]?r.splice(e,1):".."===r[e]?(r.splice(e,1),o++):o&&(0===e&&(i=!0),r.splice(e,1),o--);return i&&r.unshift(""),"."!==u&&".."!==u||r.push(""),r.join("/")}(v.pathname,t.pathname)),"/"!==v.pathname.charAt(0)&&Sr(v.protocol)&&(v.pathname="/"+v.pathname),wr(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(~(c=v.auth.indexOf(":"))?(v.username=v.auth.slice(0,c),v.username=encodeURIComponent(decodeURIComponent(v.username)),v.password=v.auth.slice(c+1),v.password=encodeURIComponent(decodeURIComponent(v.password))):v.username=encodeURIComponent(decodeURIComponent(v.auth)),v.auth=v.password?v.username+":"+v.password:v.username),v.origin="file:"!==v.protocol&&Sr(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}Nr.prototype={set:function(n,t,r){var e=this;switch(n){case"query":"string"==typeof t&&t.length&&(t=(r||jr.parse)(t)),e[n]=t;break;case"port":e[n]=t,wr(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,Mr.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 u="pathname"===n?"/":"#";e[n]=t.charAt(0)!==u?u+t:t}else e[n]=t;break;case"username":case"password":e[n]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(e.username=t.slice(0,i),e.username=encodeURIComponent(decodeURIComponent(e.username)),e.password=t.slice(i+1),e.password=encodeURIComponent(decodeURIComponent(e.password))):e.username=encodeURIComponent(decodeURIComponent(t))}for(var o=0;o<Tr.length;o++){var c=Tr[o];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&&Sr(e.protocol)&&e.host?e.protocol+"//"+e.host:"null",e.href=e.toString(),e},toString:function(n){n&&"function"==typeof n||(n=jr.stringify);var t,r=this,e=r.host,u=r.protocol;u&&":"!==u.charAt(u.length-1)&&(u+=":");var i=u+(r.protocol&&r.slashes||Sr(r.protocol)?"//":"");return r.username?(i+=r.username,r.password&&(i+=":"+r.password),i+="@"):r.password?(i+=":"+r.password,i+="@"):"file:"!==r.protocol&&Sr(r.protocol)&&!e&&"/"!==r.pathname&&(i+="@"),(":"===e[e.length-1]||Mr.test(r.hostname)&&!r.port)&&(e+=":"),i+=e+r.pathname,(t="object"==typeof r.query?n(r.query):r.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(i+=r.hash),i}},Nr.extractProtocol=kr,Nr.location=Pr,Nr.trimLeft=Ar,Nr.qs=jr;var Cr=Nr,qr=g((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}})),zr="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==zr&&zr,Dr="URLSearchParams"in zr,Fr="Symbol"in zr&&"iterator"in Symbol,Lr="FileReader"in zr&&"Blob"in zr&&function(){try{return new Blob,!0}catch(n){return!1}}(),Hr="FormData"in zr,Br="ArrayBuffer"in zr;if(Br)var Gr=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Vr=ArrayBuffer.isView||function(n){return n&&Gr.indexOf(Object.prototype.toString.call(n))>-1};function $r(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 Jr(n){return"string"!=typeof n&&(n=String(n)),n}function Kr(n){var t={next:function(){var t=n.shift();return{done:void 0===t,value:t}}};return Fr&&(t[Symbol.iterator]=function(){return t}),t}function Xr(n){this.map={},n instanceof Xr?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 Zr(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function Qr(n){return new Promise((function(t,r){n.onload=function(){t(n.result)},n.onerror=function(){r(n.error)}}))}function Yr(n){var t=new FileReader,r=Qr(t);return t.readAsArrayBuffer(n),r}function ne(n){if(n.slice)return n.slice(0);var t=new Uint8Array(n.byteLength);return t.set(new Uint8Array(n)),t.buffer}function te(){return this.bodyUsed=!1,this._initBody=function(n){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?"string"==typeof n?this._bodyText=n:Lr&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:Hr&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:Dr&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():Br&&Lr&&(t=n)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=ne(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Br&&(ArrayBuffer.prototype.isPrototypeOf(n)||Vr(n))?this._bodyArrayBuffer=ne(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):Dr&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Lr&&(this.blob=function(){var n=Zr(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?Zr(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(Yr)}),this.text=function(){var n,t,r,e=Zr(this);if(e)return e;if(this._bodyBlob)return n=this._bodyBlob,r=Qr(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)},Hr&&(this.formData=function(){return this.text().then(ue)}),this.json=function(){return this.text().then(JSON.parse)},this}Xr.prototype.append=function(n,t){n=$r(n),t=Jr(t);var r=this.map[n];this.map[n]=r?r+", "+t:t},Xr.prototype.delete=function(n){delete this.map[$r(n)]},Xr.prototype.get=function(n){return n=$r(n),this.has(n)?this.map[n]:null},Xr.prototype.has=function(n){return this.map.hasOwnProperty($r(n))},Xr.prototype.set=function(n,t){this.map[$r(n)]=Jr(t)},Xr.prototype.forEach=function(n,t){for(var r in this.map)this.map.hasOwnProperty(r)&&n.call(t,this.map[r],r,this)},Xr.prototype.keys=function(){var n=[];return this.forEach((function(t,r){n.push(r)})),Kr(n)},Xr.prototype.values=function(){var n=[];return this.forEach((function(t){n.push(t)})),Kr(n)},Xr.prototype.entries=function(){var n=[];return this.forEach((function(t,r){n.push([r,t])})),Kr(n)},Fr&&(Xr.prototype[Symbol.iterator]=Xr.prototype.entries);var re=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ee(n,t){if(!(this instanceof ee))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,e,u=(t=t||{}).body;if(n instanceof ee){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,t.headers||(this.headers=new Xr(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,u||null==n._bodyInit||(u=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 Xr(t.headers)),this.method=(e=(r=t.method||this.method||"GET").toUpperCase(),re.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)&&u)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(u),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function ue(n){var t=new FormData;return n.trim().split("&").forEach((function(n){if(n){var r=n.split("="),e=r.shift().replace(/\+/g," "),u=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(e),decodeURIComponent(u))}})),t}function ie(n,t){if(!(this instanceof ie))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 Xr(t.headers),this.url=t.url||"",this._initBody(n)}ee.prototype.clone=function(){return new ee(this,{body:this._bodyInit})},te.call(ee.prototype),te.call(ie.prototype),ie.prototype.clone=function(){return new ie(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Xr(this.headers),url:this.url})},ie.error=function(){var n=new ie(null,{status:0,statusText:""});return n.type="error",n};var oe=[301,302,303,307,308];ie.redirect=function(n,t){if(-1===oe.indexOf(t))throw new RangeError("Invalid status code");return new ie(null,{status:t,headers:{location:n}})};var ce=zr.DOMException;try{new ce}catch(n){(ce=function(n,t){this.message=n,this.name=t;var r=Error(n);this.stack=r.stack}).prototype=Object.create(Error.prototype),ce.prototype.constructor=ce}function fe(n,t){return new Promise((function(r,e){var u=new ee(n,t);if(u.signal&&u.signal.aborted)return e(new ce("Aborted","AbortError"));var i=new XMLHttpRequest;function o(){i.abort()}i.onload=function(){var n,t,e={status:i.status,statusText:i.statusText,headers:(n=i.getAllResponseHeaders()||"",t=new Xr,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 u=r.join(":").trim();t.append(e,u)}})),t)};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var u="response"in i?i.response:i.responseText;setTimeout((function(){r(new ie(u,e))}),0)},i.onerror=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){e(new ce("Aborted","AbortError"))}),0)},i.open(u.method,function(n){try{return""===n&&zr.location.href?zr.location.href:n}catch(t){return n}}(u.url),!0),"include"===u.credentials?i.withCredentials=!0:"omit"===u.credentials&&(i.withCredentials=!1),"responseType"in i&&(Lr?i.responseType="blob":Br&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Xr?u.headers.forEach((function(n,t){i.setRequestHeader(t,n)})):Object.getOwnPropertyNames(t.headers).forEach((function(n){i.setRequestHeader(n,Jr(t.headers[n]))})),u.signal&&(u.signal.addEventListener("abort",o),i.onreadystatechange=function(){4===i.readyState&&u.signal.removeEventListener("abort",o)}),i.send(void 0===u._bodyInit?null:u._bodyInit)}))}fe.polyfill=!0,zr.fetch||(zr.fetch=fe,zr.Headers=Xr,zr.Request=ee,zr.Response=ie);var ae=g((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 se.ResponseContext(n.status,t,r)}));return(0,qr.from)(e)},n}();t.IsomorphicFetchHttpLibrary=r})),se=g((function(n,t){var r,e,u=w&&w.__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=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),o=w&&w.__exportStar||function(n,t){for(var r in n)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,n,r)},c=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},f=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapHttpLibrary=t.ResponseContext=t.SelfDecodingBody=t.RequestContext=t.HttpException=t.HttpMethod=void 0,o(ae,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 a=function(n){function t(t){return n.call(this,t)||this}return u(t,n),t}(Error);t.HttpException=a;var s=function(){function n(n,t){this.httpMethod=t,this.headers={},this.body=void 0,this.url=new Cr(n,!0)}return n.prototype.getUrl=function(){return this.url.toString()},n.prototype.setUrl=function(n){this.url=new Cr(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=s;var v=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 f(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=v;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 u=e[r].split("=",2),i=u[0],o=u[1];i=i.toLowerCase().trim(),void 0===o?t[""]=i:((o=o.trim()).startsWith('"')&&o.endsWith('"')&&(o=o.substring(1,o.length-1)),t[i]=o)}return t},n.prototype.getBodyAsFile=function(){return c(this,void 0,void 0,(function(){var n,t,r;return f(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,qr.from)(n.send(t))}}}})),ve=g((function(n,t){var r=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},e=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.configureAuthMethods=t.BearerAuthAuthentication=void 0;var u=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,u,i;return e(this,(function(e){switch(e.label){case 0:return r=(t=n).setHeaderParam,u=["Authorization"],i="Bearer ",[4,this.tokenProvider.getToken()];case 1:return r.apply(t,u.concat([i+e.sent()])),[2]}}))}))},n}();t.BearerAuthAuthentication=u,t.configureAuthMethods=function(n){var t={};return n?(t.default=n.default,n.bearerAuth&&(t.bearerAuth=new u(n.bearerAuth.tokenProvider)),t):t}})),de=g((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})),le=g((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})),pe=g((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})),he=g((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})),me=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),be=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.FilterEvent=u})),ye=g((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})),we=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),ge=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.ProductClickEvent=u})),Ie=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.ProductViewEvent=u})),Oe=g((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})),je=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Re=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.SearchEvent=u})),_e=g((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})),Ue=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Me=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),xe=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Ee=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.WidgetEvent=u})),Ae=g((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})),Te=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__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(de,t),e(le,t),e(pe,t),e(he,t),e(me,t),e(be,t),e(ye,t),e(we,t),e(ge,t),e(Ie,t),e(Oe,t),e(je,t),e(Re,t),e(_e,t),e(Ue,t),e(Me,t),e(xe,t),e(Ee,t),e(Ae,t)})),We=g((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,qr.from)(this.middleware.pre(n))},n.prototype.post=function(n){return(0,qr.from)(this.middleware.post(n))},n}();t.PromiseMiddlewareWrapper=r})),Pe=g((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 se.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]})),Se=g((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:Pe.server1,httpApi:n.httpApi||new ae.IsomorphicFetchHttpLibrary,middleware:n.middleware||[],authMethods:(0,ve.configureAuthMethods)(n.authMethods)};return n.promiseMiddleware&&n.promiseMiddleware.forEach((function(n){return t.middleware.push(new We.PromiseMiddlewareWrapper(n))})),t}})),ke=g((function(n,t){var r,e=w&&w.__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 u=function(n){function t(t,r,e,u){var i=n.call(this,"HTTP-Code: "+t+"\nMessage: "+r+"\nBody: "+JSON.stringify(e)+"\nHeaders: "+JSON.stringify(u))||this;return i.code=t,i.body=e,i.headers=u,i}return e(t,n),t}(Error);t.ApiException=u})),Ne=g((function(n,t){var r,e=w&&w.__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 u=function(n){function t(t,r,e){var u=n.call(this,"Required parameter "+e+" was null or undefined when calling "+t+"."+r+".")||this;return u.api=t,u.method=r,u.field=e,u.name="RequiredError",u}return e(t,n),t}(Error);t.RequiredError=u})),Ce=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__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(de,t),e(le,t),e(pe,t),e(he,t),e(me,t),e(be,t),e(ye,t),e(we,t),e(ge,t),e(Ie,t),e(Oe,t),e(je,t),e(Re,t),e(_e,t),e(Ue,t),e(Me,t),e(xe,t),e(Ee,t),e(Ae,t);var u=de,i=le,o=pe,c=he,f=be,a=ye,s=ge,v=Ie,d=Oe,l=Re,p=_e,h=Ee,m=Ae,b=["string","boolean","double","integer","long","float","number","any"],y={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},g=new Set(["EventConfirmationStatusEnum","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),I={ErrorObject:u.ErrorObject,ErrorResponse:i.ErrorResponse,Event:o.Event,EventConfirmation:c.EventConfirmation,FilterEvent:f.FilterEvent,FilterEventAllOf:a.FilterEventAllOf,ProductClickEvent:s.ProductClickEvent,ProductViewEvent:v.ProductViewEvent,ProductViewEventAllOf:d.ProductViewEventAllOf,SearchEvent:l.SearchEvent,SearchEventAllOf:p.SearchEventAllOf,WidgetEvent:h.WidgetEvent,WidgetEventAllOf:m.WidgetEventAllOf},O=function(){function n(){}return n.findCorrectType=function(n,t){if(null==n)return t;if(-1!==b.indexOf(t.toLowerCase()))return t;if("Date"===t)return t;if(g.has(t))return t;if(!I[t])return t;var r=I[t].discriminator;if(null==r)return t;if(n[r]){var e=n[r];return I[e]?e:t}return t},n.serialize=function(t,r,e){if(null==t)return t;if(-1!==b.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var u=r.replace("Array<","");u=u.substring(0,u.length-1);var i=[];for(var o in t)i.push(n.serialize(t[o],u,e));return i}if("Date"===r){if("date"==e){var c=t.getMonth()+1;c=c<10?"0"+c.toString():c.toString();var f=t.getDate();return f=f<10?"0"+f.toString():f.toString(),t.getFullYear()+"-"+c+"-"+f}return t.toISOString()}if(g.has(r))return t;if(!I[r])return t;r=this.findCorrectType(t,r);var a=I[r].getAttributeTypeMap(),s={};for(var o in a){var v=a[o];s[v.baseName]=n.serialize(t[v.name],v.type,v.format)}return s},n.deserialize=function(t,r,e){if(r=n.findCorrectType(t,r),null==t)return t;if(-1!==b.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var u=r.replace("Array<","");u=u.substring(0,u.length-1);var i=[];for(var o in t)i.push(n.deserialize(t[o],u,e));return i}if("Date"===r)return new Date(t);if(g.has(r))return t;if(!I[r])return t;var c=new I[r],f=I[r].getAttributeTypeMap();for(var o in f){var a=f[o];c[a.name]=n.deserialize(t[a.baseName],a.type,a.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,u=n.map(this.normalizeMediaType);e<u.length;e++){var i=u[e];y[i]>r&&(t=i,r=y[i])}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=O})),qe=g((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")}})),ze=g((function(n,t){var r,e=w&&w.__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)}),u=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},i=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultApiResponseProcessor=t.DefaultApiRequestFactory=void 0;var o=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,o;return u(this,void 0,void 0,(function(){var u,c,f,a,s,v;return i(this,(function(i){switch(i.label){case 0:return(c=(u=t||this.configuration).baseServer.makeRequestContext("/event",se.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),f=Ce.ObjectSerializer.getPreferredMediaType(["application/json"]),c.setHeaderParam("Content-Type",f),a=Ce.ObjectSerializer.stringify(Ce.ObjectSerializer.serialize(n,"ProductViewEvent | ProductClickEvent | WidgetEvent | FilterEvent | SearchEvent",""),f),c.setBody(a),(null==(s=u.authMethods.bearerAuth)?void 0:s.applySecurityAuthentication)?[4,null==s?void 0:s.applySecurityAuthentication(c)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(v=(null===(r=null==t?void 0:t.authMethods)||void 0===r?void 0:r.default)||(null===(o=null===(e=this.configuration)||void 0===e?void 0:e.authMethods)||void 0===o?void 0:o.default))?void 0:v.applySecurityAuthentication)?[4,null==v?void 0:v.applySecurityAuthentication(c)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,c]}}))}))},t}(Ne.BaseAPIRequestFactory);t.DefaultApiRequestFactory=o;var c=function(){function n(){}return n.prototype.trackEvent=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f,a,s,v,d,l,p,h,m,b;return i(this,(function(i){switch(i.label){case 0:return t=Ce.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,qe.isCodeInRange)("200",n.httpStatusCode)?(e=(r=Ce.ObjectSerializer).deserialize,o=(u=Ce.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,v=e.apply(r,[o.apply(u,[i.sent(),t]),"EventConfirmation",""])];case 2:return(0,qe.isCodeInRange)("502",n.httpStatusCode)?(f=(c=Ce.ObjectSerializer).deserialize,s=(a=Ce.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:throw v=f.apply(c,[s.apply(a,[i.sent(),t]),"ErrorResponse",""]),new ke.ApiException(502,"an error occurred",v,n.headers);case 4:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(l=(d=Ce.ObjectSerializer).deserialize,h=(p=Ce.ObjectSerializer).parse,[4,n.body.text()]):[3,6];case 5:return[2,v=l.apply(d,[h.apply(p,[i.sent(),t]),"EventConfirmation",""])];case 6:return m=ke.ApiException.bind,b=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 7:throw new(m.apply(ke.ApiException,b.concat([i.sent(),n.headers])))}}))}))},n}();t.DefaultApiResponseProcessor=c})),De=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableDefaultApi=void 0;var r=qr,e=function(){function n(n,t,r){this.configuration=n,this.requestFactory=t||new ze.DefaultApiRequestFactory(n),this.responseProcessor=r||new ze.DefaultApiResponseProcessor}return n.prototype.trackEvent=function(n,t){for(var e=this,u=this.requestFactory.trackEvent(n,t),i=(0,qr.from)(u),o=function(n){i=i.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},c=0,f=this.configuration.middleware;c<f.length;c++)o(f[c]);return i.pipe((0,r.mergeMap)((function(n){return e.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,qr.of)(n),u=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=e.configuration.middleware;i<o.length;i++)u(o[i]);return t.pipe((0,r.map)((function(n){return e.responseProcessor.trackEvent(n)})))})))},n}();t.ObservableDefaultApi=e})),Fe=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseDefaultApi=void 0;var r=function(){function n(n,t,r){this.api=new De.ObservableDefaultApi(n,t,r)}return n.prototype.trackEvent=function(n,t){return this.api.trackEvent(n,t).toPromise()},n}();t.PromiseDefaultApi=r})),Le=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__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(se,t),e(ve,t),e(Te,t),Object.defineProperty(t,"createConfiguration",{enumerable:!0,get:function(){return Se.createConfiguration}}),e(ke,t),e(Pe,t),Object.defineProperty(t,"DefaultApi",{enumerable:!0,get:function(){return Fe.PromiseDefaultApi}})}));const He=(n,t)=>{const r=(n=>(n=>!n.includes("stage"))(n)?Le.servers[0]:Le.servers[1])(n),e=(n=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((t=>t(n)))}}}))(t);return new Le.DefaultApi(Le.createConfiguration({baseServer:r,authMethods:e}))},Be=n=>t=>Object.assign(Object.assign({},t),n),Ge=Be({widget:"VPR",typ:"product_view_event"}),Ve=Be({widget:"VPS",typ:"product_view_event"}),$e=Be({widget:"VPR",typ:"product_click_event"}),Je=Be({widget:"VPS",typ:"product_click_event"}),Ke=Be({widget:"VPR",typ:"widget_event"}),Xe=Be({widget:"VPS",typ:"widget_event"}),Ze=Be({widget:"VPS",typ:"search_event"}),Qe=Be({widget:"VPS",typ:"filter_event"});export{He as A,Xe as B,$n as C,Bt as D,Dn as E,Pn as F,ot as G,xn as H,Yn as I,rt as J,H as K,X as L,un as M,Lt as N,N as O,cn as P,Ge as Q,$e as R,W as S,Ke as T,Vn as U,Et as V,I as _,h as a,or as b,gt as c,ht as d,It as e,p as f,y as g,Ot as h,fr as i,lt as j,Qt as k,sr as l,bt as m,nn as n,wt as o,i as p,Xt as q,Kt as r,xt as s,yt as t,Jn as u,Ve as v,Je as w,Ze as x,Qe as y,yr as z}
1
+ import{a as n,f as t}from"./p-3469b71a.js";function r(n){return n}function e(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return o(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(o(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(o(i(u(e(r(t(n.apply(this,arguments)))))))))}}}function u(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n}function i(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return o(i(u(e(r(t(n))))));case 8:return c(o(i(u(e(r(t(n)))))));case 9:return f(c(o(i(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}}var o={_tag:"None"},c=function(n){return{_tag:"Left",left:n}},f=function(n){return{_tag:"Right",right:n}},a=Object.prototype.hasOwnProperty,s=function(n){return{concat:function(t,r){var e={};for(var u in n)a.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));return e}}},v={concat:function(n,t){return n+t}};const d={concat:(n,t)=>n-t},l=({x:n,y:t})=>({x:n,y:t}),p=({clientX:n,clientY:t})=>({x:n,y:t}),h=s({x:d,y:d}),m=s({x:v,y:v});var b;!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"}(b||(b={}));const y=n=>{switch(n){case b.East:return"e-resize";case b.North:return"n-resize";case b.NorthEast:return"ne-resize";case b.NorthWest:return"nw-resize";case b.South:return"s-resize";case b.SouthEast:return"se-resize";case b.SouthWest:return"sw-resize";case b.West:return"w-resize";default:return"pointer"}};var w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(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 I=g((function(n,t){function r(n){return n}function e(n){return function(){return n}}function u(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return o(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(o(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(o(i(u(e(r(t(n.apply(this,arguments)))))))))}}}function i(){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=u,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=i,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,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return o(i(u(e(r(t(n))))));case 8:return c(o(i(u(e(r(t(n)))))));case 9:return f(c(o(i(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}},t.hole=i,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 u(n,t)},empty:r}}})),O=g((function(n,t){var r=w&&w.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,u=0,i=t.length;u<i;u++)!e&&u in t||(e||(e=Array.prototype.slice.call(t,0,u)),e[u]=t[u]);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)}})),j=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceS=t.sequenceT=t.getApplySemigroup=t.apS=t.apSecond=t.apFirst=t.ap=void 0;var i=u(O);function o(n,t,r){return function(e){for(var u=Array(r.length+1),i=0;i<r.length;i++)u[i]=r[i];return u[r.length]=e,0===t?n.apply(null,u):o(n,t-1,u)}}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(u){return[n,t,r,e,u]}}}}}};function f(n){return i.has.call(c,n)||(c[n]=o(I.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,u=f(e),i=n.map(t[0],u),o=1;o<e;o++)i=n.ap(i,t[o]);return i}},t.sequenceS=function(n){return function(t){for(var r=Object.keys(t),e=r.length,u=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 u;return(u={})[n[0]]=t,u[n[1]]=r,u[n[2]]=e,u}}};case 4:return function(t){return function(r){return function(e){return function(u){var i;return(i={})[n[0]]=t,i[n[1]]=r,i[n[2]]=e,i[n[3]]=u,i}}}};case 5:return function(t){return function(r){return function(e){return function(u){return function(i){var o;return(o={})[n[0]]=t,o[n[1]]=r,o[n[2]]=e,o[n[3]]=u,o[n[4]]=i,o}}}}};default:return o((function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var u={},i=0;i<t;i++)u[n[i]]=r[i];return u}),t-1,[])}}(r),i=n.map(t[r[0]],u),c=1;c<e;c++)i=n.ap(i,t[r[c]]);return i}}})),R=g((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,I.pipe)(n,e(t))}}}})),_=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicativeComposition=t.getApplicativeMonoid=void 0,t.getApplicativeMonoid=function(n){var t=(0,j.getApplySemigroup)(n);return function(r){return{concat:t(r).concat,empty:n.of(r.empty)}}},t.getApplicativeComposition=function(n,t){var r=(0,R.getFunctorComposition)(n,t).map,e=(0,j.ap)(n,t);return{map:r,of:function(r){return n.of(t.of(r))},ap:function(n,t){return(0,I.pipe)(n,e(t))}}}})),U=g((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))}))}))}}}})),M=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterOrElse=t.chainFirstEitherK=t.chainEitherK=t.fromEitherK=t.chainOptionK=t.fromOptionK=t.fromPredicate=t.fromOption=void 0;var i=u(O);function o(n){return function(t){return function(r){return n.fromEither(i.isNone(r)?i.left(t()):i.right(r.value))}}}function c(n){var t=o(n);return function(n){var r=t(n);return function(n){return(0,I.flow)(n,r)}}}function f(n){return function(t){return(0,I.flow)(t,n.fromEither)}}t.fromOption=o,t.fromPredicate=function(n){return function(t,r){return function(e){return n.fromEither(t(e)?i.right(e):i.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=f,t.chainEitherK=function(n,t){var r=f(n);return function(n){return function(e){return t.chain(e,r(n))}}},t.chainFirstEitherK=function(n,t){return(0,I.flow)(f(n),(0,U.chainFirst)(t))},t.filterOrElse=function(n,t){return function(r,e){return function(u){return t.chain(u,(function(t){return n.fromEither(r(t)?i.right(t):i.left(e(t)))}))}}}})),x=g((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,I.flow)(n,t)}},t.URI="Predicate",t.getSemigroupAny=function(){return{concat:function(n,r){return(0,I.pipe)(n,(0,t.or)(r))}}},t.getMonoidAny=function(){return{concat:(0,t.getSemigroupAny)().concat,empty:I.constFalse}},t.getSemigroupAll=function(){return{concat:function(n,r){return(0,I.pipe)(n,(0,t.and)(r))}}},t.getMonoidAll=function(){return{concat:(0,t.getSemigroupAll)().concat,empty:I.constTrue}},t.Contravariant={URI:t.URI,contramap:function(n,r){return(0,I.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)}}}})),E=g((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)}}}})),A=g((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,I.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()}}})),T=g((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 u=n[e].compare(t[e],r[e]);if(0!==u)return u}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 u=n.compare(t,e);return 0!==u?u: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,I.pipe)(n,(0,t.contramap)(r))}},t.trivial={equals:I.constTrue,compare:(0,I.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(u){return e(r(u,t),n)}}},t.between=function(n){var r=(0,t.lt)(n),e=(0,t.gt)(n);return function(n,t){return function(u){return!r(u,n)&&!e(u,t)}}},t.getTupleOrd=t.tuple,t.getDualOrd=t.reverse,t.ord=t.Contravariant;var r={equals:A.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,I.pipe)(t.ordNumber,(0,t.contramap)((function(n){return n.valueOf()})))})),W=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O),o=u(E),c=u(T);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=o.reverse,t.struct=function(n){return{concat:function(t,r){var e={};for(var u in n)i.has.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));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:I.identity}},t.last=function(){return{concat:function(n,t){return t}}},t.concatAll=o.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=I.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}}})),P=g((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,I.pipe)(n,(0,t.mapLeft)(r))},bimap:function(n,r,e){return(0,I.pipe)(n,(0,t.bimap)(r,e))}},t.Functor={URI:t.URI,map:function(n,r){return(0,I.pipe)(n,(0,t.map)(r))}},t.flap=(0,R.flap)(t.Functor),t.left=function(n){return n.left},t.right=function(n){return n.right}})),S=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterE=t.witherDefault=t.wiltDefault=void 0;var i=u(O);t.wiltDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,u){return r.map(e(n,u),t.separate)}}},t.witherDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,u){return r.map(e(n,u),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?i.some(r):i.none}))}))}}}}})),k=g((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()}}})),N=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O);t.none=i.none,t.some=i.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 o=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},f=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},a=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},s=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},v=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},d=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},l=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},p=function(n,r){return(0,I.pipe)(n,(0,t.filter)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.filterMap)(r))},m=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},b=function(n,r){return(0,I.pipe)(n,(0,t.partition)(r))},y=function(n,r){return(0,I.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:o},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:o,ap:c},t.Applicative={URI:t.URI,map:o,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:o,ap:c,chain:f},t.Monad={URI:t.URI,map:o,ap:c,of:t.of,chain:f},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:a,foldMap:s,reduceRight:v},t.altW=function(n){return function(r){return(0,t.isNone)(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:o,alt:l},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:o,ap:c,of:t.of,alt:l,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:o,extend:m},t.compact=(0,t.chain)(I.identity);var g=(0,P.separated)(t.none,t.none);t.separate=function(n){return(0,t.isNone)(n)?g:(0,P.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,P.separated)(p(t,(0,x.not)(n)),p(t,n))}},t.partitionMap=function(n){return(0,I.flow)((0,t.map)(n),t.separate)},t.Filterable={URI:t.URI,map:o,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y},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:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence};var E=(0,S.witherDefault)(t.Traversable,t.Compactable),A=(0,S.wiltDefault)(t.Traversable,t.Compactable);t.wither=function(n){var t=E(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=A(n);return function(n){return function(r){return t(r,n)}}},t.Witherable={URI:t.URI,map:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y,wither:E,wilt:A},t.throwError=function(){return t.none},t.MonadThrow={URI:t.URI,map:o,ap:c,of:t.of,chain:f,throwError:t.throwError},t.fromEither=t.getRight,t.FromEither={URI:t.URI,fromEither:t.fromEither},t.isSome=i.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,R.flap)(t.Functor),t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.apSecond)(t.Apply),t.flatten=t.compact,t.chainFirst=(0,U.chainFirst)(t.Chain),t.duplicate=(0,t.extend)(I.identity),t.fromEitherK=(0,M.fromEitherK)(t.FromEither),t.chainEitherK=(0,M.chainEitherK)(t.FromEither,t.Chain),t.chainFirstEitherK=(0,M.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,I.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)(I.constNull,I.identity),t.toUndefined=(0,t.match)(I.constUndefined,I.identity),t.elem=function n(r){return function(e,u){if(void 0===u){var i=n(r);return function(n){return i(e,n)}}return!(0,t.isNone)(u)&&r.equals(e,u.value)}},t.exists=function(n){return function(r){return!(0,t.isNone)(r)&&n(r.value)}},t.Do=(0,t.of)(i.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.Apply),t.ApT=(0,t.of)(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,i.head(r));if((0,t.isNone)(e))return t.none;for(var u=[e.value],o=1;o<r.length;o++){var c=n(o,r[o]);if((0,t.isNone)(c))return t.none;u.push(c.value)}return(0,t.some)(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return i.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)(I.identity),t.getRefinement=function(n){return function(r){return(0,t.isSome)(n(r))}},t.mapNullable=t.chainNullableK,t.option={URI:t.URI,map:o,of:t.of,ap:c,chain:f,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,zero:t.zero,alt:l,extend:m,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y,wither:E,wilt:A,throwError:t.throwError},t.getApplySemigroup=(0,j.getApplySemigroup)(t.Apply),t.getApplyMonoid=(0,_.getApplicativeMonoid)(t.Applicative),t.getFirstMonoid=function(){return(0,t.getMonoid)((0,W.first)())},t.getLastMonoid=function(){return(0,t.getMonoid)((0,W.last)())}}));const C=n=>!("isConnected"in n)||n.isConnected,q=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys())n.set(t,n.get(t).filter(C))})(...t)}),2e3)}})(),z=(r,e)=>{const u=((n,t=((n,t)=>n!==t))=>{let r=new Map(Object.entries(null!=n?n:{}));const e={dispose:[],get:[],set:[],reset:[]},u=()=>{r=new Map(Object.entries(null!=n?n:{})),e.reset.forEach((n=>n()))},i=n=>(e.get.forEach((t=>t(n))),r.get(n)),o=(n,u)=>{const i=r.get(n);t(u,i,n)&&(r.set(n,u),e.set.forEach((t=>t(n,u,i))))},c="undefined"==typeof Proxy?{}:new Proxy(n,{get:(n,t)=>i(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>r.has(t),set:(n,t,r)=>(o(t,r),!0)}),f=(n,t)=>(e[n].push(t),()=>{((n,t)=>{const r=n.indexOf(t);r>=0&&(n[r]=n[n.length-1],n.length--)})(e[n],t)});return{state:c,get:i,set:o,on:f,onChange:(t,r)=>{const e=f("set",((n,e)=>{n===t&&r(e)})),u=f("reset",(()=>r(n[t])));return()=>{e(),u()}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(f("set",t.set)),t.get&&n.push(f("get",t.get)),t.reset&&n.push(f("reset",t.reset)),t.dispose&&n.push(f("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{e.dispose.forEach((n=>n())),u()},reset:u,forceUpdate:n=>{const t=r.get(n);e.set.forEach((r=>r(n,t,t)))}}})(r,e);return u.use((()=>{if("function"!=typeof n)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const e=n();e&&((n,t,r)=>{const e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])})(r,t,e)},set:n=>{const e=r.get(n);e&&r.set(n,e.filter(t)),q(r)},reset:()=>{r.forEach((n=>n.forEach(t))),q(r)}}})()),u};function D(n,t,r){return function(e){for(var u=Array(r.length+1),i=0;i<r.length;i++)u[i]=r[i];return u[r.length]=e,0===t?n.apply(null,u):D(n,t-1,u)}}var F={1:function(n){return[n]},2:function(n){return function(t){return[n,t]}},3:function(n){return function(t){return function(r){return[n,t,r]}}},4:function(n){return function(t){return function(r){return function(e){return[n,t,r,e]}}}},5:function(n){return function(t){return function(r){return function(e){return function(u){return[n,t,r,e,u]}}}}}};function L(n){return a.call(F,n)||(F[n]=D(u,n-1,[])),F[n]}function H(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=t.length,u=L(e),i=n.map(t[0],u),o=1;o<e;o++)i=n.ap(i,t[o]);return i}}function B(n){return function(t){return function(r){return n.fromEither("None"===r._tag?c(t()):f(r.value))}}}var G=c,V=f,$=function(n,t){return i(n,J(t))},J=function(n){return function(t){return Y(t)?t:V(n(t.right))}},K={URI:"Either",map:$},X={URI:"Either",map:$,ap:function(n,t){return i(n,function(n){return function(t){return Y(t)?t:Y(n)?n:V(t.right(n.right))}}(t))}},Z=function(n){return function(t){return Y(t)?G(n(t.left)):t}},Q=B({URI:"Either",fromEither:r}),Y=function(n){return"Left"===n._tag},nn=function(n,t){return function(r){return Y(r)?n(r.left):t(r.right)}},tn=o,rn=function(n){return{_tag:"Some",value:n}},en=function(n){return{concat:function(t,r){return on(t)?r:on(r)?t:rn(n.concat(t.value,r.value))},empty:tn}},un=function(n){return function(t){return on(t)?tn:rn(n(t.value))}},on=function(n){return"None"===n._tag},cn=function(n,t){return function(r){return on(r)?n():t(r.value)}},fn=cn,an=function(n){return null==n?tn:rn(n)};function sn(n){return function(t){return n.map(t,V)}}function vn(n){return function(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}(n,K)}function dn(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,X)}function ln(n){return function(t){return function(r){return n.chain(r,(function(r){return Y(r)?n.of(r):t(r.right)}))}}}function pn(n){return function(t){return function(r){return n.map(r,Z(t))}}}function hn(n,t){return function(r){var u=e(r,n.fromTask);return function(n){return t.chain(n,u)}}}var mn=function(n){return function(){return Promise.resolve().then(n)}},bn=function(n,t){return i(n,wn(t))},yn=function(n,t){return i(n,gn(t))},wn=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},gn=function(n){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},In=function(n){return function(){return Promise.resolve(n)}},On={URI:"Task",map:bn},jn={URI:"Task",map:bn,ap:yn},Rn={URI:"Task",map:bn,of:In,ap:yn,chain:function(n,t){return i(n,function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}}(t))}},_n=sn(On),Un=e(mn,_n),Mn=_n,xn=In,En=vn(On),An=pn(On),Tn=dn(jn),Wn=ln(Rn),Pn=Wn,Sn="TaskEither",kn={URI:Sn,map:function(n,t){return i(n,En(t))},ap:function(n,t){return i(n,Tn(t))},chain:function(n,t){return i(n,Wn(t))}},Nn=B({URI:Sn,fromEither:xn}),Cn=hn({URI:Sn,fromIO:Un,fromTask:Mn},kn),qn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactableComposition=t.separate=t.compact=void 0;var i=u(P);function o(n,t){return function(r){return n.map(r,t.compact)}}function c(n,t,r){var e=o(n,t),u=(0,R.map)(n,r);return function(n){return i.separated(e((0,I.pipe)(n,u(N.getLeft))),e((0,I.pipe)(n,u(N.getRight))))}}t.compact=o,t.separate=c,t.getCompactableComposition=function(n,t){return{map:(0,R.getFunctorComposition)(n,t).map,compact:o(n,t),separate:c(n,t,t)}}})),zn=g((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}})),Dn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O);t.left=i.left,t.right=i.right;var o=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},f=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},a=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},s=function(n){return function(r,e){var u=(0,t.foldMap)(n);return(0,I.pipe)(r,u(e))}},v=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},d=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},l=function(n,r,e){return(0,I.pipe)(n,(0,t.bimap)(r,e))},p=function(n,r){return(0,I.pipe)(n,(0,t.mapLeft)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},m=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},b=function(n,r){return(0,zn.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,u){return e===u||((0,t.isLeft)(e)?(0,t.isLeft)(u)&&n.equals(e.left,u.left):(0,t.isRight)(u)&&r.equals(e.right,u.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,P.separated)(n,n):(0,t.isLeft)(n.right)?(0,P.separated)((0,t.right)(n.right.left),r):(0,P.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:o,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 u=e(n.right);return"None"===u._tag?r:(0,t.right)(u.value)},partition:function(n,e){return(0,t.isLeft)(n)?(0,P.separated)(n,n):e(n.right)?(0,P.separated)(r,(0,t.right)(n.right)):(0,P.separated)((0,t.right)(n.right),r)},partitionMap:function(n,e){if((0,t.isLeft)(n))return(0,P.separated)(n,n);var u=e(n.right);return(0,t.isLeft)(u)?(0,P.separated)((0,t.right)(u.left),r):(0,P.separated)(r,(0,t.right)(u.right))}}},t.getWitherable=function(n){var r=(0,t.getFilterable)(n),e=(0,t.getCompactable)(n);return{URI:t.URI,_E:void 0,map:o,compact:r.compact,separate:r.separate,filter:r.filter,filterMap:r.filterMap,partition:r.partition,partitionMap:r.partitionMap,traverse:d,sequence:t.sequence,reduce:a,foldMap:s,reduceRight:v,wither:(0,S.witherDefault)(t.Traversable,e),wilt:(0,S.wiltDefault)(t.Traversable,e)}},t.getApplicativeValidation=function(n){return{URI:t.URI,_E:void 0,map:o,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:o,alt:function(r,e){if((0,t.isRight)(r))return r;var u=e();return(0,t.isLeft)(u)?(0,t.left)(n.concat(r.left,u.left)):u}}},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:o},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:o,ap:c},t.Applicative={URI:t.URI,map:o,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:o,ap:c,chain:f},t.Monad={URI:t.URI,map:o,ap:c,of:t.of,chain:f},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:a,foldMap:s,reduceRight:v},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:o,reduce:a,foldMap:s,reduceRight:v,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:l,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:o,alt:h},t.extend=function(n){return function(r){return(0,t.isLeft)(r)?r:(0,t.right)(n(r))}},t.Extend={URI:t.URI,map:o,extend:m},t.ChainRec={URI:t.URI,map:o,ap:c,chain:f,chainRec:b},t.throwError=t.left,t.MonadThrow={URI:t.URI,map:o,ap:c,of:t.of,chain:f,throwError:t.throwError},t.FromEither={URI:t.URI,fromEither:I.identity},t.fromPredicate=(0,M.fromPredicate)(t.FromEither),t.fromOption=(0,M.fromOption)(t.FromEither),t.isLeft=i.isLeft,t.isRight=i.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,R.flap)(t.Functor),t.apFirst=(0,j.apFirst)(t.Apply),t.apFirstW=t.apFirst,t.apSecond=(0,j.apSecond)(t.Apply),t.apSecondW=t.apSecond,t.chainFirst=(0,U.chainFirst)(t.Chain),t.chainFirstW=t.chainFirst,t.flattenW=(0,t.chainW)(I.identity),t.flatten=t.flattenW,t.duplicate=(0,t.extend)(I.identity),t.fromOptionK=(0,M.fromOptionK)(t.FromEither),t.chainOptionK=(0,M.chainOptionK)(t.FromEither,t.Chain),t.filterOrElse=(0,M.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=[],u=0;u<arguments.length;u++)e[u]=arguments[u];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,I.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)(I.identity,I.identity),t.toError=function(n){return n instanceof Error?n:new Error(String(n))},t.elem=function n(r){return function(e,u){if(void 0===u){var i=n(r);return function(n){return i(e,n)}}return!(0,t.isLeft)(u)&&r.equals(e,u.right)}},t.exists=function(n){return function(r){return!(0,t.isLeft)(r)&&n(r.right)}},t.Do=(0,t.of)(i.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.bindW=t.bind,t.apS=(0,j.apS)(t.Apply),t.apSW=t.apS,t.ApT=(0,t.of)(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,i.head(r));if((0,t.isLeft)(e))return e;for(var u=[e.right],o=1;o<r.length;o++){var c=n(o,r[o]);if((0,t.isLeft)(c))return c;u.push(c.right)}return(0,t.right)(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return i.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)(I.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:o,of:t.of,ap:c,chain:f,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,bimap:l,mapLeft:p,alt:h,extend:m,chainRec:b,throwError:t.throwError},t.getApplySemigroup=(0,j.getApplySemigroup)(t.Apply),t.getApplyMonoid=(0,_.getApplicativeMonoid)(t.Applicative),t.getValidationSemigroup=function(n,r){return(0,j.getApplySemigroup)((0,t.getApplicativeValidation)(n))(r)},t.getValidationMonoid=function(n,r){return(0,_.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:o,of:t.of,chain:f,bimap:l,mapLeft:p,reduce:a,foldMap:s,reduceRight:v,extend:m,traverse:d,sequence:t.sequence,chainRec:b,throwError:t.throwError,ap:r,alt:e}}})),Fn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(Dn);function o(n){return(0,I.flow)(i.right,n.of)}function c(n){return(0,I.flow)(i.left,n.of)}function f(n){return function(t){return n.map(t,i.right)}}function a(n){return function(t){return n.map(t,i.left)}}function s(n){return function(t){return(0,I.flow)(i.fromNullable(t),n.of)}}function v(n){var t=s(n);return function(n){var r=t(n);return function(n){return(0,I.flow)(n,r)}}}function d(n){return(0,R.map)(n,i.Functor)}function l(n){return(0,j.ap)(n,i.Apply)}function p(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?n.of(r):t(r.right)}))}}}function h(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?t():n.of(r)}))}}}function m(n){return function(t,r){return function(e){return n.map(e,i.bimap(t,r))}}}function b(n){return function(t){return function(r){return n.map(r,i.mapLeft(t))}}}function y(n){return function(t,r){return function(e){return n.chain(e,i.match(t,r))}}}function g(n){return function(t){return function(r){return n.chain(r,i.match(t,n.of))}}}function O(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?t(r.left):n.of(r)}))}}}function _(n){return function(t){return n.map(t,i.swap)}}t.right=o,t.left=c,t.rightF=f,t.leftF=a,t.fromNullable=s,t.fromNullableK=v,t.chainNullableK=function(n){var t=p(n),r=v(n);return function(n){var e=r(n);return function(n){return t(e(n))}}},t.map=d,t.ap=l,t.chain=p,t.alt=h,t.bimap=m,t.mapLeft=b,t.altValidation=function(n,t){return function(r){return function(e){return n.chain(e,i.match((function(e){return n.map(r(),i.mapLeft((function(n){return t.concat(e,n)})))}),o(n)))}}},t.match=function(n){return function(t,r){return function(e){return n.map(e,i.match(t,r))}}},t.matchE=y,t.getOrElse=g,t.orElse=O,t.orElseFirst=function(n){var t=O(n);return function(r){return t((function(t){return n.map(r(t),(function(n){return i.isLeft(n)?n:i.left(t)}))}))}},t.orLeft=function(n){return function(t){return function(r){return n.chain(r,i.match((function(r){return n.map(t(r),i.left)}),(function(t){return n.of(i.right(t))})))}}},t.swap=_,t.toUnion=function(n){return function(t){return n.map(t,i.toUnion)}},t.getEitherM=function(n){var t=l(n),r=d(n),e=p(n),u=h(n),i=m(n),s=b(n),v=y(n),w=g(n),j=O(n);return{map:function(n,t){return(0,I.pipe)(n,r(t))},ap:function(n,r){return(0,I.pipe)(n,t(r))},of:o(n),chain:function(n,t){return(0,I.pipe)(n,e(t))},alt:function(n,t){return(0,I.pipe)(n,u(t))},bimap:function(n,t,r){return(0,I.pipe)(n,i(t,r))},mapLeft:function(n,t){return(0,I.pipe)(n,s(t))},fold:function(n,t,r){return(0,I.pipe)(n,v(t,r))},getOrElse:function(n,t){return(0,I.pipe)(n,w(t))},orElse:function(n,t){return(0,I.pipe)(n,j(t))},swap:_(n),rightM:f(n),leftM:a(n),left:c(n)}}})),Ln=g((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 u(n,t){var e=r(n,t);return function(n){var t=e((0,x.not)(n)),r=e(n);return function(n){return(0,P.separated)(t(n),r(n))}}}function i(n,t){var r=e(n,t);return function(n){return function(t){return(0,P.separated)((0,I.pipe)(t,r((function(t){return(0,N.getLeft)(n(t))}))),(0,I.pipe)(t,r((function(t){return(0,N.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=u,t.partitionMap=i,t.getFilterableComposition=function(n,t){var o=(0,R.getFunctorComposition)(n,t).map,c=(0,qn.compact)(n,t),f=(0,qn.separate)(n,t,t),a=r(n,t),s=e(n,t),v=u(n,t),d=i(n,t);return{map:o,compact:c,separate:f,filter:function(n,t){return(0,I.pipe)(n,a(t))},filterMap:function(n,t){return(0,I.pipe)(n,s(t))},partition:function(n,t){return(0,I.pipe)(n,v(t))},partitionMap:function(n,t){return(0,I.pipe)(n,d(t))}}}})),Hn=g((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,I.flow)(t,n.fromIO)}},t.chainIOK=function(n,t){return function(r){var e=(0,I.flow)(r,n.fromIO);return function(n){return t.chain(n,e)}}},t.chainFirstIOK=function(n,t){var r=(0,U.chainFirst)(t);return function(t){return r((0,I.flow)(t,n.fromIO))}}})),Bn=g((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,I.flow)(t,n.fromTask)}},t.chainTaskK=function(n,t){return function(r){var e=(0,I.flow)(r,n.fromTask);return function(n){return t.chain(n,e)}}},t.chainFirstTaskK=function(n,t){var r=(0,U.chainFirst)(t);return function(t){return r((0,I.flow)(t,n.fromTask))}}})),Gn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O);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 o=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},c=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},f=function(n,r){return(0,I.pipe)(n,(0,t.chain)((function(n){return(0,I.pipe)(r,(0,t.map)(n))})))},a=function(n,r){return(0,I.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)(I.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:o},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:o,ap:c},t.apFirst=(0,j.apFirst)(t.ApplyPar),t.apSecond=(0,j.apSecond)(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:o,ap:c,of:t.of},t.ApplySeq={URI:t.URI,map:o,ap:f},t.ApplicativeSeq={URI:t.URI,map:o,ap:f,of:t.of},t.Chain={URI:t.URI,map:o,ap:c,chain:a},t.Monad={URI:t.URI,map:o,of:t.of,ap:c,chain:a},t.MonadIO={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO},t.fromTask=I.identity,t.MonadTask={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.chainFirst=(0,U.chainFirst)(t.Chain),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=(0,Hn.fromIOK)(t.FromIO),t.chainIOK=(0,Hn.chainIOK)(t.FromIO,t.Chain),t.chainFirstIOK=(0,Hn.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)(i.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.ApplyPar),t.ApT=(0,t.of)(i.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 i.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return i.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,i.head(t))).then(i.singleton))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return i.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)(I.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return(0,t.traverseReadonlyArrayWithIndexSeq)((function(t,r){return n(r)}))},t.sequenceSeqArray=(0,t.traverseSeqArray)(I.identity),t.task={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.taskSeq={URI:t.URI,map:o,of:t.of,ap:f,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.getSemigroup=(0,j.getApplySemigroup)(t.ApplySeq),t.getMonoid=(0,_.getApplicativeMonoid)(t.ApplicativeSeq)})),Vn=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},o=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,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=u(Dn),f=u(Fn),a=u(O),s=u(Gn);t.left=f.left(s.Pointed),t.right=f.right(s.Pointed),t.rightTask=f.rightF(s.Functor),t.leftTask=f.leftF(s.Functor),t.rightIO=(0,I.flow)(s.fromIO,t.rightTask),t.leftIO=(0,I.flow)(s.fromIO,t.leftTask),t.fromIO=t.rightIO,t.fromTask=t.rightTask,t.fromEither=s.of,t.fromIOEither=s.fromIO,t.fromTaskOption=function(n){return s.map(c.fromOption(n))},t.match=f.match(s.Functor),t.matchW=t.match,t.matchE=f.matchE(s.Monad),t.fold=t.matchE,t.matchEW=t.matchE,t.foldW=t.matchEW,t.getOrElse=f.getOrElse(s.Monad),t.getOrElseW=t.getOrElse,t.tryCatch=function(n,t){return function(){return i(void 0,void 0,void 0,(function(){var r;return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,n().then(a.right)];case 1:return[2,e.sent()];case 2:return r=e.sent(),[2,a.left(t(r))];case 3:return[2]}}))}))}},t.tryCatchK=function(n,r){return function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];return(0,t.tryCatch)((function(){return n.apply(void 0,e)}),r)}},t.toUnion=f.toUnion(s.Functor),t.fromNullable=f.fromNullable(s.Pointed),t.fromNullableK=f.fromNullableK(s.Pointed),t.chainNullableK=f.chainNullableK(s.Monad),t.orElse=f.orElse(s.Monad),t.orElseW=t.orElse,t.orElseFirst=f.orElseFirst(s.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=f.orLeft(s.Monad),t.swap=f.swap(s.Functor),t.fromTaskOptionK=function(n){var r=(0,t.fromTaskOption)(n);return function(n){return(0,I.flow)(n,r)}},t.chainTaskOptionKW=function(n){return function(r){return function(e){return(0,I.pipe)(e,(0,t.chain)((0,t.fromTaskOptionK)(n)(r)))}}},t.chainTaskOptionK=t.chainTaskOptionKW,t.fromIOEitherK=function(n){return(0,I.flow)(n,t.fromIOEither)},t.chainIOEitherKW=function(n){return(0,t.chainW)((0,t.fromIOEitherK)(n))},t.chainIOEitherK=t.chainIOEitherKW;var v=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},l=function(n,r){return(0,I.pipe)(n,(0,t.chain)((function(n){return(0,I.pipe)(r,(0,t.map)(n))})))},p=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},h=function(n,r,e){return(0,I.pipe)(n,(0,t.bimap)(r,e))},m=function(n,r){return(0,I.pipe)(n,(0,t.mapLeft)(r))},b=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))};function y(n,r){var e=(0,j.ap)(n,c.getApplicativeValidation(r));return{URI:t.URI,_E:void 0,map:v,ap:function(n,t){return(0,I.pipe)(n,e(t))},of:t.of}}function g(n){var r=f.altValidation(s.Monad,n);return{URI:t.URI,_E:void 0,map:v,alt:function(n,t){return(0,I.pipe)(n,r(t))}}}t.map=f.map(s.Functor),t.bimap=f.bimap(s.Functor),t.mapLeft=f.mapLeft(s.Functor),t.ap=f.ap(s.ApplyPar),t.apW=t.ap,t.chain=f.chain(s.Monad),t.chainW=t.chain,t.flattenW=(0,t.chainW)(I.identity),t.flatten=t.flattenW,t.alt=f.alt(s.Monad),t.altW=t.alt,t.of=t.right,t.throwError=t.left,t.URI="TaskEither",t.getApplicativeTaskValidation=y,t.getAltTaskValidation=g,t.getCompactable=function(n){var r=c.getCompactable(n);return{URI:t.URI,_E:void 0,compact:(0,qn.compact)(s.Functor,r),separate:(0,qn.separate)(s.Functor,r,c.Functor)}},t.getFilterable=function(n){var r=c.getFilterable(n),e=(0,t.getCompactable)(n),u=(0,Ln.filter)(s.Functor,r),i=(0,Ln.filterMap)(s.Functor,r),o=(0,Ln.partition)(s.Functor,r),f=(0,Ln.partitionMap)(s.Functor,r);return{URI:t.URI,_E:void 0,map:v,compact:e.compact,separate:e.separate,filter:function(n,t){return(0,I.pipe)(n,u(t))},filterMap:function(n,t){return(0,I.pipe)(n,i(t))},partition:function(n,t){return(0,I.pipe)(n,o(t))},partitionMap:function(n,t){return(0,I.pipe)(n,f(t))}}},t.Functor={URI:t.URI,map:v},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:v,ap:d},t.apFirst=(0,j.apFirst)(t.ApplyPar),t.apFirstW=t.apFirst,t.apSecond=(0,j.apSecond)(t.ApplyPar),t.apSecondW=t.apSecond,t.ApplicativePar={URI:t.URI,map:v,ap:d,of:t.of},t.ApplySeq={URI:t.URI,map:v,ap:l},t.ApplicativeSeq={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:d,chain:p},t.Monad={URI:t.URI,map:v,ap:d,chain:p,of:t.of},t.MonadIO={URI:t.URI,map:v,ap:d,chain:p,of:t.of,fromIO:t.fromIO},t.MonadTask={URI:t.URI,map:v,ap:d,chain:p,of:t.of,fromIO:t.fromIO,fromTask:t.fromTask},t.MonadThrow={URI:t.URI,map:v,ap:d,chain:p,of:t.of,throwError:t.throwError},t.chainFirst=(0,U.chainFirst)(t.Chain),t.chainFirstW=t.chainFirst,t.Bifunctor={URI:t.URI,bimap:h,mapLeft:m},t.Alt={URI:t.URI,map:v,alt:b},t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromOption=(0,M.fromOption)(t.FromEither),t.fromOptionK=(0,M.fromOptionK)(t.FromEither),t.chainOptionK=(0,M.chainOptionK)(t.FromEither,t.Chain),t.chainEitherK=(0,M.chainEitherK)(t.FromEither,t.Chain),t.chainEitherKW=t.chainEitherK,t.chainFirstEitherK=(0,M.chainFirstEitherK)(t.FromEither,t.Chain),t.chainFirstEitherKW=t.chainFirstEitherK,t.fromPredicate=(0,M.fromPredicate)(t.FromEither),t.filterOrElse=(0,M.filterOrElse)(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.fromEitherK=(0,M.fromEitherK)(t.FromEither),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=(0,Hn.fromIOK)(t.FromIO),t.chainIOK=(0,Hn.chainIOK)(t.FromIO,t.Chain),t.chainFirstIOK=(0,Hn.chainFirstIOK)(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.fromTaskK=(0,Bn.fromTaskK)(t.FromTask),t.chainTaskK=(0,Bn.chainTaskK)(t.FromTask,t.Chain),t.chainFirstTaskK=(0,Bn.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?a.left(n):a.right(t))})))}))}}},t.bracket=function(n,r,e){return(0,t.bracketW)(n,r,e)},t.bracketW=function(n,r,e){return(0,I.pipe)(n,(0,t.chainW)((function(n){return(0,I.pipe)(r(n),s.chain((function(r){return(0,I.pipe)(e(n,r),(0,t.chainW)((function(){return s.of(r)})))})))})))},t.Do=(0,t.of)(a.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.bindW=t.bind,t.apS=(0,j.apS)(t.ApplyPar),t.apSW=t.apS,t.ApT=(0,t.of)(a.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return(0,I.flow)(s.traverseReadonlyNonEmptyArrayWithIndex(n),s.map(c.traverseReadonlyNonEmptyArrayWithIndex(I.SK)))},t.traverseReadonlyArrayWithIndex=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return a.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return a.tail(t).reduce((function(t,r,e){return t.then((function(u){return a.isLeft(u)?t:n(e+1,r)().then((function(n){return a.isLeft(n)?n:(u.right.push(n.right),u)}))}))}),n(0,a.head(t))().then(c.map(a.singleton)))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=(0,t.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return a.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)(I.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return(0,t.traverseReadonlyArrayWithIndexSeq)((function(t,r){return n(r)}))},t.sequenceSeqArray=(0,t.traverseSeqArray)(I.identity),t.taskEither={URI:t.URI,bimap:h,mapLeft:m,map:v,of:t.of,ap:d,chain:p,alt:b,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.taskEitherSeq={URI:t.URI,bimap:h,mapLeft:m,map:v,of:t.of,ap:l,chain:p,alt:b,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.getApplySemigroup=(0,j.getApplySemigroup)(t.ApplySeq),t.getApplyMonoid=(0,_.getApplicativeMonoid)(t.ApplicativeSeq),t.getSemigroup=function(n){return(0,j.getApplySemigroup)(s.ApplySeq)(c.getSemigroup(n))},t.getTaskValidation=function(n){var r=y(s.ApplicativePar,n),e=g(n);return{URI:t.URI,_E:void 0,map:v,ap:r.ap,of:t.of,chain:p,bimap:h,mapLeft:m,alt:e.alt,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError}}})),$n=function(n){return 0===n.length};const{state:Jn}=z(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0})),Kn=n=>({kind:"server",inner:n}),Xn={kind:"client",inner:"Token not exist or empty"},Zn={kind:"client",inner:"Api path empty or missing"},Qn=en({concat:function(n,t){return n+t},empty:""}),Yn=()=>i(en({concat:r}).concat(an(Jn.apiPath),an("https://api.vviinn.com")),Q((()=>Zn))),nt=s({method:{concat:(n,t)=>{return i(Qn.concat(an(n),an(t)),(r=()=>"GET",function(n){return on(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}}}),tt=n=>({method:n}),rt=V(tt("GET")),et=V(tt("POST")),ut=n=>n.status>=200&&n.status<300?Vn.right(n):Vn.left(n),it=nt,ot=(n,t)=>([r,e])=>{const u=new URL(n,r),i=it.concat(e,t);return I.pipe(((n,t={})=>I.pipe(((n,t={method:"GET"})=>Vn.tryCatch((()=>fetch(n,t)),(n=>n)))(n,t),Vn.chain(ut),Vn.chain((n=>function(n){return Vn.fromTask((()=>n.json()))}(n)))))(u.toString(),i),Vn.mapLeft(Kn))},ct=n=>(n=>0===n.length)(n)?G("entity is empty"):V(n),ft=n=>{return i(n,("entity not exist",function(n){return null==n?G("entity not exist"):V(n)}),(t=ct,function(n){return Y(n)?n:t(n.right)}));var t},at=n=>new Headers({Authorization:`Bearer ${n}`}),st=n=>i(n,ft,Dn.mapLeft((()=>Xn))),vt=n=>i(n,st,Dn.map(at)),dt=j.sequenceT(Dn.Apply),lt={equals:(n,t)=>n.class===t.class&&n.score===t.score&&n.rectangle.left===t.rectangle.left&&n.rectangle.top===t.rectangle.top&&n.rectangle.height===t.rectangle.height&&n.rectangle.width===t.rectangle.width};var pt;!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"}(pt||(pt={}));const ht=n=>{switch(n.type){case"array":return n.value.map(ht);default:return n.value}},mt=n=>t=>i(dt(Yn(),V(tt(n.method))),xn,Pn(ot(n.href,t))),bt=(n,t)=>{const r=l(n),e=m.concat(r,t);return Object.assign(Object.assign({},e),{width:n.width,height:n.height})},yt=(n,t)=>{switch(t.direction){case b.NorthEast:return((n,t)=>{const r=m.concat(l(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 b.NorthWest:return((n,t)=>{const r=m.concat(l(n),t.position);return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height-t.position.y})})(n,t);case b.SouthEast:return((n,t)=>Object.assign(Object.assign({},n),{width:n.width+t.position.x,height:n.height+t.position.y}))(n,t);case b.SouthWest:return((n,t)=>{const r=m.concat(l(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)}},wt=n=>({x:0,y:0,width:n.width,height:n.height}),gt=n=>Object.assign({x:n.left,y:n.top},n),It=n=>t=>({x:t.x*n.width,y:t.y*n.height,width:t.width*n.width,height:t.height*n.height}),Ot=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var jt;!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"}(jt||(jt={}));const Rt=(n,t)=>{const r=new URLSearchParams(Object.entries(t));return[`${n.href}?${r.toString()}`,{method:"GET"}]},_t=(n,t)=>[n.href,{body:JSON.stringify(t),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],Ut=(n,t={})=>r=>I.pipe(dt(Yn(),I.pipe(((n,t)=>I.pipe(((n,t)=>{const r=n.map((n=>n.name)),e=Object.keys(t),u=r.filter((n=>!e.includes(n)));return 0===u.length?V(t):G(`Data should contains fields: ${u.join(", ")}`)})(n.value,t),J((t=>n.rel.includes("query-form")?Rt(n,t):_t(n,t)))))(n,t),Z((n=>({kind:"app",inner:n}))))),xn,Pn((n=>{const t=n[0],[e,u]=n[1];return ot(e,u)([t,r])}))),Mt=async n=>new Promise((t=>{const r=new FileReader;r.addEventListener("load",(()=>{t(r.result)})),r.readAsDataURL(n)})),xt=j.sequenceT(N.Apply),Et=n=>n.length>0?N.some(n):N.none;const At=["jpg","jpeg","png","webp"],Tt={kind:"client",inner:"File format not supported"},Wt=n=>{const t=n.type.split("/")[1],r=(e=r=>r===t?N.some(n):N.none,function(n){for(var t=0;t<n.length;t++){var r=e(n[t]);if("Some"===r._tag)return r}return o})(At);var e;return I.pipe(r,Dn.fromOption((()=>Tt)))},Pt={kind:"app",inner:"File doesnt exist"},St=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 kt=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.copy=void 0,t.copy=(n,t,r=0,e=0,u=n.width-r,i=n.height-e,o=0,c=0)=>{if(r|=0,e|=0,i|=0,o|=0,c|=0,(u|=0)<=0||i<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(t.data.buffer);for(let s=0;s<i;s++){const i=e+s;if(i<0||i>=n.height)continue;const v=c+s;if(!(v<0||v>=t.height))for(let e=0;e<u;e++){const u=r+e;if(u<0||u>=n.width)continue;const c=o+e;c<0||c>=t.width||(a[v*t.width+c]=f[i*n.width+u])}}}})),Nt=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CreateImageFactory=(n=[0,0,0,0],t=4)=>{if(t=Math.floor(t),isNaN(t)||t<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<t)throw TypeError(`fill should be iterable with at least ${t} members`);const r=(n=new Uint8ClampedArray(n).slice(0,t)).every((n=>0===n));return(e,u,i)=>{if(void 0===e||void 0===u)throw TypeError("Not enough arguments");if(e=Math.floor(e),u=Math.floor(u),isNaN(e)||e<1||isNaN(u)||u<1)throw TypeError("Index or size is negative or greater than the allowed amount");const o=e*u*t;if(void 0===i&&(i=new Uint8ClampedArray(o)),i instanceof Uint8ClampedArray){if(i.length!==o)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let r=0;r<u;r++)for(let u=0;u<e;u++){const o=(r*e+u)*t;for(let r=0;r<t;r++)i[o+r]=n[r]}return{get width(){return e},get height(){return u},get data(){return i}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory()})),Ct=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;const r=(n,t)=>{if(n<=-t||n>=t)return 0;if(0==n)return 0;const r=n*Math.PI;return Math.sin(r)/r*Math.sin(r/t)/(r/t)},e=n=>Math.round(16383*n);t.filters=(n,t,u,i,o)=>{const c=o?2:3,f=1/u,a=Math.min(1,u),s=c/a,v=Math.floor(2*(s+1)),d=new Int16Array((v+2)*t);let l=0;for(let u=0;u<t;u++){const o=(u+.5)*f+i,v=Math.max(0,Math.floor(o-s)),p=Math.min(n-1,Math.ceil(o+s)),h=p-v+1,m=new Float32Array(h),b=new Int16Array(h);let y=0,w=0;for(let n=v;n<=p;n++){const t=r((n+.5-o)*a,c);y+=t,m[w]=t,w++}let g=0;for(let n=0;n<m.length;n++){const t=m[n]/y;g+=t,b[n]=e(t)}b[t>>1]+=e(1-g);let I=0;for(;I<b.length&&0===b[I];)I++;let O=b.length-1;for(;O>0&&0===b[O];)O--;const j=O-I+1;d[l++]=v+I,d[l++]=j,d.set(b.subarray(I,O+1),l),l+=j}return d}})),qt=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convolve=void 0,t.convolve=(n,t,r,e,u,i)=>{let o=0,c=0;for(let f=0;f<e;f++){let a=0;for(let r=0;r<u;r++){let r=o+4*i[a++]|0,u=0,f=0,s=0,v=0;for(let t=i[a++];t>0;t--){const t=i[a++];u=u+t*n[r]|0,f=f+t*n[r+1]|0,s=s+t*n[r+2]|0,v=v+t*n[r+3]|0,r=r+4|0}t[c]=u+8192>>14,t[c+1]=f+8192>>14,t[c+2]=s+8192>>14,t[c+3]=v+8192>>14,c=c+4*e|0}c=4*(f+1)|0,o=(f+1)*r*4|0}}})),zt=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.lanczos2=t.lanczos=void 0;const r=(n,t,r=!1)=>{const e=t.height/n.height,u=Ct.filters(n.width,t.width,t.width/n.width,0,r),i=Ct.filters(n.height,t.height,e,0,r),o=new Uint8ClampedArray(t.width*n.height*4);qt.convolve(n.data,o,n.width,n.height,t.width,u),qt.convolve(o,t.data,n.height,t.width,t.height,i)};t.lanczos=(n,t,e=0,u=0,i=n.width-e,o=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,o|=0,c|=0,f|=0,a|=0,s|=0,(i|=0)<=0||o<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&i===n.width&&o===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t);const v=Nt.createImage(i,o),d=Nt.createImage(a,s);kt.copy(n,v,e,u),r(v,d),kt.copy(d,t,0,0,d.width,d.height,c,f)},t.lanczos2=(n,t,e=0,u=0,i=n.width-e,o=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,o|=0,c|=0,f|=0,a|=0,s|=0,(i|=0)<=0||o<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&i===n.width&&o===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t,!0);const v=Nt.createImage(i,o),d=Nt.createImage(a,s);kt.copy(n,v,e,u),r(v,d,!0),kt.copy(d,t,0,0,d.width,d.height,c,f)}})),Dt=g((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}}})),Ft=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,u=0,i=t.length;u<i;u++)!e&&u in t||(e||(e=Array.prototype.slice.call(t,0,u)),e[u]=t[u]);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 o=u(O),c=u(W);function f(n){return function(t){return t.concat(n)}}function a(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function s(n){return function(r){var e=r.length;if(0===e)return t.empty;for(var u=[],i=r[0],o=[i],c=1;c<e;c++){var f=r[c];n.equals(f,i)?o.push(f):(u.push(o),o=[i=f])}return u.push(o),u}}t.empty=o.emptyReadonlyArray,t.isNonEmpty=o.isNonEmpty,t.isOutOfBound=function(n,t){return n<0||n>=t.length},t.prependW=function(n){return function(t){return i([n],t,!0)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return i(i([],t,!0),[n],!1)}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if((0,t.isNonEmpty)(e)){var u=o.fromReadonlyNonEmptyArray(e);return u.splice(n,0,r),u}return[r]},t.unsafeUpdateAt=function(n,t,r){if(r[n]===t)return r;var e=o.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)],u=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},i=0,o=(0,t.tail)(r);i<o.length;i++)u(o[i]);return e}},t.sortBy=function(n){if((0,t.isNonEmpty)(n)){var r=(0,T.getMonoid)();return(0,t.sort)(n.reduce(r.concat,r.empty))}return I.identity},t.union=function(n){var r=(0,t.uniq)(n);return function(n){return function(t){return r((0,I.pipe)(t,a(n)))}}},t.rotate=function(n){return function(r){var e=r.length,u=Math.round(n)%e;if((0,t.isOutOfBound)(Math.abs(u),r)||0===u)return r;if(u<0){var i=(0,t.splitAt)(-u)(r);return(0,I.pipe)(i[1],a(i[0]))}return(0,t.rotate)(u-e)(r)}},t.fromReadonlyArray=function(n){return(0,t.isNonEmpty)(n)?o.some(n):o.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],u=1;u<r;u++)e.push(n(u));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=f,t.concat=a,t.reverse=function(n){return 1===n.length?n:i([(0,t.last)(n)],n.slice(0,-1).reverse(),!0)},t.group=s,t.groupBy=function(n){return function(t){for(var r={},e=0,u=t;e<u.length;e++){var i=u[e],c=n(i);o.has.call(r,c)?r[c].push(i):r[c]=[i]}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)?o.none:o.some((0,t.unsafeUpdateAt)(n,r(e[n]),e))}},t.zipWith=function(n,t,r){for(var e=[r(n[0],t[0])],u=Math.min(n.length,t.length),i=1;i<u;i++)e[i]=r(n[i],t[i]);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,I.pipe)(e,(0,t.prependAll)(n),(0,t.prepend)((0,t.head)(r))):r}},t.chainWithIndex=function(n){return function(r){for(var e=o.fromReadonlyNonEmptyArray(n(0,(0,t.head)(r))),u=1;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.chop=function(n){return function(r){for(var e=n(r),u=[e[0]],i=e[1];(0,t.isNonEmpty)(i);){var o=n(i),c=o[1];u.push(o[0]),i=c}return u}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[r,t.empty]:[(0,I.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 v=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,I.pipe)(n,(0,t.mapWithIndex)(r))},l=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},p=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},m=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},b=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},y=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},g=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},_=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},M=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceWithIndex)(r,e))},x=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},E=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},P=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}};t.of=o.singleton,t.altW=function(n){return function(t){return(0,I.pipe)(t,f(n()))}},t.alt=t.altW,t.ap=function(n){return(0,t.chain)((function(r){return(0,I.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),u=[n(r)];(0,t.isNonEmpty)(e);)u.push(n(e)),e=(0,t.tail)(e);return u}},t.duplicate=(0,t.extend)(I.identity),t.flatten=(0,t.chain)(I.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))],u=1;u<r.length;u++)e.push(n(u,r[u]));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,u){return n.concat(r,t(u+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)(I.SK)},t.traverseWithIndex=function(n){return function(r){return function(e){for(var u=n.map(r(0,(0,t.head)(e)),t.of),i=1;i<e.length;i++)u=n.ap(n.map(u,(function(n){return function(r){return(0,I.pipe)(n,(0,t.append)(r))}})),r(i,e[i]));return u}}},t.extract=o.head,t.URI="ReadonlyNonEmptyArray",t.getShow=function(n){return{show:function(t){return"[".concat(t.map(n.show).join(", "),"]")}}},t.getSemigroup=function(){return{concat:a}},t.getEq=function(n){return(0,A.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:v},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:v,mapWithIndex:d},t.Apply={URI:t.URI,map:v,ap:l},t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.apSecond)(t.Apply),t.Applicative={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:l,chain:p},t.chainFirst=(0,U.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:v,ap:l,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:b,reduceRight:y},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:b,reduceRight:y,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:v,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:v,mapWithIndex:d,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:P},t.Alt={URI:t.URI,map:v,alt:_},t.Comonad={URI:t.URI,map:v,extend:h,extract:t.extract},t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.Apply),t.head=t.extract,t.tail=o.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 i([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,I.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,I.flow)((0,t.intersperse)(n),r)}},t.groupSort=function(n){var r=(0,t.sort)(n),e=s(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,I.pipe)(r,(0,t.prepend)(n))},t.snoc=function(n,t){return(0,I.pipe)(n,a([t]))},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.prependToAll=t.prependAll,t.fold=t.concatAll,t.readonlyNonEmptyArray={URI:t.URI,of:t.of,map:v,mapWithIndex:d,ap:l,chain:p,extend:h,extract:t.extract,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:P,alt:_}})),Lt=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,u=0,i=t.length;u<i;u++)!e&&u in t||(e||(e=Array.prototype.slice.call(t,0,u)),e[u]=t[u]);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 o=u(O),c=u(Ft);function f(n){return function(t){return t.concat(n)}}function a(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function s(n){return function(t){var r=t.length;if(0===r)return[];for(var e=[],u=t[0],i=[u],o=1;o<r;o++){var c=t[o];n.equals(c,u)?i.push(c):(e.push(i),i=[u=c])}return e.push(i),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 i([n],t,!0)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return i(i([],t,!0),[n],!1)}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if((0,t.isNonEmpty)(e)){var u=(0,t.fromReadonlyNonEmptyArray)(e);return u.splice(n,0,r),u}return[r]},t.unsafeUpdateAt=function(n,r,e){var u=(0,t.fromReadonlyNonEmptyArray)(e);return u[n]=r,u},t.uniq=function(n){return function(r){if(1===r.length)return(0,t.copy)(r);for(var e=[(0,t.head)(r)],u=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},i=0,o=(0,t.tail)(r);i<o.length;i++)u(o[i]);return e}},t.sortBy=function(n){if((0,t.isNonEmpty)(n)){var r=(0,T.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,I.pipe)(t,a(n)))}}},t.rotate=function(n){return function(r){var e=r.length,u=Math.round(n)%e;if((0,t.isOutOfBound)(Math.abs(u),r)||0===u)return(0,t.copy)(r);if(u<0){var i=(0,t.splitAt)(-u)(r);return(0,I.pipe)(i[1],a(i[0]))}return(0,t.rotate)(u-e)(r)}},t.fromReadonlyNonEmptyArray=o.fromReadonlyNonEmptyArray,t.fromArray=function(n){return(0,t.isNonEmpty)(n)?o.some(n):o.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],u=1;u<r;u++)e.push(n(u));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=f,t.concat=a,t.reverse=function(n){return i([(0,t.last)(n)],n.slice(0,-1).reverse(),!0)},t.group=s,t.groupBy=function(n){return function(t){for(var r={},e=0,u=t;e<u.length;e++){var i=u[e],c=n(i);o.has.call(r,c)?r[c].push(i):r[c]=[i]}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?o.none:o.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)?o.none:o.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])],u=Math.min(n.length,t.length),i=1;i<u;i++)e[i]=r(n[i],t[i]);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,I.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))),u=1;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.chop=function(n){return function(r){for(var e=n(r),u=[e[0]],i=e[1];(0,t.isNonEmpty)(i);){var o=n(i),c=o[1];u.push(o[0]),i=c}return u}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[(0,t.copy)(r),[]]:[(0,I.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 v=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},d=function(n,r){return(0,I.pipe)(n,(0,t.mapWithIndex)(r))},l=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},p=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},m=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},b=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},y=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},g=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},_=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},M=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceWithIndex)(r,e))},x=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},E=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},A=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}};t.altW=function(n){return function(t){return(0,I.pipe)(t,f(n()))}},t.alt=t.altW,t.ap=function(n){return(0,t.chain)((function(r){return(0,I.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),u=[n(r)];(0,t.isNonEmpty)(e);)u.push(n(e)),e=(0,t.tail)(e);return u}},t.duplicate=(0,t.extend)(I.identity),t.flatten=(0,t.chain)(I.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))],u=1;u<r.length;u++)e.push(n(u,r[u]));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 u=n.map(r(0,(0,t.head)(e)),t.of),i=1;i<e.length;i++)u=n.ap(n.map(u,(function(n){return function(r){return(0,I.pipe)(n,(0,t.append)(r))}})),r(i,e[i]));return u}}},t.extract=c.head,t.URI="NonEmptyArray",t.getShow=c.getShow,t.getSemigroup=function(){return{concat:a}},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:v},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:v,mapWithIndex:d},t.Apply={URI:t.URI,map:v,ap:l},t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.apSecond)(t.Apply),t.Applicative={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:l,chain:p},t.chainFirst=(0,U.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:v,ap:l,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:b,reduceRight:y},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:b,reduceRight:y,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:v,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:v,mapWithIndex:d,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:A},t.Alt={URI:t.URI,map:v,alt:_},t.Comonad={URI:t.URI,map:v,extend:h,extract:t.extract},t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.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 i([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,I.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=s(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,I.pipe)(r,(0,t.prepend)(n))},t.snoc=function(n,r){return(0,I.pipe)(n,(0,t.append)(r))},t.prependToAll=t.prependAll,t.fold=c.concatAll,t.nonEmptyArray={URI:t.URI,of:t.of,map:v,mapWithIndex:d,ap:l,chain:p,extend:h,extract:t.extract,reduce:m,foldMap:b,reduceRight:y,traverse:g,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:A,alt:_}})),Ht=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t,r){if(r||2===arguments.length)for(var e,u=0,i=t.length;u<i;u++)!e&&u in t||(e||(e=Array.prototype.slice.call(t,0,u)),e[u]=t[u]);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 o=u(O),c=u(Dt),f=u(Ft);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=f.isNonEmpty,t.prepend=f.prepend,t.prependW=f.prependW,t.append=f.append,t.appendW=f.appendW,t.makeBy=function(n,r){return n<=0?t.empty:f.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 o.isNone(n)?t.empty:[n.value]},t.fromEither=function(n){return o.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(f.head(e),f.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(f.init(e),f.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=[],u=0;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.scanLeft=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=t(u[i],r[i]);return u}},t.scanRight=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=t(r[i],u[i+1]);return u}},t.size=function(n){return n.length},t.isOutOfBound=f.isOutOfBound,t.lookup=function n(r,e){return void 0===e?function(t){return n(r,t)}:(0,t.isOutOfBound)(r,e)?o.none:o.some(e[r])},t.head=function(n){return(0,t.isNonEmpty)(n)?o.some(f.head(n)):o.none},t.last=function(n){return(0,t.isNonEmpty)(n)?o.some(f.last(n)):o.none},t.tail=function(n){return(0,t.isNonEmpty)(n)?o.some(f.tail(n)):o.none},t.init=function(n){return(0,t.isNonEmpty)(n)?o.some(f.init(n)):o.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=[],u=0,i=r;u<i.length;u++){var o=i[u];if(!n(o))break;e.push(o)}var c=e.length;return c===r.length?r:0===c?t.empty:e}};var a=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function s(n){return function(t,r){if(void 0===r){var e=s(n);return function(n){return e(t,n)}}for(var u=0;u<r.length;u++)if(n.equals(r[u],t))return!0;return!1}}function v(n){var r=f.union(n);return function(e,u){if(void 0===u){var i=v(n);return function(n){return i(n,e)}}return(0,t.isNonEmpty)(e)&&(0,t.isNonEmpty)(u)?r(u)(e):(0,t.isNonEmpty)(e)?e:u}}function d(n){var t=s(n);return function(r,e){if(void 0===e){var u=d(n);return function(n){return u(n,r)}}return r.filter((function(n){return t(n,e)}))}}function l(n){var t=s(n);return function(r,e){if(void 0===e){var u=l(n);return function(n){return u(n,r)}}return r.filter((function(n){return!t(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)?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=a(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 o.some(r);return o.none}},t.findFirst=function(n){return function(t){for(var r=0;r<t.length;r++)if(n(t[r]))return o.some(t[r]);return o.none}},t.findFirstMap=function(n){return function(t){for(var r=0;r<t.length;r++){var e=n(t[r]);if(o.isSome(e))return e}return o.none}},t.findLast=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return o.some(t[r]);return o.none}},t.findLastMap=function(n){return function(t){for(var r=t.length-1;r>=0;r--){var e=n(t[r]);if(o.isSome(e))return e}return o.none}},t.findLastIndex=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return o.some(r);return o.none}},t.insertAt=function(n,t){return function(r){return n<0||n>r.length?o.none:o.some(f.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)?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 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=[],u=Math.min(n.length,t.length),i=0;i<u;i++)e[i]=r(n[i],t[i]);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=f.prependAll(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.intersperse=function(n){var r=f.intersperse(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.rotate=function(n){var r=f.rotate(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.elem=s,t.uniq=function(n){var r=f.uniq(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.sortBy=function(n){var r=f.sortBy(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):n}},t.chop=function(n){var r=f.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)?f.splitAt(n)(r):(0,t.isEmpty)(r)?[r,t.empty]:[t.empty,r]}},t.chunksOf=function(n){var r=f.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 u=function(n,i){return(0,t.isNonEmpty)(i)?(0,I.pipe)(f.head(i),(0,t.chain)((function(r){return u((0,I.pipe)(n,(0,t.append)(r)),f.tail(i))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:t.empty};return u(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=v,t.intersection=d,t.difference=l;var p=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.mapWithIndex)(r))},m=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},b=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},y=function(n,r){return(0,I.pipe)(n,(0,t.filter)(r))},g=function(n,r){return(0,I.pipe)(n,(0,t.filterMap)(r))},_=function(n,r){return(0,I.pipe)(n,(0,t.partition)(r))},x=function(n,r){return(0,I.pipe)(n,(0,t.partitionMap)(r))},E=function(n,r){return(0,I.pipe)(n,(0,t.partitionWithIndex)(r))},W=function(n,r){return(0,I.pipe)(n,(0,t.partitionMapWithIndex)(r))},N=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},C=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},q=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},z=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},D=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceWithIndex)(r,e))},F=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},L=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},H=function(n,r){return(0,I.pipe)(n,(0,t.filterMapWithIndex)(r))},B=function(n,r){return(0,I.pipe)(n,(0,t.filterWithIndex)(r))},G=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},V=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},$=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}};t._chainRecDepthFirst=function(n,r){return(0,I.pipe)(n,(0,t.chainRecDepthFirst)(r))},t._chainRecBreadthFirst=function(n,r){return(0,I.pipe)(n,(0,t.chainRecBreadthFirst)(r))},t.of=f.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,I.pipe)(n,(0,t.map)(r))}))},t.chain=function(n){return function(r){return(0,I.pipe)(r,(0,t.chainWithIndex)((function(t,r){return n(r)})))}},t.flatten=(0,t.chain)(I.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,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?t.push(i.left):r.push(i.right)}return(0,P.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 u=n(e,t[e]);o.isSome(u)&&r.push(u.value)}return r}},t.filterMap=function(n){return(0,t.filterMapWithIndex)((function(t,r){return n(r)}))},t.compact=(0,t.filterMap)(I.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=[],u=0;u<t.length;u++){var i=t[u];n(u,i)?e.push(i):r.push(i)}return(0,P.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=[],u=0;u<t.length;u++){var i=n(u,t[u]);"Left"===i._tag?r.push(i.left):e.push(i.right)}return(0,P.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)(I.identity),t.foldMapWithIndex=function(n){return function(t){return function(r){return r.reduce((function(r,e,u){return n.concat(r,t(u,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,u=n,i=0;i<e;i++)u=t(i,u,r[i]);return u}},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 C(r,n.of((0,t.zero)()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return(0,I.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,u,i){return n.ap(n.map(u,(function(n){return function(r){return(0,I.pipe)(n,(0,t.append)(r))}})),r(e,i))}))}},t.wither=function(n){var t=J(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=K(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var u=t(e);if(!o.isSome(u))break;var i=u.value,c=i[1];r.push(i[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,A.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,T.fromCompare)((function(t,r){for(var e=t.length,u=r.length,i=Math.min(e,u),o=0;o<i;o++){var f=n.compare(t[o],r[o]);if(0!==f)return f}return c.Ord.compare(e,u)}))},t.getUnionSemigroup=function(n){var t=v(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=l(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:p},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:p,mapWithIndex:h},t.Apply={URI:t.URI,map:p,ap:m},t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.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:b},t.Monad={URI:t.URI,map:p,ap:m,of:t.of,chain:b},t.chainFirst=(0,U.chainFirst)(t.Chain),t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:p,alt:N},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:N,zero:t.zero},t.Extend={URI:t.URI,map:p,extend:G},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:y,filterMap:g,partition:_,partitionMap:x},t.FilterableWithIndex={URI:t.URI,map:p,mapWithIndex:h,compact:t.compact,separate:t.separate,filter:y,filterMap:g,partition:_,partitionMap:x,partitionMapWithIndex:W,partitionWithIndex:E,filterMapWithIndex:H,filterWithIndex:B},t.Foldable={URI:t.URI,reduce:C,foldMap:q,reduceRight:z},t.FoldableWithIndex={URI:t.URI,reduce:C,foldMap:q,reduceRight:z,reduceWithIndex:D,foldMapWithIndex:F,reduceRightWithIndex:L},t.Traversable={URI:t.URI,map:p,reduce:C,foldMap:q,reduceRight:z,traverse:V,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:p,mapWithIndex:h,reduce:C,foldMap:q,reduceRight:z,reduceWithIndex:D,foldMapWithIndex:F,reduceRightWithIndex:L,traverse:V,sequence:t.sequence,traverseWithIndex:$},t.chainRecDepthFirst=function(n){return function(t){for(var r=i([],n(t),!0),e=[];r.length>0;){var u=r.shift();o.isLeft(u)?r.unshift.apply(r,n(u.left)):e.push(u.right)}return e}},t.ChainRecDepthFirst={URI:t.URI,map:p,ap:m,chain:b,chainRec:t._chainRecDepthFirst},t.chainRecBreadthFirst=function(n){return function(t){var r=n(t),e=[],u=[];function i(t){o.isLeft(t)?n(t.left).forEach((function(n){return e.push(n)})):u.push(t.right)}for(var c=0,f=r;c<f.length;c++)i(f[c]);for(;e.length>0;)i(e.shift());return u}},t.ChainRecBreadthFirst={URI:t.URI,map:p,ap:m,chain:b,chainRec:t._chainRecBreadthFirst};var J=(0,S.witherDefault)(t.Traversable,t.Compactable),K=(0,S.wiltDefault)(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:p,compact:t.compact,separate:t.separate,filter:y,filterMap:g,partition:_,partitionMap:x,reduce:C,foldMap:q,reduceRight:z,traverse:V,sequence:t.sequence,wither:J,wilt:K},t.filterE=(0,S.filterE)(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=(0,M.fromEitherK)(t.FromEither),t.unsafeInsertAt=f.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return(0,t.isNonEmpty)(e)?f.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=f.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=f.intercalate(n);return function(e){return(0,t.match)((function(){return n.empty}),r(e))}},t.Do=(0,t.of)(o.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.Apply),t.range=f.range,t.cons=f.cons,t.snoc=f.snoc,t.prependToAll=t.prependAll,t.readonlyArray={URI:t.URI,compact:t.compact,separate:t.separate,map:p,ap:m,of:t.of,chain:b,filter:y,filterMap:g,partition:_,partitionMap:x,mapWithIndex:h,partitionMapWithIndex:W,partitionWithIndex:E,filterMapWithIndex:H,filterWithIndex:B,alt:N,zero:t.zero,unfold:t.unfold,reduce:C,foldMap:q,reduceRight:z,traverse:V,sequence:t.sequence,reduceWithIndex:D,foldMapWithIndex:F,reduceRightWithIndex:L,traverseWithIndex:$,extend:G,wither:J,wilt:K}})),Bt=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.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 i=u(O),o=u(Lt),c=u(Ht);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=o.isNonEmpty,t.prepend=o.prepend,t.prependW=o.prependW,t.append=o.append,t.appendW=o.appendW,t.makeBy=function(n,t){return n<=0?[]:o.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 i.isNone(n)?[]:[n.value]},t.fromEither=function(n){return i.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(o.head(e),o.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(o.init(e),o.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,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=t(u[i],r[i]);return u}},t.scanRight=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=t(r[i],u[i+1]);return u}},t.size=function(n){return n.length},t.isOutOfBound=o.isOutOfBound,t.lookup=c.lookup,t.head=c.head,t.last=c.last,t.tail=function(n){return(0,t.isNonEmpty)(n)?i.some(o.tail(n)):i.none},t.init=function(n){return(0,t.isNonEmpty)(n)?i.some(o.init(n)):i.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,u=t;e<u.length;e++){var i=u[e];if(!n(i))break;r.push(i)}return r}};var f=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function a(n){var r=o.union(n);return function(e,u){if(void 0===u){var i=a(n);return function(n){return i(n,e)}}return(0,t.isNonEmpty)(e)&&(0,t.isNonEmpty)(u)?r(u)(e):(0,t.isNonEmpty)(e)?(0,t.copy)(e):(0,t.copy)(u)}}function s(n){var r=(0,t.elem)(n);return function(t,e){if(void 0===e){var u=s(n);return function(n){return u(n,t)}}return t.filter((function(n){return r(n,e)}))}}function v(n){var r=(0,t.elem)(n);return function(t,e){if(void 0===e){var u=v(n);return function(n){return u(n,t)}}return t.filter((function(n){return!r(n,e)}))}}t.spanLeft=function(n){return function(r){var e=(0,t.splitAt)(f(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(f(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?i.none:i.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)?i.none:i.some((0,t.unsafeDeleteAt)(n,r))}},t.modifyAt=function(n,r){return function(e){return(0,t.isOutOfBound)(n,e)?i.none:i.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=[],u=Math.min(n.length,t.length),i=0;i<u;i++)e[i]=r(n[i],t[i]);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=o.prependAll(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):[]}},t.intersperse=function(n){var r=o.intersperse(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.rotate=function(n){var r=o.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=o.uniq(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.sortBy=function(n){var r=o.sortBy(n);return function(n){return(0,t.isNonEmpty)(n)?r(n):(0,t.copy)(n)}},t.chop=function(n){var r=o.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)?o.splitAt(n)(r):(0,t.isEmpty)(r)?[(0,t.copy)(r),[]]:[[],(0,t.copy)(r)]}},t.chunksOf=function(n){var r=o.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 u=function(n,i){return(0,t.isNonEmpty)(i)?(0,I.pipe)(o.head(i),(0,t.chain)((function(r){return u((0,I.pipe)(n,(0,t.append)(r)),o.tail(i))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:[]};return u([],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=a,t.intersection=s,t.difference=v;var d=function(n,r){return(0,I.pipe)(n,(0,t.map)(r))},l=function(n,r){return(0,I.pipe)(n,(0,t.mapWithIndex)(r))},p=function(n,r){return(0,I.pipe)(n,(0,t.ap)(r))},h=function(n,r){return(0,I.pipe)(n,(0,t.chain)(r))},m=function(n,r){return(0,I.pipe)(n,(0,t.filter)(r))},b=function(n,r){return(0,I.pipe)(n,(0,t.filterMap)(r))},y=function(n,r){return(0,I.pipe)(n,(0,t.partition)(r))},g=function(n,r){return(0,I.pipe)(n,(0,t.partitionMap)(r))},_=function(n,r){return(0,I.pipe)(n,(0,t.partitionWithIndex)(r))},x=function(n,r){return(0,I.pipe)(n,(0,t.partitionMapWithIndex)(r))},E=function(n,r){return(0,I.pipe)(n,(0,t.alt)(r))},A=function(n,r,e){return(0,I.pipe)(n,(0,t.reduce)(r,e))},T=function(n){var r=(0,t.foldMap)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},W=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRight)(r,e))},N=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceWithIndex)(r,e))},C=function(n){var r=(0,t.foldMapWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},q=function(n,r,e){return(0,I.pipe)(n,(0,t.reduceRightWithIndex)(r,e))},z=function(n,r){return(0,I.pipe)(n,(0,t.filterMapWithIndex)(r))},D=function(n,r){return(0,I.pipe)(n,(0,t.filterWithIndex)(r))},F=function(n,r){return(0,I.pipe)(n,(0,t.extend)(r))},L=function(n){var r=(0,t.traverse)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},H=function(n){var r=(0,t.traverseWithIndex)(n);return function(n,t){return(0,I.pipe)(n,r(t))}},B=c._chainRecDepthFirst,G=c._chainRecBreadthFirst;t.of=o.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,I.pipe)(n,(0,t.map)(r))}))},t.chain=function(n){return function(r){return(0,I.pipe)(r,(0,t.chainWithIndex)((function(t,r){return n(r)})))}},t.flatten=(0,t.chain)(I.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 u=n(e,t[e]);i.isSome(u)&&r.push(u.value)}return r}},t.filterMap=function(n){return(0,t.filterMapWithIndex)((function(t,r){return n(r)}))},t.compact=(0,t.filterMap)(I.identity),t.separate=function(n){for(var t=[],r=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?t.push(i.left):r.push(i.right)}return(0,P.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=[],u=0;u<t.length;u++){var i=t[u];n(u,i)?e.push(i):r.push(i)}return(0,P.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=[],u=0;u<t.length;u++){var i=n(u,t[u]);"Left"===i._tag?r.push(i.left):e.push(i.right)}return(0,P.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)(I.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 A(r,n.of((0,t.zero)()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return(0,I.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,u,i){return n.ap(n.map(u,(function(n){return function(r){return(0,I.pipe)(n,(0,t.append)(r))}})),r(e,i))}))}},t.wither=function(n){var t=V(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=$(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var u=t(e);if(!i.isSome(u))break;var o=u.value,c=o[1];r.push(o[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=a(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=s(n);return{concat:function(n,r){return t(r)(n)}}},t.getDifferenceMagma=function(n){var t=v(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:d},t.flap=(0,R.flap)(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:d,mapWithIndex:l},t.Apply={URI:t.URI,map:d,ap:p},t.apFirst=(0,j.apFirst)(t.Apply),t.apSecond=(0,j.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:h},t.chainFirst=(0,U.chainFirst)(t.Chain),t.Monad={URI:t.URI,map:d,ap:p,of:t.of,chain:h},t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:d,alt:E},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:E,zero:t.zero},t.Extend={URI:t.URI,map:d,extend:F},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:b,partition:y,partitionMap:g},t.FilterableWithIndex={URI:t.URI,map:d,mapWithIndex:l,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:g,partitionMapWithIndex:x,partitionWithIndex:_,filterMapWithIndex:z,filterWithIndex:D},t.Foldable={URI:t.URI,reduce:A,foldMap:T,reduceRight:W},t.FoldableWithIndex={URI:t.URI,reduce:A,foldMap:T,reduceRight:W,reduceWithIndex:N,foldMapWithIndex:C,reduceRightWithIndex:q},t.Traversable={URI:t.URI,map:d,reduce:A,foldMap:T,reduceRight:W,traverse:L,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:d,mapWithIndex:l,reduce:A,foldMap:T,reduceRight:W,reduceWithIndex:N,foldMapWithIndex:C,reduceRightWithIndex:q,traverse:L,sequence:t.sequence,traverseWithIndex:H};var V=(0,S.witherDefault)(t.Traversable,t.Compactable),$=(0,S.wiltDefault)(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:d,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:g,reduce:A,foldMap:T,reduceRight:W,traverse:L,sequence:t.sequence,wither:V,wilt:$},t.chainRecDepthFirst=c.chainRecDepthFirst,t.ChainRecDepthFirst={URI:t.URI,map:d,ap:p,chain:h,chainRec:B},t.chainRecBreadthFirst=c.chainRecBreadthFirst,t.ChainRecBreadthFirst={URI:t.URI,map:d,ap:p,chain:h,chainRec:G},t.filterE=(0,S.filterE)(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=(0,M.fromEitherK)(t.FromEither),t.unsafeInsertAt=o.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return(0,t.isNonEmpty)(e)?o.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)(i.emptyRecord),t.bindTo=(0,R.bindTo)(t.Functor),t.bind=(0,U.bind)(t.Chain),t.apS=(0,j.apS)(t.Apply),t.range=o.range,t.empty=[],t.cons=o.cons,t.snoc=o.snoc,t.prependToAll=t.prependAll,t.array={URI:t.URI,compact:t.compact,separate:t.separate,map:d,ap:p,of:t.of,chain:h,filter:m,filterMap:b,partition:y,partitionMap:g,mapWithIndex:l,partitionMapWithIndex:x,partitionWithIndex:_,filterMapWithIndex:z,filterWithIndex:D,alt:E,zero:t.zero,unfold:t.unfold,reduce:A,foldMap:T,reduceRight:W,traverse:L,sequence:t.sequence,reduceWithIndex:N,foldMapWithIndex:C,reduceRightWithIndex:q,traverseWithIndex:H,extend:F,wither:V,wilt:$}}));const Gt=n=>({kind:"height",size:n}),Vt=T.contramap((n=>n.size))(Dt.Ord),$t=Bt.sort(Vt),Jt=Bt.sort({equals:(n,t)=>n.kind===t.kind,compare:(n,t)=>n.kind===t.kind?0:"width"===n.kind?-1:1}),Kt=n=>t=>{const r=$t(t),e=(n=>{const[t,r]=n;return t.size/r.size})(r),u=Object.assign(Object.assign({},r[0]),{size:n*e}),i=Object.assign(Object.assign({},r[1]),{size:n});return Jt([i,u])},Xt=n=>{const{naturalWidth:t,naturalHeight:r}=n;return[(e=t,{kind:"width",size:e}),Gt(r)];var e},Zt=()=>{const n=document.createElement("canvas"),t=n.getContext("2d");return[n,t]},Qt=async n=>{const t=await fetch(n),r=await t.blob();return new File([r],"image",{type:r.type,lastModified:Date.now()})},Yt=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()}))})),nr=(n,t)=>n.naturalWidth>t?((n,t)=>{const r=Kt(n),[e,u]=Zt(),i=Xt(t),[o,c]=r(i).map((n=>n.size)),f=new ImageData(o,c),a=(n=>{const{naturalWidth:t,naturalHeight:r}=n,[e,u]=Zt();return e.width=t,e.height=r,u.drawImage(n,0,0),u.getImageData(0,0,t,r)})(t);return e.width=o,e.height=c,zt.lanczos(a,f),u.putImageData(f,0,0),e.toDataURL()})(t,n):(n=>{const t=document.createElement("canvas"),{naturalWidth:r,naturalHeight:e}=n,u=t.getContext("2d");return t.width=r,t.height=e,u.drawImage(n,0,0,r,e),t.toDataURL()})(n),tr=n=>i(n,vt,J((n=>({headers:n})))),{state:rr,onChange:er}=z({campaignId:N.none,results:[],filters:[],cropperHandlers:[],detectedObjects:[],objectDetectionInProgress:!1,imageWidth:500,image:N.none,imageUrl:N.none,imageBounds:N.none,searchArea:N.none,resultsComponents:[],serverError:!1,loading:!1}),ur=async n=>{var t,r;rr.results=n.value,rr.filters=(r=ht(n.filters),Object.entries(r).map((([n,t])=>({name:n,filters:t})))),rr.rectangleSearchForm=n.searchArea,rr.resetCategoryLink=null===(t=n.links)||void 0===t?void 0:t.clearFilters,rr.loading=!1},ir=n=>i(tr(rr.token),xn,Pn(mt(n))),or=async()=>{rr.loading=!0,i(xt(rr.imageBounds,rr.searchArea),N.map((async([n,t])=>{const r=(e=n,n=>({x:n.x/e.width,y:n.y/e.height,width:n.width/e.width,height:n.height/e.height}))(t);var e;const u={width:r.width,height:r.height,left:r.x,top:r.y};return await i(tr(rr.token),xn,Pn(Ut(rr.rectangleSearchForm,u)),En(ur))()})))},cr=n=>{rr.loading=!0;const t=(n=>{const t=new FormData;return t.append("image",n),t})(n);return i(dt(vt(rr.token),V(t)),J((([n,t])=>({headers:n,body:t}))),xn,Wn((n=>((n,t=tn)=>{const r="search/session",e=I.pipe(t,fn((()=>r),(n=>`${r}?campaign-id=${n}`)));return I.pipe(dt(Yn(),et),xn,Pn(ot(e,n)))})(n,rr.campaignId))),En((n=>(ur(n),(async n=>{rr.objectDetectionInProgress=!0;const t={kind:"server",inner:"Can not get a link for objects detection"};var r,e,u;await i((r=n,e="detectedObjects",i(r.links,an,(u=n=>an(n[e]),function(n){return on(n)?tn:u(n.value)}))),Nn((()=>t)),Wn(ir),En((n=>rr.detectedObjects=ht(n))))(),rr.objectDetectionInProgress=!1})(n),rr.loading=!1,n))),An((n=>(rr.serverError=!0,rr.loading=!1,n))))},fr=rr;er("activeIonLink",(async n=>{rr.loading=!0;const t=n||rr.resetCategoryLink;await i(tr(rr.token),xn,Pn(mt(t)),En(ur),An((n=>({kind:"network error",inner:n}))))()})),er("searchArea",(n=>{i(n,N.map((n=>{var t;rr.cropperHandlers=[{position:l(t=n),direction:b.NorthWest},{position:m.concat(l(t),{x:t.width,y:0}),direction:b.NorthEast},{position:m.concat(l(t),{x:0,y:t.height}),direction:b.SouthWest},{position:m.concat(l(t),{x:t.width,y:t.height}),direction:b.SouthEast}]})))})),er("serverError",(()=>{rr.loading=!1}));const ar=n=>{fr.image=N.some(n),fr.imageUrl=N.some(n.src)},sr=async n=>{const t=(n=>I.pipe(n,N.fromNullable,Dn.fromOption((()=>Pt)),Dn.chain(Wt)))(n),r=(500,n=>I.pipe(n,St,Gn.map((n=>nr(n,500))),Gn.chain(Yt)));const e=i(t,xn,Cn(r)),u=await i(e,Wn(cr))();return i(dt(u,t),J((([n,t])=>(async(n,t)=>{const r={image:await(async n=>({name:n.name,mediaType:n.type,value:await Mt(n)}))(t)},e=n.uploadHighResolutionImage;await i(tr(rr.token),xn,Pn(Ut(e,r)))()})(n,t)))),await i(e,Cn(St),En(ar))(),u};var vr,dr=new Uint8Array(16);function lr(){if(!vr&&!(vr="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 vr(dr)}const pr=/^(?:[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 hr(n){return"string"==typeof n&&pr.test(n)}for(var mr=[],br=0;br<256;++br)mr.push((br+256).toString(16).substr(1));function yr(n,t,r){var e=(n=n||{}).random||(n.rng||lr)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,t){r=r||0;for(var u=0;u<16;++u)t[r+u]=e[u];return t}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(mr[n[t+0]]+mr[n[t+1]]+mr[n[t+2]]+mr[n[t+3]]+"-"+mr[n[t+4]]+mr[n[t+5]]+"-"+mr[n[t+6]]+mr[n[t+7]]+"-"+mr[n[t+8]]+mr[n[t+9]]+"-"+mr[n[t+10]]+mr[n[t+11]]+mr[n[t+12]]+mr[n[t+13]]+mr[n[t+14]]+mr[n[t+15]]).toLowerCase();if(!hr(r))throw TypeError("Stringified UUID is invalid");return r}(e)}var wr=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},gr=Object.prototype.hasOwnProperty;function Ir(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch(n){return null}}function Or(n){try{return encodeURIComponent(n)}catch(n){return null}}var jr={stringify:function(n,t){t=t||"";var r,e,u=[];for(e in"string"!=typeof t&&(t="?"),n)if(gr.call(n,e)){if((r=n[e])||null!=r&&!isNaN(r)||(r=""),e=Or(e),r=Or(r),null===e||null===r)continue;u.push(e+"="+r)}return u.length?t+u.join("&"):""},parse:function(n){for(var t,r=/([^=?#&]+)=?([^&]*)/g,e={};t=r.exec(n);){var u=Ir(t[1]),i=Ir(t[2]);null===u||null===i||u in e||(e[u]=i)}return e}},Rr=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,_r=/[\n\r\t]/g,Ur=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Mr=/:\d+$/,xr=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Er=/^[a-zA-Z]:/;function Ar(n){return(n||"").toString().replace(Rr,"")}var Tr=[["#","hash"],["?","query"],function(n,t){return Sr(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]],Wr={hash:1,query:1};function Pr(n){var t;t="undefined"!=typeof window?window:void 0!==w?w:"undefined"!=typeof self?self:{};var r,e={},u=typeof(n=n||t.location||{});if("blob:"===n.protocol)e=new Nr(unescape(n.pathname),{});else if("string"===u)for(r in e=new Nr(n,{}),Wr)delete e[r];else if("object"===u){for(r in n)r in Wr||(e[r]=n[r]);void 0===e.slashes&&(e.slashes=Ur.test(n.href))}return e}function Sr(n){return"file:"===n||"ftp:"===n||"http:"===n||"https:"===n||"ws:"===n||"wss:"===n}function kr(n,t){n=(n=Ar(n)).replace(_r,""),t=t||{};var r,e=xr.exec(n),u=e[1]?e[1].toLowerCase():"",i=!!e[2],o=!!e[3],c=0;return i?o?(r=e[2]+e[3]+e[4],c=e[2].length+e[3].length):(r=e[2]+e[4],c=e[2].length):o?(r=e[3]+e[4],c=e[3].length):r=e[4],"file:"===u?c>=2&&(r=r.slice(2)):Sr(u)?r=e[4]:u?i&&(r=r.slice(2)):c>=2&&Sr(t.protocol)&&(r=e[4]),{protocol:u,slashes:i||Sr(u),slashesCount:c,rest:r}}function Nr(n,t,r){if(n=(n=Ar(n)).replace(_r,""),!(this instanceof Nr))return new Nr(n,t,r);var e,u,i,o,c,f,a=Tr.slice(),s=typeof t,v=this,d=0;for("object"!==s&&"string"!==s&&(r=t,t=null),r&&"function"!=typeof r&&(r=jr.parse),e=!(u=kr(n||"",t=Pr(t))).protocol&&!u.slashes,v.slashes=u.slashes||e&&t.slashes,v.protocol=u.protocol||t.protocol||"",n=u.rest,("file:"===u.protocol&&(2!==u.slashesCount||Er.test(n))||!u.slashes&&(u.protocol||u.slashesCount<2||!Sr(v.protocol)))&&(a[3]=[/(.*)/,"pathname"]);d<a.length;d++)"function"!=typeof(o=a[d])?(f=o[1],(i=o[0])!=i?v[f]=n:"string"==typeof i?~(c="@"===i?n.lastIndexOf(i):n.indexOf(i))&&("number"==typeof o[2]?(v[f]=n.slice(0,c),n=n.slice(c+o[2])):(v[f]=n.slice(c),n=n.slice(0,c))):(c=i.exec(n))&&(v[f]=c[1],n=n.slice(0,c.index)),v[f]=v[f]||e&&o[3]&&t[f]||"",o[4]&&(v[f]=v[f].toLowerCase())):n=o(n,v);r&&(v.query=r(v.query)),e&&t.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==t.pathname)&&(v.pathname=function(n,t){if(""===n)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(n.split("/")),e=r.length,u=r[e-1],i=!1,o=0;e--;)"."===r[e]?r.splice(e,1):".."===r[e]?(r.splice(e,1),o++):o&&(0===e&&(i=!0),r.splice(e,1),o--);return i&&r.unshift(""),"."!==u&&".."!==u||r.push(""),r.join("/")}(v.pathname,t.pathname)),"/"!==v.pathname.charAt(0)&&Sr(v.protocol)&&(v.pathname="/"+v.pathname),wr(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(~(c=v.auth.indexOf(":"))?(v.username=v.auth.slice(0,c),v.username=encodeURIComponent(decodeURIComponent(v.username)),v.password=v.auth.slice(c+1),v.password=encodeURIComponent(decodeURIComponent(v.password))):v.username=encodeURIComponent(decodeURIComponent(v.auth)),v.auth=v.password?v.username+":"+v.password:v.username),v.origin="file:"!==v.protocol&&Sr(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}Nr.prototype={set:function(n,t,r){var e=this;switch(n){case"query":"string"==typeof t&&t.length&&(t=(r||jr.parse)(t)),e[n]=t;break;case"port":e[n]=t,wr(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,Mr.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 u="pathname"===n?"/":"#";e[n]=t.charAt(0)!==u?u+t:t}else e[n]=t;break;case"username":case"password":e[n]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(e.username=t.slice(0,i),e.username=encodeURIComponent(decodeURIComponent(e.username)),e.password=t.slice(i+1),e.password=encodeURIComponent(decodeURIComponent(e.password))):e.username=encodeURIComponent(decodeURIComponent(t))}for(var o=0;o<Tr.length;o++){var c=Tr[o];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&&Sr(e.protocol)&&e.host?e.protocol+"//"+e.host:"null",e.href=e.toString(),e},toString:function(n){n&&"function"==typeof n||(n=jr.stringify);var t,r=this,e=r.host,u=r.protocol;u&&":"!==u.charAt(u.length-1)&&(u+=":");var i=u+(r.protocol&&r.slashes||Sr(r.protocol)?"//":"");return r.username?(i+=r.username,r.password&&(i+=":"+r.password),i+="@"):r.password?(i+=":"+r.password,i+="@"):"file:"!==r.protocol&&Sr(r.protocol)&&!e&&"/"!==r.pathname&&(i+="@"),(":"===e[e.length-1]||Mr.test(r.hostname)&&!r.port)&&(e+=":"),i+=e+r.pathname,(t="object"==typeof r.query?n(r.query):r.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(i+=r.hash),i}},Nr.extractProtocol=kr,Nr.location=Pr,Nr.trimLeft=Ar,Nr.qs=jr;var Cr=Nr,qr=g((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}})),zr="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==zr&&zr,Dr="URLSearchParams"in zr,Fr="Symbol"in zr&&"iterator"in Symbol,Lr="FileReader"in zr&&"Blob"in zr&&function(){try{return new Blob,!0}catch(n){return!1}}(),Hr="FormData"in zr,Br="ArrayBuffer"in zr;if(Br)var Gr=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Vr=ArrayBuffer.isView||function(n){return n&&Gr.indexOf(Object.prototype.toString.call(n))>-1};function $r(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 Jr(n){return"string"!=typeof n&&(n=String(n)),n}function Kr(n){var t={next:function(){var t=n.shift();return{done:void 0===t,value:t}}};return Fr&&(t[Symbol.iterator]=function(){return t}),t}function Xr(n){this.map={},n instanceof Xr?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 Zr(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function Qr(n){return new Promise((function(t,r){n.onload=function(){t(n.result)},n.onerror=function(){r(n.error)}}))}function Yr(n){var t=new FileReader,r=Qr(t);return t.readAsArrayBuffer(n),r}function ne(n){if(n.slice)return n.slice(0);var t=new Uint8Array(n.byteLength);return t.set(new Uint8Array(n)),t.buffer}function te(){return this.bodyUsed=!1,this._initBody=function(n){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?"string"==typeof n?this._bodyText=n:Lr&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:Hr&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:Dr&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():Br&&Lr&&(t=n)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=ne(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Br&&(ArrayBuffer.prototype.isPrototypeOf(n)||Vr(n))?this._bodyArrayBuffer=ne(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):Dr&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Lr&&(this.blob=function(){var n=Zr(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?Zr(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(Yr)}),this.text=function(){var n,t,r,e=Zr(this);if(e)return e;if(this._bodyBlob)return n=this._bodyBlob,r=Qr(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)},Hr&&(this.formData=function(){return this.text().then(ue)}),this.json=function(){return this.text().then(JSON.parse)},this}Xr.prototype.append=function(n,t){n=$r(n),t=Jr(t);var r=this.map[n];this.map[n]=r?r+", "+t:t},Xr.prototype.delete=function(n){delete this.map[$r(n)]},Xr.prototype.get=function(n){return n=$r(n),this.has(n)?this.map[n]:null},Xr.prototype.has=function(n){return this.map.hasOwnProperty($r(n))},Xr.prototype.set=function(n,t){this.map[$r(n)]=Jr(t)},Xr.prototype.forEach=function(n,t){for(var r in this.map)this.map.hasOwnProperty(r)&&n.call(t,this.map[r],r,this)},Xr.prototype.keys=function(){var n=[];return this.forEach((function(t,r){n.push(r)})),Kr(n)},Xr.prototype.values=function(){var n=[];return this.forEach((function(t){n.push(t)})),Kr(n)},Xr.prototype.entries=function(){var n=[];return this.forEach((function(t,r){n.push([r,t])})),Kr(n)},Fr&&(Xr.prototype[Symbol.iterator]=Xr.prototype.entries);var re=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ee(n,t){if(!(this instanceof ee))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,e,u=(t=t||{}).body;if(n instanceof ee){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,t.headers||(this.headers=new Xr(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,u||null==n._bodyInit||(u=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 Xr(t.headers)),this.method=(e=(r=t.method||this.method||"GET").toUpperCase(),re.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)&&u)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(u),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function ue(n){var t=new FormData;return n.trim().split("&").forEach((function(n){if(n){var r=n.split("="),e=r.shift().replace(/\+/g," "),u=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(e),decodeURIComponent(u))}})),t}function ie(n,t){if(!(this instanceof ie))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 Xr(t.headers),this.url=t.url||"",this._initBody(n)}ee.prototype.clone=function(){return new ee(this,{body:this._bodyInit})},te.call(ee.prototype),te.call(ie.prototype),ie.prototype.clone=function(){return new ie(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Xr(this.headers),url:this.url})},ie.error=function(){var n=new ie(null,{status:0,statusText:""});return n.type="error",n};var oe=[301,302,303,307,308];ie.redirect=function(n,t){if(-1===oe.indexOf(t))throw new RangeError("Invalid status code");return new ie(null,{status:t,headers:{location:n}})};var ce=zr.DOMException;try{new ce}catch(n){(ce=function(n,t){this.message=n,this.name=t;var r=Error(n);this.stack=r.stack}).prototype=Object.create(Error.prototype),ce.prototype.constructor=ce}function fe(n,t){return new Promise((function(r,e){var u=new ee(n,t);if(u.signal&&u.signal.aborted)return e(new ce("Aborted","AbortError"));var i=new XMLHttpRequest;function o(){i.abort()}i.onload=function(){var n,t,e={status:i.status,statusText:i.statusText,headers:(n=i.getAllResponseHeaders()||"",t=new Xr,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 u=r.join(":").trim();t.append(e,u)}})),t)};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var u="response"in i?i.response:i.responseText;setTimeout((function(){r(new ie(u,e))}),0)},i.onerror=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){e(new ce("Aborted","AbortError"))}),0)},i.open(u.method,function(n){try{return""===n&&zr.location.href?zr.location.href:n}catch(t){return n}}(u.url),!0),"include"===u.credentials?i.withCredentials=!0:"omit"===u.credentials&&(i.withCredentials=!1),"responseType"in i&&(Lr?i.responseType="blob":Br&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Xr?u.headers.forEach((function(n,t){i.setRequestHeader(t,n)})):Object.getOwnPropertyNames(t.headers).forEach((function(n){i.setRequestHeader(n,Jr(t.headers[n]))})),u.signal&&(u.signal.addEventListener("abort",o),i.onreadystatechange=function(){4===i.readyState&&u.signal.removeEventListener("abort",o)}),i.send(void 0===u._bodyInit?null:u._bodyInit)}))}fe.polyfill=!0,zr.fetch||(zr.fetch=fe,zr.Headers=Xr,zr.Request=ee,zr.Response=ie);var ae=g((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 se.ResponseContext(n.status,t,r)}));return(0,qr.from)(e)},n}();t.IsomorphicFetchHttpLibrary=r})),se=g((function(n,t){var r,e,u=w&&w.__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=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),o=w&&w.__exportStar||function(n,t){for(var r in n)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,n,r)},c=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},f=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapHttpLibrary=t.ResponseContext=t.SelfDecodingBody=t.RequestContext=t.HttpException=t.HttpMethod=void 0,o(ae,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 a=function(n){function t(t){return n.call(this,t)||this}return u(t,n),t}(Error);t.HttpException=a;var s=function(){function n(n,t){this.httpMethod=t,this.headers={},this.body=void 0,this.url=new Cr(n,!0)}return n.prototype.getUrl=function(){return this.url.toString()},n.prototype.setUrl=function(n){this.url=new Cr(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=s;var v=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 f(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=v;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 u=e[r].split("=",2),i=u[0],o=u[1];i=i.toLowerCase().trim(),void 0===o?t[""]=i:((o=o.trim()).startsWith('"')&&o.endsWith('"')&&(o=o.substring(1,o.length-1)),t[i]=o)}return t},n.prototype.getBodyAsFile=function(){return c(this,void 0,void 0,(function(){var n,t,r;return f(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,qr.from)(n.send(t))}}}})),ve=g((function(n,t){var r=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},e=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.configureAuthMethods=t.BearerAuthAuthentication=void 0;var u=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,u,i;return e(this,(function(e){switch(e.label){case 0:return r=(t=n).setHeaderParam,u=["Authorization"],i="Bearer ",[4,this.tokenProvider.getToken()];case 1:return r.apply(t,u.concat([i+e.sent()])),[2]}}))}))},n}();t.BearerAuthAuthentication=u,t.configureAuthMethods=function(n){var t={};return n?(t.default=n.default,n.bearerAuth&&(t.bearerAuth=new u(n.bearerAuth.tokenProvider)),t):t}})),de=g((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})),le=g((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})),pe=g((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})),he=g((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})),me=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),be=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.FilterEvent=u})),ye=g((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})),we=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),ge=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.ProductClickEvent=u})),Ie=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.ProductViewEvent=u})),Oe=g((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})),je=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Re=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.SearchEvent=u})),_e=g((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})),Ue=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Me=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),xe=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Ee=g((function(n,t){var r,e=w&&w.__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 u=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}(pe.Event);t.WidgetEvent=u})),Ae=g((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})),Te=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__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(de,t),e(le,t),e(pe,t),e(he,t),e(me,t),e(be,t),e(ye,t),e(we,t),e(ge,t),e(Ie,t),e(Oe,t),e(je,t),e(Re,t),e(_e,t),e(Ue,t),e(Me,t),e(xe,t),e(Ee,t),e(Ae,t)})),We=g((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,qr.from)(this.middleware.pre(n))},n.prototype.post=function(n){return(0,qr.from)(this.middleware.post(n))},n}();t.PromiseMiddlewareWrapper=r})),Pe=g((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 se.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]})),Se=g((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:Pe.server1,httpApi:n.httpApi||new ae.IsomorphicFetchHttpLibrary,middleware:n.middleware||[],authMethods:(0,ve.configureAuthMethods)(n.authMethods)};return n.promiseMiddleware&&n.promiseMiddleware.forEach((function(n){return t.middleware.push(new We.PromiseMiddlewareWrapper(n))})),t}})),ke=g((function(n,t){var r,e=w&&w.__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 u=function(n){function t(t,r,e,u){var i=n.call(this,"HTTP-Code: "+t+"\nMessage: "+r+"\nBody: "+JSON.stringify(e)+"\nHeaders: "+JSON.stringify(u))||this;return i.code=t,i.body=e,i.headers=u,i}return e(t,n),t}(Error);t.ApiException=u})),Ne=g((function(n,t){var r,e=w&&w.__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 u=function(n){function t(t,r,e){var u=n.call(this,"Required parameter "+e+" was null or undefined when calling "+t+"."+r+".")||this;return u.api=t,u.method=r,u.field=e,u.name="RequiredError",u}return e(t,n),t}(Error);t.RequiredError=u})),Ce=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__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(de,t),e(le,t),e(pe,t),e(he,t),e(me,t),e(be,t),e(ye,t),e(we,t),e(ge,t),e(Ie,t),e(Oe,t),e(je,t),e(Re,t),e(_e,t),e(Ue,t),e(Me,t),e(xe,t),e(Ee,t),e(Ae,t);var u=de,i=le,o=pe,c=he,f=be,a=ye,s=ge,v=Ie,d=Oe,l=Re,p=_e,h=Ee,m=Ae,b=["string","boolean","double","integer","long","float","number","any"],y={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},g=new Set(["EventConfirmationStatusEnum","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),I={ErrorObject:u.ErrorObject,ErrorResponse:i.ErrorResponse,Event:o.Event,EventConfirmation:c.EventConfirmation,FilterEvent:f.FilterEvent,FilterEventAllOf:a.FilterEventAllOf,ProductClickEvent:s.ProductClickEvent,ProductViewEvent:v.ProductViewEvent,ProductViewEventAllOf:d.ProductViewEventAllOf,SearchEvent:l.SearchEvent,SearchEventAllOf:p.SearchEventAllOf,WidgetEvent:h.WidgetEvent,WidgetEventAllOf:m.WidgetEventAllOf},O=function(){function n(){}return n.findCorrectType=function(n,t){if(null==n)return t;if(-1!==b.indexOf(t.toLowerCase()))return t;if("Date"===t)return t;if(g.has(t))return t;if(!I[t])return t;var r=I[t].discriminator;if(null==r)return t;if(n[r]){var e=n[r];return I[e]?e:t}return t},n.serialize=function(t,r,e){if(null==t)return t;if(-1!==b.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var u=r.replace("Array<","");u=u.substring(0,u.length-1);var i=[];for(var o in t)i.push(n.serialize(t[o],u,e));return i}if("Date"===r){if("date"==e){var c=t.getMonth()+1;c=c<10?"0"+c.toString():c.toString();var f=t.getDate();return f=f<10?"0"+f.toString():f.toString(),t.getFullYear()+"-"+c+"-"+f}return t.toISOString()}if(g.has(r))return t;if(!I[r])return t;r=this.findCorrectType(t,r);var a=I[r].getAttributeTypeMap(),s={};for(var o in a){var v=a[o];s[v.baseName]=n.serialize(t[v.name],v.type,v.format)}return s},n.deserialize=function(t,r,e){if(r=n.findCorrectType(t,r),null==t)return t;if(-1!==b.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var u=r.replace("Array<","");u=u.substring(0,u.length-1);var i=[];for(var o in t)i.push(n.deserialize(t[o],u,e));return i}if("Date"===r)return new Date(t);if(g.has(r))return t;if(!I[r])return t;var c=new I[r],f=I[r].getAttributeTypeMap();for(var o in f){var a=f[o];c[a.name]=n.deserialize(t[a.baseName],a.type,a.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,u=n.map(this.normalizeMediaType);e<u.length;e++){var i=u[e];y[i]>r&&(t=i,r=y[i])}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=O})),qe=g((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")}})),ze=g((function(n,t){var r,e=w&&w.__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)}),u=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},i=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultApiResponseProcessor=t.DefaultApiRequestFactory=void 0;var o=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,o;return u(this,void 0,void 0,(function(){var u,c,f,a,s,v;return i(this,(function(i){switch(i.label){case 0:return(c=(u=t||this.configuration).baseServer.makeRequestContext("/event",se.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),f=Ce.ObjectSerializer.getPreferredMediaType(["application/json"]),c.setHeaderParam("Content-Type",f),a=Ce.ObjectSerializer.stringify(Ce.ObjectSerializer.serialize(n,"ProductViewEvent | ProductClickEvent | WidgetEvent | FilterEvent | SearchEvent",""),f),c.setBody(a),(null==(s=u.authMethods.bearerAuth)?void 0:s.applySecurityAuthentication)?[4,null==s?void 0:s.applySecurityAuthentication(c)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(v=(null===(r=null==t?void 0:t.authMethods)||void 0===r?void 0:r.default)||(null===(o=null===(e=this.configuration)||void 0===e?void 0:e.authMethods)||void 0===o?void 0:o.default))?void 0:v.applySecurityAuthentication)?[4,null==v?void 0:v.applySecurityAuthentication(c)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,c]}}))}))},t}(Ne.BaseAPIRequestFactory);t.DefaultApiRequestFactory=o;var c=function(){function n(){}return n.prototype.trackEvent=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f,a,s,v,d,l,p,h,m,b;return i(this,(function(i){switch(i.label){case 0:return t=Ce.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,qe.isCodeInRange)("200",n.httpStatusCode)?(e=(r=Ce.ObjectSerializer).deserialize,o=(u=Ce.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,v=e.apply(r,[o.apply(u,[i.sent(),t]),"EventConfirmation",""])];case 2:return(0,qe.isCodeInRange)("502",n.httpStatusCode)?(f=(c=Ce.ObjectSerializer).deserialize,s=(a=Ce.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:throw v=f.apply(c,[s.apply(a,[i.sent(),t]),"ErrorResponse",""]),new ke.ApiException(502,"an error occurred",v,n.headers);case 4:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(l=(d=Ce.ObjectSerializer).deserialize,h=(p=Ce.ObjectSerializer).parse,[4,n.body.text()]):[3,6];case 5:return[2,v=l.apply(d,[h.apply(p,[i.sent(),t]),"EventConfirmation",""])];case 6:return m=ke.ApiException.bind,b=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 7:throw new(m.apply(ke.ApiException,b.concat([i.sent(),n.headers])))}}))}))},n}();t.DefaultApiResponseProcessor=c})),De=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableDefaultApi=void 0;var r=qr,e=function(){function n(n,t,r){this.configuration=n,this.requestFactory=t||new ze.DefaultApiRequestFactory(n),this.responseProcessor=r||new ze.DefaultApiResponseProcessor}return n.prototype.trackEvent=function(n,t){for(var e=this,u=this.requestFactory.trackEvent(n,t),i=(0,qr.from)(u),o=function(n){i=i.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},c=0,f=this.configuration.middleware;c<f.length;c++)o(f[c]);return i.pipe((0,r.mergeMap)((function(n){return e.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,qr.of)(n),u=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=e.configuration.middleware;i<o.length;i++)u(o[i]);return t.pipe((0,r.map)((function(n){return e.responseProcessor.trackEvent(n)})))})))},n}();t.ObservableDefaultApi=e})),Fe=g((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseDefaultApi=void 0;var r=function(){function n(n,t,r){this.api=new De.ObservableDefaultApi(n,t,r)}return n.prototype.trackEvent=function(n,t){return this.api.trackEvent(n,t).toPromise()},n}();t.PromiseDefaultApi=r})),Le=g((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__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(se,t),e(ve,t),e(Te,t),Object.defineProperty(t,"createConfiguration",{enumerable:!0,get:function(){return Se.createConfiguration}}),e(ke,t),e(Pe,t),Object.defineProperty(t,"DefaultApi",{enumerable:!0,get:function(){return Fe.PromiseDefaultApi}})}));const He=(n,t)=>{const r=(n=>(n=>!n.includes("stage"))(n)?Le.servers[0]:Le.servers[1])(n),e=(n=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((t=>t(n)))}}}))(t);return new Le.DefaultApi(Le.createConfiguration({baseServer:r,authMethods:e}))},Be=n=>t=>Object.assign(Object.assign({},t),n),Ge=Be({widget:"VPR",typ:"product_view_event"}),Ve=Be({widget:"VPS",typ:"product_view_event"}),$e=Be({widget:"VPR",typ:"product_click_event"}),Je=Be({widget:"VPS",typ:"product_click_event"}),Ke=Be({widget:"VPR",typ:"widget_event"}),Xe=Be({widget:"VPS",typ:"widget_event"}),Ze=Be({widget:"VPS",typ:"search_event"}),Qe=Be({widget:"VPS",typ:"filter_event"});export{He as A,Xe as B,$n as C,Bt as D,Dn as E,Pn as F,ot as G,xn as H,Yn as I,rt as J,H as K,X as L,un as M,Lt as N,N as O,cn as P,Ge as Q,$e as R,W as S,Ke as T,Vn as U,Et as V,I as _,h as a,or as b,gt as c,ht as d,It as e,p as f,y as g,Ot as h,fr as i,lt as j,Qt as k,sr as l,bt as m,nn as n,wt as o,i as p,Xt as q,Kt as r,xt as s,yt as t,Jn as u,Ve as v,Je as w,Ze as x,Qe as y,yr as z}