@integry/sdk 0.0.69 → 0.0.73
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/esm/index.csm.js
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
function e(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function t(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function n(e){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=e.apply(n,r);function s(e){t(a,i,o,s,l,"next",e)}function l(e){t(a,i,o,s,l,"throw",e)}s(void 0)}))}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=Object.prototype,s=a.hasOwnProperty,l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function p(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new M(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=f(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===_)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}var _={};function m(){}function v(){}function h(){}var y={};y[u]=function(){return this};var g=Object.getPrototypeOf,b=g&&g(g(D([])));b&&b!==a&&s.call(b,u)&&(y=b);var w=h.prototype=m.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function I(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))}function k(e,t){function n(r,i,a,l){var u=f(e[r],e,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===o(d)&&s.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,l)}))}l(u.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function C(e,t){var n=e.iterator[t.method];if(undefined===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=undefined,C(e,t),"throw"===t.method))return _;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return _}var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,_;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=undefined),t.delegate=null,_):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,_)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function D(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(s.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=undefined,t.done=!0,t};return r.next=r}}return{next:A}}function A(){return{value:undefined,done:!0}}v.prototype=w.constructor=h,h.constructor=v,h[d]=v.displayName="GeneratorFunction",x(k.prototype),k.prototype[c]=function(){return this},x(w),w[d]="Generator",w[u]=function(){return this},w.toString=function(){return"[object Generator]"},M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&s.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=undefined)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=undefined),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=s.call(i,"catchLoc"),l=s.call(i,"finallyLoc");if(a&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,_):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),_},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:D(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=undefined),_}};var T,R,L,N,P,E,j,F={wrap:p,isGeneratorFunction:I,AsyncIterator:k,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,d in e||(e[d]="GeneratorFunction")),e.prototype=Object.create(w),e},awrap:function(e){return{__await:e}},async:function(e,t,n,r,i){void 0===i&&(i=Promise);var o=new k(p(e,t,n,r),i);return I(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},keys:function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},values:D},z={},V=[],U=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function H(e,t){for(var n in t)e[n]=t[n];return e}function B(e){var t=e.parentNode;t&&t.removeChild(e)}function W(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return J(e,o,t&&t.key,t&&t.ref)}function J(e,t,n,r){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:null,__c:null,constructor:void 0};return T.vnode&&T.vnode(i),i}function q(e){return e.children}function G(e,t){this.props=e,this.context=t}function K(e,t){if(null==t)return e.__?K(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?K(e):null}function Z(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Z(e)}}function Y(e){(!e.__d&&(e.__d=!0)&&1===L.push(e)||P!==T.debounceRendering)&&((P=T.debounceRendering)||N)(Q)}function Q(){var e,t,n,r,i,o,a;for(L.sort((function(e,t){return t.__v.__b-e.__v.__b}));e=L.pop();)e.__d&&(n=void 0,r=void 0,o=(i=(t=e).__v).__e,(a=t.__P)&&(n=[],r=ie(a,i,H({},i),t.__n,void 0!==a.ownerSVGElement,null,n,null==o?K(i):o),oe(n,i),r!=o&&Z(i)))}function X(e,t,n,r,i,o,a,s,l){var u,c,d,p,f,_,m,v=n&&n.__k||V,h=v.length;if(s==z&&(s=null!=o?o[0]:h?K(n,0):null),u=0,t.__k=$(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=v[u])||d&&n.key==d.key&&n.type===d.type)v[u]=void 0;else for(c=0;c<h;c++){if((d=v[c])&&n.key==d.key&&n.type===d.type){v[c]=void 0;break}d=null}if(p=ie(e,n,d=d||z,r,i,o,a,s,l),(c=n.ref)&&d.ref!=c&&(m||(m=[]),d.ref&&m.push(d.ref,null,n),m.push(c,n.__c||p,n)),null!=p){if(null==_&&(_=p),null!=n.__d)p=n.__d,n.__d=null;else if(o==d||p!=s||null==p.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(p);else{for(f=s,c=0;(f=f.nextSibling)&&c<h;c+=2)if(f==p)break e;e.insertBefore(p,s)}"option"==t.type&&(e.value="")}s=p.nextSibling,"function"==typeof t.type&&(t.__d=p)}}return u++,n})),t.__e=_,null!=o&&"function"!=typeof t.type)for(u=o.length;u--;)null!=o[u]&&B(o[u]);for(u=h;u--;)null!=v[u]&&se(v[u],v[u]);if(m)for(u=0;u<m.length;u++)ae(m[u],m[++u],m[++u])}function $(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)$(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?J(null,e,null,null):null!=e.__e||null!=e.__c?J(e.type,e.props,e.key,null):e):e);return n}function ee(e,t,n,r,i){var o;for(o in n)o in t||ne(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"value"===o||"checked"===o||n[o]===t[o]||ne(e,o,t[o],n[o],r)}function te(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===U.test(t)?n+"px":null==n?"":n}function ne(e,t,n,r,i){var o,a,s,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"key"===t||"children"===t);else if("style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(a in r)n&&a in n||te(o,a,"");if(n)for(s in n)r&&n[s]===r[s]||te(o,s,n[s])}else"o"===t[0]&&"n"===t[1]?(l=t!==(t=t.replace(/Capture$/,"")),u=t.toLowerCase(),t=(u in e?u:t).slice(2),n?(r||e.addEventListener(t,re,l),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,re,l)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n?e.removeAttribute(t):e.setAttribute(t,n))}function re(e){this.l[e.type](T.event?T.event(e):e)}function ie(e,t,n,r,i,o,a,s,l){var u,c,d,p,f,_,m,v,h,y,g=t.type;if(void 0!==t.constructor)return null;(u=T.__b)&&u(t);try{e:if("function"==typeof g){if(v=t.props,h=(u=g.contextType)&&r[u.__c],y=u?h?h.props.value:u.__:r,n.__c?m=(c=t.__c=n.__c).__=c.__E:("prototype"in g&&g.prototype.render?t.__c=c=new g(v,y):(t.__c=c=new G(v,y),c.constructor=g,c.render=le),h&&h.sub(c),c.props=v,c.state||(c.state={}),c.context=y,c.__n=r,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=g.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=H({},c.__s)),H(c.__s,g.getDerivedStateFromProps(v,c.__s))),p=c.props,f=c.state,d)null==g.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==g.getDerivedStateFromProps&&v!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(v,y),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(v,c.__s,y)){for(c.props=v,c.state=c.__s,c.__d=!1,c.__v=t,t.__e=n.__e,t.__k=n.__k,c.__h.length&&a.push(c),u=0;u<t.__k.length;u++)t.__k[u]&&(t.__k[u].__=t);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(v,c.__s,y),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,f,_)}))}c.context=y,c.props=v,c.state=c.__s,(u=T.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=e,u=c.render(c.props,c.state,c.context),t.__k=$(null!=u&&u.type==q&&null==u.key?u.props.children:u),null!=c.getChildContext&&(r=H(H({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(_=c.getSnapshotBeforeUpdate(p,f)),X(e,t,n,r,i,o,a,s,l),c.base=t.__e,c.__h.length&&a.push(c),m&&(c.__E=c.__=null),c.__e=null}else t.__e=function(e,t,n,r,i,o,a,s){var l,u,c,d,p,f=n.props,_=t.props;if(i="svg"===t.type||i,null==e&&null!=o)for(l=0;l<o.length;l++)if(null!=(u=o[l])&&(null===t.type?3===u.nodeType:u.localName===t.type)){e=u,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(_);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type),o=null}if(null===t.type)null!=o&&(o[o.indexOf(e)]=null),f===_||s||e.data==_||(e.data=_);else if(t!==n){if(null!=o&&(o=V.slice.call(e.childNodes)),c=(f=n.props||z).dangerouslySetInnerHTML,d=_.dangerouslySetInnerHTML,!s){if(f===z)for(f={},p=0;p<e.attributes.length;p++)f[e.attributes[p].name]=e.attributes[p].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}ee(e,_,f,i,s),t.__k=t.props.children,d||X(e,t,n,r,"foreignObject"!==t.type&&i,o,a,z,s),s||("value"in _&&void 0!==_.value&&_.value!==e.value&&(e.value=null==_.value?"":_.value),"checked"in _&&void 0!==_.checked&&_.checked!==e.checked&&(e.checked=_.checked))}return e}(n.__e,t,n,r,i,o,a,l);(u=T.diffed)&&u(t)}catch(e){T.__e(e,t,n)}return t.__e}function oe(e,t){T.__c&&T.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){T.__e(e,t.__v)}}))}function ae(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){T.__e(e,n)}}function se(e,t,n){var r,i,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ae(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=null,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){T.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&se(r[o],t,n);null!=i&&B(i)}function le(e,t,n){return this.constructor(e,n)}function ue(e,t,n){var r,i,o;T.__&&T.__(e,t),i=(r=n===E)?null:n&&n.__k||t.__k,e=W(q,null,[e]),o=[],ie(t,(r?t:n||t).__k=e,i||z,z,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:V.slice.call(t.childNodes),o,n||z,r),oe(o,e)}function ce(e){var t={},n={__c:"__cC"+j++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(t){e.value!==t.value&&r.some((function(e){e.context=t.value,Y(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n}T={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return Y(n.__E=n)}catch(t){e=t}throw e}},R=function(e){return null!=e&&void 0===e.constructor},G.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=H({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&H(n,e),null!=e&&this.__v&&(this.__e=!1,t&&this.__h.push(t),Y(this))},G.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Y(this))},G.prototype.render=q,L=[],N="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,E=z,j=0;var de=Object.freeze({__proto__:null,render:ue,hydrate:function(e,t){ue(e,t,E)},createElement:W,h:W,Fragment:q,createRef:function(){return{}},get isValidElement(){return R},Component:G,cloneElement:function(e,t){return t=H(H({},e.props),t),arguments.length>2&&(t.children=V.slice.call(arguments,2)),J(e.type,t,t.key||e.key,t.ref||e.ref)},createContext:ce,toChildArray:$,_unmount:se,get options(){return T}}),pe=function e(t,n,r,i){var o;n[0]=0;for(var a=1;a<n.length;a++){var s=n[a++],l=n[a]?(n[0]|=s?1:2,r[n[a++]]):n[++a];3===s?i[0]=l:4===s?i[1]=Object.assign(i[1]||{},l):5===s?(i[1]=i[1]||{})[n[++a]]=l:6===s?i[1][n[++a]]+=l+"":s?(o=t.apply(l,e(t,l,r,["",null])),i.push(o),l[0]?n[0]|=2:(n[a-2]=0,n[a]=o)):i.push(l)}return i},fe=new Map;var _e=function(e){var t=fe.get(this);return t||(t=new Map,fe.set(this,t)),(t=pe(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,r=1,i="",o="",a=[0],s=function(e){1===r&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?a.push(0,e,i):3===r&&(e||i)?(a.push(3,e,i),r=2):2===r&&"..."===i&&e?a.push(4,e,0):2===r&&i&&!e?a.push(5,0,!0,i):r>=5&&((i||!e&&5===r)&&(a.push(r,0,i,n),r=6),e&&(a.push(r,e,0,n),r=6)),i=""},l=0;l<e.length;l++){l&&(1===r&&s(),s(l));for(var u=0;u<e[l].length;u++)t=e[l][u],1===r?"<"===t?(s(),a=[a],r=3):i+=t:4===r?"--"===i&&">"===t?(r=1,i=""):i=t+i[0]:o?t===o?o="":i+=t:'"'===t||"'"===t?o=t:">"===t?(s(),r=1):r&&("="===t?(r=5,n=i,i=""):"/"===t&&(r<5||">"===e[l][u+1])?(s(),3===r&&(a=a[0]),r=a,(a=a[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),r=2):i+=t),3===r&&"!--"===i&&(r=4,a=a[0])}return s(),a}(e)),t),arguments,[])).length>1?t:t[0]}.bind(W),me="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ve(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function he(e){var t={exports:{}};return e(t,t.exports),t.exports}var ye=ve(de),ge=he((function(e,t){var n=ye;function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e){this.getChildContext=function(){return{store:e.store}}}i.prototype.render=function(e){return e.children&&e.children[0]||e.children},t.connect=function(e,t){var i;return"function"!=typeof e&&("string"==typeof(i=e||{})&&(i=i.split(/\s*,\s*/)),e=function(e){for(var t={},n=0;n<i.length;n++)t[i[n]]=e[i[n]];return t}),function(i){function o(o,a){var s=this,l=a.store,u=e(l?l.getState():{},o),c=t?function(e,t){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,l):{store:l},d=function(){var t=e(l?l.getState():{},o);for(var n in t)if(t[n]!==u[n])return u=t,s.setState({});for(var r in u)if(!(r in t))return u=t,s.setState({})};this.componentWillReceiveProps=function(e){o=e,d()},this.componentDidMount=function(){l.subscribe(d)},this.componentWillUnmount=function(){l.unsubscribe(d)},this.render=function(e){return n.h(i,r(r(r({},c),e),u))}}return(o.prototype=new n.Component).constructor=o}},t.Provider=i}));function be(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],s={},l=function e(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:e,headers:{keys:function(){return o},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),a.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(l())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)}))}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xe(e,t){return(xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ie(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xe(e,t)}function ke(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?we(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Se(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Oe(e,t,n){return(Oe=Se()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&xe(i,n.prototype),i}).apply(null,arguments)}function Me(e){var t="function"==typeof Map?new Map:void 0;return(Me=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Oe(e,arguments,Ce(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),xe(r,e)})(e)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}var Ae=function(e){Ie(n,Me(Error));var t=De(n);function n(e,o){var a;return r(this,n),i(we(a=t.call(this,e)),"statusCode",void 0),i(we(a),"response",void 0),a.name=a.constructor.name,a.statusCode=null==o?void 0:o.status,a.response=o,a}return n}(),Te=function(){var e=n(F.mark((function e(t){var n,r,i;return F.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!1,!t.ok){e.next=16;break}return e.prev=2,e.next=5,t.json();case 5:return r=e.sent,n&&console.log(r),e.abrupt("return",{data:r,status:t.status});case 10:return e.prev=10,e.t0=e.catch(2),n&&console.log("Response is not in json"),e.abrupt("return",{data:null,status:t.status});case 14:e.next=22;break;case 16:if(405!==t.status){e.next=22;break}return e.next=19,t.json();case 19:return e.t1=e.sent,e.t2=t.status,e.abrupt("return",{data:e.t1,status:e.t2});case 22:return n&&console.log("Received a non-2xx status code"),i=new Ae(t.statusText,t),e.abrupt("return",Promise.reject(i));case 25:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}();function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ne=function e(t){var o=this;r(this,e),i(this,"config",void 0),i(this,"getTemplate",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrlv2,"/template/").concat(n,"/")),e.addUrlSearchParams(r,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId,self_api_key:o.config.apiKey||null}),t.prev=2,t.next=5,be(r.toString()).then((function(e){return Te(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"getAuthUrl",(function(t){var n=new URL("".concat(o.config.baseUrl,"/auth/login/").concat(t,"/"));return e.addUrlSearchParams(n,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId}),n.toString()})),i(this,"getTemplateStep",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrl,"/template_step/").concat(n,"/")),e.addUrlSearchParams(r,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId,self_api_key:o.config.apiKey||null}),t.prev=2,t.next=5,be(r.toString()).then((function(e){return Te(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"verifyOAuth",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrl,"/").concat(o.config.oauthVerifyPath)),e.addUrlSearchParams(r,{authorization_id:"".concat(n),app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId}),t.prev=2,t.next=5,be(r.toString(),{method:"POST"}).then(Te);case 5:return i=t.sent,t.abrupt("return",!!i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"deleteAuth",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrl,"/connected-accounts/").concat(n)),e.addUrlSearchParams(r,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId}),t.prev=2,t.next=5,be(r.toString(),{method:"DELETE"}).then((function(e){return Te(e)}));case 5:return i=t.sent,t.abrupt("return",{status:i.status,data:i.data});case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"callDynamicDataEndpoint",function(){var t=n(F.mark((function t(n){var r,i,a=arguments;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},e.addUrlSearchParams(n,Le({app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId},r)),t.prev=2,t.next=5,be(n.toString()).then((function(e){return Te(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"getTemplateListing",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrl,"/bundle/").concat(n,"/")),e.addUrlSearchParams(r,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId}),t.prev=2,t.next=5,be(r.toString()).then((function(e){return Te(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"saveIntegration",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrlv2,"/integration/")),e.addUrlSearchParams(r,{async:!1,app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId,activate:!0}),t.prev=2,t.next=5,be(r.toString(),{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((function(e){return Te(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"updateIntegration",function(){var t=n(F.mark((function t(n,r){var i,a;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=new URL("".concat(o.config.baseUrlv2,"/integration/").concat(n,"/")),e.addUrlSearchParams(i,{async:!1,app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId,activate:!0}),t.prev=2,t.next=5,be(i.toString(),{method:"PUT",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}).then((function(e){return Te(e)}));case 5:return a=t.sent,t.abrupt("return",a.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,n){return t.apply(this,arguments)}}()),i(this,"deleteIntegration",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrl,"/setup/template/").concat(n,"/")),e.addUrlSearchParams(r,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId}),t.prev=2,t.next=5,be(r.toString(),{method:"DELETE"}).then((function(e){return Te(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"toggleIntegration",function(){var t=n(F.mark((function t(n,r){var i,a;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=new URL("".concat(o.config.baseUrlv2,"/integration/").concat(n,"/").concat(r?"enable":"disable","/")),e.addUrlSearchParams(i,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId}),t.prev=2,t.next=5,be(i.toString(),{method:"PUT"}).then((function(e){return Te(e)}));case 5:return a=t.sent,t.abrupt("return",a.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,n){return t.apply(this,arguments)}}()),i(this,"getIntegrationById",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrlv2,"/integration/").concat(n)),e.addUrlSearchParams(r,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId}),t.prev=2,t.next=5,be(r.toString(),{method:"GET"}).then((function(e){return Te(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),i(this,"getIntegrationStatuses",function(){var t=n(F.mark((function t(n){var r,i;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new URL("".concat(o.config.baseUrlv2,"/integration_status/")),e.addUrlSearchParams(r,{app_key:o.config.appKey,hash:o.config.hash,user_id:o.config.userId}),t.prev=2,t.next=5,be(r.toString(),{method:"PUT",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then(Te);case 5:return i=t.sent,t.abrupt("return",i);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),this.config=t};function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}function je(e){return function(e){if(Array.isArray(e))return Pe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ee(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(){return(Fe=n(F.mark((function e(t,n){var r,i,o,a,s;return F.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=function(e){return new Uint8Array(je(unescape(encodeURIComponent(e))).map((function(e){return e.charCodeAt(0)})))})(n),o=r(t),e.next=5,crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!0,["sign"]);case 5:return a=e.sent,e.next=8,crypto.subtle.sign("HMAC",a,o);case 8:return s=e.sent,e.abrupt("return",je(new Uint8Array(s)).map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ze(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||Ee(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}i(Ne,"addUrlSearchParams",(function(e,t){return Object.keys(t).map((function(n){return void 0!==t[n]&&e.searchParams.append(n,"".concat(t[n]))}))}));var Ue,He,Be,We=[],Je=T.__r,qe=T.diffed,Ge=T.__c,Ke=T.unmount;function Ze(e){T.__h&&T.__h(He);var t=He.__H||(He.__H={t:[],u:[]});return e>=t.t.length&&t.t.push({}),t.t[e]}function Ye(e){return function(e,t,n){var r=Ze(Ue++);return r.__c||(r.__c=He,r.i=[n?n(t):at(void 0,t),function(t){var n=e(r.i[0],t);r.i[0]!==n&&(r.i[0]=n,r.__c.setState({}))}]),r.i}(at,e)}function Qe(e,t){var n=Ze(Ue++);ot(n.o,t)&&(n.i=e,n.o=t,He.__H.u.push(n))}function Xe(e){return $e((function(){return{current:e}}),[])}function $e(e,t){var n=Ze(Ue++);return ot(n.o,t)?(n.o=t,n.v=e,n.i=e()):n.i}function et(e,t){return $e((function(){return e}),t)}function tt(e){var t=He.context[e.__c];if(!t)return e.__;var n=Ze(Ue++);return null==n.i&&(n.i=!0,t.sub(He)),t.props.value}function nt(){We.some((function(e){e.__P&&(e.__H.u.forEach(rt),e.__H.u.forEach(it),e.__H.u=[])})),We=[]}function rt(e){e.m&&e.m()}function it(e){var t=e.i();"function"==typeof t&&(e.m=t)}function ot(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function at(e,t){return"function"==typeof t?t(e):t}function st(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lt(e,t,n){return t&&st(e.prototype,t),n&&st(e,n),e}T.__r=function(e){Je&&Je(e),Ue=0,(He=e.__c).__H&&(He.__H.u.forEach(rt),He.__H.u.forEach(it),He.__H.u=[])},T.diffed=function(e){qe&&qe(e);var t=e.__c;if(t){var n=t.__H;n&&n.u.length&&(1!==We.push(t)&&Be===T.requestAnimationFrame||((Be=T.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(nt))}},T.__c=function(e,t){t.some((function(e){e.__h.forEach(rt),e.__h=e.__h.filter((function(e){return!e.i||it(e)}))})),Ge&&Ge(e,t)},T.unmount=function(e){Ke&&Ke(e);var t=e.__c;if(t){var n=t.__H;n&&n.t.forEach((function(e){return e.m&&e.m()}))}};var ut=["message"],ct=F.mark(It),dt=F.mark(kt);function pt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ft(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}var ht=function(e){Ie(n,Me(TypeError));var t=vt(n);function n(e,i){var o,a;r(this,n);var s=e.message,l=ze(e,ut),u=e.path,c=0===u.length?s:"At path: "+u.join(".")+" -- "+s;return o=t.call(this,c),Object.assign(we(o),l),o.name=o.constructor.name,o.failures=function(){var t;return null!=(t=a)?t:a=[e].concat(je(i()))},o}return n}();function yt(e){return gt(e)&&"function"==typeof e[Symbol.iterator]}function gt(e){return"object"===o(e)&&null!=e}function bt(e){return"string"==typeof e?JSON.stringify(e):""+e}function wt(e){var t=e.next(),n=t.done,r=t.value;return n?void 0:r}function xt(e,t,n,r){if(!0!==e){!1===e?e={}:"string"==typeof e&&(e={message:e});var i=t.path,o=t.branch,a=n.type,s=e,l=s.refinement,u=s.message,c=void 0===u?"Expected a value of type `"+a+"`"+(l?" with refinement `"+l+"`":"")+", but received: `"+bt(r)+"`":u;return mt(mt({value:r,type:a,refinement:l,key:i[i.length-1],path:i,branch:o},e),{},{message:c})}}function It(e,t,n,r){var i,o,a,s;return F.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:yt(e)||(e=[e]),i=pt(e),l.prev=2,i.s();case 4:if((o=i.n()).done){l.next=12;break}if(a=o.value,!(s=xt(a,t,n,r))){l.next=10;break}return l.next=10,s;case 10:l.next=4;break;case 12:l.next=17;break;case 14:l.prev=14,l.t0=l.catch(2),i.e(l.t0);case 17:return l.prev=17,i.f(),l.finish(17);case 20:case"end":return l.stop()}}),ct,null,[[2,14,17,20]])}function kt(e,t){var n,r,i,o,a,s,l,u,c,d,p,f,_,m,v,h,y,g,b,w,x,I,k,C,S,O,M,D,A=arguments;return F.wrap((function(T){for(;;)switch(T.prev=T.next){case 0:if(n=A.length>2&&void 0!==A[2]?A[2]:{},r=n.path,i=void 0===r?[]:r,o=n.branch,a=void 0===o?[e]:o,s=n.coerce,l=void 0!==s&&s,u=n.mask,c=void 0!==u&&u,d={path:i,branch:a},l&&(e=t.coercer(e,d),c&&"type"!==t.type&>(t.schema)&>(e)&&!Array.isArray(e)))for(p in e)void 0===t.schema[p]&&delete e[p];f=!0,_=pt(t.validator(e,d)),T.prev=6,_.s();case 8:if((m=_.n()).done){T.next=15;break}return v=m.value,f=!1,T.next=13,[v,void 0];case 13:T.next=8;break;case 15:T.next=20;break;case 17:T.prev=17,T.t0=T.catch(6),_.e(T.t0);case 20:return T.prev=20,_.f(),T.finish(20);case 23:h=pt(t.entries(e,d)),T.prev=24,h.s();case 26:if((y=h.n()).done){T.next=53;break}g=Ve(y.value,3),b=g[0],w=g[1],x=g[2],I=kt(w,x,{path:void 0===b?i:[].concat(je(i),[b]),branch:void 0===b?a:[].concat(je(a),[w]),coerce:l,mask:c}),k=pt(I),T.prev=30,k.s();case 32:if((C=k.n()).done){T.next=43;break}if(!(S=C.value)[0]){T.next=40;break}return f=!1,T.next=38,[S[0],void 0];case 38:T.next=41;break;case 40:l&&(w=S[1],void 0===b?e=w:e instanceof Map?e.set(b,w):e instanceof Set?e.add(w):gt(e)&&(e[b]=w));case 41:T.next=32;break;case 43:T.next=48;break;case 45:T.prev=45,T.t1=T.catch(30),k.e(T.t1);case 48:return T.prev=48,k.f(),T.finish(48);case 51:T.next=26;break;case 53:T.next=58;break;case 55:T.prev=55,T.t2=T.catch(24),h.e(T.t2);case 58:return T.prev=58,h.f(),T.finish(58);case 61:if(!f){T.next=80;break}O=pt(t.refiner(e,d)),T.prev=63,O.s();case 65:if((M=O.n()).done){T.next=72;break}return D=M.value,f=!1,T.next=70,[D,void 0];case 70:T.next=65;break;case 72:T.next=77;break;case 74:T.prev=74,T.t3=T.catch(63),O.e(T.t3);case 77:return T.prev=77,O.f(),T.finish(77);case 80:if(!f){T.next=83;break}return T.next=83,[void 0,e];case 83:case"end":return T.stop()}}),dt,null,[[6,17,20,23],[24,55,58,61],[30,45,48,51],[63,74,77,80]])}var Ct=function(){function e(t){var n=this;r(this,e);var i=t.type,o=t.schema,a=t.validator,s=t.refiner,l=t.coercer,u=void 0===l?function(e){return e}:l,c=t.entries,d=void 0===c?F.mark((function e(){return F.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):c;this.type=i,this.schema=o,this.entries=d,this.coercer=u,this.validator=a?function(e,t){return It(a(e,t),t,n,e)}:function(){return[]},this.refiner=s?function(e,t){return It(s(e,t),t,n,e)}:function(){return[]}}return lt(e,[{key:"assert",value:function(e){return St(e,this)}},{key:"create",value:function(e){return function(e,t){var n=Ot(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"is",value:function(e){return function(e,t){return!Ot(e,t)[0]}(e,this)}},{key:"mask",value:function(e){return function(e,t){var n=Ot(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ot(e,this,t)}}]),e}();function St(e,t){var n=Ot(e,t);if(n[0])throw n[0]}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=kt(e,t,n),i=wt(r);if(i[0]){var o=new ht(i[0],F.mark((function e(){var t,n,i;return F.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=pt(r),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!(i=n.value)[0]){e.next=8;break}return e.next=8,i[0];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])})));return[o,void 0]}var a=i[1];return[void 0,a]}function Mt(e,t){return new Ct({type:e,schema:null,validator:t})}function Dt(e){return new Ct({type:"array",schema:e,entries:F.mark((function t(n){var r,i,o,a,s;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||!Array.isArray(n)){t.next=18;break}r=pt(n.entries()),t.prev=2,r.s();case 4:if((i=r.n()).done){t.next=10;break}return o=Ve(i.value,2),a=o[0],s=o[1],t.next=8,[a,s,e];case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),r.e(t.t0);case 15:return t.prev=15,r.f(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,12,15,18]])})),coercer:function(e){return Array.isArray(e)?e.slice():e},validator:function(e){return Array.isArray(e)||"Expected an array value, but received: "+bt(e)}})}function At(){return Mt("boolean",(function(e){return"boolean"==typeof e}))}function Tt(){return Mt("date",(function(e){return e instanceof Date&&!isNaN(e.getTime())||"Expected a valid `Date` object, but received: "+bt(e)}))}function Rt(e){return new Ct(mt(mt({},e),{},{validator:function(t,n){return null===t||e.validator(t,n)},refiner:function(t,n){return null===t||e.refiner(t,n)}}))}function Lt(){return Mt("number",(function(e){return"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+bt(e)}))}function Nt(e){var t=e?Object.keys(e):[],n=Mt("never",(function(){return!1}));return new Ct({type:"object",schema:e||null,entries:F.mark((function r(i){var o,a,s,l,u,c,d;return F.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e||!gt(i)){r.next=37;break}o=new Set(Object.keys(i)),a=pt(t),r.prev=3,a.s();case 5:if((s=a.n()).done){r.next=12;break}return l=s.value,o.delete(l),r.next=10,[l,i[l],e[l]];case 10:r.next=5;break;case 12:r.next=17;break;case 14:r.prev=14,r.t0=r.catch(3),a.e(r.t0);case 17:return r.prev=17,a.f(),r.finish(17);case 20:u=pt(o),r.prev=21,u.s();case 23:if((c=u.n()).done){r.next=29;break}return d=c.value,r.next=27,[d,i[d],n];case 27:r.next=23;break;case 29:r.next=34;break;case 31:r.prev=31,r.t1=r.catch(21),u.e(r.t1);case 34:return r.prev=34,u.f(),r.finish(34);case 37:case"end":return r.stop()}}),r,null,[[3,14,17,20],[21,31,34,37]])})),validator:function(e){return gt(e)||"Expected an object, but received: "+bt(e)},coercer:function(e){return gt(e)?mt({},e):e}})}function Pt(e){return new Ct(mt(mt({},e),{},{validator:function(t,n){return void 0===t||e.validator(t,n)},refiner:function(t,n){return void 0===t||e.refiner(t,n)}}))}function Et(){return Mt("string",(function(e){return"string"==typeof e||"Expected a string, but received: "+bt(e)}))}function jt(e,t,n){return new Ct(mt(mt({},e),{},{refiner:function(e){var t=F.mark(n);function n(n,r){var i=arguments;return F.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e.apply(this,i),"t0",1);case 1:return t.abrupt("return",t.t0);case 2:case"end":return t.stop()}}),t,this)}return n.toString=function(){return e.toString()},n}(F.mark((function r(i,o){var a,s,l,u,c;return F.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.delegateYield(e.refiner(i,o),"t0",1);case 1:a=n(i,o),s=It(a,o,e,i),l=pt(s),r.prev=4,l.s();case 6:if((u=l.n()).done){r.next=12;break}return c=u.value,r.next=10,mt(mt({},c),{},{refinement:t});case 10:r.next=6;break;case 12:r.next=17;break;case 14:r.prev=14,r.t1=r.catch(4),l.e(r.t1);case 17:return r.prev=17,l.f(),r.finish(17);case 20:case"end":return r.stop()}}),r,null,[[4,14,17,20]])})))}))}var Ft=ce(null);function zt(e,t){for(var n in t)e[n]=t[n];return e}var Vt={stepState:{steps:[],currentStep:{type:"CONFIRMATION"},stepIndex:0,showValidation:!1,allStepsCompleted:!1},genericData:{bundleId:null,templateId:null,templateApp:null,isPreviewMode:!1},stepMapping:{},stepDataMapping:{},parentChildMapping:{}};function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bt=function(e){return{setSteps:function(e,t){var n=[],r=-1;return t.forEach((function(e){if(e.activity.auth_required&&!e.hide_authorization&&(r+=1,n.push({stepId:e.id,title:"Connect ".concat(e.activity.app.name),iconUrl:e.activity.app.icon_url,isCompleted:!1,isCurrentlyOpen:!1,type:"AUTH",requiredFields:[e.id],invalidFields:i({},e.id,""),isValid:!1,itemIndex:r})),e.is_visible&&e.template_fields.length>0){var t=e.template_fields.filter((function(e){return e.is_visible})).length>0,o=e.template_fields.filter((function(e){return e.is_required&&e.is_visible})).map((function(e){return e.id})),a=e.template_fields.filter((function(e){return e.is_required&&!e.default_value})).reduce((function(e,t){return Ht(Ht({},e),{},i({},t.id,""))}),{}),s=!(Object.keys(a).length>0);t&&(r+=1,n.push({stepId:e.id,title:e.title,iconUrl:e.activity.app.icon_url,isCompleted:!1,isCurrentlyOpen:!1,type:"CONFIGURATION",requiredFields:o,invalidFields:a,isValid:s,itemIndex:r}))}})),Ht(Ht({},e),{},{stepState:{steps:n,currentStep:n[0],stepIndex:0,showValidation:!1,allStepsCompleted:!1}})},setIntegrationData:function(e,t){var n=e.stepDataMapping,r=e.stepMapping,o=t.steps.reduce((function(e,t){return r[t.template_step]&&t.authorization?Ht(Ht({},e),{},i({},t.template_step,{authId:Number(t.authorization),stepId:t.id})):e}),{}),a=t.steps.reduce((function(e,t){return n[t.template_step]?Ht(Ht({},e),{},i({},t.template_step,t.app_user_data)):e}),{}),s=Ht({},r),l=Ht({},n),u=e.stepState.steps.map((function(e){return Ht(Ht({},e),{},{isCompleted:!0})}));return Object.keys(a).forEach((function(e){l[Number(e)]=Ht(Ht({},n[Number(e)]),a[Number(e)].reduce((function(t,r){return n[Number(e)]?Ht(Ht({},t),{},i({},r.template_field,Ht(Ht({},n[Number(e)][r.template_field]),{},{integrationFieldId:r.id,value:n[Number(e)][r.template_field].isDynamic?null:r.value,objectValue:n[Number(e)][r.template_field].isDynamic?JSON.parse(r.value):null}))):t}),{}))})),Object.keys(o).forEach((function(e){s[Number(e)]=Ht(Ht({},s[Number(e)]),{},{integrationStepId:o[Number(e)].stepId,isAuthVerified:!0,selectedAuthId:o[Number(e)].authId})})),Ht(Ht({},e),{},{stepMapping:s,stepDataMapping:l,stepState:Ht(Ht({},e.stepState),{},{steps:u,currentStep:u[0],stepIndex:0,showValidation:!1,allStepsCompleted:!0})})},showStepValidationState:function(e){return{stepState:Ht(Ht({},e.stepState),{},{showValidation:!0})}},hideStepValidationState:function(e){return{stepState:Ht(Ht({},e.stepState),{},{showValidation:!1})}},gotoNextStep:function(e){var t=e.stepState;if(t){var n=Number(t.stepIndex)+1,r=t.steps[Number(t.stepIndex)+1],i=Ht(Ht({},t.steps[e.stepState.stepIndex]),{},{isCompleted:!0});return r?{stepState:Ht(Ht({},t),{},{steps:[].concat(je(t.steps.slice(0,t.stepIndex)),[i],je(t.steps.slice(t.stepIndex+1))),currentStep:Ht({},r),stepIndex:n,showValidation:!1})}:{stepState:Ht(Ht({},t),{},{steps:[].concat(je(t.steps.slice(0,t.stepIndex)),[i],je(t.steps.slice(t.stepIndex+1))),currentStep:{type:"CONFIRMATION"},stepIndex:n,allStepsCompleted:!0,showValidation:!1})}}return e},gotoPreviousStep:function(e){if(e.stepState){var t=Number(e.stepState.stepIndex)-1,n=e.stepState.steps[Number(e.stepState.stepIndex)-1];return{stepState:Ht(Ht({},e.stepState),{},{currentStep:n,stepIndex:t,showValidation:!n.isValid})}}return e},gotoStepInPreview:function(e,t){var n=e.stepState,r=t.stepId,i=t.type;if(r&&"CONFIRMATION"!==i){var o=n.steps.findIndex((function(e){return e.stepId===r&&e.type===i}));if(o>-1)return{stepState:Ht(Ht({},e.stepState),{},{currentStep:n.steps[o],stepIndex:o,allStepsCompleted:!1})}}return r||"CONFIRMATION"!==i?e:{stepState:Ht(Ht({},n),{},{currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0})}},gotoStep:function(e,t){var n=e.stepState,r=n.stepIndex;if(n){var i=n.steps[r],o=n.steps[t];if(e.genericData.isPreviewMode)return t===n.steps.length?{stepState:Ht(Ht({},n),{},{currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0})}:{stepState:Ht(Ht({},e.stepState),{},{currentStep:Ht({},o),stepIndex:t,allStepsCompleted:!1})};if(n.allStepsCompleted&&t===n.steps.length)return{stepState:Ht(Ht({},n),{},{currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0})};if(i&&i.isValid&&r===n.steps.length-1&&t===n.steps.length){var a=Ht(Ht({},n.steps[r]),{},{isCompleted:!0});return{stepState:Ht(Ht({},n),{},{steps:[].concat(je(n.steps.slice(0,r)),[a],je(n.steps.slice(r+1))),currentStep:{type:"CONFIRMATION"},stepIndex:t,allStepsCompleted:!0})}}if(o&&o.isCompleted)return{stepState:Ht(Ht({},e.stepState),{},{currentStep:Ht({},o),stepIndex:t,showValidation:!o.isValid})};if(i&&i.isValid&&t===r+1){var s=Ht(Ht({},n.steps[r]),{},{isCompleted:!0});return{stepState:Ht(Ht({},e.stepState),{},{steps:[].concat(je(n.steps.slice(0,r)),[s],je(n.steps.slice(r+1))),currentStep:Ht({},o),stepIndex:t})}}}return e},verifyStepValidity:function(e,t){var n=e.stepDataMapping[t],r=!(Object.keys(n).map((function(e){return n[Number(e)]})).filter((function(e){return e.isRequired&&!e.value&&!e.objectValue})).length>0);return{stepState:Ht(Ht({},e.stepState),{},{currentStep:Ht(Ht({},e.stepState.currentStep),{},{isValid:r})})}},getStepState:function(){return e.getState().stepState},setGenericData:function(e,t){return{genericData:Ht(Ht({},e.genericData),t)}},setTemplateApp:function(e,t){return{genericData:Ht(Ht({},e.genericData),{},{templateApp:{name:t.name,iconUrl:t.iconUrl}})}},setStepMapping:function(e,t){var n=t.reduce((function(t,n){var r,o,a,s,l=null,u=!1;n.hide_authorization||e.genericData.isPreviewMode?(u=!0,l=null!==(a=null===(s=n.authorization_type.authorizations[0])||void 0===s?void 0:s.id)&&void 0!==a?a:null):(n.step_authorization||e.stepMapping[n.id])&&(l=e.stepMapping[n.id].selectedAuthId);return Ht(Ht({},t),{},i({},n.id,{step:n,authorizations:null!==(r=null===(o=n.authorization_type.authorizations)||void 0===o?void 0:o.map((function(e){return{authorizationId:e.id,userIdentity:e.user_identity,authType:e.authorization_type,disableLink:e.disable_link,isErrored:!1,isVerified:u}})))&&void 0!==r?r:[],isAuthVerified:u,selectedAuthId:l}))}),{}),r=t.reduce((function(t,n){return Ht(Ht({},t),{},i({},n.id,Ht(Ht({},e.stepDataMapping[n.id]),n.template_fields.reduce((function(t,r){var o,a;return Ht(Ht({},t),{},i({},r.id,{fieldId:r.id,value:!r.is_visible||r.default_value?r.default_value:e.stepDataMapping[n.id]&&e.stepDataMapping[n.id][r.id]&&e.stepDataMapping[n.id][r.id].value||"",machineName:null===(o=r.activity_field)||void 0===o?void 0:o.machine_name,isRequired:r.is_required,isVisible:r.is_visible,isDynamic:"DYNAMIC"===(null===(a=r.activity_field)||void 0===a?void 0:a.type)}))}),{}))))}),{});return{stepMapping:Ht(Ht({},e.stepMapping),n),stepDataMapping:Ht(Ht({},e.stepDataMapping),r),genericData:Ht(Ht({},e.genericData),{},{templateApp:{name:t.length>0?t[0].activity.app.name:"",iconUrl:t.length>0?t[0].activity.app.icon_url:""}})}},setActivityOutputData:function(e,t){return Ht(Ht({},e),{},{activityOutputData:t.activityOutputData})},setDynamicFieldData:function(e,t){return Ht(Ht({},e),{},{dynamicFieldData:Object.keys(t.dynamicFieldData).reduce((function(e,n){return Ht(Ht({},e),{},i({},"{".concat(n,"}"),t.dynamicFieldData[n]))}),{})})},setParentChildMapping:function(e,t){var n=t.reduce((function(t,n){return Ht(Ht({},t),{},i({},n.id,Ht(Ht({},e.parentChildMapping[n.id]),n.template_fields.reduce((function(e,t){var n,r,o,a,s;return t.activity_field?Ht(Ht({},e),{},i({},null===(n=t.activity_field)||void 0===n?void 0:n.machine_name,{fieldId:t.id,childFields:null!==(r=t.activity_field)&&void 0!==r&&r.child_fields?JSON.parse(null===(o=t.activity_field)||void 0===o?void 0:o.child_fields):null,parentFields:null!==(a=t.activity_field)&&void 0!==a&&a.parent_fields?JSON.parse(null===(s=t.activity_field)||void 0===s?void 0:s.parent_fields):null})):e}),{}))))}),{});return{parentChildMapping:Ht(Ht({},e.parentChildMapping),n)}},addAuthorization:function(e,t){var n=t.stepId,r=t.authData;return{stepMapping:Ht(Ht({},e.stepMapping),{},i({},n,Ht(Ht({},e.stepMapping[n]),{},{authorizations:[].concat(je(e.stepMapping[n].authorizations),[r])})))}},removeAuthorization:function(e,t){var n=t.stepId,r=t.authId;return{stepMapping:Ht(Ht({},e.stepMapping),{},i({},n,Ht(Ht({},e.stepMapping[n]),{},{authorizations:e.stepMapping[n].authorizations.filter((function(e){return e.authorizationId!==r}))})))}},toggleVerifyAuthorizationFlag:function(e,t){var n=t.stepId,r=t.authId,o=t.isVerifying,a=e.stepMapping[n].authorizations.findIndex((function(e){return e.authorizationId===r}));return{stepMapping:Ht(Ht({},e.stepMapping),{},i({},n,Ht(Ht({},e.stepMapping[n]),{},{authorizations:[].concat(je(e.stepMapping[n].authorizations.slice(0,a)),[Ht(Ht({},e.stepMapping[n].authorizations[a]),{},{isVerifying:o})],je(e.stepMapping[n].authorizations.slice(a+1)))})))}},toggleDeleteAuthorizationFlag:function(e,t){var n=t.stepId,r=t.authId,o=t.isDeleting,a=t.error,s=e.stepMapping[n].authorizations.findIndex((function(e){return e.authorizationId===r}));return{stepMapping:Ht(Ht({},e.stepMapping),{},i({},n,Ht(Ht({},e.stepMapping[n]),{},{authorizations:[].concat(je(e.stepMapping[n].authorizations.slice(0,s)),[Ht(Ht({},e.stepMapping[n].authorizations[s]),{},{isDeleting:o,error:a})],je(e.stepMapping[n].authorizations.slice(s+1)))})))}},setStepAuthId:function(e,t){var n=t.stepId,r=t.authId;return{stepMapping:Ht(Ht({},e.stepMapping),{},i({},n,Ht(Ht({},e.stepMapping[n]),{},{selectedAuthId:r})))}},setStepAuthorization:function(t,n,r,o,a,s){var l,u,c=t.stepState.steps[t.stepState.stepIndex],d=t.stepMapping[n],p=e.getState().stepState;if("CONFIRMATION"!==c.type&&"CONFIRMATION"!==(null===(l=p.currentStep)||void 0===l?void 0:l.type)&&(null===(u=p.currentStep)||void 0===u?void 0:u.stepId)===n){var f=c.invalidFields;o&&delete f[n];var _=Ht(Ht({},t.stepState.steps[t.stepState.stepIndex]),{},{invalidFields:f,isValid:Object.keys(f).length<1,isCompleted:null!==d.selectedAuthId||o}),m=t.stepMapping[n].authorizations.findIndex((function(e){return e.authorizationId===r}));return{stepState:Ht(Ht({},t.stepState),{},{steps:[].concat(je(t.stepState.steps.slice(0,t.stepState.stepIndex)),[_],je(t.stepState.steps.slice(t.stepState.stepIndex+1))),currentStep:_,showValidation:!o&&!d.selectedAuthId}),stepMapping:Ht(Ht({},t.stepMapping),{},i({},n,Ht(Ht({},t.stepMapping[n]),{},{selectedAuthId:o?r:t.stepMapping[n].selectedAuthId,authorizations:[].concat(je(t.stepMapping[n].authorizations.slice(0,m)),[Ht(Ht({},t.stepMapping[n].authorizations[m]),{},{isVerified:o,isVerifying:!1,didFetchStatus:!0,error:""})],je(t.stepMapping[n].authorizations.slice(m+1)))}))),stepDataMapping:s?t.stepDataMapping:Ht(Ht({},t.stepDataMapping),{},i({},n,Ht(Ht({},t.stepDataMapping[n]),a.reduce((function(e,r){return Ht(Ht({},e),{},i({},r,Ht(Ht({},t.stepDataMapping[n][r]),{},{value:""})))}),{}))))}}return t},resetCustomMappingData:function(e,t){var n,r=null===(n=e.stepMapping[t].step.template_fields.filter((function(e){var t;return"DYNAMIC"===(null===(t=e.activity_field)||void 0===t?void 0:t.type)}))[0])||void 0===n?void 0:n.id;if(r){var o=e.stepDataMapping[t][r];return o&&(o.objectValue={}),{stepDataMapping:Ht(Ht({},e.stepDataMapping),{},i({},t,Ht(Ht({},e.stepDataMapping[t]),{},i({},r,o))))}}return e},setStepFieldData:function(e,t){var n=t.stepId,r=t.fieldId,o=t.value,a=t.isRequired,s=e.stepState.steps[e.stepState.stepIndex];if("CONFIRMATION"!==s.type){var l=s.invalidFields;o?delete l[r]:a&&(l[r]=null);var u=Ht(Ht({},e.stepState.steps[e.stepState.stepIndex]),{},{invalidFields:l,isValid:Object.keys(l).length<1});return{stepState:Ht(Ht({},e.stepState),{},{steps:[].concat(je(e.stepState.steps.slice(0,e.stepState.stepIndex)),[u],je(e.stepState.steps.slice(e.stepState.stepIndex+1))),currentStep:u,allStepsCompleted:!1}),stepDataMapping:Ht(Ht({},e.stepDataMapping),{},i({},n,Ht(Ht({},e.stepDataMapping[n]),{},i({},r,Ht(Ht({},e.stepDataMapping[n][r]),{},{value:o})))))}}return e},setStepMappingData:function(e,t){var n,r,o,a,s=null===(n=e.stepDataMapping[t.stepId][t.fieldId])||void 0===n?void 0:n.objectValue;t.value?r=Ht(Ht({},null!==(o=null===(a=e.stepDataMapping[t.stepId][t.fieldId])||void 0===a?void 0:a.objectValue)&&void 0!==o?o:{}),i({},t.id,t.value)):s&&(delete s[t.id],r=s,0===Object.keys(r).length&&(r=null));return r?{stepDataMapping:Ht(Ht({},e.stepDataMapping),{},i({},t.stepId,Ht(Ht({},e.stepDataMapping[t.stepId]),{},i({},t.fieldId,Ht(Ht({},e.stepDataMapping[t.stepId][t.fieldId]),{},{objectValue:r})))))}:e},reset:function(){return Vt}}},Wt=function(){return function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION__||window.top.__REDUX_DEVTOOLS_EXTENSION__,n=!1;return t?(e.devtools||(e.devtools=t.connect(),e.devtools.subscribe((function(t){"DISPATCH"===t.type&&t.state&&(n="JUMP_TO_ACTION"===t.payload.type||"JUMP_TO_STATE"===t.payload.type,e.setState(JSON.parse(t.state),!0))})),e.devtools.init(e.getState()),e.subscribe((function(t,r){var i=r&&r.name||"setState";n?n=!1:e.devtools.send(i,t)}))),e):(console.warn("Please install/enable Redux devtools extension"),e.devtools=null,e)}(function(e){var t=[];function n(e){for(var n=[],r=0;r<t.length;r++)t[r]===e?e=null:n.push(t[r]);t=n}function r(n,r,i){e=r?n:zt(zt({},e),n);for(var o=t,a=0;a<o.length;a++)o[a](e,i)}return e=e||{},{action:function(t){function n(e){r(e,!1,t)}return function(){for(var r=arguments,i=[e],o=0;o<arguments.length;o++)i.push(r[o]);var a=t.apply(this,i);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}}(Vt))},Jt=Nt({id:Lt(),name:Et(),description:Et(),app:Nt({id:Lt(),name:Et(),description:Et(),icon_url:Et(),color:Et(),publishing_status:Et(),category:Dt(Et()),app_type:Pt(Et()),action_url:Rt(Pt(Et())),created_at:Pt(Tt()),tags:Et()}),branding_app:Nt({id:Lt(),name:Et(),description:Et(),icon_url:Et(),color:Et(),publishing_status:Et(),category:Dt(Et()),app_type:Pt(Et()),action_url:Rt(Pt(Et())),created_at:Pt(Tt()),tags:Et()}),button_text:Rt(Et()),is_wizard:At(),publishing_status:Et(),steps:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r="Expected a "+e.type,i=t===n?"of `"+t+"`":"between `"+t+"` and `"+n+"`";return jt(e,"size",(function(e){if("number"==typeof e||e instanceof Date)return t<=e&&e<=n||r+" "+i+" but received `"+e+"`";if(e instanceof Map||e instanceof Set){var o=e.size;return t<=o&&o<=n||r+" with a size "+i+" but received one with a size of `"+o+"`"}var a=e.length;return t<=a&&a<=n||r+" with a length "+i+" but received one with a length of `"+a+"`"}))}(Dt(Nt({id:Lt(),weight:Lt(),title:Et(),is_visible:At(),activity:Nt({id:Lt(),name:Et(),type:Et(),endpoint:Et(),auth_required:At(),total_fields:Lt(),app:Nt({id:Lt(),name:Et(),description:Et(),icon_url:Et(),color:Et(),publishing_status:Et(),category:Dt(Et()),app_type:Pt(Et()),action_url:Rt(Pt(Et())),created_at:Pt(Tt()),tags:Et()}),activity_output:Rt(Et()),activity_output_url:Rt(Et()),dynamic_field_data_endpoint:Rt(Et())}),authorization_type:Nt({id:Lt(),type:Et(),authorizations:Dt(Nt({id:Lt(),authorization_type:Et(),app_user:Pt(Lt()),app_user_id:Pt(Lt()),disable_link:Pt(Et()),integration_count:Pt(Lt()),user_identity:Et()})),provider:Et(),is_sandbox_enabled:At(),authorization_url_sandbox:Et()}),template_fields:Dt(Nt({id:Lt(),is_required:At(),is_hidden:At(),default_value:Rt(Et()),weight:Lt(),description:Et(),summary:Rt(Et()),placeholder:Rt(Et()),activity_field:Rt(Nt({id:Lt(),machine_name:Et(),type:Et(),title:Et(),description:Et(),weight:Lt(),is_required:At(),child_fields:Rt(Et()),is_dynamic:At(),data_src:Rt(Et()),data_src_endpoint:Rt(Lt()),parent_fields:Rt(Et()),dynamic_field_src:Rt(Et()),default_value:Rt(Et()),auto_machine_name:Et(),dynamic_field_src_endpoint:Rt(Lt()),regex:Rt(Et()),is_searchable:At()})),title:Rt(Et()),type:Et(),child_field:Rt(Et()),child_field_value:Rt(Et()),button_text:Rt(Et()),icon_url:Rt(Et()),long_description:Rt(Et()),regex:Rt(Et()),regex_msg:Rt(Et()),is_visible:At()})),allow_multiple_authorizations:At(),step_authorization:Rt(Lt()),button_text:Rt(Et()),is_self_step:At(),summary:Rt(Et()),auth_description:Rt(Et()),hide_authorization:At(),machine_name:Rt(Et()),is_custom_machine_name:At()})),0,Number.POSITIVE_INFINITY)});function qt(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Gt,Kt="styles-module_loader__2ufbr";qt(".styles-module_loader__2ufbr {\n animation-name: styles-module_ckw__1aYrI;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: 50% 50%; }\n\n@keyframes styles-module_ckw__1aYrI {\n 0% {\n transform: rotate(0deg); }\n 100% {\n transform: rotate(360deg); } }\n");var Zt=function(){return _e(Gt||(Gt=e(["\n <svg\n class=",'\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M9.13037 0.179352C7.57047 -0.168051 5.94039 -0.00810102 4.47777 0.635883C3.01515 1.27987 1.79647 2.37421 0.999409 3.75937C0.202348 5.14453 -0.131421 6.74808 0.0467641 8.33623C0.224949 9.92438 0.90577 11.4141 1.98997 12.5882C3.07417 13.7623 4.50506 14.5593 6.07402 14.8632C7.64298 15.167 9.26799 14.9618 10.7121 14.2773C12.1562 13.5929 13.344 12.4651 14.1022 11.0582C14.8604 9.65144 15.1494 8.03922 14.9271 6.45665L14.1844 6.56098C14.3845 7.9853 14.1243 9.43629 13.442 10.7024C12.7596 11.9685 11.6906 12.9836 10.3909 13.5996C9.09119 14.2156 7.62869 14.4003 6.21662 14.1269C4.80455 13.8534 3.51675 13.136 2.54097 12.0794C1.56519 11.0227 0.952454 9.68194 0.792088 8.2526C0.631721 6.82327 0.932113 5.38008 1.64947 4.13343C2.36682 2.88679 3.46363 1.90188 4.77999 1.32229C6.09635 0.742709 7.56343 0.598754 8.96733 0.911417L9.13037 0.179352Z"\n fill="#E0E0E0"\n />\n <path\n d="M14.93 6.47755C14.7207 4.95709 14.0501 3.53742 13.0085 2.41017C11.9669 1.28292 10.6046 0.50235 9.10537 0.173829L8.94483 0.906446C10.2941 1.20212 11.5202 1.90462 12.4577 2.91915C13.3951 3.93368 13.9987 5.21138 14.187 6.57979L14.93 6.47755Z"\n fill="#ADADAD"\n />\n </svg>\n'])),Kt)};function Yt(e){return null!=e}var Qt,Xt,$t,en=he((function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var a=o(i);if("string"===a||"number"===a)e.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&e.push(s)}}else if("object"===a)if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&e.push(l);else e.push(i.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()})),tn="styles-module_preact-hint__2fj-j",nn="styles-module_preact-hint__top__eUj7n",rn="styles-module_preact-hint__bottom__2goUI",on="styles-module_preact-hint__content__23OpK";function an(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ln(t){var n=Xe(null),r=Ve(Ye(1e4),2),i=r[0],o=r[1],a=t.position;return Qe((function(){n.current&&o(n.current.getBoundingClientRect().width)}),[n]),_e(Qt||(Qt=e(['\n <div\n class="','"\n style=',"\n >\n <pre class="," ref=",">\n ","\n </pre\n >\n </div>\n "])),"".concat(tn," ").concat("top"===a?nn:rn),sn(sn({},{left:t.targetBoundingRect.left-t.rootBoundingRect.left-i/2+t.targetBoundingRect.width/2}),"top"===a?{bottom:t.rootBoundingRect.height-t.targetBoundingRect.top+t.rootBoundingRect.top+2}:{top:t.rootBoundingRect.height-t.targetBoundingRect.top+t.rootBoundingRect.top+2}),on,n,t.template?t.template(t.content):t.content)}qt(".styles-module_preact-hint__2fj-j {\n position: absolute;\n z-index: 9999;\n cursor: default; }\n .styles-module_preact-hint__2fj-j::after {\n content: '';\n width: 0;\n height: 0;\n margin: auto;\n display: block;\n position: absolute;\n border: 4px solid transparent; }\n .styles-module_preact-hint__2fj-j.styles-module_preact-hint__top__eUj7n {\n padding-bottom: 4px; }\n .styles-module_preact-hint__2fj-j.styles-module_preact-hint__top__eUj7n::after {\n top: auto;\n left: 0;\n right: 0;\n bottom: 0;\n border-bottom: none;\n border-top-color: #000; }\n .styles-module_preact-hint__2fj-j.styles-module_preact-hint__bottom__2goUI {\n padding-top: 4px; }\n .styles-module_preact-hint__2fj-j.styles-module_preact-hint__bottom__2goUI::after {\n top: 0;\n left: 0;\n right: 0;\n bottom: auto;\n border-top: none;\n border-bottom-color: #000; }\n\n.styles-module_preact-hint__content__23OpK {\n font-family: inherit;\n background: #000000;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.062132);\n padding: 8px;\n margin: 0;\n border-radius: 2px;\n font-style: normal;\n margin: 0;\n line-height: 12px;\n font-weight: normal;\n font-size: 10px;\n color: #ffffff;\n display: block; }\n");var un=function(t){var n=t.position,r=void 0===n?"bottom":n,i=t.attribute,o=void 0===i?"data-hint":i,a=Ve(Ye(""),2),s=a[0],l=a[1],u=Ve(Ye(null),2),c=u[0],d=u[1],p=Ve(Ye(null),2),f=p[0],_=p[1],m=et((function(e){d(e),c&&(c.addEventListener("mouseover",(function(e){e.target instanceof Element&&e.target.hasAttribute(o)&&(l(e.target.getAttribute(o)||""),_(e.target.getBoundingClientRect()))})),c.addEventListener("mouseout",(function(e){e.target instanceof Element&&e.target.hasAttribute(o)&&(l(""),_(null))})),t.dismissOnClick&&c.addEventListener("click",(function(){l(""),_(null)})))}),[c]);return _e(Xt||(Xt=e(["\n <div ref=",' style="position: relative">\n ',"\n ","\n </div>\n "])),m,s&&c&&f&&_e($t||($t=e([" <","\n content=","\n position=","\n template=","\n rootBoundingRect=","\n targetBoundingRect=","\n />"])),ln,s,r,t.template,null==c?void 0:c.getBoundingClientRect(),f),t.children)},cn="styles-module_button__osBYJ",dn="styles-module_buttonPrimary__1u5p2",pn="styles-module_disabled__CiT_f",fn="styles-module_buttonSecondary__2HV1m",_n="styles-module_buttonLink__39jcU",mn="styles-module_loader__3dlUQ";qt(".styles-module_button__osBYJ {\n outline: none;\n cursor: pointer;\n -webkit-appearance: none;\n appearance: none;\n font-size: 12px;\n padding: 0px 15px;\n height: 30px; }\n .styles-module_button__osBYJ.styles-module_buttonPrimary__1u5p2 {\n border: 1px solid #5f4d86;\n background: #5f4d86;\n border-radius: 4px;\n font-size: 12px;\n color: #ffffff; }\n .styles-module_button__osBYJ.styles-module_buttonPrimary__1u5p2:not(.styles-module_disabled__CiT_f):hover {\n background-color: #473a64; }\n .styles-module_button__osBYJ.styles-module_buttonSecondary__2HV1m {\n border: 1px solid #5f4d86;\n background: transparent;\n text-align: center;\n font-size: 12px;\n color: #5f4d86;\n border-radius: 4px; }\n .styles-module_button__osBYJ.styles-module_buttonSecondary__2HV1m:not(.styles-module_disabled__CiT_f):hover {\n background: #5f4d86;\n color: white; }\n .styles-module_button__osBYJ.styles-module_buttonLink__39jcU {\n border: none;\n color: #5f4d86;\n font-weight: 500;\n font-size: 12px;\n background: transparent;\n padding: 0;\n margin: 0; }\n .styles-module_button__osBYJ.styles-module_buttonLink__39jcU:not(.styles-module_disabled__CiT_f):hover {\n color: #473a64; }\n .styles-module_button__osBYJ.styles-module_disabled__CiT_f {\n opacity: 0.5;\n cursor: not-allowed; }\n .styles-module_button__osBYJ .styles-module_loader__3dlUQ {\n display: flex; }\n .styles-module_button__osBYJ .styles-module_loader__3dlUQ svg {\n animation-name: styles-module_fadeInOut__2G3PU;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n animation-delay: 0;\n margin: 0px 2px; }\n .styles-module_button__osBYJ .styles-module_loader__3dlUQ svg:nth-child(2) {\n animation-delay: 0.3s; }\n .styles-module_button__osBYJ .styles-module_loader__3dlUQ svg:nth-child(3) {\n animation-delay: 0.6s; }\n\n@keyframes styles-module_fadeInOut__2G3PU {\n 0% {\n opacity: 0.3; }\n 50% {\n opacity: 1; }\n 100% {\n opacity: 0.3; } }\n");var vn,hn,yn,gn,bn,wn=["label","type","color","backgroundColor","disabled","tooltip","dismissOnClick","isLoading","position","onClick"];function xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}!function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.LINK="link"}(bn||(bn={}));var In,kn,Cn,Sn=function(){return _e(vn||(vn=e(['\n <svg\n width="6"\n height="6"\n viewBox="0 0 6 6"\n fill="white"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle cx="3" cy="3" r="3" fill="white" />\n </svg>\n'])))},On=function(){return _e(hn||(hn=e(["\n <div class=",">\n <"," />\n <"," />\n <"," />\n </div>\n"])),mn,Sn,Sn,Sn)},Mn=function(t){var n,r=t.label,o=t.type,a=void 0===o?bn.PRIMARY:o,s=t.color,l=void 0===s?null:s,u=t.backgroundColor,c=void 0===u?null:u,d=t.disabled,p=void 0!==d&&d,f=t.tooltip,_=t.dismissOnClick,m=void 0===_||_,v=t.isLoading,h=void 0!==v&&v,y=t.position,g=void 0===y?"bottom":y,b=t.onClick,w=void 0===b?void 0:b,x=ze(t,wn);return _e(yn||(yn=e(["\n <"," dismissOnClick="," position=",'>\n <button\n type="button"\n onclick=',"\n data-hint=","\n class=","\n style=","\n ","\n >\n ","\n </button>\n <//>\n "])),un,m,g,w,f||null,en(cn,(i(n={},dn,a===bn.PRIMARY),i(n,fn,a===bn.SECONDARY),i(n,_n,a===bn.LINK),i(n,pn,p),n)),{backgroundColor:a===bn.PRIMARY?c:null,borderColor:a===bn.PRIMARY?c:l,color:l},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xn(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},x),h?_e(gn||(gn=e(["<"," />"])),On):r)},Dn="styles-module_errorPageWrapper__BMBHQ",An="styles-module_errorTitle__1baLE",Tn="styles-module_errorDescription__1dTc9",Rn="styles-module_errorContainer__3WprN",Ln="styles-module_errorPayload__OjsC-";qt(".styles-module_errorPageWrapper__BMBHQ {\n font-family: monospace;\n border: 1px solid red;\n padding: 30px; }\n .styles-module_errorPageWrapper__BMBHQ .styles-module_errorTitle__1baLE {\n color: #b61717;\n font-weight: bold;\n font-size: 16px;\n line-height: 20px;\n margin-bottom: 8px; }\n .styles-module_errorPageWrapper__BMBHQ .styles-module_errorDescription__1dTc9 {\n font-size: 14px;\n margin-bottom: 18px; }\n .styles-module_errorPageWrapper__BMBHQ .styles-module_errorContainer__3WprN {\n overflow: hidden;\n background: #ffebeb;\n padding: 4px;\n margin-bottom: 20px; }\n .styles-module_errorPageWrapper__BMBHQ .styles-module_errorPayload__OjsC- {\n margin: 0;\n padding: 8px 12px; }\n");var Nn=function(t){var n=t.title,r=t.description,i=t.errorPayload,o=t.onDismiss,a=void 0===o?null:o;return _e(In||(In=e(['\n <div class="','">\n <div class=',">","</div>\n <div class=",">","</div>\n ","\n ","\n </div>\n "])),Dn,An,n,Tn,r,i&&_e(kn||(kn=e(["\n <div class=",">\n <pre class=",">","</pre>\n <pre class=",">","</pre>\n </div>\n "])),Rn,Ln,i.message,Ln,i.stack),a&&_e(Cn||(Cn=e(["\n <div>\n <",' label="Dismiss" onClick='," />\n </div>\n "])),Mn,a))};function Pn(e){var t,n,r,i,o=Ve(Ye({width:0,height:0}),2),a=o[0],s=o[1],l=et((function(){var t=null==e?void 0:e.current;t&&s({width:t.offsetWidth||0,height:t.offsetHeight||0})}),[e]);return Qe((function(){l()}),[]),t="resize",n=l,i=Xe(),Qe((function(){var e=(null==r?void 0:r.current)||window;if(e&&e.addEventListener){i.current!==n&&(i.current=n);var o=function(e){null!=i&&i.current&&i.current(e)};return e.addEventListener(t,o),function(){e.removeEventListener(t,o)}}}),[t,r,n]),a}var En,jn,Fn,zn,Vn,Un="styles-module_navigation__2IuNI",Hn="styles-module_collapse__G_01I",Bn="styles-module_dots__3ItWV",Wn="styles-module_popup__39sdx",Jn="styles-module_show__L1e5K",qn="styles-module_stepItem__NPXF_",Gn="styles-module_arrow__3C8To",Kn="styles-module_navItem__1kxtL",Zn="styles-module_navItemContent__28oLq",Yn="styles-module_imgContainer__wbjM4",Qn="styles-module_active__28cMj",Xn="styles-module_disabled__1Ltqi";function $n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_navigation__2IuNI {\n margin-bottom: 45px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center; }\n\n.styles-module_collapse__G_01I {\n display: flex;\n width: 30px;\n height: 22px;\n padding-top: 2px;\n align-items: center;\n margin-right: 20px; }\n .styles-module_collapse__G_01I .styles-module_dots__3ItWV {\n cursor: pointer;\n height: 16px;\n padding-right: 10px; }\n .styles-module_collapse__G_01I .styles-module_popup__39sdx {\n position: absolute;\n display: none;\n padding: 0 10px;\n background: #ffffff;\n border: 1px solid #f3f3f3;\n box-shadow: 0px 2px 7px rgba(162, 162, 162, 0.25);\n border-radius: 4px;\n top: 28px;\n z-index: 100; }\n .styles-module_collapse__G_01I .styles-module_popup__39sdx.styles-module_show__L1e5K {\n display: block; }\n .styles-module_collapse__G_01I .styles-module_popup__39sdx .styles-module_stepItem__NPXF_ {\n padding: 10px 0px; }\n .styles-module_collapse__G_01I .styles-module_popup__39sdx .styles-module_stepItem__NPXF_:not(:last-child) {\n border-bottom: 1px solid #f3f3f3; }\n .styles-module_collapse__G_01I .styles-module_arrow__3C8To svg {\n opacity: 0.5; }\n\n.styles-module_navItem__1kxtL {\n cursor: pointer;\n color: #1f2937; }\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq {\n display: flex;\n align-items: center;\n padding-right: 0.25rem; }\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq p {\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 400;\n color: #333333; }\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq .styles-module_imgContainer__wbjM4 {\n position: relative;\n margin-right: 0.5rem;\n height: 15px;\n width: 15px;\n overflow: hidden;\n border-radius: 9999px; }\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq .styles-module_imgContainer__wbjM4 img,\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq .styles-module_imgContainer__wbjM4 svg {\n position: absolute;\n top: 0px;\n left: 0px;\n height: 100%;\n width: 100%;\n object-fit: cover; }\n .styles-module_navItem__1kxtL .styles-module_arrow__3C8To {\n margin-top: 2px;\n margin-left: 0.75rem;\n margin-right: 0.5rem; }\n .styles-module_navItem__1kxtL.styles-module_active__28cMj {\n opacity: 1; }\n .styles-module_navItem__1kxtL.styles-module_active__28cMj p {\n font-weight: 500; }\n .styles-module_navItem__1kxtL.styles-module_disabled__1Ltqi {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n opacity: 0.5; }\n .styles-module_navItem__1kxtL.styles-module_disabled__1Ltqi p {\n font-weight: 400; }\n");var er,tr,nr=_e(En||(En=e([' <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n>\n <rect opacity="0.7" width="15" height="15" rx="7.5" fill="#2ECC71" />\n <path\n d="M9.23107 6.34619L6.96066 8.94234L5.76953 7.58033"\n stroke="white"\n stroke-width="1.2"\n stroke-linecap="round"\n />\n</svg>']))),rr=_e(jn||(jn=e(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="7.5"\n cy="7.5"\n r="6.75"\n fill="white"\n stroke="#2ECC71"\n stroke-width="1.5"\n />\n <path\n d="M10.3333 5.5L6.83522 9.5L5 7.40148"\n stroke="#2ECC71"\n stroke-width="1.5"\n stroke-linecap="round"\n />\n </svg>\n']))),ir=function(t){Ie(i,G);var n=$n(i);function i(){return r(this,i),n.apply(this,arguments)}return lt(i,[{key:"render",value:function(){var t=this.props,n=t.logoUrl,r=t.isActive,i=void 0!==r&&r,o=t.isCompleted,a=void 0!==o&&o,s=t.isDisabled,l=void 0!==s&&s,u=t.isLastStep,c=void 0!==u&&u,d=t.onClick,p=void 0===d?function(){return null}:d,f=t.showArrow,_=void 0===f||f;return _e(Fn||(Fn=e(["\n <div\n class=","\n onclick=",'\n tabindex="-1"\n role="button"\n >\n <div class=',">\n <div class=",">\n ","\n ","\n </div>\n <p>","</p>\n ","\n </div>\n </div>\n "])),"".concat(Kn," ").concat(l?Xn:""," ").concat(i?Qn:""),p,Zn,Yn,!a||i?_e(zn||(zn=e(["<img src="," />"])),n):nr,c&&rr,this.props.label,!c&&_&&_e(Vn||(Vn=e(["\n <div class=",'>\n <svg\n width="6"\n height="11"\n viewBox="0 0 6 11"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M0.917969 1.33366L5.08464 5.50033L0.917969 9.66699"\n stroke="#999999"\n stroke-linecap="round"\n />\n </svg>\n </div>\n '])),Gn))}}]),i}();function or(e,t){Qe((function(){var n=function(n){n.target instanceof HTMLElement&&(!e.current||e.current.contains(n.target))||t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),function(){document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[e,t])}var ar,sr,lr,ur,cr,dr=function(t){var n=t.steps,r=t.currentStepIndex,i=t.isPreviewMode,o=t.changeStep,a=Xe(),s=Xe(),l=Ve(Ye(!1),2),u=l[0],c=l[1];return or(a,(function(){return u?c(!1):null})),_e(er||(er=e(["\n <div class=",">\n <div\n class=","\n ref=","\n onclick=",'\n >\n <svg\n width="16"\n height="17"\n viewBox="0 0 16 17"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M3.60039 9.83213C4.26313 9.83213 4.80039 9.29487 4.80039 8.63213C4.80039 7.96939 4.26313 7.43213 3.60039 7.43213C2.93765 7.43213 2.40039 7.96939 2.40039 8.63213C2.40039 9.29487 2.93765 9.83213 3.60039 9.83213Z"\n fill="#333333"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M7.60039 9.83213C8.26313 9.83213 8.80039 9.29487 8.80039 8.63213C8.80039 7.96939 8.26313 7.43213 7.60039 7.43213C6.93765 7.43213 6.40039 7.96939 6.40039 8.63213C6.40039 9.29487 6.93765 9.83213 7.60039 9.83213Z"\n fill="#333333"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M11.6004 9.83213C12.2631 9.83213 12.8004 9.29487 12.8004 8.63213C12.8004 7.96939 12.2631 7.43213 11.6004 7.43213C10.9376 7.43213 10.4004 7.96939 10.4004 8.63213C10.4004 9.29487 10.9376 9.83213 11.6004 9.83213Z"\n fill="#333333"\n />\n </svg>\n </div>\n <div\n ref=','\n class="'," ",'"\n >\n ',"\n </div>\n <div class=",'>\n <svg\n width="6"\n height="11"\n viewBox="0 0 6 11"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M0.917969 1.33366L5.08464 5.50033L0.917969 9.66699"\n stroke="#999999"\n stroke-linecap="round"\n />\n </svg>\n </div>\n </div>\n '])),Hn,Bn,s,(function(){return c(!0)}),a,Wn,u?Jn:"",n.map((function(t){return _e(tr||(tr=e(["<div class=",">\n <","\n label=","\n logoUrl=","\n isCompleted=","\n isActive=","\n isDisabled=","\n isLastStep=","\n showArrow=","\n onClick=","\n />\n </div>"])),qn,ir,"CONFIRMATION"!==t.type?t.title:"Confirmation","CONFIRMATION"!==t.type&&t.iconUrl,!i&&t.isCompleted,"CONFIRMATION"!==t.type&&r===t.itemIndex,i&&Number(r)!==t.itemIndex||Number(r)<t.itemIndex,!1,!1,(function(){c(!1),o(t.itemIndex)}))})),Gn)};function pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pr(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _r,mr,vr,hr,yr=ge.connect("stepState",Bt)((function(t){var n=Xe(),r=t.gotoStep,i=t.stepState,o=i.stepIndex,a=i.steps,s=i.currentStep,l=i.allStepsCompleted,u=tt(Ft),c=Pn(n).width,d=function(e,t){var n=Ve(Ye(e),2),r=n[0],i=n[1];return Qe((function(){var n=setTimeout((function(){return i(e)}),t||500);return function(){clearTimeout(n)}}),[e,t]),r}(c,150),p=Ve(Ye([]),2),f=p[0],_=p[1];Qe((function(){var e=0;e=0===d?c:d;var t=[];if(n.current){var r=-1;e/220<=a.length?a.length<=2?t.push({type:"VISIBLE",steps:a.map((function(e){return r+=1,fr(fr({},e),{},{itemIndex:r})}))}):a.length>2&&(r+=1,t.push({type:"VISIBLE",steps:[fr(fr({},a[0]),{},{itemIndex:r})]}),0!==o&&o!==a.length?(o>1&&t.push({type:"COLLAPSED",steps:a.slice(1,o).map((function(e){return r+=1,fr(fr({},e),{},{itemIndex:r})}))}),t.push({type:"VISIBLE",steps:[fr(fr({},a[o]),{},{itemIndex:o})]}),r+=1,a.length-o>1&&t.push({type:"COLLAPSED",steps:a.slice(o+1,a.length).map((function(e){return r+=1,fr(fr({},e),{},{itemIndex:r})}))})):t.push({type:"COLLAPSED",steps:a.slice(1,a.length).map((function(e){return r+=1,fr(fr({},e),{},{itemIndex:r})}))})):t=[{type:"VISIBLE",steps:a.map((function(e,t){return fr(fr({},e),{},{itemIndex:t})}))}]}_(t)}),[a,c,d,o]);var m=function(e){r(e)};return _e(ar||(ar=e(["\n <div class="," ref=",">\n ","\n ","\n </div>\n "])),Un,n,f.map((function(t){return"VISIBLE"===t.type?t.steps.map((function(t){return _e(sr||(sr=e(["\n <div\n class=","\n style=","\n >\n <","\n label=","\n logoUrl=","\n isCompleted=","\n isActive=","\n isDisabled=","\n isLastStep=","\n onClick=","\n />\n </div>\n "])),qn,{maxWidth:220},ir,"CONFIRMATION"!==t.type?t.title:"Confirmation","CONFIRMATION"!==t.type&&t.iconUrl,!(null!=u&&u.isPreviewMode)&&t.isCompleted,"CONFIRMATION"!==(null==s?void 0:s.type)&&"CONFIRMATION"!==t.type&&o===t.itemIndex,!l&&((null==u?void 0:u.isPreviewMode)&&Number(o)!==t.itemIndex||Number(o)<t.itemIndex),t.itemIndex===a.length,(function(){return m(t.itemIndex)}))})):"COLLAPSED"===t.type?_e(lr||(lr=e(["\n <","\n isPreviewMode=","\n currentStepIndex=","\n changeStep=","\n steps=","\n />\n "])),dr,null==u?void 0:u.isPreviewMode,o,m,t.steps):_e(ur||(ur=e(["<></>"])))})),f.length>0&&_e(cr||(cr=e(["\n <",'\n label="Confirmation"\n logoUrl=""\n isCompleted=',"\n isActive=","\n isDisabled=","\n isLastStep=","\n onClick=","\n />\n "])),ir,!0,void 0!==s&&o===a.length,!l&&void 0!==s&&o!==a.length,!0,(function(){var e;return m(null!==(e=a.length)&&void 0!==e?e:0)})))})),gr="styles-module_radio__1wJfU",br="styles-module_button__3PLW1",wr="styles-module_text__Jq7I0",xr="styles-module_description__2UsHV";qt(".styles-module_radioGroup__1aPpR fieldset {\n border: none;\n padding: 0; }\n\n.styles-module_radio__1wJfU {\n position: relative;\n display: flex;\n align-items: center;\n margin: 10px 0; }\n .styles-module_radio__1wJfU .styles-module_button__3PLW1 {\n position: absolute;\n width: 15px;\n height: 15px;\n left: 0;\n display: inline-block;\n border-radius: 9999px;\n background: transparent; }\n .styles-module_radio__1wJfU .styles-module_button__3PLW1 svg {\n width: 100%;\n height: 100%; }\n .styles-module_radio__1wJfU input[type='radio'] {\n opacity: 0;\n margin: 0; }\n .styles-module_radio__1wJfU label {\n display: flex;\n margin-left: 15px;\n align-items: center;\n cursor: pointer; }\n .styles-module_radio__1wJfU .styles-module_text__Jq7I0 {\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n margin: 2px 0;\n color: #333333; }\n .styles-module_radio__1wJfU .styles-module_description__2UsHV {\n font-size: 12px;\n line-height: 15px;\n color: #999999; }\n");var Ir,kr=function(t){var n=t.label,r=t.name,i=t.description,o=void 0===i?null:i,a=t.value,s=t.isChecked,l=void 0!==s&&s,u=t.handleChange,c=void 0===u?function(){return null}:u;return _e(_r||(_r=e(["\n <div class=",">\n <input\n id=",'\n type="radio"\n name=',"\n value=","\n checked=","\n onclick=","\n />\n <div>\n <label for=",">\n <div class=",">\n ","\n </div>\n <div>\n <div class=",">","</div>\n ","\n </div>\n </label>\n </div>\n </div>\n "])),gr,a,r,a,l,(function(e){if(e.currentTarget instanceof HTMLInputElement){var t=e.currentTarget.value;c(t)}}),a,br,_e(l?mr||(mr=e(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5Z"\n fill="white"\n stroke="#5F4D86"\n stroke-width="2"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M7.5 11C9.433 11 11 9.433 11 7.5C11 5.567 9.433 4 7.5 4C5.567 4 4 5.567 4 7.5C4 9.433 5.567 11 7.5 11Z"\n fill="#5F4D86"\n />\n </svg>\n '])):vr||(vr=e(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5Z"\n fill="white"\n stroke="#E2E0DB"\n stroke-width="2"\n />\n </svg>\n ']))),wr,n,o&&_e(hr||(hr=e(["<div class=",">","</div>"])),xr,o))},Cr="styles-module_errorMessage__2b8A_";qt(".styles-module_errorMessage__2b8A_ {\n margin-top: 4px;\n font-size: 12px;\n color: #f05c42; }\n");var Sr,Or,Mr,Dr=function(t){var n=t.children;return _e(Ir||(Ir=e([" <div class=",">","</div> "])),Cr,n)},Ar="styles-module_label__PbFlo",Tr="styles-module_required__1XFqi";qt(".styles-module_label__PbFlo label > div:first-child {\n font-style: normal;\n font-weight: 500;\n font-size: 14px;\n line-height: 17px;\n color: #333333;\n margin-bottom: 5px; }\n\n.styles-module_label__PbFlo label > div:nth-child(2) {\n font-size: 14px;\n line-height: 17px;\n letter-spacing: -0.2px;\n color: #8c8c8c; }\n\n.styles-module_label__PbFlo .styles-module_required__1XFqi {\n color: red;\n font-size: 16px;\n margin-left: 2px; }\n");var Rr=function(t){var n=t.title,r=t.description,i=t.isRequired,o=void 0!==i&&i;return _e(Sr||(Sr=e(["\n <div class=",">\n <label>\n <div>\n ","\n ","\n </div>\n ","\n </label>\n </div>\n "])),Ar,n,o&&_e(Or||(Or=e(["<span class=",">*</span>"])),Tr),r&&_e(Mr||(Mr=e(["<div>","</div>"])),r))},Lr=function(){return!["undefined"==typeof window?"undefined":o(window),"undefined"==typeof document?"undefined":o(document)].includes("undefined")};var Nr,Pr,Er,jr,Fr,zr,Vr,Ur,Hr,Br,Wr,Jr="styles-module_authSelectorWrap__34g8J",qr="styles-module_rows__1gpAK",Gr="styles-module_error__aL4zj",Kr="styles-module_checkboxRow__3Q67t",Zr="styles-module_statusWrap__3amIr",Yr="styles-module_deleteIcon__1mAJb",Qr="styles-module_status__OwFQa",Xr="styles-module_statusRed__1FG13",$r="styles-module_statusOrange__1FNhi",ei="styles-module_statusGreen__1OD_4",ti="styles-module_resend__To8qG";function ni(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_authSelectorWrap__34g8J .styles-module_label__19jW8 {\n font-weight: 800;\n font-size: 14px;\n color: #333333;\n line-height: 20px;\n margin-bottom: 5px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_label__19jW8 span {\n color: #ff4d34;\n margin-left: 2px;\n font-size: 16px; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_rows__1gpAK {\n margin-top: 10px;\n margin-bottom: 20px; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_error__aL4zj {\n color: #f05c42; }\n .styles-module_authSelectorWrap__34g8J .styles-module_error__aL4zj button {\n color: #f05c42;\n border-color: #f05c42; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_errorMessage__3YjSh {\n margin-top: 4px;\n font-size: 12px;\n line-height: 15px;\n letter-spacing: -0.197647px;\n color: #f05c42; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_description__2c5sj {\n font-size: 14px;\n line-height: 20px;\n color: #8c8c8c;\n margin-bottom: 10px; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t {\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: #333;\n font-size: 14px;\n min-width: 380px;\n padding-right: 8px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr {\n display: flex;\n align-items: center;\n font-size: 12px;\n margin-left: 20px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_deleteIcon__1mAJb {\n padding-left: 8px;\n padding-right: 8px;\n display: flex;\n align-items: center;\n cursor: pointer; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_deleteIcon__1mAJb svg {\n cursor: pointer;\n visibility: hidden;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa {\n position: relative; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa div {\n display: flex;\n align-items: center; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa svg {\n margin-left: 8px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusRed__1FG13,\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusOrange__1FNhi,\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusGreen__1OD_4 {\n width: 5px;\n height: 5px;\n border-radius: 9999px;\n margin: 0 8px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusRed__1FG13 {\n background: #e26154; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusOrange__1FNhi {\n background: #fcc700; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusGreen__1OD_4 {\n background: #2ecc71; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa span {\n margin-left: 10px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_resend__To8qG {\n cursor: pointer; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t:hover .styles-module_statusWrap__3amIr svg {\n visibility: visible;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n user-select: auto; }\n");var ri=function(){return _e(Nr||(Nr=e(["\n <svg\n class=",'\n width="13"\n height="15"\n viewBox="0 0 13 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.8403 5.34L10.1453 6.345C10.5053 6.96 10.7003 7.68 10.7003 8.445C10.7003 10.77 8.81031 12.645 6.50031 12.645C4.19031 12.645 2.30031 10.755 2.30031 8.445C2.30031 6.135 4.19031 4.245 6.50031 4.245V6.15L11.1053 3.27L6.50031 0.375V2.28C3.09531 2.28 0.320312 5.055 0.320312 8.46C0.320313 11.85 3.09531 14.625 6.50031 14.625C9.90531 14.625 12.6803 11.85 12.6803 8.445C12.6803 7.32 12.3653 6.255 11.8403 5.34Z"\n fill="#8D8D8D"\n />\n </svg>\n'])),ti)},ii=function(t){var n=t.label,r=t.name,i=t.value,o=t.isChecked,a=t.status,s=void 0===a?"IDLE":a,l=t.isDeleting,u=void 0!==l&&l,c=t.handleChange,d=t.handleReverify,p=t.handleDelete,f=void 0===p?function(){return null}:p,_=t.error;return _e(Pr||(Pr=e(["\n <div class=",">\n <","\n label=","\n name=","\n value=","\n isChecked=","\n handleChange=","\n />\n <div class=",">\n <div class=",">\n <div>\n ","\n </div>\n <div>\n ","\n </div>\n <div>\n ","\n </div>\n ","\n ","\n </div>\n <div class="," onclick=",">\n ","\n </div>\n </div>\n </div>\n "])),Kr,kr,n,r,i,o,c,Zr,Qr,"VERIFYING"===s&&!u&&_e(Er||(Er=e(["<div class="," />\n Verifying <"," /> "])),$r,Zt),"CONNECTED"===s&&!_&&!u&&_e(jr||(jr=e(["<div class="," />\n Connected"])),ei),"ERROR"===s&&!u&&_e(Fr||(Fr=e(["<div class="," />\n Failed\n <div onclick=","><"," /></div>"])),Xr,d,ri),u&&_e(zr||(zr=e(["<"," />"])),Zt),_&&!u&&!("VERIFYING"===s)&&_e(Vr||(Vr=e(["<div class=",">","</div>"])),Gr,_),Yr,f,!("VERIFYING"===s||u)&&_e(Ur||(Ur=e(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M1.5 4.1999H13.65" stroke="#F05C42" />\n <path\n d="M11.6254 5.5498V6.2248L10.9504 13.6498H4.20039L3.52539 6.2248V5.5498"\n stroke="#F05C42"\n stroke-linejoin="round"\n />\n <path\n d="M5.55078 3.525V2.175C5.55078 1.80221 5.85299 1.5 6.22578 1.5H8.92578C9.29857 1.5 9.60078 1.80221 9.60078 2.175V3.525"\n stroke="#F05C42"\n />\n </svg>\n ']))))},oi=function(t){Ie(o,G);var n=ni(o);function o(e){var t;return r(this,o),i(we(t=n.call(this,e)),"verifyAuth",(function(e,n){var r=t.props.stepId,i=t.props.stepMapping[r].authorizations[e];i&&(i.isVerified?t.props.onAuthSelected(i.authorizationId,!0,!!n):(t.props.toggleVerifyAuthorizationFlag({stepId:r,authId:i.authorizationId,isVerifying:!0}),t.setState({isLoading:!0}),t.props.apiHandler.verifyOAuth(i.authorizationId).then((function(e){e?t.props.onAuthSelected(i.authorizationId,!0,!!n):t.props.onAuthSelected(i.authorizationId,!1,!!n)})).catch((function(e){return console.error(e)})).finally((function(){t.props.toggleVerifyAuthorizationFlag({stepId:r,authId:i.authorizationId,isVerifying:!1}),t.setState({isLoading:!1})}))))})),i(we(t),"deleteAuth",(function(e){var n=t.props.stepId,r=t.props.stepMapping[n].authorizations[e];t.props.toggleDeleteAuthorizationFlag({stepId:n,authId:r.authorizationId,isDeleting:!0,error:""}),t.props.apiHandler.deleteAuth(r.authorizationId).then((function(e){200===(null==e?void 0:e.status)?t.props.removeAuthorization({stepId:n,authId:r.authorizationId}):405===(null==e?void 0:e.status)?t.props.toggleDeleteAuthorizationFlag({stepId:n,authId:r.authorizationId,isDeleting:!1,error:"".concat(e.data)}):t.props.toggleDeleteAuthorizationFlag({stepId:n,authId:r.authorizationId,isDeleting:!1,error:"An unexpected error occurred"})})).catch((function(e){console.error(e)}))})),i(we(t),"onAuthResponseReceived",(function(e){void 0!==e&&e.data.activity_name&&(console.info(e.data),t.props.stepId&&(e.data.already_exists?t.props.setStepAuthId({stepId:t.props.stepId,authId:Number(e.data.authorization_id)}):t.props.addAuthorization({stepId:t.props.stepId,authData:{authorizationId:e.data.authorization_id,userIdentity:e.data.user_identity,disableLink:"",authType:"",isVerified:!1,didFetchStatus:!1,isVerifying:!1,isDeleting:!1,error:""}})))})),i(we(t),"getAuthStatus",(function(e){if(!e)return null;var t="IDLE";return e.isVerified&&e.didFetchStatus&&(t="CONNECTED"),!e.isVerified&&e.didFetchStatus&&(t="ERROR"),e.isVerifying&&(t="VERIFYING"),t})),i(we(t),"getError",(function(){var e=t.props.stepId,n=t.props.stepMapping[e];return n.authorizations?"Please select a valid ".concat(n.step.activity.app.name," account"):"Please add a valid ".concat(n.step.activity.app.name," account")})),i(we(t),"openAuthWindow",(function(){var e=t.props,n=e.stepMapping[e.stepId].step;n&&function(e,t,n,r,i){if(n.top){var o=n.top.outerHeight/2+n.top.screenY-i/2,a=n.top.outerWidth/2+n.top.screenX-r/2;return n.open(e,t,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=".concat(r,", height=").concat(i,", top=").concat(o,", left=").concat(a))}}(t.context.apiHandler.getAuthUrl(n.authorization_type.id),"Auth Window",window,800,600)})),t.state={isLoading:!1,fetched:!1},t}return lt(o,[{key:"componentDidMount",value:function(){Lr()&&window.addEventListener("message",this.onAuthResponseReceived);var e=this.props,t=e.stepId,n=e.stepMapping,r=n[t].selectedAuthId,i=n[t].authorizations.findIndex((function(e){return e.authorizationId===r}));n[t].selectedAuthId&&"IDLE"===this.getAuthStatus(n[t].authorizations[i])&&this.verifyAuth(i,!0)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.stepId,r=t.stepMapping,i=r[n],o=i.selectedAuthId,a=r[n].authorizations.findIndex((function(e){return e.authorizationId===o}));o!==e.stepMapping[n].selectedAuthId&&a&&this.verifyAuth(a),i.authorizations.length===e.stepMapping[n].authorizations.length+1&&this.verifyAuth(i.authorizations.length-1)}},{key:"componentWillUnmount",value:function(){Lr()&&window.removeEventListener("message",this.onAuthResponseReceived)}},{key:"render",value:function(){var t=this,n=this.props,r=n.stepId,i=n.showErrors,o=void 0!==i&&i,a=this.props.stepMapping[r],s=a.authorizations;return _e(Hr||(Hr=e(["\n <div class=",">\n <",'\n title="Connect account"\n description=',"\n isRequired=","\n />\n <div class=",">\n ","\n </div>\n <div class=",">\n <","\n onClick=","\n label=","\n type=","\n disabled=","\n >\n <//>\n </div>\n ","\n </div>\n "])),Jr,Rr,"Select your ".concat(a.step.activity.app.name," account"),!0,qr,s.map((function(n,r){return _e(Br||(Br=e(["<","\n label=","\n value=","\n status=","\n isChecked=","\n isDeleting=","\n error=","\n handleChange=","\n handleReverify=","\n handleDelete=","\n />"])),ii,n.userIdentity,n.authorizationId,t.getAuthStatus(n),n.authorizationId===a.selectedAuthId,n.isDeleting,n.error,(function(){return t.verifyAuth(r)}),(function(){return t.verifyAuth(r)}),(function(){return t.deleteAuth(r)}))})),o?"".concat(Gr):"",Mn,(function(){return t.openAuthWindow()}),"Add ".concat(a.step.activity.app.name," account"),bn.SECONDARY,this.state.isLoading,o&&_e(Wr||(Wr=e(["<",">","<//>"])),Dr,this.getError()))}}]),o}();i(oi,"contextType",Ft);var ai,si,li=ge.connect(["stepMapping"],Bt)(oi),ui=he((function(e,t){e.exports=function(){function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var t=Object.hasOwnProperty,n=Object.setPrototypeOf,r=Object.isFrozen,i=Object.getPrototypeOf,a=Object.getOwnPropertyDescriptor,s=Object.freeze,l=Object.seal,u=Object.create,c="undefined"!=typeof Reflect&&Reflect,d=c.apply,p=c.construct;d||(d=function(e,t,n){return e.apply(t,n)}),s||(s=function(e){return e}),l||(l=function(e){return e}),p||(p=function(t,n){return new(Function.prototype.bind.apply(t,[null].concat(e(n))))});var f=I(Array.prototype.forEach),_=I(Array.prototype.pop),m=I(Array.prototype.push),v=I(String.prototype.toLowerCase),h=I(String.prototype.match),y=I(String.prototype.replace),g=I(String.prototype.indexOf),b=I(String.prototype.trim),w=I(RegExp.prototype.test),x=k(TypeError);function I(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return d(e,t,r)}}function k(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return p(e,n)}}function C(e,t){n&&n(e,null);for(var i=t.length;i--;){var o=t[i];if("string"==typeof o){var a=v(o);a!==o&&(r(t)||(t[i]=a),o=a)}e[o]=!0}return e}function S(e){var n=u(null),r=void 0;for(r in e)d(t,e,[r])&&(n[r]=e[r]);return n}function O(e,t){for(;null!==e;){var n=a(e,t);if(n){if(n.get)return I(n.get);if("function"==typeof n.value)return I(n.value)}e=i(e)}function r(e){return console.warn("fallback value for",e),null}return r}var M=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),A=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),T=s(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),L=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=s(["#text"]),P=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),E=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),z=l(/\{\{[\s\S]*|[\s\S]*\}\}/gm),V=l(/<%[\s\S]*|[\s\S]*%>/gm),U=l(/^data-[\-\w.\u00B7-\uFFFF]/),H=l(/^aria-[\-\w]+$/),B=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),W=l(/^(?:\w+script|data):/i),J=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)};function G(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var K=function(){return"undefined"==typeof window?null:window},Z=function(e,t){if("object"!==(void 0===e?"undefined":q(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K(),t=function(e){return Y(e)};if(t.version="2.3.1",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,o=e.HTMLTemplateElement,a=e.Node,l=e.Element,u=e.NodeFilter,c=e.NamedNodeMap,d=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,p=e.Text,I=e.Comment,k=e.DOMParser,Q=e.trustedTypes,X=l.prototype,$=O(X,"cloneNode"),ee=O(X,"nextSibling"),te=O(X,"childNodes"),ne=O(X,"parentNode");if("function"==typeof o){var re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}var ie=Z(Q,n),oe=ie&&je?ie.createHTML(""):"",ae=r,se=ae.implementation,le=ae.createNodeIterator,ue=ae.createDocumentFragment,ce=ae.getElementsByTagName,de=n.importNode,pe={};try{pe=S(r).documentMode?r.documentMode:{}}catch(e){}var fe={};t.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==pe;var _e=z,me=V,ve=U,he=H,ye=W,ge=J,be=B,we=null,xe=C({},[].concat(G(M),G(D),G(A),G(R),G(N))),Ie=null,ke=C({},[].concat(G(P),G(E),G(j),G(F))),Ce=null,Se=null,Oe=!0,Me=!0,De=!1,Ae=!1,Te=!1,Re=!1,Le=!1,Ne=!1,Pe=!1,Ee=!0,je=!1,Fe=!0,ze=!0,Ve=!1,Ue={},He=null,Be=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),We=null,Je=C({},["audio","video","img","source","image","track"]),qe=null,Ge=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml",Qe=Ye,Xe=!1,$e=null,et=r.createElement("form"),tt=function(e){$e&&$e===e||(e&&"object"===(void 0===e?"undefined":q(e))||(e={}),e=S(e),we="ALLOWED_TAGS"in e?C({},e.ALLOWED_TAGS):xe,Ie="ALLOWED_ATTR"in e?C({},e.ALLOWED_ATTR):ke,qe="ADD_URI_SAFE_ATTR"in e?C(S(Ge),e.ADD_URI_SAFE_ATTR):Ge,We="ADD_DATA_URI_TAGS"in e?C(S(Je),e.ADD_DATA_URI_TAGS):Je,He="FORBID_CONTENTS"in e?C({},e.FORBID_CONTENTS):Be,Ce="FORBID_TAGS"in e?C({},e.FORBID_TAGS):{},Se="FORBID_ATTR"in e?C({},e.FORBID_ATTR):{},Ue="USE_PROFILES"in e&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Me=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Ne=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Ee=!1!==e.RETURN_DOM_IMPORT,je=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,ze=!1!==e.KEEP_CONTENT,Ve=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Qe=e.NAMESPACE||Ye,Ae&&(Me=!1),Pe&&(Ne=!0),Ue&&(we=C({},[].concat(G(N))),Ie=[],!0===Ue.html&&(C(we,M),C(Ie,P)),!0===Ue.svg&&(C(we,D),C(Ie,E),C(Ie,F)),!0===Ue.svgFilters&&(C(we,A),C(Ie,E),C(Ie,F)),!0===Ue.mathMl&&(C(we,R),C(Ie,j),C(Ie,F))),e.ADD_TAGS&&(we===xe&&(we=S(we)),C(we,e.ADD_TAGS)),e.ADD_ATTR&&(Ie===ke&&(Ie=S(Ie)),C(Ie,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&C(qe,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(He===Be&&(He=S(He)),C(He,e.FORBID_CONTENTS)),ze&&(we["#text"]=!0),Te&&C(we,["html","head","body"]),we.table&&(C(we,["tbody"]),delete Ce.tbody),s&&s(e),$e=e)},nt=C({},["mi","mo","mn","ms","mtext"]),rt=C({},["foreignobject","desc","title","annotation-xml"]),it=C({},D);C(it,A),C(it,T);var ot=C({},R);C(ot,L);var at=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});var n=v(e.tagName),r=v(t.tagName);if(e.namespaceURI===Ze)return t.namespaceURI===Ye?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(it[n]);if(e.namespaceURI===Ke)return t.namespaceURI===Ye?"math"===n:t.namespaceURI===Ze?"math"===n&&rt[r]:Boolean(ot[n]);if(e.namespaceURI===Ye){if(t.namespaceURI===Ze&&!rt[r])return!1;if(t.namespaceURI===Ke&&!nt[r])return!1;var i=C({},["title","style","font","a","script"]);return!ot[n]&&(i[n]||!it[n])}return!1},st=function(e){m(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},lt=function(e,n){try{m(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){m(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!Ie[e])if(Ne||Pe)try{st(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},ut=function(e){var t=void 0,n=void 0;if(Le)e="<remove></remove>"+e;else{var i=h(e,/^[\r\n\t ]+/);n=i&&i[0]}var o=ie?ie.createHTML(e):e;if(Qe===Ye)try{t=(new k).parseFromString(o,"text/html")}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=Xe?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Qe===Ye?ce.call(t,Te?"html":"body")[0]:Te?t.documentElement:a},ct=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},dt=function(e){return!(e instanceof p||e instanceof I||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof d&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},pt=function(e){return"object"===(void 0===a?"undefined":q(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":q(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ft=function(e,n,r){fe[e]&&f(fe[e],(function(e){e.call(t,n,r,$e)}))},_t=function(e){var n=void 0;if(ft("beforeSanitizeElements",e,null),dt(e))return st(e),!0;if(h(e.nodeName,/[\u0080-\uFFFF]/))return st(e),!0;var r=v(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:r,allowedTags:we}),!pt(e.firstElementChild)&&(!pt(e.content)||!pt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return st(e),!0;if("select"===r&&w(/<template/i,e.innerHTML))return st(e),!0;if(!we[r]||Ce[r]){if(ze&&!He[r]){var i=ne(e)||e.parentNode,o=te(e)||e.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore($(o[a],!0),ee(e))}return st(e),!0}return e instanceof l&&!at(e)?(st(e),!0):"noscript"!==r&&"noembed"!==r||!w(/<\/no(script|embed)/i,e.innerHTML)?(Ae&&3===e.nodeType&&(n=e.textContent,n=y(n,_e," "),n=y(n,me," "),e.textContent!==n&&(m(t.removed,{element:e.cloneNode()}),e.textContent=n)),ft("afterSanitizeElements",e,null),!1):(st(e),!0)},mt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in r||n in et))return!1;if(Me&&!Se[t]&&w(ve,t));else if(Oe&&w(he,t));else{if(!Ie[t]||Se[t])return!1;if(qe[t]);else if(w(be,y(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==g(n,"data:")||!We[e])if(De&&!w(ye,y(n,ge,"")));else if(n)return!1}return!0},vt=function(e){var n=void 0,r=void 0,i=void 0,o=void 0;ft("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ie};for(o=a.length;o--;){var l=n=a[o],u=l.name,c=l.namespaceURI;if(r=b(n.value),i=v(u),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(lt(u,e),s.keepAttr))if(w(/\/>/i,r))lt(u,e);else{Ae&&(r=y(r,_e," "),r=y(r,me," "));var d=e.nodeName.toLowerCase();if(mt(d,i,r))try{c?e.setAttributeNS(c,u,r):e.setAttribute(u,r),_(t.removed)}catch(e){}}}ft("afterSanitizeAttributes",e,null)}},ht=function e(t){var n=void 0,r=ct(t);for(ft("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ft("uponSanitizeShadowNode",n,null),_t(n)||(n.content instanceof i&&e(n.content),vt(n));ft("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,o){var s=void 0,l=void 0,u=void 0,c=void 0,d=void 0;if((Xe=!r)&&(r="\x3c!--\x3e"),"string"!=typeof r&&!pt(r)){if("function"!=typeof r.toString)throw x("toString is not a function");if("string"!=typeof(r=r.toString()))throw x("dirty is not a string, aborting")}if(!t.isSupported){if("object"===q(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(pt(r))return e.toStaticHTML(r.outerHTML)}return r}if(Re||tt(o),t.removed=[],"string"==typeof r&&(Ve=!1),Ve);else if(r instanceof a)1===(l=(s=ut("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?s=l:s.appendChild(l);else{if(!Ne&&!Ae&&!Te&&-1===r.indexOf("<"))return ie&&je?ie.createHTML(r):r;if(!(s=ut(r)))return Ne?null:oe}s&&Le&&st(s.firstChild);for(var p=ct(Ve?r:s);u=p.nextNode();)3===u.nodeType&&u===c||_t(u)||(u.content instanceof i&&ht(u.content),vt(u),c=u);if(c=null,Ve)return r;if(Ne){if(Pe)for(d=ue.call(s.ownerDocument);s.firstChild;)d.appendChild(s.firstChild);else d=s;return Ee&&(d=de.call(n,d,!0)),d}var f=Te?s.outerHTML:s.innerHTML;return Ae&&(f=y(f,_e," "),f=y(f,me," ")),ie&&je?ie.createHTML(f):f},t.setConfig=function(e){tt(e),Re=!0},t.clearConfig=function(){$e=null,Re=!1},t.isValidAttribute=function(e,t,n){$e||tt({});var r=v(e),i=v(t);return mt(r,i,n)},t.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],m(fe[e],t))},t.removeHook=function(e){fe[e]&&_(fe[e])},t.removeHooks=function(e){fe[e]&&(fe[e]=[])},t.removeAllHooks=function(){fe={}},t}return Y()}()})),ci="styles-module_listboxGroupWrapper__1Kt5M",di="styles-module_listbox__2x2uP",pi="styles-module_customSelect__3d-hM",fi="styles-module_open__2fBAx",_i="styles-module_customOptions__3iNrM",mi="styles-module_customSelectTrigger__2MlIG",vi="styles-module_selected__nLzUy",hi="styles-module_error__2KcSW",yi="styles-module_arrow__TPQOZ",gi="styles-module_close__3wlz1",bi="styles-module_listboxItem__2jMpi";qt(".styles-module_listboxGroupWrapper__1Kt5M fieldset {\n margin: 0;\n padding: 0;\n border: none; }\n\n.styles-module_listbox__2x2uP {\n position: relative;\n max-width: 285px;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n padding-top: 10px; }\n .styles-module_listbox__2x2uP .styles-module_customSelect__3d-hM {\n position: relative;\n display: flex;\n flex-direction: column;\n font-size: 14px;\n letter-spacing: -0.197647px;\n color: #999999; }\n .styles-module_listbox__2x2uP .styles-module_customSelect__3d-hM.styles-module_open__2fBAx .styles-module_customOptions__3iNrM {\n opacity: 1;\n visibility: visible;\n pointer-events: auto; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG {\n position: relative;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n height: 35px;\n padding: 0 10px;\n justify-content: space-between;\n cursor: pointer;\n font-size: 14px;\n border: 1px solid #e2e0db;\n border-radius: 4px; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG span {\n display: flex;\n align-items: center;\n height: 100%;\n padding-right: 10px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG span.styles-module_selected__nLzUy {\n color: #333333; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG:focus {\n outline: none; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG.styles-module_error__2KcSW {\n border-color: #f05c42; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG .styles-module_arrow__TPQOZ {\n transform: rotate(0);\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG .styles-module_arrow__TPQOZ.styles-module_close__3wlz1 {\n transform: rotate(180deg); }\n .styles-module_listbox__2x2uP .styles-module_customOptions__3iNrM {\n position: absolute;\n top: 100%;\n left: 0px;\n right: 0px;\n z-index: 10;\n margin-top: 0.5rem;\n display: block;\n overflow: hidden;\n background-color: #fff;\n font-size: 0.875rem;\n line-height: 1.25rem;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n pointer-events: none;\n visibility: hidden;\n max-height: 12rem;\n min-height: 100%;\n overflow: auto;\n border-width: 1px;\n border-style: solid;\n border-color: #e2e0db;\n opacity: 0;\n border-radius: 4px; }\n\n.styles-module_listboxItem__2jMpi {\n position: relative;\n display: block;\n cursor: pointer;\n border-width: 0px;\n border-bottom-width: 1px;\n border-style: solid;\n border-color: #e2e0db;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 2.5rem;\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 10px; }\n .styles-module_listboxItem__2jMpi svg {\n position: absolute;\n height: 100%;\n width: 12px;\n left: 16px;\n top: 0; }\n .styles-module_listboxItem__2jMpi:last-child {\n border: none; }\n .styles-module_listboxItem__2jMpi:hover {\n color: #333;\n background: #ececec; }\n .styles-module_listboxItem__2jMpi.styles-module_selected__nLzUy {\n color: #333;\n font-weight: 500; }\n");var wi,xi,Ii,ki,Ci,Si,Oi,Mi,Di,Ai,Ti,Ri,Li,Ni,Pi,Ei,ji,Fi,zi,Vi=function(t){var n=t.id,r=t.value,i=t.isSelected,o=t.onClick;return _e(ai||(ai=e(["\n <span\n class=","\n data-value=","\n onclick=","\n >\n ","\n ","\n </span>\n "])),"".concat(bi," ").concat(i?vi:""),n,o,i&&_e(si||(si=e(['\n <svg\n width="7"\n height="7"\n viewBox="0 0 7 7"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n stroke="#333"\n >\n <path\n d="M6.33333 1.5L2.83522 5.5L1 3.40148"\n stroke-width="1.2"\n stroke-linecap="round"\n />\n </svg>\n ']))),r)},Ui=function(t){var n=t.title,r=t.description,i=t.items,o=void 0===i?[]:i,a=t.value,s=void 0===a?null:a,l=t.isOpen,u=void 0!==l&&l,c=t.isDynamic,d=void 0!==c&&c,p=t.endpointData,f=t.isRequired,_=void 0!==f&&f,m=t.placeholder,v=t.onChange,h=void 0===v?function(){return null}:v,y=t.showStepValidation,g=void 0!==y&&y,b=t.responseMapper,w=void 0===b?function(e){return e}:b,x=Ve(Ye(o),2),I=x[0],k=x[1],C=Ve(Ye(d&&!o.length&&!s),2),S=C[0],O=C[1],M=Ve(Ye(u),2),D=M[0],A=M[1],T=Xe();or(T,(function(){return D&&A(!1)})),Qe((function(){var e=t.apiHandler,n=t.isDynamic,r=t.endpointUrl;if(n&&r){var i;O(!0);try{i=JSON.parse(p)}catch(e){i=""}e.callDynamicDataEndpoint(new URL(r),i).then((function(e){O(!1),e&&k(w(e))}))}}),[p]);var R=function(){A((function(e){return!e}))},L=$e((function(){var e=I.findIndex((function(e){return e.id===s}));return e>-1?I[e].value:"Please Select..."}),[I,s]);return _e(wi||(wi=e(["\n <div ref=",' class="','">\n <fieldset>\n ',"\n <div class=",">\n <div\n class=","\n >\n <div\n class=",'\n role="button"\n tabindex=',"\n onclick=","\n onkeyup=","\n >\n <span class=",">\n ","\n </span>\n\n <div ref=",' style="display: flex;">\n ',"\n </div>\n </div>\n <div class=",">\n ","\n </div>\n </div>\n ","\n </div>\n </fieldset>\n </div>\n "])),T,ci,n&&_e(xi||(xi=e(["\n <","\n title=","\n description=","\n isRequired=","\n />\n "])),Rr,n,r,_),di,"".concat(pi," ").concat(D?fi:""),"".concat(mi," ").concat(g&&!s&&_&&!D&&hi),0,R,(function(e){"Enter"===e.key&&R()}),s&&vi,S?_e(Ii||(Ii=e(["Loading"]))):_e(ki||(ki=e(["\n ","\n "])),I.length>0?_e(Ci||(Ci=e(["\n ","\n "])),s?_e(Si||(Si=e(["",""])),L):_e(Oi||(Oi=e(["",""])),m||"Please Select...")):_e(Mi||(Mi=e(["No options"])))),T,S?_e(Di||(Di=e(["<","><//>"])),Zt):_e(Ai||(Ai=e(["\n <div\n class=",'\n >\n <svg\n width="12"\n height="8"\n viewBox="0 0 12 8"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11 1.5L6 6.5L1 1.5"\n stroke="#999999"\n stroke-width="2"\n stroke-linecap="round"\n />\n </svg>\n </div>\n '])),"".concat(yi," ").concat(D?gi:"")),_i,I.length>0&&!S&&_e(Ti||(Ti=e(["\n ","\n "])),I.map((function(t){return _e(Ri||(Ri=e(["\n <","\n key=","\n id=","\n value=","\n isSelected=","\n onClick=","\n ><//>\n "])),Vi,t.id,t.id,t.value,s===t.id,(function(){h(t.id),A(!1)}))}))),g&&!s&&!D&&_&&_e(Li||(Li=e([" <",">Please select an option</",">"])),Dr,Dr))},Hi="styles-module_checkboxWrap__JzZMA",Bi="styles-module_checkbox__3mvqm",Wi="styles-module_button__2oPQ0",Ji="styles-module_text__1AHNH",qi="styles-module_description__3Ox13";qt(".styles-module_checkboxGroup__2u-bL fieldset {\n border: none;\n padding: 0; }\n\n.styles-module_checkboxWrap__JzZMA {\n margin-bottom: 22px; }\n\n.styles-module_checkbox__3mvqm {\n position: relative;\n display: flex;\n margon-bottom: 2px;\n align-items: center;\n margin-top: 12px; }\n .styles-module_checkbox__3mvqm .styles-module_button__2oPQ0 {\n display: block;\n height: 20px;\n width: 20px;\n background-color: transparent; }\n .styles-module_checkbox__3mvqm input[type='checkbox'] {\n opacity: 0;\n margin: 0;\n display: none; }\n .styles-module_checkbox__3mvqm label {\n display: flex;\n flex: 1;\n cursor: pointer;\n font-size: 14px;\n color: #333333; }\n .styles-module_checkbox__3mvqm .styles-module_text__1AHNH {\n display: flex;\n color: #333;\n font-size: 14px;\n padding-left: 10px;\n font-weight: 400;\n line-height: 26px;\n margin-top: -2px; }\n .styles-module_checkbox__3mvqm .styles-module_description__3Ox13 {\n font-size: 12px;\n color: #222; }\n");var Gi,Ki=function(t){var n=t.label,r=t.name,i=t.description,o=void 0===i?null:i,a=t.value,s=t.isRequired,l=void 0!==s&&s,u=t.isChecked,c=void 0!==u&&u,d=t.showStepValidation,p=void 0!==d&&d,f=t.handleChange,_=void 0===f?function(){return null}:f;return _e(Ni||(Ni=e(["\n <div class=",">\n <div class=",">\n <label for=",">\n <input\n id=",'\n type="checkbox"\n name=',"\n value=","\n checked=","\n onclick=","\n />\n <div class=",">\n ","\n </div>\n <div>\n <div class=",">\n ","\n </div>\n ","\n </div>\n </label>\n </div>\n ","\n </div>\n "])),Hi,Bi,r,r,r,a,c,(function(e){if(e.target instanceof HTMLInputElement){var t=e.target,n=t.id,r=t.checked;_(n,r)}}),Wi,_e(c?Pi||(Pi=e(['\n <svg\n width="20"\n height="20"\n viewBox="0 0 20 20"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M7.86364 15.5L10 13.4923L17.5 6.49357L15.3485 4.5L7.86364 11.4987L4.63636 8.50129L2.5 10.4949L5.71212 13.4923L7.86364 15.5Z"\n fill="#5F4D86"\n />\n <path\n d="M0 0V-2H-2V0H0ZM20 0H22V-2H20V0ZM20 20V22H22V20H20ZM0 20H-2V22H0V20ZM0 2H20V-2H0V2ZM18 0V20H22V0H18ZM20 18H0V22H20V18ZM2 20V0H-2V20H2Z"\n fill="#5F4D86"\n />\n </svg>\n '])):Ei||(Ei=e(['\n <svg\n width="20"\n height="20"\n viewBox="0 0 20 20"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M0 0V-2H-2V0H0ZM20 0H22V-2H20V0ZM20 20V22H22V20H20ZM0 20H-2V22H0V20ZM0 2H20V-2H0V2ZM18 0V20H22V0H18ZM20 18H0V22H20V18ZM2 20V0H-2V20H2Z"\n fill="#5F4D86"\n />\n </svg>\n ']))),Ji,n.map((function(t){return _e(ji||(ji=e(["",""])),t.value)})),o&&_e(Fi||(Fi=e(["<div class=",">","</div>"])),qi,o),p&&!a&&l&&_e(zi||(zi=e([" <",">Please select an option</",">"])),Dr,Dr))},Zi="styles-module_loader__1RKKC";qt(".styles-module_loader__1RKKC {\n animation-name: styles-module_ckw__i9e23;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: 50% 50%; }\n\n@keyframes styles-module_ckw__i9e23 {\n 0% {\n transform: rotate(0deg); }\n 100% {\n transform: rotate(360deg); } }\n");var Yi,Qi,Xi,$i,eo,to=function(){return _e(Gi||(Gi=e(["\n <svg\n class=",'\n width="26"\n height="25"\n viewBox="0 0 26 25"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M15.7173 0.29892C13.1175 -0.280085 10.4006 -0.0135017 7.96294 1.0598C5.52524 2.13311 3.49412 3.95702 2.16568 6.26562C0.837246 8.57421 0.280965 11.2468 0.57794 13.8937C0.874915 16.5406 2.00962 19.0235 3.81662 20.9803C5.62362 22.9371 8.00843 24.2656 10.6234 24.772C13.2383 25.2784 15.9466 24.9363 18.3535 23.7956C20.7604 22.6548 22.74 20.7751 24.0036 18.4304C25.2673 16.0857 25.749 13.3987 25.3785 10.7611L24.1406 10.935C24.4741 13.3088 24.0406 15.7272 22.9033 17.8374C21.766 19.9476 19.9844 21.6393 17.8182 22.666C15.652 23.6927 13.2145 24.0006 10.861 23.5448C8.50758 23.089 6.36125 21.8934 4.73495 20.1323C3.10866 18.3711 2.08742 16.1366 1.82015 13.7543C1.55287 11.3721 2.05352 8.96679 3.24911 6.88905C4.44471 4.81132 6.27272 3.1698 8.46665 2.20382C10.6606 1.23785 13.1057 0.997923 15.4456 1.51903L15.7173 0.29892Z"\n fill="#EFEFEF"\n />\n <path\n d="M25.3833 10.7959C25.0346 8.26181 23.9168 5.8957 22.1808 4.01695C20.4449 2.13819 18.1743 0.83725 15.6756 0.289715L15.4081 1.51074C17.6569 2.00353 19.7004 3.17437 21.2628 4.86525C22.8251 6.55613 23.8311 8.68563 24.145 10.9663L25.3833 10.7959Z"\n fill="#C4C4C4"\n />\n </svg>\n'])),Zi)},no="styles-module_selectWrapper__wU7p8",ro="styles-module_selectedVal__11vC7";qt(".styles-module_selectWrapper__wU7p8 {\n position: relative;\n width: 100%; }\n .styles-module_selectWrapper__wU7p8 fieldset {\n padding: 0;\n margin: 0;\n border: none; }\n .styles-module_selectWrapper__wU7p8 select {\n width: 100%;\n color: #999999;\n position: relative;\n font-size: 14px;\n -webkit-appearance: none;\n appearance: none;\n padding: 8.5px 14px;\n padding-right: 28px;\n border-radius: 4px;\n border: 1px solid #e2e0db;\n outline: none;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; }\n .styles-module_selectWrapper__wU7p8 select:focus {\n outline: none; }\n .styles-module_selectWrapper__wU7p8 select.styles-module_selectedVal__11vC7 {\n color: #333; }\n .styles-module_selectWrapper__wU7p8 svg {\n position: absolute;\n right: 10px;\n top: 13px; }\n");var io,oo,ao,so,lo,uo,co,po=function(t){var n=t.placeholder,r=t.ariaLabel,i=t.value,o=t.options,a=void 0===o?[]:o,s=t.showUnselectedValue,l=void 0!==s&&s,u=t.unselectedText,c=void 0===u?"Select a value":u,d=t.isRequired,p=void 0!==d&&d,f=t.showStepValidation,_=void 0!==f&&f,m=t.onChange,v=void 0===m?function(){return null}:m;return _e(Yi||(Yi=e(["\n <div class=",">\n <select\n aria-label=","\n onchange=","\n class=","\n >\n ","\n ","\n ",'\n </select>\n <svg\n width="12"\n height="8"\n viewBox="0 0 12 8"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11 1.5L6 6.5L1 1.5"\n stroke="#999999"\n stroke-width="2"\n stroke-linecap="round"\n />\n </svg>\n </div>\n ',"\n "])),no,r,(function(e){if(e.currentTarget instanceof HTMLSelectElement){var t=e.currentTarget.value,n=a.findIndex((function(e){return"".concat(e.key)==="".concat(t)}));v(n)}}),i&&ro,l&&_e(Qi||(Qi=e([' <option value="">',"</option> "])),c),void 0===i&&_e(Xi||(Xi=e(['\n <option value="" disabled selected hidden>',"</option>\n "])),n),a.map((function(t){return _e($i||($i=e(["\n <option value="," selected=",">\n ","\n </option>\n "])),t.key,i===t.key,t.label)})),p&&!i&&_&&_e(eo||(eo=e(["<",">Please map this required field<//>"])),Dr))},fo="styles-module_mappingWrap__cU3_M",_o="styles-module_mappingInfo__2Nvsw",mo="styles-module_mappingRow__LbAkF",vo="styles-module_loader__3uPJj",ho="styles-module_title__3EC37",yo="styles-module_sampleData__ZpCR2",go="styles-module_selectBox__2gn7w",bo="styles-module_mappingHeaderItem__3Ue0A";function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wo(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}qt(".styles-module_mappingWrap__cU3_M .styles-module_mappingInfo__2Nvsw {\n margin-top: 20px;\n display: flex;\n justify-content: flex-end;\n font-size: 10px;\n line-height: 12px;\n display: flex;\n align-items: center;\n letter-spacing: 0.1px;\n color: #999999; }\n .styles-module_mappingWrap__cU3_M .styles-module_mappingInfo__2Nvsw > :not(:last-child) {\n margin-right: 20px; }\n .styles-module_mappingWrap__cU3_M .styles-module_mappingInfo__2Nvsw > div {\n margin-right: 7px; }\n .styles-module_mappingWrap__cU3_M .styles-module_mappingInfo__2Nvsw > div > span:first-child {\n color: #333333;\n margin: 0;\n margin-right: 3px; }\n\n.styles-module_mappingWrap__cU3_M .styles-module_mappingRow__LbAkF:first-child {\n padding-top: 0;\n padding-bottom: 5px;\n height: 60px;\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n letter-spacing: 0.1px;\n color: #333333; }\n\n.styles-module_loader__3uPJj {\n margin-top: 35px;\n margin-bottom: -60px;\n display: flex;\n justify-content: center; }\n\n.styles-module_mappingRow__LbAkF {\n display: flex;\n box-sizing: content-box;\n align-items: center;\n justify-content: space-between;\n background-color: #fff;\n padding-left: 10px;\n padding-right: 10px;\n height: 90px; }\n .styles-module_mappingRow__LbAkF .styles-module_title__3EC37 {\n width: 40%;\n padding-right: 4px;\n font-weight: 500;\n font-size: 14px;\n color: #333333;\n padding-right: 10px;\n line-height: 18px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n .styles-module_mappingRow__LbAkF .styles-module_title__3EC37 span {\n color: red;\n font-size: 16px;\n margin-left: 2px; }\n .styles-module_mappingRow__LbAkF .styles-module_sampleData__ZpCR2 {\n display: flex;\n flex-direction: column;\n width: 40%;\n overflow: hidden;\n word-break: break-word;\n padding-right: 20px; }\n .styles-module_mappingRow__LbAkF .styles-module_selectBox__2gn7w {\n width: 40%;\n font-size: 14px; }\n .styles-module_mappingRow__LbAkF:nth-child(even) {\n background: #f8f8f880; }\n .styles-module_mappingRow__LbAkF:first-child {\n color: #333333; }\n .styles-module_mappingRow__LbAkF .styles-module_mappingHeaderItem__3Ue0A {\n display: flex;\n align-items: center;\n width: 40%; }\n .styles-module_mappingRow__LbAkF .styles-module_mappingHeaderItem__3Ue0A:first-child {\n padding-right: 4px; }\n .styles-module_mappingRow__LbAkF .styles-module_mappingHeaderItem__3Ue0A img {\n height: 25px;\n width: 25px;\n padding: 2px;\n object-fit: contain;\n border-radius: 9999px;\n margin-right: 5px; }\n .styles-module_mappingRow__LbAkF pre {\n margin: 0;\n padding: 0;\n color: #7d7d7d;\n height: 20px;\n font-size: 14px;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis; }\n");var Io,ko,Co=ge.connect(["stepState","genericData","stepMapping","activityOutputData","dynamicFieldData","stepDataMapping","parentChildMapping"],Bt)((function(t){var r,o,a=Ve(Ye(!0),2),s=a[0],l=a[1],u=Ve(Ye(!1),2),c=u[0],d=u[1],p=Ve(Ye(!1),2),f=p[0],_=p[1],m=Ve(Ye([]),2),v=m[0],h=m[1],y=Ve(Ye(""),2),g=y[0],b=y[1],w=tt(Ft),x=Xe(""),I=Xe([]);Qe((function(){v.length>0&&v.map((function(e,n){var r=t.stepDataMapping[t.stepId][e.fieldId];if(!r.isDynamic&&r.value)r.value.slice(1,-1)&&(I.current=[].concat(je(I.current),[n]));else if(r.isDynamic&&r.value&&e.id){JSON.parse(r.value)[e.id]&&(I.current=[].concat(je(I.current),[n]))}}))}),[v]),Qe((function(){var e=t.templateFields.filter((function(e){return e.activity_field&&"DYNAMIC"===e.activity_field.type}))[0];e&&b("".concat(e.id));var n=t.templateFields.filter((function(e){return e.activity_field&&"TEXTFIELD"===e.activity_field.type&&e.is_visible})).map((function(e){return{fieldId:e.id,id:e.activity_field&&e.activity_field.machine_name,title:e.activity_field&&e.activity_field.title,type:"text",isNotDynamic:!0}}));if(e.activity_field){var r,o=t.parentChildMapping[t.stepId][e.activity_field.machine_name],a="";if(o){var s,u=null===(s=o.parentFields)||void 0===s?void 0:s.reduce((function(e,n){var r=t.parentChildMapping[t.stepId][n].fieldId;return xo(xo({},e),{},i({},r,t.stepDataMapping[t.stepId][r].value))}),{});a=JSON.stringify(u)}if(a!==x.current)l(!0),d(!0),_(!0),C(),null===(r=S(e))||void 0===r||r.then((function(t){l(!1),I.current=[],x.current=a,Array.isArray(t)?h([].concat(je(n),je(t.map((function(t){return xo(xo({},t),{},{fieldId:e.id})}))))):h(n)})).catch((function(e){return console.error(e)}))}}),[t.stepDataMapping[t.stepId]]);var k=function(e){var n=t.stepDataMapping[e];return Object.keys(n).filter((function(e){return n[Number(e)].value})).reduce((function(e,t){var r=n[Number(t)];return xo(xo({},e),{},i({},r.machineName,r.value))}),{})},C=function(){var e=n(F.mark((function e(){var n,r,i;return F.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.stepState.steps[0].stepId,r=k(n),n&&("TRIGGER"!==(i=t.stepMapping[n].step).activity.type&&"QUERY"!==i.activity.type||(i.activity.activity_output_url?(d(!0),null==w||w.apiHandler.callDynamicDataEndpoint(new URL(i.activity.activity_output_url),xo({authorization_id:"".concat(t.stepMapping[n].selectedAuthId)},r)).then((function(e){d(!1),e&&t.setActivityOutputData({activityOutputData:e})}))):d(!1),i.activity.dynamic_field_data_endpoint?(_(!0),null==w||w.apiHandler.callDynamicDataEndpoint(new URL(i.activity.dynamic_field_data_endpoint),xo({authorization_id:"".concat(t.stepMapping[n].selectedAuthId)},r)).then((function(e){_(!1),e&&t.setDynamicFieldData({dynamicFieldData:e})}))):_(!1)));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(e){var n,r="".concat(null===(n=e.activity_field)||void 0===n?void 0:n.dynamic_field_src);return null==w?void 0:w.apiHandler.callDynamicDataEndpoint(new URL(r),xo({authorization_id:"".concat(t.endpointData.authId)},t.endpointData.fieldsData))};return _e(io||(io=e(["\n <div>\n <",'\n title="Map data"\n description="Please map fields you want to use from both apps"\n />\n <div>\n ',"\n </div>\n </div>\n "])),Rr,s||c||f?_e(oo||(oo=e(["<div class=","><"," /></div>"])),vo,to):_e(ao||(ao=e(["\n <div class=",">\n <div class=",">\n <div class=",">\n <img\n src=","\n />\n <div>\n ","\n </div>\n </div>\n <div class=",">Sample Data</div>\n <div class=",">\n <img src="," />\n <div>"," Field</div>\n </div>\n </div>\n ","\n <div class=",">\n <div>\n <span>Mapped</span>\n <span\n >","","\n field","</span\n >\n </div>\n <div>\n <span>Ignored</span>\n <span\n >","","\n field","</span\n >\n </div>\n </div>\n </div>\n "])),fo,mo,bo,t.stepMapping[t.stepId].step.activity.app.icon_url,"".concat(t.stepMapping[t.stepId].step.activity.app.name," Field"),yo,bo,null===(r=t.genericData.templateApp)||void 0===r?void 0:r.iconUrl,null===(o=t.genericData.templateApp)||void 0===o?void 0:o.name,v.map((function(n,r){var i,o,a,s,l,u=n.id||"",c=t.stepDataMapping[t.stepId][n.fieldId];c.isDynamic?s=c.objectValue:s=null===(l=c.value)||void 0===l?void 0:l.slice(1,-1);return!c.isDynamic&&s?a=s:n.id&&c.isDynamic&&c.objectValue&&s[u]&&(a="".concat(s[u]).slice(1,-1)),_e(so||(so=e(["\n <div class=",">\n <div class=",">\n ","","\n </div>\n <div class=",">\n ","\n </div>\n <div class=",">\n <",'\n ariaLabel="Map a value"\n placeholder="Please map a value"\n options=',"\n value=","\n isRequired=","\n showStepValidation=","\n showUnselectedValue=",'\n unselectedText="Skip"\n onChange=',"\n ><//>\n </div>\n </div>\n "])),mo,ho,n.title,(null==c?void 0:c.isRequired)&&_e(lo||(lo=e(["<span>*</span>"]))),yo,t.dynamicFieldData&&a&&(null===(i=t.dynamicFieldData["{".concat(a,"}")])||void 0===i?void 0:i.map((function(t){return t?_e(uo||(uo=e(["<pre>","</pre>"])),t):_e(co||(co=e([""])))}))),go,po,null===(o=t.activityOutputData)||void 0===o?void 0:o.map((function(e){return{key:e.value,label:e.text}})),a,null==c?void 0:c.isRequired,t.showStepValidation,!0,(function(e){var i;return function(e,n,r,i){var o,a=null===(o=t.activityOutputData)||void 0===o?void 0:o[e],s=I.current.findIndex((function(e){return e===i}));e<0?(I.current=I.current.filter((function(e){return e!==i})),n.isNotDynamic?t.setStepFieldData({stepId:"".concat(t.stepId),fieldId:"".concat(n.fieldId),value:"",isRequired:r}):g&&t.setStepMappingData({stepId:t.stepId,fieldId:Number(g),id:"".concat(n.id),value:null})):a&&(s<0&&(I.current=[].concat(je(I.current),[i])),n.isNotDynamic?t.setStepFieldData({stepId:"".concat(t.stepId),fieldId:"".concat(n.fieldId),value:"{".concat(a.value,"}"),isRequired:r}):g&&t.setStepMappingData({stepId:t.stepId,fieldId:Number(g),id:"".concat(n.id),value:"{".concat(a.value,"}")}))}(e,n,null!==(i=null==c?void 0:c.isRequired)&&void 0!==i&&i,r)}))})),_o,I.current.length," ",1!==I.current.length?"s":"",v.length-I.current.length," ",v.length-I.current.length!=1?"s":""))})),So="styles-module_inputWrapper__1XBHY";qt(".styles-module_inputWrapper__1XBHY {\n position: relative;\n width: 100%;\n margin-top: 10px; }\n .styles-module_inputWrapper__1XBHY input {\n width: 100%;\n color: #333;\n display: block;\n box-sizing: border-box;\n -webkit-appearance: none;\n appearance: none;\n padding: 8.5px 14px;\n border-radius: 4px;\n border: 1px solid #e2e0db;\n font-size: 14px;\n outline: none; }\n .styles-module_inputWrapper__1XBHY input:focus {\n outline: none; }\n .styles-module_inputWrapper__1XBHY input:-ms-input-placeholder {\n color: #999999; }\n .styles-module_inputWrapper__1XBHY input::placeholder {\n color: #999999; }\n");var Oo,Mo,Do=function(t){var n=t.placeholder,r=t.value,i=t.type,o=void 0===i?"text":i,a=t.control,s=t.handleChange,l=void 0===s?function(){return null}:s;return _e(Io||(Io=e(["\n <div class=",">\n <input\n type=","\n placeholder=","\n value=","\n onkeyup=","\n onchange=","\n />\n ","\n </div>\n "])),So,o,n,r,(function(e){if(e.currentTarget instanceof HTMLInputElement){var t=e.currentTarget.value;l(t)}}),(function(e){if(e.currentTarget instanceof HTMLInputElement&&"date"===e.currentTarget.type){var t=e.currentTarget.value;l(t)}}),a&&_e(ko||(ko=e(["<"," //>"])),a))},Ao="styles-module_inputGroupWrapper__FJc-g";qt(".styles-module_inputGroupWrapper__FJc-g fieldset {\n padding: 0;\n margin: 0;\n border: none; }\n");var To,Ro,Lo,No,Po,Eo=function(t){var n=t.title,r=t.description,i=t.placeholder,o=t.value,a=t.showStepValidation,s=void 0!==a&&a,l=t.isRequired,u=void 0!==l&&l,c=t.onChange,d=void 0===c?function(){return null}:c;return _e(Oo||(Oo=e(['\n <div class="','">\n <fieldset>\n <'," title="," description="," //>\n <",'\n type="text"\n placeholder=',"\n handleChange=","\n value=","\n ><//>\n </fieldset>\n ","\n </div>\n "])),Ao,Rr,n,r,Do,i,(function(e){d(e)}),o,s&&u&&_e(Mo||(Mo=e(["",">Please enter a value<//>"])),Dr))},jo="styles-module_dateGroupWrapper__cV-ne",Fo="styles-module_visibilityToggle__1l7Vl";qt(".styles-module_dateGroupWrapper__cV-ne fieldset {\n border: none;\n padding: 0;\n margin: 0; }\n\n.styles-module_dateGroupWrapper__cV-ne input[type='date'] {\n position: relative;\n cursor: pointer; }\n\n.styles-module_dateGroupWrapper__cV-ne input[type='date']::-webkit-calendar-picker-indicator {\n position: absolute;\n top: 0;\n right: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n color: transparent;\n background: transparent; }\n\n.styles-module_dateGroupWrapper__cV-ne .styles-module_visibilityToggle__1l7Vl {\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n right: 10px;\n bottom: 0;\n margin: 0 auto; }\n .styles-module_dateGroupWrapper__cV-ne .styles-module_visibilityToggle__1l7Vl svg {\n cursor: pointer;\n width: 20px; }\n .styles-module_dateGroupWrapper__cV-ne .styles-module_visibilityToggle__1l7Vl svg:hover {\n opacity: 0.5; }\n");var zo,Vo,Uo,Ho,Bo,Wo=function(t){var n=t.title,r=t.description,i=t.placeholder,o=t.value,a=t.showStepValidation,s=void 0!==a&&a,l=t.isRequired,u=void 0!==l&&l,c=t.onChange,d=void 0===c?function(){return null}:c;return _e(To||(To=e(['\n <div class="','">\n <fieldset>\n <'," title="," description="," //>\n <",'\n type="date"\n placeholder=',"\n handleChange=","\n value=","\n control=","\n ><//>\n </fieldset>\n ","\n </div>\n "])),jo,Rr,n,r,Do,i,d,o,(function(){return _e(Ro||(Ro=e([' <div\n role="button"\n class=',"\n onclick=","\n >\n ","\n </div>"])),Fo,(function(){o&&d("")}),_e(o?No||(No=e(['\n <svg\n width="18"\n height="18"\n viewBox="0 0 18 18"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M9 0C13.9673 0 18 4.03275 18 9C18 13.9673 13.9673 18 9 18C4.03275 18 0 13.9673 0 9C0 4.03275 4.03275 0 9 0ZM9 0.75C13.5533 0.75 17.25 4.44675 17.25 9C17.25 13.5533 13.5533 17.25 9 17.25C4.44675 17.25 0.75 13.5533 0.75 9C0.75 4.44675 4.44675 0.75 9 0.75ZM9 8.46975L12.9697 4.5L13.5 5.03025L9.53025 9L13.5 12.9697L12.9697 13.5L9 9.53025L5.03025 13.5L4.5 12.9697L8.46975 9L4.5 5.03025L5.03025 4.5L9 8.46975Z"\n fill="black"\n />\n </svg>\n '])):Lo||(Lo=e(['\n <svg\n width="25"\n height="26"\n viewBox="0 0 25 26"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M16.9543 5.5464H19.335L19.3349 5.54639C20.6491 5.54639 21.7156 6.61204 21.7156 7.92812L21.7147 19.8323C21.7147 21.1466 20.6482 22.2131 19.334 22.2131H5.04866C3.73449 22.2131 2.66797 21.1466 2.66797 19.8323V7.92719C2.66797 6.61296 3.73444 5.54639 5.04866 5.54639L7.42936 5.5473V4.35641C7.42936 3.69791 7.96262 3.16553 8.62019 3.16553C9.27777 3.16553 9.81102 3.69791 9.81102 4.35641V5.5464L14.5717 5.5473V4.35641C14.5717 3.69791 15.105 3.16553 15.7626 3.16553C16.4201 3.16553 16.9534 3.69791 16.9534 4.35641L16.9543 5.5464ZM4.04688 20.8324H20.3369L20.3358 8.7124H4.04688V20.8324Z"\n fill="#999999"\n />\n </svg>\n ']))))}),s&&u&&_e(Po||(Po=e(["",">Please enter a date<//>"])),Dr))},Jo="styles-module_passwordInputWrapper__1rzRX",qo="styles-module_visibilityToggle__3_Kyp";qt(".styles-module_passwordInputWrapper__1rzRX fieldset {\n padding: 0;\n margin: 0;\n border: none; }\n\n.styles-module_passwordInputWrapper__1rzRX .styles-module_innerWrap__2CRI3 {\n position: relative; }\n\n.styles-module_passwordInputWrapper__1rzRX input {\n padding-right: 36px; }\n\n.styles-module_visibilityToggle__3_Kyp {\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n right: 10px;\n bottom: 0;\n margin: 0 auto; }\n .styles-module_visibilityToggle__3_Kyp svg {\n cursor: pointer;\n width: 20px; }\n .styles-module_visibilityToggle__3_Kyp svg:hover {\n opacity: 0.5; }\n");var Go,Ko,Zo=function(t){var n=t.title,r=t.description,i=t.placeholder,o=t.value,a=t.showStepValidation,s=void 0!==a&&a,l=t.isRequired,u=void 0!==l&&l,c=t.onChange,d=void 0===c?function(){return null}:c,p=Ve(Ye(!1),2),f=p[0],_=p[1],m=function(){_((function(e){return!e}))};return _e(zo||(zo=e(['\n <div class="','">\n <fieldset>\n <'," title="," description="," //>\n <","\n type=","\n placeholder=","\n handleChange=","\n value=","\n control=","\n ><//>\n ","\n </fieldset>\n </div>\n "])),Jo,Rr,n,r,Do,f?"text":"password",i,d,o,(function(){return _e(Vo||(Vo=e(["\n <div\n class=","\n onclick=","\n >\n ","\n </div>\n "])),qo,m,_e(f?Ho||(Ho=e([' <svg\n width="20"\n height="12"\n viewBox="0 0 20 12"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M0.183387 6.51359C0.35582 6.72918 4.47535 11.6704 9.71968 11.6704V11.6704C14.964 11.6704 19.0836 6.72924 19.256 6.51357C19.5005 6.21515 19.5005 5.78535 19.256 5.48691V5.48615C19.0835 5.27523 14.964 0.330078 9.71968 0.330078C4.47535 0.330078 0.355766 5.27507 0.183387 5.48693C-0.0611291 5.78535 -0.0611291 6.21515 0.183387 6.51359ZM9.71968 10.0499C6.1643 10.0499 3.04855 7.1924 1.90266 6.00018C3.04632 4.80579 6.1643 1.95044 9.71968 1.95044C13.2751 1.95044 16.3908 4.80797 17.5367 6.00018C16.393 7.19458 13.2751 10.0499 9.71968 10.0499Z"\n fill="#333333"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.94922 8.29099C7.55668 8.89849 8.3806 9.24021 9.24022 9.24021C10.0998 9.24021 10.9237 8.89845 11.5312 8.29099C12.1387 7.68353 12.4804 6.85956 12.4804 5.99999C12.4804 5.14041 12.1387 4.31648 11.5312 3.70898C10.9238 3.10148 10.0998 2.75977 9.24022 2.75977C8.38064 2.75977 7.55672 3.10152 6.94922 3.70898C6.34172 4.31644 6 5.14041 6 5.99999C6 6.85956 6.34176 7.68349 6.94922 8.29099ZM7.7435 5.3803C7.99408 4.77431 8.58488 4.38021 9.24022 4.38021C9.67002 4.38021 10.0816 4.55031 10.3854 4.85481C10.6899 5.15856 10.86 5.57015 10.86 5.99995C10.86 6.65529 10.4659 7.24607 9.85987 7.49667C9.25464 7.74727 8.5583 7.60905 8.09509 7.14508C7.63111 6.68186 7.49289 5.98552 7.7435 5.3803Z"\n fill="#333333"\n />\n </svg>'])):Uo||(Uo=e([' <svg\n width="20"\n height="12"\n viewBox="0 0 20 12"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M0.183387 6.51359C0.35582 6.72918 4.47535 11.6704 9.71968 11.6704V11.6704C14.964 11.6704 19.0836 6.72924 19.256 6.51357C19.5005 6.21515 19.5005 5.78535 19.256 5.48691V5.48615C19.0835 5.27523 14.964 0.330078 9.71968 0.330078C4.47535 0.330078 0.355766 5.27507 0.183387 5.48693C-0.0611291 5.78535 -0.0611291 6.21515 0.183387 6.51359ZM9.71968 10.0499C6.1643 10.0499 3.04855 7.1924 1.90266 6.00018C3.04632 4.80579 6.1643 1.95044 9.71968 1.95044C13.2751 1.95044 16.3908 4.80797 17.5367 6.00018C16.393 7.19458 13.2751 10.0499 9.71968 10.0499Z"\n fill="#999999"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.94922 8.29099C7.55668 8.89849 8.3806 9.24021 9.24022 9.24021C10.0998 9.24021 10.9237 8.89845 11.5312 8.29099C12.1387 7.68353 12.4804 6.85956 12.4804 5.99999C12.4804 5.14041 12.1387 4.31648 11.5312 3.70898C10.9238 3.10148 10.0998 2.75977 9.24022 2.75977C8.38064 2.75977 7.55672 3.10152 6.94922 3.70898C6.34172 4.31644 6 5.14041 6 5.99999C6 6.85956 6.34176 7.68349 6.94922 8.29099ZM7.7435 5.3803C7.99408 4.77431 8.58488 4.38021 9.24022 4.38021C9.67002 4.38021 10.0816 4.55031 10.3854 4.85481C10.6899 5.15856 10.86 5.57015 10.86 5.99995C10.86 6.65529 10.4659 7.24607 9.85987 7.49667C9.25464 7.74727 8.5583 7.60905 8.09509 7.14508C7.63111 6.68186 7.49289 5.98552 7.7435 5.3803Z"\n fill="#999999"\n />\n </svg>']))))}),s&&u&&_e(Bo||(Bo=e(["",">Please enter a value<//>"])),Dr))},Yo="styles-module_textareaInputWrapper__mJffr";qt(".styles-module_textareaInputWrapper__mJffr fieldset {\n padding: 0;\n margin: 0;\n border: none; }\n\n.styles-module_textareaInputWrapper__mJffr textarea {\n margin-top: 10px;\n font-family: inherit;\n box-sizing: border-box;\n display: block;\n height: 6rem;\n width: 100%;\n resize: none;\n color: #333;\n -webkit-appearance: none;\n appearance: none;\n border-radius: 0.25rem;\n border-width: 1px;\n border-style: solid;\n border: 1px solid #e2e0db;\n padding: 8.5px 14px; }\n .styles-module_textareaInputWrapper__mJffr textarea:focus {\n outline: none; }\n .styles-module_textareaInputWrapper__mJffr textarea:-ms-input-placeholder {\n color: #999; }\n .styles-module_textareaInputWrapper__mJffr textarea::placeholder {\n color: #999; }\n");var Qo,Xo,$o,ea,ta,na,ra,ia,oa,aa,sa,la,ua,ca,da,pa,fa,_a,ma=function(t){var n=t.title,r=t.description,i=t.placeholder,o=t.onChange,a=void 0===o?function(){return null}:o,s=t.showStepValidation,l=void 0!==s&&s,u=t.isRequired,c=void 0!==u&&u;return _e(Go||(Go=e(['\n <div class="','">\n <fieldset>\n <'," title="," description="," //>\n <textarea placeholder="," oninput="," />\n </fieldset>\n ","\n </div>\n "])),Yo,Rr,n,r,i,(function(e){if(e.currentTarget instanceof HTMLTextAreaElement){var t=e.currentTarget.value;a(t)}}),l&&c&&_e(Ko||(Ko=e(["",">Please enter a value<//>"])),Dr))},va="styles-module_stepsWrap__1Yzhl",ha="styles-module_stepWrap__eLO77",ya="styles-module_unsupported__eCxdG";function ga(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ga(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ga(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_stepsWrap__1Yzhl {\n width: 100%; }\n\n.styles-module_stepWrap__eLO77 {\n margin-bottom: 30px; }\n\n.styles-module_unsupported__eCxdG {\n font-size: 12px;\n color: #ca8c1b; }\n");var xa,Ia,ka,Ca,Sa,Oa,Ma,Da,Aa,Ta,Ra,La,Na,Pa,Ea,ja,Fa,za,Va,Ua,Ha,Ba=function(t){Ie(o,G);var n=wa(o);function o(e){var t;return r(this,o),i(we(t=n.call(this,e)),"getVisibleFieldsDataOnRootStep",(function(){var e=t.props.stepDataMapping[t.props.step.id];return Object.keys(e).filter((function(t){return e[Number(t)].value})).reduce((function(t,n){var r=e[Number(n)];return ba(ba({},t),{},i({},r.machineName,r.value))}),{})})),i(we(t),"areParentValuesFilled",(function(e,n){for(var r=!0,i=0;i<n.length;i+=1){var o=n[i],a=t.props.parentChildMapping[e][o].fieldId,s=t.props.stepDataMapping[e]&&t.props.stepDataMapping[e][a];if(!s||!s.value){r=!1;break}}return r})),i(we(t),"doParentFieldsHaveValues",(function(e,n){var r=!0,i=t.props.parentChildMapping[e][n];if(i&&i.parentFields)for(var o=0;o<i.parentFields.length;o+=1){var a=t.props.parentChildMapping[e][i.parentFields[o]],s=t.props.stepDataMapping[e]&&t.props.stepDataMapping[e][a.fieldId];if(!s||!s.value){r=!1;break}}return r})),i(we(t),"shouldShowStep",(function(e){var n=t.props.step.id,r=t.props.stepMapping&&t.props.stepMapping[n];if("BUTTON"===e.type||"HTML"===e.type)return!0;if(r&&e.activity_field){var i=!e.is_hidden,o=t.props.parentChildMapping[n][e.activity_field.machine_name].parentFields,a=!0;return o&&(a=t.areParentValuesFilled(n,o)),i&&a}return!1})),i(we(t),"stepIsOfType",(function(e){var n=t.props.step.id,r=t.props.stepMapping&&t.props.stepMapping[n];return e.indexOf(r.step.activity.type)>-1})),i(we(t),"textFieldParentHasValues",(function(){var e=t.props.step.id,n=t.props.stepMapping&&t.props.stepMapping[e],r=n.step.template_fields.filter((function(e){return e.is_visible})),i=n.selectedAuthId,o=r.filter((function(e){return e.activity_field&&"DYNAMIC"===e.activity_field.type}))[0];return!o||!!(r.length>0&&o&&o.activity_field&&i&&t.doParentFieldsHaveValues(e,o.activity_field.machine_name))})),i(we(t),"shouldShowMapping",(function(){var e=t.props.step.id,n=t.props.stepMapping&&t.props.stepMapping[e];if(t.stepIsOfType(["ADAPTER","ACTION"])){var r=n.step.template_fields.filter((function(e){return e.is_visible})),i=n.selectedAuthId,o=r.filter((function(e){return e.activity_field&&"DYNAMIC"===e.activity_field.type}))[0];if(!o)return!1;if(r.length>0&&i&&o&&o.activity_field&&t.doParentFieldsHaveValues(e,o.activity_field.machine_name))return!0}return!1})),i(we(t),"getMappingDataInput",(function(){var e=t.props.step.id;return{authId:(t.props.stepMapping&&t.props.stepMapping[e]).selectedAuthId,fieldsData:t.getVisibleFieldsDataOnRootStep()}})),i(we(t),"fieldDynamicData",(function(e){var n=t.props.step.id;if(t.props.stepMapping&&t.props.stepMapping[n]&&e.activity_field){var r=t.props.parentChildMapping[n][e.activity_field.machine_name].parentFields;if(r){var o=t.props.parentChildMapping[n][r[0]].fieldId;if(o)return i({},r[0],t.props.stepDataMapping[n][o].value)}}return null})),t.state={loading:!1},t}return lt(o,[{key:"componentDidMount",value:function(){this.props.verifyStepValidity(this.props.step.id)}},{key:"render",value:function(){var t=this,n=this.props,r=n.step,i=n.stepMapping,o=n.stepDataMapping,a=n.setStepFieldData,s=n.showStepValidation,l=i[r.id]&&i[r.id].step,u=o&&o[r.id];return _e(Qo||(Qo=e(["\n ","\n "])),this.state.loading?_e(Xo||(Xo=e(["<"," //>"])),Zt):_e($o||($o=e(["\n ","\n "])),l?_e(ea||(ea=e(["\n <div class=",">\n ","\n ","\n </div>\n "])),va,l.template_fields.map((function(n){var i;if(t.shouldShowStep(n)&&n.activity_field)switch(n.activity_field.type){case"SELECT":return _e(ta||(ta=e(["\n <div class=",">\n <","\n key=","\n apiHandler=","\n title=","\n description=","\n showStepValidation=","\n placeholder=","\n isRequired=","\n value=","\n onChange=","\n endpointUrl=","\n isDynamic=","\n endpointData=","\n ><//>\n </div>\n "])),ha,Ui,n.activity_field.id,t.props.apiHandler,n.title||n.activity_field.title,n.description||n.activity_field.description,s,n.placeholder,n.is_required,u&&u[n.id]&&u[n.id].value||"",(function(e){a({stepId:"".concat(r.id),fieldId:"".concat(n.id),value:e,isRequired:n.is_required}),t.props.verifyStepValidity(r.id)}),n.activity_field.data_src,n.activity_field.is_dynamic,JSON.stringify(ba({authorization_id:t.props.stepMapping&&(null===(i=t.props.stepMapping[t.props.step.id])||void 0===i?void 0:i.selectedAuthId)},t.fieldDynamicData(n))));case"TEXTFIELD":return!t.shouldShowMapping()&&t.textFieldParentHasValues()&&_e(na||(na=e(["\n <div class=",">\n <","\n id=","\n title=","\n description=","\n value=","\n placeholder=","\n showStepValidation=","\n isRequired=","\n onChange=","\n ><//>\n </div>\n "])),ha,Eo,n.activity_field.id,n.title||n.activity_field.title,n.description||n.activity_field.description,u&&u[n.id]&&u[n.id].value||"",n.placeholder||"Please enter a value",s,n.is_required,(function(e){a({stepId:"".concat(r.id),fieldId:"".concat(n.id),value:e,isRequired:n.is_required}),t.props.verifyStepValidity(r.id)}));case"CHECKBOX":var o,l,c;return _e(ra||(ra=e(["\n <div class=",">\n <","\n title=","\n description=","\n isRequired=","\n />\n <","\n label=","\n name=","\n value=","\n isChecked=","\n isRequired=","\n showStepValidation=","\n handleChange=","\n />\n </div>\n "])),ha,Rr,n.title||n.activity_field.title,n.description||n.activity_field.description,n.is_required,Ki,JSON.parse(null!==(o=null===(l=n.activity_field)||void 0===l||null===(c=l.data_src)||void 0===c?void 0:c.replace(/\\'/g,"'"))&&void 0!==o?o:"[]")||[],n.activity_field.machine_name,u&&u[n.id]&&u[n.id].value,u&&u[n.id]&&u[n.id].value,n.is_required,s,(function(e,i){a({stepId:"".concat(r.id),fieldId:"".concat(n.id),value:i,isRequired:n.is_required}),t.props.verifyStepValidity(r.id)}));case"DYNAMIC":return _e(ia||(ia=e([""])));case"PASSWORD":return _e(oa||(oa=e(["\n <div class=",">\n <","\n title=","\n description=","\n value=","\n placeholder=","\n showStepValidation=","\n isRequired=","\n onChange=","\n />\n </div>\n "])),ha,Zo,n.title||n.activity_field.title,n.description||n.activity_field.description,u&&u[n.id]&&u[n.id].value||"",n.placeholder||"Please enter a value",s,n.is_required,(function(e){a({stepId:"".concat(r.id),fieldId:"".concat(n.id),value:e,isRequired:n.is_required}),t.props.verifyStepValidity(r.id)}));case"TEXTAREA":return _e(aa||(aa=e(["\n <div class=",">\n <","\n title=","\n description=","\n value=","\n placeholder=","\n showStepValidation=","\n isRequired=","\n onChange=","\n />\n </div>\n "])),ha,ma,n.title||n.activity_field.title,n.description||n.activity_field.description,u&&u[n.id]&&u[n.id].value||"",n.placeholder||"Please enter a value",s,n.is_required,(function(e){a({stepId:"".concat(r.id),fieldId:"".concat(n.id),value:e,isRequired:n.is_required}),t.props.verifyStepValidity(r.id)}));case"DATE":return _e(sa||(sa=e(["\n <div class=",">\n <","\n title=","\n description=","\n value=","\n placeholder=","\n showStepValidation=","\n isRequired=","\n onChange=","\n />\n </div>\n "])),ha,Wo,n.title||n.activity_field.title,n.description||n.activity_field.description,u&&u[n.id]&&u[n.id].value||"",n.placeholder||"Please enter a value",s,n.is_required,(function(e){a({stepId:"".concat(r.id),fieldId:"".concat(n.id),value:e,isRequired:n.is_required}),t.props.verifyStepValidity(r.id)}));case"RADIO":return _e(la||(la=e(["\n <div class=",">\n <","\n name=","\n label=","\n description=","\n />\n </div>\n "])),ha,kr,n.title||n.activity_field.title,n.title||n.activity_field.title,n.description||n.activity_field.description);default:return _e(ua||(ua=e([" <div\n class=","\n >\n Field: "," is currently not\n supported\n </div>"])),"".concat(ha," ").concat(ya),n.activity_field.type)}else switch(n.type){case"HTML":return _e(ca||(ca=e(['\n <div\n style="margin-bottom: 2rem;"\n dangerouslySetInnerHTML=',"\n />\n "])),{__html:ui(window).sanitize(n.default_value)});case"BUTTON":return _e(da||(da=e(['\n <div style="margin-bottom: 2rem;">\n <'," label="," />\n </div>\n "])),Mn,n.title)}return _e(pa||(pa=e([""])))})),this.shouldShowMapping()&&_e(fa||(fa=e(["\n <div class=",">\n <","\n stepId=","\n templateFields=","\n showStepValidation=","\n endpointData=","\n ><//>\n </div>\n "])),ha,Co,l.id,l.template_fields,s,this.getMappingDataInput())):_e(_a||(_a=e(["Step data could not be loaded"])))))}}]),o}(),Wa=ge.connect(["stepMapping","stepDataMapping","parentChildMapping"],Bt)(Ba),Ja="styles-module_stepsWrap__3VIDN",qa="styles-module_stepInfo__nU7A7",Ga="styles-module_header__2GDea",Ka="styles-module_name__h_9E1",Za="styles-module_steps__1tZbw",Ya="styles-module_stepContainer__1DBMw",Qa="styles-module_top__JXVEL",Xa="styles-module_bottom__2g7TT",$a="styles-module_buttons__2hBh9",es="styles-module_save__1LVOi",ts="styles-module_postSave__3EhMs",ns="styles-module_webhookContainer__2UJ9L",rs="styles-module_webhook__5NihV",is="styles-module_authWrap__em0DI";function os(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function as(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?os(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):os(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ss(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_stepsWrap__3VIDN {\n display: flex;\n border: 1px solid #d7d7d7;\n box-sizing: border-box;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.04);\n border-radius: 4px;\n width: 100%;\n box-sizing: border-box;\n padding: 30px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 .styles-module_header__2GDea {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: space-between; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 .styles-module_header__2GDea .styles-module_name__h_9E1 {\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 20px;\n color: #333333; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 .styles-module_header__2GDea .styles-module_steps__1tZbw {\n font-size: 12px;\n font-weight: 400;\n color: #8c8c8c; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 img,\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 svg {\n margin-right: 10px;\n height: 25px;\n width: 25px;\n border-radius: 9999px;\n object-fit: contain; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw {\n display: flex;\n width: 100%;\n flex-direction: column; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_top__JXVEL {\n display: flex;\n flex: 1 1 0%;\n padding-top: 50px;\n padding-left: 35px;\n padding-right: 35px;\n width: 100%; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_bottom__2g7TT {\n display: flex;\n height: 2rem;\n align-items: center;\n justify-content: flex-end;\n box-sizing: initial;\n border-width: 0px;\n border-top-width: 1px;\n border-style: solid;\n border-color: #d7d7d7;\n margin-top: 55px;\n padding-top: 20px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_bottom__2g7TT .styles-module_buttons__2hBh9 {\n display: flex; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_bottom__2g7TT .styles-module_buttons__2hBh9 div:not(:last-child) {\n margin-right: 20px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_save__1LVOi {\n font-style: normal;\n font-weight: normal;\n margin-top: -30px;\n font-size: 14px;\n color: #8c8c8c;\n padding-bottom: 30px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_postSave__3EhMs .styles-module_webhookContainer__2UJ9L {\n border: 1px solid #d7d7d7;\n padding: 8px 12px;\n margin-top: 12px;\n border-radius: 4px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_postSave__3EhMs .styles-module_webhookContainer__2UJ9L .styles-module_webhook__5NihV {\n color: #333;\n font-family: monospace;\n line-height: 20px; }\n\n.styles-module_authWrap__em0DI {\n margin-bottom: 30px;\n width: 100%;\n max-width: 75%; }\n");var ls=function(t){Ie(o,G);var n=ss(o);function o(e){var t;return r(this,o),i(we(t=n.call(this,e)),"getPayload",(function(){var e,n,r=t.props,i=r.stepMapping,o=r.stepDataMapping;return t.context.isPreviewMode?null:(t.setState({loading:!0}),{name:null!==(e=null===(n=t.props.genericData.templateApp)||void 0===n?void 0:n.name)&&void 0!==e?e:"My new flow",notification_email:"",template:Number(t.props.genericData.templateId),bundle_id:Number(t.props.genericData.bundleId),steps:Object.keys(i).map((function(e){return{id:i[e].integrationStepId||i[e].step.id,authorization:Number(i[e].selectedAuthId)||null,template_step:i[e].step.id,app_user_data:i[e].step.template_fields.map((function(t){return{id:o[i[e].step.id][t.id].integrationFieldId||t.id,value:!o[i[e].step.id][t.id].value&&""!==o[i[e].step.id][t.id].value||o[i[e].step.id][t.id].objectValue?JSON.stringify(o[i[e].step.id][t.id].objectValue):"".concat(o[i[e].step.id][t.id].value),template_field:t.id}}))}}))})})),i(we(t),"createIntegration",(function(){var e=t.getPayload();e&&t.context.apiHandler.saveIntegration(e).then((function(e){t.postSaveOrCreate(e)})).catch((function(e){return console.error(e)}))})),i(we(t),"postSaveOrCreate",(function(e){var n=t.props.stepMapping,r=Object.keys(n).map((function(e){return n[e]})).filter((function(e){return e.step.activity&&"TRIGGER"===e.step.activity.type}))[0],i=e.steps.filter((function(e){return e.template_step===r.step.id}))[0];if(t.setState({loading:!1}),i&&i.returned_data)try{var o=JSON.parse(i.returned_data);o.is_webhook_url&&o.endpoint&&t.setState({postSave:!0,postSaveData:o,integrationData:e})}catch(e){console.error(e)}else t.dismiss()})),i(we(t),"updateIntegration",(function(){var e=t.getPayload();e&&t.context.apiHandler.updateIntegration(t.context.integrationId,as(as({},e),{},{id:"".concat(t.context.integrationId)})).then((function(e){t.postSaveOrCreate(e)})).catch((function(e){return console.error(e)}))})),i(we(t),"dismiss",(function(){var e=t.state.integrationData;e&&t.context.eventEmitter.emit("did-save-integration",{integrationId:e.id,name:e.name,templateId:e.template,status:e.status})})),i(we(t),"handleAuthSelected",(function(e,n,r,i){var o=t.props.stepMapping[n].step.template_fields.filter((function(e){return e.activity_field&&e.activity_field.is_dynamic})).map((function(e){return e.id}));t.props.setStepAuthorization(n,e,r,o,i)})),t.state={loading:!1,selectedAuthStep:null,postSave:!1,postSaveData:null,integrationData:null},t}return lt(o,[{key:"componentDidUpdate",value:function(e){var t,n,r,i,o=e.stepState,a=this.props.stepState;o.stepIndex!==a.stepIndex&&this.context.eventEmitter.emit("did-change-step",{stepId:null!==(t=null===(n=a.steps[a.stepIndex])||void 0===n?void 0:n.stepId)&&void 0!==t?t:null,stepType:null!==(r=null===(i=a.steps[a.stepIndex])||void 0===i?void 0:i.type)&&void 0!==r?r:"CONFIRMATION"})}},{key:"render",value:function(){var t,n,r,i,o,a,s,l,u,c,d,p=this,f=null,_=this.props,m=_.stepState,v=_.stepMapping,h=this.state,y=h.postSave,g=h.postSaveData,b=m.currentStep,w=m.stepIndex,x=m.steps,I=!1,k=!1,C=!1,S=!1;w>-1&&"CONFIRMATION"!==(null==b?void 0:b.type)?(f=v[Number(null==b?void 0:b.stepId)],I=!1,k=m.stepIndex>0,C=null!==(d=null==b?void 0:b.isValid)&&void 0!==d&&d,S=m.showValidation):"CONFIRMATION"===(null==b?void 0:b.type)&&w===x.length&&(k=!0,I=!0);return _e(xa||(xa=e(["\n <div class=",">\n <div class=",">\n <div class=",">\n ","\n </div>\n\n <div class=",">\n ","\n </div>\n ","\n </div>\n </div>\n "])),Ja,Ya,qa,b&&_e(Ia||(Ia=e(["\n ","\n "])),I?_e(ka||(ka=e(["\n <div class=",">\n <div class=",'>\n <svg\n width="25"\n height="25"\n viewBox="0 0 25 25"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="12.5"\n cy="12.5"\n r="11.75"\n fill="white"\n stroke="#2ECC71"\n stroke-width="1.5"\n />\n <path\n d="M17.2209 9.16699L11.3907 15.8337L8.33203 12.3361"\n stroke="#2ECC71"\n stroke-width="1.5"\n stroke-linecap="round"\n />\n </svg>\n <div>\n ',"\n </div>\n </div>\n <div class=",">\n ","\n </div>\n </div>\n "])),Ga,Ka,g&&y?"Flow created successfully":"Confirm and activate",Za,"Step ".concat((null!==(t=null===(n=this.props.stepState)||void 0===n?void 0:n.stepIndex)&&void 0!==t?t:0)+1," / ").concat((null!==(r=null===(i=this.props.stepState)||void 0===i?void 0:i.steps.length)&&void 0!==r?r:0)+1)):_e(Ca||(Ca=e(["\n <div class=",">\n <div class=",">\n <img src="," />\n <div>\n ","\n </div>\n </div>\n <div class=",">\n ","\n </div>\n </div>\n "])),Ga,Ka,null===(o=f)||void 0===o?void 0:o.step.activity.app.icon_url,"CONFIRMATION"!==(null==b?void 0:b.type)&&(null==b?void 0:b.title),Za,"Step ".concat((null!==(a=null===(s=this.props.stepState)||void 0===s?void 0:s.stepIndex)&&void 0!==a?a:0)+1," / ").concat((null!==(l=null===(u=this.props.stepState)||void 0===u?void 0:u.steps.length)&&void 0!==l?l:0)+1))),Qa,b?_e(Sa||(Sa=e(["\n ","\n "])),I?_e(Oa||(Oa=e(["\n ","\n "])),y||g?_e(Da||(Da=e(["\n <div class=",">\n <",'\n title="Webhook URL"\n description="Please use the following webhook url to send data"\n />\n <div class=',">\n <div class=",">\n ","\n </div>\n </div>\n </div>\n "])),ts,Rr,ns,rs,null==g?void 0:g.endpoint):_e(Ma||(Ma=e(["\n <div class=",">\n ","\n </div>\n "])),es,this.context.isEditMode?"Your integration is ready to be updated. Click “Update” to continue.":"Your integration is ready to be enabled. Click “Save” to continue.")):_e(Aa||(Aa=e(["\n ","\n "])),f&&_e(Ta||(Ta=e(["\n ","\n "])),"AUTH"===(null==b?void 0:b.type)?_e(Ra||(Ra=e(["\n <div class=",">\n <","\n stepId=","\n apiHandler=","\n showErrors=","\n onAuthSelected=","\n >\n <//>\n </div>\n "])),is,li,f.step.id,this.context.apiHandler,S,(function(e,t,n){var r;return p.handleAuthSelected(e,Number(null===(r=f)||void 0===r?void 0:r.step.id),t,n)})):_e(La||(La=e(["\n <","\n step=","\n stepType=","\n showStepValidation=","\n apiHandler=","\n eventEmitter=","\n />\n "])),Wa,null===(c=f)||void 0===c?void 0:c.step,null==b?void 0:b.type,S,this.context.apiHandler,this.context.eventEmitter)))):_e(Na||(Na=e(["This template has no configured steps"]))),b&&_e(Pa||(Pa=e(["\n <div class=",">\n <div class=",">\n ","\n ","\n </div>\n </div>\n "])),Xa,$a,k&&!y&&!g&&_e(Ea||(Ea=e(["\n <",'\n label="Back"\n onClick=',"\n type=","\n ><//>\n "])),Mn,(function(){return p.props.gotoPreviousStep()}),bn.SECONDARY),I?_e(ja||(ja=e(["\n ","\n "])),y||g?_e(Ua||(Ua=e(["\n <",'\n label="Continue"\n onClick=',"\n ><//>\n "])),Mn,(function(){return p.dismiss()})):_e(Fa||(Fa=e(["\n ","\n "])),this.context.isEditMode?_e(za||(za=e(["\n <",'\n label="Update"\n isLoading=',"\n onClick=","\n ><//>\n "])),Mn,this.state.loading,(function(){return p.updateIntegration()})):_e(Va||(Va=e(["\n <",'\n label="Save"\n disabled=',"\n tooltip=","\n isLoading=","\n onClick=","\n ><//>\n "])),Mn,this.context.isPreviewMode,this.context.isPreviewMode?'Integration setup will have to be\ndone in "Live View"':null,this.state.loading,(function(){return p.createIntegration()})))):_e(Ha||(Ha=e(["\n <",'\n label="Next"\n disabled=',"\n onClick=","\n ><//>\n "])),Mn,!C,(function(){return C?p.props.gotoNextStep():p.props.showStepValidationState()}))))}}]),o}();i(ls,"contextType",Ft);var us,cs,ds,ps,fs,_s,ms,vs=ge.connect(["stepState","genericData","stepMapping","stepDataMapping"],Bt)(ls),hs="styles-module_wrap__2ZgZ0",ys="styles-module_main__11gFF";qt(".styles-module_wrap__2ZgZ0 {\n position: relative;\n width: 100%;\n max-width: 730px; }\n .styles-module_wrap__2ZgZ0 *,\n .styles-module_wrap__2ZgZ0 *::before,\n .styles-module_wrap__2ZgZ0 *::after {\n box-sizing: border-box; }\n\n.styles-module_main__11gFF {\n width: 100%;\n line-height: 1; }\n");var gs,bs=["steps"],ws=ge.connect([""],Bt)((function(t){var r,i=Ve(Ye(!1),2),o=i[0],a=i[1],s=Ve(Ye(null),2),l=s[0],u=s[1],c=t.templateId,d=t.bundleId,p=t.customWrapper,f=t.templatePreviewData,_=t.previewMetadata,m=Ve(Ye(null),2),v=m[0],h=m[1],y=Ve(function(e){var t=Ze(Ue++),n=Ye();return t.i=e,He.componentDidCatch||(He.componentDidCatch=function(e){t.i&&t.i(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}((function(){})),2),g=y[0],b=y[1],w=tt(Ft);return Qe((function(){return function(){t.reset()}}),[]),Qe((function(){g&&console.error(g)}),[g]),Qe((function(){if(a(!0),null!=w&&w.isPreviewMode&&_){if(!f)throw new Error("Preview data was not provided");try{St(f,Jt)}catch(e){return console.error(e),a(!1),void h(e)}var e=f.steps,r=ze(f,bs);return u(f),t.setGenericData({templateId:Number(r.id),bundleId:Number(d),isPreviewMode:w.isPreviewMode}),t.setSteps(e.filter(Yt)),t.setStepMapping(e.filter(Yt)),t.setParentChildMapping(e.filter(Yt)),t.gotoStepInPreview(_),w.eventEmitter.emit("did-load-preview",{templateId:Number(r.id),templateTitle:r.name,templateDescription:r.description}),void a(!1)}if(!c)throw new Error("Template ID not found");null==w||w.apiHandler.getTemplate(Number(c)).then((function(e){u(e),e&&Promise.all(e.steps.map((function(e){return w.apiHandler.getTemplateStep(Number(e.id))}))).then(function(){var r=n(F.mark((function n(r){var i;return F.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!r){n.next=16;break}if(t.setGenericData({templateId:Number(c),bundleId:Number(d)}),t.setSteps(r.filter(Yt)),t.setStepMapping(r.filter(Yt)),t.setParentChildMapping(r.filter(Yt)),!w.integrationId){n.next=14;break}return n.next=8,w.apiHandler.getIntegrationById(w.integrationId);case 8:if(!(i=n.sent)){n.next=13;break}t.setIntegrationData(i),n.next=14;break;case 13:throw new Error("Error fetching integration data for ID ".concat(w.integrationId));case 14:w.eventEmitter.emit("did-load-template",{templateId:Number(c),templateTitle:e.name,templateDescription:e.description}),a(!1);case 16:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){return console.error(e)}))}))}),[c]),p?_e(us||(us=e(["",""])),p):_e(cs||(cs=e(['\n <div class="'," ",'">\n ',"\n </div>\n "])),hs,"integry-container",g||v?_e(ds||(ds=e(["\n <","\n title=","\n description=","\n errorPayload=","\n onDismiss=","\n />\n "])),Nn,v?"Validation error":"An unexpected error occurred",v?"There was an error validating the preview payload:":"Please review the following stacktrace:",v||g,v?null:b):_e(ps||(ps=e(["\n <div>\n ","\n </div>\n <div class=",">\n ","\n ","\n </div>\n "])),!o&&l&&_e(fs||(fs=e(["\n <","\n steps=","\n ><//>\n "])),yr,null===(r=l.steps)||void 0===r?void 0:r.map((function(e){return{label:e.title,logoUrl:e.activity.app.icon_url}}))),ys,o&&_e(_s||(_s=e(['<div style="display: flex; justify-content: center;">\n <'," />\n </div>"])),Zt),!o&&l&&_e(ms||(ms=e([" <"," steps=","><//> "])),vs,l.steps)))})),xs=he((function(e){var t,n;t=me,n=function(){var e="undefined"==typeof window,t=new Map,n=new Map,r=[];r.total=0;var i=[],a=[];function s(){t.clear(),n.clear(),i=[],a=[]}function l(e){for(var t=-9007199254740991,n=e.length-1;n>=0;--n){var r=e[n];if(null!==r){var i=r.score;i>t&&(t=i)}}return-9007199254740991===t?null:t}function u(e,t){var n=e[t];if(void 0!==n)return n;var r=t;Array.isArray(t)||(r=t.split("."));for(var i=r.length,o=-1;e&&++o<i;)e=e[r[o]];return e}function c(e){return"object"===o(e)}var d=function(){var e=[],t=0,n={};function r(){for(var n=0,r=e[n],i=1;i<t;){var o=i+1;n=i,o<t&&e[o].score<e[i].score&&(n=o),e[n-1>>1]=e[n],i=1+(n<<1)}for(var a=n-1>>1;n>0&&r.score<e[a].score;a=(n=a)-1>>1)e[n]=e[a];e[n]=r}return n.add=function(n){var r=t;e[t++]=n;for(var i=r-1>>1;r>0&&n.score<e[i].score;i=(r=i)-1>>1)e[r]=e[i];e[r]=n},n.poll=function(){if(0!==t){var n=e[0];return e[0]=e[--t],r(),n}},n.peek=function(n){if(0!==t)return e[0]},n.replaceTop=function(t){e[0]=t,r()},n},p=d();return function o(f){var _={single:function(e,t,n){return e?(c(e)||(e=_.getPreparedSearch(e)),t?(c(t)||(t=_.getPrepared(t)),((n&&void 0!==n.allowTypo?n.allowTypo:!f||void 0===f.allowTypo||f.allowTypo)?_.algorithm:_.algorithmNoTypo)(e,t,e[0])):null):null},go:function(e,t,n){if(!e)return r;var i=(e=_.prepareSearch(e))[0],o=n&&n.threshold||f&&f.threshold||-9007199254740991,a=n&&n.limit||f&&f.limit||9007199254740991,s=(n&&void 0!==n.allowTypo?n.allowTypo:!f||void 0===f.allowTypo||f.allowTypo)?_.algorithm:_.algorithmNoTypo,d=0,m=0,v=t.length;if(n&&n.keys)for(var h=n.scoreFn||l,y=n.keys,g=y.length,b=v-1;b>=0;--b){for(var w=t[b],x=new Array(g),I=g-1;I>=0;--I)(S=u(w,C=y[I]))?(c(S)||(S=_.getPrepared(S)),x[I]=s(e,S,i)):x[I]=null;x.obj=w;var k=h(x);null!==k&&(k<o||(x.score=k,d<a?(p.add(x),++d):(++m,k>p.peek().score&&p.replaceTop(x))))}else if(n&&n.key){var C=n.key;for(b=v-1;b>=0;--b)(S=u(w=t[b],C))&&(c(S)||(S=_.getPrepared(S)),null!==(O=s(e,S,i))&&(O.score<o||(O={target:O.target,_targetLowerCodes:null,_nextBeginningIndexes:null,score:O.score,indexes:O.indexes,obj:w},d<a?(p.add(O),++d):(++m,O.score>p.peek().score&&p.replaceTop(O)))))}else for(b=v-1;b>=0;--b){var S,O;(S=t[b])&&(c(S)||(S=_.getPrepared(S)),null!==(O=s(e,S,i))&&(O.score<o||(d<a?(p.add(O),++d):(++m,O.score>p.peek().score&&p.replaceTop(O)))))}if(0===d)return r;var M=new Array(d);for(b=d-1;b>=0;--b)M[b]=p.poll();return M.total=d+m,M},goAsync:function(t,n,i){var o=!1,a=new Promise((function(a,s){if(!t)return a(r);var p=(t=_.prepareSearch(t))[0],m=d(),v=n.length-1,h=i&&i.threshold||f&&f.threshold||-9007199254740991,y=i&&i.limit||f&&f.limit||9007199254740991,g=(i&&void 0!==i.allowTypo?i.allowTypo:!f||void 0===f.allowTypo||f.allowTypo)?_.algorithm:_.algorithmNoTypo,b=0,w=0;function x(){if(o)return s("canceled");var d=Date.now();if(i&&i.keys)for(var f=i.scoreFn||l,I=i.keys,k=I.length;v>=0;--v){for(var C=n[v],S=new Array(k),O=k-1;O>=0;--O)(A=u(C,D=I[O]))?(c(A)||(A=_.getPrepared(A)),S[O]=g(t,A,p)):S[O]=null;S.obj=C;var M=f(S);if(null!==M&&!(M<h)&&(S.score=M,b<y?(m.add(S),++b):(++w,M>m.peek().score&&m.replaceTop(S)),v%1e3==0&&Date.now()-d>=10))return void(e?setImmediate(x):setTimeout(x))}else if(i&&i.key){for(var D=i.key;v>=0;--v)if((A=u(C=n[v],D))&&(c(A)||(A=_.getPrepared(A)),null!==(T=g(t,A,p))&&!(T.score<h)&&(T={target:T.target,_targetLowerCodes:null,_nextBeginningIndexes:null,score:T.score,indexes:T.indexes,obj:C},b<y?(m.add(T),++b):(++w,T.score>m.peek().score&&m.replaceTop(T)),v%1e3==0&&Date.now()-d>=10)))return void(e?setImmediate(x):setTimeout(x))}else for(;v>=0;--v){var A,T;if((A=n[v])&&(c(A)||(A=_.getPrepared(A)),null!==(T=g(t,A,p))&&!(T.score<h)&&(b<y?(m.add(T),++b):(++w,T.score>m.peek().score&&m.replaceTop(T)),v%1e3==0&&Date.now()-d>=10)))return void(e?setImmediate(x):setTimeout(x))}if(0===b)return a(r);for(var R=new Array(b),L=b-1;L>=0;--L)R[L]=m.poll();R.total=b+w,a(R)}e?setImmediate(x):x()}));return a.cancel=function(){o=!0},a},highlight:function(e,t,n){if(null===e)return null;void 0===t&&(t="<b>"),void 0===n&&(n="</b>");for(var r="",i=0,o=!1,a=e.target,s=a.length,l=e.indexes,u=0;u<s;++u){var c=a[u];if(l[i]===u){if(o||(o=!0,r+=t),++i===l.length){r+=c+n+a.substr(u+1);break}}else o&&(o=!1,r+=n);r+=c}return r},prepare:function(e){if(e)return{target:e,_targetLowerCodes:_.prepareLowerCodes(e),_nextBeginningIndexes:null,score:null,indexes:null,obj:null}},prepareSlow:function(e){if(e)return{target:e,_targetLowerCodes:_.prepareLowerCodes(e),_nextBeginningIndexes:_.prepareNextBeginningIndexes(e),score:null,indexes:null,obj:null}},prepareSearch:function(e){if(e)return _.prepareLowerCodes(e)},getPrepared:function(e){if(e.length>999)return _.prepare(e);var n=t.get(e);return void 0!==n||(n=_.prepare(e),t.set(e,n)),n},getPreparedSearch:function(e){if(e.length>999)return _.prepareSearch(e);var t=n.get(e);return void 0!==t||(t=_.prepareSearch(e),n.set(e,t)),t},algorithm:function(e,t,n){for(var r=t._targetLowerCodes,o=e.length,s=r.length,l=0,u=0,c=0,d=0;;){if(n===r[u]){if(i[d++]=u,++l===o)break;n=e[0===c?l:c===l?l+1:c===l-1?l-1:l]}if(++u>=s)for(;;){if(l<=1)return null;if(0===c){if(n===e[--l])continue;c=l}else{if(1===c)return null;if((n=e[1+(l=--c)])===e[l])continue}u=i[(d=l)-1]+1;break}}l=0;var p=0,f=!1,m=0,v=t._nextBeginningIndexes;null===v&&(v=t._nextBeginningIndexes=_.prepareNextBeginningIndexes(t.target));var h=u=0===i[0]?0:v[i[0]-1];if(u!==s)for(;;)if(u>=s){if(l<=0){if(++p>o-2)break;if(e[p]===e[p+1])continue;u=h;continue}--l,u=v[a[--m]]}else if(e[0===p?l:p===l?l+1:p===l-1?l-1:l]===r[u]){if(a[m++]=u,++l===o){f=!0;break}++u}else u=v[u];if(f)var y=a,g=m;else y=i,g=d;for(var b=0,w=-1,x=0;x<o;++x)w!==(u=y[x])-1&&(b-=u),w=u;for(f?0!==p&&(b+=-20):(b*=1e3,0!==c&&(b+=-20)),b-=s-o,t.score=b,t.indexes=new Array(g),x=g-1;x>=0;--x)t.indexes[x]=y[x];return t},algorithmNoTypo:function(e,t,n){for(var r=t._targetLowerCodes,o=e.length,s=r.length,l=0,u=0,c=0;;){if(n===r[u]){if(i[c++]=u,++l===o)break;n=e[l]}if(++u>=s)return null}l=0;var d=!1,p=0,f=t._nextBeginningIndexes;if(null===f&&(f=t._nextBeginningIndexes=_.prepareNextBeginningIndexes(t.target)),(u=0===i[0]?0:f[i[0]-1])!==s)for(;;)if(u>=s){if(l<=0)break;--l,u=f[a[--p]]}else if(e[l]===r[u]){if(a[p++]=u,++l===o){d=!0;break}++u}else u=f[u];if(d)var m=a,v=p;else m=i,v=c;for(var h=0,y=-1,g=0;g<o;++g)y!==(u=m[g])-1&&(h-=u),y=u;for(d||(h*=1e3),h-=s-o,t.score=h,t.indexes=new Array(v),g=v-1;g>=0;--g)t.indexes[g]=m[g];return t},prepareLowerCodes:function(e){for(var t=e.length,n=[],r=e.toLowerCase(),i=0;i<t;++i)n[i]=r.charCodeAt(i);return n},prepareBeginningIndexes:function(e){for(var t=e.length,n=[],r=0,i=!1,o=!1,a=0;a<t;++a){var s=e.charCodeAt(a),l=s>=65&&s<=90,u=l||s>=97&&s<=122||s>=48&&s<=57,c=l&&!i||!o||!u;i=l,o=u,c&&(n[r++]=a)}return n},prepareNextBeginningIndexes:function(e){for(var t=e.length,n=_.prepareBeginningIndexes(e),r=[],i=n[0],o=0,a=0;a<t;++a)i>a?r[a]=i:(i=n[++o],r[a]=void 0===i?t:i);return r},cleanup:s,new:o};return _}()},e.exports?e.exports=n():t.fuzzysort=n()})),Is="styles-module_search__2j0G1",ks="styles-module_resultCount__12RMZ";function Cs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_search__2j0G1 {\n margin-top: 1rem;\n margin-bottom: 0.5rem;\n display: flex;\n width: 100%;\n flex: 1 1 0%;\n overflow: hidden;\n border-radius: 0.25rem;\n border-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity)); }\n .styles-module_search__2j0G1 input {\n margin: 0.25rem;\n height: 100%;\n width: 100%;\n flex: 1 1 0%;\n border-style: none;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; }\n\n.styles-module_resultCount__12RMZ {\n display: flex;\n align-items: center;\n justify-content: center;\n border-left-width: 1px;\n border-top-width: 0px;\n border-right-width: 0px;\n border-bottom-width: 0px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 700;\n --tw-text-opacity: 1;\n color: rgba(156, 163, 175, var(--tw-text-opacity)); }\n");var Ss,Os=function(t){Ie(o,G);var n=Cs(o);function o(e){var t;return r(this,o),i(we(t=n.call(this,e)),"onInput",(function(e){if(e.target instanceof HTMLInputElement){var n=e.target.value;t.setState({value:n}),t.props.onChange(n)}})),t.state={value:t.props.initialValue||""},t}return lt(o,[{key:"render",value:function(){return _e(gs||(gs=e(["\n <div class="," ",">\n <input\n placeholder=","\n value=","\n oninput=","\n />\n <div class=",">"," results</div>\n </div>\n "])),Is,"integry-search",this.props.placeholder||"Search...",this.state.value,this.onInput,ks,this.props.resultCount)}}]),o}(),Ms="styles-module_nav__bKw4L",Ds="styles-module_tab__3xQCg",As="styles-module_tabactive__2JeoG";qt(".styles-module_nav__bKw4L {\n margin-bottom: 0px;\n margin-top: 0px;\n padding: 0px;\n border-top-width: 0px;\n border-right-width: 0px;\n border-left-width: 0px;\n border-bottom-width: 1px;\n border-style: solid;\n border-color: rgba(107, 114, 128, 0.25); }\n\n.styles-module_tab__3xQCg {\n display: inline-block;\n cursor: pointer;\n list-style-type: none;\n border-bottom-width: 2px;\n border-color: transparent;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-bottom: 0.25rem;\n line-height: 2rem;\n color: #9ca3af;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n margin-bottom: -1px; }\n .styles-module_tab__3xQCg:hover {\n border-width: 0px;\n border-bottom-width: 2px;\n border-style: solid;\n border-color: #509cf6; }\n\n.styles-module_tabactive__2JeoG {\n border-width: 0px;\n border-bottom-width: 2px;\n border-style: solid;\n border-color: #509cf6;\n color: #374151; }\n");var Ts,Rs,Ls,Ns=function(t){var n=t.label,r=t.activeTab,i=t.onClick;return _e(Ss||(Ss=e(["\n <li\n class=","\n onclick=","\n >\n ","\n </li>\n "])),"".concat(Ds," ").concat(r===n?As:""),(function(){i(n)}),n)},Ps=function(t){var n=t.preSelectedTab,r=t.children;if(!Array.isArray(r)||r.length<2)throw new Error("Tab Bar must have at least two children");var i=Ve(Ye(n||r[0].props.label),2),o=i[0],a=i[1],s=function(e){a(e)};return _e(Ts||(Ts=e(["\n <div>\n <ol class=",">\n ",'\n </ol>\n <div className="tab-content">\n ',"\n </div>\n </div>\n "])),Ms,r.map((function(t){var n=t.props.label;return _e(Rs||(Rs=e(["\n <","\n activeTab=","\n key=","\n label=","\n onClick=","\n >\n <//>\n "])),Ns,o,n,n,s)})),r.map((function(e){if(e.props.label===o)return e.props.children})))},Es="styles-module_toggle__2c6vj",js="styles-module_inner__2w3FN",Fs="styles-module_toggled__3gmsw";qt(".styles-module_toggle__2c6vj {\n position: relative; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN {\n position: relative;\n border-radius: 9999px;\n background-color: #9ca3af;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n transition-timing-function: linear;\n position: relative;\n height: 20px;\n width: 40px; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN.styles-module_toggled__3gmsw {\n background: #39d239; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN label {\n position: absolute;\n left: 0px;\n margin-bottom: 0.5rem;\n transform: translateX(0px);\n cursor: pointer;\n border-radius: 9999px;\n border-width: 2px;\n border-style: solid;\n border-color: #9ca3af;\n background-color: white;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n height: 16px;\n width: 16px; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN label.styles-module_toggled__3gmsw {\n border-color: #39d239;\n transform: translateX(100%); }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN input {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 100%; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN input:active {\n outline: none; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN input:focus {\n outline: none; }\n");var zs,Vs,Us,Hs,Bs,Ws=function(t){var n=t.id,r=t.value,i=t.onChange;return _e(Ls||(Ls=e(["\n <div class=",">\n <div class=",">\n <label for="," class=",'></label>\n <input type="checkbox" id='," onclick="," />\n </div>\n </div>\n "])),Es,"".concat(js," ").concat(r?Fs:""," "),n,"".concat(r?Fs:""," "),n,(function(){i(!r)}))},Js="styles-module_integrations__2vJT8",qs="styles-module_integration__MtN8C",Gs="styles-module_header__1d_zB",Ks="styles-module_row__1UAlk",Zs="styles-module_topbar__3TTLr";function Ys(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_integrations__2vJT8 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n display: flex;\n flex-direction: column; }\n .styles-module_integrations__2vJT8 .styles-module_integration__MtN8C {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem; }\n .styles-module_integrations__2vJT8 .styles-module_integration__MtN8C img {\n height: 3rem;\n width: 3rem; }\n\n.styles-module_header__1d_zB {\n margin-bottom: 0.75rem;\n margin-top: 1.5rem;\n letter-spacing: 0.025em;\n --tw-text-opacity: 1;\n color: rgba(80, 156, 246, var(--tw-text-opacity)); }\n\n.styles-module_row__1UAlk {\n display: flex;\n align-items: center;\n justify-content: space-between;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-radius: 0.25rem;\n cursor: pointer;\n border-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n padding-top: 1rem;\n padding-bottom: 1rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n --tw-text-opacity: 1;\n color: rgba(55, 65, 81, var(--tw-text-opacity));\n transition: border-color 0.2s; }\n .styles-module_row__1UAlk:hover {\n border-color: #a8a8a8; }\n\n.styles-module_topbar__3TTLr {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 1rem; }\n");var Qs,Xs,$s=function(t){Ie(o,G);var n=Ys(o);function o(){var e;r(this,o);for(var t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];return i(we(e=n.call.apply(n,[this].concat(a))),"toggleIntegration",(function(t,n){e.props.apiHandler.toggleIntegration(t,n).then((function(e){console.info(e)})).catch((function(e){return console.error(e)}))})),i(we(e),"onIntegrationDelete",(function(t){e.props.apiHandler.deleteIntegration(t).then((function(e){console.info(e)})).catch((function(e){return console.error(e)}))})),e}return lt(o,[{key:"render",value:function(){var t=this;return _e(zs||(zs=e(["\n <div>\n <div class=",">\n \x3c!-- <h2 class=",">My Flows</h2> --\x3e\n \x3c!-- <"," items=",' value="sort" //> --\x3e\n </div>\n <div class=','>\n <div class="flex w-12">Status</div>\n <div class="flex w-12"></div>\n <div class="flex-1 pl-4">Integration Name</div>\n <div class="w-24">Runs</div>\n <div class="w-40">Last Activity</div>\n <div class="w-16"></div>\n <div class="flex w-6"></div>\n </div>\n <div class=',">\n ","\n ","\n </div>\n </div>\n "])),Zs,Gs,Ui,[{id:"sort",value:"Sort"}],Ks,Js,this.props.integrations.length<1&&_e(Vs||(Vs=e(["No integrations"]))),this.props.integrations.map((function(n){return _e(Us||(Us=e(['\n <div\n class="'," ",'"\n >\n <div class=','>\n <div class="flex w-12">\n ','\n </div>\n <div class="flex w-12">\n <img src=',' />\n </div>\n <div class="flex-1 pl-4">','</div>\n <div class="w-24">','</div>\n <div class="w-40">\n ','\n </div>\n <div class="w-16">\n <',"\n id=","\n value=","\n onChange=",'\n >\n <//>\n </div>\n <div\n class="flex w-6 cursor-pointer"\n onclick=','\n >\n <svg\n width="12"\n height="15"\n viewBox="0 0 12 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M0 4.16667H12"\n stroke="#F05C42"\n stroke-width="1.2"\n />\n <path\n d="M10 5.5V6.16667L9.33333 13.5H2.66667L2 6.16667V5.5"\n stroke="#F05C42"\n stroke-width="1.2"\n stroke-linejoin="round"\n />\n <path\n d="M4 3.5V2.16667C4 1.79848 4.29848 1.5 4.66667 1.5H7.33333C7.70152 1.5 8 1.79848 8 2.16667V3.5"\n stroke="#F05C42"\n stroke-width="1.2"\n />\n </svg>\n </div>\n </div>\n </div>\n '])),qs,"integry_container_Integration",Ks,"fail"!==n.task_execution.status?_e(Hs||(Hs=e(['\n <svg\n width="22"\n height="22"\n viewBox="0 0 25 25"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="12.5"\n cy="12.5"\n r="12.5"\n fill="#2ECC71"\n />\n <path\n d="M17.2209 9.16699L11.3907 15.8337L8.33203 12.3361"\n stroke="white"\n stroke-width="1.2"\n stroke-linecap="round"\n />\n </svg>\n ']))):_e(Bs||(Bs=e(['<svg\n width="22"\n height="25"\n viewBox="0 0 25 27"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle cx="12.5" cy="12.5" r="12.5" fill="#E26154" />\n <g filter="url(#filter0_d)">\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M11.1886 8.05792C11.1209 7.32574 11.7556 6.61621 12.4701 6.61621C13.2413 6.61621 13.8535 7.32568 13.7963 8.05792L13.3542 13.5234C13.3206 14.0117 12.8896 14.3955 12.4019 14.3605C11.9713 14.3255 11.6422 13.9535 11.6196 13.5234L11.1886 8.05792ZM11.1836 16.9743C11.1836 16.3124 11.7654 15.7737 12.4835 15.7737C13.2189 15.7737 13.8007 16.3124 13.8 16.9743V17.2052C13.8 17.8671 13.2015 18.3902 12.4835 18.3902C11.7647 18.3902 11.1836 17.8671 11.1836 17.2052V16.9743Z"\n fill="white"\n />\n </g>\n <defs>\n <filter\n id="filter0_d"\n x="7.18359"\n y="6.61621"\n width="10.6164"\n height="19.7739"\n filterUnits="userSpaceOnUse"\n color-interpolation-filters="sRGB"\n >\n <feFlood\n flood-opacity="0"\n result="BackgroundImageFix"\n />\n <feColorMatrix\n in="SourceAlpha"\n type="matrix"\n values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"\n result="hardAlpha"\n />\n <feOffset dy="4" />\n <feGaussianBlur stdDeviation="2" />\n <feColorMatrix\n type="matrix"\n values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"\n />\n <feBlend\n mode="normal"\n in2="BackgroundImageFix"\n result="effect1_dropShadow"\n />\n <feBlend\n mode="normal"\n in="SourceGraphic"\n in2="effect1_dropShadow"\n result="shape"\n />\n </filter>\n </defs>\n </svg> ']))),n.icon_url,n.name,n.runs_count,n.task_execution.last_execution_at?function(e){var t=Math.floor((Date.now()-e.getTime())/1e3),n=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"A few second",seconds:0}].find((function(e){return e.seconds<t}));if(n){var r=Math.floor(t/n.seconds);return Number.isInteger(r)||(r=0),"".concat(r>0?r:""," ").concat(n.label).concat(1!==r?"s":""," ago")}return"Cannot be formatted with interval ".concat(n)}(new Date("".concat(n.task_execution.last_execution_at.date," ").concat(n.task_execution.last_execution_at.timezone))):"Never run",Ws,n.id,"ACTIVE"===n.status,(function(e){return t.toggleIntegration(n.id,e)}),(function(){return t.onIntegrationDelete(n.id)}))})))}}]),o}();!function(e){e.MODAL="MODAL",e.INLINE="INLINE",e.DETACHED="DETACHED",e.CUSTOM="CUSTOM"}(Qs||(Qs={})),function(e){e.GRID="GRID",e.LIST="LIST"}(Xs||(Xs={}));var el,tl,nl,rl,il="styles-module_template_list__3HABS",ol="styles-module_template_grid__mH7-0",al="styles-module_header__cdTrS";function sl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_template_list__3HABS {\n display: grid;\n grid-template-columns: repeat(1, minmax(0, 1fr));\n gap: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; }\n\n.styles-module_template_grid__mH7-0 {\n display: grid;\n grid-template-columns: repeat(1, minmax(0, 1fr));\n gap: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; }\n @media (min-width: 768px) {\n .styles-module_template_grid__mH7-0 {\n grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n @media (min-width: 1280px) {\n .styles-module_template_grid__mH7-0 {\n grid-template-columns: repeat(5, minmax(0, 1fr)); } }\n\n.styles-module_header__cdTrS {\n margin-bottom: 0.75rem;\n margin-top: 1.5rem;\n letter-spacing: 0.025em;\n --tw-text-opacity: 1;\n color: rgba(80, 156, 246, var(--tw-text-opacity)); }\n");var ll,ul,cl,dl,pl,fl=function(t){Ie(o,G);var n=sl(o);function o(){var e;return r(this,o),i(we(e=n.call(this)),"filterTemplates",(function(t){t?e.setState({filteredTemplates:xs.go(t,e.state.templates,{keys:["name","branding_app.tags"],scoreFn:function(e){var t=e[0],n=e[1];return Math.max(t?t.score+100:-1/0,n?n.score:-1/0)}}).map((function(e){return e.obj}))}):e.setState({filteredTemplates:e.state.templates})})),i(we(e),"onTemplateClick",(function(t){e.props.setGenericData({templateId:t}),e.props.onTemplateClick&&e.props.onTemplateClick(t)})),e.state={loading:!1,integrations:[],templates:[],filteredTemplates:[]},e}return lt(o,[{key:"componentDidMount",value:function(){var e=this;this.setState({loading:!0}),this.props.apiHandler.getTemplateListing(this.props.bundleId).then((function(t){t&&e.setState({integrations:t.integrations,templates:t.templates,filteredTemplates:t.templates,loading:!1})}))}},{key:"render",value:function(){var t,n,r=this;return _e(el||(el=e(["\n <div>\n ","\n </div>\n "])),this.state.loading?_e(tl||(tl=e([" <"," //> "])),Zt):_e(nl||(nl=e(["\n <",">\n <div\n label=","\n >\n \x3c!-- <h2 class=",">Available Flows</h2> --\x3e\n <div>\n <","\n resultCount=","\n onChange=",'\n >\n <//>\n </div>\n <div\n class="'," ",'"\n >\n ',"\n </div>\n </div>\n <div label=",">\n <"," apiHandler=","\n integrations="," //>\n </div>\n <//>\n "])),Ps,(null===(t=this.props.userConfig)||void 0===t?void 0:t.availableFlowsLabel)||"Available Flows",al,Os,this.state.filteredTemplates.length,(function(e){return r.filterTemplates(e)}),this.props.layout===Xs.LIST?il:ol,"integry-container_TemplatesView",this.state.filteredTemplates.map((function(t){return _e(rl||(rl=e(["\n <","\n name=","\n description=","\n layout=","\n tags=","\n imgUrl=","\n onClick=","\n >\n <//>\n "])),r.props.templateContainerTemplate,t.name,t.description,r.props.layout,t.branding_app.tags,t.branding_app.icon_url,(function(){return r.onTemplateClick(t.id)}))})),(null===(n=this.props.userConfig)||void 0===n?void 0:n.myFlowsLabel)||"My Flows",$s,this.props.apiHandler,this.state.integrations))}}],[{key:"handleClick",value:function(e){e.preventDefault(),e.target instanceof HTMLElement&&console.info(e.target.localName)}}]),o}(),_l=ge.connect("userConfig",Bt)(fl),ml="styles-module_navigation__2nFX8",vl="styles-module_navItem__ozaSU",hl="styles-module_navItemContent__3UHl8",yl="styles-module_imgContainer__c7lfR",gl="styles-module_active__1nm22",bl="styles-module_disabled__1JpJ1";function wl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_navigation__2nFX8 {\n width: 12rem; }\n\n.styles-module_navItem__ozaSU {\n margin-bottom: 0.5rem;\n cursor: pointer;\n --tw-text-opacity: 1;\n color: rgba(31, 41, 55, var(--tw-text-opacity)); }\n .styles-module_navItem__ozaSU .styles-module_navItemContent__3UHl8 {\n display: flex;\n height: 2.5rem;\n align-items: center;\n font-size: 0.875rem;\n line-height: 1.25rem; }\n .styles-module_navItem__ozaSU .styles-module_navItemContent__3UHl8 .styles-module_imgContainer__c7lfR {\n margin-right: 0.75rem;\n height: 1.5rem;\n width: 1.5rem;\n overflow: hidden;\n border-radius: 9999px; }\n .styles-module_navItem__ozaSU .styles-module_navItemContent__3UHl8 .styles-module_imgContainer__c7lfR img,\n .styles-module_navItem__ozaSU .styles-module_navItemContent__3UHl8 .styles-module_imgContainer__c7lfR svg {\n height: 100%;\n width: 100%;\n object-fit: cover; }\n .styles-module_navItem__ozaSU.styles-module_active__1nm22 {\n opacity: 1; }\n .styles-module_navItem__ozaSU.styles-module_disabled__1JpJ1 {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n opacity: 0.5; }\n");var xl,Il,kl,Cl=_e(ll||(ll=e([' <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n>\n <rect opacity="0.7" width="15" height="15" rx="7.5" fill="#2ECC71" />\n <path\n d="M9.23107 6.34619L6.96066 8.94234L5.76953 7.58033"\n stroke="white"\n stroke-width="1.2"\n stroke-linecap="round"\n />\n</svg>']))),Sl=_e(ul||(ul=e(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="7.5"\n cy="7.5"\n r="6.75"\n fill="white"\n stroke="#2ECC71"\n stroke-width="1.5"\n />\n <path\n d="M10.3333 5.5L6.83522 9.5L5 7.40148"\n stroke="#2ECC71"\n stroke-width="1.5"\n stroke-linecap="round"\n />\n </svg>\n']))),Ol=function(t){Ie(i,G);var n=wl(i);function i(){return r(this,i),n.apply(this,arguments)}return lt(i,[{key:"render",value:function(){var t=this.props,n=t.logoUrl,r=t.isActive,i=void 0!==r&&r,o=t.isCompleted,a=void 0!==o&&o,s=t.isDisabled,l=void 0!==s&&s,u=t.isLastStep,c=void 0!==u&&u,d=t.onClick,p=void 0===d?function(){return null}:d;return _e(cl||(cl=e(["\n <div\n class=","\n onclick=",'\n tabindex="-1"\n role="button"\n >\n <div class=',">\n <div class=",">\n ","\n </div>\n <div>","</div>\n </div>\n </div>\n "])),"".concat(vl," ").concat(l?bl:""," ").concat(i?gl:""),p,hl,yl,c?Sl:_e(dl||(dl=e(["\n ","\n "])),!a||i?_e(pl||(pl=e(["<img src="," />"])),n):Cl),this.props.label)}}]),i}();function Ml(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}var Dl=function(t){Ie(o,G);var n=Ml(o);function o(){var e;r(this,o);for(var t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];return i(we(e=n.call.apply(n,[this].concat(a))),"changeStep",(function(t){e.props.gotoStep(t)})),e}return lt(o,[{key:"render",value:function(){var t,n=this,r=this.props.stepState,i=null==r?void 0:r.currentStep;return _e(xl||(xl=e(["\n <div class=",">\n <div>\n ","\n <",'\n label="Confirmation"\n isCompleted=',"\n isActive=","\n isDisabled=","\n isLastStep=","\n onClick=","\n />\n </div>\n </div>\n "])),ml,this.props.stepState&&_e(Il||(Il=e(["\n ","\n "])),null===(t=this.props.stepState)||void 0===t?void 0:t.steps.map((function(t,o){return _e(kl||(kl=e([" <","\n label=","\n logoUrl=","\n isCompleted=","\n isActive=","\n isDisabled=","\n isLastStep=","\n onClick=","\n />"])),Ol,"CONFIRMATION"!==t.type?t.title:"Confirmation","CONFIRMATION"!==t.type&&t.iconUrl,t.isCompleted,"CONFIRMATION"!==(null==i?void 0:i.type)&&"CONFIRMATION"!==t.type&&r.stepIndex===o,Number(null==r?void 0:r.stepIndex)<o,!1,(function(){return n.changeStep(o)}))}))),Ol,!0,void 0!==i&&(null==r?void 0:r.stepIndex)===(null==r?void 0:r.steps.length),void 0!==i&&(null==r?void 0:r.stepIndex)!==(null==r?void 0:r.steps.length),!0,(function(){var e;return n.changeStep(null!==(e=null==r?void 0:r.steps.length)&&void 0!==e?e:0)}))}}]),o}();Dl.defaultProps={currentStepIndex:-1,completedTillIndex:-1};var Al,Tl,Rl,Ll,Nl,Pl,El,jl,Fl,zl,Vl,Ul=ge.connect("stepState",Bt)(Dl),Hl={stepsWrap:"styles-module_stepsWrap__axf95",stepsContainer:"styles-module_stepsContainer__1vEyC",stepContainer:"styles-module_stepContainer__1u05c",top:"styles-module_top__1EhEd",bottom:"styles-module_bottom__3dACP",buttons:"styles-module_buttons__LDv9h"};function Bl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_stepsWrap__axf95 {\n min-height: 400px;\n margin-top: 1rem;\n display: flex;\n min-height: 400px; }\n .styles-module_stepsWrap__axf95 .styles-module_stepsContainer__1vEyC {\n border-width: 0px;\n border-right-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, var(--tw-border-opacity));\n padding-right: 1rem; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c {\n display: flex;\n width: 100%;\n flex-direction: column;\n padding-left: 1rem; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c .styles-module_top__1EhEd {\n display: flex;\n width: 100%;\n flex: 1 1 0%; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c .styles-module_bottom__3dACP {\n display: flex;\n justify-content: flex-end; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c .styles-module_bottom__3dACP .styles-module_buttons__LDv9h {\n display: flex; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c .styles-module_bottom__3dACP .styles-module_buttons__LDv9h button:not(:last-child) {\n margin-right: 14px; }\n");var Wl=function(t){Ie(o,G);var n=Bl(o);function o(e){var t;return r(this,o),i(we(t=n.call(this,e)),"createIntegration",(function(){var e,n,r=t.props,i=r.stepMapping,o=r.stepDataMapping;console.info(i),t.setState({loading:!0});var a={name:null!==(e=null===(n=t.props.genericData.templateApp)||void 0===n?void 0:n.name)&&void 0!==e?e:"My new flow",notification_email:"",template:Number(t.props.genericData.templateId),bundle_id:Number(t.props.genericData.bundleId),steps:Object.keys(i).map((function(e){return{id:i[e].step.id,authorization:Number(i[e].selectedAuthId),template_step:i[e].step.id,app_user_data:i[e].step.template_fields.map((function(t){return{id:t.id,value:!o[i[e].step.id][t.id].value&&""!==o[i[e].step.id][t.id].value||o[i[e].step.id][t.id].objectValue?JSON.stringify(o[i[e].step.id][t.id].objectValue):"".concat(o[i[e].step.id][t.id].value),template_field:t.id}}))}}))};console.info(a),t.context.apiHandler.saveIntegration(a).then((function(e){console.info(e),t.setState({loading:!1})})).catch((function(e){return console.error(e)}))})),i(we(t),"handleAuthSelected",(function(e,n,r,i){var o=t.props.stepMapping[n].step.template_fields.filter((function(e){return e.activity_field&&e.activity_field.is_dynamic})).map((function(e){return e.id}));t.props.setStepAuthorization(n,e,r,o,i)})),t.state={loading:!1,selectedAuthStep:null},t}return lt(o,[{key:"render",value:function(){var t,n,r,i,o,a=this,s=null,l=this.props.stepState,u=l.currentStep,c=l.stepIndex,d=l.steps,p=!1,f=!1,_=!1,m=!1;c>-1&&"CONFIRMATION"!==(null==u?void 0:u.type)?(s=this.props.stepMapping[Number(null==u?void 0:u.stepId)],p=!1,f=this.props.stepState.stepIndex>0,_=null!==(o=null==u?void 0:u.isValid)&&void 0!==o&&o,m=l.showValidation):"CONFIRMATION"===(null==u?void 0:u.type)&&c===d.length&&(p=!0);return _e(Al||(Al=e(["\n <div class=",">\n <div class=",">\n <","\n steps=","\n currentStepIndex=","\n completedTillIndex=","\n ><//>\n </div>\n <div class=",">\n <div class=",">\n ","\n </div>\n\n <div class=",">\n ","\n </div>\n <div class=",">\n <div class=",">\n ","\n ","\n </div>\n </div>\n </div>\n </div>\n "])),Hl.stepsWrap,Hl.stepsContainer,Ul,null===(t=this.props.steps)||void 0===t?void 0:t.map((function(e){return{label:e.title,logoUrl:e.activity.app.icon_url}})),-1,-1,Hl.stepContainer,Hl.stepInfo,p?_e(Tl||(Tl=e(['\n <svg\n width="25"\n height="25"\n viewBox="0 0 25 25"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="12.5"\n cy="12.5"\n r="11.75"\n fill="white"\n stroke="#2ECC71"\n stroke-width="1.5"\n />\n <path\n d="M17.2209 9.16699L11.3907 15.8337L8.33203 12.3361"\n stroke="#2ECC71"\n stroke-width="1.5"\n stroke-linecap="round"\n />\n </svg>\n <div>Confirmation</div>\n ']))):_e(Rl||(Rl=e(["\n \x3c!-- <img src="," />\n <div>","</div> --\x3e\n "])),null===(n=s)||void 0===n?void 0:n.step.activity.app.icon_url,null===(r=s)||void 0===r?void 0:r.step.title),Hl.top,p?_e(Ll||(Ll=e(["\n <div class=",">\n Your integration is ready to be enabled. Click “Save” to\n continue.\n </div>\n "])),Hl.save):_e(Nl||(Nl=e(["\n ","\n "])),s&&_e(Pl||(Pl=e(["\n ","\n "])),"AUTH"===(null==u?void 0:u.type)?_e(El||(El=e(["\n <div class=",">\n <","\n stepId=","\n apiHandler=","\n showErrors=","\n onAuthSelected=","\n >\n <//>\n </div>\n "])),Hl.stepWrap,li,s.step.id,this.context.apiHandler,m,(function(e,t,n){var r;return a.handleAuthSelected(e,Number(null===(r=s)||void 0===r?void 0:r.step.id),t,n)})):_e(jl||(jl=e(["\n <","\n step=","\n stepType=","\n showStepValidation=","\n apiHandler=","\n eventEmitter=","\n />\n "])),Wa,null===(i=s)||void 0===i?void 0:i.step,null==u?void 0:u.type,m,this.context.apiHandler,this.context.eventEmitter))),Hl.bottom,Hl.buttons,f&&_e(Fl||(Fl=e(["\n <",'\n label="Back"\n onClick=',"\n type=","\n ><//>\n "])),Mn,(function(){return a.props.gotoPreviousStep()}),bn.SECONDARY),p?_e(zl||(zl=e(["\n <",'\n label="Save"\n isLoading=',"\n onClick=","\n ><//>\n "])),Mn,this.state.loading,(function(){return a.createIntegration()})):_e(Vl||(Vl=e(["\n <",'\n label="Next"\n disabled=',"\n onClick=","\n ><//>\n "])),Mn,!_,(function(){return _?a.props.gotoNextStep():a.props.showStepValidationState()})))}}]),o}();i(Wl,"contextType",Ft);var Jl,ql,Gl,Kl=ge.connect(["stepState","genericData","stepMapping","stepDataMapping"],Bt)(Wl),Zl="styles-module_header__3p3k1",Yl="styles-module_name__2PDqJ",Ql="styles-module_description__39K41";function Xl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_header__3p3k1 {\n width: 100%;\n align-items: center;\n display: flex;\n height: 100%;\n margin-bottom: 1rem; }\n .styles-module_header__3p3k1 img {\n border-radius: 9999px;\n margin-right: 0.5rem; }\n .styles-module_header__3p3k1 .styles-module_name__2PDqJ {\n font-weight: 700;\n line-height: 1.625; }\n .styles-module_header__3p3k1 .styles-module_description__39K41 {\n font-weight: 300;\n font-size: 0.875rem;\n line-height: 1.25rem; }\n");var $l,eu,tu,nu=function(t){Ie(i,G);var n=Xl(i);function i(){var e;return r(this,i),(e=n.call(this)).state={loading:!0,template:null},e}return lt(i,[{key:"componentDidMount",value:function(){var e=this;this.props.apiHandler.getTemplate(this.props.templateId).then((function(t){t&&Promise.all(t.steps.map((function(t){return e.props.apiHandler.getTemplateStep(Number(t.id))}))).then((function(n){e.setState({template:t,loading:!1}),e.props.setSteps(n.filter(Yt)),e.props.setStepMapping(n.filter(Yt)),e.props.setParentChildMapping(n.filter(Yt)),e.props.setGenericData({templateId:Number(e.props.templateId),bundleId:Number(e.props.bundleId)})})).catch((function(e){return console.error(e)}))})).catch((function(e){throw new Error(e)}))}},{key:"render",value:function(){var t=this.state.template;return _e(Jl||(Jl=e(["\n <div>\n ","\n </div>\n "])),this.state.loading?_e(ql||(ql=e(["<"," //>"])),Zt):_e(Gl||(Gl=e(["\n <div class=",">\n <img src=",' width="40" />\n <div>\n <div class=',">","</div>\n <div class=",">\n ","\n </div>\n </div>\n </div>\n\n <","\n steps=","\n apiHandler=","\n eventEmitter=","\n />\n "])),Zl,null==t?void 0:t.branding_app.icon_url,Yl,null==t?void 0:t.name,Ql,null==t?void 0:t.description,Kl,null==t?void 0:t.steps,this.props.apiHandler,this.props.eventEmitter))}}]),i}(),ru=ge.connect("",Bt)(nu),iu="styles-module_name__3qMVY",ou="styles-module_description__2S97K",au="styles-module_tags__2fhyE",su="styles-module_tag__26APx",lu="styles-module_template_list_view__jxmde",uu="styles-module_template_grid_view__WmHjg";function cu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_name__3qMVY {\n margin-bottom: 0.5rem;\n --tw-text-opacity: 1;\n color: rgba(31, 41, 55, var(--tw-text-opacity)); }\n\n.styles-module_description__2S97K {\n font-size: 0.875rem;\n line-height: 1.25rem;\n --tw-text-opacity: 1;\n color: rgba(107, 114, 128, var(--tw-text-opacity)); }\n\n.styles-module_tags__2fhyE {\n margin-top: 0.5rem;\n margin-bottom: -0.5rem;\n display: flex;\n flex-wrap: wrap; }\n .styles-module_tags__2fhyE .styles-module_tag__26APx {\n margin-right: 0.5rem;\n margin-bottom: 0.5rem;\n border-radius: 0.75rem;\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, var(--tw-bg-opacity));\n padding: 0.25rem;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n font-size: 0.75rem;\n line-height: 1rem;\n --tw-text-opacity: 1;\n color: rgba(107, 114, 128, var(--tw-text-opacity)); }\n\n.styles-module_template_list_view__jxmde {\n display: flex;\n cursor: pointer;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 0.25rem;\n border-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n transition: border-color 0.2s; }\n .styles-module_template_list_view__jxmde img {\n margin-bottom: 0.75rem;\n height: 2.5rem;\n width: 2.5rem; }\n .styles-module_template_list_view__jxmde:hover {\n border-color: #a8a8a8; }\n\n.styles-module_template_grid_view__WmHjg {\n display: flex;\n cursor: pointer;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 0.25rem;\n border-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n transition: border-color 0.2s; }\n .styles-module_template_grid_view__WmHjg img {\n margin-bottom: 0.75rem;\n height: 2.5rem;\n width: 2.5rem; }\n .styles-module_template_grid_view__WmHjg:hover {\n border-color: #a8a8a8; }\n");var du,pu,fu=function(t){Ie(o,G);var n=cu(o);function o(e){var t;return r(this,o),i(we(t=n.call(this,e)),"handleClick",(function(){console.info(t.props.name)})),t.state={templateName:t.props.name},t}return lt(o,[{key:"render",value:function(){return _e($l||($l=e(["\n <div\n onclick=",'\n class="'," ",'"\n >\n <div>\n <img src='," />\n <p class=",">","</p>\n <p class=",">","</p>\n </div>\n ","\n </div>\n "])),this.props.onClick,this.props.layout===Xs.LIST?lu:uu,"integry-container_Template",this.props.imgUrl,iu,this.state.templateName,ou,this.props.description,this.props.tags.length>0&&_e(eu||(eu=e(["\n <div class=",">\n ","\n </div>\n "])),au,this.props.tags.split(",").map((function(t){return _e(tu||(tu=e([" <div class=",">","</div> "])),su,t)}))))}}],[{key:"handleClick",value:function(e){e.preventDefault(),e.target instanceof HTMLElement&&console.info(e.target.localName)}}]),o}(),_u="styles-module_modal__3ImBF",mu="styles-module_open__AAUJ5",vu="styles-module_modalContainer__o6TKt",hu="styles-module_inset__-NimT",yu="styles-module_span__3nIVQ",gu="styles-module_contentWrap__2QGtd",bu="styles-module_content__3wdFn",wu="styles-module_close__2IqHP";function xu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_modal__3ImBF {\n display: none;\n z-index: 99;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n overflow-y: auto; }\n .styles-module_modal__3ImBF.styles-module_open__AAUJ5 {\n position: fixed;\n display: block; }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt {\n display: flex;\n min-height: 100vh;\n align-items: flex-end;\n justify-content: center;\n text-align: center; }\n @media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt {\n display: block;\n padding: 0; } }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_inset__-NimT {\n position: fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n opacity: 0.75;\n background-color: #111827; }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_span__3nIVQ {\n display: none; }\n @media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_span__3nIVQ {\n display: inline-block;\n height: 100vh;\n vertical-align: middle; } }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n display: none;\n position: relative;\n vertical-align: bottom;\n background: white;\n border-radius: 4px;\n text-align: left;\n overflow: hidden;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd.styles-module_open__AAUJ5 {\n display: inline-block; }\n @media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 100%;\n max-width: 48rem;\n margin-top: 2rem;\n margin-bottom: 2rem;\n vertical-align: middle; } }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_content__3wdFn {\n position: relative;\n background: white;\n padding: 30px; }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 10px;\n right: 10px; }\n");var Iu,ku=function(t){Ie(i,G);var n=xu(i);function i(){return r(this,i),n.apply(this,arguments)}return lt(i,[{key:"render",value:function(){var t=this.props.isOpen;return _e(du||(du=e(["\n <div\n class=",'\n aria-labelledby="modal-title"\n role="dialog"\n aria-modal="true"\n >\n <div class=',">\n <div class=",' aria-hidden="true"></div>\n\n <span class=',' aria-hidden="true"></span>\n\n <div\n class=',"\n >\n <div class=",">\n <div\n onclick=","\n class=",'\n >\n <svg\n width="20"\n height="22"\n viewBox="0 0 20 22"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M14.2426 16.1822L5.75732 6.86328"\n stroke="#999999"\n stroke-width="2"\n stroke-linecap="round"\n />\n <path\n d="M14.2426 6.86328L5.75732 16.1822"\n stroke="#999999"\n stroke-width="2"\n stroke-linecap="round"\n />\n </svg>\n </div>\n ',"\n </div>\n </div>\n </div>\n </div>\n "])),"".concat(_u," ").concat(t?"".concat(mu):""),vu,hu,yu,"".concat(gu," ").concat(t?"".concat(mu):""),bu,this.props.onClose,wu,this.props.isOpen&&_e(pu||(pu=e([" "," "])),this.props.children))}}]),i}(),Cu="styles-module_integry-container__3nnxM";function Su(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}qt(".styles-module_integry-container__3nnxM {\n margin-bottom: 0.5rem; }\n\n.styles-module_modal__3R9nC {\n position: fixed;\n z-index: 10;\n overflow-y: auto;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px; }\n");var Ou=function(t){Ie(o,G);var n=Su(o);function o(e){var t;return r(this,o),i(we(t=n.call(this,e)),"templateComponent",void 0),i(we(t),"templateListComponent",void 0),i(we(t),"store",void 0),i(we(t),"onTemplateClick",(function(e){t.setState({isModalOpen:!0,templateId:e})})),t.state={isModalOpen:!1,templateId:null},t.store=Wt(),t.store.setState({userConfig:e.userConfig}),t}return lt(o,[{key:"componentWillMount",value:function(){this.templateComponent=fu,this.templateListComponent=_l}},{key:"render",value:function(){var t=this;return _e(Iu||(Iu=e(["\n <>\n <"," store=",'>\n <div class="'," ",'">\n <',"\n layout=","\n bundleId=","\n templateContainerTemplate=","\n apiHandler=","\n eventEmitter=","\n onTemplateClick=","\n >\n </div>\n <"," \n isOpen="," \n onClose=","\n > \n <"," \n apiHandler=","\n templateId=","\n bundleId="," \n />\n <//>\n <//>\n </>\n "])),ge.Provider,this.store,Cu,"integry-container",this.templateListComponent,this.props.layout,this.props.bundleId,this.templateComponent,this.context.apiHandler,this.context.eventEmitter,this.onTemplateClick,ku,this.state.isModalOpen,(function(){t.store.setState(Vt),t.setState({isModalOpen:!1,templateId:null})}),ru,this.context.apiHandler,this.state.templateId,this.props.bundleId)}}]),o}();i(Ou,"contextType",Ft);var Mu=function(){function e(t,n){r(this,e),i(this,"emitter",void 0),i(this,"handler",void 0),this.emitter=t,this.handler=n}return lt(e,[{key:"getHandler",value:function(){return this.handler}}]),e}();function Du(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}var Au=function(e){Ie(n,Mu);var t=Du(n);function n(){return r(this,n),t.apply(this,arguments)}return lt(n,[{key:"run",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.handler.apply(null,n)}}]),n}();function Tu(e,t,n){return(Tu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ce(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ru(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var i=Ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ke(this,n)}}var Lu,Nu,Pu,Eu=function(e){Ie(n,Au);var t=Ru(n);function n(e,o){var a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(r(this,n),i(we(a=t.call(this,e,o)),"total",void 0),i(we(a),"i",0),a.total=s,a.total<1)throw new Error("{total} can not be less than 1");return a}return lt(n,[{key:"run",value:function(e){for(var t,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(t=Tu(Ce(n.prototype),"run",this)).call.apply(t,[this,e].concat(i)),++this.i>=this.total&&this.emitter.off(e,this.handler)}}]),n}(),ju=function(){function e(){r(this,e),i(this,"events",Object.create(null))}return lt(e,[{key:"on",value:function(e,t){this.addEventListener(e,new Au(this,t))}},{key:"once",value:function(e,t){this.addEventListener(e,new Eu(this,t,1))}},{key:"off",value:function(e,t){var n=this.events[e];null!=n&&n.length&&(this.events[e]=n.filter((function(e){return e.getHandler()!==t})))}},{key:"offAll",value:function(){var e=this;Object.keys(this.events).forEach((function(t){var n=e.events[t];n&&(n.length=0)})),this.events=Object.create(null)}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=this.events[e];i&&i.forEach((function(t){return t.run.apply(t,[e].concat(n))}))}},{key:"addEventListener",value:function(e,t){var n=this.events[e];Array.isArray(n)?n.push(t):this.events[e]=[t]}}]),e}();function Fu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fu(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vu={getAuthHash:function(e,t){return Fe.apply(this,arguments)}},Uu=function t(o){var a,s,l,u,c=this;(r(this,t),i(this,"config",void 0),i(this,"apiHandler",void 0),i(this,"eventEmitter",new ju),i(this,"getRandomTemplateId",(function(e){for(var t=[],n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",r=n.length,i=0;i<e;i+=1)t.push(n.charAt(Math.floor(Math.random()*r)));return"x-integry-modal-".concat(t.join(""))})),i(this,"getAuthParamsFromUrl",(function(){var e=Lr()&&new URLSearchParams(window.location.search);if(e){var t=e.get("user_id"),n=e.get("app_key"),r=e.get("hash"),i=e.get("bundle_id");if(!(t&&n&&r&&i))throw new Error("The following auth variables are undefined: ".concat(t?"":"userId"," ").concat(n?"":"appKey"," ").concat(r?"":"hash"," ").concat(i?"":"bundleId"));return{userId:t,appKey:n,hash:r,bundleId:i}}return{userId:"",appKey:"",hash:"",bundleId:""}})),i(this,"printVersion",(function(){console.info("@integry/sdk@".concat(t.SDK_VERSION))})),i(this,"getTemplatesList",n(F.mark((function e(){return F.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.apiHandler.getTemplateListing(c.config.bundleId));case 1:case"end":return e.stop()}}),e)})))),i(this,"setupTemplateFormDestination",(function(e,t){var n=null;if(t){if(e===Qs.MODAL||e===Qs.INLINE)throw new Error('The `templateContainerId` property is unsupported when render mode is set to "MODAL" or "INLINE"');(n=document.getElementById(t))||console.warn("The template form render target with id ".concat(t," was not found"))}switch(e){case Qs.MODAL:return(n=document.createElement("div")).id=c.getRandomTemplateId(8),document.body.appendChild(n),n;case Qs.INLINE:return null;case Qs.DETACHED:case Qs.CUSTOM:return n;default:throw new Error("Unsupported renderMode ".concat(e," configuration, please provide one of ").concat(JSON.stringify(Object.keys(Qs))))}})),i(this,"renderTemplateForm",(function(t,n){var r=document.getElementById(n);if(r){var i=Wt();ue(_e(Lu||(Lu=e(["\n <","\n value=","\n >\n <"," store=",">\n <","\n bundleId=","\n templateId=","\n >\n <//>\n <//>\n <//>\n "])),Ft.Provider,{apiHandler:c.apiHandler,eventEmitter:c.eventEmitter,integrationId:c.config.integrationId,isPreviewMode:!1,isEditMode:!!c.config.integrationId},ge.Provider,i,ws,c.config.bundleId,t),r)}else console.warn("Integry template form render target with id ".concat(n," was not found"))})),i(this,"renderPreview",(function(t){var n=t.templateData,r=t.metadata,i=t.previewContainerId,o=document.getElementById(i);if(o){var a=Wt();ue(_e(Nu||(Nu=e(["\n <","\n value=","\n >\n <"," store=",">\n <","\n bundleId=","\n isPreviewMode=","\n templatePreviewData=","\n previewMetadata=","\n >\n <//>\n <//>\n <//>\n "])),Ft.Provider,{apiHandler:c.apiHandler,eventEmitter:c.eventEmitter,isPreviewMode:!0},ge.Provider,a,ws,c.config.bundleId,!0,n,r),o)}else console.warn("Integry template form render target with id ".concat(i," was not found"))})),i(this,"init",(function(t){var n=t.containerId,r=t.templateContainerId,i=t.renderMode,o=document.getElementById(n);if(!i)throw new Error("Template form render mode needs to be defined");if(c.setupTemplateFormDestination(i,r),o){var a=o.getAttribute("x-integry-layout")||Xs.LIST;ue(_e(Pu||(Pu=e(["\n <","\n value=","\n >\n <","\n bundleId=","\n userConfig=","\n layout=","\n >\n <//>\n <//>\n "])),Ft.Provider,{apiHandler:c.apiHandler,eventEmitter:c.eventEmitter,isPreviewMode:!1},Ou,c.config.bundleId,c.config.userConfig,a),o)}else console.warn("Integry SDK render target with id ".concat(n," was not found"))})),i(this,"destroy",(function(){try{c.eventEmitter.offAll()}catch(e){console.error("There was an error unsubscribing from all events")}})),"staging"===o.env)?s={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:"https://beta.integry.io",baseUrlv2:"https://beta.integry.io/v2",apiKey:null===(l=o.xIntegryConfig)||void 0===l?void 0:l.appAuth.apiKey}:s={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:"https://app.integry.io",baseUrlv2:"https://app.integry.io/v2",apiKey:null===(u=o.xIntegryConfig)||void 0===u?void 0:u.appAuth.apiKey};if("appKey"in o)a=zu(zu(zu({},o),s),{},{appKey:o.appKey,hash:o.hash,userId:o.userId}),this.config=zu(zu(zu({},o),s),{},{appKey:o.appKey,hash:o.hash,userId:o.userId,bundleId:o.bundleId,userConfig:o.userConfig});else{var d=this.getAuthParamsFromUrl()||{};a=zu(zu({},s),d),this.config=zu(zu(zu({},s),d),{},{userConfig:o.userConfig})}this.apiHandler=new Ne(a)};i(Uu,"SDK_VERSION","0.0.69"),i(Uu,"RenderModes",Qs),i(Uu,"Helpers",void 0);export{Vu as Helpers,Uu as IntegryJS};
|
|
17
|
+
function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function asyncGeneratorStep(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,a)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){asyncGeneratorStep(o,r,a,i,l,"next",e)}function l(e){asyncGeneratorStep(o,r,a,i,l,"throw",e)}i(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Op=Object.prototype,hasOwn=Op.hasOwnProperty,undefined$1,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function wrap(e,t,n,r){var a=t&&t.prototype instanceof Generator?t:Generator,o=Object.create(a.prototype),i=new Context(r||[]);return o._invoke=makeInvokeMethod(e,n,i),o}function tryCatch(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}var GenStateSuspendedStart="suspendedStart",GenStateSuspendedYield="suspendedYield",GenStateExecuting="executing",GenStateCompleted="completed",ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};IteratorPrototype[iteratorSymbol]=function(){return this};var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function isGeneratorFunction(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===GeneratorFunction||"GeneratorFunction"===(t.displayName||t.name))}function mark(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,toStringTagSymbol in e||(e[toStringTagSymbol]="GeneratorFunction")),e.prototype=Object.create(Gp),e}function awrap(e){return{__await:e}}function AsyncIterator(e,t){function n(r,a,o,i){var l=tryCatch(e[r],e,a);if("throw"!==l.type){var s=l.arg,p=s.value;return p&&"object"===_typeof(p)&&hasOwn.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,o,i)}),(function(e){n("throw",e,o,i)})):t.resolve(p).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,i)}))}i(l.arg)}var r;this._invoke=function(e,a){function o(){return new t((function(t,r){n(e,a,t,r)}))}return r=r?r.then(o,o):o()}}function async(e,t,n,r,a){void 0===a&&(a=Promise);var o=new AsyncIterator(wrap(e,t,n,r),a);return isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))}function makeInvokeMethod(e,t,n){var r=GenStateSuspendedStart;return function(a,o){if(r===GenStateExecuting)throw new Error("Generator is already running");if(r===GenStateCompleted){if("throw"===a)throw o;return doneResult()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var l=maybeInvokeDelegate(i,n);if(l){if(l===ContinueSentinel)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===GenStateSuspendedStart)throw r=GenStateCompleted,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=GenStateExecuting;var s=tryCatch(e,t,n);if("normal"===s.type){if(r=n.done?GenStateCompleted:GenStateSuspendedYield,s.arg===ContinueSentinel)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=GenStateCompleted,n.method="throw",n.arg=s.arg)}}}function maybeInvokeDelegate(e,t){var n=e.iterator[t.method];if(n===undefined$1){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=undefined$1,maybeInvokeDelegate(e,t),"throw"===t.method))return ContinueSentinel;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var r=tryCatch(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,ContinueSentinel;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=undefined$1),t.delegate=null,ContinueSentinel):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ContinueSentinel)}function pushTryEntry(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function resetTryEntry(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Context(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(pushTryEntry,this),this.reset(!0)}function keys(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}}function values(e){if(e){var t=e[iteratorSymbol];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(hasOwn.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=undefined$1,t.done=!0,t};return r.next=r}}return{next:doneResult}}function doneResult(){return{value:undefined$1,done:!0}}GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunctionPrototype[toStringTagSymbol]=GeneratorFunction.displayName="GeneratorFunction",defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[asyncIteratorSymbol]=function(){return this},defineIteratorMethods(Gp),Gp[toStringTagSymbol]="Generator",Gp[iteratorSymbol]=function(){return this},Gp.toString=function(){return"[object Generator]"},Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=undefined$1,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined$1,this.tryEntries.forEach(resetTryEntry),!e)for(var t in this)"t"===t.charAt(0)&&hasOwn.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=undefined$1)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=undefined$1),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var i=hasOwn.call(a,"catchLoc"),l=hasOwn.call(a,"finallyLoc");if(i&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&hasOwn.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,ContinueSentinel):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),ContinueSentinel},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),resetTryEntry(n),ContinueSentinel}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;resetTryEntry(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:values(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=undefined$1),ContinueSentinel}};var _regeneratorRuntime={wrap:wrap,isGeneratorFunction:isGeneratorFunction,AsyncIterator:AsyncIterator,mark:mark,awrap:awrap,async:async,keys:keys,values:values},n$2,l,u$1,t$2,i$1,o$1,r$1,f$1={},e$2=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function s(e,t){for(var n in t)e[n]=t[n];return e}function a$1(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n){var r,a=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(a[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return v$1(e,o,t&&t.key,t&&t.ref)}function v$1(e,t,n,r){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:null,__c:null,constructor:void 0};return n$2.vnode&&n$2.vnode(a),a}function p$1(){return{}}function y$1(e){return e.children}function d$1(e,t){this.props=e,this.context=t}function m$2(e,t){if(null==t)return e.__?m$2(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?m$2(e):null}function w$1(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return w$1(e)}}function g$1(e){(!e.__d&&(e.__d=!0)&&1===u$1.push(e)||i$1!==n$2.debounceRendering)&&((i$1=n$2.debounceRendering)||t$2)(k)}function k(){var e,t,n,r,a,o,i;for(u$1.sort((function(e,t){return t.__v.__b-e.__v.__b}));e=u$1.pop();)e.__d&&(n=void 0,r=void 0,o=(a=(t=e).__v).__e,(i=t.__P)&&(n=[],r=T$1(i,a,s({},a),t.__n,void 0!==i.ownerSVGElement,null,n,null==o?m$2(a):o),$(n,a),r!=o&&w$1(a)))}function _$1(e,t,n,r,a,o,i,l,s){var p,c,d,u,_,m,f,y=n&&n.__k||e$2,g=y.length;if(l==f$1&&(l=null!=o?o[0]:g?m$2(n,0):null),p=0,t.__k=b(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=y[p])||d&&n.key==d.key&&n.type===d.type)y[p]=void 0;else for(c=0;c<g;c++){if((d=y[c])&&n.key==d.key&&n.type===d.type){y[c]=void 0;break}d=null}if(u=T$1(e,n,d=d||f$1,r,a,o,i,l,s),(c=n.ref)&&d.ref!=c&&(f||(f=[]),d.ref&&f.push(d.ref,null,n),f.push(c,n.__c||u,n)),null!=u){if(null==m&&(m=u),null!=n.__d)u=n.__d,n.__d=null;else if(o==d||u!=l||null==u.parentNode){e:if(null==l||l.parentNode!==e)e.appendChild(u);else{for(_=l,c=0;(_=_.nextSibling)&&c<g;c+=2)if(_==u)break e;e.insertBefore(u,l)}"option"==t.type&&(e.value="")}l=u.nextSibling,"function"==typeof t.type&&(t.__d=u)}}return p++,n})),t.__e=m,null!=o&&"function"!=typeof t.type)for(p=o.length;p--;)null!=o[p]&&a$1(o[p]);for(p=g;p--;)null!=y[p]&&A(y[p],y[p]);if(f)for(p=0;p<f.length;p++)z(f[p],f[++p],f[++p])}function b(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)b(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?v$1(null,e,null,null):null!=e.__e||null!=e.__c?v$1(e.type,e.props,e.key,null):e):e);return n}function x$1(e,t,n,r,a){var o;for(o in n)o in t||P(e,o,null,n[o],r);for(o in t)a&&"function"!=typeof t[o]||"value"===o||"checked"===o||n[o]===t[o]||P(e,o,t[o],n[o],r)}function C(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===c$1.test(t)?n+"px":null==n?"":n}function P(e,t,n,r,a){var o,i,l,s,p;if(a?"className"===t&&(t="class"):"class"===t&&(t="className"),"key"===t||"children"===t);else if("style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(i in r)n&&i in n||C(o,i,"");if(n)for(l in n)r&&n[l]===r[l]||C(o,l,n[l])}else"o"===t[0]&&"n"===t[1]?(s=t!==(t=t.replace(/Capture$/,"")),p=t.toLowerCase(),t=(p in e?p:t).slice(2),n?(r||e.addEventListener(t,N,s),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,N,s)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&!a&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n?e.removeAttribute(t):e.setAttribute(t,n))}function N(e){this.l[e.type](n$2.event?n$2.event(e):e)}function T$1(e,t,n,r,a,o,i,l,p){var c,d,u,_,m,f,y,g,h,v,$=t.type;if(void 0!==t.constructor)return null;(c=n$2.__b)&&c(t);try{e:if("function"==typeof $){if(g=t.props,h=(c=$.contextType)&&r[c.__c],v=c?h?h.props.value:c.__:r,n.__c?y=(d=t.__c=n.__c).__=d.__E:("prototype"in $&&$.prototype.render?t.__c=d=new $(g,v):(t.__c=d=new d$1(g,v),d.constructor=$,d.render=D),h&&h.sub(d),d.props=g,d.state||(d.state={}),d.context=v,d.__n=r,u=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=$.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=s({},d.__s)),s(d.__s,$.getDerivedStateFromProps(g,d.__s))),_=d.props,m=d.state,u)null==$.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==$.getDerivedStateFromProps&&g!==_&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,v),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,v)){for(d.props=g,d.state=d.__s,d.__d=!1,d.__v=t,t.__e=n.__e,t.__k=n.__k,d.__h.length&&i.push(d),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,v),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(_,m,f)}))}d.context=v,d.props=g,d.state=d.__s,(c=n$2.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),t.__k=b(null!=c&&c.type==y$1&&null==c.key?c.props.children:c),null!=d.getChildContext&&(r=s(s({},r),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(f=d.getSnapshotBeforeUpdate(_,m)),_$1(e,t,n,r,a,o,i,l,p),d.base=t.__e,d.__h.length&&i.push(d),y&&(d.__E=d.__=null),d.__e=null}else t.__e=j(n.__e,t,n,r,a,o,i,p);(c=n$2.diffed)&&c(t)}catch(e){n$2.__e(e,t,n)}return t.__e}function $(e,t){n$2.__c&&n$2.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n$2.__e(e,t.__v)}}))}function j(e,t,n,r,a,o,i,l){var s,p,c,d,u,_=n.props,m=t.props;if(a="svg"===t.type||a,null==e&&null!=o)for(s=0;s<o.length;s++)if(null!=(p=o[s])&&(null===t.type?3===p.nodeType:p.localName===t.type)){e=p,o[s]=null;break}if(null==e){if(null===t.type)return document.createTextNode(m);e=a?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type),o=null}if(null===t.type)null!=o&&(o[o.indexOf(e)]=null),_===m||l||e.data==m||(e.data=m);else if(t!==n){if(null!=o&&(o=e$2.slice.call(e.childNodes)),c=(_=n.props||f$1).dangerouslySetInnerHTML,d=m.dangerouslySetInnerHTML,!l){if(_===f$1)for(_={},u=0;u<e.attributes.length;u++)_[e.attributes[u].name]=e.attributes[u].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}x$1(e,m,_,a,l),t.__k=t.props.children,d||_$1(e,t,n,r,"foreignObject"!==t.type&&a,o,i,f$1,l),l||("value"in m&&void 0!==m.value&&m.value!==e.value&&(e.value=null==m.value?"":m.value),"checked"in m&&void 0!==m.checked&&m.checked!==e.checked&&(e.checked=m.checked))}return e}function z(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){n$2.__e(e,n)}}function A(e,t,n){var r,a,o;if(n$2.unmount&&n$2.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||z(r,null,t)),n||"function"==typeof e.type||(n=null!=(a=e.__e)),e.__e=e.__d=null,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){n$2.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&A(r[o],t,n);null!=a&&a$1(a)}function D(e,t,n){return this.constructor(e,n)}function E$1(e,t,n){var r,a,o;n$2.__&&n$2.__(e,t),a=(r=n===o$1)?null:n&&n.__k||t.__k,e=h(y$1,null,[e]),o=[],T$1(t,(r?t:n||t).__k=e,a||f$1,f$1,void 0!==t.ownerSVGElement,n&&!r?[n]:a?null:e$2.slice.call(t.childNodes),o,n||f$1,r),$(o,e)}function H(e,t){E$1(e,t,o$1)}function I(e,t){return t=s(s({},e.props),t),arguments.length>2&&(t.children=e$2.slice.call(arguments,2)),v$1(e.type,t,t.key||e.key,t.ref||e.ref)}function L(e){var t={},n={__c:"__cC"+r$1++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,a=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=a,t},this.shouldComponentUpdate=function(t){e.value!==t.value&&r.some((function(e){e.context=t.value,g$1(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n}n$2={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return g$1(n.__E=n)}catch(t){e=t}throw e}},l=function(e){return null!=e&&void 0===e.constructor},d$1.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&s(n,e),null!=e&&this.__v&&(this.__e=!1,t&&this.__h.push(t),g$1(this))},d$1.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g$1(this))},d$1.prototype.render=y$1,u$1=[],t$2="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o$1=f$1,r$1=0;var preact_module=Object.freeze({__proto__:null,render:E$1,hydrate:H,createElement:h,h:h,Fragment:y$1,createRef:p$1,get isValidElement(){return l},Component:d$1,cloneElement:I,createContext:L,toChildArray:b,_unmount:A,get options(){return n$2}}),n$1=function e(t,n,r,a){var o;n[0]=0;for(var i=1;i<n.length;i++){var l=n[i++],s=n[i]?(n[0]|=l?1:2,r[n[i++]]):n[++i];3===l?a[0]=s:4===l?a[1]=Object.assign(a[1]||{},s):5===l?(a[1]=a[1]||{})[n[++i]]=s:6===l?a[1][n[++i]]+=s+"":l?(o=t.apply(s,e(t,s,r,["",null])),a.push(o),s[0]?n[0]|=2:(n[i-2]=0,n[i]=o)):a.push(s)}return a},t$1=new Map;function e$1(e){var t=t$1.get(this);return t||(t=new Map,t$1.set(this,t)),(t=n$1(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,r=1,a="",o="",i=[0],l=function(e){1===r&&(e||(a=a.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(0,e,a):3===r&&(e||a)?(i.push(3,e,a),r=2):2===r&&"..."===a&&e?i.push(4,e,0):2===r&&a&&!e?i.push(5,0,!0,a):r>=5&&((a||!e&&5===r)&&(i.push(r,0,a,n),r=6),e&&(i.push(r,e,0,n),r=6)),a=""},s=0;s<e.length;s++){s&&(1===r&&l(),l(s));for(var p=0;p<e[s].length;p++)t=e[s][p],1===r?"<"===t?(l(),i=[i],r=3):a+=t:4===r?"--"===a&&">"===t?(r=1,a=""):a=t+a[0]:o?t===o?o="":a+=t:'"'===t||"'"===t?o=t:">"===t?(l(),r=1):r&&("="===t?(r=5,n=a,a=""):"/"===t&&(r<5||">"===e[s][p+1])?(l(),3===r&&(i=i[0]),r=i,(i=i[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(l(),r=2):a+=t),3===r&&"!--"===a&&(r=4,i=i[0])}return l(),i}(e)),t),arguments,[])).length>1?t:t[0]}var m$1=e$1.bind(h),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getAugmentedNamespace(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function createCommonjsModule(e){var t={exports:{}};return e(t,t.exports),t.exports}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var require$$0=getAugmentedNamespace(preact_module),preact=createCommonjsModule((function(e,t){var n=require$$0;function r(e,t){for(var n in t)e[n]=t[n];return e}function a(e){this.getChildContext=function(){return{store:e.store}}}a.prototype.render=function(e){return e.children&&e.children[0]||e.children},t.connect=function(e,t){var a;return"function"!=typeof e&&("string"==typeof(a=e||{})&&(a=a.split(/\s*,\s*/)),e=function(e){for(var t={},n=0;n<a.length;n++)t[a[n]]=e[a[n]];return t}),function(a){function o(o,i){var l=this,s=i.store,p=e(s?s.getState():{},o),c=t?function(e,t){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,s):{store:s},d=function(){var t=e(s?s.getState():{},o);for(var n in t)if(t[n]!==p[n])return p=t,l.setState({});for(var r in p)if(!(r in t))return p=t,l.setState({})};this.componentWillReceiveProps=function(e){o=e,d()},this.componentDidMount=function(){s.subscribe(d)},this.componentWillUnmount=function(){s.unsubscribe(d)},this.render=function(e){return n.h(a,r(r(r({},c),e),p))}}return(o.prototype=new n.Component).constructor=o}},t.Provider=a}));function fetch(e,t){return t=t||{},new Promise((function(n,r){var a=new XMLHttpRequest,o=[],i=[],l={},s=function e(){return{ok:2==(a.status/100|0),statusText:a.statusText,status:a.status,url:a.responseURL,text:function(){return Promise.resolve(a.responseText)},json:function(){return Promise.resolve(a.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([a.response]))},clone:e,headers:{keys:function(){return o},entries:function(){return i},get:function(e){return l[e.toLowerCase()]},has:function(e){return e.toLowerCase()in l}}}};for(var p in a.open(t.method||"get",e,!0),a.onload=function(){a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),i.push([t,n]),l[t]=l[t]?l[t]+","+n:n})),n(s())},a.onerror=r,a.withCredentials="include"==t.credentials,t.headers)a.setRequestHeader(p,t.headers[p]);a.send(t.body||null)}))}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _isNativeReflectConstruct$i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct$i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(a,n.prototype),a}).apply(null,arguments)}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,e)})(e)}function _createSuper$h(e){var t=_isNativeReflectConstruct$h();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var IntegryAPIError=function(e){_inherits(n,_wrapNativeSuper(Error));var t=_createSuper$h(n);function n(e,r){var a;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(a=t.call(this,e)),"statusCode",void 0),_defineProperty(_assertThisInitialized(a),"response",void 0),a.name=a.constructor.name,a.statusCode=null==r?void 0:r.status,a.response=r,a}return n}(),ResponseHandler=function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var n,r,a;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!1,!t.ok){e.next=16;break}return e.prev=2,e.next=5,t.json();case 5:return r=e.sent,n&&console.log(r),e.abrupt("return",{data:r,status:t.status});case 10:return e.prev=10,e.t0=e.catch(2),n&&console.log("Response is not in json"),e.abrupt("return",{data:null,status:t.status});case 14:e.next=22;break;case 16:if(405!==t.status){e.next=22;break}return e.next=19,t.json();case 19:return e.t1=e.sent,e.t2=t.status,e.abrupt("return",{data:e.t1,status:e.t2});case 22:return n&&console.log("Received a non-2xx status code"),a=new IntegryAPIError(t.statusText,t),e.abrupt("return",Promise.reject(a));case 25:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}();function ownKeys$9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$9(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$9(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var IntegryAPI=function e(t){var n=this;_classCallCheck(this,e),_defineProperty(this,"config",void 0),_defineProperty(this,"getTemplate",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrlv2,"/template/").concat(r,"/")),e.addUrlSearchParams(a,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId,self_api_key:n.config.apiKey||null}),t.prev=2,t.next=5,fetch(a.toString()).then((function(e){return ResponseHandler(e)}));case 5:return o=t.sent,t.abrupt("return",o.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"getAuthUrl",(function(t){var r=new URL("".concat(n.config.baseUrl,"/auth/login/").concat(t,"/"));return e.addUrlSearchParams(r,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId}),r.toString()})),_defineProperty(this,"getTemplateStep",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrl,"/template_step/").concat(r,"/")),e.addUrlSearchParams(a,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId,self_api_key:n.config.apiKey||null}),t.prev=2,t.next=5,fetch(a.toString()).then((function(e){return ResponseHandler(e)}));case 5:return o=t.sent,t.abrupt("return",o.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"verifyOAuth",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrl,"/").concat(n.config.oauthVerifyPath)),e.addUrlSearchParams(a,{authorization_id:"".concat(r),app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId}),t.prev=2,t.next=5,fetch(a.toString(),{method:"POST"}).then(ResponseHandler);case 5:return o=t.sent,t.abrupt("return",!!o.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"deleteAuth",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrl,"/connected-accounts/").concat(r)),e.addUrlSearchParams(a,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId}),t.prev=2,t.next=5,fetch(a.toString(),{method:"DELETE"}).then((function(e){return ResponseHandler(e)}));case 5:return o=t.sent,t.abrupt("return",{status:o.status,data:o.data});case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"callDynamicDataEndpoint",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o,i=arguments;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:{},e.addUrlSearchParams(r,_objectSpread$9({app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId},a)),t.prev=2,t.next=5,fetch(r.toString()).then((function(e){return ResponseHandler(e)}));case 5:return o=t.sent,t.abrupt("return",o.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"getTemplateListing",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrl,"/bundle/").concat(r,"/")),e.addUrlSearchParams(a,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId}),t.prev=2,t.next=5,fetch(a.toString()).then((function(e){return ResponseHandler(e)}));case 5:return o=t.sent,t.abrupt("return",o.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"saveIntegration",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrlv2,"/integration/")),e.addUrlSearchParams(a,{async:!1,app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId,activate:!0}),t.prev=2,t.next=5,fetch(a.toString(),{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}).then((function(e){return ResponseHandler(e)}));case 5:return o=t.sent,t.abrupt("return",o.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"updateIntegration",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r,a){var o,i;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new URL("".concat(n.config.baseUrlv2,"/integration/").concat(r,"/")),e.addUrlSearchParams(o,{async:!1,app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId,activate:!0}),t.prev=2,t.next=5,fetch(o.toString(),{method:"PUT",body:JSON.stringify(a),headers:{"Content-Type":"application/json"}}).then((function(e){return ResponseHandler(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,n){return t.apply(this,arguments)}}()),_defineProperty(this,"deleteIntegration",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrl,"/setup/template/").concat(r,"/")),e.addUrlSearchParams(a,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId}),t.prev=2,t.next=5,fetch(a.toString(),{method:"DELETE"}).then((function(e){return ResponseHandler(e)}));case 5:return o=t.sent,t.abrupt("return",o.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"toggleIntegration",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r,a){var o,i;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new URL("".concat(n.config.baseUrlv2,"/integration/").concat(r,"/").concat(a?"enable":"disable","/")),e.addUrlSearchParams(o,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId}),t.prev=2,t.next=5,fetch(o.toString(),{method:"PUT"}).then((function(e){return ResponseHandler(e)}));case 5:return i=t.sent,t.abrupt("return",i.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,n){return t.apply(this,arguments)}}()),_defineProperty(this,"getIntegrationById",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrlv2,"/integration/").concat(r)),e.addUrlSearchParams(a,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId}),t.prev=2,t.next=5,fetch(a.toString(),{method:"GET"}).then((function(e){return ResponseHandler(e)}));case 5:return o=t.sent,t.abrupt("return",o.data);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(this,"getIntegrationStatuses",function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(r){var a,o;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new URL("".concat(n.config.baseUrlv2,"/integration_status/")),e.addUrlSearchParams(a,{app_key:n.config.appKey,hash:n.config.hash,user_id:n.config.userId}),t.prev=2,t.next=5,fetch(a.toString(),{method:"PUT",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}).then(ResponseHandler);case 5:return o=t.sent,t.abrupt("return",o);case 9:return t.prev=9,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}()),this.config=t};function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray$1(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray$1(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray$1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$1(e,t):void 0}}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray$1(e)||_nonIterableSpread()}function HMAC(e,t){return _HMAC.apply(this,arguments)}function _HMAC(){return(_HMAC=_asyncToGenerator(_regeneratorRuntime.mark((function e(t,n){var r,a,o,i,l;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(r=function(e){return new Uint8Array(_toConsumableArray(unescape(encodeURIComponent(e))).map((function(e){return e.charCodeAt(0)})))})(n),o=r(t),e.next=5,crypto.subtle.importKey("raw",a,{name:"HMAC",hash:"SHA-256"},!0,["sign"]);case 5:return i=e.sent,e.next=8,crypto.subtle.sign("HMAC",i,o);case 8:return l=e.sent,e.abrupt("return",_toConsumableArray(new Uint8Array(l)).map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,a=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray$1(e,t)||_nonIterableRest()}_defineProperty(IntegryAPI,"addUrlSearchParams",(function(e,t){return Object.keys(t).map((function(n){return void 0!==t[n]&&e.searchParams.append(n,"".concat(t[n]))}))}));var t,u,r,i=[],o=n$2.__r,f=n$2.diffed,c=n$2.__c,e=n$2.unmount;function a(e){n$2.__h&&n$2.__h(u);var t=u.__H||(u.__H={t:[],u:[]});return e>=t.t.length&&t.t.push({}),t.t[e]}function v(e){return m(E,e)}function m(e,n,r){var o=a(t++);return o.__c||(o.__c=u,o.i=[r?r(n):E(void 0,n),function(t){var n=e(o.i[0],t);o.i[0]!==n&&(o.i[0]=n,o.__c.setState({}))}]),o.i}function p(e,n){var r=a(t++);x(r.o,n)&&(r.i=e,r.o=n,u.__H.u.push(r))}function d(e){return y((function(){return{current:e}}),[])}function y(e,n){var r=a(t++);return x(r.o,n)?(r.o=n,r.v=e,r.i=e()):r.i}function T(e,t){return y((function(){return e}),t)}function w(e){var n=u.context[e.__c];if(!n)return e.__;var r=a(t++);return null==r.i&&(r.i=!0,n.sub(u)),n.props.value}function F(e){var n=a(t++),r=v();return n.i=e,u.componentDidCatch||(u.componentDidCatch=function(e){n.i&&n.i(e),r[1](e)}),[r[0],function(){r[1](void 0)}]}function _(){i.some((function(e){e.__P&&(e.__H.u.forEach(g),e.__H.u.forEach(q),e.__H.u=[])})),i=[]}function g(e){e.m&&e.m()}function q(e){var t=e.i();"function"==typeof t&&(e.m=t)}function x(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function E(e,t){return"function"==typeof t?t(e):t}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}n$2.__r=function(e){o&&o(e),t=0,(u=e.__c).__H&&(u.__H.u.forEach(g),u.__H.u.forEach(q),u.__H.u=[])},n$2.diffed=function(e){f&&f(e);var t=e.__c;if(t){var n=t.__H;n&&n.u.length&&(1!==i.push(t)&&r===n$2.requestAnimationFrame||((r=n$2.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(_))}},n$2.__c=function(e,t){t.some((function(e){e.__h.forEach(g),e.__h=e.__h.filter((function(e){return!e.i||q(e)}))})),c&&c(e,t)},n$2.unmount=function(t){e&&e(t);var n=t.__c;if(n){var r=n.__H;r&&r.t.forEach((function(e){return e.m&&e.m()}))}};var _excluded$2=["message"],_marked=_regeneratorRuntime.mark(toFailures),_marked2=_regeneratorRuntime.mark(run);function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ownKeys$8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$8(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$8(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$8(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _createSuper$g(e){var t=_isNativeReflectConstruct$g();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var StructError=function(e){_inherits(n,_wrapNativeSuper(TypeError));var t=_createSuper$g(n);function n(e,r){var a,o;_classCallCheck(this,n);var i=e.message,l=_objectWithoutProperties(e,_excluded$2),s=e.path,p=0===s.length?i:"At path: "+s.join(".")+" -- "+i;return a=t.call(this,p),Object.assign(_assertThisInitialized(a),l),a.name=a.constructor.name,a.failures=function(){var t;return null!=(t=o)?t:o=[e].concat(_toConsumableArray(r()))},a}return n}();function isIterable(e){return isObject(e)&&"function"==typeof e[Symbol.iterator]}function isObject(e){return"object"===_typeof(e)&&null!=e}function print(e){return"string"==typeof e?JSON.stringify(e):""+e}function shiftIterator(e){var t=e.next(),n=t.done,r=t.value;return n?void 0:r}function toFailure(e,t,n,r){if(!0!==e){!1===e?e={}:"string"==typeof e&&(e={message:e});var a=t.path,o=t.branch,i=n.type,l=e,s=l.refinement,p=l.message,c=void 0===p?"Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+print(r)+"`":p;return _objectSpread$8(_objectSpread$8({value:r,type:i,refinement:s,key:a[a.length-1],path:a,branch:o},e),{},{message:c})}}function toFailures(e,t,n,r){var a,o,i,l;return _regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:isIterable(e)||(e=[e]),a=_createForOfIteratorHelper(e),s.prev=2,a.s();case 4:if((o=a.n()).done){s.next=12;break}if(i=o.value,!(l=toFailure(i,t,n,r))){s.next=10;break}return s.next=10,l;case 10:s.next=4;break;case 12:s.next=17;break;case 14:s.prev=14,s.t0=s.catch(2),a.e(s.t0);case 17:return s.prev=17,a.f(),s.finish(17);case 20:case"end":return s.stop()}}),_marked,null,[[2,14,17,20]])}function run(e,t){var n,r,a,o,i,l,s,p,c,d,u,_,m,f,y,g,h,v,b,$,w,j,x,O,S,I,C,T,k=arguments;return _regeneratorRuntime.wrap((function(L){for(;;)switch(L.prev=L.next){case 0:if(n=k.length>2&&void 0!==k[2]?k[2]:{},r=n.path,a=void 0===r?[]:r,o=n.branch,i=void 0===o?[e]:o,l=n.coerce,s=void 0!==l&&l,p=n.mask,c=void 0!==p&&p,d={path:a,branch:i},s&&(e=t.coercer(e,d),c&&"type"!==t.type&&isObject(t.schema)&&isObject(e)&&!Array.isArray(e)))for(u in e)void 0===t.schema[u]&&delete e[u];_=!0,m=_createForOfIteratorHelper(t.validator(e,d)),L.prev=6,m.s();case 8:if((f=m.n()).done){L.next=15;break}return y=f.value,_=!1,L.next=13,[y,void 0];case 13:L.next=8;break;case 15:L.next=20;break;case 17:L.prev=17,L.t0=L.catch(6),m.e(L.t0);case 20:return L.prev=20,m.f(),L.finish(20);case 23:g=_createForOfIteratorHelper(t.entries(e,d)),L.prev=24,g.s();case 26:if((h=g.n()).done){L.next=53;break}v=_slicedToArray(h.value,3),b=v[0],$=v[1],w=v[2],j=run($,w,{path:void 0===b?a:[].concat(_toConsumableArray(a),[b]),branch:void 0===b?i:[].concat(_toConsumableArray(i),[$]),coerce:s,mask:c}),x=_createForOfIteratorHelper(j),L.prev=30,x.s();case 32:if((O=x.n()).done){L.next=43;break}if(!(S=O.value)[0]){L.next=40;break}return _=!1,L.next=38,[S[0],void 0];case 38:L.next=41;break;case 40:s&&($=S[1],void 0===b?e=$:e instanceof Map?e.set(b,$):e instanceof Set?e.add($):isObject(e)&&(e[b]=$));case 41:L.next=32;break;case 43:L.next=48;break;case 45:L.prev=45,L.t1=L.catch(30),x.e(L.t1);case 48:return L.prev=48,x.f(),L.finish(48);case 51:L.next=26;break;case 53:L.next=58;break;case 55:L.prev=55,L.t2=L.catch(24),g.e(L.t2);case 58:return L.prev=58,g.f(),L.finish(58);case 61:if(!_){L.next=80;break}I=_createForOfIteratorHelper(t.refiner(e,d)),L.prev=63,I.s();case 65:if((C=I.n()).done){L.next=72;break}return T=C.value,_=!1,L.next=70,[T,void 0];case 70:L.next=65;break;case 72:L.next=77;break;case 74:L.prev=74,L.t3=L.catch(63),I.e(L.t3);case 77:return L.prev=77,I.f(),L.finish(77);case 80:if(!_){L.next=83;break}return L.next=83,[void 0,e];case 83:case"end":return L.stop()}}),_marked2,null,[[6,17,20,23],[24,55,58,61],[30,45,48,51],[63,74,77,80]])}var Struct=function(){function e(t){var n=this;_classCallCheck(this,e);var r=t.type,a=t.schema,o=t.validator,i=t.refiner,l=t.coercer,s=void 0===l?function(e){return e}:l,p=t.entries,c=void 0===p?_regeneratorRuntime.mark((function e(){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):p;this.type=r,this.schema=a,this.entries=c,this.coercer=s,this.validator=o?function(e,t){return toFailures(o(e,t),t,n,e)}:function(){return[]},this.refiner=i?function(e,t){return toFailures(i(e,t),t,n,e)}:function(){return[]}}return _createClass(e,[{key:"assert",value:function(e){return _assert(e,this)}},{key:"create",value:function(e){return _create(e,this)}},{key:"is",value:function(e){return _is(e,this)}},{key:"mask",value:function(e){return _mask(e,this)}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _validate(e,this,t)}}]),e}();function _assert(e,t){var n=_validate(e,t);if(n[0])throw n[0]}function _create(e,t){var n=_validate(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function _mask(e,t){var n=_validate(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function _is(e,t){return!_validate(e,t)[0]}function _validate(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=run(e,t,n),a=shiftIterator(r);if(a[0]){var o=new StructError(a[0],_regeneratorRuntime.mark((function e(){var t,n,a;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=_createForOfIteratorHelper(r),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!(a=n.value)[0]){e.next=8;break}return e.next=8,a[0];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])})));return[o,void 0]}var i=a[1];return[void 0,i]}function define(e,t){return new Struct({type:e,schema:null,validator:t})}function array(e){return new Struct({type:"array",schema:e,entries:_regeneratorRuntime.mark((function t(n){var r,a,o,i,l;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||!Array.isArray(n)){t.next=18;break}r=_createForOfIteratorHelper(n.entries()),t.prev=2,r.s();case 4:if((a=r.n()).done){t.next=10;break}return o=_slicedToArray(a.value,2),i=o[0],l=o[1],t.next=8,[i,l,e];case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),r.e(t.t0);case 15:return t.prev=15,r.f(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,12,15,18]])})),coercer:function(e){return Array.isArray(e)?e.slice():e},validator:function(e){return Array.isArray(e)||"Expected an array value, but received: "+print(e)}})}function boolean(){return define("boolean",(function(e){return"boolean"==typeof e}))}function date(){return define("date",(function(e){return e instanceof Date&&!isNaN(e.getTime())||"Expected a valid `Date` object, but received: "+print(e)}))}function never(){return define("never",(function(){return!1}))}function nullable(e){return new Struct(_objectSpread$8(_objectSpread$8({},e),{},{validator:function(t,n){return null===t||e.validator(t,n)},refiner:function(t,n){return null===t||e.refiner(t,n)}}))}function number(){return define("number",(function(e){return"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+print(e)}))}function object(e){var t=e?Object.keys(e):[],n=never();return new Struct({type:"object",schema:e||null,entries:_regeneratorRuntime.mark((function r(a){var o,i,l,s,p,c,d;return _regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e||!isObject(a)){r.next=37;break}o=new Set(Object.keys(a)),i=_createForOfIteratorHelper(t),r.prev=3,i.s();case 5:if((l=i.n()).done){r.next=12;break}return s=l.value,o.delete(s),r.next=10,[s,a[s],e[s]];case 10:r.next=5;break;case 12:r.next=17;break;case 14:r.prev=14,r.t0=r.catch(3),i.e(r.t0);case 17:return r.prev=17,i.f(),r.finish(17);case 20:p=_createForOfIteratorHelper(o),r.prev=21,p.s();case 23:if((c=p.n()).done){r.next=29;break}return d=c.value,r.next=27,[d,a[d],n];case 27:r.next=23;break;case 29:r.next=34;break;case 31:r.prev=31,r.t1=r.catch(21),p.e(r.t1);case 34:return r.prev=34,p.f(),r.finish(34);case 37:case"end":return r.stop()}}),r,null,[[3,14,17,20],[21,31,34,37]])})),validator:function(e){return isObject(e)||"Expected an object, but received: "+print(e)},coercer:function(e){return isObject(e)?_objectSpread$8({},e):e}})}function optional(e){return new Struct(_objectSpread$8(_objectSpread$8({},e),{},{validator:function(t,n){return void 0===t||e.validator(t,n)},refiner:function(t,n){return void 0===t||e.refiner(t,n)}}))}function string(){return define("string",(function(e){return"string"==typeof e||"Expected a string, but received: "+print(e)}))}function size(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r="Expected a "+e.type,a=t===n?"of `"+t+"`":"between `"+t+"` and `"+n+"`";return refine(e,"size",(function(e){if("number"==typeof e||e instanceof Date)return t<=e&&e<=n||r+" "+a+" but received `"+e+"`";if(e instanceof Map||e instanceof Set){var o=e.size;return t<=o&&o<=n||r+" with a size "+a+" but received one with a size of `"+o+"`"}var i=e.length;return t<=i&&i<=n||r+" with a length "+a+" but received one with a length of `"+i+"`"}))}function refine(e,t,n){return new Struct(_objectSpread$8(_objectSpread$8({},e),{},{refiner:function(e){var t=_regeneratorRuntime.mark(n);function n(n,r){var a=arguments;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e.apply(this,a),"t0",1);case 1:return t.abrupt("return",t.t0);case 2:case"end":return t.stop()}}),t,this)}return n.toString=function(){return e.toString()},n}(_regeneratorRuntime.mark((function r(a,o){var i,l,s,p,c;return _regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.delegateYield(e.refiner(a,o),"t0",1);case 1:i=n(a,o),l=toFailures(i,o,e,a),s=_createForOfIteratorHelper(l),r.prev=4,s.s();case 6:if((p=s.n()).done){r.next=12;break}return c=p.value,r.next=10,_objectSpread$8(_objectSpread$8({},c),{},{refinement:t});case 10:r.next=6;break;case 12:r.next=17;break;case 14:r.prev=14,r.t1=r.catch(4),s.e(r.t1);case 17:return r.prev=17,s.f(),r.finish(17);case 20:case"end":return r.stop()}}),r,null,[[4,14,17,20]])})))}))}var AppContext=L(null);function n(e,t){for(var n in t)e[n]=t[n];return e}function createStore(e){var t=[];function r(e){for(var n=[],r=0;r<t.length;r++)t[r]===e?e=null:n.push(t[r]);t=n}function a(r,a,o){e=a?r:n(n({},e),r);for(var i=t,l=0;l<i.length;l++)i[l](e,o)}return e=e||{},{action:function(t){function n(e){a(e,!1,t)}return function(){for(var r=arguments,a=[e],o=0;o<arguments.length;o++)a.push(r[o]);var i=t.apply(this,a);if(null!=i)return i.then?i.then(n):n(i)}},setState:a,subscribe:function(e){return t.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return e}}}var devtools=function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION__||window.top.__REDUX_DEVTOOLS_EXTENSION__,n=!1;return t?(e.devtools||(e.devtools=t.connect(),e.devtools.subscribe((function(t){"DISPATCH"===t.type&&t.state&&(n="JUMP_TO_ACTION"===t.payload.type||"JUMP_TO_STATE"===t.payload.type,e.setState(JSON.parse(t.state),!0))})),e.devtools.init(e.getState()),e.subscribe((function(t,r){var a=r&&r.name||"setState";n?n=!1:e.devtools.send(a,t)}))),e):(console.warn("Please install/enable Redux devtools extension"),e.devtools=null,e)},initialState={stepState:{steps:[],currentStep:{type:"CONFIRMATION"},stepIndex:0,showValidation:!1,allStepsCompleted:!1},genericData:{bundleId:null,templateId:null,templateApp:null,isPreviewMode:!1},stepMapping:{},stepDataMapping:{},parentChildMapping:{}};function ownKeys$7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$7(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$7(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$7(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var actionFunctions=function(e){return{setSteps:function(e,t){var n=[],r=-1;return t.forEach((function(e){if(e.activity.auth_required&&!e.hide_authorization&&(r+=1,n.push({stepId:e.id,title:"Connect ".concat(e.activity.app.name),iconUrl:e.activity.app.icon_url,isCompleted:!1,isCurrentlyOpen:!1,type:"AUTH",requiredFields:[e.id],invalidFields:_defineProperty({},e.id,""),isValid:!1,itemIndex:r})),e.is_visible&&e.template_fields.length>0){var t=e.template_fields.filter((function(e){return e.is_visible})).length>0,a=e.template_fields.filter((function(e){return e.is_required&&e.is_visible})).map((function(e){return e.id})),o=e.template_fields.filter((function(e){return e.is_required&&!e.default_value})).reduce((function(e,t){return _objectSpread$7(_objectSpread$7({},e),{},_defineProperty({},t.id,""))}),{}),i=!(Object.keys(o).length>0);t&&(r+=1,n.push({stepId:e.id,title:e.title,iconUrl:e.activity.app.icon_url,isCompleted:!1,isCurrentlyOpen:!1,type:"CONFIGURATION",requiredFields:a,invalidFields:o,isValid:i,itemIndex:r}))}})),_objectSpread$7(_objectSpread$7({},e),{},{stepState:{steps:n,currentStep:n[0],stepIndex:0,showValidation:!1,allStepsCompleted:!1}})},setIntegrationData:function(e,t){var n=e.stepDataMapping,r=e.stepMapping,a=t.steps.reduce((function(e,t){return r[t.template_step]&&t.authorization?_objectSpread$7(_objectSpread$7({},e),{},_defineProperty({},t.template_step,{authId:Number(t.authorization),stepId:t.id})):e}),{}),o=t.steps.reduce((function(e,t){return n[t.template_step]?_objectSpread$7(_objectSpread$7({},e),{},_defineProperty({},t.template_step,t.app_user_data)):e}),{}),i=_objectSpread$7({},r),l=_objectSpread$7({},n),s=e.stepState.steps.map((function(e){return _objectSpread$7(_objectSpread$7({},e),{},{isCompleted:!0})}));return Object.keys(o).forEach((function(e){l[Number(e)]=_objectSpread$7(_objectSpread$7({},n[Number(e)]),o[Number(e)].reduce((function(t,r){return n[Number(e)]?_objectSpread$7(_objectSpread$7({},t),{},_defineProperty({},r.template_field,_objectSpread$7(_objectSpread$7({},n[Number(e)][r.template_field]),{},{integrationFieldId:r.id,value:n[Number(e)][r.template_field].isDynamic?null:r.value,objectValue:n[Number(e)][r.template_field].isDynamic?JSON.parse(r.value||"{}"):null}))):t}),{}))})),Object.keys(a).forEach((function(e){i[Number(e)]=_objectSpread$7(_objectSpread$7({},i[Number(e)]),{},{integrationStepId:a[Number(e)].stepId,isAuthVerified:!0,selectedAuthId:a[Number(e)].authId})})),_objectSpread$7(_objectSpread$7({},e),{},{stepMapping:i,stepDataMapping:l,stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{steps:s,currentStep:s[0],stepIndex:0,showValidation:!1,allStepsCompleted:!0})})},showStepValidationState:function(e){return{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{showValidation:!0})}},hideStepValidationState:function(e){return{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{showValidation:!1})}},gotoNextStep:function(e){var t=e.stepState;if(t){var n=Number(t.stepIndex)+1,r=t.steps[Number(t.stepIndex)+1],a=_objectSpread$7(_objectSpread$7({},t.steps[e.stepState.stepIndex]),{},{isCompleted:!0});return r?{stepState:_objectSpread$7(_objectSpread$7({},t),{},{steps:[].concat(_toConsumableArray(t.steps.slice(0,t.stepIndex)),[a],_toConsumableArray(t.steps.slice(t.stepIndex+1))),currentStep:_objectSpread$7({},r),stepIndex:n,showValidation:!1})}:{stepState:_objectSpread$7(_objectSpread$7({},t),{},{steps:[].concat(_toConsumableArray(t.steps.slice(0,t.stepIndex)),[a],_toConsumableArray(t.steps.slice(t.stepIndex+1))),currentStep:{type:"CONFIRMATION"},stepIndex:n,allStepsCompleted:!0,showValidation:!1})}}return e},gotoPreviousStep:function(e){if(e.stepState){var t=Number(e.stepState.stepIndex)-1,n=e.stepState.steps[Number(e.stepState.stepIndex)-1];return{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{currentStep:n,stepIndex:t,showValidation:!n.isValid})}}return e},gotoStepInPreview:function(e,t){var n=e.stepState,r=t.stepId,a=t.type;if(r&&"CONFIRMATION"!==a){var o=n.steps.findIndex((function(e){return e.stepId===r&&e.type===a}));if(o>-1)return{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{currentStep:n.steps[o],stepIndex:o,allStepsCompleted:!1})}}return r||"CONFIRMATION"!==a?e:{stepState:_objectSpread$7(_objectSpread$7({},n),{},{currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0})}},gotoStep:function(e,t){var n=e.stepState,r=n.stepIndex;if(n){var a=n.steps[r],o=n.steps[t];if(e.genericData.isPreviewMode)return t===n.steps.length?{stepState:_objectSpread$7(_objectSpread$7({},n),{},{currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0})}:{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{currentStep:_objectSpread$7({},o),stepIndex:t,allStepsCompleted:!1})};if(n.allStepsCompleted&&t===n.steps.length)return{stepState:_objectSpread$7(_objectSpread$7({},n),{},{currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0})};if(a&&a.isValid&&r===n.steps.length-1&&t===n.steps.length){var i=_objectSpread$7(_objectSpread$7({},n.steps[r]),{},{isCompleted:!0});return{stepState:_objectSpread$7(_objectSpread$7({},n),{},{steps:[].concat(_toConsumableArray(n.steps.slice(0,r)),[i],_toConsumableArray(n.steps.slice(r+1))),currentStep:{type:"CONFIRMATION"},stepIndex:t,allStepsCompleted:!0})}}if(o&&o.isCompleted)return{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{currentStep:_objectSpread$7({},o),stepIndex:t,showValidation:!o.isValid})};if(a&&a.isValid&&t===r+1){var l=_objectSpread$7(_objectSpread$7({},n.steps[r]),{},{isCompleted:!0});return{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{steps:[].concat(_toConsumableArray(n.steps.slice(0,r)),[l],_toConsumableArray(n.steps.slice(r+1))),currentStep:_objectSpread$7({},o),stepIndex:t})}}}return e},verifyStepValidity:function(e,t){var n=e.stepDataMapping[t],r=!(Object.keys(n).map((function(e){return n[Number(e)]})).filter((function(e){return e.isRequired&&!e.value&&!e.objectValue})).length>0);return{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{currentStep:_objectSpread$7(_objectSpread$7({},e.stepState.currentStep),{},{isValid:r})})}},getStepState:function(){return e.getState().stepState},setGenericData:function(e,t){return{genericData:_objectSpread$7(_objectSpread$7({},e.genericData),t)}},setTemplateApp:function(e,t){return{genericData:_objectSpread$7(_objectSpread$7({},e.genericData),{},{templateApp:{name:t.name,iconUrl:t.iconUrl}})}},setStepMapping:function(e,t){var n=t.reduce((function(t,n){var r,a,o,i,l=null,s=!1;n.hide_authorization||e.genericData.isPreviewMode?(s=!0,l=null!==(o=null===(i=n.authorization_type.authorizations[0])||void 0===i?void 0:i.id)&&void 0!==o?o:null):(n.step_authorization||e.stepMapping[n.id])&&(l=e.stepMapping[n.id].selectedAuthId);return _objectSpread$7(_objectSpread$7({},t),{},_defineProperty({},n.id,{step:n,authorizations:null!==(r=null===(a=n.authorization_type.authorizations)||void 0===a?void 0:a.map((function(e){return{authorizationId:e.id,userIdentity:e.user_identity,authType:e.authorization_type,disableLink:e.disable_link,isErrored:!1,isVerified:s}})))&&void 0!==r?r:[],isAuthVerified:s,selectedAuthId:l}))}),{}),r=t.reduce((function(t,n){return _objectSpread$7(_objectSpread$7({},t),{},_defineProperty({},n.id,_objectSpread$7(_objectSpread$7({},e.stepDataMapping[n.id]),n.template_fields.reduce((function(t,r){var a,o;return _objectSpread$7(_objectSpread$7({},t),{},_defineProperty({},r.id,{fieldId:r.id,value:!r.is_visible||r.default_value?r.default_value:e.stepDataMapping[n.id]&&e.stepDataMapping[n.id][r.id]&&e.stepDataMapping[n.id][r.id].value||"",machineName:null===(a=r.activity_field)||void 0===a?void 0:a.machine_name,isRequired:r.is_required,isVisible:r.is_visible,isDynamic:"DYNAMIC"===(null===(o=r.activity_field)||void 0===o?void 0:o.type)}))}),{}))))}),{});return{stepMapping:_objectSpread$7(_objectSpread$7({},e.stepMapping),n),stepDataMapping:_objectSpread$7(_objectSpread$7({},e.stepDataMapping),r),genericData:_objectSpread$7(_objectSpread$7({},e.genericData),{},{templateApp:{name:t.length>0?t[0].activity.app.name:"",iconUrl:t.length>0?t[0].activity.app.icon_url:""}})}},setActivityOutputData:function(e,t){return _objectSpread$7(_objectSpread$7({},e),{},{activityOutputData:t.activityOutputData})},setDynamicFieldData:function(e,t){return _objectSpread$7(_objectSpread$7({},e),{},{dynamicFieldData:Object.keys(t.dynamicFieldData).reduce((function(e,n){return _objectSpread$7(_objectSpread$7({},e),{},_defineProperty({},"{".concat(n,"}"),t.dynamicFieldData[n]))}),{})})},setParentChildMapping:function(e,t){var n=t.reduce((function(t,n){return _objectSpread$7(_objectSpread$7({},t),{},_defineProperty({},n.id,_objectSpread$7(_objectSpread$7({},e.parentChildMapping[n.id]),n.template_fields.reduce((function(e,t){var n,r,a,o,i,l,s;return t.activity_field?_objectSpread$7(_objectSpread$7({},e),{},_defineProperty({},null===(n=t.activity_field)||void 0===n?void 0:n.machine_name,{fieldId:t.id,childFields:null!==(r=t.activity_field)&&void 0!==r&&r.child_fields?JSON.parse(null!==(a=null===(o=t.activity_field)||void 0===o?void 0:o.child_fields)&&void 0!==a?a:"[]"):null,parentFields:null!==(i=t.activity_field)&&void 0!==i&&i.parent_fields?JSON.parse(null!==(l=null===(s=t.activity_field)||void 0===s?void 0:s.parent_fields)&&void 0!==l?l:"[]"):null})):e}),{}))))}),{});return{parentChildMapping:_objectSpread$7(_objectSpread$7({},e.parentChildMapping),n)}},addAuthorization:function(e,t){var n=t.stepId,r=t.authData;return{stepMapping:_objectSpread$7(_objectSpread$7({},e.stepMapping),{},_defineProperty({},n,_objectSpread$7(_objectSpread$7({},e.stepMapping[n]),{},{authorizations:[].concat(_toConsumableArray(e.stepMapping[n].authorizations),[r])})))}},removeAuthorization:function(e,t){var n=t.stepId,r=t.authId;return{stepMapping:_objectSpread$7(_objectSpread$7({},e.stepMapping),{},_defineProperty({},n,_objectSpread$7(_objectSpread$7({},e.stepMapping[n]),{},{authorizations:e.stepMapping[n].authorizations.filter((function(e){return e.authorizationId!==r}))})))}},toggleVerifyAuthorizationFlag:function(e,t){var n=t.stepId,r=t.authId,a=t.isVerifying,o=e.stepMapping[n].authorizations.findIndex((function(e){return e.authorizationId===r}));return{stepMapping:_objectSpread$7(_objectSpread$7({},e.stepMapping),{},_defineProperty({},n,_objectSpread$7(_objectSpread$7({},e.stepMapping[n]),{},{authorizations:[].concat(_toConsumableArray(e.stepMapping[n].authorizations.slice(0,o)),[_objectSpread$7(_objectSpread$7({},e.stepMapping[n].authorizations[o]),{},{isVerifying:a})],_toConsumableArray(e.stepMapping[n].authorizations.slice(o+1)))})))}},toggleDeleteAuthorizationFlag:function(e,t){var n=t.stepId,r=t.authId,a=t.isDeleting,o=t.error,i=e.stepMapping[n].authorizations.findIndex((function(e){return e.authorizationId===r}));return{stepMapping:_objectSpread$7(_objectSpread$7({},e.stepMapping),{},_defineProperty({},n,_objectSpread$7(_objectSpread$7({},e.stepMapping[n]),{},{authorizations:[].concat(_toConsumableArray(e.stepMapping[n].authorizations.slice(0,i)),[_objectSpread$7(_objectSpread$7({},e.stepMapping[n].authorizations[i]),{},{isDeleting:a,error:o})],_toConsumableArray(e.stepMapping[n].authorizations.slice(i+1)))})))}},setStepAuthId:function(e,t){var n=t.stepId,r=t.authId;return{stepMapping:_objectSpread$7(_objectSpread$7({},e.stepMapping),{},_defineProperty({},n,_objectSpread$7(_objectSpread$7({},e.stepMapping[n]),{},{selectedAuthId:r})))}},setStepAuthorization:function(t,n,r,a,o,i){var l,s,p=t.stepState.steps[t.stepState.stepIndex],c=t.stepMapping[n],d=e.getState().stepState;if("CONFIRMATION"!==p.type&&"CONFIRMATION"!==(null===(l=d.currentStep)||void 0===l?void 0:l.type)&&(null===(s=d.currentStep)||void 0===s?void 0:s.stepId)===n){var u=p.invalidFields;a&&delete u[n];var _=_objectSpread$7(_objectSpread$7({},t.stepState.steps[t.stepState.stepIndex]),{},{invalidFields:u,isValid:Object.keys(u).length<1,isCompleted:null!==c.selectedAuthId||a}),m=t.stepMapping[n].authorizations.findIndex((function(e){return e.authorizationId===r}));return{stepState:_objectSpread$7(_objectSpread$7({},t.stepState),{},{steps:[].concat(_toConsumableArray(t.stepState.steps.slice(0,t.stepState.stepIndex)),[_],_toConsumableArray(t.stepState.steps.slice(t.stepState.stepIndex+1))),currentStep:_,showValidation:!a&&!c.selectedAuthId}),stepMapping:_objectSpread$7(_objectSpread$7({},t.stepMapping),{},_defineProperty({},n,_objectSpread$7(_objectSpread$7({},t.stepMapping[n]),{},{selectedAuthId:a?r:t.stepMapping[n].selectedAuthId,authorizations:[].concat(_toConsumableArray(t.stepMapping[n].authorizations.slice(0,m)),[_objectSpread$7(_objectSpread$7({},t.stepMapping[n].authorizations[m]),{},{isVerified:a,isVerifying:!1,didFetchStatus:!0,error:""})],_toConsumableArray(t.stepMapping[n].authorizations.slice(m+1)))}))),stepDataMapping:i?t.stepDataMapping:_objectSpread$7(_objectSpread$7({},t.stepDataMapping),{},_defineProperty({},n,_objectSpread$7(_objectSpread$7({},t.stepDataMapping[n]),o.reduce((function(e,r){return _objectSpread$7(_objectSpread$7({},e),{},_defineProperty({},r,_objectSpread$7(_objectSpread$7({},t.stepDataMapping[n][r]),{},{value:""})))}),{}))))}}return t},resetCustomMappingData:function(e,t){var n,r=null===(n=e.stepMapping[t].step.template_fields.filter((function(e){var t;return"DYNAMIC"===(null===(t=e.activity_field)||void 0===t?void 0:t.type)}))[0])||void 0===n?void 0:n.id;if(r){var a=e.stepDataMapping[t][r];return a&&(a.objectValue={}),{stepDataMapping:_objectSpread$7(_objectSpread$7({},e.stepDataMapping),{},_defineProperty({},t,_objectSpread$7(_objectSpread$7({},e.stepDataMapping[t]),{},_defineProperty({},r,a))))}}return e},setStepFieldData:function(e,t){var n=t.stepId,r=t.fieldId,a=t.value,o=t.isRequired,i=e.stepState.steps[e.stepState.stepIndex];if("CONFIRMATION"!==i.type){var l=i.invalidFields;a?delete l[r]:o&&(l[r]=null);var s=_objectSpread$7(_objectSpread$7({},e.stepState.steps[e.stepState.stepIndex]),{},{invalidFields:l,isValid:Object.keys(l).length<1});return{stepState:_objectSpread$7(_objectSpread$7({},e.stepState),{},{steps:[].concat(_toConsumableArray(e.stepState.steps.slice(0,e.stepState.stepIndex)),[s],_toConsumableArray(e.stepState.steps.slice(e.stepState.stepIndex+1))),currentStep:s,allStepsCompleted:!1}),stepDataMapping:_objectSpread$7(_objectSpread$7({},e.stepDataMapping),{},_defineProperty({},n,_objectSpread$7(_objectSpread$7({},e.stepDataMapping[n]),{},_defineProperty({},r,_objectSpread$7(_objectSpread$7({},e.stepDataMapping[n][r]),{},{value:a})))))}}return e},setStepMappingData:function(e,t){var n,r,a,o,i=null===(n=e.stepDataMapping[t.stepId][t.fieldId])||void 0===n?void 0:n.objectValue;t.value?r=_objectSpread$7(_objectSpread$7({},null!==(a=null===(o=e.stepDataMapping[t.stepId][t.fieldId])||void 0===o?void 0:o.objectValue)&&void 0!==a?a:{}),_defineProperty({},t.id,t.value)):i&&(delete i[t.id],r=i,0===Object.keys(r).length&&(r=null));return r?{stepDataMapping:_objectSpread$7(_objectSpread$7({},e.stepDataMapping),{},_defineProperty({},t.stepId,_objectSpread$7(_objectSpread$7({},e.stepDataMapping[t.stepId]),{},_defineProperty({},t.fieldId,_objectSpread$7(_objectSpread$7({},e.stepDataMapping[t.stepId][t.fieldId]),{},{objectValue:r})))))}:e},reset:function(){return initialState}}},createSDKStore=function(){return devtools(createStore(initialState))},TemplatePreviewDataType=object({id:number(),name:string(),description:string(),app:object({id:number(),name:string(),description:string(),icon_url:string(),color:string(),publishing_status:string(),category:array(string()),app_type:optional(string()),action_url:nullable(optional(string())),created_at:optional(date()),tags:string()}),branding_app:object({id:number(),name:string(),description:string(),icon_url:string(),color:string(),publishing_status:string(),category:array(string()),app_type:optional(string()),action_url:nullable(optional(string())),created_at:optional(date()),tags:string()}),button_text:nullable(string()),is_wizard:boolean(),publishing_status:string(),steps:size(array(object({id:number(),weight:number(),title:string(),is_visible:boolean(),activity:object({id:number(),name:string(),type:string(),endpoint:string(),auth_required:boolean(),total_fields:number(),app:object({id:number(),name:string(),description:string(),icon_url:string(),color:string(),publishing_status:string(),category:array(string()),app_type:optional(string()),action_url:nullable(optional(string())),created_at:optional(date()),tags:string()}),activity_output:nullable(string()),activity_output_url:nullable(string()),dynamic_field_data_endpoint:nullable(string())}),authorization_type:object({id:number(),type:string(),authorizations:array(object({id:number(),authorization_type:string(),app_user:optional(number()),app_user_id:optional(number()),disable_link:optional(string()),integration_count:optional(number()),user_identity:string()})),provider:string(),is_sandbox_enabled:boolean(),authorization_url_sandbox:string()}),template_fields:array(object({id:number(),is_required:boolean(),is_hidden:boolean(),default_value:nullable(string()),weight:number(),description:string(),summary:nullable(string()),placeholder:nullable(string()),activity_field:nullable(object({id:number(),machine_name:string(),type:string(),title:string(),description:string(),weight:number(),is_required:boolean(),child_fields:nullable(string()),is_dynamic:boolean(),data_src:nullable(string()),data_src_endpoint:nullable(number()),parent_fields:nullable(string()),dynamic_field_src:nullable(string()),default_value:nullable(string()),auto_machine_name:string(),dynamic_field_src_endpoint:nullable(number()),regex:nullable(string()),is_searchable:boolean()})),title:nullable(string()),type:string(),child_field:nullable(string()),child_field_value:nullable(string()),button_text:nullable(string()),icon_url:nullable(string()),long_description:nullable(string()),regex:nullable(string()),regex_msg:nullable(string()),is_visible:boolean()})),allow_multiple_authorizations:boolean(),step_authorization:nullable(number()),button_text:nullable(string()),is_self_step:boolean(),summary:nullable(string()),auth_description:nullable(string()),hide_authorization:boolean(),machine_name:nullable(string()),is_custom_machine_name:boolean()})),0,Number.POSITIVE_INFINITY)});function styleInject(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var css_248z$x=".styles-module_loader__2ufbr {\n animation-name: styles-module_ckw__1aYrI;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: 50% 50%; }\n\n@keyframes styles-module_ckw__1aYrI {\n 0% {\n transform: rotate(0deg); }\n 100% {\n transform: rotate(360deg); } }\n",styles$u={loader:"styles-module_loader__2ufbr",ckw:"styles-module_ckw__1aYrI"},_templateObject$D;styleInject(css_248z$x);var Loader=function(){return m$1(_templateObject$D||(_templateObject$D=_taggedTemplateLiteral(["\n <svg\n class=",'\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M9.13037 0.179352C7.57047 -0.168051 5.94039 -0.00810102 4.47777 0.635883C3.01515 1.27987 1.79647 2.37421 0.999409 3.75937C0.202348 5.14453 -0.131421 6.74808 0.0467641 8.33623C0.224949 9.92438 0.90577 11.4141 1.98997 12.5882C3.07417 13.7623 4.50506 14.5593 6.07402 14.8632C7.64298 15.167 9.26799 14.9618 10.7121 14.2773C12.1562 13.5929 13.344 12.4651 14.1022 11.0582C14.8604 9.65144 15.1494 8.03922 14.9271 6.45665L14.1844 6.56098C14.3845 7.9853 14.1243 9.43629 13.442 10.7024C12.7596 11.9685 11.6906 12.9836 10.3909 13.5996C9.09119 14.2156 7.62869 14.4003 6.21662 14.1269C4.80455 13.8534 3.51675 13.136 2.54097 12.0794C1.56519 11.0227 0.952454 9.68194 0.792088 8.2526C0.631721 6.82327 0.932113 5.38008 1.64947 4.13343C2.36682 2.88679 3.46363 1.90188 4.77999 1.32229C6.09635 0.742709 7.56343 0.598754 8.96733 0.911417L9.13037 0.179352Z"\n fill="#E0E0E0"\n />\n <path\n d="M14.93 6.47755C14.7207 4.95709 14.0501 3.53742 13.0085 2.41017C11.9669 1.28292 10.6046 0.50235 9.10537 0.173829L8.94483 0.906446C10.2941 1.20212 11.5202 1.90462 12.4577 2.91915C13.3951 3.93368 13.9987 5.21138 14.187 6.57979L14.93 6.47755Z"\n fill="#ADADAD"\n />\n </svg>\n'])),styles$u.loader)};function notEmpty(e){return null!=e}var classnames=createCommonjsModule((function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var o=_typeof(a);if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var i=n.apply(null,a);i&&e.push(i)}}else if("object"===o)if(a.toString===Object.prototype.toString)for(var l in a)t.call(a,l)&&a[l]&&e.push(l);else e.push(a.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()})),css_248z$w=".styles-module_preact-hint__2fj-j {\n position: absolute;\n z-index: 9999;\n cursor: default; }\n .styles-module_preact-hint__2fj-j::after {\n content: '';\n width: 0;\n height: 0;\n margin: auto;\n display: block;\n position: absolute;\n border: 4px solid transparent; }\n .styles-module_preact-hint__2fj-j.styles-module_preact-hint__top__eUj7n {\n padding-bottom: 4px; }\n .styles-module_preact-hint__2fj-j.styles-module_preact-hint__top__eUj7n::after {\n top: auto;\n left: 0;\n right: 0;\n bottom: 0;\n border-bottom: none;\n border-top-color: #000; }\n .styles-module_preact-hint__2fj-j.styles-module_preact-hint__bottom__2goUI {\n padding-top: 4px; }\n .styles-module_preact-hint__2fj-j.styles-module_preact-hint__bottom__2goUI::after {\n top: 0;\n left: 0;\n right: 0;\n bottom: auto;\n border-top: none;\n border-bottom-color: #000; }\n\n.styles-module_preact-hint__content__23OpK {\n font-family: inherit;\n background: #000000;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.062132);\n padding: 8px;\n margin: 0;\n border-radius: 2px;\n font-style: normal;\n margin: 0;\n line-height: 12px;\n font-weight: normal;\n font-size: 10px;\n color: #ffffff;\n display: block; }\n",styles$t={"preact-hint":"styles-module_preact-hint__2fj-j","preact-hint__top":"styles-module_preact-hint__top__eUj7n","preact-hint__bottom":"styles-module_preact-hint__bottom__2goUI","preact-hint__content":"styles-module_preact-hint__content__23OpK"},_templateObject$C,_templateObject2$w,_templateObject3$o;function ownKeys$6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$6(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$6(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function HintWrap(e){var t=d(null),n=_slicedToArray(v(1e4),2),r=n[0],a=n[1],o=e.position;return p((function(){t.current&&a(t.current.getBoundingClientRect().width)}),[t]),m$1(_templateObject$C||(_templateObject$C=_taggedTemplateLiteral(['\n <div\n class="','"\n style=',"\n >\n <pre class="," ref=",">\n ","\n </pre\n >\n </div>\n "])),"".concat(styles$t["preact-hint"]," ").concat("top"===o?styles$t["preact-hint__top"]:styles$t["preact-hint__bottom"]),_objectSpread$6(_objectSpread$6({},{left:e.targetBoundingRect.left-e.rootBoundingRect.left-r/2+e.targetBoundingRect.width/2}),"top"===o?{bottom:e.rootBoundingRect.height-e.targetBoundingRect.top+e.rootBoundingRect.top+2}:{top:e.rootBoundingRect.height-e.targetBoundingRect.top+e.rootBoundingRect.top+2}),styles$t["preact-hint__content"],t,e.template?e.template(e.content):e.content)}styleInject(css_248z$w);var Hint=function(e){var t=e.position,n=void 0===t?"bottom":t,r=e.attribute,a=void 0===r?"data-hint":r,o=_slicedToArray(v(""),2),i=o[0],l=o[1],s=_slicedToArray(v(null),2),p=s[0],c=s[1],d=_slicedToArray(v(null),2),u=d[0],_=d[1],m=T((function(t){c(t),p&&(p.addEventListener("mouseover",(function(e){e.target instanceof Element&&e.target.hasAttribute(a)&&(l(e.target.getAttribute(a)||""),_(e.target.getBoundingClientRect()))})),p.addEventListener("mouseout",(function(e){e.target instanceof Element&&e.target.hasAttribute(a)&&(l(""),_(null))})),e.dismissOnClick&&p.addEventListener("click",(function(){l(""),_(null)})))}),[p]);return m$1(_templateObject2$w||(_templateObject2$w=_taggedTemplateLiteral(["\n <div ref=",' style="position: relative">\n ',"\n ","\n </div>\n "])),m,i&&p&&u&&m$1(_templateObject3$o||(_templateObject3$o=_taggedTemplateLiteral([" <","\n content=","\n position=","\n template=","\n rootBoundingRect=","\n targetBoundingRect=","\n />"])),HintWrap,i,n,e.template,null==p?void 0:p.getBoundingClientRect(),u),e.children)},css_248z$v=".styles-module_loader__2AOKp {\n display: flex; }\n .styles-module_loader__2AOKp svg {\n animation-name: styles-module_fadeInOut__eKHQq;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n animation-delay: 0;\n margin: 0px 2px; }\n .styles-module_loader__2AOKp svg:nth-child(2) {\n animation-delay: 0.3s; }\n .styles-module_loader__2AOKp svg:nth-child(3) {\n animation-delay: 0.6s; }\n\n@keyframes styles-module_fadeInOut__eKHQq {\n 0% {\n opacity: 0.3; }\n 50% {\n opacity: 1; }\n 100% {\n opacity: 0.3; } }\n",styles$s={loader:"styles-module_loader__2AOKp",fadeInOut:"styles-module_fadeInOut__eKHQq"},_templateObject$B,_templateObject2$v;styleInject(css_248z$v);var LoaderDot=function(e){return m$1(_templateObject$B||(_templateObject$B=_taggedTemplateLiteral(["\n <svg\n width=","\n height=",'\n viewBox="0 0 '," ",'"\n fill=','\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="','"\n cy=',"\n r=","\n fill=","\n />\n </svg>\n"])),e.size,e.size,e.size,e.size,e.color,e.size/2,e.size/2,e.size/2,e.color)},ThreeDotLoader=function(e){var t=e.size,n=void 0===t?6:t,r=e.color,a=void 0===r?"#fff":r;return m$1(_templateObject2$v||(_templateObject2$v=_taggedTemplateLiteral(["\n <div class=",">\n <"," size="," color="," />\n <"," size="," color="," />\n <"," size="," color="," />\n </div>\n "])),styles$s.loader,LoaderDot,n,a,LoaderDot,n,a,LoaderDot,n,a)},css_248z$u=".styles-module_button__osBYJ {\n outline: none;\n cursor: pointer;\n -webkit-appearance: none;\n appearance: none;\n font-size: 12px;\n padding: 0px 15px;\n height: 30px; }\n .styles-module_button__osBYJ.styles-module_buttonPrimary__1u5p2 {\n border: 1px solid #5f4d86;\n background: #5f4d86;\n border-radius: 4px;\n font-size: 12px;\n color: #ffffff; }\n .styles-module_button__osBYJ.styles-module_buttonPrimary__1u5p2:not(.styles-module_disabled__CiT_f):hover {\n background-color: #473a64; }\n .styles-module_button__osBYJ.styles-module_buttonSecondary__2HV1m {\n border: 1px solid #5f4d86;\n background: transparent;\n text-align: center;\n font-size: 12px;\n color: #5f4d86;\n border-radius: 4px; }\n .styles-module_button__osBYJ.styles-module_buttonSecondary__2HV1m:not(.styles-module_disabled__CiT_f):hover {\n background: #5f4d86;\n color: white; }\n .styles-module_button__osBYJ.styles-module_buttonLink__39jcU {\n border: none;\n color: #5f4d86;\n font-weight: 500;\n font-size: 12px;\n background: transparent;\n padding: 0;\n margin: 0; }\n .styles-module_button__osBYJ.styles-module_buttonLink__39jcU:not(.styles-module_disabled__CiT_f):hover {\n color: #473a64; }\n .styles-module_button__osBYJ.styles-module_disabled__CiT_f {\n opacity: 0.5;\n cursor: not-allowed; }\n",styles$r={button:"styles-module_button__osBYJ",buttonPrimary:"styles-module_buttonPrimary__1u5p2",disabled:"styles-module_disabled__CiT_f",buttonSecondary:"styles-module_buttonSecondary__2HV1m",buttonLink:"styles-module_buttonLink__39jcU"},_templateObject$A,_templateObject2$u;styleInject(css_248z$u);var _excluded$1=["label","type","color","backgroundColor","disabled","tooltip","dismissOnClick","isLoading","position","onClick"],ButtonTypes;function ownKeys$5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$5(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.LINK="link"}(ButtonTypes||(ButtonTypes={}));var Button=function(e){var t,n=e.label,r=e.type,a=void 0===r?ButtonTypes.PRIMARY:r,o=e.color,i=void 0===o?null:o,l=e.backgroundColor,s=void 0===l?null:l,p=e.disabled,c=void 0!==p&&p,d=e.tooltip,u=e.dismissOnClick,_=void 0===u||u,m=e.isLoading,f=void 0!==m&&m,y=e.position,g=void 0===y?"bottom":y,h=e.onClick,v=void 0===h?void 0:h,b=_objectWithoutProperties(e,_excluded$1);return m$1(_templateObject$A||(_templateObject$A=_taggedTemplateLiteral(["\n <"," dismissOnClick="," position=",'>\n <button\n type="button"\n onclick=',"\n data-hint=","\n class=","\n style=","\n ","\n >\n ","\n </button>\n <//>\n "])),Hint,_,g,v,d||null,classnames(styles$r.button,(_defineProperty(t={},styles$r.buttonPrimary,a===ButtonTypes.PRIMARY),_defineProperty(t,styles$r.buttonSecondary,a===ButtonTypes.SECONDARY),_defineProperty(t,styles$r.buttonLink,a===ButtonTypes.LINK),_defineProperty(t,styles$r.disabled,c),t)),{backgroundColor:a===ButtonTypes.PRIMARY?s:null,borderColor:a===ButtonTypes.PRIMARY?s:i,color:i},_objectSpread$5({},b),f?m$1(_templateObject2$u||(_templateObject2$u=_taggedTemplateLiteral(["<"," />"])),ThreeDotLoader):n)},css_248z$t=".styles-module_errorPageWrapper__BMBHQ {\n font-family: monospace;\n border: 1px solid red;\n padding: 30px; }\n .styles-module_errorPageWrapper__BMBHQ .styles-module_errorTitle__1baLE {\n color: #b61717;\n font-weight: bold;\n font-size: 16px;\n line-height: 20px;\n margin-bottom: 8px; }\n .styles-module_errorPageWrapper__BMBHQ .styles-module_errorDescription__1dTc9 {\n font-size: 14px;\n margin-bottom: 18px; }\n .styles-module_errorPageWrapper__BMBHQ .styles-module_errorContainer__3WprN {\n overflow: hidden;\n background: #ffebeb;\n padding: 4px;\n margin-bottom: 20px; }\n .styles-module_errorPageWrapper__BMBHQ .styles-module_errorPayload__OjsC- {\n margin: 0;\n padding: 8px 12px; }\n",styles$q={errorPageWrapper:"styles-module_errorPageWrapper__BMBHQ",errorTitle:"styles-module_errorTitle__1baLE",errorDescription:"styles-module_errorDescription__1dTc9",errorContainer:"styles-module_errorContainer__3WprN",errorPayload:"styles-module_errorPayload__OjsC-"},_templateObject$z,_templateObject2$t,_templateObject3$n;styleInject(css_248z$t);var ErrorPage=function(e){var t=e.title,n=e.description,r=e.errorPayload,a=e.onDismiss,o=void 0===a?null:a;return m$1(_templateObject$z||(_templateObject$z=_taggedTemplateLiteral(['\n <div class="','">\n <div class=',">","</div>\n <div class=",">","</div>\n ","\n ","\n </div>\n "])),styles$q.errorPageWrapper,styles$q.errorTitle,t,styles$q.errorDescription,n,r&&m$1(_templateObject2$t||(_templateObject2$t=_taggedTemplateLiteral(["\n <div class=",">\n <pre class=",">","</pre>\n <pre class=",">","</pre>\n </div>\n "])),styles$q.errorContainer,styles$q.errorPayload,r.message,styles$q.errorPayload,r.stack),o&&m$1(_templateObject3$n||(_templateObject3$n=_taggedTemplateLiteral(["\n <div>\n <",' label="Dismiss" onClick='," />\n </div>\n "])),Button,o))};function useEventListener(e,t,n){var r=d();p((function(){var a=(null==n?void 0:n.current)||window;if(a&&a.addEventListener){r.current!==t&&(r.current=t);var o=function(e){null!=r&&r.current&&r.current(e)};return a.addEventListener(e,o),function(){a.removeEventListener(e,o)}}}),[e,n,t])}function useElementSize(e){var t=_slicedToArray(v({width:0,height:0}),2),n=t[0],r=t[1],a=T((function(){var t=null==e?void 0:e.current;t&&r({width:t.offsetWidth||0,height:t.offsetHeight||0})}),[e]);return p((function(){a()}),[]),useEventListener("resize",a),n}function useDebounce(e,t){var n=_slicedToArray(v(e),2),r=n[0],a=n[1];return p((function(){var n=setTimeout((function(){return a(e)}),t||500);return function(){clearTimeout(n)}}),[e,t]),r}var css_248z$s=".styles-module_navigation__2IuNI {\n margin-bottom: 45px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center; }\n\n.styles-module_collapse__G_01I {\n display: flex;\n width: 30px;\n height: 22px;\n padding-top: 2px;\n align-items: center;\n margin-right: 20px; }\n .styles-module_collapse__G_01I .styles-module_dots__3ItWV {\n cursor: pointer;\n height: 16px;\n padding-right: 10px; }\n .styles-module_collapse__G_01I .styles-module_popup__39sdx {\n position: absolute;\n display: none;\n padding: 0 10px;\n background: #ffffff;\n border: 1px solid #f3f3f3;\n box-shadow: 0px 2px 7px rgba(162, 162, 162, 0.25);\n border-radius: 4px;\n top: 28px;\n z-index: 100; }\n .styles-module_collapse__G_01I .styles-module_popup__39sdx.styles-module_show__L1e5K {\n display: block; }\n .styles-module_collapse__G_01I .styles-module_popup__39sdx .styles-module_stepItem__NPXF_ {\n padding: 10px 0px; }\n .styles-module_collapse__G_01I .styles-module_popup__39sdx .styles-module_stepItem__NPXF_:not(:last-child) {\n border-bottom: 1px solid #f3f3f3; }\n .styles-module_collapse__G_01I .styles-module_arrow__3C8To svg {\n opacity: 0.5; }\n\n.styles-module_navItem__1kxtL {\n cursor: pointer;\n color: #1f2937; }\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq {\n display: flex;\n align-items: center;\n padding-right: 0.25rem; }\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq p {\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 400;\n color: #333333; }\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq .styles-module_imgContainer__wbjM4 {\n position: relative;\n margin-right: 0.5rem;\n height: 15px;\n width: 15px;\n overflow: hidden;\n border-radius: 9999px; }\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq .styles-module_imgContainer__wbjM4 img,\n .styles-module_navItem__1kxtL .styles-module_navItemContent__28oLq .styles-module_imgContainer__wbjM4 svg {\n position: absolute;\n top: 0px;\n left: 0px;\n height: 100%;\n width: 100%;\n object-fit: cover; }\n .styles-module_navItem__1kxtL .styles-module_arrow__3C8To {\n margin-top: 2px;\n margin-left: 0.75rem;\n margin-right: 0.5rem; }\n .styles-module_navItem__1kxtL.styles-module_active__28cMj {\n opacity: 1; }\n .styles-module_navItem__1kxtL.styles-module_active__28cMj p {\n font-weight: 500; }\n .styles-module_navItem__1kxtL.styles-module_disabled__1Ltqi {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n opacity: 0.5; }\n .styles-module_navItem__1kxtL.styles-module_disabled__1Ltqi p {\n font-weight: 400; }\n",styles$p={navigation:"styles-module_navigation__2IuNI",collapse:"styles-module_collapse__G_01I",dots:"styles-module_dots__3ItWV",popup:"styles-module_popup__39sdx",show:"styles-module_show__L1e5K",stepItem:"styles-module_stepItem__NPXF_",arrow:"styles-module_arrow__3C8To",navItem:"styles-module_navItem__1kxtL",navItemContent:"styles-module_navItemContent__28oLq",imgContainer:"styles-module_imgContainer__wbjM4",active:"styles-module_active__28cMj",disabled:"styles-module_disabled__1Ltqi"},_templateObject$y,_templateObject2$s,_templateObject3$m,_templateObject4$g,_templateObject5$e;function _createSuper$f(e){var t=_isNativeReflectConstruct$f();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$s);var TickMark$1=m$1(_templateObject$y||(_templateObject$y=_taggedTemplateLiteral([' <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n>\n <rect opacity="0.7" width="15" height="15" rx="7.5" fill="#2ECC71" />\n <path\n d="M9.23107 6.34619L6.96066 8.94234L5.76953 7.58033"\n stroke="white"\n stroke-width="1.2"\n stroke-linecap="round"\n />\n</svg>']))),FinalTickMark$1=m$1(_templateObject2$s||(_templateObject2$s=_taggedTemplateLiteral(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="7.5"\n cy="7.5"\n r="6.75"\n fill="white"\n stroke="#2ECC71"\n stroke-width="1.5"\n />\n <path\n d="M10.3333 5.5L6.83522 9.5L5 7.40148"\n stroke="#2ECC71"\n stroke-width="1.5"\n stroke-linecap="round"\n />\n </svg>\n']))),NavItem$1=function(e){_inherits(n,d$1);var t=_createSuper$f(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"render",value:function(){var e=this.props,t=e.logoUrl,n=e.isActive,r=void 0!==n&&n,a=e.isCompleted,o=void 0!==a&&a,i=e.isDisabled,l=void 0!==i&&i,s=e.isLastStep,p=void 0!==s&&s,c=e.onClick,d=void 0===c?function(){return null}:c,u=e.showArrow,_=void 0===u||u;return m$1(_templateObject3$m||(_templateObject3$m=_taggedTemplateLiteral(["\n <div\n class=","\n onclick=",'\n tabindex="-1"\n role="button"\n >\n <div class=',">\n <div class=",">\n ","\n ","\n </div>\n <p>","</p>\n ","\n </div>\n </div>\n "])),"".concat(styles$p.navItem," ").concat(l?styles$p.disabled:""," ").concat(r?styles$p.active:""),d,styles$p.navItemContent,styles$p.imgContainer,!o||r?m$1(_templateObject4$g||(_templateObject4$g=_taggedTemplateLiteral(["<img src="," />"])),t):TickMark$1,p&&FinalTickMark$1,this.props.label,!p&&_&&m$1(_templateObject5$e||(_templateObject5$e=_taggedTemplateLiteral(["\n <div class=",'>\n <svg\n width="6"\n height="11"\n viewBox="0 0 6 11"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M0.917969 1.33366L5.08464 5.50033L0.917969 9.66699"\n stroke="#999999"\n stroke-linecap="round"\n />\n </svg>\n </div>\n '])),styles$p.arrow))}}]),n}(),_templateObject$x,_templateObject2$r;function useOnClickOutside(e,t){p((function(){var n=function(n){n.target instanceof HTMLElement&&(!e.current||e.current.contains(n.target))||t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),function(){document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[e,t])}var CollapsedSteps=function(e){var t=e.steps,n=e.currentStepIndex,r=e.isPreviewMode,a=e.changeStep,o=d(),i=d(),l=_slicedToArray(v(!1),2),s=l[0],p=l[1];return useOnClickOutside(o,(function(){return s?p(!1):null})),m$1(_templateObject$x||(_templateObject$x=_taggedTemplateLiteral(["\n <div class=",">\n <div\n class=","\n ref=","\n onclick=",'\n >\n <svg\n width="16"\n height="17"\n viewBox="0 0 16 17"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M3.60039 9.83213C4.26313 9.83213 4.80039 9.29487 4.80039 8.63213C4.80039 7.96939 4.26313 7.43213 3.60039 7.43213C2.93765 7.43213 2.40039 7.96939 2.40039 8.63213C2.40039 9.29487 2.93765 9.83213 3.60039 9.83213Z"\n fill="#333333"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M7.60039 9.83213C8.26313 9.83213 8.80039 9.29487 8.80039 8.63213C8.80039 7.96939 8.26313 7.43213 7.60039 7.43213C6.93765 7.43213 6.40039 7.96939 6.40039 8.63213C6.40039 9.29487 6.93765 9.83213 7.60039 9.83213Z"\n fill="#333333"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M11.6004 9.83213C12.2631 9.83213 12.8004 9.29487 12.8004 8.63213C12.8004 7.96939 12.2631 7.43213 11.6004 7.43213C10.9376 7.43213 10.4004 7.96939 10.4004 8.63213C10.4004 9.29487 10.9376 9.83213 11.6004 9.83213Z"\n fill="#333333"\n />\n </svg>\n </div>\n <div\n ref=','\n class="'," ",'"\n >\n ',"\n </div>\n <div class=",'>\n <svg\n width="6"\n height="11"\n viewBox="0 0 6 11"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M0.917969 1.33366L5.08464 5.50033L0.917969 9.66699"\n stroke="#999999"\n stroke-linecap="round"\n />\n </svg>\n </div>\n </div>\n '])),styles$p.collapse,styles$p.dots,i,(function(){return p(!0)}),o,styles$p.popup,s?styles$p.show:"",t.map((function(e){return m$1(_templateObject2$r||(_templateObject2$r=_taggedTemplateLiteral(["<div class=",">\n <","\n label=","\n logoUrl=","\n isCompleted=","\n isActive=","\n isDisabled=","\n isLastStep=","\n showArrow=","\n onClick=","\n />\n </div>"])),styles$p.stepItem,NavItem$1,"CONFIRMATION"!==e.type?e.title:"Confirmation","CONFIRMATION"!==e.type&&e.iconUrl,!r&&e.isCompleted,"CONFIRMATION"!==e.type&&n===e.itemIndex,r&&Number(n)!==e.itemIndex||Number(n)<e.itemIndex,!1,!1,(function(){p(!1),a(e.itemIndex)}))})),styles$p.arrow)},_templateObject$w,_templateObject2$q,_templateObject3$l,_templateObject4$f,_templateObject5$d;function ownKeys$4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$4(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var StepNavigation$2=function(e){var t=d(),n=e.gotoStep,r=e.stepState,a=r.stepIndex,o=r.steps,i=r.currentStep,l=r.allStepsCompleted,s=w(AppContext),c=useElementSize(t).width,u=useDebounce(c,150),_=_slicedToArray(v([]),2),m=_[0],f=_[1];p((function(){var e=0;e=0===u?c:u;var n=[];if(t.current){var r=-1;e/220<=o.length?o.length<=2?n.push({type:"VISIBLE",steps:o.map((function(e){return r+=1,_objectSpread$4(_objectSpread$4({},e),{},{itemIndex:r})}))}):o.length>2&&(r+=1,n.push({type:"VISIBLE",steps:[_objectSpread$4(_objectSpread$4({},o[0]),{},{itemIndex:r})]}),0!==a&&a!==o.length?(a>1&&n.push({type:"COLLAPSED",steps:o.slice(1,a).map((function(e){return r+=1,_objectSpread$4(_objectSpread$4({},e),{},{itemIndex:r})}))}),n.push({type:"VISIBLE",steps:[_objectSpread$4(_objectSpread$4({},o[a]),{},{itemIndex:a})]}),r+=1,o.length-a>1&&n.push({type:"COLLAPSED",steps:o.slice(a+1,o.length).map((function(e){return r+=1,_objectSpread$4(_objectSpread$4({},e),{},{itemIndex:r})}))})):n.push({type:"COLLAPSED",steps:o.slice(1,o.length).map((function(e){return r+=1,_objectSpread$4(_objectSpread$4({},e),{},{itemIndex:r})}))})):n=[{type:"VISIBLE",steps:o.map((function(e,t){return _objectSpread$4(_objectSpread$4({},e),{},{itemIndex:t})}))}]}f(n)}),[o,c,u,a]);var y=function(e){n(e)};return m$1(_templateObject$w||(_templateObject$w=_taggedTemplateLiteral(["\n <div class="," ref=",">\n ","\n ","\n </div>\n "])),styles$p.navigation,t,m.map((function(e){return"VISIBLE"===e.type?e.steps.map((function(e){return m$1(_templateObject2$q||(_templateObject2$q=_taggedTemplateLiteral(["\n <div\n class=","\n style=","\n >\n <","\n label=","\n logoUrl=","\n isCompleted=","\n isActive=","\n isDisabled=","\n isLastStep=","\n onClick=","\n />\n </div>\n "])),styles$p.stepItem,{maxWidth:220},NavItem$1,"CONFIRMATION"!==e.type?e.title:"Confirmation","CONFIRMATION"!==e.type&&e.iconUrl,!(null!=s&&s.isPreviewMode)&&e.isCompleted,"CONFIRMATION"!==(null==i?void 0:i.type)&&"CONFIRMATION"!==e.type&&a===e.itemIndex,!l&&((null==s?void 0:s.isPreviewMode)&&Number(a)!==e.itemIndex||Number(a)<e.itemIndex),e.itemIndex===o.length,(function(){return y(e.itemIndex)}))})):"COLLAPSED"===e.type?m$1(_templateObject3$l||(_templateObject3$l=_taggedTemplateLiteral(["\n <","\n isPreviewMode=","\n currentStepIndex=","\n changeStep=","\n steps=","\n />\n "])),CollapsedSteps,null==s?void 0:s.isPreviewMode,a,y,e.steps):m$1(_templateObject4$f||(_templateObject4$f=_taggedTemplateLiteral(["<></>"])))})),m.length>0&&m$1(_templateObject5$d||(_templateObject5$d=_taggedTemplateLiteral(["\n <",'\n label="Confirmation"\n logoUrl=""\n isCompleted=',"\n isActive=","\n isDisabled=","\n isLastStep=","\n onClick=","\n />\n "])),NavItem$1,!0,void 0!==i&&a===o.length,!l&&void 0!==i&&a!==o.length,!0,(function(){var e;return y(null!==(e=o.length)&&void 0!==e?e:0)})))},StepNavigation$3=preact.connect("stepState",actionFunctions)(StepNavigation$2),css_248z$r=".styles-module_radioGroup__1aPpR fieldset {\n border: none;\n padding: 0; }\n\n.styles-module_radio__1wJfU {\n position: relative;\n display: flex;\n align-items: center;\n margin: 10px 0; }\n .styles-module_radio__1wJfU .styles-module_button__3PLW1 {\n position: absolute;\n width: 15px;\n height: 15px;\n left: 0;\n display: inline-block;\n border-radius: 9999px;\n background: transparent; }\n .styles-module_radio__1wJfU .styles-module_button__3PLW1 svg {\n width: 100%;\n height: 100%; }\n .styles-module_radio__1wJfU input[type='radio'] {\n opacity: 0;\n margin: 0; }\n .styles-module_radio__1wJfU label {\n display: flex;\n margin-left: 15px;\n align-items: center;\n cursor: pointer; }\n .styles-module_radio__1wJfU .styles-module_text__Jq7I0 {\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n margin: 2px 0;\n color: #333333; }\n .styles-module_radio__1wJfU .styles-module_description__2UsHV {\n font-size: 12px;\n line-height: 15px;\n color: #999999; }\n",styles$o={radioGroup:"styles-module_radioGroup__1aPpR",radio:"styles-module_radio__1wJfU",button:"styles-module_button__3PLW1",text:"styles-module_text__Jq7I0",description:"styles-module_description__2UsHV"},_templateObject$v,_templateObject2$p,_templateObject3$k,_templateObject4$e;styleInject(css_248z$r);var Radio=function(e){var t=e.label,n=e.name,r=e.description,a=void 0===r?null:r,o=e.value,i=e.isChecked,l=void 0!==i&&i,s=e.handleChange,p=void 0===s?function(){return null}:s;return m$1(_templateObject$v||(_templateObject$v=_taggedTemplateLiteral(["\n <div class=",">\n <input\n id=",'\n type="radio"\n name=',"\n value=","\n checked=","\n onclick=","\n />\n <div>\n <label for=",">\n <div class=",">\n ","\n </div>\n <div>\n <div class=",">","</div>\n ","\n </div>\n </label>\n </div>\n </div>\n "])),styles$o.radio,o,n,o,l,(function(e){if(e.currentTarget instanceof HTMLInputElement){var t=e.currentTarget.value;p(t)}}),o,styles$o.button,m$1(l?_templateObject2$p||(_templateObject2$p=_taggedTemplateLiteral(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5Z"\n fill="white"\n stroke="#5F4D86"\n stroke-width="2"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M7.5 11C9.433 11 11 9.433 11 7.5C11 5.567 9.433 4 7.5 4C5.567 4 4 5.567 4 7.5C4 9.433 5.567 11 7.5 11Z"\n fill="#5F4D86"\n />\n </svg>\n '])):_templateObject3$k||(_templateObject3$k=_taggedTemplateLiteral(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5Z"\n fill="white"\n stroke="#E2E0DB"\n stroke-width="2"\n />\n </svg>\n ']))),styles$o.text,t,a&&m$1(_templateObject4$e||(_templateObject4$e=_taggedTemplateLiteral(["<div class=",">","</div>"])),styles$o.description,a))},css_248z$q=".styles-module_errorMessage__2b8A_ {\n margin-top: 4px;\n font-size: 12px;\n color: #f05c42; }\n",styles$n={errorMessage:"styles-module_errorMessage__2b8A_"},_templateObject$u;styleInject(css_248z$q);var ErrorMessage=function(e){var t=e.children;return m$1(_templateObject$u||(_templateObject$u=_taggedTemplateLiteral([" <div class=",">","</div> "])),styles$n.errorMessage,t)},css_248z$p=".styles-module_label__PbFlo label > div:first-child {\n font-style: normal;\n font-weight: 500;\n font-size: 14px;\n line-height: 17px;\n color: #333333;\n margin-bottom: 5px; }\n\n.styles-module_label__PbFlo label > div:nth-child(2) {\n font-size: 14px;\n line-height: 17px;\n letter-spacing: -0.2px;\n color: #8c8c8c; }\n\n.styles-module_label__PbFlo .styles-module_required__1XFqi {\n color: red;\n font-size: 16px;\n margin-left: 2px; }\n",styles$m={label:"styles-module_label__PbFlo",required:"styles-module_required__1XFqi"},_templateObject$t,_templateObject2$o,_templateObject3$j;styleInject(css_248z$p);var Label=function(e){var t=e.title,n=e.description,r=e.isRequired,a=void 0!==r&&r;return m$1(_templateObject$t||(_templateObject$t=_taggedTemplateLiteral(["\n <div class=",">\n <label>\n <div>\n ","\n ","\n </div>\n ","\n </label>\n </div>\n "])),styles$m.label,t,a&&m$1(_templateObject2$o||(_templateObject2$o=_taggedTemplateLiteral(["<span class=",">*</span>"])),styles$m.required),n&&m$1(_templateObject3$j||(_templateObject3$j=_taggedTemplateLiteral(["<div>","</div>"])),n))},isBrowser=function(){return!["undefined"==typeof window?"undefined":_typeof(window),"undefined"==typeof document?"undefined":_typeof(document)].includes("undefined")};function openPopupWindow(e,t,n,r,a){if(n.top){var o=n.top.outerHeight/2+n.top.screenY-a/2,i=n.top.outerWidth/2+n.top.screenX-r/2;return n.open(e,t,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=".concat(r,", height=").concat(a,", top=").concat(o,", left=").concat(i))}return null}function isAuthMessage(e){return void 0!==e}var css_248z$o=".styles-module_authSelectorWrap__34g8J .styles-module_label__19jW8 {\n font-weight: 800;\n font-size: 14px;\n color: #333333;\n line-height: 20px;\n margin-bottom: 5px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_label__19jW8 span {\n color: #ff4d34;\n margin-left: 2px;\n font-size: 16px; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_rows__1gpAK {\n margin-top: 10px;\n margin-bottom: 20px; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_error__aL4zj {\n color: #f05c42; }\n .styles-module_authSelectorWrap__34g8J .styles-module_error__aL4zj button {\n color: #f05c42;\n border-color: #f05c42; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_errorMessage__3YjSh {\n margin-top: 4px;\n font-size: 12px;\n line-height: 15px;\n letter-spacing: -0.197647px;\n color: #f05c42; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_description__2c5sj {\n font-size: 14px;\n line-height: 20px;\n color: #8c8c8c;\n margin-bottom: 10px; }\n\n.styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t {\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: #333;\n font-size: 14px;\n min-width: 380px;\n padding-right: 8px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr {\n display: flex;\n align-items: center;\n font-size: 12px;\n margin-left: 20px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_deleteIcon__1mAJb {\n padding-left: 8px;\n padding-right: 8px;\n display: flex;\n align-items: center;\n cursor: pointer; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_deleteIcon__1mAJb svg {\n cursor: pointer;\n visibility: hidden;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa {\n position: relative; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa div {\n display: flex;\n align-items: center; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa svg {\n margin-left: 8px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusRed__1FG13,\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusOrange__1FNhi,\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusGreen__1OD_4 {\n width: 5px;\n height: 5px;\n border-radius: 9999px;\n margin: 0 8px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusRed__1FG13 {\n background: #e26154; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusOrange__1FNhi {\n background: #fcc700; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_statusGreen__1OD_4 {\n background: #2ecc71; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa span {\n margin-left: 10px; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t .styles-module_statusWrap__3amIr .styles-module_status__OwFQa .styles-module_resend__To8qG {\n cursor: pointer; }\n .styles-module_authSelectorWrap__34g8J .styles-module_checkboxRow__3Q67t:hover .styles-module_statusWrap__3amIr svg {\n visibility: visible;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n user-select: auto; }\n",styles$l={authSelectorWrap:"styles-module_authSelectorWrap__34g8J",label:"styles-module_label__19jW8",rows:"styles-module_rows__1gpAK",error:"styles-module_error__aL4zj",errorMessage:"styles-module_errorMessage__3YjSh",description:"styles-module_description__2c5sj",checkboxRow:"styles-module_checkboxRow__3Q67t",statusWrap:"styles-module_statusWrap__3amIr",deleteIcon:"styles-module_deleteIcon__1mAJb",status:"styles-module_status__OwFQa",statusRed:"styles-module_statusRed__1FG13",statusOrange:"styles-module_statusOrange__1FNhi",statusGreen:"styles-module_statusGreen__1OD_4",resend:"styles-module_resend__To8qG"},_templateObject$s,_templateObject2$n,_templateObject3$i,_templateObject4$d,_templateObject5$c,_templateObject6$7,_templateObject7$6,_templateObject8$4,_templateObject9$4,_templateObject10$4,_templateObject11$4;function _createSuper$e(e){var t=_isNativeReflectConstruct$e();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$o);var Resend=function(){return m$1(_templateObject$s||(_templateObject$s=_taggedTemplateLiteral(["\n <svg\n class=",'\n width="13"\n height="15"\n viewBox="0 0 13 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.8403 5.34L10.1453 6.345C10.5053 6.96 10.7003 7.68 10.7003 8.445C10.7003 10.77 8.81031 12.645 6.50031 12.645C4.19031 12.645 2.30031 10.755 2.30031 8.445C2.30031 6.135 4.19031 4.245 6.50031 4.245V6.15L11.1053 3.27L6.50031 0.375V2.28C3.09531 2.28 0.320312 5.055 0.320312 8.46C0.320313 11.85 3.09531 14.625 6.50031 14.625C9.90531 14.625 12.6803 11.85 12.6803 8.445C12.6803 7.32 12.3653 6.255 11.8403 5.34Z"\n fill="#8D8D8D"\n />\n </svg>\n'])),styles$l.resend)},AuthorizationRow=function(e){var t=e.label,n=e.name,r=e.value,a=e.isChecked,o=e.status,i=void 0===o?"IDLE":o,l=e.isDeleting,s=void 0!==l&&l,p=e.handleChange,c=e.handleReverify,d=e.handleDelete,u=void 0===d?function(){return null}:d,_=e.error;return m$1(_templateObject2$n||(_templateObject2$n=_taggedTemplateLiteral(["\n <div class=",">\n <","\n label=","\n name=","\n value=","\n isChecked=","\n handleChange=","\n />\n <div class=",">\n <div class=",">\n <div>\n ","\n </div>\n <div>\n ","\n </div>\n <div>\n ","\n </div>\n ","\n ","\n </div>\n <div class="," onclick=",">\n ","\n </div>\n </div>\n </div>\n "])),styles$l.checkboxRow,Radio,t,n,r,a,p,styles$l.statusWrap,styles$l.status,"VERIFYING"===i&&!s&&m$1(_templateObject3$i||(_templateObject3$i=_taggedTemplateLiteral(["<div class="," />\n Verifying <"," /> "])),styles$l.statusOrange,Loader),"CONNECTED"===i&&!_&&!s&&m$1(_templateObject4$d||(_templateObject4$d=_taggedTemplateLiteral(["<div class="," />\n Connected"])),styles$l.statusGreen),"ERROR"===i&&!s&&m$1(_templateObject5$c||(_templateObject5$c=_taggedTemplateLiteral(["<div class="," />\n Failed\n <div onclick=","><"," /></div>"])),styles$l.statusRed,c,Resend),s&&m$1(_templateObject6$7||(_templateObject6$7=_taggedTemplateLiteral(["<"," />"])),Loader),_&&!s&&!("VERIFYING"===i)&&m$1(_templateObject7$6||(_templateObject7$6=_taggedTemplateLiteral(["<div class=",">","</div>"])),styles$l.error,_),styles$l.deleteIcon,u,!("VERIFYING"===i||s)&&m$1(_templateObject8$4||(_templateObject8$4=_taggedTemplateLiteral(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M1.5 4.1999H13.65" stroke="#F05C42" />\n <path\n d="M11.6254 5.5498V6.2248L10.9504 13.6498H4.20039L3.52539 6.2248V5.5498"\n stroke="#F05C42"\n stroke-linejoin="round"\n />\n <path\n d="M5.55078 3.525V2.175C5.55078 1.80221 5.85299 1.5 6.22578 1.5H8.92578C9.29857 1.5 9.60078 1.80221 9.60078 2.175V3.525"\n stroke="#F05C42"\n />\n </svg>\n ']))))},AuthSelector=function(e){_inherits(n,d$1);var t=_createSuper$e(n);function n(e){var r;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(r=t.call(this,e)),"verifyAuth",(function(e,t){var n=r.props.stepId,a=r.props.stepMapping[n].authorizations[e];a&&(a.isVerified?r.props.onAuthSelected(a.authorizationId,!0,!!t):(r.props.toggleVerifyAuthorizationFlag({stepId:n,authId:a.authorizationId,isVerifying:!0}),r.setState({isLoading:!0}),r.props.apiHandler.verifyOAuth(a.authorizationId).then((function(e){e?r.props.onAuthSelected(a.authorizationId,!0,!!t):r.props.onAuthSelected(a.authorizationId,!1,!!t)})).catch((function(e){return console.error(e)})).finally((function(){r.props.toggleVerifyAuthorizationFlag({stepId:n,authId:a.authorizationId,isVerifying:!1}),r.setState({isLoading:!1})}))))})),_defineProperty(_assertThisInitialized(r),"deleteAuth",(function(e){var t=r.props.stepId,n=r.props.stepMapping[t].authorizations[e];r.props.toggleDeleteAuthorizationFlag({stepId:t,authId:n.authorizationId,isDeleting:!0,error:""}),r.props.apiHandler.deleteAuth(n.authorizationId).then((function(e){200===(null==e?void 0:e.status)?r.props.removeAuthorization({stepId:t,authId:n.authorizationId}):405===(null==e?void 0:e.status)?r.props.toggleDeleteAuthorizationFlag({stepId:t,authId:n.authorizationId,isDeleting:!1,error:"".concat(e.data)}):r.props.toggleDeleteAuthorizationFlag({stepId:t,authId:n.authorizationId,isDeleting:!1,error:"An unexpected error occurred"})})).catch((function(e){console.error(e)}))})),_defineProperty(_assertThisInitialized(r),"onAuthResponseReceived",(function(e){isAuthMessage(e)&&e.data.activity_name&&(console.info(e.data),r.props.stepId&&(e.data.already_exists?r.props.setStepAuthId({stepId:r.props.stepId,authId:Number(e.data.authorization_id)}):r.props.addAuthorization({stepId:r.props.stepId,authData:{authorizationId:e.data.authorization_id,userIdentity:e.data.user_identity,disableLink:"",authType:"",isVerified:!1,didFetchStatus:!1,isVerifying:!1,isDeleting:!1,error:""}})))})),_defineProperty(_assertThisInitialized(r),"getAuthStatus",(function(e){if(!e)return null;var t="IDLE";return e.isVerified&&e.didFetchStatus&&(t="CONNECTED"),!e.isVerified&&e.didFetchStatus&&(t="ERROR"),e.isVerifying&&(t="VERIFYING"),t})),_defineProperty(_assertThisInitialized(r),"getError",(function(){var e=r.props.stepId,t=r.props.stepMapping[e];return t.authorizations?"Please select a valid ".concat(t.step.activity.app.name," account"):"Please add a valid ".concat(t.step.activity.app.name," account")})),_defineProperty(_assertThisInitialized(r),"openAuthWindow",(function(){var e=r.props,t=e.stepMapping[e.stepId].step;t&&openPopupWindow(r.context.apiHandler.getAuthUrl(t.authorization_type.id),"Auth Window",window,800,600)})),r.state={isLoading:!1,fetched:!1},r}return _createClass(n,[{key:"componentDidMount",value:function(){isBrowser()&&window.addEventListener("message",this.onAuthResponseReceived);var e=this.props,t=e.stepId,n=e.stepMapping,r=n[t].selectedAuthId,a=n[t].authorizations.findIndex((function(e){return e.authorizationId===r}));n[t].selectedAuthId&&"IDLE"===this.getAuthStatus(n[t].authorizations[a])&&this.verifyAuth(a,!0)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.stepId,r=t.stepMapping,a=r[n],o=a.selectedAuthId,i=r[n].authorizations.findIndex((function(e){return e.authorizationId===o}));o!==e.stepMapping[n].selectedAuthId&&i&&this.verifyAuth(i),a.authorizations.length===e.stepMapping[n].authorizations.length+1&&this.verifyAuth(a.authorizations.length-1)}},{key:"componentWillUnmount",value:function(){isBrowser()&&window.removeEventListener("message",this.onAuthResponseReceived)}},{key:"render",value:function(){var e=this,t=this.props,n=t.stepId,r=t.showErrors,a=void 0!==r&&r,o=this.props.stepMapping[n],i=o.authorizations;return m$1(_templateObject9$4||(_templateObject9$4=_taggedTemplateLiteral(["\n <div class=",">\n <",'\n title="Connect account"\n description=',"\n isRequired=","\n />\n <div class=",">\n ","\n </div>\n <div class=",">\n <","\n onClick=","\n label=","\n type=","\n disabled=","\n >\n <//>\n </div>\n ","\n </div>\n "])),styles$l.authSelectorWrap,Label,"Select your ".concat(o.step.activity.app.name," account"),!0,styles$l.rows,i.map((function(t,n){return m$1(_templateObject10$4||(_templateObject10$4=_taggedTemplateLiteral(["<","\n label=","\n value=","\n status=","\n isChecked=","\n isDeleting=","\n error=","\n handleChange=","\n handleReverify=","\n handleDelete=","\n />"])),AuthorizationRow,t.userIdentity,t.authorizationId,e.getAuthStatus(t),t.authorizationId===o.selectedAuthId,t.isDeleting,t.error,(function(){return e.verifyAuth(n)}),(function(){return e.verifyAuth(n)}),(function(){return e.deleteAuth(n)}))})),a?"".concat(styles$l.error):"",Button,(function(){return e.openAuthWindow()}),"Add ".concat(o.step.activity.app.name," account"),ButtonTypes.SECONDARY,this.state.isLoading,a&&m$1(_templateObject11$4||(_templateObject11$4=_taggedTemplateLiteral(["<",">","<//>"])),ErrorMessage,this.getError()))}}]),n}();_defineProperty(AuthSelector,"contextType",AppContext);var AuthSelector$1=preact.connect(["stepMapping"],actionFunctions)(AuthSelector),purify=createCommonjsModule((function(e,t){e.exports=function(){function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var t=Object.hasOwnProperty,n=Object.setPrototypeOf,r=Object.isFrozen,a=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,i=Object.freeze,l=Object.seal,s=Object.create,p="undefined"!=typeof Reflect&&Reflect,c=p.apply,d=p.construct;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),l||(l=function(e){return e}),d||(d=function(t,n){return new(Function.prototype.bind.apply(t,[null].concat(e(n))))});var u=w(Array.prototype.forEach),_=w(Array.prototype.pop),m=w(Array.prototype.push),f=w(String.prototype.toLowerCase),y=w(String.prototype.match),g=w(String.prototype.replace),h=w(String.prototype.indexOf),v=w(String.prototype.trim),b=w(RegExp.prototype.test),$=j(TypeError);function w(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return c(e,t,r)}}function j(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return d(e,n)}}function x(e,t){n&&n(e,null);for(var a=t.length;a--;){var o=t[a];if("string"==typeof o){var i=f(o);i!==o&&(r(t)||(t[a]=i),o=i)}e[o]=!0}return e}function O(e){var n=s(null),r=void 0;for(r in e)c(t,e,[r])&&(n[r]=e[r]);return n}function S(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=a(e)}function r(e){return console.warn("fallback value for",e),null}return r}var I=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),P=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=i(["#text"]),R=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),A=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),D=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),N=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),E=l(/\{\{[\s\S]*|[\s\S]*\}\}/gm),z=l(/<%[\s\S]*|[\s\S]*%>/gm),F=l(/^data-[\-\w.\u00B7-\uFFFF]/),B=l(/^aria-[\-\w]+$/),H=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),W=l(/^(?:\w+script|data):/i),V=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U="function"==typeof Symbol&&"symbol"===_typeof(Symbol.iterator)?function(e){return _typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof(e)};function G(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var q=function(){return"undefined"==typeof window?null:window},K=function(e,t){if("object"!==(void 0===e?"undefined":U(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q(),t=function(e){return J(e)};if(t.version="2.3.1",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,a=e.DocumentFragment,o=e.HTMLTemplateElement,l=e.Node,s=e.Element,p=e.NodeFilter,c=e.NamedNodeMap,d=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,w=e.Text,j=e.Comment,Z=e.DOMParser,Y=e.trustedTypes,Q=s.prototype,X=S(Q,"cloneNode"),ee=S(Q,"nextSibling"),te=S(Q,"childNodes"),ne=S(Q,"parentNode");if("function"==typeof o){var re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}var ae=K(Y,n),oe=ae&&Ne?ae.createHTML(""):"",ie=r,le=ie.implementation,se=ie.createNodeIterator,pe=ie.createDocumentFragment,ce=ie.getElementsByTagName,de=n.importNode,ue={};try{ue=O(r).documentMode?r.documentMode:{}}catch(e){}var _e={};t.isSupported="function"==typeof ne&&le&&void 0!==le.createHTMLDocument&&9!==ue;var me=E,fe=z,ye=F,ge=B,he=W,ve=V,be=H,$e=null,we=x({},[].concat(G(I),G(C),G(T),G(L),G(M))),je=null,xe=x({},[].concat(G(R),G(A),G(D),G(N))),Oe=null,Se=null,Ie=!0,Ce=!0,Te=!1,ke=!1,Le=!1,Pe=!1,Me=!1,Re=!1,Ae=!1,De=!0,Ne=!1,Ee=!0,ze=!0,Fe=!1,Be={},He=null,We=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,Ue=x({},["audio","video","img","source","image","track"]),Ge=null,qe=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml",Ye=Ze,Qe=!1,Xe=null,et=r.createElement("form"),tt=function(e){Xe&&Xe===e||(e&&"object"===(void 0===e?"undefined":U(e))||(e={}),e=O(e),$e="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS):we,je="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR):xe,Ge="ADD_URI_SAFE_ATTR"in e?x(O(qe),e.ADD_URI_SAFE_ATTR):qe,Ve="ADD_DATA_URI_TAGS"in e?x(O(Ue),e.ADD_DATA_URI_TAGS):Ue,He="FORBID_CONTENTS"in e?x({},e.FORBID_CONTENTS):We,Oe="FORBID_TAGS"in e?x({},e.FORBID_TAGS):{},Se="FORBID_ATTR"in e?x({},e.FORBID_ATTR):{},Be="USE_PROFILES"in e&&e.USE_PROFILES,Ie=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=e.SAFE_FOR_TEMPLATES||!1,Le=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Ae=e.RETURN_DOM_FRAGMENT||!1,De=!1!==e.RETURN_DOM_IMPORT,Ne=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Ee=!1!==e.SANITIZE_DOM,ze=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Ye=e.NAMESPACE||Ze,ke&&(Ce=!1),Ae&&(Re=!0),Be&&($e=x({},[].concat(G(M))),je=[],!0===Be.html&&(x($e,I),x(je,R)),!0===Be.svg&&(x($e,C),x(je,A),x(je,N)),!0===Be.svgFilters&&(x($e,T),x(je,A),x(je,N)),!0===Be.mathMl&&(x($e,L),x(je,D),x(je,N))),e.ADD_TAGS&&($e===we&&($e=O($e)),x($e,e.ADD_TAGS)),e.ADD_ATTR&&(je===xe&&(je=O(je)),x(je,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&x(Ge,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(He===We&&(He=O(He)),x(He,e.FORBID_CONTENTS)),ze&&($e["#text"]=!0),Le&&x($e,["html","head","body"]),$e.table&&(x($e,["tbody"]),delete Oe.tbody),i&&i(e),Xe=e)},nt=x({},["mi","mo","mn","ms","mtext"]),rt=x({},["foreignobject","desc","title","annotation-xml"]),at=x({},C);x(at,T),x(at,k);var ot=x({},L);x(ot,P);var it=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});var n=f(e.tagName),r=f(t.tagName);if(e.namespaceURI===Je)return t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(at[n]);if(e.namespaceURI===Ke)return t.namespaceURI===Ze?"math"===n:t.namespaceURI===Je?"math"===n&&rt[r]:Boolean(ot[n]);if(e.namespaceURI===Ze){if(t.namespaceURI===Je&&!rt[r])return!1;if(t.namespaceURI===Ke&&!nt[r])return!1;var a=x({},["title","style","font","a","script"]);return!ot[n]&&(a[n]||!at[n])}return!1},lt=function(e){m(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},st=function(e,n){try{m(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){m(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!je[e])if(Re||Ae)try{lt(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},pt=function(e){var t=void 0,n=void 0;if(Me)e="<remove></remove>"+e;else{var a=y(e,/^[\r\n\t ]+/);n=a&&a[0]}var o=ae?ae.createHTML(e):e;if(Ye===Ze)try{t=(new Z).parseFromString(o,"text/html")}catch(e){}if(!t||!t.documentElement){t=le.createDocument(Ye,"template",null);try{t.documentElement.innerHTML=Qe?"":o}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ye===Ze?ce.call(t,Le?"html":"body")[0]:Le?t.documentElement:i},ct=function(e){return se.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT,null,!1)},dt=function(e){return!(e instanceof w||e instanceof j||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof d&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ut=function(e){return"object"===(void 0===l?"undefined":U(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":U(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},_t=function(e,n,r){_e[e]&&u(_e[e],(function(e){e.call(t,n,r,Xe)}))},mt=function(e){var n=void 0;if(_t("beforeSanitizeElements",e,null),dt(e))return lt(e),!0;if(y(e.nodeName,/[\u0080-\uFFFF]/))return lt(e),!0;var r=f(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:r,allowedTags:$e}),!ut(e.firstElementChild)&&(!ut(e.content)||!ut(e.content.firstElementChild))&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return lt(e),!0;if("select"===r&&b(/<template/i,e.innerHTML))return lt(e),!0;if(!$e[r]||Oe[r]){if(ze&&!He[r]){var a=ne(e)||e.parentNode,o=te(e)||e.childNodes;if(o&&a)for(var i=o.length-1;i>=0;--i)a.insertBefore(X(o[i],!0),ee(e))}return lt(e),!0}return e instanceof s&&!it(e)?(lt(e),!0):"noscript"!==r&&"noembed"!==r||!b(/<\/no(script|embed)/i,e.innerHTML)?(ke&&3===e.nodeType&&(n=e.textContent,n=g(n,me," "),n=g(n,fe," "),e.textContent!==n&&(m(t.removed,{element:e.cloneNode()}),e.textContent=n)),_t("afterSanitizeElements",e,null),!1):(lt(e),!0)},ft=function(e,t,n){if(Ee&&("id"===t||"name"===t)&&(n in r||n in et))return!1;if(Ce&&!Se[t]&&b(ye,t));else if(Ie&&b(ge,t));else{if(!je[t]||Se[t])return!1;if(Ge[t]);else if(b(be,g(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==h(n,"data:")||!Ve[e])if(Te&&!b(he,g(n,ve,"")));else if(n)return!1}return!0},yt=function(e){var n=void 0,r=void 0,a=void 0,o=void 0;_t("beforeSanitizeAttributes",e,null);var i=e.attributes;if(i){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:je};for(o=i.length;o--;){var s=n=i[o],p=s.name,c=s.namespaceURI;if(r=v(n.value),a=f(p),l.attrName=a,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,_t("uponSanitizeAttribute",e,l),r=l.attrValue,!l.forceKeepAttr&&(st(p,e),l.keepAttr))if(b(/\/>/i,r))st(p,e);else{ke&&(r=g(r,me," "),r=g(r,fe," "));var d=e.nodeName.toLowerCase();if(ft(d,a,r))try{c?e.setAttributeNS(c,p,r):e.setAttribute(p,r),_(t.removed)}catch(e){}}}_t("afterSanitizeAttributes",e,null)}},gt=function e(t){var n=void 0,r=ct(t);for(_t("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)_t("uponSanitizeShadowNode",n,null),mt(n)||(n.content instanceof a&&e(n.content),yt(n));_t("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,o){var i=void 0,s=void 0,p=void 0,c=void 0,d=void 0;if((Qe=!r)&&(r="\x3c!--\x3e"),"string"!=typeof r&&!ut(r)){if("function"!=typeof r.toString)throw $("toString is not a function");if("string"!=typeof(r=r.toString()))throw $("dirty is not a string, aborting")}if(!t.isSupported){if("object"===U(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(ut(r))return e.toStaticHTML(r.outerHTML)}return r}if(Pe||tt(o),t.removed=[],"string"==typeof r&&(Fe=!1),Fe);else if(r instanceof l)1===(s=(i=pt("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!Re&&!ke&&!Le&&-1===r.indexOf("<"))return ae&&Ne?ae.createHTML(r):r;if(!(i=pt(r)))return Re?null:oe}i&&Me&<(i.firstChild);for(var u=ct(Fe?r:i);p=u.nextNode();)3===p.nodeType&&p===c||mt(p)||(p.content instanceof a&>(p.content),yt(p),c=p);if(c=null,Fe)return r;if(Re){if(Ae)for(d=pe.call(i.ownerDocument);i.firstChild;)d.appendChild(i.firstChild);else d=i;return De&&(d=de.call(n,d,!0)),d}var _=Le?i.outerHTML:i.innerHTML;return ke&&(_=g(_,me," "),_=g(_,fe," ")),ae&&Ne?ae.createHTML(_):_},t.setConfig=function(e){tt(e),Pe=!0},t.clearConfig=function(){Xe=null,Pe=!1},t.isValidAttribute=function(e,t,n){Xe||tt({});var r=f(e),a=f(t);return ft(r,a,n)},t.addHook=function(e,t){"function"==typeof t&&(_e[e]=_e[e]||[],m(_e[e],t))},t.removeHook=function(e){_e[e]&&_(_e[e])},t.removeHooks=function(e){_e[e]&&(_e[e]=[])},t.removeAllHooks=function(){_e={}},t}return J()}()})),css_248z$n=".styles-module_listboxGroupWrapper__1Kt5M fieldset {\n margin: 0;\n padding: 0;\n border: none; }\n\n.styles-module_listbox__2x2uP {\n position: relative;\n max-width: 285px;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n padding-top: 10px; }\n .styles-module_listbox__2x2uP .styles-module_customSelect__3d-hM {\n position: relative;\n display: flex;\n flex-direction: column;\n font-size: 14px;\n letter-spacing: -0.197647px;\n color: #999999; }\n .styles-module_listbox__2x2uP .styles-module_customSelect__3d-hM.styles-module_open__2fBAx .styles-module_customOptions__3iNrM {\n opacity: 1;\n visibility: visible;\n pointer-events: auto; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG {\n position: relative;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n height: 35px;\n padding: 0 10px;\n justify-content: space-between;\n cursor: pointer;\n font-size: 14px;\n border: 1px solid #e2e0db;\n border-radius: 4px; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG span {\n display: flex;\n align-items: center;\n height: 100%;\n padding-right: 10px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG span.styles-module_selected__nLzUy {\n color: #333333; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG:focus {\n outline: none; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG.styles-module_error__2KcSW {\n border-color: #f05c42; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG .styles-module_arrow__TPQOZ {\n transform: rotate(0);\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms; }\n .styles-module_listbox__2x2uP .styles-module_customSelectTrigger__2MlIG .styles-module_arrow__TPQOZ.styles-module_close__3wlz1 {\n transform: rotate(180deg); }\n .styles-module_listbox__2x2uP .styles-module_customOptions__3iNrM {\n position: absolute;\n top: 100%;\n left: 0px;\n right: 0px;\n z-index: 10;\n margin-top: 0.5rem;\n display: block;\n overflow: hidden;\n background-color: #fff;\n font-size: 0.875rem;\n line-height: 1.25rem;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n pointer-events: none;\n visibility: hidden;\n max-height: 12rem;\n min-height: 100%;\n overflow: auto;\n border-width: 1px;\n border-style: solid;\n border-color: #e2e0db;\n opacity: 0;\n border-radius: 4px; }\n\n.styles-module_listboxItem__2jMpi {\n position: relative;\n display: block;\n cursor: pointer;\n border-width: 0px;\n border-bottom-width: 1px;\n border-style: solid;\n border-color: #e2e0db;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 2.5rem;\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 10px; }\n .styles-module_listboxItem__2jMpi svg {\n position: absolute;\n height: 100%;\n width: 12px;\n left: 16px;\n top: 0; }\n .styles-module_listboxItem__2jMpi:last-child {\n border: none; }\n .styles-module_listboxItem__2jMpi:hover {\n color: #333;\n background: #ececec; }\n .styles-module_listboxItem__2jMpi.styles-module_selected__nLzUy {\n color: #333;\n font-weight: 500; }\n",styles$k={listboxGroupWrapper:"styles-module_listboxGroupWrapper__1Kt5M",listbox:"styles-module_listbox__2x2uP",customSelect:"styles-module_customSelect__3d-hM",open:"styles-module_open__2fBAx",customOptions:"styles-module_customOptions__3iNrM",customSelectTrigger:"styles-module_customSelectTrigger__2MlIG",selected:"styles-module_selected__nLzUy",error:"styles-module_error__2KcSW",arrow:"styles-module_arrow__TPQOZ",close:"styles-module_close__3wlz1",listboxItem:"styles-module_listboxItem__2jMpi"},_templateObject$r,_templateObject2$m;styleInject(css_248z$n);var ListBoxItem=function(e){var t=e.id,n=e.value,r=e.isSelected,a=e.onClick;return m$1(_templateObject$r||(_templateObject$r=_taggedTemplateLiteral(["\n <span\n class=","\n data-value=","\n onclick=","\n >\n ","\n ","\n </span>\n "])),"".concat(styles$k.listboxItem," ").concat(r?styles$k.selected:""),t,a,r&&m$1(_templateObject2$m||(_templateObject2$m=_taggedTemplateLiteral(['\n <svg\n width="7"\n height="7"\n viewBox="0 0 7 7"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n stroke="#333"\n >\n <path\n d="M6.33333 1.5L2.83522 5.5L1 3.40148"\n stroke-width="1.2"\n stroke-linecap="round"\n />\n </svg>\n ']))),n)},_templateObject$q,_templateObject2$l,_templateObject3$h,_templateObject4$c,_templateObject5$b,_templateObject6$6,_templateObject7$5,_templateObject8$3,_templateObject9$3,_templateObject10$3,_templateObject11$3,_templateObject12$2,_templateObject13$2,ListBox=function(e){var t=e.title,n=e.description,r=e.items,a=void 0===r?[]:r,o=e.value,i=void 0===o?null:o,l=e.isOpen,s=void 0!==l&&l,c=e.isDynamic,u=void 0!==c&&c,_=e.endpointData,m=e.isRequired,f=void 0!==m&&m,g=e.placeholder,h=e.onChange,b=void 0===h?function(){return null}:h,$=e.showStepValidation,w=void 0!==$&&$,j=e.responseMapper,x=void 0===j?function(e){return e}:j,O=_slicedToArray(v(a),2),S=O[0],I=O[1],C=_slicedToArray(v(u&&!a.length&&!i),2),T=C[0],k=C[1],L=_slicedToArray(v(s),2),P=L[0],M=L[1],R=d();useOnClickOutside(R,(function(){return P&&M(!1)})),p((function(){var t=e.apiHandler,n=e.isDynamic,r=e.endpointUrl;if(n&&r){var a;k(!0);try{a=JSON.parse(_)}catch(e){a=""}t.callDynamicDataEndpoint(new URL(r),a).then((function(e){k(!1),e&&I(x(e))}))}}),[_]);var A=function(){M((function(e){return!e}))},D=y((function(){var e=S.findIndex((function(e){return e.id===i}));return e>-1?S[e].value:"Please Select..."}),[S,i]);return m$1(_templateObject$q||(_templateObject$q=_taggedTemplateLiteral(["\n <div ref=",' class="','">\n <fieldset>\n ',"\n <div class=",">\n <div\n class=","\n >\n <div\n class=",'\n role="button"\n tabindex=',"\n onclick=","\n onkeyup=","\n >\n <span class=",">\n ","\n </span>\n\n <div ref=",' style="display: flex;">\n ',"\n </div>\n </div>\n <div class=",">\n ","\n </div>\n </div>\n ","\n </div>\n </fieldset>\n </div>\n "])),R,styles$k.listboxGroupWrapper,t&&m$1(_templateObject2$l||(_templateObject2$l=_taggedTemplateLiteral(["\n <","\n title=","\n description=","\n isRequired=","\n />\n "])),Label,t,n,f),styles$k.listbox,"".concat(styles$k.customSelect," ").concat(P?styles$k.open:""),"".concat(styles$k.customSelectTrigger," ").concat(w&&!i&&f&&!P&&styles$k.error),0,A,(function(e){"Enter"===e.key&&A()}),i&&styles$k.selected,T?m$1(_templateObject3$h||(_templateObject3$h=_taggedTemplateLiteral(["Loading"]))):m$1(_templateObject4$c||(_templateObject4$c=_taggedTemplateLiteral(["\n ","\n "])),S.length>0?m$1(_templateObject5$b||(_templateObject5$b=_taggedTemplateLiteral(["\n ","\n "])),i?m$1(_templateObject6$6||(_templateObject6$6=_taggedTemplateLiteral(["",""])),D):m$1(_templateObject7$5||(_templateObject7$5=_taggedTemplateLiteral(["",""])),g||"Please Select...")):m$1(_templateObject8$3||(_templateObject8$3=_taggedTemplateLiteral(["No options"])))),R,T?m$1(_templateObject9$3||(_templateObject9$3=_taggedTemplateLiteral(["<",' color="#ababab"><//>'])),ThreeDotLoader):m$1(_templateObject10$3||(_templateObject10$3=_taggedTemplateLiteral(["\n <div\n class=",'\n >\n <svg\n width="12"\n height="8"\n viewBox="0 0 12 8"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11 1.5L6 6.5L1 1.5"\n stroke="#999999"\n stroke-width="2"\n stroke-linecap="round"\n />\n </svg>\n </div>\n '])),"".concat(styles$k.arrow," ").concat(P?styles$k.close:"")),styles$k.customOptions,S.length>0&&!T&&m$1(_templateObject11$3||(_templateObject11$3=_taggedTemplateLiteral(["\n ","\n "])),S.map((function(e){return m$1(_templateObject12$2||(_templateObject12$2=_taggedTemplateLiteral(["\n <","\n key=","\n id=","\n value=","\n isSelected=","\n onClick=","\n ><//>\n "])),ListBoxItem,e.id,e.id,e.value,i===e.id,(function(){b(e.id),M(!1)}))}))),w&&!i&&!P&&f&&m$1(_templateObject13$2||(_templateObject13$2=_taggedTemplateLiteral([" <",">Please select an option</",">"])),ErrorMessage,ErrorMessage))},css_248z$m=".styles-module_checkboxGroup__2u-bL fieldset {\n border: none;\n padding: 0; }\n\n.styles-module_checkboxWrap__JzZMA {\n margin-bottom: 22px; }\n\n.styles-module_checkbox__3mvqm {\n position: relative;\n display: flex;\n margon-bottom: 2px;\n align-items: center;\n margin-top: 12px; }\n .styles-module_checkbox__3mvqm .styles-module_button__2oPQ0 {\n display: block;\n height: 20px;\n width: 20px;\n background-color: transparent; }\n .styles-module_checkbox__3mvqm input[type='checkbox'] {\n opacity: 0;\n margin: 0;\n display: none; }\n .styles-module_checkbox__3mvqm label {\n display: flex;\n flex: 1;\n cursor: pointer;\n font-size: 14px;\n color: #333333; }\n .styles-module_checkbox__3mvqm .styles-module_text__1AHNH {\n display: flex;\n color: #333;\n font-size: 14px;\n padding-left: 10px;\n font-weight: 400;\n line-height: 26px;\n margin-top: -2px; }\n .styles-module_checkbox__3mvqm .styles-module_description__3Ox13 {\n font-size: 12px;\n color: #222; }\n",styles$j={checkboxGroup:"styles-module_checkboxGroup__2u-bL",checkboxWrap:"styles-module_checkboxWrap__JzZMA",checkbox:"styles-module_checkbox__3mvqm",button:"styles-module_button__2oPQ0",text:"styles-module_text__1AHNH",description:"styles-module_description__3Ox13"},_templateObject$p,_templateObject2$k,_templateObject3$g,_templateObject4$b,_templateObject5$a,_templateObject6$5;styleInject(css_248z$m);var Checkbox=function(e){var t=e.label,n=e.name,r=e.description,a=void 0===r?null:r,o=e.value,i=e.isRequired,l=void 0!==i&&i,s=e.isChecked,p=void 0!==s&&s,c=e.showStepValidation,d=void 0!==c&&c,u=e.handleChange,_=void 0===u?function(){return null}:u;return m$1(_templateObject$p||(_templateObject$p=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",">\n <label for=",">\n <input\n id=",'\n type="checkbox"\n name=',"\n value=","\n checked=","\n onclick=","\n />\n <div class=",">\n ","\n </div>\n <div>\n <div class=",">\n ","\n </div>\n ","\n </div>\n </label>\n </div>\n ","\n </div>\n "])),styles$j.checkboxWrap,styles$j.checkbox,n,n,n,o,p,(function(e){if(e.target instanceof HTMLInputElement){var t=e.target,n=t.id,r=t.checked;_(n,r)}}),styles$j.button,m$1(p?_templateObject2$k||(_templateObject2$k=_taggedTemplateLiteral(['\n <svg\n width="20"\n height="20"\n viewBox="0 0 20 20"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M7.86364 15.5L10 13.4923L17.5 6.49357L15.3485 4.5L7.86364 11.4987L4.63636 8.50129L2.5 10.4949L5.71212 13.4923L7.86364 15.5Z"\n fill="#5F4D86"\n />\n <path\n d="M0 0V-2H-2V0H0ZM20 0H22V-2H20V0ZM20 20V22H22V20H20ZM0 20H-2V22H0V20ZM0 2H20V-2H0V2ZM18 0V20H22V0H18ZM20 18H0V22H20V18ZM2 20V0H-2V20H2Z"\n fill="#5F4D86"\n />\n </svg>\n '])):_templateObject3$g||(_templateObject3$g=_taggedTemplateLiteral(['\n <svg\n width="20"\n height="20"\n viewBox="0 0 20 20"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M0 0V-2H-2V0H0ZM20 0H22V-2H20V0ZM20 20V22H22V20H20ZM0 20H-2V22H0V20ZM0 2H20V-2H0V2ZM18 0V20H22V0H18ZM20 18H0V22H20V18ZM2 20V0H-2V20H2Z"\n fill="#5F4D86"\n />\n </svg>\n ']))),styles$j.text,t.map((function(e){return m$1(_templateObject4$b||(_templateObject4$b=_taggedTemplateLiteral(["",""])),e.value)})),a&&m$1(_templateObject5$a||(_templateObject5$a=_taggedTemplateLiteral(["<div class=",">","</div>"])),styles$j.description,a),d&&!o&&l&&m$1(_templateObject6$5||(_templateObject6$5=_taggedTemplateLiteral([" <",">Please select an option</",">"])),ErrorMessage,ErrorMessage))},css_248z$l=".styles-module_loader__1RKKC {\n animation-name: styles-module_ckw__i9e23;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n transform-origin: 50% 50%; }\n\n@keyframes styles-module_ckw__i9e23 {\n 0% {\n transform: rotate(0deg); }\n 100% {\n transform: rotate(360deg); } }\n",styles$i={loader:"styles-module_loader__1RKKC",ckw:"styles-module_ckw__i9e23"},_templateObject$o;styleInject(css_248z$l);var LargeLoader=function(){return m$1(_templateObject$o||(_templateObject$o=_taggedTemplateLiteral(["\n <svg\n class=",'\n width="26"\n height="25"\n viewBox="0 0 26 25"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M15.7173 0.29892C13.1175 -0.280085 10.4006 -0.0135017 7.96294 1.0598C5.52524 2.13311 3.49412 3.95702 2.16568 6.26562C0.837246 8.57421 0.280965 11.2468 0.57794 13.8937C0.874915 16.5406 2.00962 19.0235 3.81662 20.9803C5.62362 22.9371 8.00843 24.2656 10.6234 24.772C13.2383 25.2784 15.9466 24.9363 18.3535 23.7956C20.7604 22.6548 22.74 20.7751 24.0036 18.4304C25.2673 16.0857 25.749 13.3987 25.3785 10.7611L24.1406 10.935C24.4741 13.3088 24.0406 15.7272 22.9033 17.8374C21.766 19.9476 19.9844 21.6393 17.8182 22.666C15.652 23.6927 13.2145 24.0006 10.861 23.5448C8.50758 23.089 6.36125 21.8934 4.73495 20.1323C3.10866 18.3711 2.08742 16.1366 1.82015 13.7543C1.55287 11.3721 2.05352 8.96679 3.24911 6.88905C4.44471 4.81132 6.27272 3.1698 8.46665 2.20382C10.6606 1.23785 13.1057 0.997923 15.4456 1.51903L15.7173 0.29892Z"\n fill="#EFEFEF"\n />\n <path\n d="M25.3833 10.7959C25.0346 8.26181 23.9168 5.8957 22.1808 4.01695C20.4449 2.13819 18.1743 0.83725 15.6756 0.289715L15.4081 1.51074C17.6569 2.00353 19.7004 3.17437 21.2628 4.86525C22.8251 6.55613 23.8311 8.68563 24.145 10.9663L25.3833 10.7959Z"\n fill="#C4C4C4"\n />\n </svg>\n'])),styles$i.loader)},css_248z$k=".styles-module_selectWrapper__wU7p8 {\n position: relative;\n width: 100%; }\n .styles-module_selectWrapper__wU7p8 fieldset {\n padding: 0;\n margin: 0;\n border: none; }\n .styles-module_selectWrapper__wU7p8 select {\n width: 100%;\n color: #999999;\n position: relative;\n font-size: 14px;\n -webkit-appearance: none;\n appearance: none;\n padding: 8.5px 14px;\n padding-right: 28px;\n border-radius: 4px;\n border: 1px solid #e2e0db;\n outline: none;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; }\n .styles-module_selectWrapper__wU7p8 select:focus {\n outline: none; }\n .styles-module_selectWrapper__wU7p8 select.styles-module_selectedVal__11vC7 {\n color: #333; }\n .styles-module_selectWrapper__wU7p8 svg {\n position: absolute;\n right: 10px;\n top: 13px; }\n",styles$h={selectWrapper:"styles-module_selectWrapper__wU7p8",selectedVal:"styles-module_selectedVal__11vC7"},_templateObject$n,_templateObject2$j,_templateObject3$f,_templateObject4$a,_templateObject5$9;styleInject(css_248z$k);var Select=function(e){var t=e.placeholder,n=e.ariaLabel,r=e.value,a=e.options,o=void 0===a?[]:a,i=e.showUnselectedValue,l=void 0!==i&&i,s=e.unselectedText,p=void 0===s?"Select a value":s,c=e.isRequired,d=void 0!==c&&c,u=e.showStepValidation,_=void 0!==u&&u,m=e.onChange,f=void 0===m?function(){return null}:m;return m$1(_templateObject$n||(_templateObject$n=_taggedTemplateLiteral(["\n <div class=",">\n <select\n aria-label=","\n onchange=","\n class=","\n >\n ","\n ","\n ",'\n </select>\n <svg\n width="12"\n height="8"\n viewBox="0 0 12 8"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11 1.5L6 6.5L1 1.5"\n stroke="#999999"\n stroke-width="2"\n stroke-linecap="round"\n />\n </svg>\n </div>\n ',"\n "])),styles$h.selectWrapper,n,(function(e){if(e.currentTarget instanceof HTMLSelectElement){var t=e.currentTarget.value,n=o.findIndex((function(e){return"".concat(e.key)==="".concat(t)}));f(n)}}),r&&styles$h.selectedVal,l&&m$1(_templateObject2$j||(_templateObject2$j=_taggedTemplateLiteral([' <option value="">',"</option> "])),p),void 0===r&&m$1(_templateObject3$f||(_templateObject3$f=_taggedTemplateLiteral(['\n <option value="" disabled selected hidden>',"</option>\n "])),t),o.map((function(e){return m$1(_templateObject4$a||(_templateObject4$a=_taggedTemplateLiteral(["\n <option value="," selected=",">\n ","\n </option>\n "])),e.key,r===e.key,e.label)})),d&&!r&&_&&m$1(_templateObject5$9||(_templateObject5$9=_taggedTemplateLiteral(["<",">Please map this required field<//>"])),ErrorMessage))},css_248z$j=".styles-module_mappingWrap__cU3_M .styles-module_mappingInfo__2Nvsw {\n margin-top: 20px;\n display: flex;\n justify-content: flex-end;\n font-size: 10px;\n line-height: 12px;\n display: flex;\n align-items: center;\n letter-spacing: 0.1px;\n color: #999999; }\n .styles-module_mappingWrap__cU3_M .styles-module_mappingInfo__2Nvsw > :not(:last-child) {\n margin-right: 20px; }\n .styles-module_mappingWrap__cU3_M .styles-module_mappingInfo__2Nvsw > div {\n margin-right: 7px; }\n .styles-module_mappingWrap__cU3_M .styles-module_mappingInfo__2Nvsw > div > span:first-child {\n color: #333333;\n margin: 0;\n margin-right: 3px; }\n\n.styles-module_mappingWrap__cU3_M .styles-module_mappingRow__LbAkF:first-child {\n padding-top: 0;\n padding-bottom: 5px;\n height: 60px;\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n letter-spacing: 0.1px;\n color: #333333; }\n\n.styles-module_loader__3uPJj {\n margin-top: 35px;\n margin-bottom: -60px;\n display: flex;\n justify-content: center; }\n\n.styles-module_mappingRow__LbAkF {\n display: flex;\n box-sizing: content-box;\n align-items: center;\n justify-content: space-between;\n background-color: #fff;\n padding-left: 10px;\n padding-right: 10px;\n height: 90px; }\n .styles-module_mappingRow__LbAkF .styles-module_title__3EC37 {\n width: 40%;\n padding-right: 4px;\n font-weight: 500;\n font-size: 14px;\n color: #333333;\n padding-right: 10px;\n line-height: 18px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n .styles-module_mappingRow__LbAkF .styles-module_title__3EC37 span {\n color: red;\n font-size: 16px;\n margin-left: 2px; }\n .styles-module_mappingRow__LbAkF .styles-module_sampleData__ZpCR2 {\n display: flex;\n flex-direction: column;\n width: 40%;\n overflow: hidden;\n word-break: break-word;\n padding-right: 20px; }\n .styles-module_mappingRow__LbAkF .styles-module_selectBox__2gn7w {\n width: 40%;\n font-size: 14px; }\n .styles-module_mappingRow__LbAkF:nth-child(even) {\n background: #f8f8f880; }\n .styles-module_mappingRow__LbAkF:first-child {\n color: #333333; }\n .styles-module_mappingRow__LbAkF .styles-module_mappingHeaderItem__3Ue0A {\n display: flex;\n align-items: center;\n width: 40%; }\n .styles-module_mappingRow__LbAkF .styles-module_mappingHeaderItem__3Ue0A:first-child {\n padding-right: 4px; }\n .styles-module_mappingRow__LbAkF .styles-module_mappingHeaderItem__3Ue0A img {\n height: 25px;\n width: 25px;\n padding: 2px;\n object-fit: contain;\n border-radius: 9999px;\n margin-right: 5px; }\n .styles-module_mappingRow__LbAkF pre {\n margin: 0;\n padding: 0;\n color: #7d7d7d;\n height: 20px;\n font-size: 14px;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis; }\n",styles$g={mappingWrap:"styles-module_mappingWrap__cU3_M",mappingInfo:"styles-module_mappingInfo__2Nvsw",mappingRow:"styles-module_mappingRow__LbAkF",loader:"styles-module_loader__3uPJj",title:"styles-module_title__3EC37",sampleData:"styles-module_sampleData__ZpCR2",selectBox:"styles-module_selectBox__2gn7w",mappingHeaderItem:"styles-module_mappingHeaderItem__3Ue0A"},_templateObject$m,_templateObject2$i,_templateObject3$e,_templateObject4$9,_templateObject5$8,_templateObject6$4,_templateObject7$4;function ownKeys$3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$3(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}styleInject(css_248z$j);var MappingUI=function(e){var t,n,r=_slicedToArray(v(!0),2),a=r[0],o=r[1],i=_slicedToArray(v(!1),2),l=i[0],s=i[1],c=_slicedToArray(v(!1),2),u=c[0],_=c[1],m=_slicedToArray(v([]),2),f=m[0],y=m[1],g=_slicedToArray(v(""),2),h=g[0],b=g[1],$=w(AppContext),j=d(""),x=d([]);p((function(){f.length>0&&f.map((function(t,n){var r=e.stepDataMapping[e.stepId][t.fieldId];if(!r.isDynamic&&r.value)r.value.slice(1,-1)&&(x.current=[].concat(_toConsumableArray(x.current),[n]));else if(r.isDynamic&&r.value&&t.id){JSON.parse(r.value||"{}")[t.id]&&(x.current=[].concat(_toConsumableArray(x.current),[n]))}}))}),[f]),p((function(){var t=e.templateFields.filter((function(e){return e.activity_field&&"DYNAMIC"===e.activity_field.type}))[0];t&&b("".concat(t.id));var n=e.templateFields.filter((function(e){return e.activity_field&&"TEXTFIELD"===e.activity_field.type&&e.is_visible})).map((function(e){return{fieldId:e.id,id:e.activity_field&&e.activity_field.machine_name,title:e.activity_field&&e.activity_field.title,type:"text",isNotDynamic:!0}}));if(t.activity_field){var r,a=e.parentChildMapping[e.stepId][t.activity_field.machine_name],i="";if(a){var l,p=null===(l=a.parentFields)||void 0===l?void 0:l.reduce((function(t,n){var r=e.parentChildMapping[e.stepId][n].fieldId;return _objectSpread$3(_objectSpread$3({},t),{},_defineProperty({},r,e.stepDataMapping[e.stepId][r].value))}),{});i=JSON.stringify(p)}if(i!==j.current)o(!0),s(!0),_(!0),S(),null===(r=I(t))||void 0===r||r.then((function(e){o(!1),x.current=[],j.current=i,Array.isArray(e)?y([].concat(_toConsumableArray(n),_toConsumableArray(e.map((function(e){return _objectSpread$3(_objectSpread$3({},e),{},{fieldId:t.id})}))))):y(n)})).catch((function(e){return console.error(e)}))}}),[e.stepDataMapping[e.stepId]]);var O=function(t){var n=e.stepDataMapping[t];return Object.keys(n).filter((function(e){return n[Number(e)].value})).reduce((function(e,t){var r=n[Number(t)];return _objectSpread$3(_objectSpread$3({},e),{},_defineProperty({},r.machineName,r.value))}),{})},S=function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(){var n,r,a;return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.stepState.steps[0].stepId,r=O(n),n&&("TRIGGER"!==(a=e.stepMapping[n].step).activity.type&&"QUERY"!==a.activity.type||(a.activity.activity_output_url?(s(!0),null==$||$.apiHandler.callDynamicDataEndpoint(new URL(a.activity.activity_output_url),_objectSpread$3({authorization_id:"".concat(e.stepMapping[n].selectedAuthId)},r)).then((function(t){s(!1),t&&e.setActivityOutputData({activityOutputData:t})}))):s(!1),a.activity.dynamic_field_data_endpoint?(_(!0),null==$||$.apiHandler.callDynamicDataEndpoint(new URL(a.activity.dynamic_field_data_endpoint),_objectSpread$3({authorization_id:"".concat(e.stepMapping[n].selectedAuthId)},r)).then((function(t){_(!1),t&&e.setDynamicFieldData({dynamicFieldData:t})}))):_(!1)));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=function(t){var n,r="".concat(null===(n=t.activity_field)||void 0===n?void 0:n.dynamic_field_src);return null==$?void 0:$.apiHandler.callDynamicDataEndpoint(new URL(r),_objectSpread$3({authorization_id:"".concat(e.endpointData.authId)},e.endpointData.fieldsData))};return m$1(_templateObject$m||(_templateObject$m=_taggedTemplateLiteral(["\n <div>\n <",'\n title="Map data"\n description="Please map fields you want to use from both apps"\n />\n <div>\n ',"\n </div>\n </div>\n "])),Label,a||l||u?m$1(_templateObject2$i||(_templateObject2$i=_taggedTemplateLiteral(["<div class=","><"," /></div>"])),styles$g.loader,LargeLoader):m$1(_templateObject3$e||(_templateObject3$e=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",">\n <div class=",">\n <img\n src=","\n />\n <div>\n ","\n </div>\n </div>\n <div class=",">Sample Data</div>\n <div class=",">\n <img src="," />\n <div>"," Field</div>\n </div>\n </div>\n ","\n <div class=",">\n <div>\n <span>Mapped</span>\n <span\n >","","\n field","</span\n >\n </div>\n <div>\n <span>Ignored</span>\n <span\n >","","\n field","</span\n >\n </div>\n </div>\n </div>\n "])),styles$g.mappingWrap,styles$g.mappingRow,styles$g.mappingHeaderItem,e.stepMapping[e.stepId].step.activity.app.icon_url,"".concat(e.stepMapping[e.stepId].step.activity.app.name," Field"),styles$g.sampleData,styles$g.mappingHeaderItem,null===(t=e.genericData.templateApp)||void 0===t?void 0:t.iconUrl,null===(n=e.genericData.templateApp)||void 0===n?void 0:n.name,f.map((function(t,n){var r,a,o,i,l,s=t.id||"",p=e.stepDataMapping[e.stepId][t.fieldId];p.isDynamic?i=p.objectValue:i=null===(l=p.value)||void 0===l?void 0:l.slice(1,-1);return!p.isDynamic&&i?o=i:t.id&&p.isDynamic&&p.objectValue&&i[s]&&(o="".concat(i[s]).slice(1,-1)),m$1(_templateObject4$9||(_templateObject4$9=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",">\n ","","\n </div>\n <div class=",">\n ","\n </div>\n <div class=",">\n <",'\n ariaLabel="Map a value"\n placeholder="Please map a value"\n options=',"\n value=","\n isRequired=","\n showStepValidation=","\n showUnselectedValue=",'\n unselectedText="Skip"\n onChange=',"\n ><//>\n </div>\n </div>\n "])),styles$g.mappingRow,styles$g.title,t.title,(null==p?void 0:p.isRequired)&&m$1(_templateObject5$8||(_templateObject5$8=_taggedTemplateLiteral(["<span>*</span>"]))),styles$g.sampleData,e.dynamicFieldData&&o&&(null===(r=e.dynamicFieldData["{".concat(o,"}")])||void 0===r?void 0:r.map((function(e){return e?m$1(_templateObject6$4||(_templateObject6$4=_taggedTemplateLiteral(["<pre>","</pre>"])),e):m$1(_templateObject7$4||(_templateObject7$4=_taggedTemplateLiteral([""])))}))),styles$g.selectBox,Select,null===(a=e.activityOutputData)||void 0===a?void 0:a.map((function(e){return{key:e.value,label:e.text}})),o,null==p?void 0:p.isRequired,e.showStepValidation,!0,(function(r){var a;return function(t,n,r,a){var o,i=null===(o=e.activityOutputData)||void 0===o?void 0:o[t],l=x.current.findIndex((function(e){return e===a}));t<0?(x.current=x.current.filter((function(e){return e!==a})),n.isNotDynamic?e.setStepFieldData({stepId:"".concat(e.stepId),fieldId:"".concat(n.fieldId),value:"",isRequired:r}):h&&e.setStepMappingData({stepId:e.stepId,fieldId:Number(h),id:"".concat(n.id),value:null})):i&&(l<0&&(x.current=[].concat(_toConsumableArray(x.current),[a])),n.isNotDynamic?e.setStepFieldData({stepId:"".concat(e.stepId),fieldId:"".concat(n.fieldId),value:"{".concat(i.value,"}"),isRequired:r}):h&&e.setStepMappingData({stepId:e.stepId,fieldId:Number(h),id:"".concat(n.id),value:"{".concat(i.value,"}")}))}(r,t,null!==(a=null==p?void 0:p.isRequired)&&void 0!==a&&a,n)}))})),styles$g.mappingInfo,x.current.length," ",1!==x.current.length?"s":"",f.length-x.current.length," ",f.length-x.current.length!=1?"s":""))},MappingUI$1=preact.connect(["stepState","genericData","stepMapping","activityOutputData","dynamicFieldData","stepDataMapping","parentChildMapping"],actionFunctions)(MappingUI),css_248z$i=".styles-module_inputWrapper__1XBHY {\n position: relative;\n width: 100%;\n margin-top: 10px; }\n .styles-module_inputWrapper__1XBHY input {\n width: 100%;\n color: #333;\n display: block;\n box-sizing: border-box;\n -webkit-appearance: none;\n appearance: none;\n padding: 8.5px 14px;\n border-radius: 4px;\n border: 1px solid #e2e0db;\n font-size: 14px;\n outline: none; }\n .styles-module_inputWrapper__1XBHY input:focus {\n outline: none; }\n .styles-module_inputWrapper__1XBHY input:-ms-input-placeholder {\n color: #999999; }\n .styles-module_inputWrapper__1XBHY input::placeholder {\n color: #999999; }\n",styles$f={inputWrapper:"styles-module_inputWrapper__1XBHY"},_templateObject$l,_templateObject2$h;styleInject(css_248z$i);var BaseInput=function(e){var t=e.placeholder,n=e.value,r=e.type,a=void 0===r?"text":r,o=e.control,i=e.handleChange,l=void 0===i?function(){return null}:i;return m$1(_templateObject$l||(_templateObject$l=_taggedTemplateLiteral(["\n <div class=",">\n <input\n type=","\n placeholder=","\n value=","\n onkeyup=","\n onchange=","\n />\n ","\n </div>\n "])),styles$f.inputWrapper,a,t,n,(function(e){if(e.currentTarget instanceof HTMLInputElement){var t=e.currentTarget.value;l(t)}}),(function(e){if(e.currentTarget instanceof HTMLInputElement&&"date"===e.currentTarget.type){var t=e.currentTarget.value;l(t)}}),o&&m$1(_templateObject2$h||(_templateObject2$h=_taggedTemplateLiteral(["<"," //>"])),o))},css_248z$h=".styles-module_inputGroupWrapper__FJc-g fieldset {\n padding: 0;\n margin: 0;\n border: none; }\n",styles$e={inputGroupWrapper:"styles-module_inputGroupWrapper__FJc-g"},_templateObject$k,_templateObject2$g;styleInject(css_248z$h);var Input=function(e){var t=e.title,n=e.description,r=e.placeholder,a=e.value,o=e.showStepValidation,i=void 0!==o&&o,l=e.isRequired,s=void 0!==l&&l,p=e.onChange,c=void 0===p?function(){return null}:p;return m$1(_templateObject$k||(_templateObject$k=_taggedTemplateLiteral(['\n <div class="','">\n <fieldset>\n <'," title="," description="," //>\n <",'\n type="text"\n placeholder=',"\n handleChange=","\n value=","\n ><//>\n </fieldset>\n ","\n </div>\n "])),styles$e.inputGroupWrapper,Label,t,n,BaseInput,r,(function(e){c(e)}),a,i&&s&&m$1(_templateObject2$g||(_templateObject2$g=_taggedTemplateLiteral(["",">Please enter a value<//>"])),ErrorMessage))},css_248z$g=".styles-module_dateGroupWrapper__cV-ne fieldset {\n border: none;\n padding: 0;\n margin: 0; }\n\n.styles-module_dateGroupWrapper__cV-ne input[type='date'] {\n position: relative;\n cursor: pointer; }\n\n.styles-module_dateGroupWrapper__cV-ne input[type='date']::-webkit-calendar-picker-indicator {\n position: absolute;\n top: 0;\n right: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n color: transparent;\n background: transparent; }\n\n.styles-module_dateGroupWrapper__cV-ne .styles-module_visibilityToggle__1l7Vl {\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n right: 10px;\n bottom: 0;\n margin: 0 auto; }\n .styles-module_dateGroupWrapper__cV-ne .styles-module_visibilityToggle__1l7Vl svg {\n cursor: pointer;\n width: 20px; }\n .styles-module_dateGroupWrapper__cV-ne .styles-module_visibilityToggle__1l7Vl svg:hover {\n opacity: 0.5; }\n",styles$d={dateGroupWrapper:"styles-module_dateGroupWrapper__cV-ne",visibilityToggle:"styles-module_visibilityToggle__1l7Vl"},_templateObject$j,_templateObject2$f,_templateObject3$d,_templateObject4$8,_templateObject5$7;styleInject(css_248z$g);var DateInput=function(e){var t=e.title,n=e.description,r=e.placeholder,a=e.value,o=e.showStepValidation,i=void 0!==o&&o,l=e.isRequired,s=void 0!==l&&l,p=e.onChange,c=void 0===p?function(){return null}:p;return m$1(_templateObject$j||(_templateObject$j=_taggedTemplateLiteral(['\n <div class="','">\n <fieldset>\n <'," title="," description="," //>\n <",'\n type="date"\n placeholder=',"\n handleChange=","\n value=","\n control=","\n ><//>\n </fieldset>\n ","\n </div>\n "])),styles$d.dateGroupWrapper,Label,t,n,BaseInput,r,c,a,(function(){return m$1(_templateObject2$f||(_templateObject2$f=_taggedTemplateLiteral([' <div\n role="button"\n class=',"\n onclick=","\n >\n ","\n </div>"])),styles$d.visibilityToggle,(function(){a&&c("")}),m$1(a?_templateObject4$8||(_templateObject4$8=_taggedTemplateLiteral(['\n <svg\n width="18"\n height="18"\n viewBox="0 0 18 18"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M9 0C13.9673 0 18 4.03275 18 9C18 13.9673 13.9673 18 9 18C4.03275 18 0 13.9673 0 9C0 4.03275 4.03275 0 9 0ZM9 0.75C13.5533 0.75 17.25 4.44675 17.25 9C17.25 13.5533 13.5533 17.25 9 17.25C4.44675 17.25 0.75 13.5533 0.75 9C0.75 4.44675 4.44675 0.75 9 0.75ZM9 8.46975L12.9697 4.5L13.5 5.03025L9.53025 9L13.5 12.9697L12.9697 13.5L9 9.53025L5.03025 13.5L4.5 12.9697L8.46975 9L4.5 5.03025L5.03025 4.5L9 8.46975Z"\n fill="black"\n />\n </svg>\n '])):_templateObject3$d||(_templateObject3$d=_taggedTemplateLiteral(['\n <svg\n width="25"\n height="26"\n viewBox="0 0 25 26"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M16.9543 5.5464H19.335L19.3349 5.54639C20.6491 5.54639 21.7156 6.61204 21.7156 7.92812L21.7147 19.8323C21.7147 21.1466 20.6482 22.2131 19.334 22.2131H5.04866C3.73449 22.2131 2.66797 21.1466 2.66797 19.8323V7.92719C2.66797 6.61296 3.73444 5.54639 5.04866 5.54639L7.42936 5.5473V4.35641C7.42936 3.69791 7.96262 3.16553 8.62019 3.16553C9.27777 3.16553 9.81102 3.69791 9.81102 4.35641V5.5464L14.5717 5.5473V4.35641C14.5717 3.69791 15.105 3.16553 15.7626 3.16553C16.4201 3.16553 16.9534 3.69791 16.9534 4.35641L16.9543 5.5464ZM4.04688 20.8324H20.3369L20.3358 8.7124H4.04688V20.8324Z"\n fill="#999999"\n />\n </svg>\n ']))))}),i&&s&&m$1(_templateObject5$7||(_templateObject5$7=_taggedTemplateLiteral(["",">Please enter a date<//>"])),ErrorMessage))},css_248z$f=".styles-module_passwordInputWrapper__1rzRX fieldset {\n padding: 0;\n margin: 0;\n border: none; }\n\n.styles-module_passwordInputWrapper__1rzRX .styles-module_innerWrap__2CRI3 {\n position: relative; }\n\n.styles-module_passwordInputWrapper__1rzRX input {\n padding-right: 36px; }\n\n.styles-module_visibilityToggle__3_Kyp {\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n right: 10px;\n bottom: 0;\n margin: 0 auto; }\n .styles-module_visibilityToggle__3_Kyp svg {\n cursor: pointer;\n width: 20px; }\n .styles-module_visibilityToggle__3_Kyp svg:hover {\n opacity: 0.5; }\n",styles$c={passwordInputWrapper:"styles-module_passwordInputWrapper__1rzRX",innerWrap:"styles-module_innerWrap__2CRI3",visibilityToggle:"styles-module_visibilityToggle__3_Kyp"},_templateObject$i,_templateObject2$e,_templateObject3$c,_templateObject4$7,_templateObject5$6;styleInject(css_248z$f);var PasswordInput=function(e){var t=e.title,n=e.description,r=e.placeholder,a=e.value,o=e.showStepValidation,i=void 0!==o&&o,l=e.isRequired,s=void 0!==l&&l,p=e.onChange,c=void 0===p?function(){return null}:p,d=_slicedToArray(v(!1),2),u=d[0],_=d[1],m=function(){_((function(e){return!e}))};return m$1(_templateObject$i||(_templateObject$i=_taggedTemplateLiteral(['\n <div class="','">\n <fieldset>\n <'," title="," description="," //>\n <","\n type=","\n placeholder=","\n handleChange=","\n value=","\n control=","\n ><//>\n ","\n </fieldset>\n </div>\n "])),styles$c.passwordInputWrapper,Label,t,n,BaseInput,u?"text":"password",r,c,a,(function(){return m$1(_templateObject2$e||(_templateObject2$e=_taggedTemplateLiteral(["\n <div\n class=","\n onclick=","\n >\n ","\n </div>\n "])),styles$c.visibilityToggle,m,m$1(u?_templateObject4$7||(_templateObject4$7=_taggedTemplateLiteral([' <svg\n width="20"\n height="12"\n viewBox="0 0 20 12"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M0.183387 6.51359C0.35582 6.72918 4.47535 11.6704 9.71968 11.6704V11.6704C14.964 11.6704 19.0836 6.72924 19.256 6.51357C19.5005 6.21515 19.5005 5.78535 19.256 5.48691V5.48615C19.0835 5.27523 14.964 0.330078 9.71968 0.330078C4.47535 0.330078 0.355766 5.27507 0.183387 5.48693C-0.0611291 5.78535 -0.0611291 6.21515 0.183387 6.51359ZM9.71968 10.0499C6.1643 10.0499 3.04855 7.1924 1.90266 6.00018C3.04632 4.80579 6.1643 1.95044 9.71968 1.95044C13.2751 1.95044 16.3908 4.80797 17.5367 6.00018C16.393 7.19458 13.2751 10.0499 9.71968 10.0499Z"\n fill="#333333"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.94922 8.29099C7.55668 8.89849 8.3806 9.24021 9.24022 9.24021C10.0998 9.24021 10.9237 8.89845 11.5312 8.29099C12.1387 7.68353 12.4804 6.85956 12.4804 5.99999C12.4804 5.14041 12.1387 4.31648 11.5312 3.70898C10.9238 3.10148 10.0998 2.75977 9.24022 2.75977C8.38064 2.75977 7.55672 3.10152 6.94922 3.70898C6.34172 4.31644 6 5.14041 6 5.99999C6 6.85956 6.34176 7.68349 6.94922 8.29099ZM7.7435 5.3803C7.99408 4.77431 8.58488 4.38021 9.24022 4.38021C9.67002 4.38021 10.0816 4.55031 10.3854 4.85481C10.6899 5.15856 10.86 5.57015 10.86 5.99995C10.86 6.65529 10.4659 7.24607 9.85987 7.49667C9.25464 7.74727 8.5583 7.60905 8.09509 7.14508C7.63111 6.68186 7.49289 5.98552 7.7435 5.3803Z"\n fill="#333333"\n />\n </svg>'])):_templateObject3$c||(_templateObject3$c=_taggedTemplateLiteral([' <svg\n width="20"\n height="12"\n viewBox="0 0 20 12"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M0.183387 6.51359C0.35582 6.72918 4.47535 11.6704 9.71968 11.6704V11.6704C14.964 11.6704 19.0836 6.72924 19.256 6.51357C19.5005 6.21515 19.5005 5.78535 19.256 5.48691V5.48615C19.0835 5.27523 14.964 0.330078 9.71968 0.330078C4.47535 0.330078 0.355766 5.27507 0.183387 5.48693C-0.0611291 5.78535 -0.0611291 6.21515 0.183387 6.51359ZM9.71968 10.0499C6.1643 10.0499 3.04855 7.1924 1.90266 6.00018C3.04632 4.80579 6.1643 1.95044 9.71968 1.95044C13.2751 1.95044 16.3908 4.80797 17.5367 6.00018C16.393 7.19458 13.2751 10.0499 9.71968 10.0499Z"\n fill="#999999"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.94922 8.29099C7.55668 8.89849 8.3806 9.24021 9.24022 9.24021C10.0998 9.24021 10.9237 8.89845 11.5312 8.29099C12.1387 7.68353 12.4804 6.85956 12.4804 5.99999C12.4804 5.14041 12.1387 4.31648 11.5312 3.70898C10.9238 3.10148 10.0998 2.75977 9.24022 2.75977C8.38064 2.75977 7.55672 3.10152 6.94922 3.70898C6.34172 4.31644 6 5.14041 6 5.99999C6 6.85956 6.34176 7.68349 6.94922 8.29099ZM7.7435 5.3803C7.99408 4.77431 8.58488 4.38021 9.24022 4.38021C9.67002 4.38021 10.0816 4.55031 10.3854 4.85481C10.6899 5.15856 10.86 5.57015 10.86 5.99995C10.86 6.65529 10.4659 7.24607 9.85987 7.49667C9.25464 7.74727 8.5583 7.60905 8.09509 7.14508C7.63111 6.68186 7.49289 5.98552 7.7435 5.3803Z"\n fill="#999999"\n />\n </svg>']))))}),i&&s&&m$1(_templateObject5$6||(_templateObject5$6=_taggedTemplateLiteral(["",">Please enter a value<//>"])),ErrorMessage))},copyStringToClipboard=function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).catch((function(){console.error("Could not copy to clipboard")}));else{var t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}},css_248z$e=".styles-module_textareaInputWrapper__mJffr {\n position: relative; }\n .styles-module_textareaInputWrapper__mJffr fieldset {\n padding: 0;\n margin: 0;\n border: none; }\n .styles-module_textareaInputWrapper__mJffr textarea {\n margin-top: 10px;\n font-family: inherit;\n box-sizing: border-box;\n display: block;\n height: 6rem;\n width: 100%;\n resize: none;\n color: #333;\n -webkit-appearance: none;\n appearance: none;\n border-radius: 0.25rem;\n border-width: 1px;\n border-style: solid;\n border: 1px solid #e2e0db;\n padding: 8.5px 14px; }\n .styles-module_textareaInputWrapper__mJffr textarea:focus {\n outline: none; }\n .styles-module_textareaInputWrapper__mJffr textarea:-ms-input-placeholder {\n color: #999; }\n .styles-module_textareaInputWrapper__mJffr textarea::placeholder {\n color: #999; }\n .styles-module_textareaInputWrapper__mJffr .styles-module_copyButton__1D43d {\n position: absolute;\n cursor: pointer;\n right: 0px;\n top: 16px;\n padding: 8px; }\n .styles-module_textareaInputWrapper__mJffr .styles-module_copyButton__1D43d:hover {\n opacity: 0.75; }\n",styles$b={textareaInputWrapper:"styles-module_textareaInputWrapper__mJffr",copyButton:"styles-module_copyButton__1D43d"},_templateObject$h,_templateObject2$d,_templateObject3$b;styleInject(css_248z$e);var TextArea=function(e){var t=e.title,n=e.description,r=e.value,a=e.placeholder,o=e.onChange,i=void 0===o?function(){return null}:o,l=e.showStepValidation,s=void 0!==l&&l,p=e.showCopyButton,c=void 0!==p&&p,d=e.isRequired,u=void 0!==d&&d;return m$1(_templateObject$h||(_templateObject$h=_taggedTemplateLiteral(['\n <div class="','">\n <fieldset>\n <'," title="," description="," //>\n <textarea\n placeholder=","\n value=","\n oninput=","\n />\n ","\n </fieldset>\n ","\n </div>\n "])),styles$b.textareaInputWrapper,Label,t,n,a,r,(function(e){if(e.currentTarget instanceof HTMLTextAreaElement){var t=e.currentTarget.value;i(t)}}),c&&m$1(_templateObject2$d||(_templateObject2$d=_taggedTemplateLiteral(["\n <div onclick="," class=",'>\n <svg\n width="12"\n height="15"\n viewBox="0 0 12 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <rect\n x="0.75"\n y="1"\n width="7.5"\n height="9.5"\n rx="0.75"\n stroke="#999999"\n stroke-width="1.5"\n />\n <rect\n x="3.75"\n y="4.5"\n width="7.5"\n height="9.5"\n rx="0.75"\n fill="#E4E4E4"\n stroke="#999999"\n stroke-width="1.5"\n />\n </svg>\n </div>\n '])),(function(){copyStringToClipboard(r||"")}),styles$b.copyButton),s&&u&&m$1(_templateObject3$b||(_templateObject3$b=_taggedTemplateLiteral(["",">Please enter a value<//>"])),ErrorMessage))},css_248z$d=".styles-module_stepsWrap__1Yzhl {\n width: 100%; }\n\n.styles-module_stepWrap__eLO77 {\n margin-bottom: 30px; }\n\n.styles-module_unsupported__eCxdG {\n font-size: 12px;\n color: #ca8c1b; }\n",styles$a={stepsWrap:"styles-module_stepsWrap__1Yzhl",stepWrap:"styles-module_stepWrap__eLO77",unsupported:"styles-module_unsupported__eCxdG"},_templateObject$g,_templateObject2$c,_templateObject3$a,_templateObject4$6,_templateObject5$5,_templateObject6$3,_templateObject7$3,_templateObject8$2,_templateObject9$2,_templateObject10$2,_templateObject11$2,_templateObject12$1,_templateObject13$1,_templateObject14$1,_templateObject15$1,_templateObject16$1,_templateObject17$1,_templateObject18$1;function ownKeys$2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$2(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$2(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _createSuper$d(e){var t=_isNativeReflectConstruct$d();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$d);var Step=function(_Component){_inherits(Step,_Component);var _super=_createSuper$d(Step);function Step(e){var t;return _classCallCheck(this,Step),_defineProperty(_assertThisInitialized(t=_super.call(this,e)),"getVisibleFieldsDataOnRootStep",(function(){var e=t.props.stepDataMapping[t.props.step.id];return Object.keys(e).filter((function(t){return e[Number(t)].value})).reduce((function(t,n){var r=e[Number(n)];return _objectSpread$2(_objectSpread$2({},t),{},_defineProperty({},r.machineName,r.value))}),{})})),_defineProperty(_assertThisInitialized(t),"areParentValuesFilled",(function(e,n){for(var r=!0,a=0;a<n.length;a+=1){var o=n[a],i=t.props.parentChildMapping[e][o].fieldId,l=t.props.stepDataMapping[e]&&t.props.stepDataMapping[e][i];if(!l||!l.value){r=!1;break}}return r})),_defineProperty(_assertThisInitialized(t),"doParentFieldsHaveValues",(function(e,n){var r=!0,a=t.props.parentChildMapping[e][n];if(a&&a.parentFields)for(var o=0;o<a.parentFields.length;o+=1){var i=t.props.parentChildMapping[e][a.parentFields[o]],l=t.props.stepDataMapping[e]&&t.props.stepDataMapping[e][i.fieldId];if(!l||!l.value){r=!1;break}}return r})),_defineProperty(_assertThisInitialized(t),"shouldShowStep",(function(e){var n=t.props.step.id,r=t.props.stepMapping&&t.props.stepMapping[n];if("BUTTON"===e.type||"HTML"===e.type)return!0;if(r&&e.activity_field){var a=!e.is_hidden,o=t.props.parentChildMapping[n][e.activity_field.machine_name].parentFields,i=!0;return o&&(i=t.areParentValuesFilled(n,o)),a&&i}return!1})),_defineProperty(_assertThisInitialized(t),"stepIsOfType",(function(e){var n=t.props.step.id,r=t.props.stepMapping&&t.props.stepMapping[n];return e.indexOf(r.step.activity.type)>-1})),_defineProperty(_assertThisInitialized(t),"textFieldParentHasValues",(function(){var e=t.props.step.id,n=t.props.stepMapping&&t.props.stepMapping[e],r=n.step.template_fields.filter((function(e){return e.is_visible})),a=n.selectedAuthId,o=r.filter((function(e){return e.activity_field&&"DYNAMIC"===e.activity_field.type}))[0];return!o||!!(r.length>0&&o&&o.activity_field&&a&&t.doParentFieldsHaveValues(e,o.activity_field.machine_name))})),_defineProperty(_assertThisInitialized(t),"shouldShowMapping",(function(){var e=t.props.step.id,n=t.props.stepMapping&&t.props.stepMapping[e];if(t.stepIsOfType(["ADAPTER","ACTION"])){var r=n.step.template_fields.filter((function(e){return e.is_visible})),a=n.selectedAuthId,o=r.filter((function(e){return e.activity_field&&"DYNAMIC"===e.activity_field.type}))[0];if(!o)return!1;if(r.length>0&&a&&o&&o.activity_field&&t.doParentFieldsHaveValues(e,o.activity_field.machine_name))return!0}return!1})),_defineProperty(_assertThisInitialized(t),"getMappingDataInput",(function(){var e=t.props.step.id;return{authId:(t.props.stepMapping&&t.props.stepMapping[e]).selectedAuthId,fieldsData:t.getVisibleFieldsDataOnRootStep()}})),_defineProperty(_assertThisInitialized(t),"fieldDynamicData",(function(e){var n=t.props.step.id;if(t.props.stepMapping&&t.props.stepMapping[n]&&e.activity_field){var r=t.props.parentChildMapping[n][e.activity_field.machine_name].parentFields;if(r){var a=t.props.parentChildMapping[n][r[0]].fieldId;if(a)return _defineProperty({},r[0],t.props.stepDataMapping[n][a].value)}}return null})),t.state={loading:!1},t}return _createClass(Step,[{key:"componentDidMount",value:function(){this.props.verifyStepValidity(this.props.step.id)}},{key:"render",value:function render(){var _this2=this,_this$props=this.props,step=_this$props.step,stepMapping=_this$props.stepMapping,stepDataMapping=_this$props.stepDataMapping,setStepFieldData=_this$props.setStepFieldData,showStepValidation=_this$props.showStepValidation,selectedStep=stepMapping[step.id]&&stepMapping[step.id].step,selectedStepData=stepDataMapping&&stepDataMapping[step.id];return m$1(_templateObject$g||(_templateObject$g=_taggedTemplateLiteral(["\n ","\n "])),this.state.loading?m$1(_templateObject2$c||(_templateObject2$c=_taggedTemplateLiteral(["<"," //>"])),Loader):m$1(_templateObject3$a||(_templateObject3$a=_taggedTemplateLiteral(["\n ","\n "])),selectedStep?m$1(_templateObject4$6||(_templateObject4$6=_taggedTemplateLiteral(["\n <div class=",">\n ","\n ","\n </div>\n "])),styles$a.stepsWrap,selectedStep.template_fields.map((function(el){var _this2$props$stepMapp;if(_this2.shouldShowStep(el)&&el.activity_field)switch(el.activity_field.type){case"SELECT":return m$1(_templateObject5$5||(_templateObject5$5=_taggedTemplateLiteral(["\n <div class=",">\n <","\n key=","\n apiHandler=","\n title=","\n description=","\n showStepValidation=","\n placeholder=","\n isRequired=","\n value=","\n onChange=","\n endpointUrl=","\n isDynamic=","\n endpointData=","\n ><//>\n </div>\n "])),styles$a.stepWrap,ListBox,el.activity_field.id,_this2.props.apiHandler,el.title||el.activity_field.title,el.description||el.activity_field.description,showStepValidation,el.placeholder,el.is_required,selectedStepData&&selectedStepData[el.id]&&selectedStepData[el.id].value||"",(function(e){setStepFieldData({stepId:"".concat(step.id),fieldId:"".concat(el.id),value:e,isRequired:el.is_required}),_this2.props.verifyStepValidity(step.id)}),el.activity_field.data_src,el.activity_field.is_dynamic,JSON.stringify(_objectSpread$2({authorization_id:_this2.props.stepMapping&&(null===(_this2$props$stepMapp=_this2.props.stepMapping[_this2.props.step.id])||void 0===_this2$props$stepMapp?void 0:_this2$props$stepMapp.selectedAuthId)},_this2.fieldDynamicData(el))));case"TEXTFIELD":return!_this2.shouldShowMapping()&&_this2.textFieldParentHasValues()&&m$1(_templateObject6$3||(_templateObject6$3=_taggedTemplateLiteral(["\n <div class=",">\n <","\n id=","\n title=","\n description=","\n value=","\n placeholder=","\n showStepValidation=","\n isRequired=","\n onChange=","\n ><//>\n </div>\n "])),styles$a.stepWrap,Input,el.activity_field.id,el.title||el.activity_field.title,el.description||el.activity_field.description,selectedStepData&&selectedStepData[el.id]&&selectedStepData[el.id].value||"",el.placeholder||"Please enter a value",showStepValidation,el.is_required,(function(e){setStepFieldData({stepId:"".concat(step.id),fieldId:"".concat(el.id),value:e,isRequired:el.is_required}),_this2.props.verifyStepValidity(step.id)}));case"CHECKBOX":var _el$activity_field$da,_el$activity_field;return m$1(_templateObject7$3||(_templateObject7$3=_taggedTemplateLiteral(["\n <div class=",">\n <","\n title=","\n description=","\n isRequired=","\n />\n <","\n label=","\n name=","\n value=","\n isChecked=","\n isRequired=","\n showStepValidation=","\n handleChange=","\n />\n </div>\n "])),styles$a.stepWrap,Label,el.title||el.activity_field.title,el.description||el.activity_field.description,el.is_required,Checkbox,eval(null!==(_el$activity_field$da=null===(_el$activity_field=el.activity_field)||void 0===_el$activity_field?void 0:_el$activity_field.data_src)&&void 0!==_el$activity_field$da?_el$activity_field$da:"")||[],el.activity_field.machine_name,selectedStepData&&selectedStepData[el.id]&&"1"===selectedStepData[el.id].value,selectedStepData&&selectedStepData[el.id]&&"1"===selectedStepData[el.id].value,el.is_required,showStepValidation,(function(e,t){setStepFieldData({stepId:"".concat(step.id),fieldId:"".concat(el.id),value:t?"1":"0",isRequired:el.is_required}),_this2.props.verifyStepValidity(step.id)}));case"DYNAMIC":return m$1(_templateObject8$2||(_templateObject8$2=_taggedTemplateLiteral([""])));case"PASSWORD":return m$1(_templateObject9$2||(_templateObject9$2=_taggedTemplateLiteral(["\n <div class=",">\n <","\n title=","\n description=","\n value=","\n placeholder=","\n showStepValidation=","\n isRequired=","\n onChange=","\n />\n </div>\n "])),styles$a.stepWrap,PasswordInput,el.title||el.activity_field.title,el.description||el.activity_field.description,selectedStepData&&selectedStepData[el.id]&&selectedStepData[el.id].value||"",el.placeholder||"Please enter a value",showStepValidation,el.is_required,(function(e){setStepFieldData({stepId:"".concat(step.id),fieldId:"".concat(el.id),value:e,isRequired:el.is_required}),_this2.props.verifyStepValidity(step.id)}));case"TEXTAREA":return m$1(_templateObject10$2||(_templateObject10$2=_taggedTemplateLiteral(["\n <div class=",">\n <","\n title=","\n description=","\n value=","\n placeholder=","\n showStepValidation=","\n isRequired=","\n onChange=","\n />\n </div>\n "])),styles$a.stepWrap,TextArea,el.title||el.activity_field.title,el.description||el.activity_field.description,selectedStepData&&selectedStepData[el.id]&&selectedStepData[el.id].value||"",el.placeholder||"Please enter a value",showStepValidation,el.is_required,(function(e){setStepFieldData({stepId:"".concat(step.id),fieldId:"".concat(el.id),value:e,isRequired:el.is_required}),_this2.props.verifyStepValidity(step.id)}));case"DATE":return m$1(_templateObject11$2||(_templateObject11$2=_taggedTemplateLiteral(["\n <div class=",">\n <","\n title=","\n description=","\n value=","\n placeholder=","\n showStepValidation=","\n isRequired=","\n onChange=","\n />\n </div>\n "])),styles$a.stepWrap,DateInput,el.title||el.activity_field.title,el.description||el.activity_field.description,selectedStepData&&selectedStepData[el.id]&&selectedStepData[el.id].value||"",el.placeholder||"Please enter a value",showStepValidation,el.is_required,(function(e){setStepFieldData({stepId:"".concat(step.id),fieldId:"".concat(el.id),value:e,isRequired:el.is_required}),_this2.props.verifyStepValidity(step.id)}));case"RADIO":return m$1(_templateObject12$1||(_templateObject12$1=_taggedTemplateLiteral(["\n <div class=",">\n <","\n name=","\n label=","\n description=","\n />\n </div>\n "])),styles$a.stepWrap,Radio,el.title||el.activity_field.title,el.title||el.activity_field.title,el.description||el.activity_field.description);default:return m$1(_templateObject13$1||(_templateObject13$1=_taggedTemplateLiteral([" <div\n class=","\n >\n Field: "," is currently not\n supported\n </div>"])),"".concat(styles$a.stepWrap," ").concat(styles$a.unsupported),el.activity_field.type)}else switch(el.type){case"HTML":return m$1(_templateObject14$1||(_templateObject14$1=_taggedTemplateLiteral(['\n <div\n style="margin-bottom: 2rem;"\n dangerouslySetInnerHTML=',"\n />\n "])),{__html:purify(window).sanitize(el.default_value)});case"BUTTON":return m$1(_templateObject15$1||(_templateObject15$1=_taggedTemplateLiteral(['\n <div style="margin-bottom: 2rem;">\n <'," label="," />\n </div>\n "])),Button,el.title)}return m$1(_templateObject16$1||(_templateObject16$1=_taggedTemplateLiteral([""])))})),this.shouldShowMapping()&&m$1(_templateObject17$1||(_templateObject17$1=_taggedTemplateLiteral(["\n <div class=",">\n <","\n stepId=","\n templateFields=","\n showStepValidation=","\n endpointData=","\n ><//>\n </div>\n "])),styles$a.stepWrap,MappingUI$1,selectedStep.id,selectedStep.template_fields,showStepValidation,this.getMappingDataInput())):m$1(_templateObject18$1||(_templateObject18$1=_taggedTemplateLiteral(["Step data could not be loaded"])))))}}]),Step}(d$1),Step$1=preact.connect(["stepMapping","stepDataMapping","parentChildMapping"],actionFunctions)(Step),css_248z$c=".styles-module_stepsWrap__3VIDN {\n display: flex;\n border: 1px solid #d7d7d7;\n box-sizing: border-box;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.04);\n border-radius: 4px;\n width: 100%;\n box-sizing: border-box;\n padding: 30px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 .styles-module_header__2GDea {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: space-between; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 .styles-module_header__2GDea .styles-module_name__h_9E1 {\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 20px;\n color: #333333; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 .styles-module_header__2GDea .styles-module_steps__1tZbw {\n font-size: 12px;\n font-weight: 400;\n color: #8c8c8c; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 img,\n .styles-module_stepsWrap__3VIDN .styles-module_stepInfo__nU7A7 svg {\n margin-right: 10px;\n height: 25px;\n width: 25px;\n border-radius: 9999px;\n object-fit: contain; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw {\n display: flex;\n width: 100%;\n flex-direction: column; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_top__JXVEL {\n display: flex;\n flex: 1 1 0%;\n padding-top: 50px;\n padding-left: 35px;\n padding-right: 35px;\n width: 100%; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_bottom__2g7TT {\n display: flex;\n height: 2rem;\n align-items: center;\n justify-content: flex-end;\n box-sizing: initial;\n border-width: 0px;\n border-top-width: 1px;\n border-style: solid;\n border-color: #d7d7d7;\n margin-top: 55px;\n padding-top: 20px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_bottom__2g7TT .styles-module_buttons__2hBh9 {\n display: flex; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_bottom__2g7TT .styles-module_buttons__2hBh9 div:not(:last-child) {\n margin-right: 20px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_save__1LVOi {\n font-style: normal;\n font-weight: normal;\n margin-top: -30px;\n font-size: 14px;\n color: #8c8c8c;\n padding-bottom: 30px; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_postSave__3EhMs {\n width: 100%; }\n .styles-module_stepsWrap__3VIDN .styles-module_stepContainer__1DBMw .styles-module_postSave__3EhMs textarea {\n font-family: monospace;\n line-height: 18px; }\n\n.styles-module_authWrap__em0DI {\n margin-bottom: 30px;\n width: 100%;\n max-width: 75%; }\n",styles$9={stepsWrap:"styles-module_stepsWrap__3VIDN",stepInfo:"styles-module_stepInfo__nU7A7",header:"styles-module_header__2GDea",name:"styles-module_name__h_9E1",steps:"styles-module_steps__1tZbw",stepContainer:"styles-module_stepContainer__1DBMw",top:"styles-module_top__JXVEL",bottom:"styles-module_bottom__2g7TT",buttons:"styles-module_buttons__2hBh9",save:"styles-module_save__1LVOi",postSave:"styles-module_postSave__3EhMs",authWrap:"styles-module_authWrap__em0DI"},_templateObject$f,_templateObject2$b,_templateObject3$9,_templateObject4$5,_templateObject5$4,_templateObject6$2,_templateObject7$2,_templateObject8$1,_templateObject9$1,_templateObject10$1,_templateObject11$1,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21;function ownKeys$1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread$1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$1(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _createSuper$c(e){var t=_isNativeReflectConstruct$c();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$c);var Steps$2=function(e){_inherits(n,d$1);var t=_createSuper$c(n);function n(e){var r;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(r=t.call(this,e)),"getPayload",(function(){var e,t,n=r.props,a=n.stepMapping,o=n.stepDataMapping;return r.context.isPreviewMode?null:(r.setState({loading:!0}),{name:null!==(e=null===(t=r.props.genericData.templateApp)||void 0===t?void 0:t.name)&&void 0!==e?e:"My new flow",notification_email:"",template:Number(r.props.genericData.templateId),bundle_id:Number(r.props.genericData.bundleId),steps:Object.keys(a).map((function(e){return{id:a[e].integrationStepId||a[e].step.id,authorization:Number(a[e].selectedAuthId)||null,template_step:a[e].step.id,app_user_data:a[e].step.template_fields.map((function(t){return{id:o[a[e].step.id][t.id].integrationFieldId||t.id,value:!o[a[e].step.id][t.id].value&&""!==o[a[e].step.id][t.id].value||o[a[e].step.id][t.id].objectValue?JSON.stringify(o[a[e].step.id][t.id].objectValue):"".concat(o[a[e].step.id][t.id].value),template_field:t.id}}))}}))})})),_defineProperty(_assertThisInitialized(r),"createIntegration",(function(){var e=r.getPayload();e&&r.context.apiHandler.saveIntegration(e).then((function(e){r.postSaveOrCreate(e)})).catch((function(e){return console.error(e)}))})),_defineProperty(_assertThisInitialized(r),"postSaveOrCreate",(function(e){var t=r.props.stepMapping,n=Object.keys(t).map((function(e){return t[e]})).filter((function(e){return e&&e.step&&e.step.activity&&"TRIGGER"===e.step.activity.type}))[0],a=e.steps.filter((function(e){var t;return e.template_step===(null==n||null===(t=n.step)||void 0===t?void 0:t.id)}))[0];if(a&&a.returned_data)try{var o=JSON.parse(a.returned_data);o.is_webhook_url&&o.endpoint&&r.setState({postSave:!0,postSaveData:o,integrationData:e})}catch(e){console.error(e)}else r.setState({integrationData:e},(function(){r.dismiss()}));r.setState({loading:!1})})),_defineProperty(_assertThisInitialized(r),"updateIntegration",(function(){var e=r.getPayload();e&&r.context.apiHandler.updateIntegration(r.context.integrationId,_objectSpread$1(_objectSpread$1({},e),{},{id:"".concat(r.context.integrationId)})).then((function(e){r.postSaveOrCreate(e)})).catch((function(e){return console.error(e)}))})),_defineProperty(_assertThisInitialized(r),"dismiss",(function(){var e=r.state.integrationData;e&&r.context.eventEmitter.emit("did-save-integration",{integrationId:e.id,name:e.name,templateId:e.template,status:e.status})})),_defineProperty(_assertThisInitialized(r),"handleAuthSelected",(function(e,t,n,a){var o=r.props.stepMapping[t].step.template_fields.filter((function(e){return e.activity_field&&e.activity_field.is_dynamic})).map((function(e){return e.id}));r.props.setStepAuthorization(t,e,n,o,a)})),r.state={loading:!1,selectedAuthStep:null,postSave:!1,postSaveData:null,integrationData:null},r}return _createClass(n,[{key:"componentDidUpdate",value:function(e){var t,n,r,a,o=e.stepState,i=this.props.stepState;o.stepIndex!==i.stepIndex&&this.context.eventEmitter.emit("did-change-step",{stepId:null!==(t=null===(n=i.steps[i.stepIndex])||void 0===n?void 0:n.stepId)&&void 0!==t?t:null,stepType:null!==(r=null===(a=i.steps[i.stepIndex])||void 0===a?void 0:a.type)&&void 0!==r?r:"CONFIRMATION"})}},{key:"render",value:function(){var e,t,n,r,a,o,i,l,s,p,c,d=this,u=null,_=this.props,m=_.stepState,f=_.stepMapping,y=this.state,g=y.postSave,h=y.postSaveData,v=m.currentStep,b=m.stepIndex,$=m.steps,w=!1,j=!1,x=!1,O=!1;b>-1&&"CONFIRMATION"!==(null==v?void 0:v.type)?(u=f[Number(null==v?void 0:v.stepId)],w=!1,j=m.stepIndex>0,x=null!==(c=null==v?void 0:v.isValid)&&void 0!==c&&c,O=m.showValidation):"CONFIRMATION"===(null==v?void 0:v.type)&&b===$.length&&(j=!0,w=!0);return m$1(_templateObject$f||(_templateObject$f=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",">\n <div class=",">\n ","\n </div>\n\n <div class=",">\n ","\n </div>\n ","\n </div>\n </div>\n "])),styles$9.stepsWrap,styles$9.stepContainer,styles$9.stepInfo,v&&m$1(_templateObject2$b||(_templateObject2$b=_taggedTemplateLiteral(["\n ","\n "])),w?m$1(_templateObject3$9||(_templateObject3$9=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",'>\n <svg\n width="25"\n height="25"\n viewBox="0 0 25 25"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="12.5"\n cy="12.5"\n r="11.75"\n fill="white"\n stroke="#2ECC71"\n stroke-width="1.5"\n />\n <path\n d="M17.2209 9.16699L11.3907 15.8337L8.33203 12.3361"\n stroke="#2ECC71"\n stroke-width="1.5"\n stroke-linecap="round"\n />\n </svg>\n <div>\n ',"\n </div>\n </div>\n <div class=",">\n ","\n </div>\n </div>\n "])),styles$9.header,styles$9.name,h&&g?"Flow created successfully":"Confirm and activate",styles$9.steps,"Step ".concat((null!==(e=null===(t=this.props.stepState)||void 0===t?void 0:t.stepIndex)&&void 0!==e?e:0)+1," / ").concat((null!==(n=null===(r=this.props.stepState)||void 0===r?void 0:r.steps.length)&&void 0!==n?n:0)+1)):m$1(_templateObject4$5||(_templateObject4$5=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",">\n <img src="," />\n <div>\n ","\n </div>\n </div>\n <div class=",">\n ","\n </div>\n </div>\n "])),styles$9.header,styles$9.name,null===(a=u)||void 0===a?void 0:a.step.activity.app.icon_url,"CONFIRMATION"!==(null==v?void 0:v.type)&&(null==v?void 0:v.title),styles$9.steps,"Step ".concat((null!==(o=null===(i=this.props.stepState)||void 0===i?void 0:i.stepIndex)&&void 0!==o?o:0)+1," / ").concat((null!==(l=null===(s=this.props.stepState)||void 0===s?void 0:s.steps.length)&&void 0!==l?l:0)+1))),styles$9.top,v?m$1(_templateObject5$4||(_templateObject5$4=_taggedTemplateLiteral(["\n ","\n "])),w?m$1(_templateObject6$2||(_templateObject6$2=_taggedTemplateLiteral(["\n ","\n "])),g||h?m$1(_templateObject8$1||(_templateObject8$1=_taggedTemplateLiteral(["\n <div class=",">\n <",'\n title="Webhook URL"\n description="Please use the following webhook url to send data"\n value=',"\n showCopyButton=","\n />\n </div>\n "])),styles$9.postSave,TextArea,null==h?void 0:h.endpoint,!0):m$1(_templateObject7$2||(_templateObject7$2=_taggedTemplateLiteral(["\n <div class=",">\n ","\n </div>\n "])),styles$9.save,this.context.isEditMode?"Your integration is ready to be updated. Click “Update” to continue.":"Your integration is ready to be enabled. Click “Save” to continue.")):m$1(_templateObject9$1||(_templateObject9$1=_taggedTemplateLiteral(["\n ","\n "])),u&&m$1(_templateObject10$1||(_templateObject10$1=_taggedTemplateLiteral(["\n ","\n "])),"AUTH"===(null==v?void 0:v.type)?m$1(_templateObject11$1||(_templateObject11$1=_taggedTemplateLiteral(["\n <div class=",">\n <","\n stepId=","\n apiHandler=","\n showErrors=","\n onAuthSelected=","\n >\n <//>\n </div>\n "])),styles$9.authWrap,AuthSelector$1,u.step.id,this.context.apiHandler,O,(function(e,t,n){var r;return d.handleAuthSelected(e,Number(null===(r=u)||void 0===r?void 0:r.step.id),t,n)})):m$1(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <","\n step=","\n stepType=","\n showStepValidation=","\n apiHandler=","\n eventEmitter=","\n />\n "])),Step$1,null===(p=u)||void 0===p?void 0:p.step,null==v?void 0:v.type,O,this.context.apiHandler,this.context.eventEmitter)))):m$1(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["This template has no configured steps"]))),v&&m$1(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",">\n ","\n ","\n </div>\n </div>\n "])),styles$9.bottom,styles$9.buttons,j&&!g&&!h&&m$1(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n <",'\n label="Back"\n onClick=',"\n type=","\n ><//>\n "])),Button,(function(){return d.props.gotoPreviousStep()}),ButtonTypes.SECONDARY),w?m$1(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n ","\n "])),g||h?m$1(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <",'\n label="Continue"\n onClick=',"\n ><//>\n "])),Button,(function(){return d.dismiss()})):m$1(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n ","\n "])),this.context.isEditMode?m$1(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <",'\n label="Update"\n isLoading=',"\n onClick=","\n ><//>\n "])),Button,this.state.loading,(function(){return d.updateIntegration()})):m$1(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <",'\n label="Save"\n disabled=',"\n tooltip=","\n isLoading=","\n onClick=","\n ><//>\n "])),Button,this.context.isPreviewMode,this.context.isPreviewMode?'Integration setup will have to be\ndone in "Live View"':null,this.state.loading,(function(){return d.createIntegration()})))):m$1(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <",'\n label="Next"\n disabled=',"\n onClick=","\n ><//>\n "])),Button,!x,(function(){return x?d.props.gotoNextStep():d.props.showStepValidationState()}))))}}]),n}();_defineProperty(Steps$2,"contextType",AppContext);var Steps$3=preact.connect(["stepState","genericData","stepMapping","stepDataMapping"],actionFunctions)(Steps$2),css_248z$b=".styles-module_wrap__2ZgZ0 {\n position: relative;\n width: 100%;\n max-width: 730px; }\n .styles-module_wrap__2ZgZ0 *,\n .styles-module_wrap__2ZgZ0 *::before,\n .styles-module_wrap__2ZgZ0 *::after {\n box-sizing: border-box; }\n\n.styles-module_main__11gFF {\n width: 100%;\n line-height: 1; }\n",styles$8={wrap:"styles-module_wrap__2ZgZ0",main:"styles-module_main__11gFF"},_templateObject$e,_templateObject2$a,_templateObject3$8,_templateObject4$4,_templateObject5$3,_templateObject6$1,_templateObject7$1;styleInject(css_248z$b);var _excluded=["steps"],Wrapper=function(e){var t,n=_slicedToArray(v(!1),2),r=n[0],a=n[1],o=_slicedToArray(v(null),2),i=o[0],l=o[1],s=e.templateId,c=e.bundleId,d=e.customWrapper,u=e.templatePreviewData,_=e.previewMetadata,m=_slicedToArray(v(null),2),f=m[0],y=m[1],g=_slicedToArray(F((function(){})),2),h=g[0],b=g[1],$=w(AppContext);return p((function(){return function(){e.reset()}}),[]),p((function(){h&&console.error(h)}),[h]),p((function(){if(a(!0),null!=$&&$.isPreviewMode&&_){if(!u)throw new Error("Preview data was not provided");try{_assert(u,TemplatePreviewDataType)}catch(e){return console.error(e),a(!1),void y(e)}var t=u.steps,n=_objectWithoutProperties(u,_excluded);return l(u),e.setGenericData({templateId:Number(n.id),bundleId:Number(c),isPreviewMode:$.isPreviewMode}),e.setSteps(t.filter(notEmpty)),e.setStepMapping(t.filter(notEmpty)),e.setParentChildMapping(t.filter(notEmpty)),e.gotoStepInPreview(_),$.eventEmitter.emit("did-load-preview",{templateId:Number(n.id),templateTitle:n.name,templateDescription:n.description}),void a(!1)}if(!s)throw new Error("Template ID not found");null==$||$.apiHandler.getTemplate(Number(s)).then((function(t){l(t),t&&Promise.all(t.steps.map((function(e){return $.apiHandler.getTemplateStep(Number(e.id))}))).then(function(){var n=_asyncToGenerator(_regeneratorRuntime.mark((function n(r){var o;return _regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!r){n.next=16;break}if(e.setGenericData({templateId:Number(s),bundleId:Number(c)}),e.setSteps(r.filter(notEmpty)),e.setStepMapping(r.filter(notEmpty)),e.setParentChildMapping(r.filter(notEmpty)),!$.integrationId){n.next=14;break}return n.next=8,$.apiHandler.getIntegrationById($.integrationId);case 8:if(!(o=n.sent)){n.next=13;break}e.setIntegrationData(o),n.next=14;break;case 13:throw new Error("Error fetching integration data for ID ".concat($.integrationId));case 14:$.eventEmitter.emit("did-load-template",{templateId:Number(s),templateTitle:t.name,templateDescription:t.description}),a(!1);case 16:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()).catch((function(e){return console.error(e)}))}))}),[s]),d?m$1(_templateObject$e||(_templateObject$e=_taggedTemplateLiteral(["",""])),d):m$1(_templateObject2$a||(_templateObject2$a=_taggedTemplateLiteral(['\n <div class="'," ",'">\n ',"\n </div>\n "])),styles$8.wrap,"integry-container",h||f?m$1(_templateObject3$8||(_templateObject3$8=_taggedTemplateLiteral(["\n <","\n title=","\n description=","\n errorPayload=","\n onDismiss=","\n />\n "])),ErrorPage,f?"Validation error":"An unexpected error occurred",f?"There was an error validating the preview payload:":"Please review the following stacktrace:",f||h,f?null:b):m$1(_templateObject4$4||(_templateObject4$4=_taggedTemplateLiteral(["\n <div>\n ","\n </div>\n <div class=",">\n ","\n ","\n </div>\n "])),!r&&i&&m$1(_templateObject5$3||(_templateObject5$3=_taggedTemplateLiteral(["\n <","\n steps=","\n ><//>\n "])),StepNavigation$3,null===(t=i.steps)||void 0===t?void 0:t.map((function(e){return{label:e.title,logoUrl:e.activity.app.icon_url}}))),styles$8.main,r&&m$1(_templateObject6$1||(_templateObject6$1=_taggedTemplateLiteral(['<div style="display: flex; justify-content: center;">\n <'," />\n </div>"])),Loader),!r&&i&&m$1(_templateObject7$1||(_templateObject7$1=_taggedTemplateLiteral([" <"," steps=","><//> "])),Steps$3,i.steps)))},Wrapper$1=preact.connect([""],actionFunctions)(Wrapper),fuzzysort=createCommonjsModule((function(e){var t,n;t=commonjsGlobal,n=function(){var e=void 0!==commonjsRequire&&"undefined"==typeof window,t=new Map,n=new Map,r=[];r.total=0;var a=[],o=[];function i(){t.clear(),n.clear(),a=[],o=[]}function l(e){for(var t=-9007199254740991,n=e.length-1;n>=0;--n){var r=e[n];if(null!==r){var a=r.score;a>t&&(t=a)}}return-9007199254740991===t?null:t}function s(e,t){var n=e[t];if(void 0!==n)return n;var r=t;Array.isArray(t)||(r=t.split("."));for(var a=r.length,o=-1;e&&++o<a;)e=e[r[o]];return e}function p(e){return"object"===_typeof(e)}var c=function(){var e=[],t=0,n={};function r(){for(var n=0,r=e[n],a=1;a<t;){var o=a+1;n=a,o<t&&e[o].score<e[a].score&&(n=o),e[n-1>>1]=e[n],a=1+(n<<1)}for(var i=n-1>>1;n>0&&r.score<e[i].score;i=(n=i)-1>>1)e[n]=e[i];e[n]=r}return n.add=function(n){var r=t;e[t++]=n;for(var a=r-1>>1;r>0&&n.score<e[a].score;a=(r=a)-1>>1)e[r]=e[a];e[r]=n},n.poll=function(){if(0!==t){var n=e[0];return e[0]=e[--t],r(),n}},n.peek=function(n){if(0!==t)return e[0]},n.replaceTop=function(t){e[0]=t,r()},n},d=c();return function u(_){var m={single:function(e,t,n){return e?(p(e)||(e=m.getPreparedSearch(e)),t?(p(t)||(t=m.getPrepared(t)),((n&&void 0!==n.allowTypo?n.allowTypo:!_||void 0===_.allowTypo||_.allowTypo)?m.algorithm:m.algorithmNoTypo)(e,t,e[0])):null):null},go:function(e,t,n){if(!e)return r;var a=(e=m.prepareSearch(e))[0],o=n&&n.threshold||_&&_.threshold||-9007199254740991,i=n&&n.limit||_&&_.limit||9007199254740991,c=(n&&void 0!==n.allowTypo?n.allowTypo:!_||void 0===_.allowTypo||_.allowTypo)?m.algorithm:m.algorithmNoTypo,u=0,f=0,y=t.length;if(n&&n.keys)for(var g=n.scoreFn||l,h=n.keys,v=h.length,b=y-1;b>=0;--b){for(var $=t[b],w=new Array(v),j=v-1;j>=0;--j)(S=s($,O=h[j]))?(p(S)||(S=m.getPrepared(S)),w[j]=c(e,S,a)):w[j]=null;w.obj=$;var x=g(w);null!==x&&(x<o||(w.score=x,u<i?(d.add(w),++u):(++f,x>d.peek().score&&d.replaceTop(w))))}else if(n&&n.key){var O=n.key;for(b=y-1;b>=0;--b)(S=s($=t[b],O))&&(p(S)||(S=m.getPrepared(S)),null!==(I=c(e,S,a))&&(I.score<o||(I={target:I.target,_targetLowerCodes:null,_nextBeginningIndexes:null,score:I.score,indexes:I.indexes,obj:$},u<i?(d.add(I),++u):(++f,I.score>d.peek().score&&d.replaceTop(I)))))}else for(b=y-1;b>=0;--b){var S,I;(S=t[b])&&(p(S)||(S=m.getPrepared(S)),null!==(I=c(e,S,a))&&(I.score<o||(u<i?(d.add(I),++u):(++f,I.score>d.peek().score&&d.replaceTop(I)))))}if(0===u)return r;var C=new Array(u);for(b=u-1;b>=0;--b)C[b]=d.poll();return C.total=u+f,C},goAsync:function(t,n,a){var o=!1,i=new Promise((function(i,d){if(!t)return i(r);var u=(t=m.prepareSearch(t))[0],f=c(),y=n.length-1,g=a&&a.threshold||_&&_.threshold||-9007199254740991,h=a&&a.limit||_&&_.limit||9007199254740991,v=(a&&void 0!==a.allowTypo?a.allowTypo:!_||void 0===_.allowTypo||_.allowTypo)?m.algorithm:m.algorithmNoTypo,b=0,$=0;function w(){if(o)return d("canceled");var c=Date.now();if(a&&a.keys)for(var _=a.scoreFn||l,j=a.keys,x=j.length;y>=0;--y){for(var O=n[y],S=new Array(x),I=x-1;I>=0;--I)(k=s(O,T=j[I]))?(p(k)||(k=m.getPrepared(k)),S[I]=v(t,k,u)):S[I]=null;S.obj=O;var C=_(S);if(null!==C&&!(C<g)&&(S.score=C,b<h?(f.add(S),++b):(++$,C>f.peek().score&&f.replaceTop(S)),y%1e3==0&&Date.now()-c>=10))return void(e?setImmediate(w):setTimeout(w))}else if(a&&a.key){for(var T=a.key;y>=0;--y)if((k=s(O=n[y],T))&&(p(k)||(k=m.getPrepared(k)),null!==(L=v(t,k,u))&&!(L.score<g)&&(L={target:L.target,_targetLowerCodes:null,_nextBeginningIndexes:null,score:L.score,indexes:L.indexes,obj:O},b<h?(f.add(L),++b):(++$,L.score>f.peek().score&&f.replaceTop(L)),y%1e3==0&&Date.now()-c>=10)))return void(e?setImmediate(w):setTimeout(w))}else for(;y>=0;--y){var k,L;if((k=n[y])&&(p(k)||(k=m.getPrepared(k)),null!==(L=v(t,k,u))&&!(L.score<g)&&(b<h?(f.add(L),++b):(++$,L.score>f.peek().score&&f.replaceTop(L)),y%1e3==0&&Date.now()-c>=10)))return void(e?setImmediate(w):setTimeout(w))}if(0===b)return i(r);for(var P=new Array(b),M=b-1;M>=0;--M)P[M]=f.poll();P.total=b+$,i(P)}e?setImmediate(w):w()}));return i.cancel=function(){o=!0},i},highlight:function(e,t,n){if(null===e)return null;void 0===t&&(t="<b>"),void 0===n&&(n="</b>");for(var r="",a=0,o=!1,i=e.target,l=i.length,s=e.indexes,p=0;p<l;++p){var c=i[p];if(s[a]===p){if(o||(o=!0,r+=t),++a===s.length){r+=c+n+i.substr(p+1);break}}else o&&(o=!1,r+=n);r+=c}return r},prepare:function(e){if(e)return{target:e,_targetLowerCodes:m.prepareLowerCodes(e),_nextBeginningIndexes:null,score:null,indexes:null,obj:null}},prepareSlow:function(e){if(e)return{target:e,_targetLowerCodes:m.prepareLowerCodes(e),_nextBeginningIndexes:m.prepareNextBeginningIndexes(e),score:null,indexes:null,obj:null}},prepareSearch:function(e){if(e)return m.prepareLowerCodes(e)},getPrepared:function(e){if(e.length>999)return m.prepare(e);var n=t.get(e);return void 0!==n||(n=m.prepare(e),t.set(e,n)),n},getPreparedSearch:function(e){if(e.length>999)return m.prepareSearch(e);var t=n.get(e);return void 0!==t||(t=m.prepareSearch(e),n.set(e,t)),t},algorithm:function(e,t,n){for(var r=t._targetLowerCodes,i=e.length,l=r.length,s=0,p=0,c=0,d=0;;){if(n===r[p]){if(a[d++]=p,++s===i)break;n=e[0===c?s:c===s?s+1:c===s-1?s-1:s]}if(++p>=l)for(;;){if(s<=1)return null;if(0===c){if(n===e[--s])continue;c=s}else{if(1===c)return null;if((n=e[1+(s=--c)])===e[s])continue}p=a[(d=s)-1]+1;break}}s=0;var u=0,_=!1,f=0,y=t._nextBeginningIndexes;null===y&&(y=t._nextBeginningIndexes=m.prepareNextBeginningIndexes(t.target));var g=p=0===a[0]?0:y[a[0]-1];if(p!==l)for(;;)if(p>=l){if(s<=0){if(++u>i-2)break;if(e[u]===e[u+1])continue;p=g;continue}--s,p=y[o[--f]]}else if(e[0===u?s:u===s?s+1:u===s-1?s-1:s]===r[p]){if(o[f++]=p,++s===i){_=!0;break}++p}else p=y[p];if(_)var h=o,v=f;else h=a,v=d;for(var b=0,$=-1,w=0;w<i;++w)$!==(p=h[w])-1&&(b-=p),$=p;for(_?0!==u&&(b+=-20):(b*=1e3,0!==c&&(b+=-20)),b-=l-i,t.score=b,t.indexes=new Array(v),w=v-1;w>=0;--w)t.indexes[w]=h[w];return t},algorithmNoTypo:function(e,t,n){for(var r=t._targetLowerCodes,i=e.length,l=r.length,s=0,p=0,c=0;;){if(n===r[p]){if(a[c++]=p,++s===i)break;n=e[s]}if(++p>=l)return null}s=0;var d=!1,u=0,_=t._nextBeginningIndexes;if(null===_&&(_=t._nextBeginningIndexes=m.prepareNextBeginningIndexes(t.target)),(p=0===a[0]?0:_[a[0]-1])!==l)for(;;)if(p>=l){if(s<=0)break;--s,p=_[o[--u]]}else if(e[s]===r[p]){if(o[u++]=p,++s===i){d=!0;break}++p}else p=_[p];if(d)var f=o,y=u;else f=a,y=c;for(var g=0,h=-1,v=0;v<i;++v)h!==(p=f[v])-1&&(g-=p),h=p;for(d||(g*=1e3),g-=l-i,t.score=g,t.indexes=new Array(y),v=y-1;v>=0;--v)t.indexes[v]=f[v];return t},prepareLowerCodes:function(e){for(var t=e.length,n=[],r=e.toLowerCase(),a=0;a<t;++a)n[a]=r.charCodeAt(a);return n},prepareBeginningIndexes:function(e){for(var t=e.length,n=[],r=0,a=!1,o=!1,i=0;i<t;++i){var l=e.charCodeAt(i),s=l>=65&&l<=90,p=s||l>=97&&l<=122||l>=48&&l<=57,c=s&&!a||!o||!p;a=s,o=p,c&&(n[r++]=i)}return n},prepareNextBeginningIndexes:function(e){for(var t=e.length,n=m.prepareBeginningIndexes(e),r=[],a=n[0],o=0,i=0;i<t;++i)a>i?r[i]=a:(a=n[++o],r[i]=void 0===a?t:a);return r},cleanup:i,new:u};return m}()},e.exports?e.exports=n():t.fuzzysort=n()})),css_248z$a=".styles-module_search__2j0G1 {\n margin-top: 1rem;\n margin-bottom: 0.5rem;\n display: flex;\n width: 100%;\n flex: 1 1 0%;\n overflow: hidden;\n border-radius: 0.25rem;\n border-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity)); }\n .styles-module_search__2j0G1 input {\n margin: 0.25rem;\n height: 100%;\n width: 100%;\n flex: 1 1 0%;\n border-style: none;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; }\n\n.styles-module_resultCount__12RMZ {\n display: flex;\n align-items: center;\n justify-content: center;\n border-left-width: 1px;\n border-top-width: 0px;\n border-right-width: 0px;\n border-bottom-width: 0px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 700;\n --tw-text-opacity: 1;\n color: rgba(156, 163, 175, var(--tw-text-opacity)); }\n",styles$7={search:"styles-module_search__2j0G1",resultCount:"styles-module_resultCount__12RMZ"},_templateObject$d;function _createSuper$b(e){var t=_isNativeReflectConstruct$b();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$a);var TemplateSearch=function(e){_inherits(n,d$1);var t=_createSuper$b(n);function n(e){var r;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(r=t.call(this,e)),"onInput",(function(e){if(e.target instanceof HTMLInputElement){var t=e.target.value;r.setState({value:t}),r.props.onChange(t)}})),r.state={value:r.props.initialValue||""},r}return _createClass(n,[{key:"render",value:function(){return m$1(_templateObject$d||(_templateObject$d=_taggedTemplateLiteral(["\n <div class="," ",">\n <input\n placeholder=","\n value=","\n oninput=","\n />\n <div class=",">"," results</div>\n </div>\n "])),styles$7.search,"integry-search",this.props.placeholder||"Search...",this.state.value,this.onInput,styles$7.resultCount,this.props.resultCount)}}]),n}(),css_248z$9=".styles-module_nav__bKw4L {\n margin-bottom: 0px;\n margin-top: 0px;\n padding: 0px;\n border-top-width: 0px;\n border-right-width: 0px;\n border-left-width: 0px;\n border-bottom-width: 1px;\n border-style: solid;\n border-color: rgba(107, 114, 128, 0.25); }\n\n.styles-module_tab__3xQCg {\n display: inline-block;\n cursor: pointer;\n list-style-type: none;\n border-bottom-width: 2px;\n border-color: transparent;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-bottom: 0.25rem;\n line-height: 2rem;\n color: #9ca3af;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n margin-bottom: -1px; }\n .styles-module_tab__3xQCg:hover {\n border-width: 0px;\n border-bottom-width: 2px;\n border-style: solid;\n border-color: #509cf6; }\n\n.styles-module_tabactive__2JeoG {\n border-width: 0px;\n border-bottom-width: 2px;\n border-style: solid;\n border-color: #509cf6;\n color: #374151; }\n",styles$6={nav:"styles-module_nav__bKw4L",tab:"styles-module_tab__3xQCg",tabactive:"styles-module_tabactive__2JeoG"},_templateObject$c;styleInject(css_248z$9);var Tab=function(e){var t=e.label,n=e.activeTab,r=e.onClick;return m$1(_templateObject$c||(_templateObject$c=_taggedTemplateLiteral(["\n <li\n class=","\n onclick=","\n >\n ","\n </li>\n "])),"".concat(styles$6.tab," ").concat(n===t?styles$6.tabactive:""),(function(){r(t)}),t)},_templateObject$b,_templateObject2$9,TabBar=function(e){var t=e.preSelectedTab,n=e.children;if(!Array.isArray(n)||n.length<2)throw new Error("Tab Bar must have at least two children");var r=_slicedToArray(v(t||n[0].props.label),2),a=r[0],o=r[1],i=function(e){o(e)};return m$1(_templateObject$b||(_templateObject$b=_taggedTemplateLiteral(["\n <div>\n <ol class=",">\n ",'\n </ol>\n <div className="tab-content">\n ',"\n </div>\n </div>\n "])),styles$6.nav,n.map((function(e){var t=e.props.label;return m$1(_templateObject2$9||(_templateObject2$9=_taggedTemplateLiteral(["\n <","\n activeTab=","\n key=","\n label=","\n onClick=","\n >\n <//>\n "])),Tab,a,t,t,i)})),n.map((function(e){if(e.props.label===a)return e.props.children})))},timeAgo=function(e){var t=Math.floor((Date.now()-e.getTime())/1e3),n=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"A few second",seconds:0}].find((function(e){return e.seconds<t}));if(n){var r=Math.floor(t/n.seconds);return Number.isInteger(r)||(r=0),"".concat(r>0?r:""," ").concat(n.label).concat(1!==r?"s":""," ago")}return"Cannot be formatted with interval ".concat(n)},css_248z$8=".styles-module_toggle__2c6vj {\n position: relative; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN {\n position: relative;\n border-radius: 9999px;\n background-color: #9ca3af;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n transition-timing-function: linear;\n position: relative;\n height: 20px;\n width: 40px; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN.styles-module_toggled__3gmsw {\n background: #39d239; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN label {\n position: absolute;\n left: 0px;\n margin-bottom: 0.5rem;\n transform: translateX(0px);\n cursor: pointer;\n border-radius: 9999px;\n border-width: 2px;\n border-style: solid;\n border-color: #9ca3af;\n background-color: white;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n height: 16px;\n width: 16px; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN label.styles-module_toggled__3gmsw {\n border-color: #39d239;\n transform: translateX(100%); }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN input {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 100%; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN input:active {\n outline: none; }\n .styles-module_toggle__2c6vj .styles-module_inner__2w3FN input:focus {\n outline: none; }\n",styles$5={toggle:"styles-module_toggle__2c6vj",inner:"styles-module_inner__2w3FN",toggled:"styles-module_toggled__3gmsw"},_templateObject$a;styleInject(css_248z$8);var Toggle=function(e){var t=e.id,n=e.value,r=e.onChange;return m$1(_templateObject$a||(_templateObject$a=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",">\n <label for="," class=",'></label>\n <input type="checkbox" id='," onclick="," />\n </div>\n </div>\n "])),styles$5.toggle,"".concat(styles$5.inner," ").concat(n?styles$5.toggled:""," "),t,"".concat(n?styles$5.toggled:""," "),t,(function(){r(!n)}))},css_248z$7=".styles-module_integrations__2vJT8 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n display: flex;\n flex-direction: column; }\n .styles-module_integrations__2vJT8 .styles-module_integration__MtN8C {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem; }\n .styles-module_integrations__2vJT8 .styles-module_integration__MtN8C img {\n height: 3rem;\n width: 3rem; }\n\n.styles-module_header__1d_zB {\n margin-bottom: 0.75rem;\n margin-top: 1.5rem;\n letter-spacing: 0.025em;\n --tw-text-opacity: 1;\n color: rgba(80, 156, 246, var(--tw-text-opacity)); }\n\n.styles-module_row__1UAlk {\n display: flex;\n align-items: center;\n justify-content: space-between;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-radius: 0.25rem;\n cursor: pointer;\n border-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n padding-top: 1rem;\n padding-bottom: 1rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n --tw-text-opacity: 1;\n color: rgba(55, 65, 81, var(--tw-text-opacity));\n transition: border-color 0.2s; }\n .styles-module_row__1UAlk:hover {\n border-color: #a8a8a8; }\n\n.styles-module_topbar__3TTLr {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 1rem; }\n",style$2={integrations:"styles-module_integrations__2vJT8",integration:"styles-module_integration__MtN8C",header:"styles-module_header__1d_zB",row:"styles-module_row__1UAlk",topbar:"styles-module_topbar__3TTLr"},_templateObject$9,_templateObject2$8,_templateObject3$7,_templateObject4$3,_templateObject5$2;function _createSuper$a(e){var t=_isNativeReflectConstruct$a();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$7);var IntegrationsList=function(e){_inherits(n,d$1);var t=_createSuper$a(n);function n(){var e;_classCallCheck(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return _defineProperty(_assertThisInitialized(e=t.call.apply(t,[this].concat(a))),"toggleIntegration",(function(t,n){e.props.apiHandler.toggleIntegration(t,n).then((function(e){console.info(e)})).catch((function(e){return console.error(e)}))})),_defineProperty(_assertThisInitialized(e),"onIntegrationDelete",(function(t){e.props.apiHandler.deleteIntegration(t).then((function(e){console.info(e)})).catch((function(e){return console.error(e)}))})),e}return _createClass(n,[{key:"render",value:function(){var e=this;return m$1(_templateObject$9||(_templateObject$9=_taggedTemplateLiteral(["\n <div>\n <div class=",">\n \x3c!-- <h2 class=",">My Flows</h2> --\x3e\n \x3c!-- <"," items=",' value="sort" //> --\x3e\n </div>\n <div class=','>\n <div class="flex w-12">Status</div>\n <div class="flex w-12"></div>\n <div class="flex-1 pl-4">Integration Name</div>\n <div class="w-24">Runs</div>\n <div class="w-40">Last Activity</div>\n <div class="w-16"></div>\n <div class="flex w-6"></div>\n </div>\n <div class=',">\n ","\n ","\n </div>\n </div>\n "])),style$2.topbar,style$2.header,ListBox,[{id:"sort",value:"Sort"}],style$2.row,style$2.integrations,this.props.integrations.length<1&&m$1(_templateObject2$8||(_templateObject2$8=_taggedTemplateLiteral(["No integrations"]))),this.props.integrations.map((function(t){return m$1(_templateObject3$7||(_templateObject3$7=_taggedTemplateLiteral(['\n <div\n class="'," ",'"\n >\n <div class=','>\n <div class="flex w-12">\n ','\n </div>\n <div class="flex w-12">\n <img src=',' />\n </div>\n <div class="flex-1 pl-4">','</div>\n <div class="w-24">','</div>\n <div class="w-40">\n ','\n </div>\n <div class="w-16">\n <',"\n id=","\n value=","\n onChange=",'\n >\n <//>\n </div>\n <div\n class="flex w-6 cursor-pointer"\n onclick=','\n >\n <svg\n width="12"\n height="15"\n viewBox="0 0 12 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M0 4.16667H12"\n stroke="#F05C42"\n stroke-width="1.2"\n />\n <path\n d="M10 5.5V6.16667L9.33333 13.5H2.66667L2 6.16667V5.5"\n stroke="#F05C42"\n stroke-width="1.2"\n stroke-linejoin="round"\n />\n <path\n d="M4 3.5V2.16667C4 1.79848 4.29848 1.5 4.66667 1.5H7.33333C7.70152 1.5 8 1.79848 8 2.16667V3.5"\n stroke="#F05C42"\n stroke-width="1.2"\n />\n </svg>\n </div>\n </div>\n </div>\n '])),style$2.integration,"integry_container_Integration",style$2.row,"fail"!==t.task_execution.status?m$1(_templateObject4$3||(_templateObject4$3=_taggedTemplateLiteral(['\n <svg\n width="22"\n height="22"\n viewBox="0 0 25 25"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="12.5"\n cy="12.5"\n r="12.5"\n fill="#2ECC71"\n />\n <path\n d="M17.2209 9.16699L11.3907 15.8337L8.33203 12.3361"\n stroke="white"\n stroke-width="1.2"\n stroke-linecap="round"\n />\n </svg>\n ']))):m$1(_templateObject5$2||(_templateObject5$2=_taggedTemplateLiteral(['<svg\n width="22"\n height="25"\n viewBox="0 0 25 27"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle cx="12.5" cy="12.5" r="12.5" fill="#E26154" />\n <g filter="url(#filter0_d)">\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M11.1886 8.05792C11.1209 7.32574 11.7556 6.61621 12.4701 6.61621C13.2413 6.61621 13.8535 7.32568 13.7963 8.05792L13.3542 13.5234C13.3206 14.0117 12.8896 14.3955 12.4019 14.3605C11.9713 14.3255 11.6422 13.9535 11.6196 13.5234L11.1886 8.05792ZM11.1836 16.9743C11.1836 16.3124 11.7654 15.7737 12.4835 15.7737C13.2189 15.7737 13.8007 16.3124 13.8 16.9743V17.2052C13.8 17.8671 13.2015 18.3902 12.4835 18.3902C11.7647 18.3902 11.1836 17.8671 11.1836 17.2052V16.9743Z"\n fill="white"\n />\n </g>\n <defs>\n <filter\n id="filter0_d"\n x="7.18359"\n y="6.61621"\n width="10.6164"\n height="19.7739"\n filterUnits="userSpaceOnUse"\n color-interpolation-filters="sRGB"\n >\n <feFlood\n flood-opacity="0"\n result="BackgroundImageFix"\n />\n <feColorMatrix\n in="SourceAlpha"\n type="matrix"\n values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"\n result="hardAlpha"\n />\n <feOffset dy="4" />\n <feGaussianBlur stdDeviation="2" />\n <feColorMatrix\n type="matrix"\n values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"\n />\n <feBlend\n mode="normal"\n in2="BackgroundImageFix"\n result="effect1_dropShadow"\n />\n <feBlend\n mode="normal"\n in="SourceGraphic"\n in2="effect1_dropShadow"\n result="shape"\n />\n </filter>\n </defs>\n </svg> ']))),t.icon_url,t.name,t.runs_count,t.task_execution.last_execution_at?timeAgo(new Date("".concat(t.task_execution.last_execution_at.date," ").concat(t.task_execution.last_execution_at.timezone))):"Never run",Toggle,t.id,"ACTIVE"===t.status,(function(n){return e.toggleIntegration(t.id,n)}),(function(){return e.onIntegrationDelete(t.id)}))})))}}]),n}(),TemplateFormRenderModes,TemplateListingRenderModes;!function(e){e.MODAL="MODAL",e.INLINE="INLINE",e.DETACHED="DETACHED",e.CUSTOM="CUSTOM"}(TemplateFormRenderModes||(TemplateFormRenderModes={})),function(e){e.GRID="GRID",e.LIST="LIST"}(TemplateListingRenderModes||(TemplateListingRenderModes={}));var css_248z$6=".styles-module_template_list__3HABS {\n display: grid;\n grid-template-columns: repeat(1, minmax(0, 1fr));\n gap: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; }\n\n.styles-module_template_grid__mH7-0 {\n display: grid;\n grid-template-columns: repeat(1, minmax(0, 1fr));\n gap: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; }\n @media (min-width: 768px) {\n .styles-module_template_grid__mH7-0 {\n grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n @media (min-width: 1280px) {\n .styles-module_template_grid__mH7-0 {\n grid-template-columns: repeat(5, minmax(0, 1fr)); } }\n\n.styles-module_header__cdTrS {\n margin-bottom: 0.75rem;\n margin-top: 1.5rem;\n letter-spacing: 0.025em;\n --tw-text-opacity: 1;\n color: rgba(80, 156, 246, var(--tw-text-opacity)); }\n",style$1={template_list:"styles-module_template_list__3HABS",template_grid:"styles-module_template_grid__mH7-0",header:"styles-module_header__cdTrS"},_templateObject$8,_templateObject2$7,_templateObject3$6,_templateObject4$2;function _createSuper$9(e){var t=_isNativeReflectConstruct$9();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$9(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$6);var TemplatesView=function(e){_inherits(n,d$1);var t=_createSuper$9(n);function n(){var e;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(e=t.call(this)),"filterTemplates",(function(t){t?e.setState({filteredTemplates:fuzzysort.go(t,e.state.templates,{keys:["name","branding_app.tags"],scoreFn:function(e){var t=e[0],n=e[1];return Math.max(t?t.score+100:-1/0,n?n.score:-1/0)}}).map((function(e){return e.obj}))}):e.setState({filteredTemplates:e.state.templates})})),_defineProperty(_assertThisInitialized(e),"onTemplateClick",(function(t){e.props.setGenericData({templateId:t}),e.props.onTemplateClick&&e.props.onTemplateClick(t)})),e.state={loading:!1,integrations:[],templates:[],filteredTemplates:[]},e}return _createClass(n,[{key:"componentDidMount",value:function(){var e=this;this.setState({loading:!0}),this.props.apiHandler.getTemplateListing(this.props.bundleId).then((function(t){t&&e.setState({integrations:t.integrations,templates:t.templates,filteredTemplates:t.templates,loading:!1})}))}},{key:"render",value:function(){var e,t,n=this;return m$1(_templateObject$8||(_templateObject$8=_taggedTemplateLiteral(["\n <div>\n ","\n </div>\n "])),this.state.loading?m$1(_templateObject2$7||(_templateObject2$7=_taggedTemplateLiteral([" <"," //> "])),Loader):m$1(_templateObject3$6||(_templateObject3$6=_taggedTemplateLiteral(["\n <",">\n <div\n label=","\n >\n \x3c!-- <h2 class=",">Available Flows</h2> --\x3e\n <div>\n <","\n resultCount=","\n onChange=",'\n >\n <//>\n </div>\n <div\n class="'," ",'"\n >\n ',"\n </div>\n </div>\n <div label=",">\n <"," apiHandler=","\n integrations="," //>\n </div>\n <//>\n "])),TabBar,(null===(e=this.props.userConfig)||void 0===e?void 0:e.availableFlowsLabel)||"Available Flows",style$1.header,TemplateSearch,this.state.filteredTemplates.length,(function(e){return n.filterTemplates(e)}),this.props.layout===TemplateListingRenderModes.LIST?style$1.template_list:style$1.template_grid,"integry-container_TemplatesView",this.state.filteredTemplates.map((function(e){return m$1(_templateObject4$2||(_templateObject4$2=_taggedTemplateLiteral(["\n <","\n name=","\n description=","\n layout=","\n tags=","\n imgUrl=","\n onClick=","\n >\n <//>\n "])),n.props.templateContainerTemplate,e.name,e.description,n.props.layout,e.branding_app.tags,e.branding_app.icon_url,(function(){return n.onTemplateClick(e.id)}))})),(null===(t=this.props.userConfig)||void 0===t?void 0:t.myFlowsLabel)||"My Flows",IntegrationsList,this.props.apiHandler,this.state.integrations))}}],[{key:"handleClick",value:function(e){e.preventDefault(),e.target instanceof HTMLElement&&console.info(e.target.localName)}}]),n}(),TemplatesView$1=preact.connect("userConfig",actionFunctions)(TemplatesView),css_248z$5=".styles-module_navigation__2nFX8 {\n width: 12rem; }\n\n.styles-module_navItem__ozaSU {\n margin-bottom: 0.5rem;\n cursor: pointer;\n --tw-text-opacity: 1;\n color: rgba(31, 41, 55, var(--tw-text-opacity)); }\n .styles-module_navItem__ozaSU .styles-module_navItemContent__3UHl8 {\n display: flex;\n height: 2.5rem;\n align-items: center;\n font-size: 0.875rem;\n line-height: 1.25rem; }\n .styles-module_navItem__ozaSU .styles-module_navItemContent__3UHl8 .styles-module_imgContainer__c7lfR {\n margin-right: 0.75rem;\n height: 1.5rem;\n width: 1.5rem;\n overflow: hidden;\n border-radius: 9999px; }\n .styles-module_navItem__ozaSU .styles-module_navItemContent__3UHl8 .styles-module_imgContainer__c7lfR img,\n .styles-module_navItem__ozaSU .styles-module_navItemContent__3UHl8 .styles-module_imgContainer__c7lfR svg {\n height: 100%;\n width: 100%;\n object-fit: cover; }\n .styles-module_navItem__ozaSU.styles-module_active__1nm22 {\n opacity: 1; }\n .styles-module_navItem__ozaSU.styles-module_disabled__1JpJ1 {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n opacity: 0.5; }\n",styles$4={navigation:"styles-module_navigation__2nFX8",navItem:"styles-module_navItem__ozaSU",navItemContent:"styles-module_navItemContent__3UHl8",imgContainer:"styles-module_imgContainer__c7lfR",active:"styles-module_active__1nm22",disabled:"styles-module_disabled__1JpJ1"},_templateObject$7,_templateObject2$6,_templateObject3$5,_templateObject4$1,_templateObject5$1;function _createSuper$8(e){var t=_isNativeReflectConstruct$8();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$8(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$5);var TickMark=m$1(_templateObject$7||(_templateObject$7=_taggedTemplateLiteral([' <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n>\n <rect opacity="0.7" width="15" height="15" rx="7.5" fill="#2ECC71" />\n <path\n d="M9.23107 6.34619L6.96066 8.94234L5.76953 7.58033"\n stroke="white"\n stroke-width="1.2"\n stroke-linecap="round"\n />\n</svg>']))),FinalTickMark=m$1(_templateObject2$6||(_templateObject2$6=_taggedTemplateLiteral(['\n <svg\n width="15"\n height="15"\n viewBox="0 0 15 15"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="7.5"\n cy="7.5"\n r="6.75"\n fill="white"\n stroke="#2ECC71"\n stroke-width="1.5"\n />\n <path\n d="M10.3333 5.5L6.83522 9.5L5 7.40148"\n stroke="#2ECC71"\n stroke-width="1.5"\n stroke-linecap="round"\n />\n </svg>\n']))),NavItem=function(e){_inherits(n,d$1);var t=_createSuper$8(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"render",value:function(){var e=this.props,t=e.logoUrl,n=e.isActive,r=void 0!==n&&n,a=e.isCompleted,o=void 0!==a&&a,i=e.isDisabled,l=void 0!==i&&i,s=e.isLastStep,p=void 0!==s&&s,c=e.onClick,d=void 0===c?function(){return null}:c;return m$1(_templateObject3$5||(_templateObject3$5=_taggedTemplateLiteral(["\n <div\n class=","\n onclick=",'\n tabindex="-1"\n role="button"\n >\n <div class=',">\n <div class=",">\n ","\n </div>\n <div>","</div>\n </div>\n </div>\n "])),"".concat(styles$4.navItem," ").concat(l?styles$4.disabled:""," ").concat(r?styles$4.active:""),d,styles$4.navItemContent,styles$4.imgContainer,p?FinalTickMark:m$1(_templateObject4$1||(_templateObject4$1=_taggedTemplateLiteral(["\n ","\n "])),!o||r?m$1(_templateObject5$1||(_templateObject5$1=_taggedTemplateLiteral(["<img src="," />"])),t):TickMark),this.props.label)}}]),n}(),_templateObject$6,_templateObject2$5,_templateObject3$4;function _createSuper$7(e){var t=_isNativeReflectConstruct$7();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$7(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var StepNavigation=function(e){_inherits(n,d$1);var t=_createSuper$7(n);function n(){var e;_classCallCheck(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return _defineProperty(_assertThisInitialized(e=t.call.apply(t,[this].concat(a))),"changeStep",(function(t){e.props.gotoStep(t)})),e}return _createClass(n,[{key:"render",value:function(){var e,t=this,n=this.props.stepState,r=null==n?void 0:n.currentStep;return m$1(_templateObject$6||(_templateObject$6=_taggedTemplateLiteral(["\n <div class=",">\n <div>\n ","\n <",'\n label="Confirmation"\n isCompleted=',"\n isActive=","\n isDisabled=","\n isLastStep=","\n onClick=","\n />\n </div>\n </div>\n "])),styles$4.navigation,this.props.stepState&&m$1(_templateObject2$5||(_templateObject2$5=_taggedTemplateLiteral(["\n ","\n "])),null===(e=this.props.stepState)||void 0===e?void 0:e.steps.map((function(e,a){return m$1(_templateObject3$4||(_templateObject3$4=_taggedTemplateLiteral([" <","\n label=","\n logoUrl=","\n isCompleted=","\n isActive=","\n isDisabled=","\n isLastStep=","\n onClick=","\n />"])),NavItem,"CONFIRMATION"!==e.type?e.title:"Confirmation","CONFIRMATION"!==e.type&&e.iconUrl,e.isCompleted,"CONFIRMATION"!==(null==r?void 0:r.type)&&"CONFIRMATION"!==e.type&&n.stepIndex===a,Number(null==n?void 0:n.stepIndex)<a,!1,(function(){return t.changeStep(a)}))}))),NavItem,!0,void 0!==r&&(null==n?void 0:n.stepIndex)===(null==n?void 0:n.steps.length),void 0!==r&&(null==n?void 0:n.stepIndex)!==(null==n?void 0:n.steps.length),!0,(function(){var e;return t.changeStep(null!==(e=null==n?void 0:n.steps.length)&&void 0!==e?e:0)}))}}]),n}();StepNavigation.defaultProps={currentStepIndex:-1,completedTillIndex:-1};var StepNavigation$1=preact.connect("stepState",actionFunctions)(StepNavigation),css_248z$4=".styles-module_stepsWrap__axf95 {\n min-height: 400px;\n margin-top: 1rem;\n display: flex;\n min-height: 400px; }\n .styles-module_stepsWrap__axf95 .styles-module_stepsContainer__1vEyC {\n border-width: 0px;\n border-right-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, var(--tw-border-opacity));\n padding-right: 1rem; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c {\n display: flex;\n width: 100%;\n flex-direction: column;\n padding-left: 1rem; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c .styles-module_top__1EhEd {\n display: flex;\n width: 100%;\n flex: 1 1 0%; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c .styles-module_bottom__3dACP {\n display: flex;\n justify-content: flex-end; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c .styles-module_bottom__3dACP .styles-module_buttons__LDv9h {\n display: flex; }\n .styles-module_stepsWrap__axf95 .styles-module_stepContainer__1u05c .styles-module_bottom__3dACP .styles-module_buttons__LDv9h button:not(:last-child) {\n margin-right: 14px; }\n",styles$3={stepsWrap:"styles-module_stepsWrap__axf95",stepsContainer:"styles-module_stepsContainer__1vEyC",stepContainer:"styles-module_stepContainer__1u05c",top:"styles-module_top__1EhEd",bottom:"styles-module_bottom__3dACP",buttons:"styles-module_buttons__LDv9h"},_templateObject$5,_templateObject2$4,_templateObject3$3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11;function _createSuper$6(e){var t=_isNativeReflectConstruct$6();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$6(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$4);var Steps=function(e){_inherits(n,d$1);var t=_createSuper$6(n);function n(e){var r;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(r=t.call(this,e)),"createIntegration",(function(){var e,t,n=r.props,a=n.stepMapping,o=n.stepDataMapping;console.info(a),r.setState({loading:!0});var i={name:null!==(e=null===(t=r.props.genericData.templateApp)||void 0===t?void 0:t.name)&&void 0!==e?e:"My new flow",notification_email:"",template:Number(r.props.genericData.templateId),bundle_id:Number(r.props.genericData.bundleId),steps:Object.keys(a).map((function(e){return{id:a[e].step.id,authorization:Number(a[e].selectedAuthId),template_step:a[e].step.id,app_user_data:a[e].step.template_fields.map((function(t){return{id:t.id,value:!o[a[e].step.id][t.id].value&&""!==o[a[e].step.id][t.id].value||o[a[e].step.id][t.id].objectValue?JSON.stringify(o[a[e].step.id][t.id].objectValue):"".concat(o[a[e].step.id][t.id].value),template_field:t.id}}))}}))};console.info(i),r.context.apiHandler.saveIntegration(i).then((function(e){console.info(e),r.setState({loading:!1})})).catch((function(e){return console.error(e)}))})),_defineProperty(_assertThisInitialized(r),"handleAuthSelected",(function(e,t,n,a){var o=r.props.stepMapping[t].step.template_fields.filter((function(e){return e.activity_field&&e.activity_field.is_dynamic})).map((function(e){return e.id}));r.props.setStepAuthorization(t,e,n,o,a)})),r.state={loading:!1,selectedAuthStep:null},r}return _createClass(n,[{key:"render",value:function(){var e,t,n,r,a,o=this,i=null,l=this.props.stepState,s=l.currentStep,p=l.stepIndex,c=l.steps,d=!1,u=!1,_=!1,m=!1;p>-1&&"CONFIRMATION"!==(null==s?void 0:s.type)?(i=this.props.stepMapping[Number(null==s?void 0:s.stepId)],d=!1,u=this.props.stepState.stepIndex>0,_=null!==(a=null==s?void 0:s.isValid)&&void 0!==a&&a,m=l.showValidation):"CONFIRMATION"===(null==s?void 0:s.type)&&p===c.length&&(d=!0);return m$1(_templateObject$5||(_templateObject$5=_taggedTemplateLiteral(["\n <div class=",">\n <div class=",">\n <","\n steps=","\n currentStepIndex=","\n completedTillIndex=","\n ><//>\n </div>\n <div class=",">\n <div class=",">\n ","\n </div>\n\n <div class=",">\n ","\n </div>\n <div class=",">\n <div class=",">\n ","\n ","\n </div>\n </div>\n </div>\n </div>\n "])),styles$3.stepsWrap,styles$3.stepsContainer,StepNavigation$1,null===(e=this.props.steps)||void 0===e?void 0:e.map((function(e){return{label:e.title,logoUrl:e.activity.app.icon_url}})),-1,-1,styles$3.stepContainer,styles$3.stepInfo,d?m$1(_templateObject2$4||(_templateObject2$4=_taggedTemplateLiteral(['\n <svg\n width="25"\n height="25"\n viewBox="0 0 25 25"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <circle\n cx="12.5"\n cy="12.5"\n r="11.75"\n fill="white"\n stroke="#2ECC71"\n stroke-width="1.5"\n />\n <path\n d="M17.2209 9.16699L11.3907 15.8337L8.33203 12.3361"\n stroke="#2ECC71"\n stroke-width="1.5"\n stroke-linecap="round"\n />\n </svg>\n <div>Confirmation</div>\n ']))):m$1(_templateObject3$3||(_templateObject3$3=_taggedTemplateLiteral(["\n \x3c!-- <img src="," />\n <div>","</div> --\x3e\n "])),null===(t=i)||void 0===t?void 0:t.step.activity.app.icon_url,null===(n=i)||void 0===n?void 0:n.step.title),styles$3.top,d?m$1(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div class=",">\n Your integration is ready to be enabled. Click “Save” to\n continue.\n </div>\n "])),styles$3.save):m$1(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n ","\n "])),i&&m$1(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n ","\n "])),"AUTH"===(null==s?void 0:s.type)?m$1(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div class=",">\n <","\n stepId=","\n apiHandler=","\n showErrors=","\n onAuthSelected=","\n >\n <//>\n </div>\n "])),styles$3.stepWrap,AuthSelector$1,i.step.id,this.context.apiHandler,m,(function(e,t,n){var r;return o.handleAuthSelected(e,Number(null===(r=i)||void 0===r?void 0:r.step.id),t,n)})):m$1(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <","\n step=","\n stepType=","\n showStepValidation=","\n apiHandler=","\n eventEmitter=","\n />\n "])),Step$1,null===(r=i)||void 0===r?void 0:r.step,null==s?void 0:s.type,m,this.context.apiHandler,this.context.eventEmitter))),styles$3.bottom,styles$3.buttons,u&&m$1(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <",'\n label="Back"\n onClick=',"\n type=","\n ><//>\n "])),Button,(function(){return o.props.gotoPreviousStep()}),ButtonTypes.SECONDARY),d?m$1(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <",'\n label="Save"\n isLoading=',"\n onClick=","\n ><//>\n "])),Button,this.state.loading,(function(){return o.createIntegration()})):m$1(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <",'\n label="Next"\n disabled=',"\n onClick=","\n ><//>\n "])),Button,!_,(function(){return _?o.props.gotoNextStep():o.props.showStepValidationState()})))}}]),n}();_defineProperty(Steps,"contextType",AppContext);var Steps$1=preact.connect(["stepState","genericData","stepMapping","stepDataMapping"],actionFunctions)(Steps),css_248z$3=".styles-module_header__3p3k1 {\n width: 100%;\n align-items: center;\n display: flex;\n height: 100%;\n margin-bottom: 1rem; }\n .styles-module_header__3p3k1 img {\n border-radius: 9999px;\n margin-right: 0.5rem; }\n .styles-module_header__3p3k1 .styles-module_name__2PDqJ {\n font-weight: 700;\n line-height: 1.625; }\n .styles-module_header__3p3k1 .styles-module_description__39K41 {\n font-weight: 300;\n font-size: 0.875rem;\n line-height: 1.25rem; }\n",styles$2={header:"styles-module_header__3p3k1",name:"styles-module_name__2PDqJ",description:"styles-module_description__39K41"},_templateObject$4,_templateObject2$3,_templateObject3$2;function _createSuper$5(e){var t=_isNativeReflectConstruct$5();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$5(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$3);var TemplateForm=function(e){_inherits(n,d$1);var t=_createSuper$5(n);function n(){var e;return _classCallCheck(this,n),(e=t.call(this)).state={loading:!0,template:null},e}return _createClass(n,[{key:"componentDidMount",value:function(){var e=this;this.props.apiHandler.getTemplate(this.props.templateId).then((function(t){t&&Promise.all(t.steps.map((function(t){return e.props.apiHandler.getTemplateStep(Number(t.id))}))).then((function(n){e.setState({template:t,loading:!1}),e.props.setSteps(n.filter(notEmpty)),e.props.setStepMapping(n.filter(notEmpty)),e.props.setParentChildMapping(n.filter(notEmpty)),e.props.setGenericData({templateId:Number(e.props.templateId),bundleId:Number(e.props.bundleId)})})).catch((function(e){return console.error(e)}))})).catch((function(e){throw new Error(e)}))}},{key:"render",value:function(){var e=this.state.template;return m$1(_templateObject$4||(_templateObject$4=_taggedTemplateLiteral(["\n <div>\n ","\n </div>\n "])),this.state.loading?m$1(_templateObject2$3||(_templateObject2$3=_taggedTemplateLiteral(["<"," //>"])),Loader):m$1(_templateObject3$2||(_templateObject3$2=_taggedTemplateLiteral(["\n <div class=",">\n <img src=",' width="40" />\n <div>\n <div class=',">","</div>\n <div class=",">\n ","\n </div>\n </div>\n </div>\n\n <","\n steps=","\n apiHandler=","\n eventEmitter=","\n />\n "])),styles$2.header,null==e?void 0:e.branding_app.icon_url,styles$2.name,null==e?void 0:e.name,styles$2.description,null==e?void 0:e.description,Steps$1,null==e?void 0:e.steps,this.props.apiHandler,this.props.eventEmitter))}}]),n}(),TemplateForm$1=preact.connect("",actionFunctions)(TemplateForm),css_248z$2=".styles-module_name__3qMVY {\n margin-bottom: 0.5rem;\n --tw-text-opacity: 1;\n color: rgba(31, 41, 55, var(--tw-text-opacity)); }\n\n.styles-module_description__2S97K {\n font-size: 0.875rem;\n line-height: 1.25rem;\n --tw-text-opacity: 1;\n color: rgba(107, 114, 128, var(--tw-text-opacity)); }\n\n.styles-module_tags__2fhyE {\n margin-top: 0.5rem;\n margin-bottom: -0.5rem;\n display: flex;\n flex-wrap: wrap; }\n .styles-module_tags__2fhyE .styles-module_tag__26APx {\n margin-right: 0.5rem;\n margin-bottom: 0.5rem;\n border-radius: 0.75rem;\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, var(--tw-bg-opacity));\n padding: 0.25rem;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n font-size: 0.75rem;\n line-height: 1rem;\n --tw-text-opacity: 1;\n color: rgba(107, 114, 128, var(--tw-text-opacity)); }\n\n.styles-module_template_list_view__jxmde {\n display: flex;\n cursor: pointer;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 0.25rem;\n border-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n transition: border-color 0.2s; }\n .styles-module_template_list_view__jxmde img {\n margin-bottom: 0.75rem;\n height: 2.5rem;\n width: 2.5rem; }\n .styles-module_template_list_view__jxmde:hover {\n border-color: #a8a8a8; }\n\n.styles-module_template_grid_view__WmHjg {\n display: flex;\n cursor: pointer;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 0.25rem;\n border-width: 1px;\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n transition: border-color 0.2s; }\n .styles-module_template_grid_view__WmHjg img {\n margin-bottom: 0.75rem;\n height: 2.5rem;\n width: 2.5rem; }\n .styles-module_template_grid_view__WmHjg:hover {\n border-color: #a8a8a8; }\n",style={name:"styles-module_name__3qMVY",description:"styles-module_description__2S97K",tags:"styles-module_tags__2fhyE",tag:"styles-module_tag__26APx",template_list_view:"styles-module_template_list_view__jxmde",template_grid_view:"styles-module_template_grid_view__WmHjg"},_templateObject$3,_templateObject2$2,_templateObject3$1;function _createSuper$4(e){var t=_isNativeReflectConstruct$4();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$4(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$2);var Template=function(e){_inherits(n,d$1);var t=_createSuper$4(n);function n(e){var r;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(r=t.call(this,e)),"handleClick",(function(){console.info(r.props.name)})),r.state={templateName:r.props.name},r}return _createClass(n,[{key:"render",value:function(){return m$1(_templateObject$3||(_templateObject$3=_taggedTemplateLiteral(["\n <div\n onclick=",'\n class="'," ",'"\n >\n <div>\n <img src='," />\n <p class=",">","</p>\n <p class=",">","</p>\n </div>\n ","\n </div>\n "])),this.props.onClick,this.props.layout===TemplateListingRenderModes.LIST?style.template_list_view:style.template_grid_view,"integry-container_Template",this.props.imgUrl,style.name,this.state.templateName,style.description,this.props.description,this.props.tags.length>0&&m$1(_templateObject2$2||(_templateObject2$2=_taggedTemplateLiteral(["\n <div class=",">\n ","\n </div>\n "])),style.tags,this.props.tags.split(",").map((function(e){return m$1(_templateObject3$1||(_templateObject3$1=_taggedTemplateLiteral([" <div class=",">","</div> "])),style.tag,e)}))))}}],[{key:"handleClick",value:function(e){e.preventDefault(),e.target instanceof HTMLElement&&console.info(e.target.localName)}}]),n}(),css_248z$1=".styles-module_modal__3ImBF {\n display: none;\n z-index: 99;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n overflow-y: auto; }\n .styles-module_modal__3ImBF.styles-module_open__AAUJ5 {\n position: fixed;\n display: block; }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt {\n display: flex;\n min-height: 100vh;\n align-items: flex-end;\n justify-content: center;\n text-align: center; }\n @media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt {\n display: block;\n padding: 0; } }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_inset__-NimT {\n position: fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n opacity: 0.75;\n background-color: #111827; }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_span__3nIVQ {\n display: none; }\n @media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_span__3nIVQ {\n display: inline-block;\n height: 100vh;\n vertical-align: middle; } }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n display: none;\n position: relative;\n vertical-align: bottom;\n background: white;\n border-radius: 4px;\n text-align: left;\n overflow: hidden;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd.styles-module_open__AAUJ5 {\n display: inline-block; }\n @media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 100%;\n max-width: 48rem;\n margin-top: 2rem;\n margin-bottom: 2rem;\n vertical-align: middle; } }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_content__3wdFn {\n position: relative;\n background: white;\n padding: 30px; }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 10px;\n right: 10px; }\n",styles$1={modal:"styles-module_modal__3ImBF",open:"styles-module_open__AAUJ5",modalContainer:"styles-module_modalContainer__o6TKt",inset:"styles-module_inset__-NimT",span:"styles-module_span__3nIVQ",contentWrap:"styles-module_contentWrap__2QGtd",content:"styles-module_content__3wdFn",close:"styles-module_close__2IqHP"},_templateObject$2,_templateObject2$1;function _createSuper$3(e){var t=_isNativeReflectConstruct$3();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$3(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z$1);var Modal=function(e){_inherits(n,d$1);var t=_createSuper$3(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"render",value:function(){var e=this.props.isOpen;return m$1(_templateObject$2||(_templateObject$2=_taggedTemplateLiteral(["\n <div\n class=",'\n aria-labelledby="modal-title"\n role="dialog"\n aria-modal="true"\n >\n <div class=',">\n <div class=",' aria-hidden="true"></div>\n\n <span class=',' aria-hidden="true"></span>\n\n <div\n class=',"\n >\n <div class=",">\n <div\n onclick=","\n class=",'\n >\n <svg\n width="20"\n height="22"\n viewBox="0 0 20 22"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M14.2426 16.1822L5.75732 6.86328"\n stroke="#999999"\n stroke-width="2"\n stroke-linecap="round"\n />\n <path\n d="M14.2426 6.86328L5.75732 16.1822"\n stroke="#999999"\n stroke-width="2"\n stroke-linecap="round"\n />\n </svg>\n </div>\n ',"\n </div>\n </div>\n </div>\n </div>\n "])),"".concat(styles$1.modal," ").concat(e?"".concat(styles$1.open):""),styles$1.modalContainer,styles$1.inset,styles$1.span,"".concat(styles$1.contentWrap," ").concat(e?"".concat(styles$1.open):""),styles$1.content,this.props.onClose,styles$1.close,this.props.isOpen&&m$1(_templateObject2$1||(_templateObject2$1=_taggedTemplateLiteral([" "," "])),this.props.children))}}]),n}(),css_248z=".styles-module_integry-container__3nnxM {\n margin-bottom: 0.5rem; }\n\n.styles-module_modal__3R9nC {\n position: fixed;\n z-index: 10;\n overflow-y: auto;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px; }\n",styles={"integry-container":"styles-module_integry-container__3nnxM",modal:"styles-module_modal__3R9nC"},_templateObject$1;function _createSuper$2(e){var t=_isNativeReflectConstruct$2();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}styleInject(css_248z);var Container=function(e){_inherits(n,d$1);var t=_createSuper$2(n);function n(e){var r;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(r=t.call(this,e)),"templateComponent",void 0),_defineProperty(_assertThisInitialized(r),"templateListComponent",void 0),_defineProperty(_assertThisInitialized(r),"store",void 0),_defineProperty(_assertThisInitialized(r),"onTemplateClick",(function(e){r.setState({isModalOpen:!0,templateId:e})})),r.state={isModalOpen:!1,templateId:null},r.store=createSDKStore(),r.store.setState({userConfig:e.userConfig}),r}return _createClass(n,[{key:"componentWillMount",value:function(){this.templateComponent=Template,this.templateListComponent=TemplatesView$1}},{key:"render",value:function(){var e=this;return m$1(_templateObject$1||(_templateObject$1=_taggedTemplateLiteral(["\n <>\n <"," store=",'>\n <div class="'," ",'">\n <',"\n layout=","\n bundleId=","\n templateContainerTemplate=","\n apiHandler=","\n eventEmitter=","\n onTemplateClick=","\n >\n </div>\n <"," \n isOpen="," \n onClose=","\n > \n <"," \n apiHandler=","\n templateId=","\n bundleId="," \n />\n <//>\n <//>\n </>\n "])),preact.Provider,this.store,styles["integry-container"],"integry-container",this.templateListComponent,this.props.layout,this.props.bundleId,this.templateComponent,this.context.apiHandler,this.context.eventEmitter,this.onTemplateClick,Modal,this.state.isModalOpen,(function(){e.store.setState(initialState),e.setState({isModalOpen:!1,templateId:null})}),TemplateForm$1,this.context.apiHandler,this.state.templateId,this.props.bundleId)}}]),n}();_defineProperty(Container,"contextType",AppContext);var EventRunnerAbstract=function(){function e(t,n){_classCallCheck(this,e),_defineProperty(this,"emitter",void 0),_defineProperty(this,"handler",void 0),this.emitter=t,this.handler=n}return _createClass(e,[{key:"getHandler",value:function(){return this.handler}}]),e}();function _createSuper$1(e){var t=_isNativeReflectConstruct$1();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var EventRunnerDefault=function(e){_inherits(n,EventRunnerAbstract);var t=_createSuper$1(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"run",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.handler.apply(null,n)}}]),n}();function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=_superPropBase(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var n,r=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var EventRunnerNTimes=function(e){_inherits(n,EventRunnerDefault);var t=_createSuper(n);function n(e,r){var a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(_classCallCheck(this,n),_defineProperty(_assertThisInitialized(a=t.call(this,e,r)),"total",void 0),_defineProperty(_assertThisInitialized(a),"i",0),a.total=o,a.total<1)throw new Error("{total} can not be less than 1");return a}return _createClass(n,[{key:"run",value:function(e){for(var t,r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];(t=_get(_getPrototypeOf(n.prototype),"run",this)).call.apply(t,[this,e].concat(a)),++this.i>=this.total&&this.emitter.off(e,this.handler)}}]),n}(),EventEmitter=function(){function e(){_classCallCheck(this,e),_defineProperty(this,"events",Object.create(null))}return _createClass(e,[{key:"on",value:function(e,t){this.addEventListener(e,new EventRunnerDefault(this,t))}},{key:"once",value:function(e,t){this.addEventListener(e,new EventRunnerNTimes(this,t,1))}},{key:"off",value:function(e,t){var n=this.events[e];null!=n&&n.length&&(this.events[e]=n.filter((function(e){return e.getHandler()!==t})))}},{key:"offAll",value:function(){var e=this;Object.keys(this.events).forEach((function(t){var n=e.events[t];n&&(n.length=0)})),this.events=Object.create(null)}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=this.events[e];a&&a.forEach((function(t){return t.run.apply(t,[e].concat(n))}))}},{key:"addEventListener",value:function(e,t){var n=this.events[e];Array.isArray(n)?n.push(t):this.events[e]=[t]}}]),e}(),_templateObject,_templateObject2,_templateObject3;function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Helpers={getAuthHash:HMAC},IntegryJS=function e(t){var n,r,a,o,i=this;(_classCallCheck(this,e),_defineProperty(this,"config",void 0),_defineProperty(this,"apiHandler",void 0),_defineProperty(this,"eventEmitter",new EventEmitter),_defineProperty(this,"getRandomTemplateId",(function(e){for(var t=[],n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",r=n.length,a=0;a<e;a+=1)t.push(n.charAt(Math.floor(Math.random()*r)));return"x-integry-modal-".concat(t.join(""))})),_defineProperty(this,"getAuthParamsFromUrl",(function(){var e=isBrowser()&&new URLSearchParams(window.location.search);if(e){var t=e.get("user_id"),n=e.get("app_key"),r=e.get("hash"),a=e.get("bundle_id");if(!(t&&n&&r&&a))throw new Error("The following auth variables are undefined: ".concat(t?"":"userId"," ").concat(n?"":"appKey"," ").concat(r?"":"hash"," ").concat(a?"":"bundleId"));return{userId:t,appKey:n,hash:r,bundleId:a}}return{userId:"",appKey:"",hash:"",bundleId:""}})),_defineProperty(this,"printVersion",(function(){console.info("@integry/sdk@".concat(e.SDK_VERSION))})),_defineProperty(this,"getTemplatesList",_asyncToGenerator(_regeneratorRuntime.mark((function e(){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i.apiHandler.getTemplateListing(i.config.bundleId));case 1:case"end":return e.stop()}}),e)})))),_defineProperty(this,"setupTemplateFormDestination",(function(e,t){var n=null;if(t){if(e===TemplateFormRenderModes.MODAL||e===TemplateFormRenderModes.INLINE)throw new Error('The `templateContainerId` property is unsupported when render mode is set to "MODAL" or "INLINE"');(n=document.getElementById(t))||console.warn("The template form render target with id ".concat(t," was not found"))}switch(e){case TemplateFormRenderModes.MODAL:return(n=document.createElement("div")).id=i.getRandomTemplateId(8),document.body.appendChild(n),n;case TemplateFormRenderModes.INLINE:return null;case TemplateFormRenderModes.DETACHED:case TemplateFormRenderModes.CUSTOM:return n;default:throw new Error("Unsupported renderMode ".concat(e," configuration, please provide one of ").concat(JSON.stringify(Object.keys(TemplateFormRenderModes))))}})),_defineProperty(this,"renderTemplateForm",(function(e,t){var n=document.getElementById(t);if(n){var r=createSDKStore();E$1(m$1(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <","\n value=","\n >\n <"," store=",">\n <","\n bundleId=","\n templateId=","\n >\n <//>\n <//>\n <//>\n "])),AppContext.Provider,{apiHandler:i.apiHandler,eventEmitter:i.eventEmitter,integrationId:i.config.integrationId,isPreviewMode:!1,isEditMode:!!i.config.integrationId},preact.Provider,r,Wrapper$1,i.config.bundleId,e),n)}else console.warn("Integry template form render target with id ".concat(t," was not found"))})),_defineProperty(this,"renderPreview",(function(e){var t=e.templateData,n=e.metadata,r=e.previewContainerId,a=document.getElementById(r);if(a){var o=createSDKStore();E$1(m$1(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <","\n value=","\n >\n <"," store=",">\n <","\n bundleId=","\n isPreviewMode=","\n templatePreviewData=","\n previewMetadata=","\n >\n <//>\n <//>\n <//>\n "])),AppContext.Provider,{apiHandler:i.apiHandler,eventEmitter:i.eventEmitter,isPreviewMode:!0},preact.Provider,o,Wrapper$1,i.config.bundleId,!0,t,n),a)}else console.warn("Integry template form render target with id ".concat(r," was not found"))})),_defineProperty(this,"init",(function(e){var t=e.containerId,n=e.templateContainerId,r=e.renderMode,a=document.getElementById(t);if(!r)throw new Error("Template form render mode needs to be defined");if(i.setupTemplateFormDestination(r,n),a){var o=a.getAttribute("x-integry-layout")||TemplateListingRenderModes.LIST;E$1(m$1(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <","\n value=","\n >\n <","\n bundleId=","\n userConfig=","\n layout=","\n >\n <//>\n <//>\n "])),AppContext.Provider,{apiHandler:i.apiHandler,eventEmitter:i.eventEmitter,isPreviewMode:!1},Container,i.config.bundleId,i.config.userConfig,o),a)}else console.warn("Integry SDK render target with id ".concat(t," was not found"))})),_defineProperty(this,"destroy",(function(){try{i.eventEmitter.offAll()}catch(e){console.error("There was an error unsubscribing from all events")}})),"staging"===t.env)?r={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:"https://beta.integry.io",baseUrlv2:"https://beta.integry.io/v2",apiKey:null===(a=t.xIntegryConfig)||void 0===a?void 0:a.appAuth.apiKey}:r={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:"https://app.integry.io",baseUrlv2:"https://app.integry.io/v2",apiKey:null===(o=t.xIntegryConfig)||void 0===o?void 0:o.appAuth.apiKey};if("appKey"in t)n=_objectSpread(_objectSpread(_objectSpread({},t),r),{},{appKey:t.appKey,hash:t.hash,userId:t.userId}),this.config=_objectSpread(_objectSpread(_objectSpread({},t),r),{},{appKey:t.appKey,hash:t.hash,userId:t.userId,bundleId:t.bundleId,userConfig:t.userConfig});else{var l=this.getAuthParamsFromUrl()||{};n=_objectSpread(_objectSpread({},r),l),this.config=_objectSpread(_objectSpread(_objectSpread({},r),l),{},{userConfig:t.userConfig})}this.apiHandler=new IntegryAPI(n)};_defineProperty(IntegryJS,"SDK_VERSION","0.0.73"),_defineProperty(IntegryJS,"RenderModes",TemplateFormRenderModes),_defineProperty(IntegryJS,"Helpers",void 0);export{Helpers,IntegryJS};
|
|
18
18
|
//# sourceMappingURL=index.csm.js.map
|