vviinn-widgets 2.44.2 → 2.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/VisualSearchIcon-1180d079.js +8 -0
- package/dist/cjs/{customized-slots-49c03dc1.js → customized-slots-1b59bd38.js} +1 -0
- package/dist/cjs/{index-7ff2ab5f.js → index-279a6a0f.js} +75 -75
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-5912f89d.js → package-3b910c03.js} +1 -1
- package/dist/cjs/{search-filters_16.cjs.entry.js → search-filters_17.cjs.entry.js} +116 -55
- package/dist/cjs/{imageSearch.store-dc4e98b3.js → search.store-0b319593.js} +55 -21
- package/dist/cjs/vviinn-button.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +60 -51
- package/dist/cjs/vviinn-preloader.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +4 -2
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +3 -3
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +7 -4
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +65 -40
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/customized-slots.js +1 -0
- package/dist/collection/components/image-search/search-filters/search-filters.js +5 -5
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +2 -1
- package/dist/collection/components/vviinn-example-image/vviinn-example-image.js +1 -1
- package/dist/collection/components/vviinn-icons/icons/ArrowIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/BasketIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CameraActionIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CameraIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CheckCircleIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CheckIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/ChevronIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CloseIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/CrossIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/GalleryActionIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/LoaderIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/MinusIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/PlusIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/RoundCameraIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/SecondaryActionIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/TextSearchIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/UpdateIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/UploadActionIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/VisualSearchIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/icons/WarningIcon.js +2 -0
- package/dist/collection/components/vviinn-icons/index.js +20 -18
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +1 -1
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +7 -7
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +7 -8
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +2 -2
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +2 -2
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +1 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +2 -2
- package/dist/collection/components/vviinn-text-search/vviinn-text-search.css +63 -0
- package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +118 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +7 -4
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +2 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +20 -1
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +2 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +15 -1
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +77 -31
- package/dist/collection/locale/resources-vps.js +2 -0
- package/dist/collection/network/request.js +1 -1
- package/dist/collection/searchSession/searchSession.js +5 -10
- package/dist/collection/store/{imageSearch.store.js → search.store.js} +34 -5
- package/dist/esm/VisualSearchIcon-13f7da6a.js +6 -0
- package/dist/esm/{customized-slots-9a9f8c20.js → customized-slots-3bea41d2.js} +1 -0
- package/dist/esm/{index-53105ad4.js → index-9c15b8f1.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-b2424850.js → package-cae9f186.js} +1 -1
- package/dist/esm/{search-filters_16.entry.js → search-filters_17.entry.js} +85 -25
- package/dist/esm/{imageSearch.store-c0f2a178.js → search.store-5eebcfbe.js} +54 -21
- package/dist/esm/vviinn-button.entry.js +1 -1
- package/dist/esm/vviinn-carousel_4.entry.js +19 -10
- package/dist/esm/vviinn-preloader.entry.js +2 -2
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +4 -2
- package/dist/esm/vviinn-vpr-button.entry.js +2 -2
- package/dist/esm/vviinn-vps-button.entry.js +8 -5
- package/dist/esm/vviinn-vps-widget.entry.js +61 -36
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-icons/icons/ArrowIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/BasketIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CameraActionIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CameraIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CheckCircleIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CheckIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/ChevronIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CloseIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/CrossIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/GalleryActionIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/LoaderIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/MinusIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/PlusIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/RoundCameraIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/SecondaryActionIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/TextSearchIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/UpdateIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/UploadActionIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/VisualSearchIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/icons/WarningIcon.d.ts +1 -0
- package/dist/types/components/vviinn-icons/index.d.ts +20 -17
- package/dist/types/components/vviinn-text-search/vviinn-text-search.d.ts +18 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +2 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +9 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/network/request.d.ts +1 -1
- package/dist/types/searchSession/searchSession.d.ts +17 -3
- package/dist/types/store/{imageSearch.store.d.ts → search.store.d.ts} +6 -4
- package/{www/build/p-987a8e9f.js → dist/vviinn-widgets/p-04cdf7c5.js} +1 -1
- package/dist/vviinn-widgets/{p-7f2c9319.entry.js → p-185e2420.entry.js} +1 -1
- package/dist/vviinn-widgets/p-1a1d85b7.js +1 -0
- package/dist/vviinn-widgets/p-3d2759e3.entry.js +1 -0
- package/dist/vviinn-widgets/{p-da7273ce.js → p-41ab810c.js} +1 -1
- package/dist/vviinn-widgets/{p-ed082ecf.entry.js → p-4c726a51.entry.js} +1 -1
- package/dist/vviinn-widgets/p-ae471f24.entry.js +11 -0
- package/dist/vviinn-widgets/p-b21ebac9.js +1 -0
- package/dist/vviinn-widgets/p-c96f5909.entry.js +1 -0
- package/dist/vviinn-widgets/p-d1592ac5.entry.js +1 -0
- package/dist/vviinn-widgets/p-d162fe72.entry.js +1 -0
- package/dist/vviinn-widgets/{p-010b4979.entry.js → p-ec7b07a0.entry.js} +1 -1
- package/dist/vviinn-widgets/p-ed482314.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/{dist/vviinn-widgets/p-987a8e9f.js → www/build/p-04cdf7c5.js} +1 -1
- package/www/build/{p-7f2c9319.entry.js → p-185e2420.entry.js} +1 -1
- package/www/build/p-1a1d85b7.js +1 -0
- package/www/build/p-3d2759e3.entry.js +1 -0
- package/www/build/{p-da7273ce.js → p-41ab810c.js} +1 -1
- package/www/build/{p-ed082ecf.entry.js → p-4c726a51.entry.js} +1 -1
- package/www/build/p-ae471f24.entry.js +11 -0
- package/www/build/p-b21ebac9.js +1 -0
- package/www/build/p-c96f5909.entry.js +1 -0
- package/www/build/p-d1592ac5.entry.js +1 -0
- package/www/build/p-d162fe72.entry.js +1 -0
- package/www/build/{p-010b4979.entry.js → p-ec7b07a0.entry.js} +1 -1
- package/www/build/p-ed482314.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/cjs/index-28052f80.js +0 -48
- package/dist/esm/index-ac58a953.js +0 -34
- package/dist/vviinn-widgets/p-044c5f45.entry.js +0 -1
- package/dist/vviinn-widgets/p-726774f9.js +0 -1
- package/dist/vviinn-widgets/p-7f19baa1.js +0 -1
- package/dist/vviinn-widgets/p-a7cc44b3.entry.js +0 -1
- package/dist/vviinn-widgets/p-ab938400.entry.js +0 -1
- package/dist/vviinn-widgets/p-b1e9dd46.entry.js +0 -1
- package/dist/vviinn-widgets/p-c8ef8d6c.js +0 -1
- package/dist/vviinn-widgets/p-ecd1c141.entry.js +0 -11
- package/www/build/p-044c5f45.entry.js +0 -1
- package/www/build/p-726774f9.js +0 -1
- package/www/build/p-7f19baa1.js +0 -1
- package/www/build/p-a7cc44b3.entry.js +0 -1
- package/www/build/p-ab938400.entry.js +0 -1
- package/www/build/p-b1e9dd46.entry.js +0 -1
- package/www/build/p-c8ef8d6c.js +0 -1
- package/www/build/p-ecd1c141.entry.js +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,f as r}from"./p-1e83e6ba.js";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(n,r,t){return n(t={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},t.exports),t.exports}var e=u((function(n,r){var u=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};function e(n){return n}function o(n){return function(){return n}}function i(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return r(n.apply(this,arguments))};case 3:return function(){return t(r(n.apply(this,arguments)))};case 4:return function(){return u(t(r(n.apply(this,arguments))))};case 5:return function(){return e(u(t(r(n.apply(this,arguments)))))};case 6:return function(){return o(e(u(t(r(n.apply(this,arguments))))))};case 7:return function(){return i(o(e(u(t(r(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(e(u(t(r(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(e(u(t(r(n.apply(this,arguments)))))))))}}}function c(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(r,"__esModule",{value:!0}),r.dual=r.getEndomorphismMonoid=r.not=r.SK=r.hole=r.pipe=r.untupled=r.tupled=r.absurd=r.decrement=r.increment=r.tuple=r.flow=r.flip=r.constVoid=r.constUndefined=r.constNull=r.constFalse=r.constTrue=r.constant=r.unsafeCoerce=r.identity=r.apply=r.getRing=r.getSemiring=r.getMonoid=r.getSemigroup=r.getBooleanAlgebra=void 0,r.getBooleanAlgebra=function(n){return function(){return{meet:function(r,t){return function(u){return n.meet(r(u),t(u))}},join:function(r,t){return function(u){return n.join(r(u),t(u))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(r,t){return function(u){return n.implies(r(u),t(u))}},not:function(r){return function(t){return n.not(r(t))}}}}},r.getSemigroup=function(n){return function(){return{concat:function(r,t){return function(u){return n.concat(r(u),t(u))}}}}},r.getMonoid=function(n){var t=(0,r.getSemigroup)(n);return function(){return{concat:t().concat,empty:function(){return n.empty}}}},r.getSemiring=function(n){return{add:function(r,t){return function(u){return n.add(r(u),t(u))}},zero:function(){return n.zero},mul:function(r,t){return function(u){return n.mul(r(u),t(u))}},one:function(){return n.one}}},r.getRing=function(n){var t=(0,r.getSemiring)(n);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(r,t){return function(u){return n.sub(r(u),t(u))}}}},r.apply=function(n){return function(r){return r(n)}},r.identity=e,r.unsafeCoerce=e,r.constant=o,r.constTrue=o(!0),r.constFalse=o(!1),r.constNull=o(null),r.constUndefined=o(void 0),r.constVoid=r.constUndefined,r.flip=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.length>1?n(r[1],r[0]):function(t){return n(t)(r[0])}}},r.flow=i,r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n},r.increment=function(n){return n+1},r.decrement=function(n){return n-1},r.absurd=c,r.tupled=function(n){return function(r){return n.apply(void 0,r)}},r.untupled=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return n(r)}},r.pipe=function(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}},r.hole=c,r.SK=function(n,r){return r},r.not=function(n){return function(r){return!n(r)}},r.getEndomorphismMonoid=function(){return{concat:function(n,r){return i(n,r)},empty:e}},r.dual=function(n,r){var t="number"==typeof n?function(r){return r.length>=n}:n;return function(){var n=Array.from(arguments);return t(arguments)?r.apply(this,n):function(t){return r.apply(void 0,u([t],n,!1))}}}})),o=u((function(n,r){var u=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.flatMapReader=r.flatMapTask=r.flatMapIO=r.flatMapEither=r.flatMapOption=r.flatMapNullable=r.liftOption=r.liftNullable=r.fromReadonlyNonEmptyArray=r.has=r.emptyRecord=r.emptyReadonlyArray=r.tail=r.head=r.isNonEmpty=r.singleton=r.right=r.left=r.isRight=r.isLeft=r.some=r.none=r.isSome=r.isNone=void 0,r.isNone=function(n){return"None"===n._tag},r.isSome=function(n){return"Some"===n._tag},r.none={_tag:"None"},r.some=function(n){return{_tag:"Some",value:n}},r.isLeft=function(n){return"Left"===n._tag},r.isRight=function(n){return"Right"===n._tag},r.left=function(n){return{_tag:"Left",left:n}},r.right=function(n){return{_tag:"Right",right:n}},r.singleton=function(n){return[n]},r.isNonEmpty=function(n){return n.length>0},r.head=function(n){return n[0]},r.tail=function(n){return n.slice(1)},r.emptyReadonlyArray=[],r.emptyRecord={},r.has=Object.prototype.hasOwnProperty,r.fromReadonlyNonEmptyArray=function(n){return u([n[0]],n.slice(1),!0)},r.liftNullable=function(n){return function(t,u){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=t.apply(void 0,e);return n.fromEither(null==i?(0,r.left)(u.apply(void 0,e)):(0,r.right)(i))}}},r.liftOption=function(n){return function(t,u){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=t.apply(void 0,e);return n.fromEither((0,r.isNone)(i)?(0,r.left)(u.apply(void 0,e)):(0,r.right)(i.value))}}},r.flatMapNullable=function(n,t){return(0,e.dual)(3,(function(u,e,o){return t.flatMap(u,(0,r.liftNullable)(n)(e,o))}))},r.flatMapOption=function(n,t){return(0,e.dual)(3,(function(u,e,o){return t.flatMap(u,(0,r.liftOption)(n)(e,o))}))},r.flatMapEither=function(n,r){return(0,e.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromEither(u(r))}))}))},r.flatMapIO=function(n,r){return(0,e.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromIO(u(r))}))}))},r.flatMapTask=function(n,r){return(0,e.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromTask(u(r))}))}))},r.flatMapReader=function(n,r){return(0,e.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromReader(u(r))}))}))}})),i=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),i=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),c=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return i(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.sequenceS=r.sequenceT=r.getApplySemigroup=r.apS=r.apSecond=r.apFirst=r.ap=void 0;var f=c(o);function a(n,r,t){return function(u){for(var e=Array(t.length+1),o=0;o<t.length;o++)e[o]=t[o];return e[t.length]=u,0===r?n.apply(null,e):a(n,r-1,e)}}r.ap=function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}},r.apFirst=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(n){return function(){return n}})),r)}}},r.apSecond=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(){return function(n){return n}})),r)}}},r.apS=function(n){return function(r,t){return function(u){return n.ap(n.map(u,(function(n){return function(t){var u;return Object.assign({},n,((u={})[r]=t,u))}})),t)}}},r.getApplySemigroup=function(n){return function(r){return{concat:function(t,u){return n.ap(n.map(t,(function(n){return function(t){return r.concat(n,t)}})),u)}}}};var v={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};r.sequenceT=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,o=function(n){return f.has.call(v,n)||(v[n]=a(e.tuple,n-1,[])),v[n]}(u),i=n.map(r[0],o),c=1;c<u;c++)i=n.ap(i,r[c]);return i}},r.sequenceS=function(n){return function(r){for(var t=Object.keys(r),u=t.length,e=function(n){var r=n.length;switch(r){case 1:return function(r){var t;return(t={})[n[0]]=r,t};case 2:return function(r){return function(t){var u;return(u={})[n[0]]=r,u[n[1]]=t,u}};case 3:return function(r){return function(t){return function(u){var e;return(e={})[n[0]]=r,e[n[1]]=t,e[n[2]]=u,e}}};case 4:return function(r){return function(t){return function(u){return function(e){var o;return(o={})[n[0]]=r,o[n[1]]=t,o[n[2]]=u,o[n[3]]=e,o}}}};case 5:return function(r){return function(t){return function(u){return function(e){return function(o){var i;return(i={})[n[0]]=r,i[n[1]]=t,i[n[2]]=u,i[n[3]]=e,i[n[4]]=o,i}}}}};default:return a((function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];for(var e={},o=0;o<r;o++)e[n[o]]=t[o];return e}),r-1,[])}}(t),o=n.map(r[t[0]],e),i=1;i<u;i++)o=n.ap(o,r[t[i]]);return o}}})),c=u((function(n,r){function t(n){return function(r,t){return n.chain(r,(function(r){return n.map(t(r),(function(){return r}))}))}}Object.defineProperty(r,"__esModule",{value:!0}),r.bind=r.tap=r.chainFirst=void 0,r.chainFirst=function(n){var r=t(n);return function(n){return function(t){return r(t,n)}}},r.tap=t,r.bind=function(n){return function(r,t){return function(u){return n.chain(u,(function(u){return n.map(t(u),(function(n){var t;return Object.assign({},u,((t={})[r]=n,t))}))}))}}}})),f=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),i=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),f=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return i(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.tapEither=r.filterOrElse=r.chainFirstEitherK=r.chainEitherK=r.fromEitherK=r.chainOptionK=r.fromOptionK=r.fromPredicate=r.fromOption=void 0;var a=f(o);function v(n){return function(r){return function(t){return n.fromEither(a.isNone(t)?a.left(r()):a.right(t.value))}}}function d(n){var r=v(n);return function(n){var t=r(n);return function(n){return(0,e.flow)(n,t)}}}function p(n){return function(r){return(0,e.flow)(r,n.fromEither)}}function s(n,r){var t=p(n),u=(0,c.tap)(r);return function(n,r){return u(n,t(r))}}r.fromOption=v,r.fromPredicate=function(n){return function(r,t){return function(u){return n.fromEither(r(u)?a.right(u):a.left(t(u)))}}},r.fromOptionK=d,r.chainOptionK=function(n,r){var t=d(n);return function(n){var u=t(n);return function(n){return function(t){return r.chain(t,u(n))}}}},r.fromEitherK=p,r.chainEitherK=function(n,r){var t=p(n);return function(n){return function(u){return r.chain(u,t(n))}}},r.chainFirstEitherK=function(n,r){var t=s(n,r);return function(n){return function(r){return t(r,n)}}},r.filterOrElse=function(n,r){return function(t,u){return function(e){return r.chain(e,(function(r){return n.fromEither(t(r)?a.right(r):a.left(u(r)))}))}}},r.tapEither=s})),a=u((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}function u(n){return function(r,t){return n.map(r,(function(){return t}))}}Object.defineProperty(r,"__esModule",{value:!0}),r.asUnit=r.as=r.getFunctorComposition=r.let=r.bindTo=r.flap=r.map=void 0,r.map=t,r.flap=function(n){return function(r){return function(t){return n.map(t,(function(n){return n(r)}))}}},r.bindTo=function(n){return function(r){return function(t){return n.map(t,(function(n){var t;return(t={})[r]=n,t}))}}},r.let=function(n){return function(r,t){return function(u){return n.map(u,(function(n){var u;return Object.assign({},n,((u={})[r]=t(n),u))}))}}},r.getFunctorComposition=function(n,r){var u=t(n,r);return{map:function(n,r){return(0,e.pipe)(n,u(r))}}},r.as=u,r.asUnit=function(n){var r=u(n);return function(n){return r(n,void 0)}}})),v=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.eqDate=r.eqNumber=r.eqString=r.eqBoolean=r.eq=r.strictEqual=r.getStructEq=r.getTupleEq=r.Contravariant=r.getMonoid=r.getSemigroup=r.eqStrict=r.URI=r.contramap=r.tuple=r.struct=r.fromEquals=void 0,r.fromEquals=function(n){return{equals:function(r,t){return r===t||n(r,t)}}},r.struct=function(n){return(0,r.fromEquals)((function(r,t){for(var u in n)if(!n[u].equals(r[u],t[u]))return!1;return!0}))},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return(0,r.fromEquals)((function(r,t){return n.every((function(n,u){return n.equals(r[u],t[u])}))}))},r.contramap=function(n){return function(t){return(0,r.fromEquals)((function(r,u){return t.equals(n(r),n(u))}))}},r.URI="Eq",r.eqStrict={equals:function(n,r){return n===r}};var t={equals:function(){return!0}};r.getSemigroup=function(){return{concat:function(n,t){return(0,r.fromEquals)((function(r,u){return n.equals(r,u)&&t.equals(r,u)}))}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:t}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,e.pipe)(n,(0,r.contramap)(t))}},r.getTupleEq=r.tuple,r.getStructEq=r.struct,r.strictEqual=r.eqStrict.equals,r.eq=r.Contravariant,r.eqBoolean=r.eqStrict,r.eqString=r.eqStrict,r.eqNumber=r.eqStrict,r.eqDate={equals:function(n,r){return n.valueOf()===r.valueOf()}}})),d=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ordDate=r.ordNumber=r.ordString=r.ordBoolean=r.ord=r.getDualOrd=r.getTupleOrd=r.between=r.clamp=r.max=r.min=r.geq=r.leq=r.gt=r.lt=r.equals=r.trivial=r.Contravariant=r.getMonoid=r.getSemigroup=r.URI=r.contramap=r.reverse=r.tuple=r.fromCompare=r.equalsDefault=void 0,r.equalsDefault=function(n){return function(r,t){return r===t||0===n(r,t)}},r.fromCompare=function(n){return{equals:(0,r.equalsDefault)(n),compare:function(r,t){return r===t?0:n(r,t)}}},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return(0,r.fromCompare)((function(r,t){for(var u=0;u<n.length-1;u++){var e=n[u].compare(r[u],t[u]);if(0!==e)return e}return n[u].compare(r[u],t[u])}))},r.reverse=function(n){return(0,r.fromCompare)((function(r,t){return n.compare(t,r)}))},r.contramap=function(n){return function(t){return(0,r.fromCompare)((function(r,u){return t.compare(n(r),n(u))}))}},r.URI="Ord",r.getSemigroup=function(){return{concat:function(n,t){return(0,r.fromCompare)((function(r,u){var e=n.compare(r,u);return 0!==e?e:t.compare(r,u)}))}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:(0,r.fromCompare)((function(){return 0}))}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,e.pipe)(n,(0,r.contramap)(t))}},r.trivial={equals:e.constTrue,compare:(0,e.constant)(0)},r.equals=function(n){return function(r){return function(t){return t===r||0===n.compare(t,r)}}},r.lt=function(n){return function(r,t){return-1===n.compare(r,t)}},r.gt=function(n){return function(r,t){return 1===n.compare(r,t)}},r.leq=function(n){return function(r,t){return 1!==n.compare(r,t)}},r.geq=function(n){return function(r,t){return-1!==n.compare(r,t)}},r.min=function(n){return function(r,t){return r===t||n.compare(r,t)<1?r:t}},r.max=function(n){return function(r,t){return r===t||n.compare(r,t)>-1?r:t}},r.clamp=function(n){var t=(0,r.min)(n),u=(0,r.max)(n);return function(n,r){return function(e){return u(t(e,r),n)}}},r.between=function(n){var t=(0,r.lt)(n),u=(0,r.gt)(n);return function(n,r){return function(e){return!t(e,n)&&!u(e,r)}}},r.getTupleOrd=r.tuple,r.getDualOrd=r.reverse,r.ord=r.Contravariant;var t={equals:v.eqStrict.equals,compare:function(n,r){return n<r?-1:n>r?1:0}};r.ordBoolean=t,r.ordString=t,r.ordNumber=t,r.ordDate=(0,e.pipe)(r.ordNumber,(0,r.contramap)((function(n){return n.valueOf()})))})),p=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.concatAll=r.endo=r.filterSecond=r.filterFirst=r.reverse=void 0,r.reverse=function(n){return{concat:function(r,t){return n.concat(t,r)}}},r.filterFirst=function(n){return function(r){return{concat:function(t,u){return n(t)?r.concat(t,u):u}}}},r.filterSecond=function(n){return function(r){return{concat:function(t,u){return n(u)?r.concat(t,u):t}}}},r.endo=function(n){return function(r){return{concat:function(t,u){return r.concat(n(t),n(u))}}}},r.concatAll=function(n){return function(r){return function(t){return t.reduce((function(r,t){return n.concat(r,t)}),r)}}}})),s=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),i=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),c=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return i(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.semigroupProduct=r.semigroupSum=r.semigroupString=r.getFunctionSemigroup=r.semigroupAny=r.semigroupAll=r.fold=r.getIntercalateSemigroup=r.getMeetSemigroup=r.getJoinSemigroup=r.getDualSemigroup=r.getStructSemigroup=r.getTupleSemigroup=r.getFirstSemigroup=r.getLastSemigroup=r.getObjectSemigroup=r.semigroupVoid=r.concatAll=r.last=r.first=r.intercalate=r.tuple=r.struct=r.reverse=r.constant=r.max=r.min=void 0;var f=c(o),a=c(p),v=c(d);r.min=function(n){return{concat:v.min(n)}},r.max=function(n){return{concat:v.max(n)}},r.constant=function(n){return{concat:function(){return n}}},r.reverse=a.reverse,r.struct=function(n){return{concat:function(r,t){var u={};for(var e in n)f.has.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{concat:function(r,t){return n.map((function(n,u){return n.concat(r[u],t[u])}))}}},r.intercalate=function(n){return function(r){return{concat:function(t,u){return r.concat(t,r.concat(n,u))}}}},r.first=function(){return{concat:e.identity}},r.last=function(){return{concat:function(n,r){return r}}},r.concatAll=a.concatAll,r.semigroupVoid=(0,r.constant)(void 0),r.getObjectSemigroup=function(){return{concat:function(n,r){return Object.assign({},n,r)}}},r.getLastSemigroup=r.last,r.getFirstSemigroup=r.first,r.getTupleSemigroup=r.tuple,r.getStructSemigroup=r.struct,r.getDualSemigroup=r.reverse,r.getJoinSemigroup=r.max,r.getMeetSemigroup=r.min,r.getIntercalateSemigroup=r.intercalate,r.fold=function(n){var t=(0,r.concatAll)(n);return function(n,r){return void 0===r?t(n):t(n)(r)}},r.semigroupAll={concat:function(n,r){return n&&r}},r.semigroupAny={concat:function(n,r){return n||r}},r.getFunctionSemigroup=e.getSemigroup,r.semigroupString={concat:function(n,r){return n+r}},r.semigroupSum={concat:function(n,r){return n+r}},r.semigroupProduct={concat:function(n,r){return n*r}}})),l=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),f=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),p=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return f(r,n),r},l=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.reduceRight=r.foldMap=r.reduce=r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.flatMap=r.ap=r.alt=r.altW=r.of=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.modifyAt=r.updateAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.fromArray=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromReadonlyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=r.empty=void 0,r.groupSort=r.chain=r.intercalate=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.let=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.foldMapWithIndex=r.reduceWithIndex=void 0,r.readonlyNonEmptyArray=r.fold=r.prependToAll=r.insertAt=r.snoc=r.cons=r.unsnoc=r.uncons=r.filterWithIndex=r.filter=void 0;var m=p(o),h=p(s);function I(n){return function(r){return r.concat(n)}}function R(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function b(n){return function(t){var u=t.length;if(0===u)return r.empty;for(var e=[],o=t[0],i=[o],c=1;c<u;c++){var f=t[c];n.equals(f,o)?i.push(f):(e.push(i),i=[o=f])}return e.push(i),e}}r.empty=m.emptyReadonlyArray,r.isNonEmpty=m.isNonEmpty,r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return l([n],r,!0)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return l(l([],r,!0),[n],!1)}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if((0,r.isNonEmpty)(u)){var e=m.fromReadonlyNonEmptyArray(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,r,t){if(t[n]===r)return t;var u=m.fromReadonlyNonEmptyArray(t);return u[n]=r,u},r.uniq=function(n){return function(t){if(1===t.length)return t;for(var u=[(0,r.head)(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=(0,r.tail)(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if((0,r.isNonEmpty)(n)){var t=(0,d.getMonoid)();return(0,r.sort)(n.reduce(t.concat,t.empty))}return e.identity},r.union=function(n){var t=(0,r.uniq)(n);return function(n){return function(r){return t((0,e.pipe)(r,R(n)))}}},r.rotate=function(n){return function(t){var u=t.length,o=Math.round(n)%u;if((0,r.isOutOfBound)(Math.abs(o),t)||0===o)return t;if(o<0){var i=(0,r.splitAt)(-o)(t);return(0,e.pipe)(i[1],R(i[0]))}return(0,r.rotate)(o-u)(t)}},r.fromReadonlyArray=function(n){return(0,r.isNonEmpty)(n)?m.some(n):m.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return(0,r.makeBy)((function(){return n}))},r.range=function(n,t){return n<=t?(0,r.makeBy)((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[(0,r.head)(n),(0,r.tail)(n)]},r.unappend=function(n){return[(0,r.init)(n),(0,r.last)(n)]},r.fromArray=function(n){return(0,r.fromReadonlyArray)(n.slice())},r.concatW=I,r.concat=R,r.reverse=function(n){return 1===n.length?n:l([(0,r.last)(n)],n.slice(0,-1).reverse(),!0)},r.group=b,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);m.has.call(t,i)?t[i].push(o):t[i]=[o]}return t}},r.sort=function(n){return function(r){return 1===r.length?r:r.slice().sort(n.compare)}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?m.none:m.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=(0,r.tail)(t);return(0,r.isNonEmpty)(u)?(0,e.pipe)(u,(0,r.prependAll)(n),(0,r.prepend)((0,r.head)(t))):t}},r.chainWithIndex=function(n){return function(t){for(var u=m.fromReadonlyNonEmptyArray(n(0,(0,r.head)(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];(0,r.isNonEmpty)(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[t,r.empty]:[(0,e.pipe)(t.slice(1,u),(0,r.prepend)((0,r.head)(t))),t.slice(u)]}},r.chunksOf=function(n){return(0,r.chop)((0,r.splitAt)(n))};var U=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},O=function(n,t){return(0,e.pipe)(n,(0,r.mapWithIndex)(t))},M=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},g=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},j=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},y=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},x=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},w=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},_=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},W=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceWithIndex)(t,u))},E=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},q=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},k=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}};r.of=m.singleton,r.altW=function(n){return function(r){return(0,e.pipe)(r,I(n()))}},r.alt=r.altW,r.ap=function(n){return(0,r.flatMap)((function(t){return(0,e.pipe)(n,(0,r.map)(t))}))},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,e.pipe)(n,(0,r.chainWithIndex)((function(n,r){return t(r,n)})))})),r.extend=function(n){return function(t){for(var u=(0,r.tail)(t),e=[n(t)];(0,r.isNonEmpty)(u);)e.push(n(u)),u=(0,r.tail)(u);return e}},r.duplicate=(0,r.extend)(e.identity),r.flatten=(0,r.flatMap)(e.identity),r.map=function(n){return(0,r.mapWithIndex)((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,(0,r.head)(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=function(n,t){return(0,r.reduceWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u){return n.concat(t,r(u))}),r(t[0]))}}},r.reduceRight=function(n,t){return(0,r.reduceRightWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.reduceWithIndex=function(n,r){return function(t){return t.reduce((function(n,t,u){return r(u,n,t)}),n)}},r.foldMapWithIndex=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u,e){return n.concat(t,r(e+1,u))}),r(0,t[0]))}}},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return(0,r.traverseWithIndex)(n)(e.SK)},r.traverseWithIndex=function(n){return function(t){return function(u){for(var o=n.map(t(0,(0,r.head)(u)),r.of),i=1;i<u.length;i++)o=n.ap(n.map(o,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),t(i,u[i]));return o}}},r.extract=m.head,r.URI="ReadonlyNonEmptyArray",r.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},r.getSemigroup=function(){return{concat:R}},r.getEq=function(n){return(0,v.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getUnionSemigroup=function(n){var t=(0,r.union)(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:U},r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:U,mapWithIndex:O},r.Apply={URI:r.URI,map:U,ap:M},r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:U,ap:M,of:r.of},r.Chain={URI:r.URI,map:U,ap:M,chain:r.flatMap},r.chainFirst=(0,c.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:U,ap:M,of:r.of,chain:r.flatMap},r.Foldable={URI:r.URI,reduce:j,foldMap:y,reduceRight:x},r.FoldableWithIndex={URI:r.URI,reduce:j,foldMap:y,reduceRight:x,reduceWithIndex:W,foldMapWithIndex:E,reduceRightWithIndex:q},r.Traversable={URI:r.URI,map:U,reduce:j,foldMap:y,reduceRight:x,traverse:w,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:U,mapWithIndex:O,reduce:j,foldMap:y,reduceRight:x,traverse:w,sequence:r.sequence,reduceWithIndex:W,foldMapWithIndex:E,reduceRightWithIndex:q,traverseWithIndex:k},r.Alt={URI:r.URI,map:U,alt:_},r.Comonad={URI:r.URI,map:U,extend:g,extract:r.extract},r.Do=(0,r.of)(m.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=(0,c.bind)(r.Chain),r.apS=(0,i.apS)(r.Apply),r.head=r.extract,r.tail=m.tail,r.last=function(n){return n[n.length-1]},r.init=function(n){return n.slice(0,-1)},r.min=function(n){var r=h.min(n);return function(n){return n.reduce(r.concat)}},r.max=function(n){var r=h.max(n);return function(n){return n.reduce(r.concat)}},r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n((0,r.head)(t),(0,r.tail)(t))}},r.matchRight=function(n){return function(t){return n((0,r.init)(t),(0,r.last)(t))}},r.modifyHead=function(n){return function(t){return l([n((0,r.head)(t))],(0,r.tail)(t),!0)}},r.updateHead=function(n){return(0,r.modifyHead)((function(){return n}))},r.modifyLast=function(n){return function(t){return(0,e.pipe)((0,r.init)(t),(0,r.append)(n((0,r.last)(t))))}},r.updateLast=function(n){return(0,r.modifyLast)((function(){return n}))},r.intercalate=function(n){var t=(0,r.concatAll)(n);return function(n){return(0,e.flow)((0,r.intersperse)(n),t)}},r.chain=r.flatMap,r.groupSort=function(n){var t=(0,r.sort)(n),u=b(n);return function(n){return(0,r.isNonEmpty)(n)?u(t(n)):r.empty}},r.filter=function(n){return(0,r.filterWithIndex)((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return(0,r.fromReadonlyArray)(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?(0,r.prepend)(n):(0,e.pipe)(t,(0,r.prepend)(n))},r.snoc=function(n,r){return(0,e.pipe)(n,R([r]))},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?m.none:m.some((0,r.unsafeInsertAt)(n,t,u))}},r.prependToAll=r.prependAll,r.fold=r.concatAll,r.readonlyNonEmptyArray={URI:r.URI,of:r.of,map:U,mapWithIndex:O,ap:M,chain:r.flatMap,extend:g,extract:r.extract,reduce:j,foldMap:y,reduceRight:x,traverse:w,sequence:r.sequence,reduceWithIndex:W,foldMapWithIndex:E,reduceRightWithIndex:q,traverseWithIndex:k,alt:_}})),m=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),f=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),v=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return f(r,n),r},p=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.flatMap=r.ap=r.alt=r.altW=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.foldMap=r.foldMapWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.of=r.copy=r.modifyAt=r.updateAt=r.insertAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromArray=r.fromReadonlyNonEmptyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=void 0,r.chain=r.intercalate=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.let=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=void 0,r.nonEmptyArray=r.fold=r.prependToAll=r.snoc=r.cons=r.unsnoc=r.uncons=r.filterWithIndex=r.filter=r.groupSort=void 0;var s=v(o),m=v(l);function h(n){return function(r){return r.concat(n)}}function I(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function R(n){return function(r){var t=r.length;if(0===t)return[];for(var u=[],e=r[0],o=[e],i=1;i<t;i++){var c=r[i];n.equals(c,e)?o.push(c):(u.push(o),o=[e=c])}return u.push(o),u}}r.isNonEmpty=function(n){return n.length>0},r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return p([n],r,!0)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return p(p([],r,!0),[n],!1)}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if((0,r.isNonEmpty)(u)){var e=(0,r.fromReadonlyNonEmptyArray)(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,t,u){var e=(0,r.fromReadonlyNonEmptyArray)(u);return e[n]=t,e},r.uniq=function(n){return function(t){if(1===t.length)return(0,r.copy)(t);for(var u=[(0,r.head)(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=(0,r.tail)(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if((0,r.isNonEmpty)(n)){var t=(0,d.getMonoid)();return(0,r.sort)(n.reduce(t.concat,t.empty))}return r.copy},r.union=function(n){var t=(0,r.uniq)(n);return function(n){return function(r){return t((0,e.pipe)(r,I(n)))}}},r.rotate=function(n){return function(t){var u=t.length,o=Math.round(n)%u;if((0,r.isOutOfBound)(Math.abs(o),t)||0===o)return(0,r.copy)(t);if(o<0){var i=(0,r.splitAt)(-o)(t);return(0,e.pipe)(i[1],I(i[0]))}return(0,r.rotate)(o-u)(t)}},r.fromReadonlyNonEmptyArray=s.fromReadonlyNonEmptyArray,r.fromArray=function(n){return(0,r.isNonEmpty)(n)?s.some(n):s.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return(0,r.makeBy)((function(){return n}))},r.range=function(n,t){return n<=t?(0,r.makeBy)((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[(0,r.head)(n),(0,r.tail)(n)]},r.unappend=function(n){return[(0,r.init)(n),(0,r.last)(n)]},r.concatW=h,r.concat=I,r.reverse=function(n){return p([(0,r.last)(n)],n.slice(0,-1).reverse(),!0)},r.group=R,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);s.has.call(t,i)?t[i].push(o):t[i]=[o]}return t}},r.sort=function(n){return function(r){return r.slice().sort(n.compare)}},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?s.none:s.some((0,r.unsafeInsertAt)(n,t,u))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?s.none:s.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.copy=r.fromReadonlyNonEmptyArray,r.of=function(n){return[n]},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=(0,r.tail)(t);return(0,r.isNonEmpty)(u)?(0,e.pipe)(u,(0,r.prependAll)(n),(0,r.prepend)((0,r.head)(t))):(0,r.copy)(t)}},r.foldMapWithIndex=m.foldMapWithIndex,r.foldMap=m.foldMap,r.chainWithIndex=function(n){return function(t){for(var u=(0,r.fromReadonlyNonEmptyArray)(n(0,(0,r.head)(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];(0,r.isNonEmpty)(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[(0,r.copy)(t),[]]:[(0,e.pipe)(t.slice(1,u),(0,r.prepend)((0,r.head)(t))),t.slice(u)]}},r.chunksOf=function(n){return(0,r.chop)((0,r.splitAt)(n))};var b=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},U=function(n,t){return(0,e.pipe)(n,(0,r.mapWithIndex)(t))},O=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},M=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},g=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},j=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},y=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},x=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},w=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},_=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceWithIndex)(t,u))},W=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},E=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},q=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}};r.altW=function(n){return function(r){return(0,e.pipe)(r,h(n()))}},r.alt=r.altW,r.ap=function(n){return(0,r.flatMap)((function(t){return(0,e.pipe)(n,(0,r.map)(t))}))},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,e.pipe)(n,(0,r.chainWithIndex)((function(n,r){return t(r,n)})))})),r.extend=function(n){return function(t){for(var u=(0,r.tail)(t),e=[n(t)];(0,r.isNonEmpty)(u);)e.push(n(u)),u=(0,r.tail)(u);return e}},r.duplicate=(0,r.extend)(e.identity),r.flatten=(0,r.flatMap)(e.identity),r.map=function(n){return(0,r.mapWithIndex)((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,(0,r.head)(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=m.reduce,r.reduceWithIndex=m.reduceWithIndex,r.reduceRight=m.reduceRight,r.reduceRightWithIndex=m.reduceRightWithIndex,r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return(0,r.traverseWithIndex)(n)((function(n,r){return r}))},r.traverseWithIndex=function(n){return function(t){return function(u){for(var o=n.map(t(0,(0,r.head)(u)),r.of),i=1;i<u.length;i++)o=n.ap(n.map(o,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),t(i,u[i]));return o}}},r.extract=m.head,r.URI="NonEmptyArray",r.getShow=m.getShow,r.getSemigroup=function(){return{concat:I}},r.getEq=m.getEq,r.getUnionSemigroup=function(n){var t=(0,r.union)(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:b},r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:b,mapWithIndex:U},r.Apply={URI:r.URI,map:b,ap:O},r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:b,ap:O,of:r.of},r.Chain={URI:r.URI,map:b,ap:O,chain:r.flatMap},r.chainFirst=(0,c.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:b,ap:O,of:r.of,chain:r.flatMap},r.Foldable={URI:r.URI,reduce:g,foldMap:j,reduceRight:y},r.FoldableWithIndex={URI:r.URI,reduce:g,foldMap:j,reduceRight:y,reduceWithIndex:_,foldMapWithIndex:W,reduceRightWithIndex:E},r.Traversable={URI:r.URI,map:b,reduce:g,foldMap:j,reduceRight:y,traverse:x,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:b,mapWithIndex:U,reduce:g,foldMap:j,reduceRight:y,traverse:x,sequence:r.sequence,reduceWithIndex:_,foldMapWithIndex:W,reduceRightWithIndex:E,traverseWithIndex:q},r.Alt={URI:r.URI,map:b,alt:w},r.Comonad={URI:r.URI,map:b,extend:M,extract:r.extract},r.Do=(0,r.of)(s.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=(0,c.bind)(r.Chain),r.apS=(0,i.apS)(r.Apply),r.head=m.head,r.tail=function(n){return n.slice(1)},r.last=m.last,r.init=function(n){return n.slice(0,-1)},r.min=m.min,r.max=m.max,r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n((0,r.head)(t),(0,r.tail)(t))}},r.matchRight=function(n){return function(t){return n((0,r.init)(t),(0,r.last)(t))}},r.modifyHead=function(n){return function(t){return p([n((0,r.head)(t))],(0,r.tail)(t),!0)}},r.updateHead=function(n){return(0,r.modifyHead)((function(){return n}))},r.modifyLast=function(n){return function(t){return(0,e.pipe)((0,r.init)(t),(0,r.append)(n((0,r.last)(t))))}},r.updateLast=function(n){return(0,r.modifyLast)((function(){return n}))},r.intercalate=m.intercalate,r.chain=r.flatMap,r.groupSort=function(n){var t=(0,r.sort)(n),u=R(n);return function(n){return(0,r.isNonEmpty)(n)?u(t(n)):[]}},r.filter=function(n){return(0,r.filterWithIndex)((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return(0,r.fromArray)(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?(0,r.prepend)(n):(0,e.pipe)(t,(0,r.prepend)(n))},r.snoc=function(n,t){return(0,e.pipe)(n,(0,r.append)(t))},r.prependToAll=r.prependAll,r.fold=m.concatAll,r.nonEmptyArray={URI:r.URI,of:r.of,map:b,mapWithIndex:U,ap:O,chain:r.flatMap,extend:M,extract:r.extract,reduce:g,foldMap:j,reduceRight:y,traverse:x,sequence:r.sequence,reduceWithIndex:_,foldMapWithIndex:W,reduceRightWithIndex:E,traverseWithIndex:q,alt:w}})),h=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Field=r.MonoidProduct=r.MonoidSum=r.SemigroupProduct=r.SemigroupSum=r.MagmaSub=r.Show=r.Bounded=r.Ord=r.Eq=r.isNumber=void 0,r.isNumber=function(n){return"number"==typeof n},r.Eq={equals:function(n,r){return n===r}},r.Ord={equals:r.Eq.equals,compare:function(n,r){return n<r?-1:n>r?1:0}},r.Bounded={equals:r.Eq.equals,compare:r.Ord.compare,top:1/0,bottom:-1/0},r.Show={show:function(n){return JSON.stringify(n)}},r.MagmaSub={concat:function(n,r){return n-r}},r.SemigroupSum={concat:function(n,r){return n+r}},r.SemigroupProduct={concat:function(n,r){return n*r}},r.MonoidSum={concat:r.SemigroupSum.concat,empty:0},r.MonoidProduct={concat:r.SemigroupProduct.concat,empty:1},r.Field={add:r.SemigroupSum.concat,zero:0,mul:r.SemigroupProduct.concat,one:1,sub:r.MagmaSub.concat,degree:function(){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}})),I=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.right=r.left=r.flap=r.Functor=r.Bifunctor=r.URI=r.bimap=r.mapLeft=r.map=r.separated=void 0,r.separated=function(n,r){return{left:n,right:r}},r.map=function(n){return function(t){return(0,r.separated)((0,r.left)(t),n((0,r.right)(t)))}},r.mapLeft=function(n){return function(t){return(0,r.separated)(n((0,r.left)(t)),(0,r.right)(t))}},r.bimap=function(n,t){return function(u){return(0,r.separated)(n((0,r.left)(u)),t((0,r.right)(u)))}},r.URI="Separated",r.Bifunctor={URI:r.URI,mapLeft:function(n,t){return(0,e.pipe)(n,(0,r.mapLeft)(t))},bimap:function(n,t,u){return(0,e.pipe)(n,(0,r.bimap)(t,u))}},r.Functor={URI:r.URI,map:function(n,t){return(0,e.pipe)(n,(0,r.map)(t))}},r.flap=(0,a.flap)(r.Functor),r.left=function(n){return n.left},r.right=function(n){return n.right}})),R=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),e=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),i=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return e(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.filterE=r.witherDefault=r.wiltDefault=void 0;var c=i(o);r.wiltDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.separate)}}},r.witherDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.compact)}}},r.filterE=function(n){return function(r){var t=n.wither(r);return function(n){return function(u){return t(u,(function(t){return r.map(n(t),(function(n){return n?c.some(t):c.none}))}))}}}}})),b=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.guard=void 0,r.guard=function(n,r){return function(t){return t?r.of(void 0):n.zero()}}})),U=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),p=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),s=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return p(r,n),r},m=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.sort=r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.foldMap=r.reduce=r.foldMapWithIndex=r.duplicate=r.extend=r.filterWithIndex=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.compact=r.filterMap=r.filterMapWithIndex=r.filter=r.separate=r.mapWithIndex=r.map=r.flatten=r.flatMap=r.ap=r.alt=r.altW=r.zero=r.of=r._chainRecBreadthFirst=r._chainRecDepthFirst=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=void 0,r.toArray=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.Witherable=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.chainFirst=r.Monad=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=r.traverseWithIndex=void 0,r.readonlyArray=r.prependToAll=r.snoc=r.cons=r.range=r.chain=r.apS=r.bind=r.let=r.bindTo=r.Do=r.intercalate=r.exists=r.some=r.every=r.empty=r.fromArray=void 0;var U=s(o),O=s(h),M=s(l);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=M.isNonEmpty,r.prepend=M.prepend,r.prependW=M.prependW,r.append=M.append,r.appendW=M.appendW,r.makeBy=function(n,t){return n<=0?r.empty:M.makeBy(t)(n)},r.replicate=function(n,t){return(0,r.makeBy)(n,(function(){return t}))},r.fromPredicate=function(n){return function(t){return n(t)?[t]:r.empty}},r.fromOption=function(n){return U.isNone(n)?r.empty:[n.value]},r.fromEither=function(n){return U.isLeft(n)?r.empty:[n.right]},r.matchW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(M.head(u),M.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(M.init(u),M.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(t){if((0,r.isEmpty)(t))return r.empty;for(var u=[],e=0;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=M.isOutOfBound,r.lookup=function n(t,u){return void 0===u?function(r){return n(t,r)}:(0,r.isOutOfBound)(t,u)?U.none:U.some(u[t])},r.head=function(n){return(0,r.isNonEmpty)(n)?U.some(M.head(n)):U.none},r.last=function(n){return(0,r.isNonEmpty)(n)?U.some(M.last(n)):U.none},r.tail=function(n){return(0,r.isNonEmpty)(n)?U.some(M.tail(n)):U.none},r.init=function(n){return(0,r.isNonEmpty)(n)?U.some(M.init(n)):U.none},r.takeLeft=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?t:0===n?r.empty:t.slice(0,n)}},r.takeRight=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?t:0===n?r.empty:t.slice(-n)}},r.takeLeftWhile=function(n){return function(t){for(var u=[],e=0,o=t;e<o.length;e++){var i=o[e];if(!n(i))break;u.push(i)}var c=u.length;return c===t.length?t:0===c?r.empty:u}};var g=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function j(n){return function(r,t){if(void 0===t){var u=j(n);return function(n){return u(r,n)}}for(var e=0;e<t.length;e++)if(n.equals(t[e],r))return!0;return!1}}function y(n){var t=M.union(n);return function(u,e){if(void 0===e){var o=y(n);return function(n){return o(n,u)}}return(0,r.isNonEmpty)(u)&&(0,r.isNonEmpty)(e)?t(e)(u):(0,r.isNonEmpty)(u)?u:e}}function x(n){var r=j(n);return function(t,u){if(void 0===u){var e=x(n);return function(n){return e(n,t)}}return t.filter((function(n){return r(n,u)}))}}function w(n){var r=j(n);return function(t,u){if(void 0===u){var e=w(n);return function(n){return e(n,t)}}return t.filter((function(n){return!r(n,u)}))}}r.spanLeft=function(n){return function(t){var u=(0,r.splitAt)(g(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?t:n>=t.length?r.empty:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?t:n>=t.length?r.empty:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(t){var u=g(t,n);return 0===u?t:u===t.length?r.empty:t.slice(u)}},r.findIndex=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return U.some(t);return U.none}},r.findFirst=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return U.some(r[t]);return U.none}},r.findFirstMap=function(n){return function(r){for(var t=0;t<r.length;t++){var u=n(r[t]);if(U.isSome(u))return u}return U.none}},r.findLast=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return U.some(r[t]);return U.none}},r.findLastMap=function(n){return function(r){for(var t=r.length-1;t>=0;t--){var u=n(r[t]);if(U.isSome(u))return u}return U.none}},r.findLastIndex=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return U.some(t);return U.none}},r.insertAt=function(n,r){return function(t){return n<0||n>t.length?U.none:U.some(M.unsafeInsertAt(n,r,t))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?U.none:U.some((0,r.unsafeDeleteAt)(n,t))}},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?U.none:U.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.reverse=function(n){return n.length<=1?n:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(r){return r.length<=1?r:r.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=M.prependAll(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.intersperse=function(n){var t=M.intersperse(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.rotate=function(n){var t=M.rotate(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.elem=j,r.uniq=function(n){var t=M.uniq(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.sortBy=function(n){var t=M.sortBy(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.chop=function(n){var t=M.chop(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):r.empty}},r.splitAt=function(n){return function(t){return n>=1&&(0,r.isNonEmpty)(t)?M.splitAt(n)(t):(0,r.isEmpty)(t)?[t,r.empty]:[r.empty,t]}},r.chunksOf=function(n){var t=M.chunksOf(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):r.empty}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.fromOption)(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var o=function(n,i){return(0,r.isNonEmpty)(i)?(0,r.flatMap)(M.head(i),(function(t){return o((0,e.pipe)(n,(0,r.append)(t)),M.tail(i))})):u.apply(void 0,n)?[t.apply(void 0,n)]:r.empty};return o(r.empty,n)},r.concatW=function(n){return function(t){return(0,r.isEmpty)(t)?n:(0,r.isEmpty)(n)?t:t.concat(n)}},r.concat=r.concatW,r.union=y,r.intersection=x,r.difference=w;var _=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},W=function(n,t){return(0,e.pipe)(n,(0,r.mapWithIndex)(t))},E=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},q=function(n,t){return(0,e.pipe)(n,(0,r.filter)(t))},k=function(n,t){return(0,e.pipe)(n,(0,r.filterMap)(t))},A=function(n,t){return(0,e.pipe)(n,(0,r.partition)(t))},P=function(n,t){return(0,e.pipe)(n,(0,r.partitionMap)(t))},T=function(n,t){return(0,e.pipe)(n,(0,r.partitionWithIndex)(t))},N=function(n,t){return(0,e.pipe)(n,(0,r.partitionMapWithIndex)(t))},z=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},L=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},S=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},C=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},$=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceWithIndex)(t,u))},D=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},F=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},H=function(n,t){return(0,e.pipe)(n,(0,r.filterMapWithIndex)(t))},G=function(n,t){return(0,e.pipe)(n,(0,r.filterWithIndex)(t))},J=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},B=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},K=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}};r._chainRecDepthFirst=function(n,t){return(0,e.pipe)(n,(0,r.chainRecDepthFirst)(t))},r._chainRecBreadthFirst=function(n,t){return(0,e.pipe)(n,(0,r.chainRecBreadthFirst)(t))},r.of=M.of,r.zero=function(){return r.empty},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.ap=function(n){return(0,r.flatMap)((function(t){return(0,e.pipe)(n,(0,r.map)(t))}))},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,e.pipe)(n,(0,r.chainWithIndex)((function(n,r){return t(r,n)})))})),r.flatten=(0,r.flatMap)(e.identity),r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return(0,I.separated)(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);U.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return(0,r.filterMapWithIndex)((function(r,t){return n(t)}))},r.compact=(0,r.filterMap)(e.identity),r.partition=function(n){return(0,r.partitionWithIndex)((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return(0,I.separated)(t,u)}},r.partitionMap=function(n){return(0,r.partitionMapWithIndex)((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return(0,I.separated)(t,u)}},r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=(0,r.extend)(e.identity),r.foldMapWithIndex=function(n){return function(r){return function(t){return t.reduce((function(t,u,e){return n.concat(t,r(e,u))}),n.empty)}}},r.reduce=function(n,t){return(0,r.reduceWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.reduceWithIndex=function(n,r){return function(t){for(var u=t.length,e=n,o=0;o<u;o++)e=r(o,e,t[o]);return e}},r.reduceRight=function(n,t){return(0,r.reduceRightWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return L(t,n.of((0,r.zero)()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return(0,r.reduceWithIndex)(n.of((0,r.zero)()),(function(u,o,i){return n.ap(n.map(o,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),t(u,i))}))}},r.wither=function(n){var r=Q(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=V(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!U.isSome(e))break;var o=e.value,i=o[1];t.push(o[0]),u=i}return t},r.URI="ReadonlyArray",r.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},r.getSemigroup=function(){return{concat:function(n,t){return(0,r.isEmpty)(n)?t:(0,r.isEmpty)(t)?n:n.concat(t)}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:r.empty}},r.getEq=function(n){return(0,v.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getOrd=function(n){return(0,d.fromCompare)((function(r,t){for(var u=r.length,e=t.length,o=Math.min(u,e),i=0;i<o;i++){var c=n.compare(r[i],t[i]);if(0!==c)return c}return O.Ord.compare(u,e)}))},r.getUnionSemigroup=function(n){var r=y(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:(0,r.getUnionSemigroup)(n).concat,empty:r.empty}},r.getIntersectionSemigroup=function(n){var r=x(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=w(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:_},r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:_,mapWithIndex:W},r.Apply={URI:r.URI,map:_,ap:E},r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:_,ap:E,of:r.of},r.Chain={URI:r.URI,map:_,ap:E,chain:r.flatMap},r.Monad={URI:r.URI,map:_,ap:E,of:r.of,chain:r.flatMap},r.chainFirst=(0,c.chainFirst)(r.Chain),r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:_,alt:z},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,b.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:_,ap:E,of:r.of,alt:z,zero:r.zero},r.Extend={URI:r.URI,map:_,extend:J},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:_,compact:r.compact,separate:r.separate,filter:q,filterMap:k,partition:A,partitionMap:P},r.FilterableWithIndex={URI:r.URI,map:_,mapWithIndex:W,compact:r.compact,separate:r.separate,filter:q,filterMap:k,partition:A,partitionMap:P,partitionMapWithIndex:N,partitionWithIndex:T,filterMapWithIndex:H,filterWithIndex:G},r.Foldable={URI:r.URI,reduce:L,foldMap:S,reduceRight:C},r.FoldableWithIndex={URI:r.URI,reduce:L,foldMap:S,reduceRight:C,reduceWithIndex:$,foldMapWithIndex:D,reduceRightWithIndex:F},r.Traversable={URI:r.URI,map:_,reduce:L,foldMap:S,reduceRight:C,traverse:B,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:_,mapWithIndex:W,reduce:L,foldMap:S,reduceRight:C,reduceWithIndex:$,foldMapWithIndex:D,reduceRightWithIndex:F,traverse:B,sequence:r.sequence,traverseWithIndex:K},r.chainRecDepthFirst=function(n){return function(r){for(var t=m([],n(r),!0),u=[];t.length>0;){var e=t.shift();U.isLeft(e)?t.unshift.apply(t,n(e.left)):u.push(e.right)}return u}},r.ChainRecDepthFirst={URI:r.URI,map:_,ap:E,chain:r.flatMap,chainRec:r._chainRecDepthFirst},r.chainRecBreadthFirst=function(n){return function(r){var t=n(r),u=[],e=[];function o(r){U.isLeft(r)?n(r.left).forEach((function(n){return u.push(n)})):e.push(r.right)}for(var i=0,c=t;i<c.length;i++)o(c[i]);for(;u.length>0;)o(u.shift());return e}},r.ChainRecBreadthFirst={URI:r.URI,map:_,ap:E,chain:r.flatMap,chainRec:r._chainRecBreadthFirst};var Q=(0,R.witherDefault)(r.Traversable,r.Compactable),V=(0,R.wiltDefault)(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:_,compact:r.compact,separate:r.separate,filter:q,filterMap:k,partition:A,partitionMap:P,reduce:L,foldMap:S,reduceRight:C,traverse:B,sequence:r.sequence,wither:Q,wilt:V},r.filterE=(0,R.filterE)(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=(0,f.fromEitherK)(r.FromEither),r.unsafeInsertAt=M.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return(0,r.isNonEmpty)(u)?M.unsafeUpdateAt(n,t,u):u},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.toArray=function(n){return n.slice()},r.fromArray=function(n){return(0,r.isEmpty)(n)?r.empty:n.slice()},r.empty=M.empty,r.every=function(n){return function(r){return r.every(n)}},r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.intercalate=function(n){var t=M.intercalate(n);return function(u){return(0,r.match)((function(){return n.empty}),t(u))}},r.Do=(0,r.of)(U.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=(0,c.bind)(r.Chain),r.apS=(0,i.apS)(r.Apply),r.chain=r.flatMap,r.range=M.range,r.cons=M.cons,r.snoc=M.snoc,r.prependToAll=r.prependAll,r.readonlyArray={URI:r.URI,compact:r.compact,separate:r.separate,map:_,ap:E,of:r.of,chain:r.flatMap,filter:q,filterMap:k,partition:A,partitionMap:P,mapWithIndex:W,partitionMapWithIndex:N,partitionWithIndex:T,filterMapWithIndex:H,filterWithIndex:G,alt:z,zero:r.zero,unfold:r.unfold,reduce:L,foldMap:S,reduceRight:C,traverse:B,sequence:r.sequence,reduceWithIndex:$,foldMapWithIndex:D,reduceRightWithIndex:F,traverseWithIndex:K,extend:J,wither:Q,wilt:V}})),O=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return v(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.copy=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=r.foldMapWithIndex=r.foldMap=r.duplicate=r.extend=r.filterWithIndex=r.alt=r.altW=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.filter=r.separate=r.compact=r.filterMap=r.filterMapWithIndex=r.mapWithIndex=r.flatten=r.flatMap=r.ap=r.map=r.zero=r.of=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.sort=void 0,r.some=r.every=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.Witherable=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=void 0,r.array=r.prependToAll=r.snoc=r.cons=r.empty=r.range=r.chain=r.apS=r.bind=r.let=r.bindTo=r.Do=r.intercalate=r.exists=void 0;var p=d(o),s=d(m),l=d(U);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=s.isNonEmpty,r.prepend=s.prepend,r.prependW=s.prependW,r.append=s.append,r.appendW=s.appendW,r.makeBy=function(n,r){return n<=0?[]:s.makeBy(r)(n)},r.replicate=function(n,t){return(0,r.makeBy)(n,(function(){return t}))},r.fromPredicate=function(n){return function(r){return n(r)?[r]:[]}},r.fromOption=function(n){return p.isNone(n)?[]:[n.value]},r.fromEither=function(n){return p.isLeft(n)?[]:[n.right]},r.matchW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(s.head(u),s.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(s.init(u),s.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=s.isOutOfBound,r.lookup=l.lookup,r.head=l.head,r.last=l.last,r.tail=function(n){return(0,r.isNonEmpty)(n)?p.some(s.tail(n)):p.none},r.init=function(n){return(0,r.isNonEmpty)(n)?p.some(s.init(n)):p.none},r.takeLeft=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?(0,r.copy)(t):t.slice(0,n)}},r.takeRight=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?(0,r.copy)(t):0===n?[]:t.slice(-n)}},r.takeLeftWhile=function(n){return function(r){for(var t=[],u=0,e=r;u<e.length;u++){var o=e[u];if(!n(o))break;t.push(o)}return t}};var h=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function O(n){var t=s.union(n);return function(u,e){if(void 0===e){var o=O(n);return function(n){return o(n,u)}}return(0,r.isNonEmpty)(u)&&(0,r.isNonEmpty)(e)?t(e)(u):(0,r.isNonEmpty)(u)?(0,r.copy)(u):(0,r.copy)(e)}}function M(n){var t=(0,r.elem)(n);return function(r,u){if(void 0===u){var e=M(n);return function(n){return e(n,r)}}return r.filter((function(n){return t(n,u)}))}}function g(n){var t=(0,r.elem)(n);return function(r,u){if(void 0===u){var e=g(n);return function(n){return e(n,r)}}return r.filter((function(n){return!t(n,u)}))}}r.spanLeft=function(n){return function(t){var u=(0,r.splitAt)(h(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?(0,r.copy)(t):n>=t.length?[]:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?(0,r.copy)(t):n>=t.length?[]:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(r){return r.slice(h(r,n))}},r.findIndex=l.findIndex,r.findFirst=function(n){return l.findFirst(n)},r.findFirstMap=l.findFirstMap,r.findLast=function(n){return l.findLast(n)},r.findLastMap=l.findLastMap,r.findLastIndex=l.findLastIndex,r.copy=function(n){return n.slice()},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?p.none:p.some((0,r.unsafeInsertAt)(n,t,u))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?p.none:p.some((0,r.unsafeDeleteAt)(n,t))}},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?p.none:p.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.reverse=function(n){return(0,r.isEmpty)(n)?[]:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(t){return t.length<=1?(0,r.copy)(t):t.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=s.prependAll(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.intersperse=function(n){var t=s.intersperse(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.rotate=function(n){var t=s.rotate(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.elem=l.elem,r.uniq=function(n){var t=s.uniq(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.sortBy=function(n){var t=s.sortBy(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.chop=function(n){var t=s.chop(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.splitAt=function(n){return function(t){return n>=1&&(0,r.isNonEmpty)(t)?s.splitAt(n)(t):(0,r.isEmpty)(t)?[(0,r.copy)(t),[]]:[[],(0,r.copy)(t)]}},r.chunksOf=function(n){var t=s.chunksOf(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.fromOption)(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var o=function(n,i){return(0,r.isNonEmpty)(i)?(0,r.flatMap)(s.head(i),(function(t){return o((0,e.pipe)(n,(0,r.append)(t)),s.tail(i))})):u.apply(void 0,n)?[t.apply(void 0,n)]:[]};return o([],n)},r.concatW=function(n){return function(t){return(0,r.isEmpty)(t)?(0,r.copy)(n):(0,r.isEmpty)(n)?(0,r.copy)(t):t.concat(n)}},r.concat=r.concatW,r.union=O,r.intersection=M,r.difference=g;var j=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},y=function(n,t){return(0,e.pipe)(n,(0,r.mapWithIndex)(t))},x=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},w=function(n,t){return(0,e.pipe)(n,(0,r.filter)(t))},_=function(n,t){return(0,e.pipe)(n,(0,r.filterMap)(t))},W=function(n,t){return(0,e.pipe)(n,(0,r.partition)(t))},E=function(n,t){return(0,e.pipe)(n,(0,r.partitionMap)(t))},q=function(n,t){return(0,e.pipe)(n,(0,r.partitionWithIndex)(t))},k=function(n,t){return(0,e.pipe)(n,(0,r.partitionMapWithIndex)(t))},A=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},P=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},T=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},N=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},z=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceWithIndex)(t,u))},L=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},S=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},C=function(n,t){return(0,e.pipe)(n,(0,r.filterMapWithIndex)(t))},$=function(n,t){return(0,e.pipe)(n,(0,r.filterWithIndex)(t))},D=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},F=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},H=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},G=l._chainRecDepthFirst,J=l._chainRecBreadthFirst;r.of=s.of,r.zero=function(){return[]},r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.ap=function(n){return(0,r.flatMap)((function(t){return(0,e.pipe)(n,(0,r.map)(t))}))},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,e.pipe)(n,(0,r.chainWithIndex)((function(n,r){return t(r,n)})))})),r.flatten=(0,r.flatMap)(e.identity),r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);p.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return(0,r.filterMapWithIndex)((function(r,t){return n(t)}))},r.compact=(0,r.filterMap)(e.identity),r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return(0,I.separated)(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.partition=function(n){return(0,r.partitionWithIndex)((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return(0,I.separated)(t,u)}},r.partitionMap=function(n){return(0,r.partitionMapWithIndex)((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return(0,I.separated)(t,u)}},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=(0,r.extend)(e.identity),r.foldMap=l.foldMap,r.foldMapWithIndex=l.foldMapWithIndex,r.reduce=l.reduce,r.reduceWithIndex=l.reduceWithIndex,r.reduceRight=l.reduceRight,r.reduceRightWithIndex=l.reduceRightWithIndex,r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return P(t,n.of((0,r.zero)()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return(0,r.reduceWithIndex)(n.of((0,r.zero)()),(function(u,o,i){return n.ap(n.map(o,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),t(u,i))}))}},r.wither=function(n){var r=B(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=K(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!p.isSome(e))break;var o=e.value,i=o[1];t.push(o[0]),u=i}return t},r.URI="Array",r.getShow=l.getShow,r.getSemigroup=function(){return{concat:function(n,r){return n.concat(r)}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:[]}},r.getEq=l.getEq,r.getOrd=l.getOrd,r.getUnionSemigroup=function(n){var r=O(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:(0,r.getUnionSemigroup)(n).concat,empty:[]}},r.getIntersectionSemigroup=function(n){var r=M(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=g(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:j},r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:j,mapWithIndex:y},r.Apply={URI:r.URI,map:j,ap:x},r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:j,ap:x,of:r.of},r.Chain={URI:r.URI,map:j,ap:x,chain:r.flatMap},r.chainFirst=(0,c.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:j,ap:x,of:r.of,chain:r.flatMap},r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:j,alt:A},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,b.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:j,ap:x,of:r.of,alt:A,zero:r.zero},r.Extend={URI:r.URI,map:j,extend:D},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:j,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:W,partitionMap:E},r.FilterableWithIndex={URI:r.URI,map:j,mapWithIndex:y,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:W,partitionMap:E,partitionMapWithIndex:k,partitionWithIndex:q,filterMapWithIndex:C,filterWithIndex:$},r.Foldable={URI:r.URI,reduce:P,foldMap:T,reduceRight:N},r.FoldableWithIndex={URI:r.URI,reduce:P,foldMap:T,reduceRight:N,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:S},r.Traversable={URI:r.URI,map:j,reduce:P,foldMap:T,reduceRight:N,traverse:F,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:j,mapWithIndex:y,reduce:P,foldMap:T,reduceRight:N,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:S,traverse:F,sequence:r.sequence,traverseWithIndex:H};var B=(0,R.witherDefault)(r.Traversable,r.Compactable),K=(0,R.wiltDefault)(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:j,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:W,partitionMap:E,reduce:P,foldMap:T,reduceRight:N,traverse:F,sequence:r.sequence,wither:B,wilt:K},r.chainRecDepthFirst=l.chainRecDepthFirst,r.ChainRecDepthFirst={URI:r.URI,map:j,ap:x,chain:r.flatMap,chainRec:G},r.chainRecBreadthFirst=l.chainRecBreadthFirst,r.ChainRecBreadthFirst={URI:r.URI,map:j,ap:x,chain:r.flatMap,chainRec:J},r.filterE=(0,R.filterE)(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=(0,f.fromEitherK)(r.FromEither),r.unsafeInsertAt=s.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return(0,r.isNonEmpty)(u)?s.unsafeUpdateAt(n,t,u):[]},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.every=l.every,r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.intercalate=l.intercalate,r.Do=(0,r.of)(p.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=(0,c.bind)(r.Chain),r.apS=(0,i.apS)(r.Apply),r.chain=r.flatMap,r.range=s.range,r.empty=[],r.cons=s.cons,r.snoc=s.snoc,r.prependToAll=r.prependAll,r.array={URI:r.URI,compact:r.compact,separate:r.separate,map:j,ap:x,of:r.of,chain:r.flatMap,filter:w,filterMap:_,partition:W,partitionMap:E,mapWithIndex:y,partitionMapWithIndex:k,partitionWithIndex:q,filterMapWithIndex:C,filterWithIndex:$,alt:A,zero:r.zero,unfold:r.unfold,reduce:P,foldMap:T,reduceRight:N,traverse:F,sequence:r.sequence,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:S,traverseWithIndex:H,extend:D,wither:B,wilt:K}})),M=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getApplicativeComposition=r.getApplicativeMonoid=void 0,r.getApplicativeMonoid=function(n){var r=(0,i.getApplySemigroup)(n);return function(t){return{concat:r(t).concat,empty:n.of(t.empty)}}},r.getApplicativeComposition=function(n,r){var t=(0,a.getFunctorComposition)(n,r).map,u=(0,i.ap)(n,r);return{map:t,of:function(t){return n.of(r.of(t))},ap:function(n,r){return(0,e.pipe)(n,u(r))}}}})),g=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.and=r.or=r.not=r.Contravariant=r.getMonoidAll=r.getSemigroupAll=r.getMonoidAny=r.getSemigroupAny=r.URI=r.contramap=void 0,r.contramap=function(n){return function(r){return(0,e.flow)(n,r)}},r.URI="Predicate",r.getSemigroupAny=function(){return{concat:function(n,t){return(0,e.pipe)(n,(0,r.or)(t))}}},r.getMonoidAny=function(){return{concat:(0,r.getSemigroupAny)().concat,empty:e.constFalse}},r.getSemigroupAll=function(){return{concat:function(n,t){return(0,e.pipe)(n,(0,r.and)(t))}}},r.getMonoidAll=function(){return{concat:(0,r.getSemigroupAll)().concat,empty:e.constTrue}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,e.pipe)(n,(0,r.contramap)(t))}},r.not=function(n){return function(r){return!n(r)}},r.or=function(n){return function(r){return function(t){return r(t)||n(t)}}},r.and=function(n){return function(r){return function(t){return r(t)&&n(t)}}}})),j=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return v(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.Witherable=r.wilt=r.wither=r.Traversable=r.sequence=r.traverse=r.Filterable=r.partitionMap=r.partition=r.filterMap=r.filter=r.Compactable=r.separate=r.compact=r.Extend=r.extend=r.Alternative=r.guard=r.Zero=r.zero=r.Alt=r.alt=r.altW=r.orElse=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.flatMap=r.Applicative=r.Apply=r.ap=r.Pointed=r.of=r.asUnit=r.as=r.Functor=r.map=r.getMonoid=r.getOrd=r.getEq=r.getShow=r.URI=r.getRight=r.getLeft=r.fromPredicate=r.some=r.none=void 0,r.getFirstMonoid=r.getApplyMonoid=r.getApplySemigroup=r.option=r.mapNullable=r.getRefinement=r.chainFirst=r.chain=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.let=r.bindTo=r.Do=r.exists=r.elem=r.toUndefined=r.toNullable=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.chainFirstEitherK=r.chainEitherK=r.fromEitherK=r.duplicate=r.tapEither=r.tap=r.flatten=r.apSecond=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=r.fold=r.match=r.foldW=r.matchW=r.isNone=r.isSome=r.FromEither=r.fromEither=r.MonadThrow=r.throwError=void 0,r.getLastMonoid=void 0;var p=d(c),l=d(o);r.none=l.none,r.some=l.some,r.fromPredicate=function(n){return function(t){return n(t)?(0,r.some)(t):r.none}},r.getLeft=function(n){return"Right"===n._tag?r.none:(0,r.some)(n.left)},r.getRight=function(n){return"Left"===n._tag?r.none:(0,r.some)(n.right)};var m=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},h=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},U=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},O=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},j=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},y=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},x=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},w=function(n,t){return(0,e.pipe)(n,(0,r.filter)(t))},_=function(n,t){return(0,e.pipe)(n,(0,r.filterMap)(t))},W=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},E=function(n,t){return(0,e.pipe)(n,(0,r.partition)(t))},q=function(n,t){return(0,e.pipe)(n,(0,r.partitionMap)(t))};r.URI="Option",r.getShow=function(n){return{show:function(t){return(0,r.isNone)(t)?"none":"some(".concat(n.show(t.value),")")}}},r.getEq=function(n){return{equals:function(t,u){return t===u||((0,r.isNone)(t)?(0,r.isNone)(u):!(0,r.isNone)(u)&&n.equals(t.value,u.value))}}},r.getOrd=function(n){return{equals:(0,r.getEq)(n).equals,compare:function(t,u){return t===u?0:(0,r.isSome)(t)?(0,r.isSome)(u)?n.compare(t.value,u.value):1:-1}}},r.getMonoid=function(n){return{concat:function(t,u){return(0,r.isNone)(t)?u:(0,r.isNone)(u)?t:(0,r.some)(n.concat(t.value,u.value))},empty:r.none}},r.map=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.some)(n(t.value))}},r.Functor={URI:r.URI,map:m},r.as=(0,e.dual)(2,(0,a.as)(r.Functor)),r.asUnit=(0,a.asUnit)(r.Functor),r.of=r.some,r.Pointed={URI:r.URI,of:r.of},r.ap=function(n){return function(t){return(0,r.isNone)(t)||(0,r.isNone)(n)?r.none:(0,r.some)(t.value(n.value))}},r.Apply={URI:r.URI,map:m,ap:h},r.Applicative={URI:r.URI,map:m,ap:h,of:r.of},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,r.isNone)(n)?r.none:t(n.value)})),r.Chain={URI:r.URI,map:m,ap:h,chain:r.flatMap},r.Monad={URI:r.URI,map:m,ap:h,of:r.of,chain:r.flatMap},r.reduce=function(n,t){return function(u){return(0,r.isNone)(u)?n:t(n,u.value)}},r.foldMap=function(n){return function(t){return function(u){return(0,r.isNone)(u)?n.empty:t(u.value)}}},r.reduceRight=function(n,t){return function(u){return(0,r.isNone)(u)?n:t(u.value,n)}},r.Foldable={URI:r.URI,reduce:U,foldMap:O,reduceRight:j},r.orElse=(0,e.dual)(2,(function(n,t){return(0,r.isNone)(n)?t():n})),r.altW=r.orElse,r.alt=r.orElse,r.Alt={URI:r.URI,map:m,alt:x},r.zero=function(){return r.none},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,b.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:m,ap:h,of:r.of,alt:x,zero:r.zero},r.extend=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.some)(n(t))}},r.Extend={URI:r.URI,map:m,extend:W},r.compact=(0,r.flatMap)(e.identity);var k=(0,I.separated)(r.none,r.none);r.separate=function(n){return(0,r.isNone)(n)?k:(0,I.separated)((0,r.getLeft)(n.value),(0,r.getRight)(n.value))},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.filter=function(n){return function(t){return(0,r.isNone)(t)?r.none:n(t.value)?t:r.none}},r.filterMap=function(n){return function(t){return(0,r.isNone)(t)?r.none:n(t.value)}},r.partition=function(n){return function(r){return(0,I.separated)(w(r,(0,g.not)(n)),w(r,n))}},r.partitionMap=function(n){return(0,e.flow)((0,r.map)(n),r.separate)},r.Filterable={URI:r.URI,map:m,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:E,partitionMap:q},r.traverse=function(n){return function(t){return function(u){return(0,r.isNone)(u)?n.of(r.none):n.map(t(u.value),r.some)}}},r.sequence=function(n){return function(t){return(0,r.isNone)(t)?n.of(r.none):n.map(t.value,r.some)}},r.Traversable={URI:r.URI,map:m,reduce:U,foldMap:O,reduceRight:j,traverse:y,sequence:r.sequence};var A=(0,R.witherDefault)(r.Traversable,r.Compactable),P=(0,R.wiltDefault)(r.Traversable,r.Compactable);r.wither=function(n){var r=A(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=P(n);return function(n){return function(t){return r(t,n)}}},r.Witherable={URI:r.URI,map:m,reduce:U,foldMap:O,reduceRight:j,traverse:y,sequence:r.sequence,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:E,partitionMap:q,wither:A,wilt:P},r.throwError=function(){return r.none},r.MonadThrow={URI:r.URI,map:m,ap:h,of:r.of,chain:r.flatMap,throwError:r.throwError},r.fromEither=r.getRight,r.FromEither={URI:r.URI,fromEither:r.fromEither},r.isSome=l.isSome,r.isNone=function(n){return"None"===n._tag},r.matchW=function(n,t){return function(u){return(0,r.isNone)(u)?n():t(u.value)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return(0,r.isNone)(t)?n():t.value}},r.getOrElse=r.getOrElseW,r.flap=(0,a.flap)(r.Functor),r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.flatten=r.compact,r.tap=(0,e.dual)(2,p.tap(r.Chain)),r.tapEither=(0,e.dual)(2,(0,f.tapEither)(r.FromEither,r.Chain)),r.duplicate=(0,r.extend)(e.identity),r.fromEitherK=(0,f.fromEitherK)(r.FromEither),r.chainEitherK=(0,f.chainEitherK)(r.FromEither,r.Chain),r.chainFirstEitherK=r.tapEither,r.fromNullable=function(n){return null==n?r.none:(0,r.some)(n)},r.tryCatch=function(n){try{return(0,r.some)(n())}catch(n){return r.none}},r.tryCatchK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.tryCatch)((function(){return n.apply(void 0,t)}))}},r.fromNullableK=function(n){return(0,e.flow)(n,r.fromNullable)},r.chainNullableK=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.fromNullable)(n(t.value))}},r.toNullable=(0,r.match)(e.constNull,e.identity),r.toUndefined=(0,r.match)(e.constUndefined,e.identity),r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!(0,r.isNone)(e)&&t.equals(u,e.value)}},r.exists=function(n){return function(t){return!(0,r.isNone)(t)&&n(t.value)}},r.Do=(0,r.of)(l.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=p.bind(r.Chain),r.apS=(0,i.apS)(r.Apply),r.ApT=(0,r.of)(l.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,l.head(t));if((0,r.isNone)(u))return r.none;for(var e=[u.value],o=1;o<t.length;o++){var i=n(o,t[o]);if((0,r.isNone)(i))return r.none;e.push(i.value)}return(0,r.some)(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return l.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(e.identity),r.chain=r.flatMap,r.chainFirst=r.tap,r.getRefinement=function(n){return function(t){return(0,r.isSome)(n(t))}},r.mapNullable=r.chainNullableK,r.option={URI:r.URI,map:m,of:r.of,ap:h,chain:r.flatMap,reduce:U,foldMap:O,reduceRight:j,traverse:y,sequence:r.sequence,zero:r.zero,alt:x,extend:W,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:E,partitionMap:q,wither:A,wilt:P,throwError:r.throwError},r.getApplySemigroup=(0,i.getApplySemigroup)(r.Apply),r.getApplyMonoid=(0,M.getApplicativeMonoid)(r.Applicative),r.getFirstMonoid=function(){return(0,r.getMonoid)((0,s.first)())},r.getLastMonoid=function(){return(0,r.getMonoid)((0,s.last)())}}));const y=n=>!("isConnected"in n)||n.isConnected,x=(()=>{let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let r of n.keys())n.set(r,n.get(r).filter(y))})(...r)}),2e3)}})(),w=n=>"function"==typeof n?n():n,_=(t,u)=>{const e=((n,r=((n,r)=>n!==r))=>{const t=w(n);let u=new Map(Object.entries(null!=t?t:{}));const e={dispose:[],get:[],set:[],reset:[]},o=()=>{var r;u=new Map(Object.entries(null!==(r=w(n))&&void 0!==r?r:{})),e.reset.forEach((n=>n()))},i=n=>(e.get.forEach((r=>r(n))),u.get(n)),c=(n,t)=>{const o=u.get(n);r(t,o,n)&&(u.set(n,t),e.set.forEach((r=>r(n,t,o))))},f="undefined"==typeof Proxy?{}:new Proxy(t,{get:(n,r)=>i(r),ownKeys:()=>Array.from(u.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,r)=>u.has(r),set:(n,r,t)=>(c(r,t),!0)}),a=(n,r)=>(e[n].push(r),()=>{((n,r)=>{const t=n.indexOf(r);t>=0&&(n[t]=n[n.length-1],n.length--)})(e[n],r)});return{state:f,get:i,set:c,on:a,onChange:(r,t)=>{const u=a("set",((n,u)=>{n===r&&t(u)})),e=a("reset",(()=>t(w(n)[r])));return()=>{u(),e()}},use:(...n)=>{const r=n.reduce(((n,r)=>(r.set&&n.push(a("set",r.set)),r.get&&n.push(a("get",r.get)),r.reset&&n.push(a("reset",r.reset)),r.dispose&&n.push(a("dispose",r.dispose)),n)),[]);return()=>r.forEach((n=>n()))},dispose:()=>{e.dispose.forEach((n=>n())),o()},reset:o,forceUpdate:n=>{const r=u.get(n);e.set.forEach((t=>t(n,r,r)))}}})(t,u);return e.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:r=>{const u=n();u&&((n,r,t)=>{const u=n.get(r);u?u.includes(t)||u.push(t):n.set(r,[t])})(t,r,u)},set:n=>{const u=t.get(n);u&&t.set(n,u.filter(r)),x(t)},reset:()=>{t.forEach((n=>n.forEach(r))),x(t)}}})()),e},{state:W}=_(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0}));function E(n){return n}function q(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n}function k(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}}var A=function(n,r){var t="number"==typeof n?function(r){return r.length>=n}:n;return function(){var n=Array.from(arguments);return t(arguments)?r.apply(this,n):function(t){return r.apply(void 0,function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))}([t],n,!1))}}},P={_tag:"None"},T=function(n){return{_tag:"Left",left:n}},N=function(n){return{_tag:"Right",right:n}},z=Object.prototype.hasOwnProperty,L=function(n,r){return A(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromTask(u(r))}))}))};function S(n){return function(r){return function(t){return n.fromEither("None"===t._tag?T(r()):N(t.value))}}}var C=T,$=N,D=A(2,(function(n,r){return V(n)?n:r(n.right)})),F=function(n,r){return k(n,G(r))},H="Either",G=function(n){return function(r){return V(r)?r:$(n(r.right))}},J={URI:H,map:F},B={URI:H,map:F,ap:function(n,r){return k(n,function(n){return function(r){return V(r)?r:V(n)?n:$(r.right(n.right))}}(r))}},K=function(n){return function(r){return V(r)?C(n(r.left)):r}},Q=S({URI:H,fromEither:E}),V=function(n){return"Left"===n._tag},X=function(n,r){return function(t){return V(t)?n(t.left):r(t.right)}},Y=D,Z=function(n){return{concat:function(r,t){var u={};for(var e in n)z.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},nn={concat:function(n,r){return n+r}},rn=P,tn=function(n){return{_tag:"Some",value:n}},un=function(n){return{concat:function(r,t){return cn(r)?t:cn(t)?r:tn(n.concat(r.value,t.value))},empty:rn}},en=function(n){return function(r){return cn(r)?rn:tn(n(r.value))}},on=A(2,(function(n,r){return cn(n)?rn:r(n.value)})),cn=function(n){return"None"===n._tag},fn=function(n,r){return function(t){return cn(t)?n():r(t.value)}},an=fn,vn=function(n){return null==n?rn:tn(n)},dn=on;function pn(n){return function(r){return n.map(r,$)}}function sn(n){return function(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}(n,J)}var ln,mn,hn=function(n,r){return k(n,In(r))},In=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},Rn=function(n){return function(){return Promise.resolve(n)}},bn="Task",Un={URI:bn,map:hn},On={URI:bn,map:hn,of:Rn,ap:function(n,r){return k(n,function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}}(r))},chain:A(2,(function(n,r){return function(){return Promise.resolve().then(n).then((function(n){return r(n)()}))}}))},Mn=pn(Un),gn=Rn,jn=sn(Un),yn=A(2,(ln=Un,function(n,r){return ln.map(n,K(r))})),xn=A(2,(mn=On,function(n,r){return mn.chain(n,(function(n){return V(n)?mn.of(n):r(n.right)}))})),wn=S({URI:"TaskEither",fromEither:gn}),_n=L({fromTask:Mn},{flatMap:xn}),Wn=xn,En=xn,qn=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),o=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),i=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return o(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getCompactableComposition=r.separate=r.compact=void 0;var c=i(I);function f(n,r){return function(t){return n.map(t,r.compact)}}function v(n,r,t){var u=f(n,r),o=(0,a.map)(n,t);return function(n){return c.separated(u((0,e.pipe)(n,o(j.getLeft))),u((0,e.pipe)(n,o(j.getRight))))}}r.compact=f,r.separate=v,r.getCompactableComposition=function(n,r){return{map:(0,a.getFunctorComposition)(n,r).map,compact:f(n,r),separate:v(n,r,r)}}})),kn=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.tailRec=void 0,r.tailRec=function(n,r){for(var t=r(n);"Left"===t._tag;)t=r(t.left);return t.right}})),An=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return v(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.match=r.foldW=r.matchW=r.isRight=r.isLeft=r.fromOption=r.fromPredicate=r.FromEither=r.MonadThrow=r.throwError=r.ChainRec=r.Extend=r.extend=r.Alt=r.alt=r.altW=r.Bifunctor=r.mapLeft=r.bimap=r.Traversable=r.sequence=r.traverse=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.Applicative=r.Apply=r.ap=r.apW=r.Pointed=r.of=r.asUnit=r.as=r.Functor=r.map=r.getAltValidation=r.getApplicativeValidation=r.getWitherable=r.getFilterable=r.getCompactable=r.getSemigroup=r.getEq=r.getShow=r.URI=r.flatMap=r.right=r.left=void 0,r.chainFirstW=r.chainFirst=r.chain=r.chainW=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.let=r.bindTo=r.Do=r.exists=r.elem=r.toError=r.toUnion=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.orElse=r.orElseW=r.swap=r.filterOrElseW=r.filterOrElse=r.flatMapOption=r.flatMapNullable=r.liftOption=r.liftNullable=r.chainOptionKW=r.chainOptionK=r.fromOptionK=r.duplicate=r.flatten=r.flattenW=r.tap=r.apSecondW=r.apSecond=r.apFirstW=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=r.fold=void 0,r.getValidation=r.getValidationMonoid=r.getValidationSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.either=r.stringifyJSON=r.parseJSON=void 0;var p=d(c),s=d(o);r.left=s.left,r.right=s.right,r.flatMap=(0,e.dual)(2,(function(n,t){return(0,r.isLeft)(n)?n:t(n.right)}));var l=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},m=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},h=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},b=function(n){return function(t,u){var o=(0,r.foldMap)(n);return(0,e.pipe)(t,o(u))}},U=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},O=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},g=function(n,t,u){return(0,e.pipe)(n,(0,r.bimap)(t,u))},j=function(n,t){return(0,e.pipe)(n,(0,r.mapLeft)(t))},y=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},x=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},w=function(n,t){return(0,kn.tailRec)(t(n),(function(n){return(0,r.isLeft)(n)?(0,r.right)((0,r.left)(n.left)):(0,r.isLeft)(n.right)?(0,r.left)(t(n.right.left)):(0,r.right)((0,r.right)(n.right.right))}))};r.URI="Either",r.getShow=function(n,t){return{show:function(u){return(0,r.isLeft)(u)?"left(".concat(n.show(u.left),")"):"right(".concat(t.show(u.right),")")}}},r.getEq=function(n,t){return{equals:function(u,e){return u===e||((0,r.isLeft)(u)?(0,r.isLeft)(e)&&n.equals(u.left,e.left):(0,r.isRight)(e)&&t.equals(u.right,e.right))}}},r.getSemigroup=function(n){return{concat:function(t,u){return(0,r.isLeft)(u)?t:(0,r.isLeft)(t)?u:(0,r.right)(n.concat(t.right,u.right))}}},r.getCompactable=function(n){var t=(0,r.left)(n.empty);return{URI:r.URI,_E:void 0,compact:function(n){return(0,r.isLeft)(n)?n:"None"===n.right._tag?t:(0,r.right)(n.right.value)},separate:function(n){return(0,r.isLeft)(n)?(0,I.separated)(n,n):(0,r.isLeft)(n.right)?(0,I.separated)((0,r.right)(n.right.left),t):(0,I.separated)(t,(0,r.right)(n.right.right))}}},r.getFilterable=function(n){var t=(0,r.left)(n.empty),u=(0,r.getCompactable)(n);return{URI:r.URI,_E:void 0,map:l,compact:u.compact,separate:u.separate,filter:function(n,u){return(0,r.isLeft)(n)||u(n.right)?n:t},filterMap:function(n,u){if((0,r.isLeft)(n))return n;var e=u(n.right);return"None"===e._tag?t:(0,r.right)(e.value)},partition:function(n,u){return(0,r.isLeft)(n)?(0,I.separated)(n,n):u(n.right)?(0,I.separated)(t,(0,r.right)(n.right)):(0,I.separated)((0,r.right)(n.right),t)},partitionMap:function(n,u){if((0,r.isLeft)(n))return(0,I.separated)(n,n);var e=u(n.right);return(0,r.isLeft)(e)?(0,I.separated)((0,r.right)(e.left),t):(0,I.separated)(t,(0,r.right)(e.right))}}},r.getWitherable=function(n){var t=(0,r.getFilterable)(n),u=(0,r.getCompactable)(n);return{URI:r.URI,_E:void 0,map:l,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:O,sequence:r.sequence,reduce:h,foldMap:b,reduceRight:U,wither:(0,R.witherDefault)(r.Traversable,u),wilt:(0,R.wiltDefault)(r.Traversable,u)}},r.getApplicativeValidation=function(n){return{URI:r.URI,_E:void 0,map:l,ap:function(t,u){return(0,r.isLeft)(t)?(0,r.isLeft)(u)?(0,r.left)(n.concat(t.left,u.left)):t:(0,r.isLeft)(u)?u:(0,r.right)(t.right(u.right))},of:r.of}},r.getAltValidation=function(n){return{URI:r.URI,_E:void 0,map:l,alt:function(t,u){if((0,r.isRight)(t))return t;var e=u();return(0,r.isLeft)(e)?(0,r.left)(n.concat(t.left,e.left)):e}}},r.map=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.right)(n(t.right))}},r.Functor={URI:r.URI,map:l},r.as=(0,e.dual)(2,(0,a.as)(r.Functor)),r.asUnit=(0,a.asUnit)(r.Functor),r.of=r.right,r.Pointed={URI:r.URI,of:r.of},r.apW=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.isLeft)(n)?n:(0,r.right)(t.right(n.right))}},r.ap=r.apW,r.Apply={URI:r.URI,map:l,ap:m},r.Applicative={URI:r.URI,map:l,ap:m,of:r.of},r.Chain={URI:r.URI,map:l,ap:m,chain:r.flatMap},r.Monad={URI:r.URI,map:l,ap:m,of:r.of,chain:r.flatMap},r.reduce=function(n,t){return function(u){return(0,r.isLeft)(u)?n:t(n,u.right)}},r.foldMap=function(n){return function(t){return function(u){return(0,r.isLeft)(u)?n.empty:t(u.right)}}},r.reduceRight=function(n,t){return function(u){return(0,r.isLeft)(u)?n:t(u.right,n)}},r.Foldable={URI:r.URI,reduce:h,foldMap:b,reduceRight:U},r.traverse=function(n){return function(t){return function(u){return(0,r.isLeft)(u)?n.of((0,r.left)(u.left)):n.map(t(u.right),r.right)}}},r.sequence=function(n){return function(t){return(0,r.isLeft)(t)?n.of((0,r.left)(t.left)):n.map(t.right,r.right)}},r.Traversable={URI:r.URI,map:l,reduce:h,foldMap:b,reduceRight:U,traverse:O,sequence:r.sequence},r.bimap=function(n,t){return function(u){return(0,r.isLeft)(u)?(0,r.left)(n(u.left)):(0,r.right)(t(u.right))}},r.mapLeft=function(n){return function(t){return(0,r.isLeft)(t)?(0,r.left)(n(t.left)):t}},r.Bifunctor={URI:r.URI,bimap:g,mapLeft:j},r.altW=function(n){return function(t){return(0,r.isLeft)(t)?n():t}},r.alt=r.altW,r.Alt={URI:r.URI,map:l,alt:y},r.extend=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.right)(n(t))}},r.Extend={URI:r.URI,map:l,extend:x},r.ChainRec={URI:r.URI,map:l,ap:m,chain:r.flatMap,chainRec:w},r.throwError=r.left,r.MonadThrow={URI:r.URI,map:l,ap:m,of:r.of,chain:r.flatMap,throwError:r.throwError},r.FromEither={URI:r.URI,fromEither:e.identity},r.fromPredicate=(0,f.fromPredicate)(r.FromEither),r.fromOption=(0,f.fromOption)(r.FromEither),r.isLeft=s.isLeft,r.isRight=s.isRight,r.matchW=function(n,t){return function(u){return(0,r.isLeft)(u)?n(u.left):t(u.right)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return(0,r.isLeft)(t)?n(t.left):t.right}},r.getOrElse=r.getOrElseW,r.flap=(0,a.flap)(r.Functor),r.apFirst=(0,i.apFirst)(r.Apply),r.apFirstW=r.apFirst,r.apSecond=(0,i.apSecond)(r.Apply),r.apSecondW=r.apSecond,r.tap=(0,e.dual)(2,p.tap(r.Chain)),r.flattenW=(0,r.flatMap)(e.identity),r.flatten=r.flattenW,r.duplicate=(0,r.extend)(e.identity),r.fromOptionK=(0,f.fromOptionK)(r.FromEither),r.chainOptionK=(0,f.chainOptionK)(r.FromEither,r.Chain),r.chainOptionKW=r.chainOptionK;var _={fromEither:r.FromEither.fromEither};r.liftNullable=s.liftNullable(_),r.liftOption=s.liftOption(_);var W={flatMap:r.flatMap};r.flatMapNullable=s.flatMapNullable(_,W),r.flatMapOption=s.flatMapOption(_,W),r.filterOrElse=(0,f.filterOrElse)(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.swap=function(n){return(0,r.isLeft)(n)?(0,r.right)(n.left):(0,r.left)(n.right)},r.orElseW=function(n){return function(t){return(0,r.isLeft)(t)?n(t.left):t}},r.orElse=r.orElseW,r.fromNullable=function(n){return function(t){return null==t?(0,r.left)(n):(0,r.right)(t)}},r.tryCatch=function(n,t){try{return(0,r.right)(n())}catch(n){return(0,r.left)(t(n))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,r.tryCatch)((function(){return n.apply(void 0,u)}),t)}},r.fromNullableK=function(n){var t=(0,r.fromNullable)(n);return function(n){return(0,e.flow)(n,t)}},r.chainNullableK=function(n){var t=(0,r.fromNullableK)(n);return function(n){return(0,r.flatMap)(t(n))}},r.toUnion=(0,r.foldW)(e.identity,e.identity),r.toError=function(n){return n instanceof Error?n:new Error(String(n))},r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!(0,r.isLeft)(e)&&t.equals(u,e.right)}},r.exists=function(n){return function(t){return!(0,r.isLeft)(t)&&n(t.right)}},r.Do=(0,r.of)(s.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=p.bind(r.Chain),r.bindW=r.bind,r.apS=(0,i.apS)(r.Apply),r.apSW=r.apS,r.ApT=(0,r.of)(s.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,s.head(t));if((0,r.isLeft)(u))return u;for(var e=[u.right],o=1;o<t.length;o++){var i=n(o,t[o]);if((0,r.isLeft)(i))return i;e.push(i.right)}return(0,r.right)(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return s.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(e.identity),r.chainW=r.flatMap,r.chain=r.flatMap,r.chainFirst=r.tap,r.chainFirstW=r.tap,r.parseJSON=function(n,t){return(0,r.tryCatch)((function(){return JSON.parse(n)}),t)},r.stringifyJSON=function(n,t){return(0,r.tryCatch)((function(){var r=JSON.stringify(n);if("string"!=typeof r)throw new Error("Converting unsupported structure to JSON");return r}),t)},r.either={URI:r.URI,map:l,of:r.of,ap:m,chain:r.flatMap,reduce:h,foldMap:b,reduceRight:U,traverse:O,sequence:r.sequence,bimap:g,mapLeft:j,alt:y,extend:x,chainRec:w,throwError:r.throwError},r.getApplySemigroup=(0,i.getApplySemigroup)(r.Apply),r.getApplyMonoid=(0,M.getApplicativeMonoid)(r.Applicative),r.getValidationSemigroup=function(n,t){return(0,i.getApplySemigroup)((0,r.getApplicativeValidation)(n))(t)},r.getValidationMonoid=function(n,t){return(0,M.getApplicativeMonoid)((0,r.getApplicativeValidation)(n))(t)},r.getValidation=function(n){var t=(0,r.getApplicativeValidation)(n).ap,u=(0,r.getAltValidation)(n).alt;return{URI:r.URI,_E:void 0,map:l,of:r.of,chain:r.flatMap,bimap:g,mapLeft:j,reduce:h,foldMap:b,reduceRight:U,extend:x,traverse:O,sequence:r.sequence,chainRec:w,throwError:r.throwError,ap:t,alt:u}}})),Pn=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),o=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),c=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return o(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getEitherM=r.toUnion=r.swap=r.orLeft=r.tapError=r.orElseFirst=r.orElse=r.getOrElse=r.matchE=r.match=r.altValidation=r.mapError=r.mapLeft=r.mapBoth=r.bimap=r.alt=r.flatMap=r.chain=r.ap=r.map=r.chainNullableK=r.fromNullableK=r.fromNullable=r.leftF=r.rightF=r.left=r.right=void 0;var f=c(An);function v(n){return(0,e.flow)(f.right,n.of)}function d(n){return(0,e.flow)(f.left,n.of)}function p(n){return function(r){return n.map(r,f.right)}}function s(n){return function(r){return n.map(r,f.left)}}function l(n){return function(r){return(0,e.flow)(f.fromNullable(r),n.of)}}function m(n){var r=l(n);return function(n){var t=r(n);return function(n){return(0,e.flow)(n,t)}}}function h(n){return(0,a.map)(n,f.Functor)}function I(n){return(0,i.ap)(n,f.Apply)}function R(n){var r=b(n);return function(n){return function(t){return r(t,n)}}}function b(n){return function(r,t){return n.chain(r,(function(r){return f.isLeft(r)?n.of(r):t(r.right)}))}}function U(n){return function(r){return function(t){return n.chain(t,(function(t){return f.isLeft(t)?r():n.of(t)}))}}}function O(n){var r=M(n);return function(n,t){return function(u){return r(u,n,t)}}}function M(n){return function(r,t,u){return n.map(r,f.bimap(t,u))}}function g(n){var r=j(n);return function(n){return function(t){return r(t,n)}}}function j(n){return function(r,t){return n.map(r,f.mapLeft(t))}}function y(n){return function(r,t){return function(u){return n.chain(u,f.match(r,t))}}}function x(n){return function(r){return function(t){return n.chain(t,f.match(r,n.of))}}}function w(n){return function(r){return function(t){return n.chain(t,(function(t){return f.isLeft(t)?r(t.left):n.of(t)}))}}}function _(n){var r=w(n);return function(t,u){return(0,e.pipe)(t,r((function(r){return n.map(u(r),(function(n){return f.isLeft(n)?n:f.left(r)}))})))}}function W(n){return function(r){return n.map(r,f.swap)}}r.right=v,r.left=d,r.rightF=p,r.leftF=s,r.fromNullable=l,r.fromNullableK=m,r.chainNullableK=function(n){var r=R(n),t=m(n);return function(n){var u=t(n);return function(n){return r(u(n))}}},r.map=h,r.ap=I,r.chain=R,r.flatMap=b,r.alt=U,r.bimap=O,r.mapBoth=M,r.mapLeft=g,r.mapError=j,r.altValidation=function(n,r){return function(t){return function(u){return n.chain(u,f.match((function(u){return n.map(t(),f.mapLeft((function(n){return r.concat(u,n)})))}),v(n)))}}},r.match=function(n){return function(r,t){return function(u){return n.map(u,f.match(r,t))}}},r.matchE=y,r.getOrElse=x,r.orElse=w,r.orElseFirst=function(n){var r=_(n);return function(n){return function(t){return r(t,n)}}},r.tapError=_,r.orLeft=function(n){return function(r){return function(t){return n.chain(t,f.match((function(t){return n.map(r(t),f.left)}),(function(r){return n.of(f.right(r))})))}}},r.swap=W,r.toUnion=function(n){return function(r){return n.map(r,f.toUnion)}},r.getEitherM=function(n){var r=I(n),t=h(n),u=R(n),o=U(n),i=O(n),c=g(n),f=y(n),a=x(n),l=w(n);return{map:function(n,r){return(0,e.pipe)(n,t(r))},ap:function(n,t){return(0,e.pipe)(n,r(t))},of:v(n),chain:function(n,r){return(0,e.pipe)(n,u(r))},alt:function(n,r){return(0,e.pipe)(n,o(r))},bimap:function(n,r,t){return(0,e.pipe)(n,i(r,t))},mapLeft:function(n,r){return(0,e.pipe)(n,c(r))},fold:function(n,r,t){return(0,e.pipe)(n,f(r,t))},getOrElse:function(n,r){return(0,e.pipe)(n,a(r))},orElse:function(n,r){return(0,e.pipe)(n,l(r))},swap:W(n),rightM:p(n),leftM:s(n),left:d(n)}}})),Tn=u((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filter(n,t)}))}}}function u(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filterMap(n,t)}))}}}function o(n,r){var u=t(n,r);return function(n){var r=u((0,g.not)(n)),t=u(n);return function(n){return(0,I.separated)(r(n),t(n))}}}function i(n,r){var t=u(n,r);return function(n){return function(r){return(0,I.separated)((0,e.pipe)(r,t((function(r){return(0,j.getLeft)(n(r))}))),(0,e.pipe)(r,t((function(r){return(0,j.getRight)(n(r))}))))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFilterableComposition=r.partitionMap=r.partition=r.filterMap=r.filter=void 0,r.filter=t,r.filterMap=u,r.partition=o,r.partitionMap=i,r.getFilterableComposition=function(n,r){var c=(0,a.getFunctorComposition)(n,r).map,f=(0,qn.compact)(n,r),v=(0,qn.separate)(n,r,r),d=t(n,r),p=u(n,r),s=o(n,r),l=i(n,r);return{map:c,compact:f,separate:v,filter:function(n,r){return(0,e.pipe)(n,d(r))},filterMap:function(n,r){return(0,e.pipe)(n,p(r))},partition:function(n,r){return(0,e.pipe)(n,s(r))},partitionMap:function(n,r){return(0,e.pipe)(n,l(r))}}}})),Nn=u((function(n,r){function t(n,r){var t=(0,c.tap)(r);return function(r,u){return t(r,(0,e.flow)(u,n.fromIO))}}Object.defineProperty(r,"__esModule",{value:!0}),r.tapIO=r.chainFirstIOK=r.chainIOK=r.fromIOK=void 0,r.fromIOK=function(n){return function(r){return(0,e.flow)(r,n.fromIO)}},r.chainIOK=function(n,r){return function(t){var u=(0,e.flow)(t,n.fromIO);return function(n){return r.chain(n,u)}}},r.chainFirstIOK=function(n,r){var u=t(n,r);return function(n){return function(r){return u(r,n)}}},r.tapIO=t})),zn=u((function(n,r){function t(n,r){var t=(0,c.tap)(r);return function(r,u){return t(r,(0,e.flow)(u,n.fromTask))}}Object.defineProperty(r,"__esModule",{value:!0}),r.tapTask=r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=void 0,r.fromTaskK=function(n){return function(r){return(0,e.flow)(r,n.fromTask)}},r.chainTaskK=function(n,r){return function(t){var u=(0,e.flow)(t,n.fromTask);return function(n){return r.chain(n,u)}}},r.chainFirstTaskK=function(n,r){var u=t(n,r);return function(n){return function(r){return u(r,n)}}},r.tapTask=t})),Ln=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),f=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),v=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return f(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.let=r.bindTo=r.Do=r.never=r.FromTask=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.tapIO=r.tap=r.flatMapIO=r.FromIO=r.MonadTask=r.fromTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecond=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.asUnit=r.as=r.Functor=r.getRaceMonoid=r.URI=r.flatten=r.flatMap=r.of=r.ap=r.map=r.delay=r.fromIO=void 0,r.getMonoid=r.getSemigroup=r.taskSeq=r.task=r.chainFirst=r.chain=void 0;var d=v(c),p=v(o);r.fromIO=function(n){return function(){return Promise.resolve().then(n)}},r.delay=function(n){return function(r){return function(){return new Promise((function(t){setTimeout((function(){Promise.resolve().then(r).then(t)}),n)}))}}};var s=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},l=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},m=function(n,t){return(0,r.flatMap)(n,(function(n){return(0,e.pipe)(t,(0,r.map)(n))}))};r.map=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},r.ap=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},r.of=function(n){return function(){return Promise.resolve(n)}},r.flatMap=(0,e.dual)(2,(function(n,r){return function(){return Promise.resolve().then(n).then((function(n){return r(n)()}))}})),r.flatten=(0,r.flatMap)(e.identity),r.URI="Task",r.getRaceMonoid=function(){return{concat:function(n,r){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(r)])}},empty:r.never}},r.Functor={URI:r.URI,map:s},r.as=(0,e.dual)(2,(0,a.as)(r.Functor)),r.asUnit=(0,a.asUnit)(r.Functor),r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:s,ap:l},r.apFirst=(0,i.apFirst)(r.ApplyPar),r.apSecond=(0,i.apSecond)(r.ApplyPar),r.ApplicativePar={URI:r.URI,map:s,ap:l,of:r.of},r.ApplySeq={URI:r.URI,map:s,ap:m},r.ApplicativeSeq={URI:r.URI,map:s,ap:m,of:r.of},r.Chain={URI:r.URI,map:s,ap:l,chain:r.flatMap},r.Monad={URI:r.URI,map:s,of:r.of,ap:l,chain:r.flatMap},r.MonadIO={URI:r.URI,map:s,of:r.of,ap:l,chain:r.flatMap,fromIO:r.fromIO},r.fromTask=e.identity,r.MonadTask={URI:r.URI,map:s,of:r.of,ap:l,chain:r.flatMap,fromIO:r.fromIO,fromTask:r.fromTask},r.FromIO={URI:r.URI,fromIO:r.fromIO},r.flatMapIO=p.flatMapIO({fromIO:r.FromIO.fromIO},{flatMap:r.flatMap}),r.tap=(0,e.dual)(2,d.tap(r.Chain)),r.tapIO=(0,e.dual)(2,(0,Nn.tapIO)(r.FromIO,r.Chain)),r.fromIOK=(0,Nn.fromIOK)(r.FromIO),r.chainIOK=r.flatMapIO,r.chainFirstIOK=r.tapIO,r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.never=function(){return new Promise((function(){}))},r.Do=(0,r.of)(p.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=d.bind(r.Chain),r.apS=(0,i.apS)(r.ApplyPar),r.ApT=(0,r.of)(p.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){return function(){return Promise.all(r.map((function(r,t){return Promise.resolve().then((function(){return n(t,r)()}))})))}}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return p.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return p.tail(r).reduce((function(r,t,u){return r.then((function(r){return Promise.resolve().then(n(u+1,t)).then((function(n){return r.push(n),r}))}))}),Promise.resolve().then(n(0,p.head(r))).then(p.singleton))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return p.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(e.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return(0,r.traverseReadonlyArrayWithIndexSeq)((function(r,t){return n(t)}))},r.sequenceSeqArray=(0,r.traverseSeqArray)(e.identity),r.chain=r.flatMap,r.chainFirst=r.tap,r.task={URI:r.URI,map:s,of:r.of,ap:l,chain:r.flatMap,fromIO:r.fromIO,fromTask:r.fromTask},r.taskSeq={URI:r.URI,map:s,of:r.of,ap:m,chain:r.flatMap,fromIO:r.fromIO,fromTask:r.fromTask},r.getSemigroup=(0,i.getApplySemigroup)(r.ApplySeq),r.getMonoid=(0,M.getApplicativeMonoid)(r.ApplicativeSeq)})),Sn=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return v(r,n),r},p=t&&t.__awaiter||function(n,r,t,u){return new(t||(t=Promise))((function(e,o){function i(n){try{f(u.next(n))}catch(n){o(n)}}function c(n){try{f(u.throw(n))}catch(n){o(n)}}function f(n){var r;n.done?e(n.value):(r=n.value,r instanceof t?r:new t((function(n){n(r)}))).then(i,c)}f((u=u.apply(n,r||[])).next())}))},s=t&&t.__generator||function(n,r){var t,u,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(t=1,u&&(e=2&c[0]?u.return:c[0]?u.throw||((e=u.return)&&e.call(u),0):u.next)&&!(e=e.call(u,c[1])).done)return e;switch(u=0,e&&(c=[2&c[0],e.value]),c[0]){case 0:case 1:e=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,u=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!e||c[1]>e[0]&&c[1]<e[3])){i.label=c[1];break}if(6===c[0]&&i.label<e[1]){i.label=e[1],e=c;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(c);break}e[2]&&i.ops.pop(),i.trys.pop();continue}c=r.call(n,i)}catch(n){c=[6,n],u=0}finally{t=e=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.throwError=r.of=r.altW=r.alt=r.flatten=r.flattenW=r.flatMap=r.apW=r.ap=r.mapLeft=r.mapError=r.bimap=r.mapBoth=r.map=r.fromIOEitherK=r.chainTaskOptionK=r.chainTaskOptionKW=r.fromTaskOptionK=r.swap=r.orLeft=r.orElseFirstTaskK=r.orElseFirstIOK=r.tapError=r.orElseW=r.orElse=r.chainNullableK=r.fromNullableK=r.fromNullable=r.toUnion=r.tryCatchK=r.tryCatch=r.getOrElseW=r.getOrElse=r.foldW=r.matchEW=r.fold=r.matchE=r.matchW=r.match=r.fromTaskOption=r.fromIOEither=r.fromEither=r.fromTask=r.fromIO=r.leftIO=r.rightIO=r.leftTask=r.rightTask=r.right=r.left=void 0,r.fromPredicate=r.chainFirstEitherKW=r.chainFirstEitherK=r.chainEitherKW=r.chainEitherK=r.flatMapTaskOption=r.flatMapIOEither=r.flatMapTask=r.flatMapIO=r.flatMapEither=r.flatMapOption=r.flatMapNullable=r.liftOption=r.liftNullable=r.chainOptionKW=r.chainOptionK=r.fromOptionK=r.fromOption=r.Alt=r.Bifunctor=r.tapTask=r.tapIO=r.tapEither=r.tap=r.FromTask=r.FromIO=r.FromEither=r.MonadThrow=r.MonadTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecondW=r.apSecond=r.apFirstW=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.asUnit=r.as=r.Functor=r.getFilterable=r.getCompactable=r.getAltTaskValidation=r.getApplicativeTaskValidation=r.URI=void 0,r.getTaskValidation=r.getSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.taskEitherSeq=r.taskEither=r.orElseFirstW=r.orElseFirst=r.chainFirstW=r.chainFirst=r.chainW=r.chain=r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.let=r.bindTo=r.Do=r.bracketW=r.bracket=r.taskify=r.chainIOEitherK=r.chainIOEitherKW=r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.fromEitherK=r.filterOrElseW=r.filterOrElse=void 0;var l=d(c),m=d(An),h=d(Pn),I=d(o),R=d(Ln);r.left=h.left(R.Pointed),r.right=h.right(R.Pointed),r.rightTask=h.rightF(R.Functor),r.leftTask=h.leftF(R.Functor),r.rightIO=(0,e.flow)(R.fromIO,r.rightTask),r.leftIO=(0,e.flow)(R.fromIO,r.leftTask),r.fromIO=r.rightIO,r.fromTask=r.rightTask,r.fromEither=R.of,r.fromIOEither=R.fromIO,r.fromTaskOption=function(n){return R.map(m.fromOption(n))},r.match=h.match(R.Functor),r.matchW=r.match,r.matchE=h.matchE(R.Monad),r.fold=r.matchE,r.matchEW=r.matchE,r.foldW=r.matchEW,r.getOrElse=h.getOrElse(R.Monad),r.getOrElseW=r.getOrElse,r.tryCatch=function(n,r){return function(){return p(void 0,void 0,void 0,(function(){var t;return s(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n().then(I.right)];case 1:return[2,u.sent()];case 2:return t=u.sent(),[2,I.left(r(t))];case 3:return[2]}}))}))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,r.tryCatch)((function(){return n.apply(void 0,u)}),t)}},r.toUnion=h.toUnion(R.Functor),r.fromNullable=h.fromNullable(R.Pointed),r.fromNullableK=h.fromNullableK(R.Pointed),r.chainNullableK=h.chainNullableK(R.Monad),r.orElse=h.orElse(R.Monad),r.orElseW=r.orElse,r.tapError=(0,e.dual)(2,h.tapError(R.Monad)),r.orElseFirstIOK=function(n){return(0,r.tapError)((0,r.fromIOK)(n))},r.orElseFirstTaskK=function(n){return(0,r.tapError)((0,r.fromTaskK)(n))},r.orLeft=h.orLeft(R.Monad),r.swap=h.swap(R.Functor),r.fromTaskOptionK=function(n){var t=(0,r.fromTaskOption)(n);return function(n){return(0,e.flow)(n,t)}},r.chainTaskOptionKW=function(n){return function(t){return function(u){return(0,r.flatMap)(u,(0,r.fromTaskOptionK)(n)(t))}}},r.chainTaskOptionK=r.chainTaskOptionKW,r.fromIOEitherK=function(n){return(0,e.flow)(n,r.fromIOEither)};var b=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},U=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},O=function(n,t){return(0,r.flatMap)(n,(function(n){return(0,e.pipe)(t,(0,r.map)(n))}))},g=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))};function j(n,t){var u=(0,i.ap)(n,m.getApplicativeValidation(t));return{URI:r.URI,_E:void 0,map:b,ap:function(n,r){return(0,e.pipe)(n,u(r))},of:r.of}}function y(n){var t=h.altValidation(R.Monad,n);return{URI:r.URI,_E:void 0,map:b,alt:function(n,r){return(0,e.pipe)(n,t(r))}}}r.map=h.map(R.Functor),r.mapBoth=(0,e.dual)(3,h.mapBoth(R.Functor)),r.bimap=r.mapBoth,r.mapError=(0,e.dual)(2,h.mapError(R.Functor)),r.mapLeft=r.mapError,r.ap=h.ap(R.ApplyPar),r.apW=r.ap,r.flatMap=(0,e.dual)(2,h.flatMap(R.Monad)),r.flattenW=(0,r.flatMap)(e.identity),r.flatten=r.flattenW,r.alt=h.alt(R.Monad),r.altW=r.alt,r.of=r.right,r.throwError=r.left,r.URI="TaskEither",r.getApplicativeTaskValidation=j,r.getAltTaskValidation=y,r.getCompactable=function(n){var t=m.getCompactable(n);return{URI:r.URI,_E:void 0,compact:(0,qn.compact)(R.Functor,t),separate:(0,qn.separate)(R.Functor,t,m.Functor)}},r.getFilterable=function(n){var t=m.getFilterable(n),u=(0,r.getCompactable)(n),o=(0,Tn.filter)(R.Functor,t),i=(0,Tn.filterMap)(R.Functor,t),c=(0,Tn.partition)(R.Functor,t),f=(0,Tn.partitionMap)(R.Functor,t);return{URI:r.URI,_E:void 0,map:b,compact:u.compact,separate:u.separate,filter:function(n,r){return(0,e.pipe)(n,o(r))},filterMap:function(n,r){return(0,e.pipe)(n,i(r))},partition:function(n,r){return(0,e.pipe)(n,c(r))},partitionMap:function(n,r){return(0,e.pipe)(n,f(r))}}},r.Functor={URI:r.URI,map:b},r.as=(0,e.dual)(2,(0,a.as)(r.Functor)),r.asUnit=(0,a.asUnit)(r.Functor),r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:b,ap:U},r.apFirst=(0,i.apFirst)(r.ApplyPar),r.apFirstW=r.apFirst,r.apSecond=(0,i.apSecond)(r.ApplyPar),r.apSecondW=r.apSecond,r.ApplicativePar={URI:r.URI,map:b,ap:U,of:r.of},r.ApplySeq={URI:r.URI,map:b,ap:O},r.ApplicativeSeq={URI:r.URI,map:b,ap:O,of:r.of},r.Chain={URI:r.URI,map:b,ap:U,chain:r.flatMap},r.Monad={URI:r.URI,map:b,ap:U,chain:r.flatMap,of:r.of},r.MonadIO={URI:r.URI,map:b,ap:U,chain:r.flatMap,of:r.of,fromIO:r.fromIO},r.MonadTask={URI:r.URI,map:b,ap:U,chain:r.flatMap,of:r.of,fromIO:r.fromIO,fromTask:r.fromTask},r.MonadThrow={URI:r.URI,map:b,ap:U,chain:r.flatMap,of:r.of,throwError:r.throwError},r.FromEither={URI:r.URI,fromEither:r.fromEither},r.FromIO={URI:r.URI,fromIO:r.fromIO},r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.tap=(0,e.dual)(2,l.tap(r.Chain)),r.tapEither=(0,e.dual)(2,(0,f.tapEither)(r.FromEither,r.Chain)),r.tapIO=(0,e.dual)(2,(0,Nn.tapIO)(r.FromIO,r.Chain)),r.tapTask=(0,e.dual)(2,(0,zn.tapTask)(r.FromTask,r.Chain)),r.Bifunctor={URI:r.URI,bimap:r.mapBoth,mapLeft:r.mapError},r.Alt={URI:r.URI,map:b,alt:g},r.fromOption=(0,f.fromOption)(r.FromEither),r.fromOptionK=(0,f.fromOptionK)(r.FromEither),r.chainOptionK=(0,f.chainOptionK)(r.FromEither,r.Chain),r.chainOptionKW=r.chainOptionK;var x={fromEither:r.FromEither.fromEither};r.liftNullable=I.liftNullable(x),r.liftOption=I.liftOption(x);var w={flatMap:r.flatMap},_={fromIO:r.FromIO.fromIO},W={fromTask:r.fromTask};r.flatMapNullable=I.flatMapNullable(x,w),r.flatMapOption=I.flatMapOption(x,w),r.flatMapEither=I.flatMapEither(x,w),r.flatMapIO=I.flatMapIO(_,w),r.flatMapTask=I.flatMapTask(W,w),r.flatMapIOEither=(0,e.dual)(2,(function(n,t){return(0,r.flatMap)(n,(0,r.fromIOEitherK)(t))})),r.flatMapTaskOption=(0,e.dual)(3,(function(n,t,u){return(0,r.flatMap)(n,(function(n){return(0,r.fromTaskOption)((function(){return u(n)}))(t(n))}))})),r.chainEitherK=r.flatMapEither,r.chainEitherKW=r.flatMapEither,r.chainFirstEitherK=r.tapEither,r.chainFirstEitherKW=r.tapEither,r.fromPredicate=(0,f.fromPredicate)(r.FromEither),r.filterOrElse=(0,f.filterOrElse)(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.fromEitherK=(0,f.fromEitherK)(r.FromEither),r.fromIOK=(0,Nn.fromIOK)(r.FromIO),r.chainIOK=r.flatMapIO,r.chainFirstIOK=r.tapIO,r.fromTaskK=(0,zn.fromTaskK)(r.FromTask),r.chainTaskK=r.flatMapTask,r.chainFirstTaskK=r.tapTask,r.chainIOEitherKW=r.flatMapIOEither,r.chainIOEitherK=r.flatMapIOEither,r.taskify=function(n){return function(){var r=Array.prototype.slice.call(arguments);return function(){return new Promise((function(t){n.apply(null,r.concat((function(n,r){return t(null!=n?I.left(n):I.right(r))})))}))}}},r.bracket=function(n,t,u){return(0,r.bracketW)(n,t,u)},r.bracketW=function(n,t,u){return(0,r.flatMap)(n,(function(n){return R.flatMap(t(n),(function(t){return(0,r.flatMap)(u(n,t),(function(){return R.of(t)}))}))}))},r.Do=(0,r.of)(I.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=l.bind(r.Chain),r.bindW=r.bind,r.apS=(0,i.apS)(r.ApplyPar),r.apSW=r.apS,r.ApT=(0,r.of)(I.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return(0,e.flow)(R.traverseReadonlyNonEmptyArrayWithIndex(n),R.map(m.traverseReadonlyNonEmptyArrayWithIndex(e.SK)))},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return I.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return I.tail(r).reduce((function(r,t,u){return r.then((function(e){return I.isLeft(e)?r:n(u+1,t)().then((function(n){return I.isLeft(n)?n:(e.right.push(n.right),e)}))}))}),n(0,I.head(r))().then(m.map(I.singleton)))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return I.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(e.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return(0,r.traverseReadonlyArrayWithIndexSeq)((function(r,t){return n(t)}))},r.sequenceSeqArray=(0,r.traverseSeqArray)(e.identity),r.chain=r.flatMap,r.chainW=r.flatMap,r.chainFirst=r.tap,r.chainFirstW=r.tap,r.orElseFirst=r.tapError,r.orElseFirstW=r.tapError,r.taskEither={URI:r.URI,bimap:r.mapBoth,mapLeft:r.mapError,map:b,of:r.of,ap:U,chain:r.flatMap,alt:g,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.taskEitherSeq={URI:r.URI,bimap:r.mapBoth,mapLeft:r.mapError,map:b,of:r.of,ap:O,chain:r.flatMap,alt:g,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.getApplySemigroup=(0,i.getApplySemigroup)(r.ApplySeq),r.getApplyMonoid=(0,M.getApplicativeMonoid)(r.ApplicativeSeq),r.getSemigroup=function(n){return(0,i.getApplySemigroup)(R.ApplySeq)(m.getSemigroup(n))},r.getTaskValidation=function(n){var t=j(R.ApplicativePar,n),u=y(n);return{URI:r.URI,_E:void 0,map:b,ap:t.ap,of:r.of,chain:r.flatMap,bimap:r.mapBoth,mapLeft:r.mapError,alt:u.alt,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError}}})),Cn=function(n){return 0===n.length};const $n=n=>({kind:"server",inner:n}),Dn={kind:"client",inner:"Token not exist or empty"},Fn={kind:"client",inner:"Api path empty or missing"},Hn=un({concat:function(n,r){return n+r},empty:""}),Gn=()=>k(un({concat:E}).concat(vn(W.apiPath),vn("https://api.vviinn.com")),Q((()=>Fn))),Jn=Z({method:{concat:(n,r)=>{return k(Hn.concat(vn(n),vn(r)),(t=()=>"GET",function(n){return cn(n)?t():n.value}));var t}},body:{concat:function(n,r){return r}},headers:{concat:(n,r)=>{const t=new Headers;return void 0!==n&&n.forEach(((n,r)=>t.append(r,n))),void 0!==r&&r.forEach(((n,r)=>t.append(r,n))),t}}}),Bn=n=>({method:n}),Kn=$(Bn("GET")),Qn=$(Bn("POST")),Vn=n=>n.status>=200&&n.status<300?Sn.right(n):Sn.left(n),Xn=Jn,Yn=(n,r)=>([t,u])=>{const o=new URL(n,t),i=Xn.concat(u,r);return e.pipe(((n,r={})=>e.pipe(((n,r={method:"GET"})=>Sn.tryCatch((()=>fetch(n,r)),(n=>n)))(n,r),Sn.chain(Vn),Sn.chain((n=>function(n){return Sn.fromTask((()=>n.json()))}(n)))))(o.toString(),i),Sn.mapLeft($n))},Zn=n=>(n=>0===n.length)(n)?C("entity is empty"):$(n),nr=n=>k(n,("entity not exist",function(n){return null==n?C("entity not exist"):$(n)}),Y(Zn)),rr=n=>n.length?`?${n.join("&")}`:"",tr=n=>n.split(";").map((n=>n?`excluded[]=${n}`:"")).join("&"),ur=n=>new Headers({Authorization:`Bearer ${n}`}),er=n=>k(n,nr,An.mapLeft((()=>Dn))),or=n=>k(n,er,An.map(ur)),ir=i.sequenceT(An.Apply),cr={equals:(n,r)=>n.class===r.class&&n.score===r.score&&n.rectangle.left===r.rectangle.left&&n.rectangle.top===r.rectangle.top&&n.rectangle.height===r.rectangle.height&&n.rectangle.width===r.rectangle.width};var fr;!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"}(fr||(fr={}));const ar=n=>"array"===n.type?n.value.map(ar):n.value,vr=n=>r=>k(ir(Gn(),$(Bn(n.method))),gn,En(Yn(n.href,r))),dr=({x:n,y:r})=>({x:n,y:r}),pr=Z({x:nn,y:nn});var sr;!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"}(sr||(sr={}));const lr=n=>({x:0,y:0,width:n.width,height:n.height}),mr=n=>Object.assign({x:n.left,y:n.top},n),hr=n=>r=>({x:r.x*n.width,y:r.y*n.height,width:r.width*n.width,height:r.height*n.height}),Ir=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var Rr;!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"}(Rr||(Rr={}));const br=(n,r)=>{const t=new URLSearchParams(Object.entries(r));return[`${n.href}?${t.toString()}`,{method:"GET"}]},Ur=(n,r)=>[n.href,{body:JSON.stringify(r),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],Or=(n,r={})=>t=>e.pipe(ir(Gn(),e.pipe(((n,r)=>e.pipe(((n,r)=>{const t=n.map((n=>n.name)),u=Object.keys(r),e=t.filter((n=>!u.includes(n)));return 0===e.length?$(r):C(`Data should contains fields: ${e.join(", ")}`)})(n.value,r),G((r=>n.rel.includes("query-form")?br(n,r):Ur(n,r)))))(n,r),K((n=>({kind:"app",inner:n}))))),gn,En((n=>{const r=n[0],[u,e]=n[1];return Yn(u,e)([r,t])}))),Mr=async n=>new Promise((r=>{const t=new FileReader;t.addEventListener("load",(()=>{r(t.result)})),t.readAsDataURL(n)})),gr=i.sequenceT(j.Apply),jr=n=>n.length>0?j.some(n):j.none;const yr=["jpg","jpeg","png","webp"],xr={kind:"client",inner:"File format not supported"},wr=n=>{const r=n.type.split("/")[1],t=(u=t=>t===r?j.some(n):j.none,function(n){for(var r=0;r<n.length;r++){var t=u(n[r]);if("Some"===t._tag)return t}return P})(yr);var u;return e.pipe(t,An.fromOption((()=>xr)))},_r={kind:"app",inner:"File doesnt exist"},Wr=n=>()=>new Promise((r=>{const t=new FileReader,u=new Image;t.onload=n=>{u.src=n.target.result},u.onload=()=>r(u),t.readAsDataURL(n)}));var Er=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.copy=void 0,r.copy=(n,r,t=0,u=0,e=n.width-t,o=n.height-u,i=0,c=0)=>{if(t|=0,u|=0,o|=0,i|=0,c|=0,(e|=0)<=0||o<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(r.data.buffer);for(let v=0;v<o;v++){const o=u+v;if(o<0||o>=n.height)continue;const d=c+v;if(!(d<0||d>=r.height))for(let u=0;u<e;u++){const e=t+u;if(e<0||e>=n.width)continue;const c=i+u;c<0||c>=r.width||(a[d*r.width+c]=f[o*n.width+e])}}}})),qr=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CreateImageFactory=(n=[0,0,0,0],r=4)=>{if(r=Math.floor(r),isNaN(r)||r<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<r)throw TypeError(`fill should be iterable with at least ${r} members`);const t=(n=new Uint8ClampedArray(n).slice(0,r)).every((n=>0===n));return(u,e,o)=>{if(void 0===u||void 0===e)throw TypeError("Not enough arguments");if(u=Math.floor(u),e=Math.floor(e),isNaN(u)||u<1||isNaN(e)||e<1)throw TypeError("Index or size is negative or greater than the allowed amount");const i=u*e*r;if(void 0===o&&(o=new Uint8ClampedArray(i)),o instanceof Uint8ClampedArray){if(o.length!==i)throw TypeError("Index or size is negative or greater than the allowed amount");if(!t)for(let t=0;t<e;t++)for(let e=0;e<u;e++){const i=(t*u+e)*r;for(let t=0;t<r;t++)o[i+t]=n[t]}return{get width(){return u},get height(){return e},get data(){return o}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},r.createImage=r.CreateImageFactory()})),kr=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.filters=void 0;const t=(n,r)=>{if(n<=-r||n>=r)return 0;if(0==n)return 0;const t=n*Math.PI;return Math.sin(t)/t*Math.sin(t/r)/(t/r)},u=n=>Math.round(16383*n);r.filters=(n,r,e,o,i)=>{const c=i?2:3,f=1/e,a=Math.min(1,e),v=c/a,d=Math.floor(2*(v+1)),p=new Int16Array((d+2)*r);let s=0;for(let e=0;e<r;e++){const i=(e+.5)*f+o,d=Math.max(0,Math.floor(i-v)),l=Math.min(n-1,Math.ceil(i+v)),m=l-d+1,h=new Float32Array(m),I=new Int16Array(m);let R=0,b=0;for(let n=d;n<=l;n++){const r=t((n+.5-i)*a,c);R+=r,h[b]=r,b++}let U=0;for(let n=0;n<h.length;n++){const r=h[n]/R;U+=r,I[n]=u(r)}I[r>>1]+=u(1-U);let O=0;for(;O<I.length&&0===I[O];)O++;let M=I.length-1;for(;M>0&&0===I[M];)M--;const g=M-O+1;p[s++]=d+O,p[s++]=g,p.set(I.subarray(O,M+1),s),s+=g}return p}})),Ar=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convolve=void 0,r.convolve=(n,r,t,u,e,o)=>{let i=0,c=0;for(let f=0;f<u;f++){let a=0;for(let t=0;t<e;t++){let t=i+4*o[a++]|0,e=0,f=0,v=0,d=0;for(let r=o[a++];r>0;r--){const r=o[a++];e=e+r*n[t]|0,f=f+r*n[t+1]|0,v=v+r*n[t+2]|0,d=d+r*n[t+3]|0,t=t+4|0}r[c]=e+8192>>14,r[c+1]=f+8192>>14,r[c+2]=v+8192>>14,r[c+3]=d+8192>>14,c=c+4*u|0}c=4*(f+1)|0,i=(f+1)*t*4|0}}})),Pr=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lanczos2=r.lanczos=void 0;const t=(n,r,t=!1)=>{const u=r.height/n.height,e=kr.filters(n.width,r.width,r.width/n.width,0,t),o=kr.filters(n.height,r.height,u,0,t),i=new Uint8ClampedArray(r.width*n.height*4);Ar.convolve(n.data,i,n.width,n.height,r.width,e),Ar.convolve(i,r.data,n.height,r.width,r.height,o)};r.lanczos=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r);const d=qr.createImage(o,i),p=qr.createImage(a,v);Er.copy(n,d,u,e),t(d,p),Er.copy(p,r,0,0,p.width,p.height,c,f)},r.lanczos2=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r,!0);const d=qr.createImage(o,i),p=qr.createImage(a,v);Er.copy(n,d,u,e),t(d,p,!0),Er.copy(p,r,0,0,p.width,p.height,c,f)}}));const Tr=n=>({kind:"height",size:n}),Nr=d.contramap((n=>n.size))(h.Ord),zr=O.sort(Nr),Lr=O.sort({equals:(n,r)=>n.kind===r.kind,compare:(n,r)=>n.kind===r.kind?0:"width"===n.kind?-1:1}),Sr=n=>r=>{const t=zr(r),u=(n=>{const[r,t]=n;return r.size/t.size})(t),e=Object.assign(Object.assign({},t[0]),{size:n*u}),o=Object.assign(Object.assign({},t[1]),{size:n});return Lr([o,e])},Cr=n=>{const{naturalWidth:r,naturalHeight:t}=n;return[(u=r,{kind:"width",size:u}),Tr(t)];var u},$r=()=>{const n=document.createElement("canvas"),r=n.getContext("2d");return[n,r]},Dr=async n=>{const r=await fetch(n),t=await r.blob();return new File([t],"image",{type:t.type,lastModified:Date.now()})},Fr=n=>()=>new Promise((async r=>{const t=await fetch(n),u=await t.blob();r(new File([u],"image",{type:u.type,lastModified:Date.now()}))})),Hr=(n,r)=>n.naturalWidth>r?((n,r)=>{const t=Sr(n),[u,e]=$r(),o=Cr(r),[i,c]=t(o).map((n=>n.size)),f=new ImageData(i,c),a=(n=>{const{naturalWidth:r,naturalHeight:t}=n,[u,e]=$r();return u.width=r,u.height=t,e.drawImage(n,0,0),e.getImageData(0,0,r,t)})(r);return u.width=i,u.height=c,Pr.lanczos(a,f),e.putImageData(f,0,0),u.toDataURL()})(r,n):(n=>{const r=document.createElement("canvas"),{naturalWidth:t,naturalHeight:u}=n,e=r.getContext("2d");return r.width=t,r.height=u,e.drawImage(n,0,0,t,u),r.toDataURL()})(n),Gr=n=>k(n,or,G((n=>({headers:n})))),{state:Jr,onChange:Br}=_({campaignId:j.none,excluded:"",results:[],filters:[],cropperHandlers:[],detectedObjects:[],objectDetectionInProgress:!1,imageWidth:500,image:j.none,imageUrl:j.none,imageBounds:j.none,searchArea:j.none,resultsComponents:[],serverError:!1,loading:!1}),Kr=async n=>{var r,t;Jr.results=n.value,Jr.filters=(t=ar(n.filters),Object.entries(t).map((([n,r])=>({name:n,filters:r})))),Jr.rectangleSearchForm=n.searchArea,Jr.resetCategoryLink=null===(r=n.links)||void 0===r?void 0:r.clearFilters,Jr.loading=!1},Qr=n=>k(Gr(Jr.token),gn,En(vr(n))),Vr=async()=>{Jr.loading=!0,k(gr(Jr.imageBounds,Jr.searchArea),j.map((async([n,r])=>{const t=(u=n,n=>({x:n.x/u.width,y:n.y/u.height,width:n.width/u.width,height:n.height/u.height}))(r);var u;const e={width:t.width,height:t.height,left:t.x,top:t.y};return await k(Gr(Jr.token),gn,En(Or(Jr.rectangleSearchForm,e)),jn(Kr))()})))},Xr=n=>{Jr.loading=!0;const r=(n=>{const r=new FormData;return r.append("image",n),r})(n);return k(ir(or(Jr.token),$(r)),G((([n,r])=>({headers:n,body:r}))),gn,Wn((n=>((n,r=rn,t)=>{const u="search/session",o=e.pipe(r,an((()=>{const n=[];t&&n.push(t);const r=rr(n);return`${u}${r}`}),(n=>{const r=[];n&&r.push(`campaign-id=${n}`),t&&r.push(t);const e=rr(r);return`${u}${e}`})));return e.pipe(ir(Gn(),Qn),gn,En(Yn(o,n)))})(n,Jr.campaignId,Jr.excluded))),jn((n=>(Kr(n),(async n=>{Jr.objectDetectionInProgress=!0;const r={kind:"server",inner:"Can not get a link for objects detection"};var t;await k((t=n,k(t.links,vn,dn((n=>vn(n.detectedObjects))))),wn((()=>r)),Wn(Qr),jn((n=>Jr.detectedObjects=ar(n))))(),Jr.objectDetectionInProgress=!1})(n),Jr.loading=!1,n))),yn((n=>(Jr.serverError=!0,Jr.loading=!1,n))))},Yr=Jr;Br("activeIonLink",(async n=>{const r=n||Jr.resetCategoryLink;r&&(Jr.loading=!0,await k(Gr(Jr.token),gn,En(vr(r)),jn(Kr),yn((n=>({kind:"network error",inner:n}))))())})),Br("searchArea",(n=>{k(n,j.map((n=>{var r;Jr.cropperHandlers=[{position:dr(r=n),direction:sr.NorthWest},{position:pr.concat(dr(r),{x:r.width,y:0}),direction:sr.NorthEast},{position:pr.concat(dr(r),{x:0,y:r.height}),direction:sr.SouthWest},{position:pr.concat(dr(r),{x:r.width,y:r.height}),direction:sr.SouthEast}]})))})),Br("serverError",(()=>{Jr.loading=!1}));const Zr=n=>{Yr.image=j.some(n),Yr.imageUrl=j.some(n.src)},nt=async n=>{const r=(n=>e.pipe(n,j.fromNullable,An.fromOption((()=>_r)),An.chain(wr)))(n),t=(500,n=>e.pipe(n,Wr,Ln.map((n=>Hr(n,500))),Ln.chain(Fr)));const u=k(r,gn,_n(t)),o=await k(u,Wn(Xr))();return k(ir(o,r),G((([n,r])=>(async(n,r)=>{const t={image:await(async n=>({name:n.name,mediaType:n.type,value:await Mr(n)}))(r)},u=n.uploadHighResolutionImage;await k(Gr(Jr.token),gn,En(Or(u,t)))()})(n,r)))),await k(u,_n(Wr),jn(Zr))(),o};export{B as A,nt as B,X as C,gr as D,An as E,lr as F,Cr as G,Sr as H,m as N,j as O,s as S,Sn as T,O as _,e as a,Kn as b,En as c,en as d,fn as e,gn as f,Gn as g,z as h,Yr as i,rr as j,tr as k,jr as l,Yn as m,t as n,u as o,k as p,Cn as q,mr as r,W as s,q as t,ar as u,hr as v,Ir as w,Vr as x,cr as y,Dr as z}
|
|
1
|
+
import{a as n,f as r}from"./p-1e83e6ba.js";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(n,r,t){return n(t={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},t.exports),t.exports}var e=u((function(n,r){var u=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};function e(n){return n}function o(n){return function(){return n}}function i(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return r(n.apply(this,arguments))};case 3:return function(){return t(r(n.apply(this,arguments)))};case 4:return function(){return u(t(r(n.apply(this,arguments))))};case 5:return function(){return e(u(t(r(n.apply(this,arguments)))))};case 6:return function(){return o(e(u(t(r(n.apply(this,arguments))))))};case 7:return function(){return i(o(e(u(t(r(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(e(u(t(r(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(e(u(t(r(n.apply(this,arguments)))))))))}}}function c(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(r,"__esModule",{value:!0}),r.dual=r.getEndomorphismMonoid=r.not=r.SK=r.hole=r.pipe=r.untupled=r.tupled=r.absurd=r.decrement=r.increment=r.tuple=r.flow=r.flip=r.constVoid=r.constUndefined=r.constNull=r.constFalse=r.constTrue=r.constant=r.unsafeCoerce=r.identity=r.apply=r.getRing=r.getSemiring=r.getMonoid=r.getSemigroup=r.getBooleanAlgebra=void 0,r.getBooleanAlgebra=function(n){return function(){return{meet:function(r,t){return function(u){return n.meet(r(u),t(u))}},join:function(r,t){return function(u){return n.join(r(u),t(u))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(r,t){return function(u){return n.implies(r(u),t(u))}},not:function(r){return function(t){return n.not(r(t))}}}}},r.getSemigroup=function(n){return function(){return{concat:function(r,t){return function(u){return n.concat(r(u),t(u))}}}}},r.getMonoid=function(n){var t=(0,r.getSemigroup)(n);return function(){return{concat:t().concat,empty:function(){return n.empty}}}},r.getSemiring=function(n){return{add:function(r,t){return function(u){return n.add(r(u),t(u))}},zero:function(){return n.zero},mul:function(r,t){return function(u){return n.mul(r(u),t(u))}},one:function(){return n.one}}},r.getRing=function(n){var t=(0,r.getSemiring)(n);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(r,t){return function(u){return n.sub(r(u),t(u))}}}},r.apply=function(n){return function(r){return r(n)}},r.identity=e,r.unsafeCoerce=e,r.constant=o,r.constTrue=o(!0),r.constFalse=o(!1),r.constNull=o(null),r.constUndefined=o(void 0),r.constVoid=r.constUndefined,r.flip=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.length>1?n(r[1],r[0]):function(t){return n(t)(r[0])}}},r.flow=i,r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n},r.increment=function(n){return n+1},r.decrement=function(n){return n-1},r.absurd=c,r.tupled=function(n){return function(r){return n.apply(void 0,r)}},r.untupled=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return n(r)}},r.pipe=function(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}},r.hole=c,r.SK=function(n,r){return r},r.not=function(n){return function(r){return!n(r)}},r.getEndomorphismMonoid=function(){return{concat:function(n,r){return i(n,r)},empty:e}},r.dual=function(n,r){var t="number"==typeof n?function(r){return r.length>=n}:n;return function(){var n=Array.from(arguments);return t(arguments)?r.apply(this,n):function(t){return r.apply(void 0,u([t],n,!1))}}}})),o=u((function(n,r){var u=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.flatMapReader=r.flatMapTask=r.flatMapIO=r.flatMapEither=r.flatMapOption=r.flatMapNullable=r.liftOption=r.liftNullable=r.fromReadonlyNonEmptyArray=r.has=r.emptyRecord=r.emptyReadonlyArray=r.tail=r.head=r.isNonEmpty=r.singleton=r.right=r.left=r.isRight=r.isLeft=r.some=r.none=r.isSome=r.isNone=void 0,r.isNone=function(n){return"None"===n._tag},r.isSome=function(n){return"Some"===n._tag},r.none={_tag:"None"},r.some=function(n){return{_tag:"Some",value:n}},r.isLeft=function(n){return"Left"===n._tag},r.isRight=function(n){return"Right"===n._tag},r.left=function(n){return{_tag:"Left",left:n}},r.right=function(n){return{_tag:"Right",right:n}},r.singleton=function(n){return[n]},r.isNonEmpty=function(n){return n.length>0},r.head=function(n){return n[0]},r.tail=function(n){return n.slice(1)},r.emptyReadonlyArray=[],r.emptyRecord={},r.has=Object.prototype.hasOwnProperty,r.fromReadonlyNonEmptyArray=function(n){return u([n[0]],n.slice(1),!0)},r.liftNullable=function(n){return function(t,u){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=t.apply(void 0,e);return n.fromEither(null==i?(0,r.left)(u.apply(void 0,e)):(0,r.right)(i))}}},r.liftOption=function(n){return function(t,u){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=t.apply(void 0,e);return n.fromEither((0,r.isNone)(i)?(0,r.left)(u.apply(void 0,e)):(0,r.right)(i.value))}}},r.flatMapNullable=function(n,t){return(0,e.dual)(3,(function(u,e,o){return t.flatMap(u,(0,r.liftNullable)(n)(e,o))}))},r.flatMapOption=function(n,t){return(0,e.dual)(3,(function(u,e,o){return t.flatMap(u,(0,r.liftOption)(n)(e,o))}))},r.flatMapEither=function(n,r){return(0,e.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromEither(u(r))}))}))},r.flatMapIO=function(n,r){return(0,e.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromIO(u(r))}))}))},r.flatMapTask=function(n,r){return(0,e.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromTask(u(r))}))}))},r.flatMapReader=function(n,r){return(0,e.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromReader(u(r))}))}))}})),i=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),i=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),c=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return i(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.sequenceS=r.sequenceT=r.getApplySemigroup=r.apS=r.apSecond=r.apFirst=r.ap=void 0;var f=c(o);function a(n,r,t){return function(u){for(var e=Array(t.length+1),o=0;o<t.length;o++)e[o]=t[o];return e[t.length]=u,0===r?n.apply(null,e):a(n,r-1,e)}}r.ap=function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}},r.apFirst=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(n){return function(){return n}})),r)}}},r.apSecond=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(){return function(n){return n}})),r)}}},r.apS=function(n){return function(r,t){return function(u){return n.ap(n.map(u,(function(n){return function(t){var u;return Object.assign({},n,((u={})[r]=t,u))}})),t)}}},r.getApplySemigroup=function(n){return function(r){return{concat:function(t,u){return n.ap(n.map(t,(function(n){return function(t){return r.concat(n,t)}})),u)}}}};var v={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};r.sequenceT=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,o=function(n){return f.has.call(v,n)||(v[n]=a(e.tuple,n-1,[])),v[n]}(u),i=n.map(r[0],o),c=1;c<u;c++)i=n.ap(i,r[c]);return i}},r.sequenceS=function(n){return function(r){for(var t=Object.keys(r),u=t.length,e=function(n){var r=n.length;switch(r){case 1:return function(r){var t;return(t={})[n[0]]=r,t};case 2:return function(r){return function(t){var u;return(u={})[n[0]]=r,u[n[1]]=t,u}};case 3:return function(r){return function(t){return function(u){var e;return(e={})[n[0]]=r,e[n[1]]=t,e[n[2]]=u,e}}};case 4:return function(r){return function(t){return function(u){return function(e){var o;return(o={})[n[0]]=r,o[n[1]]=t,o[n[2]]=u,o[n[3]]=e,o}}}};case 5:return function(r){return function(t){return function(u){return function(e){return function(o){var i;return(i={})[n[0]]=r,i[n[1]]=t,i[n[2]]=u,i[n[3]]=e,i[n[4]]=o,i}}}}};default:return a((function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];for(var e={},o=0;o<r;o++)e[n[o]]=t[o];return e}),r-1,[])}}(t),o=n.map(r[t[0]],e),i=1;i<u;i++)o=n.ap(o,r[t[i]]);return o}}})),c=u((function(n,r){function t(n){return function(r,t){return n.chain(r,(function(r){return n.map(t(r),(function(){return r}))}))}}Object.defineProperty(r,"__esModule",{value:!0}),r.bind=r.tap=r.chainFirst=void 0,r.chainFirst=function(n){var r=t(n);return function(n){return function(t){return r(t,n)}}},r.tap=t,r.bind=function(n){return function(r,t){return function(u){return n.chain(u,(function(u){return n.map(t(u),(function(n){var t;return Object.assign({},u,((t={})[r]=n,t))}))}))}}}})),f=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),i=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),f=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return i(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.tapEither=r.filterOrElse=r.chainFirstEitherK=r.chainEitherK=r.fromEitherK=r.chainOptionK=r.fromOptionK=r.fromPredicate=r.fromOption=void 0;var a=f(o);function v(n){return function(r){return function(t){return n.fromEither(a.isNone(t)?a.left(r()):a.right(t.value))}}}function d(n){var r=v(n);return function(n){var t=r(n);return function(n){return(0,e.flow)(n,t)}}}function p(n){return function(r){return(0,e.flow)(r,n.fromEither)}}function s(n,r){var t=p(n),u=(0,c.tap)(r);return function(n,r){return u(n,t(r))}}r.fromOption=v,r.fromPredicate=function(n){return function(r,t){return function(u){return n.fromEither(r(u)?a.right(u):a.left(t(u)))}}},r.fromOptionK=d,r.chainOptionK=function(n,r){var t=d(n);return function(n){var u=t(n);return function(n){return function(t){return r.chain(t,u(n))}}}},r.fromEitherK=p,r.chainEitherK=function(n,r){var t=p(n);return function(n){return function(u){return r.chain(u,t(n))}}},r.chainFirstEitherK=function(n,r){var t=s(n,r);return function(n){return function(r){return t(r,n)}}},r.filterOrElse=function(n,r){return function(t,u){return function(e){return r.chain(e,(function(r){return n.fromEither(t(r)?a.right(r):a.left(u(r)))}))}}},r.tapEither=s})),a=u((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}function u(n){return function(r,t){return n.map(r,(function(){return t}))}}Object.defineProperty(r,"__esModule",{value:!0}),r.asUnit=r.as=r.getFunctorComposition=r.let=r.bindTo=r.flap=r.map=void 0,r.map=t,r.flap=function(n){return function(r){return function(t){return n.map(t,(function(n){return n(r)}))}}},r.bindTo=function(n){return function(r){return function(t){return n.map(t,(function(n){var t;return(t={})[r]=n,t}))}}},r.let=function(n){return function(r,t){return function(u){return n.map(u,(function(n){var u;return Object.assign({},n,((u={})[r]=t(n),u))}))}}},r.getFunctorComposition=function(n,r){var u=t(n,r);return{map:function(n,r){return(0,e.pipe)(n,u(r))}}},r.as=u,r.asUnit=function(n){var r=u(n);return function(n){return r(n,void 0)}}})),v=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.eqDate=r.eqNumber=r.eqString=r.eqBoolean=r.eq=r.strictEqual=r.getStructEq=r.getTupleEq=r.Contravariant=r.getMonoid=r.getSemigroup=r.eqStrict=r.URI=r.contramap=r.tuple=r.struct=r.fromEquals=void 0,r.fromEquals=function(n){return{equals:function(r,t){return r===t||n(r,t)}}},r.struct=function(n){return(0,r.fromEquals)((function(r,t){for(var u in n)if(!n[u].equals(r[u],t[u]))return!1;return!0}))},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return(0,r.fromEquals)((function(r,t){return n.every((function(n,u){return n.equals(r[u],t[u])}))}))},r.contramap=function(n){return function(t){return(0,r.fromEquals)((function(r,u){return t.equals(n(r),n(u))}))}},r.URI="Eq",r.eqStrict={equals:function(n,r){return n===r}};var t={equals:function(){return!0}};r.getSemigroup=function(){return{concat:function(n,t){return(0,r.fromEquals)((function(r,u){return n.equals(r,u)&&t.equals(r,u)}))}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:t}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,e.pipe)(n,(0,r.contramap)(t))}},r.getTupleEq=r.tuple,r.getStructEq=r.struct,r.strictEqual=r.eqStrict.equals,r.eq=r.Contravariant,r.eqBoolean=r.eqStrict,r.eqString=r.eqStrict,r.eqNumber=r.eqStrict,r.eqDate={equals:function(n,r){return n.valueOf()===r.valueOf()}}})),d=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ordDate=r.ordNumber=r.ordString=r.ordBoolean=r.ord=r.getDualOrd=r.getTupleOrd=r.between=r.clamp=r.max=r.min=r.geq=r.leq=r.gt=r.lt=r.equals=r.trivial=r.Contravariant=r.getMonoid=r.getSemigroup=r.URI=r.contramap=r.reverse=r.tuple=r.fromCompare=r.equalsDefault=void 0,r.equalsDefault=function(n){return function(r,t){return r===t||0===n(r,t)}},r.fromCompare=function(n){return{equals:(0,r.equalsDefault)(n),compare:function(r,t){return r===t?0:n(r,t)}}},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return(0,r.fromCompare)((function(r,t){for(var u=0;u<n.length-1;u++){var e=n[u].compare(r[u],t[u]);if(0!==e)return e}return n[u].compare(r[u],t[u])}))},r.reverse=function(n){return(0,r.fromCompare)((function(r,t){return n.compare(t,r)}))},r.contramap=function(n){return function(t){return(0,r.fromCompare)((function(r,u){return t.compare(n(r),n(u))}))}},r.URI="Ord",r.getSemigroup=function(){return{concat:function(n,t){return(0,r.fromCompare)((function(r,u){var e=n.compare(r,u);return 0!==e?e:t.compare(r,u)}))}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:(0,r.fromCompare)((function(){return 0}))}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,e.pipe)(n,(0,r.contramap)(t))}},r.trivial={equals:e.constTrue,compare:(0,e.constant)(0)},r.equals=function(n){return function(r){return function(t){return t===r||0===n.compare(t,r)}}},r.lt=function(n){return function(r,t){return-1===n.compare(r,t)}},r.gt=function(n){return function(r,t){return 1===n.compare(r,t)}},r.leq=function(n){return function(r,t){return 1!==n.compare(r,t)}},r.geq=function(n){return function(r,t){return-1!==n.compare(r,t)}},r.min=function(n){return function(r,t){return r===t||n.compare(r,t)<1?r:t}},r.max=function(n){return function(r,t){return r===t||n.compare(r,t)>-1?r:t}},r.clamp=function(n){var t=(0,r.min)(n),u=(0,r.max)(n);return function(n,r){return function(e){return u(t(e,r),n)}}},r.between=function(n){var t=(0,r.lt)(n),u=(0,r.gt)(n);return function(n,r){return function(e){return!t(e,n)&&!u(e,r)}}},r.getTupleOrd=r.tuple,r.getDualOrd=r.reverse,r.ord=r.Contravariant;var t={equals:v.eqStrict.equals,compare:function(n,r){return n<r?-1:n>r?1:0}};r.ordBoolean=t,r.ordString=t,r.ordNumber=t,r.ordDate=(0,e.pipe)(r.ordNumber,(0,r.contramap)((function(n){return n.valueOf()})))})),p=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.concatAll=r.endo=r.filterSecond=r.filterFirst=r.reverse=void 0,r.reverse=function(n){return{concat:function(r,t){return n.concat(t,r)}}},r.filterFirst=function(n){return function(r){return{concat:function(t,u){return n(t)?r.concat(t,u):u}}}},r.filterSecond=function(n){return function(r){return{concat:function(t,u){return n(u)?r.concat(t,u):t}}}},r.endo=function(n){return function(r){return{concat:function(t,u){return r.concat(n(t),n(u))}}}},r.concatAll=function(n){return function(r){return function(t){return t.reduce((function(r,t){return n.concat(r,t)}),r)}}}})),s=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),i=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),c=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return i(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.semigroupProduct=r.semigroupSum=r.semigroupString=r.getFunctionSemigroup=r.semigroupAny=r.semigroupAll=r.fold=r.getIntercalateSemigroup=r.getMeetSemigroup=r.getJoinSemigroup=r.getDualSemigroup=r.getStructSemigroup=r.getTupleSemigroup=r.getFirstSemigroup=r.getLastSemigroup=r.getObjectSemigroup=r.semigroupVoid=r.concatAll=r.last=r.first=r.intercalate=r.tuple=r.struct=r.reverse=r.constant=r.max=r.min=void 0;var f=c(o),a=c(p),v=c(d);r.min=function(n){return{concat:v.min(n)}},r.max=function(n){return{concat:v.max(n)}},r.constant=function(n){return{concat:function(){return n}}},r.reverse=a.reverse,r.struct=function(n){return{concat:function(r,t){var u={};for(var e in n)f.has.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{concat:function(r,t){return n.map((function(n,u){return n.concat(r[u],t[u])}))}}},r.intercalate=function(n){return function(r){return{concat:function(t,u){return r.concat(t,r.concat(n,u))}}}},r.first=function(){return{concat:e.identity}},r.last=function(){return{concat:function(n,r){return r}}},r.concatAll=a.concatAll,r.semigroupVoid=(0,r.constant)(void 0),r.getObjectSemigroup=function(){return{concat:function(n,r){return Object.assign({},n,r)}}},r.getLastSemigroup=r.last,r.getFirstSemigroup=r.first,r.getTupleSemigroup=r.tuple,r.getStructSemigroup=r.struct,r.getDualSemigroup=r.reverse,r.getJoinSemigroup=r.max,r.getMeetSemigroup=r.min,r.getIntercalateSemigroup=r.intercalate,r.fold=function(n){var t=(0,r.concatAll)(n);return function(n,r){return void 0===r?t(n):t(n)(r)}},r.semigroupAll={concat:function(n,r){return n&&r}},r.semigroupAny={concat:function(n,r){return n||r}},r.getFunctionSemigroup=e.getSemigroup,r.semigroupString={concat:function(n,r){return n+r}},r.semigroupSum={concat:function(n,r){return n+r}},r.semigroupProduct={concat:function(n,r){return n*r}}})),l=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),f=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),p=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return f(r,n),r},l=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.reduceRight=r.foldMap=r.reduce=r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.flatMap=r.ap=r.alt=r.altW=r.of=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.modifyAt=r.updateAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.fromArray=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromReadonlyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=r.empty=void 0,r.groupSort=r.chain=r.intercalate=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.let=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.foldMapWithIndex=r.reduceWithIndex=void 0,r.readonlyNonEmptyArray=r.fold=r.prependToAll=r.insertAt=r.snoc=r.cons=r.unsnoc=r.uncons=r.filterWithIndex=r.filter=void 0;var m=p(o),h=p(s);function I(n){return function(r){return r.concat(n)}}function R(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function b(n){return function(t){var u=t.length;if(0===u)return r.empty;for(var e=[],o=t[0],i=[o],c=1;c<u;c++){var f=t[c];n.equals(f,o)?i.push(f):(e.push(i),i=[o=f])}return e.push(i),e}}r.empty=m.emptyReadonlyArray,r.isNonEmpty=m.isNonEmpty,r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return l([n],r,!0)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return l(l([],r,!0),[n],!1)}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if((0,r.isNonEmpty)(u)){var e=m.fromReadonlyNonEmptyArray(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,r,t){if(t[n]===r)return t;var u=m.fromReadonlyNonEmptyArray(t);return u[n]=r,u},r.uniq=function(n){return function(t){if(1===t.length)return t;for(var u=[(0,r.head)(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=(0,r.tail)(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if((0,r.isNonEmpty)(n)){var t=(0,d.getMonoid)();return(0,r.sort)(n.reduce(t.concat,t.empty))}return e.identity},r.union=function(n){var t=(0,r.uniq)(n);return function(n){return function(r){return t((0,e.pipe)(r,R(n)))}}},r.rotate=function(n){return function(t){var u=t.length,o=Math.round(n)%u;if((0,r.isOutOfBound)(Math.abs(o),t)||0===o)return t;if(o<0){var i=(0,r.splitAt)(-o)(t);return(0,e.pipe)(i[1],R(i[0]))}return(0,r.rotate)(o-u)(t)}},r.fromReadonlyArray=function(n){return(0,r.isNonEmpty)(n)?m.some(n):m.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return(0,r.makeBy)((function(){return n}))},r.range=function(n,t){return n<=t?(0,r.makeBy)((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[(0,r.head)(n),(0,r.tail)(n)]},r.unappend=function(n){return[(0,r.init)(n),(0,r.last)(n)]},r.fromArray=function(n){return(0,r.fromReadonlyArray)(n.slice())},r.concatW=I,r.concat=R,r.reverse=function(n){return 1===n.length?n:l([(0,r.last)(n)],n.slice(0,-1).reverse(),!0)},r.group=b,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);m.has.call(t,i)?t[i].push(o):t[i]=[o]}return t}},r.sort=function(n){return function(r){return 1===r.length?r:r.slice().sort(n.compare)}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?m.none:m.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=(0,r.tail)(t);return(0,r.isNonEmpty)(u)?(0,e.pipe)(u,(0,r.prependAll)(n),(0,r.prepend)((0,r.head)(t))):t}},r.chainWithIndex=function(n){return function(t){for(var u=m.fromReadonlyNonEmptyArray(n(0,(0,r.head)(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];(0,r.isNonEmpty)(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[t,r.empty]:[(0,e.pipe)(t.slice(1,u),(0,r.prepend)((0,r.head)(t))),t.slice(u)]}},r.chunksOf=function(n){return(0,r.chop)((0,r.splitAt)(n))};var U=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},O=function(n,t){return(0,e.pipe)(n,(0,r.mapWithIndex)(t))},g=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},M=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},j=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},y=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},x=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},w=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},_=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},W=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceWithIndex)(t,u))},E=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},q=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},k=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}};r.of=m.singleton,r.altW=function(n){return function(r){return(0,e.pipe)(r,I(n()))}},r.alt=r.altW,r.ap=function(n){return(0,r.flatMap)((function(t){return(0,e.pipe)(n,(0,r.map)(t))}))},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,e.pipe)(n,(0,r.chainWithIndex)((function(n,r){return t(r,n)})))})),r.extend=function(n){return function(t){for(var u=(0,r.tail)(t),e=[n(t)];(0,r.isNonEmpty)(u);)e.push(n(u)),u=(0,r.tail)(u);return e}},r.duplicate=(0,r.extend)(e.identity),r.flatten=(0,r.flatMap)(e.identity),r.map=function(n){return(0,r.mapWithIndex)((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,(0,r.head)(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=function(n,t){return(0,r.reduceWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u){return n.concat(t,r(u))}),r(t[0]))}}},r.reduceRight=function(n,t){return(0,r.reduceRightWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.reduceWithIndex=function(n,r){return function(t){return t.reduce((function(n,t,u){return r(u,n,t)}),n)}},r.foldMapWithIndex=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u,e){return n.concat(t,r(e+1,u))}),r(0,t[0]))}}},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return(0,r.traverseWithIndex)(n)(e.SK)},r.traverseWithIndex=function(n){return function(t){return function(u){for(var o=n.map(t(0,(0,r.head)(u)),r.of),i=1;i<u.length;i++)o=n.ap(n.map(o,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),t(i,u[i]));return o}}},r.extract=m.head,r.URI="ReadonlyNonEmptyArray",r.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},r.getSemigroup=function(){return{concat:R}},r.getEq=function(n){return(0,v.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getUnionSemigroup=function(n){var t=(0,r.union)(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:U},r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:U,mapWithIndex:O},r.Apply={URI:r.URI,map:U,ap:g},r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:U,ap:g,of:r.of},r.Chain={URI:r.URI,map:U,ap:g,chain:r.flatMap},r.chainFirst=(0,c.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:U,ap:g,of:r.of,chain:r.flatMap},r.Foldable={URI:r.URI,reduce:j,foldMap:y,reduceRight:x},r.FoldableWithIndex={URI:r.URI,reduce:j,foldMap:y,reduceRight:x,reduceWithIndex:W,foldMapWithIndex:E,reduceRightWithIndex:q},r.Traversable={URI:r.URI,map:U,reduce:j,foldMap:y,reduceRight:x,traverse:w,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:U,mapWithIndex:O,reduce:j,foldMap:y,reduceRight:x,traverse:w,sequence:r.sequence,reduceWithIndex:W,foldMapWithIndex:E,reduceRightWithIndex:q,traverseWithIndex:k},r.Alt={URI:r.URI,map:U,alt:_},r.Comonad={URI:r.URI,map:U,extend:M,extract:r.extract},r.Do=(0,r.of)(m.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=(0,c.bind)(r.Chain),r.apS=(0,i.apS)(r.Apply),r.head=r.extract,r.tail=m.tail,r.last=function(n){return n[n.length-1]},r.init=function(n){return n.slice(0,-1)},r.min=function(n){var r=h.min(n);return function(n){return n.reduce(r.concat)}},r.max=function(n){var r=h.max(n);return function(n){return n.reduce(r.concat)}},r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n((0,r.head)(t),(0,r.tail)(t))}},r.matchRight=function(n){return function(t){return n((0,r.init)(t),(0,r.last)(t))}},r.modifyHead=function(n){return function(t){return l([n((0,r.head)(t))],(0,r.tail)(t),!0)}},r.updateHead=function(n){return(0,r.modifyHead)((function(){return n}))},r.modifyLast=function(n){return function(t){return(0,e.pipe)((0,r.init)(t),(0,r.append)(n((0,r.last)(t))))}},r.updateLast=function(n){return(0,r.modifyLast)((function(){return n}))},r.intercalate=function(n){var t=(0,r.concatAll)(n);return function(n){return(0,e.flow)((0,r.intersperse)(n),t)}},r.chain=r.flatMap,r.groupSort=function(n){var t=(0,r.sort)(n),u=b(n);return function(n){return(0,r.isNonEmpty)(n)?u(t(n)):r.empty}},r.filter=function(n){return(0,r.filterWithIndex)((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return(0,r.fromReadonlyArray)(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?(0,r.prepend)(n):(0,e.pipe)(t,(0,r.prepend)(n))},r.snoc=function(n,r){return(0,e.pipe)(n,R([r]))},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?m.none:m.some((0,r.unsafeInsertAt)(n,t,u))}},r.prependToAll=r.prependAll,r.fold=r.concatAll,r.readonlyNonEmptyArray={URI:r.URI,of:r.of,map:U,mapWithIndex:O,ap:g,chain:r.flatMap,extend:M,extract:r.extract,reduce:j,foldMap:y,reduceRight:x,traverse:w,sequence:r.sequence,reduceWithIndex:W,foldMapWithIndex:E,reduceRightWithIndex:q,traverseWithIndex:k,alt:_}})),m=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),f=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),v=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return f(r,n),r},p=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.flatMap=r.ap=r.alt=r.altW=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.foldMap=r.foldMapWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.of=r.copy=r.modifyAt=r.updateAt=r.insertAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromArray=r.fromReadonlyNonEmptyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=void 0,r.chain=r.intercalate=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.let=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=void 0,r.nonEmptyArray=r.fold=r.prependToAll=r.snoc=r.cons=r.unsnoc=r.uncons=r.filterWithIndex=r.filter=r.groupSort=void 0;var s=v(o),m=v(l);function h(n){return function(r){return r.concat(n)}}function I(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function R(n){return function(r){var t=r.length;if(0===t)return[];for(var u=[],e=r[0],o=[e],i=1;i<t;i++){var c=r[i];n.equals(c,e)?o.push(c):(u.push(o),o=[e=c])}return u.push(o),u}}r.isNonEmpty=function(n){return n.length>0},r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return p([n],r,!0)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return p(p([],r,!0),[n],!1)}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if((0,r.isNonEmpty)(u)){var e=(0,r.fromReadonlyNonEmptyArray)(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,t,u){var e=(0,r.fromReadonlyNonEmptyArray)(u);return e[n]=t,e},r.uniq=function(n){return function(t){if(1===t.length)return(0,r.copy)(t);for(var u=[(0,r.head)(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=(0,r.tail)(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if((0,r.isNonEmpty)(n)){var t=(0,d.getMonoid)();return(0,r.sort)(n.reduce(t.concat,t.empty))}return r.copy},r.union=function(n){var t=(0,r.uniq)(n);return function(n){return function(r){return t((0,e.pipe)(r,I(n)))}}},r.rotate=function(n){return function(t){var u=t.length,o=Math.round(n)%u;if((0,r.isOutOfBound)(Math.abs(o),t)||0===o)return(0,r.copy)(t);if(o<0){var i=(0,r.splitAt)(-o)(t);return(0,e.pipe)(i[1],I(i[0]))}return(0,r.rotate)(o-u)(t)}},r.fromReadonlyNonEmptyArray=s.fromReadonlyNonEmptyArray,r.fromArray=function(n){return(0,r.isNonEmpty)(n)?s.some(n):s.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return(0,r.makeBy)((function(){return n}))},r.range=function(n,t){return n<=t?(0,r.makeBy)((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[(0,r.head)(n),(0,r.tail)(n)]},r.unappend=function(n){return[(0,r.init)(n),(0,r.last)(n)]},r.concatW=h,r.concat=I,r.reverse=function(n){return p([(0,r.last)(n)],n.slice(0,-1).reverse(),!0)},r.group=R,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);s.has.call(t,i)?t[i].push(o):t[i]=[o]}return t}},r.sort=function(n){return function(r){return r.slice().sort(n.compare)}},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?s.none:s.some((0,r.unsafeInsertAt)(n,t,u))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?s.none:s.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.copy=r.fromReadonlyNonEmptyArray,r.of=function(n){return[n]},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=(0,r.tail)(t);return(0,r.isNonEmpty)(u)?(0,e.pipe)(u,(0,r.prependAll)(n),(0,r.prepend)((0,r.head)(t))):(0,r.copy)(t)}},r.foldMapWithIndex=m.foldMapWithIndex,r.foldMap=m.foldMap,r.chainWithIndex=function(n){return function(t){for(var u=(0,r.fromReadonlyNonEmptyArray)(n(0,(0,r.head)(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];(0,r.isNonEmpty)(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[(0,r.copy)(t),[]]:[(0,e.pipe)(t.slice(1,u),(0,r.prepend)((0,r.head)(t))),t.slice(u)]}},r.chunksOf=function(n){return(0,r.chop)((0,r.splitAt)(n))};var b=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},U=function(n,t){return(0,e.pipe)(n,(0,r.mapWithIndex)(t))},O=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},g=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},M=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},j=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},y=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},x=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},w=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},_=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceWithIndex)(t,u))},W=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},E=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},q=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}};r.altW=function(n){return function(r){return(0,e.pipe)(r,h(n()))}},r.alt=r.altW,r.ap=function(n){return(0,r.flatMap)((function(t){return(0,e.pipe)(n,(0,r.map)(t))}))},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,e.pipe)(n,(0,r.chainWithIndex)((function(n,r){return t(r,n)})))})),r.extend=function(n){return function(t){for(var u=(0,r.tail)(t),e=[n(t)];(0,r.isNonEmpty)(u);)e.push(n(u)),u=(0,r.tail)(u);return e}},r.duplicate=(0,r.extend)(e.identity),r.flatten=(0,r.flatMap)(e.identity),r.map=function(n){return(0,r.mapWithIndex)((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,(0,r.head)(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=m.reduce,r.reduceWithIndex=m.reduceWithIndex,r.reduceRight=m.reduceRight,r.reduceRightWithIndex=m.reduceRightWithIndex,r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return(0,r.traverseWithIndex)(n)((function(n,r){return r}))},r.traverseWithIndex=function(n){return function(t){return function(u){for(var o=n.map(t(0,(0,r.head)(u)),r.of),i=1;i<u.length;i++)o=n.ap(n.map(o,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),t(i,u[i]));return o}}},r.extract=m.head,r.URI="NonEmptyArray",r.getShow=m.getShow,r.getSemigroup=function(){return{concat:I}},r.getEq=m.getEq,r.getUnionSemigroup=function(n){var t=(0,r.union)(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:b},r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:b,mapWithIndex:U},r.Apply={URI:r.URI,map:b,ap:O},r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:b,ap:O,of:r.of},r.Chain={URI:r.URI,map:b,ap:O,chain:r.flatMap},r.chainFirst=(0,c.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:b,ap:O,of:r.of,chain:r.flatMap},r.Foldable={URI:r.URI,reduce:M,foldMap:j,reduceRight:y},r.FoldableWithIndex={URI:r.URI,reduce:M,foldMap:j,reduceRight:y,reduceWithIndex:_,foldMapWithIndex:W,reduceRightWithIndex:E},r.Traversable={URI:r.URI,map:b,reduce:M,foldMap:j,reduceRight:y,traverse:x,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:b,mapWithIndex:U,reduce:M,foldMap:j,reduceRight:y,traverse:x,sequence:r.sequence,reduceWithIndex:_,foldMapWithIndex:W,reduceRightWithIndex:E,traverseWithIndex:q},r.Alt={URI:r.URI,map:b,alt:w},r.Comonad={URI:r.URI,map:b,extend:g,extract:r.extract},r.Do=(0,r.of)(s.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=(0,c.bind)(r.Chain),r.apS=(0,i.apS)(r.Apply),r.head=m.head,r.tail=function(n){return n.slice(1)},r.last=m.last,r.init=function(n){return n.slice(0,-1)},r.min=m.min,r.max=m.max,r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n((0,r.head)(t),(0,r.tail)(t))}},r.matchRight=function(n){return function(t){return n((0,r.init)(t),(0,r.last)(t))}},r.modifyHead=function(n){return function(t){return p([n((0,r.head)(t))],(0,r.tail)(t),!0)}},r.updateHead=function(n){return(0,r.modifyHead)((function(){return n}))},r.modifyLast=function(n){return function(t){return(0,e.pipe)((0,r.init)(t),(0,r.append)(n((0,r.last)(t))))}},r.updateLast=function(n){return(0,r.modifyLast)((function(){return n}))},r.intercalate=m.intercalate,r.chain=r.flatMap,r.groupSort=function(n){var t=(0,r.sort)(n),u=R(n);return function(n){return(0,r.isNonEmpty)(n)?u(t(n)):[]}},r.filter=function(n){return(0,r.filterWithIndex)((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return(0,r.fromArray)(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?(0,r.prepend)(n):(0,e.pipe)(t,(0,r.prepend)(n))},r.snoc=function(n,t){return(0,e.pipe)(n,(0,r.append)(t))},r.prependToAll=r.prependAll,r.fold=m.concatAll,r.nonEmptyArray={URI:r.URI,of:r.of,map:b,mapWithIndex:U,ap:O,chain:r.flatMap,extend:g,extract:r.extract,reduce:M,foldMap:j,reduceRight:y,traverse:x,sequence:r.sequence,reduceWithIndex:_,foldMapWithIndex:W,reduceRightWithIndex:E,traverseWithIndex:q,alt:w}})),h=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Field=r.MonoidProduct=r.MonoidSum=r.SemigroupProduct=r.SemigroupSum=r.MagmaSub=r.Show=r.Bounded=r.Ord=r.Eq=r.isNumber=void 0,r.isNumber=function(n){return"number"==typeof n},r.Eq={equals:function(n,r){return n===r}},r.Ord={equals:r.Eq.equals,compare:function(n,r){return n<r?-1:n>r?1:0}},r.Bounded={equals:r.Eq.equals,compare:r.Ord.compare,top:1/0,bottom:-1/0},r.Show={show:function(n){return JSON.stringify(n)}},r.MagmaSub={concat:function(n,r){return n-r}},r.SemigroupSum={concat:function(n,r){return n+r}},r.SemigroupProduct={concat:function(n,r){return n*r}},r.MonoidSum={concat:r.SemigroupSum.concat,empty:0},r.MonoidProduct={concat:r.SemigroupProduct.concat,empty:1},r.Field={add:r.SemigroupSum.concat,zero:0,mul:r.SemigroupProduct.concat,one:1,sub:r.MagmaSub.concat,degree:function(){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}})),I=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.right=r.left=r.flap=r.Functor=r.Bifunctor=r.URI=r.bimap=r.mapLeft=r.map=r.separated=void 0,r.separated=function(n,r){return{left:n,right:r}},r.map=function(n){return function(t){return(0,r.separated)((0,r.left)(t),n((0,r.right)(t)))}},r.mapLeft=function(n){return function(t){return(0,r.separated)(n((0,r.left)(t)),(0,r.right)(t))}},r.bimap=function(n,t){return function(u){return(0,r.separated)(n((0,r.left)(u)),t((0,r.right)(u)))}},r.URI="Separated",r.Bifunctor={URI:r.URI,mapLeft:function(n,t){return(0,e.pipe)(n,(0,r.mapLeft)(t))},bimap:function(n,t,u){return(0,e.pipe)(n,(0,r.bimap)(t,u))}},r.Functor={URI:r.URI,map:function(n,t){return(0,e.pipe)(n,(0,r.map)(t))}},r.flap=(0,a.flap)(r.Functor),r.left=function(n){return n.left},r.right=function(n){return n.right}})),R=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),e=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),i=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return e(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.filterE=r.witherDefault=r.wiltDefault=void 0;var c=i(o);r.wiltDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.separate)}}},r.witherDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.compact)}}},r.filterE=function(n){return function(r){var t=n.wither(r);return function(n){return function(u){return t(u,(function(t){return r.map(n(t),(function(n){return n?c.some(t):c.none}))}))}}}}})),b=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.guard=void 0,r.guard=function(n,r){return function(t){return t?r.of(void 0):n.zero()}}})),U=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),p=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),s=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return p(r,n),r},m=t&&t.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.sort=r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.foldMap=r.reduce=r.foldMapWithIndex=r.duplicate=r.extend=r.filterWithIndex=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.compact=r.filterMap=r.filterMapWithIndex=r.filter=r.separate=r.mapWithIndex=r.map=r.flatten=r.flatMap=r.ap=r.alt=r.altW=r.zero=r.of=r._chainRecBreadthFirst=r._chainRecDepthFirst=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=void 0,r.toArray=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.Witherable=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.chainFirst=r.Monad=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=r.traverseWithIndex=void 0,r.readonlyArray=r.prependToAll=r.snoc=r.cons=r.range=r.chain=r.apS=r.bind=r.let=r.bindTo=r.Do=r.intercalate=r.exists=r.some=r.every=r.empty=r.fromArray=void 0;var U=s(o),O=s(h),g=s(l);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=g.isNonEmpty,r.prepend=g.prepend,r.prependW=g.prependW,r.append=g.append,r.appendW=g.appendW,r.makeBy=function(n,t){return n<=0?r.empty:g.makeBy(t)(n)},r.replicate=function(n,t){return(0,r.makeBy)(n,(function(){return t}))},r.fromPredicate=function(n){return function(t){return n(t)?[t]:r.empty}},r.fromOption=function(n){return U.isNone(n)?r.empty:[n.value]},r.fromEither=function(n){return U.isLeft(n)?r.empty:[n.right]},r.matchW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(g.head(u),g.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(g.init(u),g.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(t){if((0,r.isEmpty)(t))return r.empty;for(var u=[],e=0;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=g.isOutOfBound,r.lookup=function n(t,u){return void 0===u?function(r){return n(t,r)}:(0,r.isOutOfBound)(t,u)?U.none:U.some(u[t])},r.head=function(n){return(0,r.isNonEmpty)(n)?U.some(g.head(n)):U.none},r.last=function(n){return(0,r.isNonEmpty)(n)?U.some(g.last(n)):U.none},r.tail=function(n){return(0,r.isNonEmpty)(n)?U.some(g.tail(n)):U.none},r.init=function(n){return(0,r.isNonEmpty)(n)?U.some(g.init(n)):U.none},r.takeLeft=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?t:0===n?r.empty:t.slice(0,n)}},r.takeRight=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?t:0===n?r.empty:t.slice(-n)}},r.takeLeftWhile=function(n){return function(t){for(var u=[],e=0,o=t;e<o.length;e++){var i=o[e];if(!n(i))break;u.push(i)}var c=u.length;return c===t.length?t:0===c?r.empty:u}};var M=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function j(n){return function(r,t){if(void 0===t){var u=j(n);return function(n){return u(r,n)}}for(var e=0;e<t.length;e++)if(n.equals(t[e],r))return!0;return!1}}function y(n){var t=g.union(n);return function(u,e){if(void 0===e){var o=y(n);return function(n){return o(n,u)}}return(0,r.isNonEmpty)(u)&&(0,r.isNonEmpty)(e)?t(e)(u):(0,r.isNonEmpty)(u)?u:e}}function x(n){var r=j(n);return function(t,u){if(void 0===u){var e=x(n);return function(n){return e(n,t)}}return t.filter((function(n){return r(n,u)}))}}function w(n){var r=j(n);return function(t,u){if(void 0===u){var e=w(n);return function(n){return e(n,t)}}return t.filter((function(n){return!r(n,u)}))}}r.spanLeft=function(n){return function(t){var u=(0,r.splitAt)(M(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?t:n>=t.length?r.empty:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?t:n>=t.length?r.empty:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(t){var u=M(t,n);return 0===u?t:u===t.length?r.empty:t.slice(u)}},r.findIndex=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return U.some(t);return U.none}},r.findFirst=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return U.some(r[t]);return U.none}},r.findFirstMap=function(n){return function(r){for(var t=0;t<r.length;t++){var u=n(r[t]);if(U.isSome(u))return u}return U.none}},r.findLast=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return U.some(r[t]);return U.none}},r.findLastMap=function(n){return function(r){for(var t=r.length-1;t>=0;t--){var u=n(r[t]);if(U.isSome(u))return u}return U.none}},r.findLastIndex=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return U.some(t);return U.none}},r.insertAt=function(n,r){return function(t){return n<0||n>t.length?U.none:U.some(g.unsafeInsertAt(n,r,t))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?U.none:U.some((0,r.unsafeDeleteAt)(n,t))}},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?U.none:U.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.reverse=function(n){return n.length<=1?n:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(r){return r.length<=1?r:r.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=g.prependAll(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.intersperse=function(n){var t=g.intersperse(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.rotate=function(n){var t=g.rotate(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.elem=j,r.uniq=function(n){var t=g.uniq(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.sortBy=function(n){var t=g.sortBy(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.chop=function(n){var t=g.chop(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):r.empty}},r.splitAt=function(n){return function(t){return n>=1&&(0,r.isNonEmpty)(t)?g.splitAt(n)(t):(0,r.isEmpty)(t)?[t,r.empty]:[r.empty,t]}},r.chunksOf=function(n){var t=g.chunksOf(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):r.empty}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.fromOption)(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var o=function(n,i){return(0,r.isNonEmpty)(i)?(0,r.flatMap)(g.head(i),(function(t){return o((0,e.pipe)(n,(0,r.append)(t)),g.tail(i))})):u.apply(void 0,n)?[t.apply(void 0,n)]:r.empty};return o(r.empty,n)},r.concatW=function(n){return function(t){return(0,r.isEmpty)(t)?n:(0,r.isEmpty)(n)?t:t.concat(n)}},r.concat=r.concatW,r.union=y,r.intersection=x,r.difference=w;var _=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},W=function(n,t){return(0,e.pipe)(n,(0,r.mapWithIndex)(t))},E=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},q=function(n,t){return(0,e.pipe)(n,(0,r.filter)(t))},k=function(n,t){return(0,e.pipe)(n,(0,r.filterMap)(t))},A=function(n,t){return(0,e.pipe)(n,(0,r.partition)(t))},P=function(n,t){return(0,e.pipe)(n,(0,r.partitionMap)(t))},T=function(n,t){return(0,e.pipe)(n,(0,r.partitionWithIndex)(t))},N=function(n,t){return(0,e.pipe)(n,(0,r.partitionMapWithIndex)(t))},z=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},L=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},S=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},C=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},$=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceWithIndex)(t,u))},D=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},F=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},H=function(n,t){return(0,e.pipe)(n,(0,r.filterMapWithIndex)(t))},G=function(n,t){return(0,e.pipe)(n,(0,r.filterWithIndex)(t))},J=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},B=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},K=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}};r._chainRecDepthFirst=function(n,t){return(0,e.pipe)(n,(0,r.chainRecDepthFirst)(t))},r._chainRecBreadthFirst=function(n,t){return(0,e.pipe)(n,(0,r.chainRecBreadthFirst)(t))},r.of=g.of,r.zero=function(){return r.empty},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.ap=function(n){return(0,r.flatMap)((function(t){return(0,e.pipe)(n,(0,r.map)(t))}))},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,e.pipe)(n,(0,r.chainWithIndex)((function(n,r){return t(r,n)})))})),r.flatten=(0,r.flatMap)(e.identity),r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return(0,I.separated)(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);U.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return(0,r.filterMapWithIndex)((function(r,t){return n(t)}))},r.compact=(0,r.filterMap)(e.identity),r.partition=function(n){return(0,r.partitionWithIndex)((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return(0,I.separated)(t,u)}},r.partitionMap=function(n){return(0,r.partitionMapWithIndex)((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return(0,I.separated)(t,u)}},r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=(0,r.extend)(e.identity),r.foldMapWithIndex=function(n){return function(r){return function(t){return t.reduce((function(t,u,e){return n.concat(t,r(e,u))}),n.empty)}}},r.reduce=function(n,t){return(0,r.reduceWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.reduceWithIndex=function(n,r){return function(t){for(var u=t.length,e=n,o=0;o<u;o++)e=r(o,e,t[o]);return e}},r.reduceRight=function(n,t){return(0,r.reduceRightWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return L(t,n.of((0,r.zero)()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return(0,r.reduceWithIndex)(n.of((0,r.zero)()),(function(u,o,i){return n.ap(n.map(o,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),t(u,i))}))}},r.wither=function(n){var r=Q(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=V(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!U.isSome(e))break;var o=e.value,i=o[1];t.push(o[0]),u=i}return t},r.URI="ReadonlyArray",r.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},r.getSemigroup=function(){return{concat:function(n,t){return(0,r.isEmpty)(n)?t:(0,r.isEmpty)(t)?n:n.concat(t)}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:r.empty}},r.getEq=function(n){return(0,v.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getOrd=function(n){return(0,d.fromCompare)((function(r,t){for(var u=r.length,e=t.length,o=Math.min(u,e),i=0;i<o;i++){var c=n.compare(r[i],t[i]);if(0!==c)return c}return O.Ord.compare(u,e)}))},r.getUnionSemigroup=function(n){var r=y(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:(0,r.getUnionSemigroup)(n).concat,empty:r.empty}},r.getIntersectionSemigroup=function(n){var r=x(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=w(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:_},r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:_,mapWithIndex:W},r.Apply={URI:r.URI,map:_,ap:E},r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:_,ap:E,of:r.of},r.Chain={URI:r.URI,map:_,ap:E,chain:r.flatMap},r.Monad={URI:r.URI,map:_,ap:E,of:r.of,chain:r.flatMap},r.chainFirst=(0,c.chainFirst)(r.Chain),r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:_,alt:z},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,b.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:_,ap:E,of:r.of,alt:z,zero:r.zero},r.Extend={URI:r.URI,map:_,extend:J},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:_,compact:r.compact,separate:r.separate,filter:q,filterMap:k,partition:A,partitionMap:P},r.FilterableWithIndex={URI:r.URI,map:_,mapWithIndex:W,compact:r.compact,separate:r.separate,filter:q,filterMap:k,partition:A,partitionMap:P,partitionMapWithIndex:N,partitionWithIndex:T,filterMapWithIndex:H,filterWithIndex:G},r.Foldable={URI:r.URI,reduce:L,foldMap:S,reduceRight:C},r.FoldableWithIndex={URI:r.URI,reduce:L,foldMap:S,reduceRight:C,reduceWithIndex:$,foldMapWithIndex:D,reduceRightWithIndex:F},r.Traversable={URI:r.URI,map:_,reduce:L,foldMap:S,reduceRight:C,traverse:B,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:_,mapWithIndex:W,reduce:L,foldMap:S,reduceRight:C,reduceWithIndex:$,foldMapWithIndex:D,reduceRightWithIndex:F,traverse:B,sequence:r.sequence,traverseWithIndex:K},r.chainRecDepthFirst=function(n){return function(r){for(var t=m([],n(r),!0),u=[];t.length>0;){var e=t.shift();U.isLeft(e)?t.unshift.apply(t,n(e.left)):u.push(e.right)}return u}},r.ChainRecDepthFirst={URI:r.URI,map:_,ap:E,chain:r.flatMap,chainRec:r._chainRecDepthFirst},r.chainRecBreadthFirst=function(n){return function(r){var t=n(r),u=[],e=[];function o(r){U.isLeft(r)?n(r.left).forEach((function(n){return u.push(n)})):e.push(r.right)}for(var i=0,c=t;i<c.length;i++)o(c[i]);for(;u.length>0;)o(u.shift());return e}},r.ChainRecBreadthFirst={URI:r.URI,map:_,ap:E,chain:r.flatMap,chainRec:r._chainRecBreadthFirst};var Q=(0,R.witherDefault)(r.Traversable,r.Compactable),V=(0,R.wiltDefault)(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:_,compact:r.compact,separate:r.separate,filter:q,filterMap:k,partition:A,partitionMap:P,reduce:L,foldMap:S,reduceRight:C,traverse:B,sequence:r.sequence,wither:Q,wilt:V},r.filterE=(0,R.filterE)(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=(0,f.fromEitherK)(r.FromEither),r.unsafeInsertAt=g.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return(0,r.isNonEmpty)(u)?g.unsafeUpdateAt(n,t,u):u},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.toArray=function(n){return n.slice()},r.fromArray=function(n){return(0,r.isEmpty)(n)?r.empty:n.slice()},r.empty=g.empty,r.every=function(n){return function(r){return r.every(n)}},r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.intercalate=function(n){var t=g.intercalate(n);return function(u){return(0,r.match)((function(){return n.empty}),t(u))}},r.Do=(0,r.of)(U.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=(0,c.bind)(r.Chain),r.apS=(0,i.apS)(r.Apply),r.chain=r.flatMap,r.range=g.range,r.cons=g.cons,r.snoc=g.snoc,r.prependToAll=r.prependAll,r.readonlyArray={URI:r.URI,compact:r.compact,separate:r.separate,map:_,ap:E,of:r.of,chain:r.flatMap,filter:q,filterMap:k,partition:A,partitionMap:P,mapWithIndex:W,partitionMapWithIndex:N,partitionWithIndex:T,filterMapWithIndex:H,filterWithIndex:G,alt:z,zero:r.zero,unfold:r.unfold,reduce:L,foldMap:S,reduceRight:C,traverse:B,sequence:r.sequence,reduceWithIndex:$,foldMapWithIndex:D,reduceRightWithIndex:F,traverseWithIndex:K,extend:J,wither:Q,wilt:V}})),O=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return v(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.copy=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=r.foldMapWithIndex=r.foldMap=r.duplicate=r.extend=r.filterWithIndex=r.alt=r.altW=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.filter=r.separate=r.compact=r.filterMap=r.filterMapWithIndex=r.mapWithIndex=r.flatten=r.flatMap=r.ap=r.map=r.zero=r.of=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.sort=void 0,r.some=r.every=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.Witherable=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=void 0,r.array=r.prependToAll=r.snoc=r.cons=r.empty=r.range=r.chain=r.apS=r.bind=r.let=r.bindTo=r.Do=r.intercalate=r.exists=void 0;var p=d(o),s=d(m),l=d(U);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=s.isNonEmpty,r.prepend=s.prepend,r.prependW=s.prependW,r.append=s.append,r.appendW=s.appendW,r.makeBy=function(n,r){return n<=0?[]:s.makeBy(r)(n)},r.replicate=function(n,t){return(0,r.makeBy)(n,(function(){return t}))},r.fromPredicate=function(n){return function(r){return n(r)?[r]:[]}},r.fromOption=function(n){return p.isNone(n)?[]:[n.value]},r.fromEither=function(n){return p.isLeft(n)?[]:[n.right]},r.matchW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(s.head(u),s.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(s.init(u),s.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=s.isOutOfBound,r.lookup=l.lookup,r.head=l.head,r.last=l.last,r.tail=function(n){return(0,r.isNonEmpty)(n)?p.some(s.tail(n)):p.none},r.init=function(n){return(0,r.isNonEmpty)(n)?p.some(s.init(n)):p.none},r.takeLeft=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?(0,r.copy)(t):t.slice(0,n)}},r.takeRight=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?(0,r.copy)(t):0===n?[]:t.slice(-n)}},r.takeLeftWhile=function(n){return function(r){for(var t=[],u=0,e=r;u<e.length;u++){var o=e[u];if(!n(o))break;t.push(o)}return t}};var h=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function O(n){var t=s.union(n);return function(u,e){if(void 0===e){var o=O(n);return function(n){return o(n,u)}}return(0,r.isNonEmpty)(u)&&(0,r.isNonEmpty)(e)?t(e)(u):(0,r.isNonEmpty)(u)?(0,r.copy)(u):(0,r.copy)(e)}}function g(n){var t=(0,r.elem)(n);return function(r,u){if(void 0===u){var e=g(n);return function(n){return e(n,r)}}return r.filter((function(n){return t(n,u)}))}}function M(n){var t=(0,r.elem)(n);return function(r,u){if(void 0===u){var e=M(n);return function(n){return e(n,r)}}return r.filter((function(n){return!t(n,u)}))}}r.spanLeft=function(n){return function(t){var u=(0,r.splitAt)(h(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?(0,r.copy)(t):n>=t.length?[]:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?(0,r.copy)(t):n>=t.length?[]:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(r){return r.slice(h(r,n))}},r.findIndex=l.findIndex,r.findFirst=function(n){return l.findFirst(n)},r.findFirstMap=l.findFirstMap,r.findLast=function(n){return l.findLast(n)},r.findLastMap=l.findLastMap,r.findLastIndex=l.findLastIndex,r.copy=function(n){return n.slice()},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?p.none:p.some((0,r.unsafeInsertAt)(n,t,u))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?p.none:p.some((0,r.unsafeDeleteAt)(n,t))}},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?p.none:p.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.reverse=function(n){return(0,r.isEmpty)(n)?[]:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(t){return t.length<=1?(0,r.copy)(t):t.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=s.prependAll(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.intersperse=function(n){var t=s.intersperse(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.rotate=function(n){var t=s.rotate(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.elem=l.elem,r.uniq=function(n){var t=s.uniq(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.sortBy=function(n){var t=s.sortBy(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.chop=function(n){var t=s.chop(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.splitAt=function(n){return function(t){return n>=1&&(0,r.isNonEmpty)(t)?s.splitAt(n)(t):(0,r.isEmpty)(t)?[(0,r.copy)(t),[]]:[[],(0,r.copy)(t)]}},r.chunksOf=function(n){var t=s.chunksOf(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.fromOption)(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var o=function(n,i){return(0,r.isNonEmpty)(i)?(0,r.flatMap)(s.head(i),(function(t){return o((0,e.pipe)(n,(0,r.append)(t)),s.tail(i))})):u.apply(void 0,n)?[t.apply(void 0,n)]:[]};return o([],n)},r.concatW=function(n){return function(t){return(0,r.isEmpty)(t)?(0,r.copy)(n):(0,r.isEmpty)(n)?(0,r.copy)(t):t.concat(n)}},r.concat=r.concatW,r.union=O,r.intersection=g,r.difference=M;var j=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},y=function(n,t){return(0,e.pipe)(n,(0,r.mapWithIndex)(t))},x=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},w=function(n,t){return(0,e.pipe)(n,(0,r.filter)(t))},_=function(n,t){return(0,e.pipe)(n,(0,r.filterMap)(t))},W=function(n,t){return(0,e.pipe)(n,(0,r.partition)(t))},E=function(n,t){return(0,e.pipe)(n,(0,r.partitionMap)(t))},q=function(n,t){return(0,e.pipe)(n,(0,r.partitionWithIndex)(t))},k=function(n,t){return(0,e.pipe)(n,(0,r.partitionMapWithIndex)(t))},A=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},P=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},T=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},N=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},z=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceWithIndex)(t,u))},L=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},S=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},C=function(n,t){return(0,e.pipe)(n,(0,r.filterMapWithIndex)(t))},$=function(n,t){return(0,e.pipe)(n,(0,r.filterWithIndex)(t))},D=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},F=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},H=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},G=l._chainRecDepthFirst,J=l._chainRecBreadthFirst;r.of=s.of,r.zero=function(){return[]},r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.ap=function(n){return(0,r.flatMap)((function(t){return(0,e.pipe)(n,(0,r.map)(t))}))},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,e.pipe)(n,(0,r.chainWithIndex)((function(n,r){return t(r,n)})))})),r.flatten=(0,r.flatMap)(e.identity),r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);p.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return(0,r.filterMapWithIndex)((function(r,t){return n(t)}))},r.compact=(0,r.filterMap)(e.identity),r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return(0,I.separated)(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.partition=function(n){return(0,r.partitionWithIndex)((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return(0,I.separated)(t,u)}},r.partitionMap=function(n){return(0,r.partitionMapWithIndex)((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return(0,I.separated)(t,u)}},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=(0,r.extend)(e.identity),r.foldMap=l.foldMap,r.foldMapWithIndex=l.foldMapWithIndex,r.reduce=l.reduce,r.reduceWithIndex=l.reduceWithIndex,r.reduceRight=l.reduceRight,r.reduceRightWithIndex=l.reduceRightWithIndex,r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return P(t,n.of((0,r.zero)()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return(0,r.reduceWithIndex)(n.of((0,r.zero)()),(function(u,o,i){return n.ap(n.map(o,(function(n){return function(t){return(0,e.pipe)(n,(0,r.append)(t))}})),t(u,i))}))}},r.wither=function(n){var r=B(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=K(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!p.isSome(e))break;var o=e.value,i=o[1];t.push(o[0]),u=i}return t},r.URI="Array",r.getShow=l.getShow,r.getSemigroup=function(){return{concat:function(n,r){return n.concat(r)}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:[]}},r.getEq=l.getEq,r.getOrd=l.getOrd,r.getUnionSemigroup=function(n){var r=O(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:(0,r.getUnionSemigroup)(n).concat,empty:[]}},r.getIntersectionSemigroup=function(n){var r=g(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=M(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:j},r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:j,mapWithIndex:y},r.Apply={URI:r.URI,map:j,ap:x},r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:j,ap:x,of:r.of},r.Chain={URI:r.URI,map:j,ap:x,chain:r.flatMap},r.chainFirst=(0,c.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:j,ap:x,of:r.of,chain:r.flatMap},r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:j,alt:A},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,b.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:j,ap:x,of:r.of,alt:A,zero:r.zero},r.Extend={URI:r.URI,map:j,extend:D},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:j,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:W,partitionMap:E},r.FilterableWithIndex={URI:r.URI,map:j,mapWithIndex:y,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:W,partitionMap:E,partitionMapWithIndex:k,partitionWithIndex:q,filterMapWithIndex:C,filterWithIndex:$},r.Foldable={URI:r.URI,reduce:P,foldMap:T,reduceRight:N},r.FoldableWithIndex={URI:r.URI,reduce:P,foldMap:T,reduceRight:N,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:S},r.Traversable={URI:r.URI,map:j,reduce:P,foldMap:T,reduceRight:N,traverse:F,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:j,mapWithIndex:y,reduce:P,foldMap:T,reduceRight:N,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:S,traverse:F,sequence:r.sequence,traverseWithIndex:H};var B=(0,R.witherDefault)(r.Traversable,r.Compactable),K=(0,R.wiltDefault)(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:j,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:W,partitionMap:E,reduce:P,foldMap:T,reduceRight:N,traverse:F,sequence:r.sequence,wither:B,wilt:K},r.chainRecDepthFirst=l.chainRecDepthFirst,r.ChainRecDepthFirst={URI:r.URI,map:j,ap:x,chain:r.flatMap,chainRec:G},r.chainRecBreadthFirst=l.chainRecBreadthFirst,r.ChainRecBreadthFirst={URI:r.URI,map:j,ap:x,chain:r.flatMap,chainRec:J},r.filterE=(0,R.filterE)(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=(0,f.fromEitherK)(r.FromEither),r.unsafeInsertAt=s.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return(0,r.isNonEmpty)(u)?s.unsafeUpdateAt(n,t,u):[]},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.every=l.every,r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.intercalate=l.intercalate,r.Do=(0,r.of)(p.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=(0,c.bind)(r.Chain),r.apS=(0,i.apS)(r.Apply),r.chain=r.flatMap,r.range=s.range,r.empty=[],r.cons=s.cons,r.snoc=s.snoc,r.prependToAll=r.prependAll,r.array={URI:r.URI,compact:r.compact,separate:r.separate,map:j,ap:x,of:r.of,chain:r.flatMap,filter:w,filterMap:_,partition:W,partitionMap:E,mapWithIndex:y,partitionMapWithIndex:k,partitionWithIndex:q,filterMapWithIndex:C,filterWithIndex:$,alt:A,zero:r.zero,unfold:r.unfold,reduce:P,foldMap:T,reduceRight:N,traverse:F,sequence:r.sequence,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:S,traverseWithIndex:H,extend:D,wither:B,wilt:K}})),g=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getApplicativeComposition=r.getApplicativeMonoid=void 0,r.getApplicativeMonoid=function(n){var r=(0,i.getApplySemigroup)(n);return function(t){return{concat:r(t).concat,empty:n.of(t.empty)}}},r.getApplicativeComposition=function(n,r){var t=(0,a.getFunctorComposition)(n,r).map,u=(0,i.ap)(n,r);return{map:t,of:function(t){return n.of(r.of(t))},ap:function(n,r){return(0,e.pipe)(n,u(r))}}}})),M=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.and=r.or=r.not=r.Contravariant=r.getMonoidAll=r.getSemigroupAll=r.getMonoidAny=r.getSemigroupAny=r.URI=r.contramap=void 0,r.contramap=function(n){return function(r){return(0,e.flow)(n,r)}},r.URI="Predicate",r.getSemigroupAny=function(){return{concat:function(n,t){return(0,e.pipe)(n,(0,r.or)(t))}}},r.getMonoidAny=function(){return{concat:(0,r.getSemigroupAny)().concat,empty:e.constFalse}},r.getSemigroupAll=function(){return{concat:function(n,t){return(0,e.pipe)(n,(0,r.and)(t))}}},r.getMonoidAll=function(){return{concat:(0,r.getSemigroupAll)().concat,empty:e.constTrue}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,e.pipe)(n,(0,r.contramap)(t))}},r.not=function(n){return function(r){return!n(r)}},r.or=function(n){return function(r){return function(t){return r(t)||n(t)}}},r.and=function(n){return function(r){return function(t){return r(t)&&n(t)}}}})),j=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return v(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.Witherable=r.wilt=r.wither=r.Traversable=r.sequence=r.traverse=r.Filterable=r.partitionMap=r.partition=r.filterMap=r.filter=r.Compactable=r.separate=r.compact=r.Extend=r.extend=r.Alternative=r.guard=r.Zero=r.zero=r.Alt=r.alt=r.altW=r.orElse=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.flatMap=r.Applicative=r.Apply=r.ap=r.Pointed=r.of=r.asUnit=r.as=r.Functor=r.map=r.getMonoid=r.getOrd=r.getEq=r.getShow=r.URI=r.getRight=r.getLeft=r.fromPredicate=r.some=r.none=void 0,r.getFirstMonoid=r.getApplyMonoid=r.getApplySemigroup=r.option=r.mapNullable=r.getRefinement=r.chainFirst=r.chain=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.let=r.bindTo=r.Do=r.exists=r.elem=r.toUndefined=r.toNullable=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.chainFirstEitherK=r.chainEitherK=r.fromEitherK=r.duplicate=r.tapEither=r.tap=r.flatten=r.apSecond=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=r.fold=r.match=r.foldW=r.matchW=r.isNone=r.isSome=r.FromEither=r.fromEither=r.MonadThrow=r.throwError=void 0,r.getLastMonoid=void 0;var p=d(c),l=d(o);r.none=l.none,r.some=l.some,r.fromPredicate=function(n){return function(t){return n(t)?(0,r.some)(t):r.none}},r.getLeft=function(n){return"Right"===n._tag?r.none:(0,r.some)(n.left)},r.getRight=function(n){return"Left"===n._tag?r.none:(0,r.some)(n.right)};var m=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},h=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},U=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},O=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},j=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},y=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},x=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},w=function(n,t){return(0,e.pipe)(n,(0,r.filter)(t))},_=function(n,t){return(0,e.pipe)(n,(0,r.filterMap)(t))},W=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},E=function(n,t){return(0,e.pipe)(n,(0,r.partition)(t))},q=function(n,t){return(0,e.pipe)(n,(0,r.partitionMap)(t))};r.URI="Option",r.getShow=function(n){return{show:function(t){return(0,r.isNone)(t)?"none":"some(".concat(n.show(t.value),")")}}},r.getEq=function(n){return{equals:function(t,u){return t===u||((0,r.isNone)(t)?(0,r.isNone)(u):!(0,r.isNone)(u)&&n.equals(t.value,u.value))}}},r.getOrd=function(n){return{equals:(0,r.getEq)(n).equals,compare:function(t,u){return t===u?0:(0,r.isSome)(t)?(0,r.isSome)(u)?n.compare(t.value,u.value):1:-1}}},r.getMonoid=function(n){return{concat:function(t,u){return(0,r.isNone)(t)?u:(0,r.isNone)(u)?t:(0,r.some)(n.concat(t.value,u.value))},empty:r.none}},r.map=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.some)(n(t.value))}},r.Functor={URI:r.URI,map:m},r.as=(0,e.dual)(2,(0,a.as)(r.Functor)),r.asUnit=(0,a.asUnit)(r.Functor),r.of=r.some,r.Pointed={URI:r.URI,of:r.of},r.ap=function(n){return function(t){return(0,r.isNone)(t)||(0,r.isNone)(n)?r.none:(0,r.some)(t.value(n.value))}},r.Apply={URI:r.URI,map:m,ap:h},r.Applicative={URI:r.URI,map:m,ap:h,of:r.of},r.flatMap=(0,e.dual)(2,(function(n,t){return(0,r.isNone)(n)?r.none:t(n.value)})),r.Chain={URI:r.URI,map:m,ap:h,chain:r.flatMap},r.Monad={URI:r.URI,map:m,ap:h,of:r.of,chain:r.flatMap},r.reduce=function(n,t){return function(u){return(0,r.isNone)(u)?n:t(n,u.value)}},r.foldMap=function(n){return function(t){return function(u){return(0,r.isNone)(u)?n.empty:t(u.value)}}},r.reduceRight=function(n,t){return function(u){return(0,r.isNone)(u)?n:t(u.value,n)}},r.Foldable={URI:r.URI,reduce:U,foldMap:O,reduceRight:j},r.orElse=(0,e.dual)(2,(function(n,t){return(0,r.isNone)(n)?t():n})),r.altW=r.orElse,r.alt=r.orElse,r.Alt={URI:r.URI,map:m,alt:x},r.zero=function(){return r.none},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,b.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:m,ap:h,of:r.of,alt:x,zero:r.zero},r.extend=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.some)(n(t))}},r.Extend={URI:r.URI,map:m,extend:W},r.compact=(0,r.flatMap)(e.identity);var k=(0,I.separated)(r.none,r.none);r.separate=function(n){return(0,r.isNone)(n)?k:(0,I.separated)((0,r.getLeft)(n.value),(0,r.getRight)(n.value))},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.filter=function(n){return function(t){return(0,r.isNone)(t)?r.none:n(t.value)?t:r.none}},r.filterMap=function(n){return function(t){return(0,r.isNone)(t)?r.none:n(t.value)}},r.partition=function(n){return function(r){return(0,I.separated)(w(r,(0,M.not)(n)),w(r,n))}},r.partitionMap=function(n){return(0,e.flow)((0,r.map)(n),r.separate)},r.Filterable={URI:r.URI,map:m,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:E,partitionMap:q},r.traverse=function(n){return function(t){return function(u){return(0,r.isNone)(u)?n.of(r.none):n.map(t(u.value),r.some)}}},r.sequence=function(n){return function(t){return(0,r.isNone)(t)?n.of(r.none):n.map(t.value,r.some)}},r.Traversable={URI:r.URI,map:m,reduce:U,foldMap:O,reduceRight:j,traverse:y,sequence:r.sequence};var A=(0,R.witherDefault)(r.Traversable,r.Compactable),P=(0,R.wiltDefault)(r.Traversable,r.Compactable);r.wither=function(n){var r=A(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=P(n);return function(n){return function(t){return r(t,n)}}},r.Witherable={URI:r.URI,map:m,reduce:U,foldMap:O,reduceRight:j,traverse:y,sequence:r.sequence,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:E,partitionMap:q,wither:A,wilt:P},r.throwError=function(){return r.none},r.MonadThrow={URI:r.URI,map:m,ap:h,of:r.of,chain:r.flatMap,throwError:r.throwError},r.fromEither=r.getRight,r.FromEither={URI:r.URI,fromEither:r.fromEither},r.isSome=l.isSome,r.isNone=function(n){return"None"===n._tag},r.matchW=function(n,t){return function(u){return(0,r.isNone)(u)?n():t(u.value)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return(0,r.isNone)(t)?n():t.value}},r.getOrElse=r.getOrElseW,r.flap=(0,a.flap)(r.Functor),r.apFirst=(0,i.apFirst)(r.Apply),r.apSecond=(0,i.apSecond)(r.Apply),r.flatten=r.compact,r.tap=(0,e.dual)(2,p.tap(r.Chain)),r.tapEither=(0,e.dual)(2,(0,f.tapEither)(r.FromEither,r.Chain)),r.duplicate=(0,r.extend)(e.identity),r.fromEitherK=(0,f.fromEitherK)(r.FromEither),r.chainEitherK=(0,f.chainEitherK)(r.FromEither,r.Chain),r.chainFirstEitherK=r.tapEither,r.fromNullable=function(n){return null==n?r.none:(0,r.some)(n)},r.tryCatch=function(n){try{return(0,r.some)(n())}catch(n){return r.none}},r.tryCatchK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.tryCatch)((function(){return n.apply(void 0,t)}))}},r.fromNullableK=function(n){return(0,e.flow)(n,r.fromNullable)},r.chainNullableK=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.fromNullable)(n(t.value))}},r.toNullable=(0,r.match)(e.constNull,e.identity),r.toUndefined=(0,r.match)(e.constUndefined,e.identity),r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!(0,r.isNone)(e)&&t.equals(u,e.value)}},r.exists=function(n){return function(t){return!(0,r.isNone)(t)&&n(t.value)}},r.Do=(0,r.of)(l.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=p.bind(r.Chain),r.apS=(0,i.apS)(r.Apply),r.ApT=(0,r.of)(l.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,l.head(t));if((0,r.isNone)(u))return r.none;for(var e=[u.value],o=1;o<t.length;o++){var i=n(o,t[o]);if((0,r.isNone)(i))return r.none;e.push(i.value)}return(0,r.some)(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return l.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(e.identity),r.chain=r.flatMap,r.chainFirst=r.tap,r.getRefinement=function(n){return function(t){return(0,r.isSome)(n(t))}},r.mapNullable=r.chainNullableK,r.option={URI:r.URI,map:m,of:r.of,ap:h,chain:r.flatMap,reduce:U,foldMap:O,reduceRight:j,traverse:y,sequence:r.sequence,zero:r.zero,alt:x,extend:W,compact:r.compact,separate:r.separate,filter:w,filterMap:_,partition:E,partitionMap:q,wither:A,wilt:P,throwError:r.throwError},r.getApplySemigroup=(0,i.getApplySemigroup)(r.Apply),r.getApplyMonoid=(0,g.getApplicativeMonoid)(r.Applicative),r.getFirstMonoid=function(){return(0,r.getMonoid)((0,s.first)())},r.getLastMonoid=function(){return(0,r.getMonoid)((0,s.last)())}}));const y=n=>!("isConnected"in n)||n.isConnected,x=(()=>{let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let r of n.keys())n.set(r,n.get(r).filter(y))})(...r)}),2e3)}})(),w=n=>"function"==typeof n?n():n,_=(t,u)=>{const e=((n,r=((n,r)=>n!==r))=>{const t=w(n);let u=new Map(Object.entries(null!=t?t:{}));const e={dispose:[],get:[],set:[],reset:[]},o=()=>{var r;u=new Map(Object.entries(null!==(r=w(n))&&void 0!==r?r:{})),e.reset.forEach((n=>n()))},i=n=>(e.get.forEach((r=>r(n))),u.get(n)),c=(n,t)=>{const o=u.get(n);r(t,o,n)&&(u.set(n,t),e.set.forEach((r=>r(n,t,o))))},f="undefined"==typeof Proxy?{}:new Proxy(t,{get:(n,r)=>i(r),ownKeys:()=>Array.from(u.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,r)=>u.has(r),set:(n,r,t)=>(c(r,t),!0)}),a=(n,r)=>(e[n].push(r),()=>{((n,r)=>{const t=n.indexOf(r);t>=0&&(n[t]=n[n.length-1],n.length--)})(e[n],r)});return{state:f,get:i,set:c,on:a,onChange:(r,t)=>{const u=a("set",((n,u)=>{n===r&&t(u)})),e=a("reset",(()=>t(w(n)[r])));return()=>{u(),e()}},use:(...n)=>{const r=n.reduce(((n,r)=>(r.set&&n.push(a("set",r.set)),r.get&&n.push(a("get",r.get)),r.reset&&n.push(a("reset",r.reset)),r.dispose&&n.push(a("dispose",r.dispose)),n)),[]);return()=>r.forEach((n=>n()))},dispose:()=>{e.dispose.forEach((n=>n())),o()},reset:o,forceUpdate:n=>{const r=u.get(n);e.set.forEach((t=>t(n,r,r)))}}})(t,u);return e.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:r=>{const u=n();u&&((n,r,t)=>{const u=n.get(r);u?u.includes(t)||u.push(t):n.set(r,[t])})(t,r,u)},set:n=>{const u=t.get(n);u&&t.set(n,u.filter(r)),x(t)},reset:()=>{t.forEach((n=>n.forEach(r))),x(t)}}})()),e},{state:W}=_(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0}));function E(n){return n}function q(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n}function k(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}}var A=function(n,r){var t="number"==typeof n?function(r){return r.length>=n}:n;return function(){var n=Array.from(arguments);return t(arguments)?r.apply(this,n):function(t){return r.apply(void 0,function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))}([t],n,!1))}}},P={_tag:"None"},T=function(n){return{_tag:"Left",left:n}},N=function(n){return{_tag:"Right",right:n}},z=Object.prototype.hasOwnProperty,L=function(n,r){return A(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromTask(u(r))}))}))};function S(n){return function(r){return function(t){return n.fromEither("None"===t._tag?T(r()):N(t.value))}}}var C=T,$=N,D=A(2,(function(n,r){return V(n)?n:r(n.right)})),F=function(n,r){return k(n,G(r))},H="Either",G=function(n){return function(r){return V(r)?r:$(n(r.right))}},J={URI:H,map:F},B={URI:H,map:F,ap:function(n,r){return k(n,function(n){return function(r){return V(r)?r:V(n)?n:$(r.right(n.right))}}(r))}},K=function(n){return function(r){return V(r)?C(n(r.left)):r}},Q=S({URI:H,fromEither:E}),V=function(n){return"Left"===n._tag},X=function(n,r){return function(t){return V(t)?n(t.left):r(t.right)}},Y=D,Z=function(n){return{concat:function(r,t){var u={};for(var e in n)z.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},nn={concat:function(n,r){return n+r}},rn=P,tn=function(n){return{_tag:"Some",value:n}},un=function(n){return{concat:function(r,t){return cn(r)?t:cn(t)?r:tn(n.concat(r.value,t.value))},empty:rn}},en=function(n){return function(r){return cn(r)?rn:tn(n(r.value))}},on=A(2,(function(n,r){return cn(n)?rn:r(n.value)})),cn=function(n){return"None"===n._tag},fn=function(n,r){return function(t){return cn(t)?n():r(t.value)}},an=fn,vn=function(n){return null==n?rn:tn(n)},dn=on;function pn(n){return function(r){return n.map(r,$)}}function sn(n){return function(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}(n,J)}var ln,mn,hn=function(n,r){return k(n,In(r))},In=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},Rn=function(n){return function(){return Promise.resolve(n)}},bn="Task",Un={URI:bn,map:hn},On={URI:bn,map:hn,of:Rn,ap:function(n,r){return k(n,function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}}(r))},chain:A(2,(function(n,r){return function(){return Promise.resolve().then(n).then((function(n){return r(n)()}))}}))},gn=pn(Un),Mn=Rn,jn=sn(Un),yn=A(2,(ln=Un,function(n,r){return ln.map(n,K(r))})),xn=A(2,(mn=On,function(n,r){return mn.chain(n,(function(n){return V(n)?mn.of(n):r(n.right)}))})),wn=S({URI:"TaskEither",fromEither:Mn}),_n=L({fromTask:gn},{flatMap:xn}),Wn=xn,En=xn,qn=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),o=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),i=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return o(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getCompactableComposition=r.separate=r.compact=void 0;var c=i(I);function f(n,r){return function(t){return n.map(t,r.compact)}}function v(n,r,t){var u=f(n,r),o=(0,a.map)(n,t);return function(n){return c.separated(u((0,e.pipe)(n,o(j.getLeft))),u((0,e.pipe)(n,o(j.getRight))))}}r.compact=f,r.separate=v,r.getCompactableComposition=function(n,r){return{map:(0,a.getFunctorComposition)(n,r).map,compact:f(n,r),separate:v(n,r,r)}}})),kn=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.tailRec=void 0,r.tailRec=function(n,r){for(var t=r(n);"Left"===t._tag;)t=r(t.left);return t.right}})),An=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return v(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.match=r.foldW=r.matchW=r.isRight=r.isLeft=r.fromOption=r.fromPredicate=r.FromEither=r.MonadThrow=r.throwError=r.ChainRec=r.Extend=r.extend=r.Alt=r.alt=r.altW=r.Bifunctor=r.mapLeft=r.bimap=r.Traversable=r.sequence=r.traverse=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.Applicative=r.Apply=r.ap=r.apW=r.Pointed=r.of=r.asUnit=r.as=r.Functor=r.map=r.getAltValidation=r.getApplicativeValidation=r.getWitherable=r.getFilterable=r.getCompactable=r.getSemigroup=r.getEq=r.getShow=r.URI=r.flatMap=r.right=r.left=void 0,r.chainFirstW=r.chainFirst=r.chain=r.chainW=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.let=r.bindTo=r.Do=r.exists=r.elem=r.toError=r.toUnion=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.orElse=r.orElseW=r.swap=r.filterOrElseW=r.filterOrElse=r.flatMapOption=r.flatMapNullable=r.liftOption=r.liftNullable=r.chainOptionKW=r.chainOptionK=r.fromOptionK=r.duplicate=r.flatten=r.flattenW=r.tap=r.apSecondW=r.apSecond=r.apFirstW=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=r.fold=void 0,r.getValidation=r.getValidationMonoid=r.getValidationSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.either=r.stringifyJSON=r.parseJSON=void 0;var p=d(c),s=d(o);r.left=s.left,r.right=s.right,r.flatMap=(0,e.dual)(2,(function(n,t){return(0,r.isLeft)(n)?n:t(n.right)}));var l=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},m=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},h=function(n,t,u){return(0,e.pipe)(n,(0,r.reduce)(t,u))},b=function(n){return function(t,u){var o=(0,r.foldMap)(n);return(0,e.pipe)(t,o(u))}},U=function(n,t,u){return(0,e.pipe)(n,(0,r.reduceRight)(t,u))},O=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,e.pipe)(n,t(r))}},M=function(n,t,u){return(0,e.pipe)(n,(0,r.bimap)(t,u))},j=function(n,t){return(0,e.pipe)(n,(0,r.mapLeft)(t))},y=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))},x=function(n,t){return(0,e.pipe)(n,(0,r.extend)(t))},w=function(n,t){return(0,kn.tailRec)(t(n),(function(n){return(0,r.isLeft)(n)?(0,r.right)((0,r.left)(n.left)):(0,r.isLeft)(n.right)?(0,r.left)(t(n.right.left)):(0,r.right)((0,r.right)(n.right.right))}))};r.URI="Either",r.getShow=function(n,t){return{show:function(u){return(0,r.isLeft)(u)?"left(".concat(n.show(u.left),")"):"right(".concat(t.show(u.right),")")}}},r.getEq=function(n,t){return{equals:function(u,e){return u===e||((0,r.isLeft)(u)?(0,r.isLeft)(e)&&n.equals(u.left,e.left):(0,r.isRight)(e)&&t.equals(u.right,e.right))}}},r.getSemigroup=function(n){return{concat:function(t,u){return(0,r.isLeft)(u)?t:(0,r.isLeft)(t)?u:(0,r.right)(n.concat(t.right,u.right))}}},r.getCompactable=function(n){var t=(0,r.left)(n.empty);return{URI:r.URI,_E:void 0,compact:function(n){return(0,r.isLeft)(n)?n:"None"===n.right._tag?t:(0,r.right)(n.right.value)},separate:function(n){return(0,r.isLeft)(n)?(0,I.separated)(n,n):(0,r.isLeft)(n.right)?(0,I.separated)((0,r.right)(n.right.left),t):(0,I.separated)(t,(0,r.right)(n.right.right))}}},r.getFilterable=function(n){var t=(0,r.left)(n.empty),u=(0,r.getCompactable)(n);return{URI:r.URI,_E:void 0,map:l,compact:u.compact,separate:u.separate,filter:function(n,u){return(0,r.isLeft)(n)||u(n.right)?n:t},filterMap:function(n,u){if((0,r.isLeft)(n))return n;var e=u(n.right);return"None"===e._tag?t:(0,r.right)(e.value)},partition:function(n,u){return(0,r.isLeft)(n)?(0,I.separated)(n,n):u(n.right)?(0,I.separated)(t,(0,r.right)(n.right)):(0,I.separated)((0,r.right)(n.right),t)},partitionMap:function(n,u){if((0,r.isLeft)(n))return(0,I.separated)(n,n);var e=u(n.right);return(0,r.isLeft)(e)?(0,I.separated)((0,r.right)(e.left),t):(0,I.separated)(t,(0,r.right)(e.right))}}},r.getWitherable=function(n){var t=(0,r.getFilterable)(n),u=(0,r.getCompactable)(n);return{URI:r.URI,_E:void 0,map:l,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:O,sequence:r.sequence,reduce:h,foldMap:b,reduceRight:U,wither:(0,R.witherDefault)(r.Traversable,u),wilt:(0,R.wiltDefault)(r.Traversable,u)}},r.getApplicativeValidation=function(n){return{URI:r.URI,_E:void 0,map:l,ap:function(t,u){return(0,r.isLeft)(t)?(0,r.isLeft)(u)?(0,r.left)(n.concat(t.left,u.left)):t:(0,r.isLeft)(u)?u:(0,r.right)(t.right(u.right))},of:r.of}},r.getAltValidation=function(n){return{URI:r.URI,_E:void 0,map:l,alt:function(t,u){if((0,r.isRight)(t))return t;var e=u();return(0,r.isLeft)(e)?(0,r.left)(n.concat(t.left,e.left)):e}}},r.map=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.right)(n(t.right))}},r.Functor={URI:r.URI,map:l},r.as=(0,e.dual)(2,(0,a.as)(r.Functor)),r.asUnit=(0,a.asUnit)(r.Functor),r.of=r.right,r.Pointed={URI:r.URI,of:r.of},r.apW=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.isLeft)(n)?n:(0,r.right)(t.right(n.right))}},r.ap=r.apW,r.Apply={URI:r.URI,map:l,ap:m},r.Applicative={URI:r.URI,map:l,ap:m,of:r.of},r.Chain={URI:r.URI,map:l,ap:m,chain:r.flatMap},r.Monad={URI:r.URI,map:l,ap:m,of:r.of,chain:r.flatMap},r.reduce=function(n,t){return function(u){return(0,r.isLeft)(u)?n:t(n,u.right)}},r.foldMap=function(n){return function(t){return function(u){return(0,r.isLeft)(u)?n.empty:t(u.right)}}},r.reduceRight=function(n,t){return function(u){return(0,r.isLeft)(u)?n:t(u.right,n)}},r.Foldable={URI:r.URI,reduce:h,foldMap:b,reduceRight:U},r.traverse=function(n){return function(t){return function(u){return(0,r.isLeft)(u)?n.of((0,r.left)(u.left)):n.map(t(u.right),r.right)}}},r.sequence=function(n){return function(t){return(0,r.isLeft)(t)?n.of((0,r.left)(t.left)):n.map(t.right,r.right)}},r.Traversable={URI:r.URI,map:l,reduce:h,foldMap:b,reduceRight:U,traverse:O,sequence:r.sequence},r.bimap=function(n,t){return function(u){return(0,r.isLeft)(u)?(0,r.left)(n(u.left)):(0,r.right)(t(u.right))}},r.mapLeft=function(n){return function(t){return(0,r.isLeft)(t)?(0,r.left)(n(t.left)):t}},r.Bifunctor={URI:r.URI,bimap:M,mapLeft:j},r.altW=function(n){return function(t){return(0,r.isLeft)(t)?n():t}},r.alt=r.altW,r.Alt={URI:r.URI,map:l,alt:y},r.extend=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.right)(n(t))}},r.Extend={URI:r.URI,map:l,extend:x},r.ChainRec={URI:r.URI,map:l,ap:m,chain:r.flatMap,chainRec:w},r.throwError=r.left,r.MonadThrow={URI:r.URI,map:l,ap:m,of:r.of,chain:r.flatMap,throwError:r.throwError},r.FromEither={URI:r.URI,fromEither:e.identity},r.fromPredicate=(0,f.fromPredicate)(r.FromEither),r.fromOption=(0,f.fromOption)(r.FromEither),r.isLeft=s.isLeft,r.isRight=s.isRight,r.matchW=function(n,t){return function(u){return(0,r.isLeft)(u)?n(u.left):t(u.right)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return(0,r.isLeft)(t)?n(t.left):t.right}},r.getOrElse=r.getOrElseW,r.flap=(0,a.flap)(r.Functor),r.apFirst=(0,i.apFirst)(r.Apply),r.apFirstW=r.apFirst,r.apSecond=(0,i.apSecond)(r.Apply),r.apSecondW=r.apSecond,r.tap=(0,e.dual)(2,p.tap(r.Chain)),r.flattenW=(0,r.flatMap)(e.identity),r.flatten=r.flattenW,r.duplicate=(0,r.extend)(e.identity),r.fromOptionK=(0,f.fromOptionK)(r.FromEither),r.chainOptionK=(0,f.chainOptionK)(r.FromEither,r.Chain),r.chainOptionKW=r.chainOptionK;var _={fromEither:r.FromEither.fromEither};r.liftNullable=s.liftNullable(_),r.liftOption=s.liftOption(_);var W={flatMap:r.flatMap};r.flatMapNullable=s.flatMapNullable(_,W),r.flatMapOption=s.flatMapOption(_,W),r.filterOrElse=(0,f.filterOrElse)(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.swap=function(n){return(0,r.isLeft)(n)?(0,r.right)(n.left):(0,r.left)(n.right)},r.orElseW=function(n){return function(t){return(0,r.isLeft)(t)?n(t.left):t}},r.orElse=r.orElseW,r.fromNullable=function(n){return function(t){return null==t?(0,r.left)(n):(0,r.right)(t)}},r.tryCatch=function(n,t){try{return(0,r.right)(n())}catch(n){return(0,r.left)(t(n))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,r.tryCatch)((function(){return n.apply(void 0,u)}),t)}},r.fromNullableK=function(n){var t=(0,r.fromNullable)(n);return function(n){return(0,e.flow)(n,t)}},r.chainNullableK=function(n){var t=(0,r.fromNullableK)(n);return function(n){return(0,r.flatMap)(t(n))}},r.toUnion=(0,r.foldW)(e.identity,e.identity),r.toError=function(n){return n instanceof Error?n:new Error(String(n))},r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!(0,r.isLeft)(e)&&t.equals(u,e.right)}},r.exists=function(n){return function(t){return!(0,r.isLeft)(t)&&n(t.right)}},r.Do=(0,r.of)(s.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=p.bind(r.Chain),r.bindW=r.bind,r.apS=(0,i.apS)(r.Apply),r.apSW=r.apS,r.ApT=(0,r.of)(s.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,s.head(t));if((0,r.isLeft)(u))return u;for(var e=[u.right],o=1;o<t.length;o++){var i=n(o,t[o]);if((0,r.isLeft)(i))return i;e.push(i.right)}return(0,r.right)(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return s.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(e.identity),r.chainW=r.flatMap,r.chain=r.flatMap,r.chainFirst=r.tap,r.chainFirstW=r.tap,r.parseJSON=function(n,t){return(0,r.tryCatch)((function(){return JSON.parse(n)}),t)},r.stringifyJSON=function(n,t){return(0,r.tryCatch)((function(){var r=JSON.stringify(n);if("string"!=typeof r)throw new Error("Converting unsupported structure to JSON");return r}),t)},r.either={URI:r.URI,map:l,of:r.of,ap:m,chain:r.flatMap,reduce:h,foldMap:b,reduceRight:U,traverse:O,sequence:r.sequence,bimap:M,mapLeft:j,alt:y,extend:x,chainRec:w,throwError:r.throwError},r.getApplySemigroup=(0,i.getApplySemigroup)(r.Apply),r.getApplyMonoid=(0,g.getApplicativeMonoid)(r.Applicative),r.getValidationSemigroup=function(n,t){return(0,i.getApplySemigroup)((0,r.getApplicativeValidation)(n))(t)},r.getValidationMonoid=function(n,t){return(0,g.getApplicativeMonoid)((0,r.getApplicativeValidation)(n))(t)},r.getValidation=function(n){var t=(0,r.getApplicativeValidation)(n).ap,u=(0,r.getAltValidation)(n).alt;return{URI:r.URI,_E:void 0,map:l,of:r.of,chain:r.flatMap,bimap:M,mapLeft:j,reduce:h,foldMap:b,reduceRight:U,extend:x,traverse:O,sequence:r.sequence,chainRec:w,throwError:r.throwError,ap:t,alt:u}}})),Pn=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),o=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),c=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return o(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getEitherM=r.toUnion=r.swap=r.orLeft=r.tapError=r.orElseFirst=r.orElse=r.getOrElse=r.matchE=r.match=r.altValidation=r.mapError=r.mapLeft=r.mapBoth=r.bimap=r.alt=r.flatMap=r.chain=r.ap=r.map=r.chainNullableK=r.fromNullableK=r.fromNullable=r.leftF=r.rightF=r.left=r.right=void 0;var f=c(An);function v(n){return(0,e.flow)(f.right,n.of)}function d(n){return(0,e.flow)(f.left,n.of)}function p(n){return function(r){return n.map(r,f.right)}}function s(n){return function(r){return n.map(r,f.left)}}function l(n){return function(r){return(0,e.flow)(f.fromNullable(r),n.of)}}function m(n){var r=l(n);return function(n){var t=r(n);return function(n){return(0,e.flow)(n,t)}}}function h(n){return(0,a.map)(n,f.Functor)}function I(n){return(0,i.ap)(n,f.Apply)}function R(n){var r=b(n);return function(n){return function(t){return r(t,n)}}}function b(n){return function(r,t){return n.chain(r,(function(r){return f.isLeft(r)?n.of(r):t(r.right)}))}}function U(n){return function(r){return function(t){return n.chain(t,(function(t){return f.isLeft(t)?r():n.of(t)}))}}}function O(n){var r=g(n);return function(n,t){return function(u){return r(u,n,t)}}}function g(n){return function(r,t,u){return n.map(r,f.bimap(t,u))}}function M(n){var r=j(n);return function(n){return function(t){return r(t,n)}}}function j(n){return function(r,t){return n.map(r,f.mapLeft(t))}}function y(n){return function(r,t){return function(u){return n.chain(u,f.match(r,t))}}}function x(n){return function(r){return function(t){return n.chain(t,f.match(r,n.of))}}}function w(n){return function(r){return function(t){return n.chain(t,(function(t){return f.isLeft(t)?r(t.left):n.of(t)}))}}}function _(n){var r=w(n);return function(t,u){return(0,e.pipe)(t,r((function(r){return n.map(u(r),(function(n){return f.isLeft(n)?n:f.left(r)}))})))}}function W(n){return function(r){return n.map(r,f.swap)}}r.right=v,r.left=d,r.rightF=p,r.leftF=s,r.fromNullable=l,r.fromNullableK=m,r.chainNullableK=function(n){var r=R(n),t=m(n);return function(n){var u=t(n);return function(n){return r(u(n))}}},r.map=h,r.ap=I,r.chain=R,r.flatMap=b,r.alt=U,r.bimap=O,r.mapBoth=g,r.mapLeft=M,r.mapError=j,r.altValidation=function(n,r){return function(t){return function(u){return n.chain(u,f.match((function(u){return n.map(t(),f.mapLeft((function(n){return r.concat(u,n)})))}),v(n)))}}},r.match=function(n){return function(r,t){return function(u){return n.map(u,f.match(r,t))}}},r.matchE=y,r.getOrElse=x,r.orElse=w,r.orElseFirst=function(n){var r=_(n);return function(n){return function(t){return r(t,n)}}},r.tapError=_,r.orLeft=function(n){return function(r){return function(t){return n.chain(t,f.match((function(t){return n.map(r(t),f.left)}),(function(r){return n.of(f.right(r))})))}}},r.swap=W,r.toUnion=function(n){return function(r){return n.map(r,f.toUnion)}},r.getEitherM=function(n){var r=I(n),t=h(n),u=R(n),o=U(n),i=O(n),c=M(n),f=y(n),a=x(n),l=w(n);return{map:function(n,r){return(0,e.pipe)(n,t(r))},ap:function(n,t){return(0,e.pipe)(n,r(t))},of:v(n),chain:function(n,r){return(0,e.pipe)(n,u(r))},alt:function(n,r){return(0,e.pipe)(n,o(r))},bimap:function(n,r,t){return(0,e.pipe)(n,i(r,t))},mapLeft:function(n,r){return(0,e.pipe)(n,c(r))},fold:function(n,r,t){return(0,e.pipe)(n,f(r,t))},getOrElse:function(n,r){return(0,e.pipe)(n,a(r))},orElse:function(n,r){return(0,e.pipe)(n,l(r))},swap:W(n),rightM:p(n),leftM:s(n),left:d(n)}}})),Tn=u((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filter(n,t)}))}}}function u(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filterMap(n,t)}))}}}function o(n,r){var u=t(n,r);return function(n){var r=u((0,M.not)(n)),t=u(n);return function(n){return(0,I.separated)(r(n),t(n))}}}function i(n,r){var t=u(n,r);return function(n){return function(r){return(0,I.separated)((0,e.pipe)(r,t((function(r){return(0,j.getLeft)(n(r))}))),(0,e.pipe)(r,t((function(r){return(0,j.getRight)(n(r))}))))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFilterableComposition=r.partitionMap=r.partition=r.filterMap=r.filter=void 0,r.filter=t,r.filterMap=u,r.partition=o,r.partitionMap=i,r.getFilterableComposition=function(n,r){var c=(0,a.getFunctorComposition)(n,r).map,f=(0,qn.compact)(n,r),v=(0,qn.separate)(n,r,r),d=t(n,r),p=u(n,r),s=o(n,r),l=i(n,r);return{map:c,compact:f,separate:v,filter:function(n,r){return(0,e.pipe)(n,d(r))},filterMap:function(n,r){return(0,e.pipe)(n,p(r))},partition:function(n,r){return(0,e.pipe)(n,s(r))},partitionMap:function(n,r){return(0,e.pipe)(n,l(r))}}}})),Nn=u((function(n,r){function t(n,r){var t=(0,c.tap)(r);return function(r,u){return t(r,(0,e.flow)(u,n.fromIO))}}Object.defineProperty(r,"__esModule",{value:!0}),r.tapIO=r.chainFirstIOK=r.chainIOK=r.fromIOK=void 0,r.fromIOK=function(n){return function(r){return(0,e.flow)(r,n.fromIO)}},r.chainIOK=function(n,r){return function(t){var u=(0,e.flow)(t,n.fromIO);return function(n){return r.chain(n,u)}}},r.chainFirstIOK=function(n,r){var u=t(n,r);return function(n){return function(r){return u(r,n)}}},r.tapIO=t})),zn=u((function(n,r){function t(n,r){var t=(0,c.tap)(r);return function(r,u){return t(r,(0,e.flow)(u,n.fromTask))}}Object.defineProperty(r,"__esModule",{value:!0}),r.tapTask=r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=void 0,r.fromTaskK=function(n){return function(r){return(0,e.flow)(r,n.fromTask)}},r.chainTaskK=function(n,r){return function(t){var u=(0,e.flow)(t,n.fromTask);return function(n){return r.chain(n,u)}}},r.chainFirstTaskK=function(n,r){var u=t(n,r);return function(n){return function(r){return u(r,n)}}},r.tapTask=t})),Ln=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),f=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),v=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return f(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.let=r.bindTo=r.Do=r.never=r.FromTask=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.tapIO=r.tap=r.flatMapIO=r.FromIO=r.MonadTask=r.fromTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecond=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.asUnit=r.as=r.Functor=r.getRaceMonoid=r.URI=r.flatten=r.flatMap=r.of=r.ap=r.map=r.delay=r.fromIO=void 0,r.getMonoid=r.getSemigroup=r.taskSeq=r.task=r.chainFirst=r.chain=void 0;var d=v(c),p=v(o);r.fromIO=function(n){return function(){return Promise.resolve().then(n)}},r.delay=function(n){return function(r){return function(){return new Promise((function(t){setTimeout((function(){Promise.resolve().then(r).then(t)}),n)}))}}};var s=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},l=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},m=function(n,t){return(0,r.flatMap)(n,(function(n){return(0,e.pipe)(t,(0,r.map)(n))}))};r.map=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},r.ap=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},r.of=function(n){return function(){return Promise.resolve(n)}},r.flatMap=(0,e.dual)(2,(function(n,r){return function(){return Promise.resolve().then(n).then((function(n){return r(n)()}))}})),r.flatten=(0,r.flatMap)(e.identity),r.URI="Task",r.getRaceMonoid=function(){return{concat:function(n,r){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(r)])}},empty:r.never}},r.Functor={URI:r.URI,map:s},r.as=(0,e.dual)(2,(0,a.as)(r.Functor)),r.asUnit=(0,a.asUnit)(r.Functor),r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:s,ap:l},r.apFirst=(0,i.apFirst)(r.ApplyPar),r.apSecond=(0,i.apSecond)(r.ApplyPar),r.ApplicativePar={URI:r.URI,map:s,ap:l,of:r.of},r.ApplySeq={URI:r.URI,map:s,ap:m},r.ApplicativeSeq={URI:r.URI,map:s,ap:m,of:r.of},r.Chain={URI:r.URI,map:s,ap:l,chain:r.flatMap},r.Monad={URI:r.URI,map:s,of:r.of,ap:l,chain:r.flatMap},r.MonadIO={URI:r.URI,map:s,of:r.of,ap:l,chain:r.flatMap,fromIO:r.fromIO},r.fromTask=e.identity,r.MonadTask={URI:r.URI,map:s,of:r.of,ap:l,chain:r.flatMap,fromIO:r.fromIO,fromTask:r.fromTask},r.FromIO={URI:r.URI,fromIO:r.fromIO},r.flatMapIO=p.flatMapIO({fromIO:r.FromIO.fromIO},{flatMap:r.flatMap}),r.tap=(0,e.dual)(2,d.tap(r.Chain)),r.tapIO=(0,e.dual)(2,(0,Nn.tapIO)(r.FromIO,r.Chain)),r.fromIOK=(0,Nn.fromIOK)(r.FromIO),r.chainIOK=r.flatMapIO,r.chainFirstIOK=r.tapIO,r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.never=function(){return new Promise((function(){}))},r.Do=(0,r.of)(p.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=d.bind(r.Chain),r.apS=(0,i.apS)(r.ApplyPar),r.ApT=(0,r.of)(p.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){return function(){return Promise.all(r.map((function(r,t){return Promise.resolve().then((function(){return n(t,r)()}))})))}}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return p.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return p.tail(r).reduce((function(r,t,u){return r.then((function(r){return Promise.resolve().then(n(u+1,t)).then((function(n){return r.push(n),r}))}))}),Promise.resolve().then(n(0,p.head(r))).then(p.singleton))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return p.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(e.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return(0,r.traverseReadonlyArrayWithIndexSeq)((function(r,t){return n(t)}))},r.sequenceSeqArray=(0,r.traverseSeqArray)(e.identity),r.chain=r.flatMap,r.chainFirst=r.tap,r.task={URI:r.URI,map:s,of:r.of,ap:l,chain:r.flatMap,fromIO:r.fromIO,fromTask:r.fromTask},r.taskSeq={URI:r.URI,map:s,of:r.of,ap:m,chain:r.flatMap,fromIO:r.fromIO,fromTask:r.fromTask},r.getSemigroup=(0,i.getApplySemigroup)(r.ApplySeq),r.getMonoid=(0,g.getApplicativeMonoid)(r.ApplicativeSeq)})),Sn=u((function(n,r){var u=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),v=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),d=t&&t.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&u(r,n,t);return v(r,n),r},p=t&&t.__awaiter||function(n,r,t,u){return new(t||(t=Promise))((function(e,o){function i(n){try{f(u.next(n))}catch(n){o(n)}}function c(n){try{f(u.throw(n))}catch(n){o(n)}}function f(n){var r;n.done?e(n.value):(r=n.value,r instanceof t?r:new t((function(n){n(r)}))).then(i,c)}f((u=u.apply(n,r||[])).next())}))},s=t&&t.__generator||function(n,r){var t,u,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(t=1,u&&(e=2&c[0]?u.return:c[0]?u.throw||((e=u.return)&&e.call(u),0):u.next)&&!(e=e.call(u,c[1])).done)return e;switch(u=0,e&&(c=[2&c[0],e.value]),c[0]){case 0:case 1:e=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,u=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!e||c[1]>e[0]&&c[1]<e[3])){i.label=c[1];break}if(6===c[0]&&i.label<e[1]){i.label=e[1],e=c;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(c);break}e[2]&&i.ops.pop(),i.trys.pop();continue}c=r.call(n,i)}catch(n){c=[6,n],u=0}finally{t=e=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.throwError=r.of=r.altW=r.alt=r.flatten=r.flattenW=r.flatMap=r.apW=r.ap=r.mapLeft=r.mapError=r.bimap=r.mapBoth=r.map=r.fromIOEitherK=r.chainTaskOptionK=r.chainTaskOptionKW=r.fromTaskOptionK=r.swap=r.orLeft=r.orElseFirstTaskK=r.orElseFirstIOK=r.tapError=r.orElseW=r.orElse=r.chainNullableK=r.fromNullableK=r.fromNullable=r.toUnion=r.tryCatchK=r.tryCatch=r.getOrElseW=r.getOrElse=r.foldW=r.matchEW=r.fold=r.matchE=r.matchW=r.match=r.fromTaskOption=r.fromIOEither=r.fromEither=r.fromTask=r.fromIO=r.leftIO=r.rightIO=r.leftTask=r.rightTask=r.right=r.left=void 0,r.fromPredicate=r.chainFirstEitherKW=r.chainFirstEitherK=r.chainEitherKW=r.chainEitherK=r.flatMapTaskOption=r.flatMapIOEither=r.flatMapTask=r.flatMapIO=r.flatMapEither=r.flatMapOption=r.flatMapNullable=r.liftOption=r.liftNullable=r.chainOptionKW=r.chainOptionK=r.fromOptionK=r.fromOption=r.Alt=r.Bifunctor=r.tapTask=r.tapIO=r.tapEither=r.tap=r.FromTask=r.FromIO=r.FromEither=r.MonadThrow=r.MonadTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecondW=r.apSecond=r.apFirstW=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.asUnit=r.as=r.Functor=r.getFilterable=r.getCompactable=r.getAltTaskValidation=r.getApplicativeTaskValidation=r.URI=void 0,r.getTaskValidation=r.getSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.taskEitherSeq=r.taskEither=r.orElseFirstW=r.orElseFirst=r.chainFirstW=r.chainFirst=r.chainW=r.chain=r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.let=r.bindTo=r.Do=r.bracketW=r.bracket=r.taskify=r.chainIOEitherK=r.chainIOEitherKW=r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.fromEitherK=r.filterOrElseW=r.filterOrElse=void 0;var l=d(c),m=d(An),h=d(Pn),I=d(o),R=d(Ln);r.left=h.left(R.Pointed),r.right=h.right(R.Pointed),r.rightTask=h.rightF(R.Functor),r.leftTask=h.leftF(R.Functor),r.rightIO=(0,e.flow)(R.fromIO,r.rightTask),r.leftIO=(0,e.flow)(R.fromIO,r.leftTask),r.fromIO=r.rightIO,r.fromTask=r.rightTask,r.fromEither=R.of,r.fromIOEither=R.fromIO,r.fromTaskOption=function(n){return R.map(m.fromOption(n))},r.match=h.match(R.Functor),r.matchW=r.match,r.matchE=h.matchE(R.Monad),r.fold=r.matchE,r.matchEW=r.matchE,r.foldW=r.matchEW,r.getOrElse=h.getOrElse(R.Monad),r.getOrElseW=r.getOrElse,r.tryCatch=function(n,r){return function(){return p(void 0,void 0,void 0,(function(){var t;return s(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n().then(I.right)];case 1:return[2,u.sent()];case 2:return t=u.sent(),[2,I.left(r(t))];case 3:return[2]}}))}))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,r.tryCatch)((function(){return n.apply(void 0,u)}),t)}},r.toUnion=h.toUnion(R.Functor),r.fromNullable=h.fromNullable(R.Pointed),r.fromNullableK=h.fromNullableK(R.Pointed),r.chainNullableK=h.chainNullableK(R.Monad),r.orElse=h.orElse(R.Monad),r.orElseW=r.orElse,r.tapError=(0,e.dual)(2,h.tapError(R.Monad)),r.orElseFirstIOK=function(n){return(0,r.tapError)((0,r.fromIOK)(n))},r.orElseFirstTaskK=function(n){return(0,r.tapError)((0,r.fromTaskK)(n))},r.orLeft=h.orLeft(R.Monad),r.swap=h.swap(R.Functor),r.fromTaskOptionK=function(n){var t=(0,r.fromTaskOption)(n);return function(n){return(0,e.flow)(n,t)}},r.chainTaskOptionKW=function(n){return function(t){return function(u){return(0,r.flatMap)(u,(0,r.fromTaskOptionK)(n)(t))}}},r.chainTaskOptionK=r.chainTaskOptionKW,r.fromIOEitherK=function(n){return(0,e.flow)(n,r.fromIOEither)};var b=function(n,t){return(0,e.pipe)(n,(0,r.map)(t))},U=function(n,t){return(0,e.pipe)(n,(0,r.ap)(t))},O=function(n,t){return(0,r.flatMap)(n,(function(n){return(0,e.pipe)(t,(0,r.map)(n))}))},M=function(n,t){return(0,e.pipe)(n,(0,r.alt)(t))};function j(n,t){var u=(0,i.ap)(n,m.getApplicativeValidation(t));return{URI:r.URI,_E:void 0,map:b,ap:function(n,r){return(0,e.pipe)(n,u(r))},of:r.of}}function y(n){var t=h.altValidation(R.Monad,n);return{URI:r.URI,_E:void 0,map:b,alt:function(n,r){return(0,e.pipe)(n,t(r))}}}r.map=h.map(R.Functor),r.mapBoth=(0,e.dual)(3,h.mapBoth(R.Functor)),r.bimap=r.mapBoth,r.mapError=(0,e.dual)(2,h.mapError(R.Functor)),r.mapLeft=r.mapError,r.ap=h.ap(R.ApplyPar),r.apW=r.ap,r.flatMap=(0,e.dual)(2,h.flatMap(R.Monad)),r.flattenW=(0,r.flatMap)(e.identity),r.flatten=r.flattenW,r.alt=h.alt(R.Monad),r.altW=r.alt,r.of=r.right,r.throwError=r.left,r.URI="TaskEither",r.getApplicativeTaskValidation=j,r.getAltTaskValidation=y,r.getCompactable=function(n){var t=m.getCompactable(n);return{URI:r.URI,_E:void 0,compact:(0,qn.compact)(R.Functor,t),separate:(0,qn.separate)(R.Functor,t,m.Functor)}},r.getFilterable=function(n){var t=m.getFilterable(n),u=(0,r.getCompactable)(n),o=(0,Tn.filter)(R.Functor,t),i=(0,Tn.filterMap)(R.Functor,t),c=(0,Tn.partition)(R.Functor,t),f=(0,Tn.partitionMap)(R.Functor,t);return{URI:r.URI,_E:void 0,map:b,compact:u.compact,separate:u.separate,filter:function(n,r){return(0,e.pipe)(n,o(r))},filterMap:function(n,r){return(0,e.pipe)(n,i(r))},partition:function(n,r){return(0,e.pipe)(n,c(r))},partitionMap:function(n,r){return(0,e.pipe)(n,f(r))}}},r.Functor={URI:r.URI,map:b},r.as=(0,e.dual)(2,(0,a.as)(r.Functor)),r.asUnit=(0,a.asUnit)(r.Functor),r.flap=(0,a.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:b,ap:U},r.apFirst=(0,i.apFirst)(r.ApplyPar),r.apFirstW=r.apFirst,r.apSecond=(0,i.apSecond)(r.ApplyPar),r.apSecondW=r.apSecond,r.ApplicativePar={URI:r.URI,map:b,ap:U,of:r.of},r.ApplySeq={URI:r.URI,map:b,ap:O},r.ApplicativeSeq={URI:r.URI,map:b,ap:O,of:r.of},r.Chain={URI:r.URI,map:b,ap:U,chain:r.flatMap},r.Monad={URI:r.URI,map:b,ap:U,chain:r.flatMap,of:r.of},r.MonadIO={URI:r.URI,map:b,ap:U,chain:r.flatMap,of:r.of,fromIO:r.fromIO},r.MonadTask={URI:r.URI,map:b,ap:U,chain:r.flatMap,of:r.of,fromIO:r.fromIO,fromTask:r.fromTask},r.MonadThrow={URI:r.URI,map:b,ap:U,chain:r.flatMap,of:r.of,throwError:r.throwError},r.FromEither={URI:r.URI,fromEither:r.fromEither},r.FromIO={URI:r.URI,fromIO:r.fromIO},r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.tap=(0,e.dual)(2,l.tap(r.Chain)),r.tapEither=(0,e.dual)(2,(0,f.tapEither)(r.FromEither,r.Chain)),r.tapIO=(0,e.dual)(2,(0,Nn.tapIO)(r.FromIO,r.Chain)),r.tapTask=(0,e.dual)(2,(0,zn.tapTask)(r.FromTask,r.Chain)),r.Bifunctor={URI:r.URI,bimap:r.mapBoth,mapLeft:r.mapError},r.Alt={URI:r.URI,map:b,alt:M},r.fromOption=(0,f.fromOption)(r.FromEither),r.fromOptionK=(0,f.fromOptionK)(r.FromEither),r.chainOptionK=(0,f.chainOptionK)(r.FromEither,r.Chain),r.chainOptionKW=r.chainOptionK;var x={fromEither:r.FromEither.fromEither};r.liftNullable=I.liftNullable(x),r.liftOption=I.liftOption(x);var w={flatMap:r.flatMap},_={fromIO:r.FromIO.fromIO},W={fromTask:r.fromTask};r.flatMapNullable=I.flatMapNullable(x,w),r.flatMapOption=I.flatMapOption(x,w),r.flatMapEither=I.flatMapEither(x,w),r.flatMapIO=I.flatMapIO(_,w),r.flatMapTask=I.flatMapTask(W,w),r.flatMapIOEither=(0,e.dual)(2,(function(n,t){return(0,r.flatMap)(n,(0,r.fromIOEitherK)(t))})),r.flatMapTaskOption=(0,e.dual)(3,(function(n,t,u){return(0,r.flatMap)(n,(function(n){return(0,r.fromTaskOption)((function(){return u(n)}))(t(n))}))})),r.chainEitherK=r.flatMapEither,r.chainEitherKW=r.flatMapEither,r.chainFirstEitherK=r.tapEither,r.chainFirstEitherKW=r.tapEither,r.fromPredicate=(0,f.fromPredicate)(r.FromEither),r.filterOrElse=(0,f.filterOrElse)(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.fromEitherK=(0,f.fromEitherK)(r.FromEither),r.fromIOK=(0,Nn.fromIOK)(r.FromIO),r.chainIOK=r.flatMapIO,r.chainFirstIOK=r.tapIO,r.fromTaskK=(0,zn.fromTaskK)(r.FromTask),r.chainTaskK=r.flatMapTask,r.chainFirstTaskK=r.tapTask,r.chainIOEitherKW=r.flatMapIOEither,r.chainIOEitherK=r.flatMapIOEither,r.taskify=function(n){return function(){var r=Array.prototype.slice.call(arguments);return function(){return new Promise((function(t){n.apply(null,r.concat((function(n,r){return t(null!=n?I.left(n):I.right(r))})))}))}}},r.bracket=function(n,t,u){return(0,r.bracketW)(n,t,u)},r.bracketW=function(n,t,u){return(0,r.flatMap)(n,(function(n){return R.flatMap(t(n),(function(t){return(0,r.flatMap)(u(n,t),(function(){return R.of(t)}))}))}))},r.Do=(0,r.of)(I.emptyRecord),r.bindTo=(0,a.bindTo)(r.Functor),r.let=(0,a.let)(r.Functor),r.bind=l.bind(r.Chain),r.bindW=r.bind,r.apS=(0,i.apS)(r.ApplyPar),r.apSW=r.apS,r.ApT=(0,r.of)(I.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return(0,e.flow)(R.traverseReadonlyNonEmptyArrayWithIndex(n),R.map(m.traverseReadonlyNonEmptyArrayWithIndex(e.SK)))},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return I.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return I.tail(r).reduce((function(r,t,u){return r.then((function(e){return I.isLeft(e)?r:n(u+1,t)().then((function(n){return I.isLeft(n)?n:(e.right.push(n.right),e)}))}))}),n(0,I.head(r))().then(m.map(I.singleton)))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return I.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(e.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return(0,r.traverseReadonlyArrayWithIndexSeq)((function(r,t){return n(t)}))},r.sequenceSeqArray=(0,r.traverseSeqArray)(e.identity),r.chain=r.flatMap,r.chainW=r.flatMap,r.chainFirst=r.tap,r.chainFirstW=r.tap,r.orElseFirst=r.tapError,r.orElseFirstW=r.tapError,r.taskEither={URI:r.URI,bimap:r.mapBoth,mapLeft:r.mapError,map:b,of:r.of,ap:U,chain:r.flatMap,alt:M,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.taskEitherSeq={URI:r.URI,bimap:r.mapBoth,mapLeft:r.mapError,map:b,of:r.of,ap:O,chain:r.flatMap,alt:M,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.getApplySemigroup=(0,i.getApplySemigroup)(r.ApplySeq),r.getApplyMonoid=(0,g.getApplicativeMonoid)(r.ApplicativeSeq),r.getSemigroup=function(n){return(0,i.getApplySemigroup)(R.ApplySeq)(m.getSemigroup(n))},r.getTaskValidation=function(n){var t=j(R.ApplicativePar,n),u=y(n);return{URI:r.URI,_E:void 0,map:b,ap:t.ap,of:r.of,chain:r.flatMap,bimap:r.mapBoth,mapLeft:r.mapError,alt:u.alt,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError}}})),Cn=function(n){return 0===n.length};const $n=n=>({kind:"server",inner:n}),Dn={kind:"client",inner:"Token not exist or empty"},Fn={kind:"client",inner:"Api path empty or missing"},Hn=un({concat:function(n,r){return n+r},empty:""}),Gn=()=>k(un({concat:E}).concat(vn(W.apiPath),vn("https://api.vviinn.com")),Q((()=>Fn))),Jn=Z({method:{concat:(n,r)=>{return k(Hn.concat(vn(n),vn(r)),(t=()=>"GET",function(n){return cn(n)?t():n.value}));var t}},body:{concat:function(n,r){return r}},headers:{concat:(n,r)=>{const t=new Headers;return void 0!==n&&n.forEach(((n,r)=>t.append(r,n))),void 0!==r&&r.forEach(((n,r)=>t.append(r,n))),t}}}),Bn=n=>({method:n}),Kn=$(Bn("GET")),Qn=$(Bn("POST")),Vn=n=>n.status>=200&&n.status<300?Sn.right(n):Sn.left(n),Xn=Jn,Yn=(n,r)=>([t,u])=>{const o=new URL(n,t),i=Xn.concat(u,r);return e.pipe(((n,r={})=>e.pipe(((n,r={method:"GET"})=>Sn.tryCatch((()=>fetch(n,r)),(n=>n)))(n,r),Sn.chain(Vn),Sn.chain((n=>function(n){return Sn.fromTask((()=>n.json()))}(n)))))(o.toString(),i),Sn.mapLeft($n))},Zn=i.sequenceT(An.Apply),nr=n=>(n=>0===n.length)(n)?C("entity is empty"):$(n),rr=n=>k(n,("entity not exist",function(n){return null==n?C("entity not exist"):$(n)}),Y(nr)),tr=n=>n.length?`?${n.join("&")}`:"",ur=n=>n.split(";").map((n=>n?`excluded[]=${n}`:"")).join("&"),er={equals:(n,r)=>n.class===r.class&&n.score===r.score&&n.rectangle.left===r.rectangle.left&&n.rectangle.top===r.rectangle.top&&n.rectangle.height===r.rectangle.height&&n.rectangle.width===r.rectangle.width};var or;!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"}(or||(or={}));const ir=n=>"array"===n.type?n.value.map(ir):n.value,cr=n=>r=>k(Zn(Gn(),$(Bn(n.method))),Mn,En(Yn(n.href,r))),fr=({x:n,y:r})=>({x:n,y:r}),ar=Z({x:nn,y:nn});var vr;!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"}(vr||(vr={}));const dr=n=>({x:0,y:0,width:n.width,height:n.height}),pr=n=>Object.assign({x:n.left,y:n.top},n),sr=n=>r=>({x:r.x*n.width,y:r.y*n.height,width:r.width*n.width,height:r.height*n.height}),lr=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var mr;!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"}(mr||(mr={}));const hr=(n,r)=>{const t=new URLSearchParams(Object.entries(r));return[`${n.href}?${t.toString()}`,{method:"GET"}]},Ir=(n,r)=>[n.href,{body:JSON.stringify(r),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],Rr=(n,r={})=>t=>e.pipe(Zn(Gn(),e.pipe(((n,r)=>e.pipe(((n,r)=>{const t=n.map((n=>n.name)),u=Object.keys(r),e=t.filter((n=>!u.includes(n)));return 0===e.length?$(r):C(`Data should contains fields: ${e.join(", ")}`)})(n.value,r),G((r=>n.rel.includes("query-form")?hr(n,r):Ir(n,r)))))(n,r),K((n=>({kind:"app",inner:n}))))),Mn,En((n=>{const r=n[0],[u,e]=n[1];return Yn(u,e)([r,t])}))),br=async n=>new Promise((r=>{const t=new FileReader;t.addEventListener("load",(()=>{r(t.result)})),t.readAsDataURL(n)})),Ur=i.sequenceT(j.Apply),Or=n=>n.length>0?j.some(n):j.none,gr=n=>new Headers({Authorization:`Bearer ${n}`}),Mr=n=>k(n,rr,An.mapLeft((()=>Dn))),jr=n=>k(n,Mr,An.map(gr));const yr=["jpg","jpeg","png","webp"],xr={kind:"client",inner:"File format not supported"},wr=n=>{const r=n.type.split("/")[1],t=(u=t=>t===r?j.some(n):j.none,function(n){for(var r=0;r<n.length;r++){var t=u(n[r]);if("Some"===t._tag)return t}return P})(yr);var u;return e.pipe(t,An.fromOption((()=>xr)))},_r={kind:"app",inner:"File doesnt exist"},Wr=n=>()=>new Promise((r=>{const t=new FileReader,u=new Image;t.onload=n=>{u.src=n.target.result},u.onload=()=>r(u),t.readAsDataURL(n)}));var Er=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.copy=void 0,r.copy=(n,r,t=0,u=0,e=n.width-t,o=n.height-u,i=0,c=0)=>{if(t|=0,u|=0,o|=0,i|=0,c|=0,(e|=0)<=0||o<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(r.data.buffer);for(let v=0;v<o;v++){const o=u+v;if(o<0||o>=n.height)continue;const d=c+v;if(!(d<0||d>=r.height))for(let u=0;u<e;u++){const e=t+u;if(e<0||e>=n.width)continue;const c=i+u;c<0||c>=r.width||(a[d*r.width+c]=f[o*n.width+e])}}}})),qr=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CreateImageFactory=(n=[0,0,0,0],r=4)=>{if(r=Math.floor(r),isNaN(r)||r<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<r)throw TypeError(`fill should be iterable with at least ${r} members`);const t=(n=new Uint8ClampedArray(n).slice(0,r)).every((n=>0===n));return(u,e,o)=>{if(void 0===u||void 0===e)throw TypeError("Not enough arguments");if(u=Math.floor(u),e=Math.floor(e),isNaN(u)||u<1||isNaN(e)||e<1)throw TypeError("Index or size is negative or greater than the allowed amount");const i=u*e*r;if(void 0===o&&(o=new Uint8ClampedArray(i)),o instanceof Uint8ClampedArray){if(o.length!==i)throw TypeError("Index or size is negative or greater than the allowed amount");if(!t)for(let t=0;t<e;t++)for(let e=0;e<u;e++){const i=(t*u+e)*r;for(let t=0;t<r;t++)o[i+t]=n[t]}return{get width(){return u},get height(){return e},get data(){return o}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},r.createImage=r.CreateImageFactory()})),kr=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.filters=void 0;const t=(n,r)=>{if(n<=-r||n>=r)return 0;if(0==n)return 0;const t=n*Math.PI;return Math.sin(t)/t*Math.sin(t/r)/(t/r)},u=n=>Math.round(16383*n);r.filters=(n,r,e,o,i)=>{const c=i?2:3,f=1/e,a=Math.min(1,e),v=c/a,d=Math.floor(2*(v+1)),p=new Int16Array((d+2)*r);let s=0;for(let e=0;e<r;e++){const i=(e+.5)*f+o,d=Math.max(0,Math.floor(i-v)),l=Math.min(n-1,Math.ceil(i+v)),m=l-d+1,h=new Float32Array(m),I=new Int16Array(m);let R=0,b=0;for(let n=d;n<=l;n++){const r=t((n+.5-i)*a,c);R+=r,h[b]=r,b++}let U=0;for(let n=0;n<h.length;n++){const r=h[n]/R;U+=r,I[n]=u(r)}I[r>>1]+=u(1-U);let O=0;for(;O<I.length&&0===I[O];)O++;let g=I.length-1;for(;g>0&&0===I[g];)g--;const M=g-O+1;p[s++]=d+O,p[s++]=M,p.set(I.subarray(O,g+1),s),s+=M}return p}})),Ar=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convolve=void 0,r.convolve=(n,r,t,u,e,o)=>{let i=0,c=0;for(let f=0;f<u;f++){let a=0;for(let t=0;t<e;t++){let t=i+4*o[a++]|0,e=0,f=0,v=0,d=0;for(let r=o[a++];r>0;r--){const r=o[a++];e=e+r*n[t]|0,f=f+r*n[t+1]|0,v=v+r*n[t+2]|0,d=d+r*n[t+3]|0,t=t+4|0}r[c]=e+8192>>14,r[c+1]=f+8192>>14,r[c+2]=v+8192>>14,r[c+3]=d+8192>>14,c=c+4*u|0}c=4*(f+1)|0,i=(f+1)*t*4|0}}})),Pr=u((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lanczos2=r.lanczos=void 0;const t=(n,r,t=!1)=>{const u=r.height/n.height,e=kr.filters(n.width,r.width,r.width/n.width,0,t),o=kr.filters(n.height,r.height,u,0,t),i=new Uint8ClampedArray(r.width*n.height*4);Ar.convolve(n.data,i,n.width,n.height,r.width,e),Ar.convolve(i,r.data,n.height,r.width,r.height,o)};r.lanczos=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r);const d=qr.createImage(o,i),p=qr.createImage(a,v);Er.copy(n,d,u,e),t(d,p),Er.copy(p,r,0,0,p.width,p.height,c,f)},r.lanczos2=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r,!0);const d=qr.createImage(o,i),p=qr.createImage(a,v);Er.copy(n,d,u,e),t(d,p,!0),Er.copy(p,r,0,0,p.width,p.height,c,f)}}));const Tr=n=>({kind:"height",size:n}),Nr=d.contramap((n=>n.size))(h.Ord),zr=O.sort(Nr),Lr=O.sort({equals:(n,r)=>n.kind===r.kind,compare:(n,r)=>n.kind===r.kind?0:"width"===n.kind?-1:1}),Sr=n=>r=>{const t=zr(r),u=(n=>{const[r,t]=n;return r.size/t.size})(t),e=Object.assign(Object.assign({},t[0]),{size:n*u}),o=Object.assign(Object.assign({},t[1]),{size:n});return Lr([o,e])},Cr=n=>{const{naturalWidth:r,naturalHeight:t}=n;return[(u=r,{kind:"width",size:u}),Tr(t)];var u},$r=()=>{const n=document.createElement("canvas"),r=n.getContext("2d");return[n,r]},Dr=async n=>{const r=await fetch(n),t=await r.blob();return new File([t],"image",{type:t.type,lastModified:Date.now()})},Fr=n=>()=>new Promise((async r=>{const t=await fetch(n),u=await t.blob();r(new File([u],"image",{type:u.type,lastModified:Date.now()}))})),Hr=(n,r)=>n.naturalWidth>r?((n,r)=>{const t=Sr(n),[u,e]=$r(),o=Cr(r),[i,c]=t(o).map((n=>n.size)),f=new ImageData(i,c),a=(n=>{const{naturalWidth:r,naturalHeight:t}=n,[u,e]=$r();return u.width=r,u.height=t,e.drawImage(n,0,0),e.getImageData(0,0,r,t)})(r);return u.width=i,u.height=c,Pr.lanczos(a,f),e.putImageData(f,0,0),u.toDataURL()})(r,n):(n=>{const r=document.createElement("canvas"),{naturalWidth:t,naturalHeight:u}=n,e=r.getContext("2d");return r.width=t,r.height=u,e.drawImage(n,0,0,t,u),r.toDataURL()})(n),Gr=n=>k(n,jr,G((n=>({headers:n})))),{state:Jr,onChange:Br}=_({campaignId:j.none,excluded:"",results:[],filters:[],cropperHandlers:[],detectedObjects:[],objectDetectionInProgress:!1,imageWidth:500,image:j.none,imageUrl:j.none,imageBounds:j.none,searchArea:j.none,resultsComponents:[],serverError:!1,loading:!1}),Kr=Jr,Qr=async n=>{var r,t;Jr.results=n.value,Jr.filters=(t=ir(n.filters),Object.entries(t).map((([n,r])=>({name:n,filters:r})))),Jr.rectangleSearchForm=n.searchArea,Jr.resetCategoryLink=null===(r=n.links)||void 0===r?void 0:r.clearFilters,Jr.loading=!1},Vr=n=>k(Gr(Jr.token),Mn,En(cr(n))),Xr=async()=>{Jr.loading=!0,k(Ur(Jr.imageBounds,Jr.searchArea),j.map((async([n,r])=>{const t=(u=n,n=>({x:n.x/u.width,y:n.y/u.height,width:n.width/u.width,height:n.height/u.height}))(r);var u;const e={width:t.width,height:t.height,left:t.x,top:t.y};return await k(Gr(Jr.token),Mn,En(Rr(Jr.rectangleSearchForm,e)),jn(Qr))()})))},Yr=n=>{Jr.searchType="image",Jr.loading=!0;const r=(n=>{const r=new FormData;return r.append("image",n),r})(n);return k(Zn(jr(Jr.token),$(r)),G((([n,r])=>({headers:n,body:r}))),Mn,Wn((n=>((n,r=rn,t)=>{const u="search/session",o=e.pipe(r,an((()=>{const n=[];t&&n.push(t);const r=tr(n);return`${u}${r}`}),(n=>{const r=[];n&&r.push(`campaign-id=${n}`),t&&r.push(t);const e=tr(r);return`${u}${e}`})));return e.pipe(Zn(Gn(),Qn),Mn,En(Yn(o,n)))})(n,Jr.campaignId,Jr.excluded))),jn((n=>(Qr(n),(async n=>{Jr.objectDetectionInProgress=!0;const r={kind:"server",inner:"Can not get a link for objects detection"};var t;await k((t=n,k(t.links,vn,dn((n=>vn(n.detectedObjects))))),wn((()=>r)),Wn(Vr),jn((n=>Jr.detectedObjects=ir(n))))(),Jr.objectDetectionInProgress=!1})(n),Jr.loading=!1,n))),yn((n=>(Jr.serverError=!0,Jr.loading=!1,n))))},Zr=async n=>await(n=>{Jr.searchType="text",Jr.loading=!0;const r=JSON.stringify({query:n,campaign:j.getOrElse((()=>""))(Jr.campaignId)});return k(Zn(jr(Jr.token),$(r)),G((([n,r])=>(n.set("Content-Type","application/json"),{headers:n,body:r}))),Mn,Wn((n=>{return r=n,e.pipe(Zn(Gn(),Qn),Mn,En(Yn("multi-search",r)));var r})),jn((n=>{var r,t;return Jr.results=null!==(t=null===(r=n.data)||void 0===r?void 0:r.products)&&void 0!==t?t:[],Jr.loading=!1,n})),yn((n=>(Jr.serverError=!0,Jr.loading=!1,n))))})(n)();Br("activeIonLink",(async n=>{const r=n||Jr.resetCategoryLink;r&&(Jr.loading=!0,await k(Gr(Jr.token),Mn,En(cr(r)),jn(Qr),yn((n=>({kind:"network error",inner:n}))))())})),Br("searchArea",(n=>{k(n,j.map((n=>{var r;Jr.cropperHandlers=[{position:fr(r=n),direction:vr.NorthWest},{position:ar.concat(fr(r),{x:r.width,y:0}),direction:vr.NorthEast},{position:ar.concat(fr(r),{x:0,y:r.height}),direction:vr.SouthWest},{position:ar.concat(fr(r),{x:r.width,y:r.height}),direction:vr.SouthEast}]})))})),Br("serverError",(()=>{Jr.loading=!1}));const nt=n=>{Kr.image=j.some(n),Kr.imageUrl=j.some(n.src)},rt=async n=>{const r=(n=>e.pipe(n,j.fromNullable,An.fromOption((()=>_r)),An.chain(wr)))(n),t=(500,n=>e.pipe(n,Wr,Ln.map((n=>Hr(n,500))),Ln.chain(Fr)));const u=k(r,Mn,_n(t)),o=await k(u,Wn(Yr))();return k(Zn(o,r),G((([n,r])=>(async(n,r)=>{const t={image:await(async n=>({name:n.name,mediaType:n.type,value:await br(n)}))(r)},u=n.uploadHighResolutionImage;await k(Gr(Jr.token),Mn,En(Rr(u,t)))()})(n,r)))),await k(u,_n(Wr),jn(nt))(),o};export{B as A,rt as B,X as C,Ur as D,An as E,dr as F,Cr as G,Sr as H,Zr as I,m as N,j as O,s as S,Sn as T,O as _,e as a,W as b,En as c,Kn as d,en as e,Mn as f,Gn as g,z as h,fn as i,tr as j,ur as k,Or as l,Yn as m,t as n,u as o,k as p,Cn as q,pr as r,Kr as s,q as t,ir as u,sr as v,lr as w,Xr as x,er as y,Dr as z}
|