/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.triggersActionsUi_bundle_jsonpfunction=window.triggersActionsUi_bundle_jsonpfunction||[]).push([[0],{126:function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.apS=r.apSW=r.bind=r.bindW=r.bindTo=r.exists=r.elem=r.toError=r.either=r.getValidationMonoid=r.MonadThrow=r.ChainRec=r.Extend=r.Alt=r.Bifunctor=r.Traversable=r.Foldable=r.Monad=r.Applicative=r.Functor=r.getValidationSemigroup=r.getValidation=r.getAltValidation=r.getApplicativeValidation=r.getWitherable=r.getFilterable=r.getApplyMonoid=r.getApplySemigroup=r.getSemigroup=r.getEq=r.getShow=r.URI=r.throwError=r.sequence=r.traverse=r.reduceRight=r.foldMap=r.reduce=r.duplicate=r.extend=r.alt=r.flatten=r.chainFirst=r.chainFirstW=r.chain=r.chainW=r.of=r.apSecond=r.apFirst=r.ap=r.apW=r.mapLeft=r.bimap=r.map=r.filterOrElse=r.orElse=r.swap=r.getOrElse=r.getOrElseW=r.fold=r.fromPredicate=r.fromOption=r.stringifyJSON=r.parseJSON=r.tryCatch=r.fromNullable=r.right=r.left=r.isRight=r.isLeft=void 0;var e=n(210),i=n(112);function u(t,n){try{return r.right(t())}catch(t){return r.left(n(t))}}r.isLeft=function(t){return"Left"===t._tag},r.isRight=function(t){return"Right"===t._tag},r.left=function(t){return{_tag:"Left",left:t}},r.right=function(t){return{_tag:"Right",right:t}},r.fromNullable=function(t){return function(n){return null==n?r.left(t):r.right(n)}},r.tryCatch=u,r.parseJSON=function(t,r){return u((function(){return JSON.parse(t)}),r)},r.stringifyJSON=function(t,r){return u((function(){return JSON.stringify(t)}),r)},r.fromOption=function(t){return function(n){return"None"===n._tag?r.left(t()):r.right(n.value)}},r.fromPredicate=function(t,n){return function(e){return t(e)?r.right(e):r.left(n(e))}},r.fold=function(t,n){return function(e){return r.isLeft(e)?t(e.left):n(e.right)}},r.getOrElseW=function(t){return function(n){return r.isLeft(n)?t(n.left):n.right}},r.getOrElse=r.getOrElseW,r.swap=function(t){return r.isLeft(t)?r.right(t.left):r.left(t.right)},r.orElse=function(t){return function(n){return r.isLeft(n)?t(n.left):n}},r.filterOrElse=function(t,n){return r.chain((function(e){return t(e)?r.right(e):r.left(n(e))}))};var f=function(t,n){return i.pipe(t,r.map(n))},o=function(t,n){return i.pipe(t,r.ap(n))},a=function(t,n){return i.pipe(t,r.chain(n))},c=function(t,n,e){return i.pipe(t,r.reduce(n,e))},p=function(t){return function(n,e){var u=r.foldMap(t);return i.pipe(n,u(e))}},l=function(t,n,e){return i.pipe(t,r.reduceRight(n,e))},g=function(t){var n=r.traverse(t);return function(t,r){return i.pipe(t,n(r))}},h=function(t,n,e){return i.pipe(t,r.bimap(n,e))},s=function(t,n){return i.pipe(t,r.mapLeft(n))},d=function(t,n){return i.pipe(t,r.alt(n))},m=function(t,n){return i.pipe(t,r.extend(n))},R=function(t,n){return e.tailRec(n(t),(function(t){return r.isLeft(t)?r.right(r.left(t.left)):r.isLeft(t.right)?r.left(n(t.right.left)):r.right(r.right(t.right.right))}))};function L(t){return{concat:function(n,e){return r.isLeft(n)?n:r.isLeft(e)?e:r.right(t.concat(n.right,e.right))}}}function v(t){var n=r.left(t.empty);return{URI:r.URI,_E:void 0,map:f,compact:function(t){return r.isLeft(t)?t:"None"===t.right._tag?n:r.right(t.right.value)},separate:function(t){return r.isLeft(t)?{left:t,right:t}:r.isLeft(t.right)?{left:r.right(t.right.left),right:n}:{left:n,right:r.right(t.right.right)}},filter:function(t,e){return r.isLeft(t)||e(t.right)?t:n},filterMap:function(t,e){if(r.isLeft(t))return t;var i=e(t.right);return"None"===i._tag?n:r.right(i.value)},partition:function(t,e){return r.isLeft(t)?{left:t,right:t}:e(t.right)?{left:n,right:r.right(t.right)}:{left:r.right(t.right),right:n}},partitionMap:function(t,e){if(r.isLeft(t))return{left:t,right:t};var i=e(t.right);return r.isLeft(i)?{left:r.right(i.left),right:n}:{left:n,right:r.right(i.right)}}}}function U(t){return{URI:r.URI,_E:void 0,map:f,ap:function(n,e){return r.isLeft(n)?r.isLeft(e)?r.left(t.concat(n.left,e.left)):n:r.isLeft(e)?e:r.right(n.right(e.right))},of:r.of}}function I(t){return{URI:r.URI,_E:void 0,map:f,alt:function(n,e){if(r.isRight(n))return n;var i=e();return r.isLeft(i)?r.left(t.concat(n.left,i.left)):i}}}function E(t,n){return{concat:function(e,i){return r.isLeft(e)?r.isLeft(i)?r.left(t.concat(e.left,i.left)):e:r.isLeft(i)?i:r.right(n.concat(e.right,i.right))}}}r.map=function(t){return function(n){return r.isLeft(n)?n:r.right(t(n.right))}},r.bimap=function(t,n){return function(e){return r.isLeft(e)?r.left(t(e.left)):r.right(n(e.right))}},r.mapLeft=function(t){return function(n){return r.isLeft(n)?r.left(t(n.left)):n}},r.apW=function(t){return function(n){return r.isLeft(n)?n:r.isLeft(t)?t:r.right(n.right(t.right))}},r.ap=r.apW,r.apFirst=function(t){return i.flow(r.map((function(t){return function(){return t}})),r.ap(t))},r.apSecond=function(t){return i.flow(r.map((function(){return function(t){return t}})),r.ap(t))},r.of=r.right,r.chainW=function(t){return function(n){return r.isLeft(n)?n:t(n.right)}},r.chain=r.chainW,r.chainFirstW=function(t){return function(n){return i.pipe(n,r.chainW((function(n){return i.pipe(t(n),r.map((function(){return n})))})))}},r.chainFirst=r.chainFirstW,r.flatten=r.chain(i.identity),r.alt=function(t){return function(n){return r.isLeft(n)?t():n}},r.extend=function(t){return function(n){return r.isLeft(n)?n:r.right(t(n))}},r.duplicate=r.extend(i.identity),r.reduce=function(t,n){return function(e){return r.isLeft(e)?t:n(t,e.right)}},r.foldMap=function(t){return function(n){return function(e){return r.isLeft(e)?t.empty:n(e.right)}}},r.reduceRight=function(t,n){return function(e){return r.isLeft(e)?t:n(e.right,t)}},r.traverse=function(t){return function(n){return function(e){return r.isLeft(e)?t.of(r.left(e.left)):t.map(n(e.right),r.right)}}},r.sequence=function(t){return function(n){return r.isLeft(n)?t.of(r.left(n.left)):t.map(n.right,r.right)}},r.throwError=r.left,r.URI="Either",r.getShow=function(t,n){return{show:function(e){return r.isLeft(e)?"left("+t.show(e.left)+")":"right("+n.show(e.right)+")"}}},r.getEq=function(t,n){return{equals:function(e,i){return e===i||(r.isLeft(e)?r.isLeft(i)&&t.equals(e.left,i.left):r.isRight(i)&&n.equals(e.right,i.right))}}},r.getSemigroup=function(t){return{concat:function(n,e){return r.isLeft(e)?n:r.isLeft(n)?e:r.right(t.concat(n.right,e.right))}}},r.getApplySemigroup=L,r.getApplyMonoid=function(t){return{concat:L(t).concat,empty:r.right(t.empty)}},r.getFilterable=v,r.getWitherable=function(t){var n=v(t);return{URI:r.URI,_E:void 0,map:f,compact:n.compact,separate:n.separate,filter:n.filter,filterMap:n.filterMap,partition:n.partition,partitionMap:n.partitionMap,traverse:g,sequence:r.sequence,reduce:c,foldMap:p,reduceRight:l,wither:function(t){var r=g(t);return function(e,i){return t.map(r(e,i),n.compact)}},wilt:function(t){var r=g(t);return function(e,i){return t.map(r(e,i),n.separate)}}}},r.getApplicativeValidation=U,r.getAltValidation=I,r.getValidation=function(t){var n=U(t),e=I(t);return{URI:r.URI,_E:void 0,map:f,of:r.of,chain:a,bimap:h,mapLeft:s,reduce:c,foldMap:p,reduceRight:l,extend:m,traverse:g,sequence:r.sequence,chainRec:R,throwError:r.throwError,ap:n.ap,alt:e.alt}},r.getValidationSemigroup=E,r.Functor={URI:r.URI,map:f},r.Applicative={URI:r.URI,map:f,ap:o,of:r.of},r.Monad={URI:r.URI,map:f,ap:o,of:r.of,chain:a},r.Foldable={URI:r.URI,reduce:c,foldMap:p,reduceRight:l},r.Traversable={URI:r.URI,map:f,reduce:c,foldMap:p,reduceRight:l,traverse:g,sequence:r.sequence},r.Bifunctor={URI:r.URI,bimap:h,mapLeft:s},r.Alt={URI:r.URI,map:f,alt:d},r.Extend={URI:r.URI,map:f,extend:m},r.ChainRec={URI:r.URI,map:f,ap:o,chain:a,chainRec:R},r.MonadThrow={URI:r.URI,map:f,ap:o,of:r.of,chain:a,throwError:r.throwError},r.getValidationMonoid=function(t,n){return{concat:E(t,n).concat,empty:r.right(n.empty)}},r.either={URI:r.URI,map:f,of:r.of,ap:o,chain:a,reduce:c,foldMap:p,reduceRight:l,traverse:g,sequence:r.sequence,bimap:h,mapLeft:s,alt:d,extend:m,chainRec:R,throwError:r.throwError},r.toError=function(t){return t instanceof Error?t:new Error(String(t))},r.elem=function(t){return function(n,e){return!r.isLeft(e)&&t.equals(n,e.right)}},r.exists=function(t){return function(n){return!r.isLeft(n)&&t(n.right)}},r.bindTo=function(t){return r.map(i.bindTo_(t))},r.bindW=function(t,n){return r.chainW((function(e){return i.pipe(n(e),r.map((function(r){return i.bind_(e,t,r)})))}))},r.bind=r.bindW,r.apSW=function(t,n){return i.flow(r.map((function(r){return function(n){return i.bind_(r,t,n)}})),r.apW(n))},r.apS=r.apSW},210:function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.tailRec=void 0,r.tailRec=function(t,r){for(var n=r(t);"Left"===n._tag;)n=r(n.left);return n.right}}}]);