@hiver/connector-agent 4.9.0-oneClickGen-beta.0 → 4.9.0-oneClickGen-beta.1

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/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(le,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react"),require("react-dom"),require("@hiver/hiver-ui-kit")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@hiver/hiver-ui-kit"],I):(le=typeof globalThis<"u"?globalThis:le||self,I(le["@hiver/connector-agent"]={},le.React,le.ReactDOM,le.hiverUiKit))})(this,function(le,I,Ge,u){"use strict";var QA=Object.defineProperty;var c2=le=>{throw TypeError(le)};var $A=(le,I,Ge)=>I in le?QA(le,I,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):le[I]=Ge;var Me=(le,I,Ge)=>$A(le,typeof I!="symbol"?I+"":I,Ge),Cl=(le,I,Ge)=>I.has(le)||c2("Cannot "+Ge);var F=(le,I,Ge)=>(Cl(le,I,"read from private field"),Ge?Ge.call(le):I.get(le)),ce=(le,I,Ge)=>I.has(le)?c2("Cannot add the same private member more than once"):I instanceof WeakSet?I.add(le):I.set(le,Ge),ee=(le,I,Ge,u)=>(Cl(le,I,"write to private field"),u?u.call(le,Ge):I.set(le,Ge),Ge),be=(le,I,Ge)=>(Cl(le,I,"access private method"),Ge);var Za=(le,I,Ge,u)=>({set _(za){ee(le,I,za,Ge)},get _(){return F(le,I,u)}});var wr,Bn,so,Up,ao,Vn,io,Kp,Ir,e2,co,lo,Rt,_r,lt,os,Sr,Qt,On,t2,un,n2,dn,dt,Ar,fn,tr,r2,wn,$t,ss,o2,Ye,Gn,Hn,uo,fo,Wn,po,ho,s2,Ct,xe,as,ft,Tr,go,Zn,pn,is,mo,bo,Lr,Or,Xn,yo,Ne,ds,xl,vl,El,wl,Il,_l,Sl,l2,a2,zn,Yn,xt,In,_n,Xa,Al,i2;function za(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=za(I);var he=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ya={exports:{}},So={};/**
1
+ (function(ue,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react"),require("react-dom"),require("@hiver/hiver-ui-kit")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@hiver/hiver-ui-kit"],I):(ue=typeof globalThis<"u"?globalThis:ue||self,I(ue["@hiver/connector-agent"]={},ue.React,ue.ReactDOM,ue.hiverUiKit))})(this,function(ue,I,Ve,u){"use strict";var oA=Object.defineProperty;var c2=ue=>{throw TypeError(ue)};var sA=(ue,I,Ve)=>I in ue?oA(ue,I,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):ue[I]=Ve;var Me=(ue,I,Ve)=>sA(ue,typeof I!="symbol"?I+"":I,Ve),Cl=(ue,I,Ve)=>I.has(ue)||c2("Cannot "+Ve);var F=(ue,I,Ve)=>(Cl(ue,I,"read from private field"),Ve?Ve.call(ue):I.get(ue)),le=(ue,I,Ve)=>I.has(ue)?c2("Cannot add the same private member more than once"):I instanceof WeakSet?I.add(ue):I.set(ue,Ve),K=(ue,I,Ve,u)=>(Cl(ue,I,"write to private field"),u?u.call(ue,Ve):I.set(ue,Ve),Ve),be=(ue,I,Ve)=>(Cl(ue,I,"access private method"),Ve);var Za=(ue,I,Ve,u)=>({set _(za){K(ue,I,za,Ve)},get _(){return F(ue,I,u)}});var vr,Pn,ao,Up,io,jn,co,Kp,Er,e2,lo,uo,Pt,wr,lt,as,Ir,Qt,An,t2,ln,n2,un,dt,_r,dn,Kn,r2,wn,$t,is,o2,Xe,Bn,Vn,fo,po,Gn,ho,go,s2,xt,xe,cs,ft,Sr,mo,Hn,fn,ls,bo,yo,Tr,Ar,Wn,Co,Ne,ds,xl,vl,El,wl,Il,_l,Sl,l2,a2,Zn,Xn,vt,In,_n,Xa,Tl,i2;function za(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=za(I);var he=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ya={exports:{}},Ao={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Tl;function u2(){if(Tl)return So;Tl=1;var e=I,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,c,l){var f,g={},y=null,v=null;l!==void 0&&(y=""+l),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(v=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(g[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)g[f]===void 0&&(g[f]=c[f]);return{$$typeof:t,type:i,key:y,ref:v,props:g,_owner:o.current}}return So.Fragment=n,So.jsx=a,So.jsxs=a,So}var Ao={};/**
9
+ */var Al;function u2(){if(Al)return Ao;Al=1;var e=I,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,c,l){var f,g={},y=null,v=null;l!==void 0&&(y=""+l),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(v=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(g[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)g[f]===void 0&&(g[f]=c[f]);return{$$typeof:t,type:i,key:y,ref:v,props:g,_owner:o.current}}return Ao.Fragment=n,Ao.jsx=a,Ao.jsxs=a,Ao}var Lo={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,25 +14,25 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Ll;function d2(){return Ll||(Ll=1,process.env.NODE_ENV!=="production"&&function(){var e=I,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b=Symbol.iterator,p="@@iterator";function h(O){if(O===null||typeof O!="object")return null;var W=b&&O[b]||O[p];return typeof W=="function"?W:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(O){{for(var W=arguments.length,Q=new Array(W>1?W-1:0),pe=1;pe<W;pe++)Q[pe-1]=arguments[pe];x("error",O,Q)}}function x(O,W,Q){{var pe=m.ReactDebugCurrentFrame,Ae=pe.getStackAddendum();Ae!==""&&(W+="%s",Q=Q.concat([Ae]));var Re=Q.map(function(ye){return String(ye)});Re.unshift("Warning: "+W),Function.prototype.apply.call(console[O],console,Re)}}var w=!1,E=!1,_=!1,A=!1,S=!1,L;L=Symbol.for("react.module.reference");function k(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||A||O===v||w||E||_||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===g||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function R(O,W,Q){var pe=O.displayName;if(pe)return pe;var Ae=W.displayName||W.name||"";return Ae!==""?Q+"("+Ae+")":Q}function N(O){return O.displayName||"Context"}function M(O){if(O==null)return null;if(typeof O.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case i:var W=O;return N(W)+".Consumer";case a:var Q=O;return N(Q._context)+".Provider";case c:return R(O,O.render,"ForwardRef");case g:var pe=O.displayName||null;return pe!==null?pe:M(O.type)||"Memo";case y:{var Ae=O,Re=Ae._payload,ye=Ae._init;try{return M(ye(Re))}catch{return null}}}return null}var V=Object.assign,Z=0,J,$,X,z,se,de,D;function H(){}H.__reactDisabledLog=!0;function G(){{if(Z===0){J=console.log,$=console.info,X=console.warn,z=console.error,se=console.group,de=console.groupCollapsed,D=console.groupEnd;var O={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}Z++}}function j(){{if(Z--,Z===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},O,{value:J}),info:V({},O,{value:$}),warn:V({},O,{value:X}),error:V({},O,{value:z}),group:V({},O,{value:se}),groupCollapsed:V({},O,{value:de}),groupEnd:V({},O,{value:D})})}Z<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=m.ReactCurrentDispatcher,ne;function re(O,W,Q){{if(ne===void 0)try{throw Error()}catch(Ae){var pe=Ae.stack.trim().match(/\n( *(at )?)/);ne=pe&&pe[1]||""}return`
18
- `+ne+O}}var B=!1,U;{var fe=typeof WeakMap=="function"?WeakMap:Map;U=new fe}function Y(O,W){if(!O||B)return"";{var Q=U.get(O);if(Q!==void 0)return Q}var pe;B=!0;var Ae=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Re;Re=q.current,q.current=null,G();try{if(W){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(wt){pe=wt}Reflect.construct(O,[],ye)}else{try{ye.call()}catch(wt){pe=wt}O.call(ye.prototype)}}else{try{throw Error()}catch(wt){pe=wt}O()}}catch(wt){if(wt&&pe&&typeof wt.stack=="string"){for(var K=wt.stack.split(`
17
+ */var Ll;function d2(){return Ll||(Ll=1,process.env.NODE_ENV!=="production"&&function(){var e=I,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b=Symbol.iterator,p="@@iterator";function h(O){if(O===null||typeof O!="object")return null;var W=b&&O[b]||O[p];return typeof W=="function"?W:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(O){{for(var W=arguments.length,Q=new Array(W>1?W-1:0),pe=1;pe<W;pe++)Q[pe-1]=arguments[pe];x("error",O,Q)}}function x(O,W,Q){{var pe=m.ReactDebugCurrentFrame,Te=pe.getStackAddendum();Te!==""&&(W+="%s",Q=Q.concat([Te]));var Re=Q.map(function(ye){return String(ye)});Re.unshift("Warning: "+W),Function.prototype.apply.call(console[O],console,Re)}}var w=!1,E=!1,_=!1,T=!1,S=!1,L;L=Symbol.for("react.module.reference");function R(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||T||O===v||w||E||_||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===g||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function k(O,W,Q){var pe=O.displayName;if(pe)return pe;var Te=W.displayName||W.name||"";return Te!==""?Q+"("+Te+")":Q}function D(O){return O.displayName||"Context"}function M(O){if(O==null)return null;if(typeof O.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case i:var W=O;return D(W)+".Consumer";case a:var Q=O;return D(Q._context)+".Provider";case c:return k(O,O.render,"ForwardRef");case g:var pe=O.displayName||null;return pe!==null?pe:M(O.type)||"Memo";case y:{var Te=O,Re=Te._payload,ye=Te._init;try{return M(ye(Re))}catch{return null}}}return null}var G=Object.assign,Y=0,X,J,z,q,ne,ce,V;function N(){}N.__reactDisabledLog=!0;function H(){{if(Y===0){X=console.log,J=console.info,z=console.warn,q=console.error,ne=console.group,ce=console.groupCollapsed,V=console.groupEnd;var O={configurable:!0,enumerable:!0,value:N,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}Y++}}function j(){{if(Y--,Y===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},O,{value:X}),info:G({},O,{value:J}),warn:G({},O,{value:z}),error:G({},O,{value:q}),group:G({},O,{value:ne}),groupCollapsed:G({},O,{value:ce}),groupEnd:G({},O,{value:V})})}Y<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=m.ReactCurrentDispatcher,oe;function re(O,W,Q){{if(oe===void 0)try{throw Error()}catch(Te){var pe=Te.stack.trim().match(/\n( *(at )?)/);oe=pe&&pe[1]||""}return`
18
+ `+oe+O}}var B=!1,te;{var fe=typeof WeakMap=="function"?WeakMap:Map;te=new fe}function Z(O,W){if(!O||B)return"";{var Q=te.get(O);if(Q!==void 0)return Q}var pe;B=!0;var Te=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Re;Re=$.current,$.current=null,H();try{if(W){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(_t){pe=_t}Reflect.construct(O,[],ye)}else{try{ye.call()}catch(_t){pe=_t}O.call(ye.prototype)}}else{try{throw Error()}catch(_t){pe=_t}O()}}catch(_t){if(_t&&pe&&typeof _t.stack=="string"){for(var U=_t.stack.split(`
19
19
  `),me=pe.stack.split(`
20
- `),we=K.length-1,Be=me.length-1;we>=1&&Be>=0&&K[we]!==me[Be];)Be--;for(;we>=1&&Be>=0;we--,Be--)if(K[we]!==me[Be]){if(we!==1||Be!==1)do if(we--,Be--,Be<0||K[we]!==me[Be]){var jt=`
21
- `+K[we].replace(" at new "," at ");return O.displayName&&jt.includes("<anonymous>")&&(jt=jt.replace("<anonymous>",O.displayName)),typeof O=="function"&&U.set(O,jt),jt}while(we>=1&&Be>=0);break}}}finally{B=!1,q.current=Re,j(),Error.prepareStackTrace=Ae}var _o=O?O.displayName||O.name:"",Rr=_o?re(_o):"";return typeof O=="function"&&U.set(O,Rr),Rr}function Ze(O,W,Q){return Y(O,!1)}function _e(O){var W=O.prototype;return!!(W&&W.isReactComponent)}function et(O,W,Q){if(O==null)return"";if(typeof O=="function")return Y(O,_e(O));if(typeof O=="string")return re(O);switch(O){case l:return re("Suspense");case f:return re("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Ze(O.render);case g:return et(O.type,W,Q);case y:{var pe=O,Ae=pe._payload,Re=pe._init;try{return et(Re(Ae),W,Q)}catch{}}}return""}var kt=Object.prototype.hasOwnProperty,Jn={},Dt=m.ReactDebugCurrentFrame;function rt(O){if(O){var W=O._owner,Q=et(O.type,O._source,W?W.type:null);Dt.setExtraStackFrame(Q)}else Dt.setExtraStackFrame(null)}function Je(O,W,Q,pe,Ae){{var Re=Function.call.bind(kt);for(var ye in O)if(Re(O,ye)){var K=void 0;try{if(typeof O[ye]!="function"){var me=Error((pe||"React class")+": "+Q+" type `"+ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw me.name="Invariant Violation",me}K=O[ye](W,ye,pe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(we){K=we}K&&!(K instanceof Error)&&(rt(Ae),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",pe||"React class",Q,ye,typeof K),rt(null)),K instanceof Error&&!(K.message in Jn)&&(Jn[K.message]=!0,rt(Ae),C("Failed %s type: %s",Q,K.message),rt(null))}}}var Sn=Array.isArray;function vt(O){return Sn(O)}function cs(O){{var W=typeof Symbol=="function"&&Symbol.toStringTag,Q=W&&O[Symbol.toStringTag]||O.constructor.name||"Object";return Q}}function An(O){try{return qn(O),!1}catch{return!0}}function qn(O){return""+O}function Qn(O){if(An(O))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cs(O)),qn(O)}var Et=m.ReactCurrentOwner,Ut={key:!0,ref:!0,__self:!0,__source:!0},$n,Tn,Kt;Kt={};function hn(O){if(kt.call(O,"ref")){var W=Object.getOwnPropertyDescriptor(O,"ref").get;if(W&&W.isReactWarning)return!1}return O.ref!==void 0}function Un(O){if(kt.call(O,"key")){var W=Object.getOwnPropertyDescriptor(O,"key").get;if(W&&W.isReactWarning)return!1}return O.key!==void 0}function ls(O,W){if(typeof O.ref=="string"&&Et.current&&W&&Et.current.stateNode!==W){var Q=M(Et.current.type);Kt[Q]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(Et.current.type),O.ref),Kt[Q]=!0)}}function Fr(O,W){{var Q=function(){$n||($n=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};Q.isReactWarning=!0,Object.defineProperty(O,"key",{get:Q,configurable:!0})}}function Co(O,W){{var Q=function(){Tn||(Tn=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};Q.isReactWarning=!0,Object.defineProperty(O,"ref",{get:Q,configurable:!0})}}var xo=function(O,W,Q,pe,Ae,Re,ye){var K={$$typeof:t,type:O,key:W,ref:Q,props:ye,_owner:Re};return K._store={},Object.defineProperty(K._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(K,"_self",{configurable:!1,enumerable:!1,writable:!1,value:pe}),Object.defineProperty(K,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ae}),Object.freeze&&(Object.freeze(K.props),Object.freeze(K)),K};function vo(O,W,Q,pe,Ae){{var Re,ye={},K=null,me=null;Q!==void 0&&(Qn(Q),K=""+Q),Un(W)&&(Qn(W.key),K=""+W.key),hn(W)&&(me=W.ref,ls(W,Ae));for(Re in W)kt.call(W,Re)&&!Ut.hasOwnProperty(Re)&&(ye[Re]=W[Re]);if(O&&O.defaultProps){var we=O.defaultProps;for(Re in we)ye[Re]===void 0&&(ye[Re]=we[Re])}if(K||me){var Be=typeof O=="function"?O.displayName||O.name||"Unknown":O;K&&Fr(ye,Be),me&&Co(ye,Be)}return xo(O,K,me,Ae,pe,Et.current,ye)}}var kr=m.ReactCurrentOwner,Eo=m.ReactDebugCurrentFrame;function gn(O){if(O){var W=O._owner,Q=et(O.type,O._source,W?W.type:null);Eo.setExtraStackFrame(Q)}else Eo.setExtraStackFrame(null)}var Kn;Kn=!1;function er(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function Dr(){{if(kr.current){var O=M(kr.current.type);if(O)return`
20
+ `),we=U.length-1,je=me.length-1;we>=1&&je>=0&&U[we]!==me[je];)je--;for(;we>=1&&je>=0;we--,je--)if(U[we]!==me[je]){if(we!==1||je!==1)do if(we--,je--,je<0||U[we]!==me[je]){var jt=`
21
+ `+U[we].replace(" at new "," at ");return O.displayName&&jt.includes("<anonymous>")&&(jt=jt.replace("<anonymous>",O.displayName)),typeof O=="function"&&te.set(O,jt),jt}while(we>=1&&je>=0);break}}}finally{B=!1,$.current=Re,j(),Error.prepareStackTrace=Te}var To=O?O.displayName||O.name:"",Mr=To?re(To):"";return typeof O=="function"&&te.set(O,Mr),Mr}function Ye(O,W,Q){return Z(O,!1)}function Se(O){var W=O.prototype;return!!(W&&W.isReactComponent)}function Je(O,W,Q){if(O==null)return"";if(typeof O=="function")return Z(O,Se(O));if(typeof O=="string")return re(O);switch(O){case l:return re("Suspense");case f:return re("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Ye(O.render);case g:return Je(O.type,W,Q);case y:{var pe=O,Te=pe._payload,Re=pe._init;try{return Je(Re(Te),W,Q)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,zn={},Nt=m.ReactDebugCurrentFrame;function at(O){if(O){var W=O._owner,Q=Je(O.type,O._source,W?W.type:null);Nt.setExtraStackFrame(Q)}else Nt.setExtraStackFrame(null)}function ze(O,W,Q,pe,Te){{var Re=Function.call.bind(Et);for(var ye in O)if(Re(O,ye)){var U=void 0;try{if(typeof O[ye]!="function"){var me=Error((pe||"React class")+": "+Q+" type `"+ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw me.name="Invariant Violation",me}U=O[ye](W,ye,pe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(we){U=we}U&&!(U instanceof Error)&&(at(Te),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",pe||"React class",Q,ye,typeof U),at(null)),U instanceof Error&&!(U.message in zn)&&(zn[U.message]=!0,at(Te),C("Failed %s type: %s",Q,U.message),at(null))}}}var Yn=Array.isArray;function wt(O){return Yn(O)}function Jn(O){{var W=typeof Symbol=="function"&&Symbol.toStringTag,Q=W&&O[Symbol.toStringTag]||O.constructor.name||"Object";return Q}}function Sn(O){try{return Lr(O),!1}catch{return!0}}function Lr(O){return""+O}function qn(O){if(Sn(O))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Jn(O)),Lr(O)}var pt=m.ReactCurrentOwner,us={key:!0,ref:!0,__self:!0,__source:!0},Or,It,Ut;Ut={};function xo(O){if(Et.call(O,"ref")){var W=Object.getOwnPropertyDescriptor(O,"ref").get;if(W&&W.isReactWarning)return!1}return O.ref!==void 0}function Qn(O){if(Et.call(O,"key")){var W=Object.getOwnPropertyDescriptor(O,"key").get;if(W&&W.isReactWarning)return!1}return O.key!==void 0}function pn(O,W){if(typeof O.ref=="string"&&pt.current&&W&&pt.current.stateNode!==W){var Q=M(pt.current.type);Ut[Q]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(pt.current.type),O.ref),Ut[Q]=!0)}}function Fr(O,W){{var Q=function(){Or||(Or=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};Q.isReactWarning=!0,Object.defineProperty(O,"key",{get:Q,configurable:!0})}}function vo(O,W){{var Q=function(){It||(It=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};Q.isReactWarning=!0,Object.defineProperty(O,"ref",{get:Q,configurable:!0})}}var kr=function(O,W,Q,pe,Te,Re,ye){var U={$$typeof:t,type:O,key:W,ref:Q,props:ye,_owner:Re};return U._store={},Object.defineProperty(U._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(U,"_self",{configurable:!1,enumerable:!1,writable:!1,value:pe}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Te}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Eo(O,W,Q,pe,Te){{var Re,ye={},U=null,me=null;Q!==void 0&&(qn(Q),U=""+Q),Qn(W)&&(qn(W.key),U=""+W.key),xo(W)&&(me=W.ref,pn(W,Te));for(Re in W)Et.call(W,Re)&&!us.hasOwnProperty(Re)&&(ye[Re]=W[Re]);if(O&&O.defaultProps){var we=O.defaultProps;for(Re in we)ye[Re]===void 0&&(ye[Re]=we[Re])}if(U||me){var je=typeof O=="function"?O.displayName||O.name||"Unknown":O;U&&Fr(ye,je),me&&vo(ye,je)}return kr(O,U,me,Te,pe,pt.current,ye)}}var Dr=m.ReactCurrentOwner,wo=m.ReactDebugCurrentFrame;function hn(O){if(O){var W=O._owner,Q=Je(O.type,O._source,W?W.type:null);wo.setExtraStackFrame(Q)}else wo.setExtraStackFrame(null)}var $n;$n=!1;function Nr(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function Io(){{if(Dr.current){var O=M(Dr.current.type);if(O)return`
22
22
 
23
- Check the render method of \``+O+"`."}return""}}function wo(O){return""}var ie={};function ve(O){{var W=Dr();if(!W){var Q=typeof O=="string"?O:O.displayName||O.name;Q&&(W=`
23
+ Check the render method of \``+O+"`."}return""}}function _o(O){return""}var Un={};function Rr(O){{var W=Io();if(!W){var Q=typeof O=="string"?O:O.displayName||O.name;Q&&(W=`
24
24
 
25
- Check the top-level render call using <`+Q+">.")}return W}}function je(O,W){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=ve(W);if(ie[Q])return;ie[Q]=!0;var pe="";O&&O._owner&&O._owner!==kr.current&&(pe=" It was passed a child from "+M(O._owner.type)+"."),gn(O),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,pe),gn(null)}}function ot(O,W){{if(typeof O!="object")return;if(vt(O))for(var Q=0;Q<O.length;Q++){var pe=O[Q];er(pe)&&je(pe,W)}else if(er(O))O._store&&(O._store.validated=!0);else if(O){var Ae=h(O);if(typeof Ae=="function"&&Ae!==O.entries)for(var Re=Ae.call(O),ye;!(ye=Re.next()).done;)er(ye.value)&&je(ye.value,W)}}}function Ue(O){{var W=O.type;if(W==null||typeof W=="string")return;var Q;if(typeof W=="function")Q=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===c||W.$$typeof===g))Q=W.propTypes;else return;if(Q){var pe=M(W);Je(Q,O.props,"prop",pe,O)}else if(W.PropTypes!==void 0&&!Kn){Kn=!0;var Ae=M(W);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ae||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Mt(O){{for(var W=Object.keys(O.props),Q=0;Q<W.length;Q++){var pe=W[Q];if(pe!=="children"&&pe!=="key"){gn(O),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",pe),gn(null);break}}O.ref!==null&&(gn(O),C("Invalid attribute `ref` supplied to `React.Fragment`."),gn(null))}}var Pt={};function Ln(O,W,Q,pe,Ae,Re){{var ye=k(O);if(!ye){var K="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(K+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var me=wo();me?K+=me:K+=Dr();var we;O===null?we="null":vt(O)?we="array":O!==void 0&&O.$$typeof===t?(we="<"+(M(O.type)||"Unknown")+" />",K=" Did you accidentally export a JSX literal instead of a component?"):we=typeof O,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",we,K)}var Be=vo(O,W,Q,Ae,Re);if(Be==null)return Be;if(ye){var jt=W.children;if(jt!==void 0)if(pe)if(vt(jt)){for(var _o=0;_o<jt.length;_o++)ot(jt[_o],O);Object.freeze&&Object.freeze(jt)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ot(jt,O)}if(kt.call(W,"key")){var Rr=M(O),wt=Object.keys(W).filter(function(qA){return qA!=="key"}),yl=wt.length>0?"{key: someKey, "+wt.join(": ..., ")+": ...}":"{key: someKey}";if(!Pt[Rr+yl]){var JA=wt.length>0?"{"+wt.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+Q+">.")}return W}}function se(O,W){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=Rr(W);if(Un[Q])return;Un[Q]=!0;var pe="";O&&O._owner&&O._owner!==Dr.current&&(pe=" It was passed a child from "+M(O._owner.type)+"."),hn(O),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,pe),hn(null)}}function ve(O,W){{if(typeof O!="object")return;if(wt(O))for(var Q=0;Q<O.length;Q++){var pe=O[Q];Nr(pe)&&se(pe,W)}else if(Nr(O))O._store&&(O._store.validated=!0);else if(O){var Te=h(O);if(typeof Te=="function"&&Te!==O.entries)for(var Re=Te.call(O),ye;!(ye=Re.next()).done;)Nr(ye.value)&&se(ye.value,W)}}}function qe(O){{var W=O.type;if(W==null||typeof W=="string")return;var Q;if(typeof W=="function")Q=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===c||W.$$typeof===g))Q=W.propTypes;else return;if(Q){var pe=M(W);ze(Q,O.props,"prop",pe,O)}else if(W.PropTypes!==void 0&&!$n){$n=!0;var Te=M(W);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Te||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function it(O){{for(var W=Object.keys(O.props),Q=0;Q<W.length;Q++){var pe=W[Q];if(pe!=="children"&&pe!=="key"){hn(O),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",pe),hn(null);break}}O.ref!==null&&(hn(O),C("Invalid attribute `ref` supplied to `React.Fragment`."),hn(null))}}var Qe={};function Rt(O,W,Q,pe,Te,Re){{var ye=R(O);if(!ye){var U="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(U+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var me=_o();me?U+=me:U+=Io();var we;O===null?we="null":wt(O)?we="array":O!==void 0&&O.$$typeof===t?(we="<"+(M(O.type)||"Unknown")+" />",U=" Did you accidentally export a JSX literal instead of a component?"):we=typeof O,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",we,U)}var je=Eo(O,W,Q,Te,Re);if(je==null)return je;if(ye){var jt=W.children;if(jt!==void 0)if(pe)if(wt(jt)){for(var To=0;To<jt.length;To++)ve(jt[To],O);Object.freeze&&Object.freeze(jt)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ve(jt,O)}if(Et.call(W,"key")){var Mr=M(O),_t=Object.keys(W).filter(function(rA){return rA!=="key"}),yl=_t.length>0?"{key: someKey, "+_t.join(": ..., ")+": ...}":"{key: someKey}";if(!Qe[Mr+yl]){var nA=_t.length>0?"{"+_t.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,yl,Rr,JA,Rr),Pt[Rr+yl]=!0}}return O===r?Mt(Be):Ue(Be),Be}}function en(O,W,Q){return Ln(O,W,Q,!0)}function Io(O,W,Q){return Ln(O,W,Q,!1)}var us=Io,Nr=en;Ao.Fragment=r,Ao.jsx=us,Ao.jsxs=Nr}()),Ao}process.env.NODE_ENV==="production"?Ya.exports=u2():Ya.exports=d2();var d=Ya.exports;function Ol(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ol(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ol(e))&&(r&&(r+=" "),r+=t);return r}const To=e=>typeof e=="number"&&!isNaN(e),nr=e=>typeof e=="string",It=e=>typeof e=="function",ps=e=>nr(e)||It(e)?e:null,Ja=e=>I.isValidElement(e)||nr(e)||It(e)||To(e);function f2(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function hs(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(a){let{children:i,position:c,preventExitTransition:l,done:f,nodeRef:g,isIn:y,playToast:v}=a;const b=r?`${t}--${c}`:t,p=r?`${n}--${c}`:n,h=I.useRef(0);return I.useLayoutEffect(()=>{const m=g.current,C=b.split(" "),x=w=>{w.target===g.current&&(v(),m.removeEventListener("animationend",x),m.removeEventListener("animationcancel",x),h.current===0&&w.type!=="animationcancel"&&m.classList.remove(...C))};m.classList.add(...C),m.addEventListener("animationend",x),m.addEventListener("animationcancel",x)},[]),I.useEffect(()=>{const m=g.current,C=()=>{m.removeEventListener("animationend",C),o?f2(m,f,s):f()};y||(l?C():(h.current=1,m.className+=` ${p}`,m.addEventListener("animationend",C)))},[y]),I.createElement(I.Fragment,null,i)}}function Fl(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const ut=new Map;let Lo=[];const qa=new Set,p2=e=>qa.forEach(t=>t(e)),kl=()=>ut.size>0;function Dl(e,t){var n;if(t)return!((n=ut.get(t))==null||!n.isToastActive(e));let r=!1;return ut.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Nl(e,t){Ja(e)&&(kl()||Lo.push({content:e,options:t}),ut.forEach(n=>{n.buildToast(e,t)}))}function Rl(e,t){ut.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function h2(e){const{subscribe:t,getSnapshot:n,setProps:r}=I.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,g,y){let v=1,b=0,p=[],h=[],m=[],C=g;const x=new Map,w=new Set,E=()=>{m=Array.from(x.values()),w.forEach(S=>S())},_=S=>{h=S==null?[]:h.filter(L=>L!==S),E()},A=S=>{const{toastId:L,onOpen:k,updateId:R,children:N}=S.props,M=R==null;S.staleId&&x.delete(S.staleId),x.set(L,S),h=[...h,S.props.toastId].filter(V=>V!==S.staleId),E(),y(Fl(S,M?"added":"updated")),M&&It(k)&&k(I.isValidElement(N)&&N.props)};return{id:f,props:C,observe:S=>(w.add(S),()=>w.delete(S)),toggle:(S,L)=>{x.forEach(k=>{L!=null&&L!==k.props.toastId||It(k.toggle)&&k.toggle(S)})},removeToast:_,toasts:x,clearQueue:()=>{b-=p.length,p=[]},buildToast:(S,L)=>{if((D=>{let{containerId:H,toastId:G,updateId:j}=D;const q=H?H!==f:f!==1,ne=x.has(G)&&j==null;return q||ne})(L))return;const{toastId:k,updateId:R,data:N,staleId:M,delay:V}=L,Z=()=>{_(k)},J=R==null;J&&b++;const $={...C,style:C.toastStyle,key:v++,...Object.fromEntries(Object.entries(L).filter(D=>{let[H,G]=D;return G!=null})),toastId:k,updateId:R,data:N,closeToast:Z,isIn:!1,className:ps(L.className||C.toastClassName),bodyClassName:ps(L.bodyClassName||C.bodyClassName),progressClassName:ps(L.progressClassName||C.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,z=C.autoClose,X===!1||To(X)&&X>0?X:z),deleteToast(){const D=x.get(k),{onClose:H,children:G}=D.props;It(H)&&H(I.isValidElement(G)&&G.props),y(Fl(D,"removed")),x.delete(k),b--,b<0&&(b=0),p.length>0?A(p.shift()):E()}};var X,z;$.closeButton=C.closeButton,L.closeButton===!1||Ja(L.closeButton)?$.closeButton=L.closeButton:L.closeButton===!0&&($.closeButton=!Ja(C.closeButton)||C.closeButton);let se=S;I.isValidElement(S)&&!nr(S.type)?se=I.cloneElement(S,{closeToast:Z,toastProps:$,data:N}):It(S)&&(se=S({closeToast:Z,toastProps:$,data:N}));const de={content:se,props:$,staleId:M};C.limit&&C.limit>0&&b>C.limit&&J?p.push(de):To(V)?setTimeout(()=>{A(de)},V):A(de)},setProps(S){C=S},setToggle:(S,L)=>{x.get(S).toggle=L},isToastActive:S=>h.some(L=>L===S),getSnapshot:()=>C.newestOnTop?m.reverse():m}}(a,s,p2);ut.set(a,c);const l=c.observe(i);return Lo.forEach(f=>Nl(f.content,f.options)),Lo=[],()=>{l(),ut.delete(a)}},setProps(i){var c;(c=ut.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=ut.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=I.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const a=new Map;return o.forEach(i=>{const{position:c}=i.props;a.has(c)||a.set(c,[]),a.get(c).push(i)}),Array.from(a,i=>s(i[0],i[1]))},isToastActive:Dl,count:o==null?void 0:o.length}}function g2(e){const[t,n]=I.useState(!1),[r,o]=I.useState(!1),s=I.useRef(null),a=I.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:g}=e;var y,v;function b(){n(!0)}function p(){n(!1)}function h(x){const w=s.current;a.canDrag&&w&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?x.clientX-a.start:x.clientY-a.start,a.start!==x.clientX&&(a.canCloseOnClick=!1),w.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,w.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function m(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",m);const x=s.current;if(a.canDrag&&a.didMove&&x){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}(v=ut.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||v.setToggle(y.id,y.fn),I.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",b),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",b),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const C={onPointerDown:function(x){if(e.draggable===!0||e.draggable===x.pointerType){a.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",m);const w=s.current;a.canCloseOnClick=!0,a.canDrag=!0,w.style.transition="none",e.draggableDirection==="x"?(a.start=x.clientX,a.removalDistance=w.offsetWidth*(e.draggablePercent/100)):(a.start=x.clientY,a.removalDistance=w.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(x){const{top:w,bottom:E,left:_,right:A}=s.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&e.pauseOnHover&&x.clientX>=_&&x.clientX<=A&&x.clientY>=w&&x.clientY<=E?p():b()}};return i&&c&&(C.onMouseEnter=p,e.stacked||(C.onMouseLeave=b)),g&&(C.onClick=x=>{f&&f(x),a.canCloseOnClick&&l()}),{playToast:b,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:C}}function m2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:g,theme:y}=e;const v=s||c&&l===0,b={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(b.transform=`scaleX(${l})`);const p=Fn("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${y}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),h=It(a)?a({rtl:f,type:o,defaultClassName:p}):Fn(p,a),m={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{g&&r()}};return I.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},I.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),I.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:h,style:b,...m}))}let b2=1;const Ml=()=>""+b2++;function y2(e){return e&&(nr(e.toastId)||To(e.toastId))?e.toastId:Ml()}function Oo(e,t){return Nl(e,t),t.toastId}function gs(e,t){return{...t,type:t&&t.type||e,toastId:y2(t)}}function ms(e){return(t,n)=>Oo(t,gs(e,n))}function Fe(e,t){return Oo(e,gs("default",t))}Fe.loading=(e,t)=>Oo(e,gs("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Fe.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=nr(o)?Fe.loading(o,n):Fe.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,g,y)=>{if(g==null)return void Fe.dismiss(r);const v={type:f,...i,...n,data:y},b=nr(g)?{render:g}:g;return r?Fe.update(r,{...v,...b}):Fe(b.render,{...v,...b}),y},l=It(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},Fe.success=ms("success"),Fe.info=ms("info"),Fe.error=ms("error"),Fe.warning=ms("warning"),Fe.warn=Fe.warning,Fe.dark=(e,t)=>Oo(e,gs("default",{theme:"dark",...t})),Fe.dismiss=function(e){(function(t){var n;if(kl()){if(t==null||nr(n=t)||To(n))ut.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=ut.get(t.containerId);r?r.removeToast(t.id):ut.forEach(o=>{o.removeToast(t.id)})}}else Lo=Lo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Fe.clearWaitingQueue=function(e){e===void 0&&(e={}),ut.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Fe.isActive=Dl,Fe.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=ut.get(a||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Ml()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,Oo(a,s)}},Fe.done=e=>{Fe.update(e,{progress:1})},Fe.onChange=function(e){return qa.add(e),()=>{qa.delete(e)}},Fe.play=e=>Rl(!0,e),Fe.pause=e=>Rl(!1,e);const C2=typeof window<"u"?I.useLayoutEffect:I.useEffect,bs=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return I.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},Qa={info:function(e){return I.createElement(bs,{...e},I.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return I.createElement(bs,{...e},I.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return I.createElement(bs,{...e},I.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return I.createElement(bs,{...e},I.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return I.createElement("div",{className:"Toastify__spinner"})}},x2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=g2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:g,closeToast:y,transition:v,position:b,className:p,style:h,bodyClassName:m,bodyStyle:C,progressClassName:x,progressStyle:w,updateId:E,role:_,progress:A,rtl:S,toastId:L,deleteToast:k,isIn:R,isLoading:N,closeOnClick:M,theme:V}=e,Z=Fn("Toastify__toast",`Toastify__toast-theme--${V}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),J=It(p)?p({rtl:S,position:b,type:f,defaultClassName:Z}):Fn(Z,p),$=function(de){let{theme:D,type:H,isLoading:G,icon:j}=de,q=null;const ne={theme:D,type:H};return j===!1||(It(j)?q=j({...ne,isLoading:G}):I.isValidElement(j)?q=I.cloneElement(j,ne):G?q=Qa.spinner():(re=>re in Qa)(H)&&(q=Qa[H](ne))),q}(e),X=!!A||!c,z={closeToast:y,type:f,theme:V};let se=null;return a===!1||(se=It(a)?a(z):I.isValidElement(a)?I.cloneElement(a,z):function(de){let{closeToast:D,theme:H,ariaLabel:G="close"}=de;return I.createElement("button",{className:`Toastify__close-button Toastify__close-button--${H}`,type:"button",onClick:j=>{j.stopPropagation(),D(j)},"aria-label":G},I.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},I.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(z)),I.createElement(v,{isIn:R,done:k,position:b,preventExitTransition:n,nodeRef:r,playToast:s},I.createElement("div",{id:L,onClick:l,"data-in":R,className:J,...o,style:h,ref:r},I.createElement("div",{...R&&{role:_},className:It(m)?m({type:f}):Fn("Toastify__toast-body",m),style:C},$!=null&&I.createElement("div",{className:Fn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},$),I.createElement("div",null,i)),se,I.createElement(m2,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:V,delay:c,isRunning:t,isIn:R,closeToast:y,hide:g,type:f,style:w,className:x,controlledProgress:X,progress:A||0})))},ys=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},v2=hs(ys("bounce",!0));hs(ys("slide",!0)),hs(ys("zoom")),hs(ys("flip"));const E2={position:"top-right",transition:v2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function $a(e){let t={...E2,...e};const n=e.stacked,[r,o]=I.useState(!0),s=I.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=h2(t),{className:l,style:f,rtl:g,containerId:y}=t;function v(p){const h=Fn("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":g});return It(l)?l({position:p,rtl:g,defaultClassName:h}):Fn(h,ps(l))}function b(){n&&(o(!0),Fe.play())}return C2(()=>{if(n){var p;const h=s.current.querySelectorAll('[data-in="true"]'),m=12,C=(p=t.position)==null?void 0:p.includes("top");let x=0,w=0;Array.from(h).reverse().forEach((E,_)=>{const A=E;A.classList.add("Toastify__toast--stacked"),_>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=C?"top":"bot");const S=x*(r?.2:1)+(r?0:m*_);A.style.setProperty("--y",`${C?S:-1*S}px`),A.style.setProperty("--g",`${m}`),A.style.setProperty("--s",""+(1-(r?w:0))),x+=A.offsetHeight,w+=.025})}},[r,c,n]),I.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),Fe.pause())},onMouseLeave:b},a((p,h)=>{const m=h.length?{...f}:{...f,pointerEvents:"none"};return I.createElement("div",{className:v(p),style:m,key:`container-${p}`},h.map(C=>{let{content:x,props:w}=C;return I.createElement(x2,{...w,stacked:n,collapseAll:b,isIn:i(w.toastId,w.containerId),style:w.style,key:`toast-${w.key}`},x)}))}))}var Mr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},rr=typeof window>"u"||"Deno"in globalThis;function Nt(){}function w2(e,t){return typeof e=="function"?e(t):e}function Ua(e){return typeof e=="number"&&e>=0&&e!==1/0}function Pl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pr(e,t){return typeof e=="function"?e(t):e}function Bt(e,t){return typeof e=="function"?e(t):e}function jl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ka(a,t.options))return!1}else if(!Fo(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Bl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(or(t.options.mutationKey)!==or(s))return!1}else if(!Fo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ka(e,t){return((t==null?void 0:t.queryKeyHashFn)||or)(e)}function or(e){return JSON.stringify(e,(t,n)=>ti(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Fo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Fo(e[n],t[n])):!1}function ei(e,t){if(e===t)return e;const n=Vl(e)&&Vl(t);if(n||ti(e)&&ti(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let c=0;for(let l=0;l<a;l++){const f=n?l:s[l];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=ei(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function Cs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Vl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ti(e){if(!Gl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Gl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Gl(e){return Object.prototype.toString.call(e)==="[object Object]"}function I2(e){return new Promise(t=>{setTimeout(t,e)})}function ni(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return ei(e,t)}catch(r){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`)}return ei(e,t)}return t}function _2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function S2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var xs=Symbol();function Hl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===xs&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===xs?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var A2=(Up=class extends Mr{constructor(){super();ce(this,wr);ce(this,Bn);ce(this,so);ee(this,so,t=>{if(!rr&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Bn)||this.setEventListener(F(this,so))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Bn))==null||t.call(this),ee(this,Bn,void 0))}setEventListener(t){var n;ee(this,so,t),(n=F(this,Bn))==null||n.call(this),ee(this,Bn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,wr)!==t&&(ee(this,wr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,wr)=="boolean"?F(this,wr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},wr=new WeakMap,Bn=new WeakMap,so=new WeakMap,Up),ri=new A2,T2=(Kp=class extends Mr{constructor(){super();ce(this,ao,!0);ce(this,Vn);ce(this,io);ee(this,io,t=>{if(!rr&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,Vn)||this.setEventListener(F(this,io))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Vn))==null||t.call(this),ee(this,Vn,void 0))}setEventListener(t){var n;ee(this,io,t),(n=F(this,Vn))==null||n.call(this),ee(this,Vn,t(this.setOnline.bind(this)))}setOnline(t){F(this,ao)!==t&&(ee(this,ao,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,ao)}},ao=new WeakMap,Vn=new WeakMap,io=new WeakMap,Kp),vs=new T2;function oi(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function L2(e){return Math.min(1e3*2**e,3e4)}function Wl(e){return(e??"online")==="online"?vs.isOnline():!0}var Zl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function si(e){return e instanceof Zl}function Xl(e){let t=!1,n=0,r=!1,o;const s=oi(),a=p=>{var h;r||(y(new Zl(p)),(h=e.abort)==null||h.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>ri.isFocused()&&(e.networkMode==="always"||vs.isOnline())&&e.canRun(),f=()=>Wl(e.networkMode)&&e.canRun(),g=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),s.resolve(p))},y=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s.reject(p))},v=()=>new Promise(p=>{var h;o=m=>{(r||l())&&p(m)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),b=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(g).catch(m=>{var _;if(r)return;const C=e.retry??(rr?0:3),x=e.retryDelay??L2,w=typeof x=="function"?x(n,m):x,E=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,m);if(t||!E){y(m);return}n++,(_=e.onFail)==null||_.call(e,n,m),I2(w).then(()=>l()?void 0:v()).then(()=>{t?y(m):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?b():v().then(b),s)}}function O2(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=i=>setTimeout(i,0);const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||a()}return c},batchCalls:i=>(...c)=>{s(()=>{i(...c)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var Ke=O2(),zl=(e2=class{constructor(){ce(this,Ir)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ua(this.gcTime)&&ee(this,Ir,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(rr?1/0:5*60*1e3))}clearGcTimeout(){F(this,Ir)&&(clearTimeout(F(this,Ir)),ee(this,Ir,void 0))}},Ir=new WeakMap,e2),F2=(t2=class extends zl{constructor(t){super();ce(this,Qt);ce(this,co);ce(this,lo);ce(this,Rt);ce(this,_r);ce(this,lt);ce(this,os);ce(this,Sr);ee(this,Sr,!1),ee(this,os,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,_r,t.client),ee(this,Rt,F(this,_r).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,co,k2(this.options)),this.state=t.state??F(this,co),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,lt))==null?void 0:t.promise}setOptions(t){this.options={...F(this,os),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Rt).remove(this)}setData(t,n){const r=ni(this.state.data,t,this.options);return be(this,Qt,On).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,Qt,On).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,lt))==null?void 0:r.promise;return(o=F(this,lt))==null||o.cancel(t),n?n.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,co))}isActive(){return this.observers.some(t=>Bt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xs||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Pl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,lt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,lt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Rt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,lt)&&(F(this,Sr)?F(this,lt).cancel({revert:!0}):F(this,lt).cancelRetry()),this.scheduleGc()),F(this,Rt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,Qt,On).call(this,{type:"invalidate"})}fetch(t,n){var c,l,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,lt))return F(this,lt).continueRetry(),F(this,lt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(ee(this,Sr,!0),r.signal)})},s=()=>{const g=Hl(this.options,n),y={client:F(this,_r),queryKey:this.queryKey,meta:this.meta};return o(y),ee(this,Sr,!1),this.options.persister?this.options.persister(g,y,this):g(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,_r),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),ee(this,lo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&be(this,Qt,On).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=g=>{var y,v,b,p;si(g)&&g.silent||be(this,Qt,On).call(this,{type:"error",error:g}),si(g)||((v=(y=F(this,Rt).config).onError)==null||v.call(y,g,this),(p=(b=F(this,Rt).config).onSettled)==null||p.call(b,this.state.data,g,this)),this.scheduleGc()};return ee(this,lt,Xl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var y,v,b,p;if(g===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(h){i(h);return}(v=(y=F(this,Rt).config).onSuccess)==null||v.call(y,g,this),(p=(b=F(this,Rt).config).onSettled)==null||p.call(b,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,y)=>{be(this,Qt,On).call(this,{type:"failed",failureCount:g,error:y})},onPause:()=>{be(this,Qt,On).call(this,{type:"pause"})},onContinue:()=>{be(this,Qt,On).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,lt).start()}},co=new WeakMap,lo=new WeakMap,Rt=new WeakMap,_r=new WeakMap,lt=new WeakMap,os=new WeakMap,Sr=new WeakMap,Qt=new WeakSet,On=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Yl(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return si(o)&&o.revert&&F(this,lo)?{...F(this,lo),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ke.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Rt).notify({query:this,type:"updated",action:t})})},t2);function Yl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Wl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function k2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var D2=(n2=class extends Mr{constructor(t={}){super();ce(this,un);this.config=t,ee(this,un,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ka(o,n);let a=this.get(s);return a||(a=new F2({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,un).has(t.queryHash)||(F(this,un).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,un).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,un).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,un).get(t)}getAll(){return[...F(this,un).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>jl(t,r)):n}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},un=new WeakMap,n2),N2=(r2=class extends zl{constructor(t){super();ce(this,fn);ce(this,dn);ce(this,dt);ce(this,Ar);this.mutationId=t.mutationId,ee(this,dt,t.mutationCache),ee(this,dn,[]),this.state=t.state||Jl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,dn).includes(t)||(F(this,dn).push(t),this.clearGcTimeout(),F(this,dt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,dn,F(this,dn).filter(n=>n!==t)),this.scheduleGc(),F(this,dt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,dn).length||(this.state.status==="pending"?this.scheduleGc():F(this,dt).remove(this))}continue(){var t;return((t=F(this,Ar))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,g,y,v,b,p,h,m,C,x,w,E,_,A;ee(this,Ar,Xl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{be(this,fn,tr).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{be(this,fn,tr).call(this,{type:"pause"})},onContinue:()=>{be(this,fn,tr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,dt).canRun(this)}));const n=this.state.status==="pending",r=!F(this,Ar).canStart();try{if(!n){be(this,fn,tr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,dt).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&be(this,fn,tr).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,Ar).start();return await((l=(c=F(this,dt).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,S,t,this.state.context)),await((v=(y=F(this,dt).config).onSettled)==null?void 0:v.call(y,S,null,this.state.variables,this.state.context,this)),await((p=(b=this.options).onSettled)==null?void 0:p.call(b,S,null,t,this.state.context)),be(this,fn,tr).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(h=F(this,dt).config).onError)==null?void 0:m.call(h,S,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,S,t,this.state.context)),await((E=(w=F(this,dt).config).onSettled)==null?void 0:E.call(w,void 0,S,this.state.variables,this.state.context,this)),await((A=(_=this.options).onSettled)==null?void 0:A.call(_,void 0,S,t,this.state.context)),S}finally{be(this,fn,tr).call(this,{type:"error",error:S})}}finally{F(this,dt).runNext(this)}}},dn=new WeakMap,dt=new WeakMap,Ar=new WeakMap,fn=new WeakSet,tr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ke.batch(()=>{F(this,dn).forEach(r=>{r.onMutationUpdate(t)}),F(this,dt).notify({mutation:this,type:"updated",action:t})})},r2);function Jl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var R2=(o2=class extends Mr{constructor(t={}){super();ce(this,wn);ce(this,$t);ce(this,ss);this.config=t,ee(this,wn,new Set),ee(this,$t,new Map),ee(this,ss,0)}build(t,n,r){const o=new N2({mutationCache:this,mutationId:++Za(this,ss)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,wn).add(t);const n=Es(t);if(typeof n=="string"){const r=F(this,$t).get(n);r?r.push(t):F(this,$t).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,wn).delete(t)){const n=Es(t);if(typeof n=="string"){const r=F(this,$t).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,$t).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Es(t);if(typeof n=="string"){const r=F(this,$t).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Es(t);if(typeof n=="string"){const o=(r=F(this,$t).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ke.batch(()=>{F(this,wn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,wn).clear(),F(this,$t).clear()})}getAll(){return Array.from(F(this,wn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Bl(n,r))}findAll(t={}){return this.getAll().filter(n=>Bl(t,n))}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ke.batch(()=>Promise.all(t.map(n=>n.continue().catch(Nt))))}},wn=new WeakMap,$t=new WeakMap,ss=new WeakMap,o2);function Es(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ws(e){return{onFetch:(t,n)=>{var f,g,y,v,b;const r=t.options,o=(y=(g=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:y.direction,s=((v=t.state.data)==null?void 0:v.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const h=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},m=Hl(t.options,t.fetchOptions),C=async(x,w,E)=>{if(p)return Promise.reject();if(w==null&&x.pages.length)return Promise.resolve(x);const _={client:t.client,queryKey:t.queryKey,pageParam:w,direction:E?"backward":"forward",meta:t.options.meta};h(_);const A=await m(_),{maxPages:S}=t.options,L=E?S2:_2;return{pages:L(x.pages,A,S),pageParams:L(x.pageParams,w,S)}};if(o&&s.length){const x=o==="backward",w=x?ql:ai,E={pages:s,pageParams:a},_=w(r,E);i=await C(E,_,x)}else{const x=e??s.length;do{const w=c===0?a[0]??r.initialPageParam:ai(r,i);if(c>0&&w==null)break;i=await C(i,w),c++}while(c<x)}return i};t.options.persister?t.fetchFn=()=>{var p,h;return(h=(p=t.options).persister)==null?void 0:h.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function ai(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ql(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function M2(e,t){return t?ai(e,t)!=null:!1}function P2(e,t){return!t||!e.getPreviousPageParam?!1:ql(e,t)!=null}var j2=(s2=class{constructor(e={}){ce(this,Ye);ce(this,Gn);ce(this,Hn);ce(this,uo);ce(this,fo);ce(this,Wn);ce(this,po);ce(this,ho);ee(this,Ye,e.queryCache||new D2),ee(this,Gn,e.mutationCache||new R2),ee(this,Hn,e.defaultOptions||{}),ee(this,uo,new Map),ee(this,fo,new Map),ee(this,Wn,0)}mount(){Za(this,Wn)._++,F(this,Wn)===1&&(ee(this,po,ri.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ye).onFocus())})),ee(this,ho,vs.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ye).onOnline())})))}unmount(){var e,t;Za(this,Wn)._--,F(this,Wn)===0&&((e=F(this,po))==null||e.call(this),ee(this,po,void 0),(t=F(this,ho))==null||t.call(this),ee(this,ho,void 0))}isFetching(e){return F(this,Ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,Gn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Ye).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Ye).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Ye).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,Ye).get(r.queryHash),s=o==null?void 0:o.state.data,a=w2(t,s);if(a!==void 0)return F(this,Ye).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ke.batch(()=>F(this,Ye).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Ye).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Ye);Ke.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Ye);return Ke.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ke.batch(()=>F(this,Ye).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Nt).catch(Nt)}invalidateQueries(e,t={}){return Ke.batch(()=>(F(this,Ye).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ke.batch(()=>F(this,Ye).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Nt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Ye).build(this,t);return n.isStaleByTime(Pr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=ws(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=ws(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return vs.isOnline()?F(this,Gn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Ye)}getMutationCache(){return F(this,Gn)}getDefaultOptions(){return F(this,Hn)}setDefaultOptions(e){ee(this,Hn,e)}setQueryDefaults(e,t){F(this,uo).set(or(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,uo).values()],n={};return t.forEach(r=>{Fo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,fo).set(or(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,fo).values()],n={};return t.forEach(r=>{Fo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Hn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ka(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===xs&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Hn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Ye).clear(),F(this,Gn).clear()}},Ye=new WeakMap,Gn=new WeakMap,Hn=new WeakMap,uo=new WeakMap,fo=new WeakMap,Wn=new WeakMap,po=new WeakMap,ho=new WeakMap,s2),Ql=(a2=class extends Mr{constructor(t,n){super();ce(this,Ne);ce(this,Ct);ce(this,xe);ce(this,as);ce(this,ft);ce(this,Tr);ce(this,go);ce(this,Zn);ce(this,pn);ce(this,is);ce(this,mo);ce(this,bo);ce(this,Lr);ce(this,Or);ce(this,Xn);ce(this,yo,new Set);this.options=n,ee(this,Ct,t),ee(this,pn,null),ee(this,Zn,oi()),this.options.experimental_prefetchInRender||F(this,Zn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,xe).addObserver(this),$l(F(this,xe),this.options)?be(this,Ne,ds).call(this):this.updateResult(),be(this,Ne,wl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ii(F(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ii(F(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,Ne,Il).call(this),be(this,Ne,_l).call(this),F(this,xe).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,xe);if(this.options=F(this,Ct).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Bt(this.options.enabled,F(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,Ne,Sl).call(this),F(this,xe).setOptions(this.options),r._defaulted&&!Cs(this.options,r)&&F(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,xe),observer:this});const s=this.hasListeners();s&&Ul(F(this,xe),o,this.options,r)&&be(this,Ne,ds).call(this),this.updateResult(n),s&&(F(this,xe)!==o||Bt(this.options.enabled,F(this,xe))!==Bt(r.enabled,F(this,xe))||Pr(this.options.staleTime,F(this,xe))!==Pr(r.staleTime,F(this,xe)))&&be(this,Ne,xl).call(this);const a=be(this,Ne,vl).call(this);s&&(F(this,xe)!==o||Bt(this.options.enabled,F(this,xe))!==Bt(r.enabled,F(this,xe))||a!==F(this,Xn))&&be(this,Ne,El).call(this,a)}getOptimisticResult(t){const n=F(this,Ct).getQueryCache().build(F(this,Ct),t),r=this.createResult(n,t);return V2(this,r)&&(ee(this,ft,r),ee(this,go,this.options),ee(this,Tr,F(this,xe).state)),r}getCurrentResult(){return F(this,ft)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,yo).add(t)}getCurrentQuery(){return F(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,Ct).defaultQueryOptions(t),r=F(this,Ct).getQueryCache().build(F(this,Ct),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,Ne,ds).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,ft)))}createResult(t,n){var S;const r=F(this,xe),o=this.options,s=F(this,ft),a=F(this,Tr),i=F(this,go),l=t!==r?t.state:F(this,as),{state:f}=t;let g={...f},y=!1,v;if(n._optimisticResults){const L=this.hasListeners(),k=!L&&$l(t,n),R=L&&Ul(t,r,n,o);(k||R)&&(g={...g,...Yl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:p,status:h}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===F(this,is))v=F(this,mo);else try{ee(this,is,n.select),v=n.select(g.data),v=ni(s==null?void 0:s.data,v,n),ee(this,mo,v),ee(this,pn,null)}catch(L){ee(this,pn,L)}else v=g.data;if(n.placeholderData!==void 0&&v===void 0&&h==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,bo))==null?void 0:S.state.data,F(this,bo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),ee(this,pn,null)}catch(k){ee(this,pn,k)}L!==void 0&&(h="success",v=ni(s==null?void 0:s.data,L,n),y=!0)}F(this,pn)&&(b=F(this,pn),v=F(this,mo),p=Date.now(),h="error");const m=g.fetchStatus==="fetching",C=h==="pending",x=h==="error",w=C&&m,E=v!==void 0,A={status:h,fetchStatus:g.fetchStatus,isPending:C,isSuccess:h==="success",isError:x,isInitialLoading:w,isLoading:w,data:v,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:p,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>l.dataUpdateCount||g.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!C,isLoadingError:x&&!E,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:x&&E,isStale:ci(t,n),refetch:this.refetch,promise:F(this,Zn)};if(this.options.experimental_prefetchInRender){const L=N=>{A.status==="error"?N.reject(A.error):A.data!==void 0&&N.resolve(A.data)},k=()=>{const N=ee(this,Zn,A.promise=oi());L(N)},R=F(this,Zn);switch(R.status){case"pending":t.queryHash===r.queryHash&&L(R);break;case"fulfilled":(A.status==="error"||A.data!==R.value)&&k();break;case"rejected":(A.status!=="error"||A.error!==R.reason)&&k();break}}return A}updateResult(t){const n=F(this,ft),r=this.createResult(F(this,xe),this.options);if(ee(this,Tr,F(this,xe).state),ee(this,go,this.options),F(this,Tr).data!==void 0&&ee(this,bo,F(this,xe)),Cs(r,n))return;ee(this,ft,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,yo).size)return!0;const c=new Set(i??F(this,yo));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,ft)).some(l=>{const f=l;return F(this,ft)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),be(this,Ne,l2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,Ne,wl).call(this)}},Ct=new WeakMap,xe=new WeakMap,as=new WeakMap,ft=new WeakMap,Tr=new WeakMap,go=new WeakMap,Zn=new WeakMap,pn=new WeakMap,is=new WeakMap,mo=new WeakMap,bo=new WeakMap,Lr=new WeakMap,Or=new WeakMap,Xn=new WeakMap,yo=new WeakMap,Ne=new WeakSet,ds=function(t){be(this,Ne,Sl).call(this);let n=F(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Nt)),n},xl=function(){be(this,Ne,Il).call(this);const t=Pr(this.options.staleTime,F(this,xe));if(rr||F(this,ft).isStale||!Ua(t))return;const r=Pl(F(this,ft).dataUpdatedAt,t)+1;ee(this,Lr,setTimeout(()=>{F(this,ft).isStale||this.updateResult()},r))},vl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,xe)):this.options.refetchInterval)??!1},El=function(t){be(this,Ne,_l).call(this),ee(this,Xn,t),!(rr||Bt(this.options.enabled,F(this,xe))===!1||!Ua(F(this,Xn))||F(this,Xn)===0)&&ee(this,Or,setInterval(()=>{(this.options.refetchIntervalInBackground||ri.isFocused())&&be(this,Ne,ds).call(this)},F(this,Xn)))},wl=function(){be(this,Ne,xl).call(this),be(this,Ne,El).call(this,be(this,Ne,vl).call(this))},Il=function(){F(this,Lr)&&(clearTimeout(F(this,Lr)),ee(this,Lr,void 0))},_l=function(){F(this,Or)&&(clearInterval(F(this,Or)),ee(this,Or,void 0))},Sl=function(){const t=F(this,Ct).getQueryCache().build(F(this,Ct),this.options);if(t===F(this,xe))return;const n=F(this,xe);ee(this,xe,t),ee(this,as,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},l2=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,ft))}),F(this,Ct).getQueryCache().notify({query:F(this,xe),type:"observerResultsUpdated"})})},a2);function B2(e,t){return Bt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $l(e,t){return B2(e,t)||e.state.data!==void 0&&ii(e,t,t.refetchOnMount)}function ii(e,t,n){if(Bt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ci(e,t)}return!1}function Ul(e,t,n,r){return(e!==t||Bt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ci(e,n)}function ci(e,t){return Bt(t.enabled,e)!==!1&&e.isStaleByTime(Pr(t.staleTime,e))}function V2(e,t){return!Cs(e.getCurrentResult(),t)}var G2=class extends Ql{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:ws()},t)}getOptimisticResult(e){return e.behavior=ws(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,p;const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:a,isRefetchError:i}=r,c=(p=(b=n.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:p.direction,l=a&&c==="forward",f=o&&c==="forward",g=a&&c==="backward",y=o&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:M2(t,n.data),hasPreviousPage:P2(t,n.data),isFetchNextPageError:l,isFetchingNextPage:f,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:i&&!l&&!g,isRefetching:s&&!f&&!y}}},H2=(i2=class extends Mr{constructor(n,r){super();ce(this,_n);ce(this,zn);ce(this,Yn);ce(this,xt);ce(this,In);ee(this,zn,n),this.setOptions(r),this.bindMethods(),be(this,_n,Xa).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,zn).defaultMutationOptions(n),Cs(this.options,r)||F(this,zn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&or(r.mutationKey)!==or(this.options.mutationKey)?this.reset():((o=F(this,xt))==null?void 0:o.state.status)==="pending"&&F(this,xt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,xt))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,_n,Xa).call(this),be(this,_n,Al).call(this,n)}getCurrentResult(){return F(this,Yn)}reset(){var n;(n=F(this,xt))==null||n.removeObserver(this),ee(this,xt,void 0),be(this,_n,Xa).call(this),be(this,_n,Al).call(this)}mutate(n,r){var o;return ee(this,In,r),(o=F(this,xt))==null||o.removeObserver(this),ee(this,xt,F(this,zn).getMutationCache().build(F(this,zn),this.options)),F(this,xt).addObserver(this),F(this,xt).execute(n)}},zn=new WeakMap,Yn=new WeakMap,xt=new WeakMap,In=new WeakMap,_n=new WeakSet,Xa=function(){var r;const n=((r=F(this,xt))==null?void 0:r.state)??Jl();ee(this,Yn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Al=function(n){Ke.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,In)&&this.hasListeners()){const g=F(this,Yn).variables,y=F(this,Yn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,In)).onSuccess)==null||o.call(r,n.data,g,y),(a=(s=F(this,In)).onSettled)==null||a.call(s,n.data,null,g,y)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,In)).onError)==null||c.call(i,n.error,g,y),(f=(l=F(this,In)).onSettled)==null||f.call(l,void 0,n.error,g,y))}this.listeners.forEach(g=>{g(F(this,Yn))})})},i2),Kl=T.createContext(void 0),jr=e=>{const t=T.useContext(Kl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},W2=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(Kl.Provider,{value:e,children:t})),eu=T.createContext(!1),Z2=()=>T.useContext(eu);eu.Provider;function X2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var z2=T.createContext(X2()),Y2=()=>T.useContext(z2);function tu(e,t){return typeof e=="function"?e(...t):!!e}function li(){}var J2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},q2=e=>{T.useEffect(()=>{e.clearReset()},[e])},Q2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||tu(n,[e.error,r])),$2=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},U2=(e,t)=>e.isLoading&&e.isFetching&&!t,K2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,nu=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ru(e,t,n){var g,y,v,b,p;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=jr(),o=Z2(),s=Y2(),a=r.defaultQueryOptions(e);(y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",$2(a),J2(a,s),q2(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(h=>{const m=f?c.subscribe(Ke.batchCalls(h)):li;return c.updateResult(),m},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),K2(a,l))throw nu(a,c,s);if(Q2({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((b=(v=r.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||b.call(v,a,l),a.experimental_prefetchInRender&&!rr&&U2(l,o)){const h=i?nu(a,c,s):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;h==null||h.catch(li).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function mn(e,t){return ru(e,Ql)}function Vt(e,t){const n=jr(),[r]=T.useState(()=>new H2(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Ke.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(li)},[r]);if(o.error&&tu(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function eh(e,t){return ru(e,G2)}const ui=(e,t)=>t.some(n=>e instanceof n);let ou,su;function th(){return ou||(ou=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function nh(){return su||(su=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const di=new WeakMap,fi=new WeakMap,Is=new WeakMap;function rh(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(sr(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return Is.set(t,e),t}function oh(e){if(di.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),o()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});di.set(e,t)}let pi={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return di.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return sr(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function au(e){pi=e(pi)}function sh(e){return nh().includes(e)?function(...t){return e.apply(hi(this),t),sr(this.request)}:function(...t){return sr(e.apply(hi(this),t))}}function ah(e){return typeof e=="function"?sh(e):(e instanceof IDBTransaction&&oh(e),ui(e,th())?new Proxy(e,pi):e)}function sr(e){if(e instanceof IDBRequest)return rh(e);if(fi.has(e))return fi.get(e);const t=ah(e);return t!==e&&(fi.set(e,t),Is.set(t,e)),t}const hi=e=>Is.get(e);function ih(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=sr(a);return r&&a.addEventListener("upgradeneeded",c=>{r(sr(a.result),c.oldVersion,c.newVersion,sr(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const ch=["get","getKey","getAll","getAllKeys","count"],lh=["put","add","delete","clear"],gi=new Map;function iu(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(gi.get(t))return gi.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=lh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||ch.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[n](...i),o&&c.done]))[0]};return gi.set(t,s),s}au(e=>({...e,get:(t,n,r)=>iu(t,n)||e.get(t,n,r),has:(t,n)=>!!iu(t,n)||e.has(t,n)}));const uh=["continue","continuePrimaryKey","advance"],cu={},mi=new WeakMap,lu=new WeakMap,dh={get(e,t){if(!uh.includes(t))return e[t];let n=cu[t];return n||(n=cu[t]=function(...r){mi.set(this,lu.get(this)[t](...r))}),n}};async function*fh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,dh);for(lu.set(n,t),Is.set(n,hi(t));t;)yield n,t=await(mi.get(n)||t.continue()),mi.delete(n)}function uu(e,t){return t===Symbol.asyncIterator&&ui(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ui(e,[IDBIndex,IDBObjectStore])}au(e=>({...e,get(t,n,r){return uu(t,n)?fh:e.get(t,n,r)},has(t,n){return uu(t,n)||e.has(t,n)}}));const ph="connector-db",hh=1,_s={FEEDBACK:"feedback"},ko=`${_s.FEEDBACK}:data`,Ss=`${_s.FEEDBACK}:last_submitted`,Do=`${_s.FEEDBACK}:capture_on_demand`,No=`${_s.FEEDBACK}:show_notification`,gh=12*60*60*1e3,bi=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=gh:!0,du=(e,t=!1)=>e.captureFeedback&&(bi(e.firstViewed)&&(!e.lastSubmittedFeedback||bi(e.lastSubmittedFeedback))||!!t);let ar=null;const kn=async()=>{try{ar||(ar=await ih(ph,hh,{upgrade(e){e.objectStoreNames.contains(ko)||e.createObjectStore(ko),e.objectStoreNames.contains(Ss)||e.createObjectStore(Ss),e.objectStoreNames.contains(Do)||e.createObjectStore(Do),e.objectStoreNames.contains(No)||e.createObjectStore(No)},blocked(){console.warn("Upgrade blocked! Close other tabs using this DB.")},blocking(){console.warn("Another tab is trying to upgrade. Closing connection to allow upgrade."),ar&&(ar.close(),ar=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),ar=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return ar},yi=async e=>{if(!e)return[];const t=await kn();if(!t)return[];try{return await t.get(ko,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},mh=async e=>{if(!e)return null;const t=await kn();if(!t)return null;try{return await t.get(Ss,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},As=async e=>{if(!e)return;const t=await kn();if(t)try{return await t.get(Do,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},bh=async e=>{if(!e)return!1;const t=await kn();if(!t)return!1;try{return await t.get(No,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},yh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await kn();if(n)try{const r=await yi(e),o=new Set(r.map(a=>a.connectorId)),s=t.filter(a=>!o.has(a.connector_id)).map(a=>({connectorId:a.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const a=[...r,...s];await n.put(ko,a,e),await n.put(No,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},Ch=async e=>{if(!e)return;const t=await kn();if(t)try{const n=await yi(e),r=await As(e),o=new Date,s=n.map(a=>{const i=du(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(ko,s,e),await t.put(Ss,o,e),r&&await t.put(Do,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},fu=async(e,t)=>{if(!e)return;const n=await kn();if(n)try{await n.put(Do,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},xh=async e=>{if(!e)return;const t=await kn();if(t)try{await t.put(No,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},vh=async e=>{const t=await yi(e),n=await As(e);return t.filter(o=>du(o,n))},Ci=async e=>{const t=await mh(e);return t&&!bi(t)?!1:await As(e)&&!t?!0:!!(await vh(e)).length},Eh=async(e,t)=>{await yh(e,t)},Ts=async e=>{e&&await Ch(e)},wh=async(e,t)=>{const n=await As(e);t?n!==!1&&await fu(e,t):await fu(e,void 0)},pu=async e=>await bh(e)&&await Ci(e),hu=async e=>{await xh(e)};var xi={},ir={};function gu(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ih}=Object.prototype,{getPrototypeOf:vi}=Object,Ls=(e=>t=>{const n=Ih.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gt=e=>(e=e.toLowerCase(),t=>Ls(t)===e),Os=e=>t=>typeof t===e,{isArray:Br}=Array,Ro=Os("undefined");function _h(e){return e!==null&&!Ro(e)&&e.constructor!==null&&!Ro(e.constructor)&&_t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mu=Gt("ArrayBuffer");function Sh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mu(e.buffer),t}const Ah=Os("string"),_t=Os("function"),bu=Os("number"),Fs=e=>e!==null&&typeof e=="object",Th=e=>e===!0||e===!1,ks=e=>{if(Ls(e)!=="object")return!1;const t=vi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Lh=Gt("Date"),Oh=Gt("File"),Fh=Gt("Blob"),kh=Gt("FileList"),Dh=e=>Fs(e)&&_t(e.pipe),Nh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_t(e.append)&&((t=Ls(e))==="formdata"||t==="object"&&_t(e.toString)&&e.toString()==="[object FormData]"))},Rh=Gt("URLSearchParams"),[Mh,Ph,jh,Bh]=["ReadableStream","Request","Response","Headers"].map(Gt),Vh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Br(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function yu(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const cr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:he,Cu=e=>!Ro(e)&&e!==cr;function Ei(){const{caseless:e}=Cu(this)&&this||{},t={},n=(r,o)=>{const s=e&&yu(t,o)||o;ks(t[s])&&ks(r)?t[s]=Ei(t[s],r):ks(r)?t[s]=Ei({},r):Br(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Mo(arguments[r],n);return t}const Gh=(e,t,n,{allOwnKeys:r}={})=>(Mo(t,(o,s)=>{n&&_t(o)?e[s]=gu(o,n):e[s]=o},{allOwnKeys:r}),e),Hh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Wh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Zh=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&vi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Xh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},zh=e=>{if(!e)return null;if(Br(e))return e;let t=e.length;if(!bu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vi(Uint8Array)),Jh=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},qh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Qh=Gt("HTMLFormElement"),$h=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),xu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Uh=Gt("RegExp"),vu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Mo(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Kh=e=>{vu(e,(t,n)=>{if(_t(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_t(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},eg=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Br(e)?r(e):r(String(e).split(t)),n},tg=()=>{},ng=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,wi="abcdefghijklmnopqrstuvwxyz",Eu="0123456789",wu={DIGIT:Eu,ALPHA:wi,ALPHA_DIGIT:wi+wi.toUpperCase()+Eu},rg=(e=16,t=wu.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function og(e){return!!(e&&_t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const sg=e=>{const t=new Array(10),n=(r,o)=>{if(Fs(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Br(r)?[]:{};return Mo(r,(a,i)=>{const c=n(a,o+1);!Ro(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},ag=Gt("AsyncFunction"),ig=e=>e&&(Fs(e)||_t(e))&&_t(e.then)&&_t(e.catch),Iu=((e,t)=>e?setImmediate:t?((n,r)=>(cr.addEventListener("message",({source:o,data:s})=>{o===cr&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),cr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_t(cr.postMessage)),cg=typeof queueMicrotask<"u"?queueMicrotask.bind(cr):typeof process<"u"&&process.nextTick||Iu;var P={isArray:Br,isArrayBuffer:mu,isBuffer:_h,isFormData:Nh,isArrayBufferView:Sh,isString:Ah,isNumber:bu,isBoolean:Th,isObject:Fs,isPlainObject:ks,isReadableStream:Mh,isRequest:Ph,isResponse:jh,isHeaders:Bh,isUndefined:Ro,isDate:Lh,isFile:Oh,isBlob:Fh,isRegExp:Uh,isFunction:_t,isStream:Dh,isURLSearchParams:Rh,isTypedArray:Yh,isFileList:kh,forEach:Mo,merge:Ei,extend:Gh,trim:Vh,stripBOM:Hh,inherits:Wh,toFlatObject:Zh,kindOf:Ls,kindOfTest:Gt,endsWith:Xh,toArray:zh,forEachEntry:Jh,matchAll:qh,isHTMLForm:Qh,hasOwnProperty:xu,hasOwnProp:xu,reduceDescriptors:vu,freezeMethods:Kh,toObjectSet:eg,toCamelCase:$h,noop:tg,toFiniteNumber:ng,findKey:yu,global:cr,isContextDefined:Cu,ALPHABET:wu,generateString:rg,isSpecCompliantForm:og,toJSONObject:sg,isAsyncFn:ag,isThenable:ig,setImmediate:Iu,asap:cg};function ge(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}P.inherits(ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:P.toJSONObject(this.config),code:this.code,status:this.status}}});const _u=ge.prototype,Su={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Su[e]={value:e}}),Object.defineProperties(ge,Su),Object.defineProperty(_u,"isAxiosError",{value:!0}),ge.from=(e,t,n,r,o,s)=>{const a=Object.create(_u);return P.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),ge.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var lg=null;function Ii(e){return P.isPlainObject(e)||P.isArray(e)}function Au(e){return P.endsWith(e,"[]")?e.slice(0,-2):e}function Tu(e,t,n){return e?e.concat(t).map(function(o,s){return o=Au(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function ug(e){return P.isArray(e)&&!e.some(Ii)}const dg=P.toFlatObject(P,{},null,function(t){return/^is[A-Z]/.test(t)});function Ds(e,t,n){if(!P.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=P.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!P.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(t);if(!P.isFunction(o))throw new TypeError("visitor must be a function");function l(b){if(b===null)return"";if(P.isDate(b))return b.toISOString();if(!c&&P.isBlob(b))throw new ge("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(b)||P.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,p,h){let m=b;if(b&&!h&&typeof b=="object"){if(P.endsWith(p,"{}"))p=r?p:p.slice(0,-2),b=JSON.stringify(b);else if(P.isArray(b)&&ug(b)||(P.isFileList(b)||P.endsWith(p,"[]"))&&(m=P.toArray(b)))return p=Au(p),m.forEach(function(x,w){!(P.isUndefined(x)||x===null)&&t.append(a===!0?Tu([p],w,s):a===null?p:p+"[]",l(x))}),!1}return Ii(b)?!0:(t.append(Tu(h,p,s),l(b)),!1)}const g=[],y=Object.assign(dg,{defaultVisitor:f,convertValue:l,isVisitable:Ii});function v(b,p){if(!P.isUndefined(b)){if(g.indexOf(b)!==-1)throw Error("Circular reference detected in "+p.join("."));g.push(b),P.forEach(b,function(m,C){(!(P.isUndefined(m)||m===null)&&o.call(t,m,P.isString(C)?C.trim():C,p,y))===!0&&v(m,p?p.concat(C):[C])}),g.pop()}}if(!P.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Lu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _i(e,t){this._pairs=[],e&&Ds(e,this,t)}const Ou=_i.prototype;Ou.append=function(t,n){this._pairs.push([t,n])},Ou.toString=function(t){const n=t?function(r){return t.call(this,r,Lu)}:Lu;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function fg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Fu(e,t,n){if(!t)return e;const r=n&&n.encode||fg,o=n&&n.serialize;let s;if(o?s=o(t,n):s=P.isURLSearchParams(t)?t.toString():new _i(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class pg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){P.forEach(this.handlers,function(r){r!==null&&t(r)})}}var ku=pg,Du={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},hg=typeof URLSearchParams<"u"?URLSearchParams:_i,gg=typeof FormData<"u"?FormData:null,mg=typeof Blob<"u"?Blob:null,bg={isBrowser:!0,classes:{URLSearchParams:hg,FormData:gg,Blob:mg},protocols:["http","https","file","blob","url","data"]};const Si=typeof window<"u"&&typeof document<"u",Ai=typeof navigator=="object"&&navigator||void 0,yg=Si&&(!Ai||["ReactNative","NativeScript","NS"].indexOf(Ai.product)<0),Cg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xg=Si&&window.location.href||"http://localhost";var vg=Object.freeze({__proto__:null,hasBrowserEnv:Si,hasStandardBrowserWebWorkerEnv:Cg,hasStandardBrowserEnv:yg,navigator:Ai,origin:xg}),pt={...vg,...bg};function Eg(e,t){return Ds(e,new pt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return pt.isNode&&P.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function wg(e){return P.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ig(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Nu(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=s>=n.length;return a=!a&&P.isArray(o)?o.length:a,c?(P.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!P.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&P.isArray(o[a])&&(o[a]=Ig(o[a])),!i)}if(P.isFormData(e)&&P.isFunction(e.entries)){const n={};return P.forEachEntry(e,(r,o)=>{t(wg(r),o,n,0)}),n}return null}function _g(e,t,n){if(P.isString(e))try{return(t||JSON.parse)(e),P.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Ti={transitional:Du,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=P.isObject(t);if(s&&P.isHTMLForm(t)&&(t=new FormData(t)),P.isFormData(t))return o?JSON.stringify(Nu(t)):t;if(P.isArrayBuffer(t)||P.isBuffer(t)||P.isStream(t)||P.isFile(t)||P.isBlob(t)||P.isReadableStream(t))return t;if(P.isArrayBufferView(t))return t.buffer;if(P.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Eg(t,this.formSerializer).toString();if((i=P.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ds(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),_g(t)):t}],transformResponse:[function(t){const n=this.transitional||Ti.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(P.isResponse(t)||P.isReadableStream(t))return t;if(t&&P.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?ge.from(i,ge.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],e=>{Ti.headers[e]={}});var Li=Ti;const Sg=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ag=e=>{const t={};let n,r,o;return e&&e.split(`
31
- `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Sg[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Ru=Symbol("internals");function Po(e){return e&&String(e).trim().toLowerCase()}function Ns(e){return e===!1||e==null?e:P.isArray(e)?e.map(Ns):String(e)}function Tg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Lg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Oi(e,t,n,r,o){if(P.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!P.isString(t)){if(P.isString(r))return t.indexOf(r)!==-1;if(P.isRegExp(r))return r.test(t)}}function Og(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Fg(e,t){const n=P.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}class Rs{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=Po(c);if(!f)throw new Error("header name must be a non-empty string");const g=P.findKey(o,f);(!g||o[g]===void 0||l===!0||l===void 0&&o[g]!==!1)&&(o[g||c]=Ns(i))}const a=(i,c)=>P.forEach(i,(l,f)=>s(l,f,c));if(P.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(P.isString(t)&&(t=t.trim())&&!Lg(t))a(Ag(t),n);else if(P.isHeaders(t))for(const[i,c]of t.entries())s(c,i,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=Po(t),t){const r=P.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Tg(o);if(P.isFunction(n))return n.call(this,o,r);if(P.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Po(t),t){const r=P.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Oi(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Po(a),a){const i=P.findKey(r,a);i&&(!n||Oi(r,r[i],i,n))&&(delete r[i],o=!0)}}return P.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Oi(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return P.forEach(this,(o,s)=>{const a=P.findKey(r,s);if(a){n[a]=Ns(o),delete n[s];return}const i=t?Og(s):String(s).trim();i!==s&&delete n[s],n[i]=Ns(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return P.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&P.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
32
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ru]=this[Ru]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Po(a);r[i]||(Fg(o,a),r[i]=!0)}return P.isArray(t)?t.forEach(s):s(t),this}}Rs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),P.reduceDescriptors(Rs.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),P.freezeMethods(Rs);var Ht=Rs;function Fi(e,t){const n=this||Li,r=t||n,o=Ht.from(r.headers);let s=r.data;return P.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Mu(e){return!!(e&&e.__CANCEL__)}function Vr(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}P.inherits(Vr,ge,{__CANCEL__:!0});function Pu(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Dg(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[s];a||(a=l),n[o]=c,r[o]=l;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const v=f&&l-f;return v?Math.round(y*1e3/v):void 0}}function Ng(e,t){let n=0,r=1e3/t,o,s;const a=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),g=f-n;g>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const Ms=(e,t,n=3)=>{let r=0;const o=Dg(50,250);return Ng(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const g={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&f?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},ju=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Bu=e=>(...t)=>P.asap(()=>e(...t));var Rg=pt.hasStandardBrowserEnv?function(){const t=pt.navigator&&/(msie|trident)/i.test(pt.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const i=P.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Mg=pt.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];P.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),P.isString(r)&&a.push("path="+r),P.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Pg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Vu(e,t){return e&&!Pg(t)?jg(e,t):t}const Gu=e=>e instanceof Ht?{...e}:e;function lr(e,t){t=t||{};const n={};function r(l,f,g){return P.isPlainObject(l)&&P.isPlainObject(f)?P.merge.call({caseless:g},l,f):P.isPlainObject(f)?P.merge({},f):P.isArray(f)?f.slice():f}function o(l,f,g){if(P.isUndefined(f)){if(!P.isUndefined(l))return r(void 0,l,g)}else return r(l,f,g)}function s(l,f){if(!P.isUndefined(f))return r(void 0,f)}function a(l,f){if(P.isUndefined(f)){if(!P.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function i(l,f,g){if(g in t)return r(l,f);if(g in e)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,f)=>o(Gu(l),Gu(f),!0)};return P.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=c[f]||o,y=g(e[f],t[f],f);P.isUndefined(y)&&g!==i||(n[f]=y)}),n}var Hu=e=>{const t=lr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Ht.from(a),t.url=Fu(Vu(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(P.isFormData(n)){if(pt.hasStandardBrowserEnv||pt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(pt.hasStandardBrowserEnv&&(r&&P.isFunction(r)&&(r=r(t)),r||r!==!1&&Rg(t.url))){const l=o&&s&&Mg.read(s);l&&a.set(o,l)}return t},Bg=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Hu(e);let s=o.data;const a=Ht.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,g,y,v,b;function p(){v&&v(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function m(){if(!h)return;const x=Ht.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:e,request:h};Pu(function(A){n(A),p()},function(A){r(A),p()},E),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(m)},h.onabort=function(){h&&(r(new ge("Request aborted",ge.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let w=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Du;o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),r(new ge(w,E.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&P.forEach(a.toJSON(),function(w,E){h.setRequestHeader(E,w)}),P.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),l&&([y,b]=Ms(l,!0),h.addEventListener("progress",y)),c&&h.upload&&([g,v]=Ms(c),h.upload.addEventListener("progress",g),h.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(f=x=>{h&&(r(!x||x.type?new Vr(null,e,h):x),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const C=kg(o.url);if(C&&pt.protocols.indexOf(C)===-1){r(new ge("Unsupported protocol "+C+":",ge.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Vg=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,i();const f=l instanceof Error?l:this.reason;r.abort(f instanceof ge?f:new Vr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new ge(`timeout ${t} of ms exceeded`,ge.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>P.asap(i),c}};const Gg=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Hg=async function*(e,t){for await(const n of Wg(e))yield*Gg(n,t)},Wg=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Wu=(e,t,n,r)=>{const o=Hg(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){i(),c.close();return}let g=f.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Ps=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Zu=Ps&&typeof ReadableStream=="function",Zg=Ps&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Xu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Xg=Zu&&Xu(()=>{let e=!1;const t=new Request(pt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),zu=64*1024,ki=Zu&&Xu(()=>P.isReadableStream(new Response("").body)),js={stream:ki&&(e=>e.body)};Ps&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!js[t]&&(js[t]=P.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ge(`Response type '${t}' is not supported`,ge.ERR_NOT_SUPPORT,r)})})})(new Response);const zg=async e=>{if(e==null)return 0;if(P.isBlob(e))return e.size;if(P.isSpecCompliantForm(e))return(await new Request(pt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(P.isArrayBufferView(e)||P.isArrayBuffer(e))return e.byteLength;if(P.isURLSearchParams(e)&&(e=e+""),P.isString(e))return(await Zg(e)).byteLength},Yg=async(e,t)=>{const n=P.toFiniteNumber(e.getContentLength());return n??zg(t)};var Jg=Ps&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:g="same-origin",fetchOptions:y}=Hu(e);l=l?(l+"").toLowerCase():"text";let v=Vg([o,s&&s.toAbortSignal()],a),b;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let h;try{if(c&&Xg&&n!=="get"&&n!=="head"&&(h=await Yg(f,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(P.isFormData(r)&&(_=E.headers.get("content-type"))&&f.setContentType(_),E.body){const[A,S]=ju(h,Ms(Bu(c)));r=Wu(E.body,zu,A,S)}}P.isString(g)||(g=g?"include":"omit");const m="credentials"in Request.prototype;b=new Request(t,{...y,signal:v,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:m?g:void 0});let C=await fetch(b);const x=ki&&(l==="stream"||l==="response");if(ki&&(i||x&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=C[L]});const _=P.toFiniteNumber(C.headers.get("content-length")),[A,S]=i&&ju(_,Ms(Bu(i),!0))||[];C=new Response(Wu(C.body,zu,A,()=>{S&&S(),p&&p()}),E)}l=l||"text";let w=await js[P.findKey(js,l)||"text"](C,e);return!x&&p&&p(),await new Promise((E,_)=>{Pu(E,_,{data:w,headers:Ht.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:b})})}catch(m){throw p&&p(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,e,b),{cause:m.cause||m}):ge.from(m,m&&m.code,e,b)}});const Di={http:lg,xhr:Bg,fetch:Jg};P.forEach(Di,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Yu=e=>`- ${e}`,qg=e=>P.isFunction(e)||e===null||e===!1;var Ju={getAdapter:e=>{e=P.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!qg(n)&&(r=Di[(a=String(n)).toLowerCase()],r===void 0))throw new ge(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,c])=>`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
30
+ <%s key={someKey} {...props} />`,yl,Mr,nA,Mr),Qe[Mr+yl]=!0}}return O===r?it(je):qe(je),je}}function Kt(O,W,Q){return Rt(O,W,Q,!0)}function Tn(O,W,Q){return Rt(O,W,Q,!1)}var gn=Tn,So=Kt;Lo.Fragment=r,Lo.jsx=gn,Lo.jsxs=So}()),Lo}process.env.NODE_ENV==="production"?Ya.exports=u2():Ya.exports=d2();var d=Ya.exports;function Ol(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ol(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ln(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ol(e))&&(r&&(r+=" "),r+=t);return r}const Oo=e=>typeof e=="number"&&!isNaN(e),er=e=>typeof e=="string",St=e=>typeof e=="function",ps=e=>er(e)||St(e)?e:null,Ja=e=>I.isValidElement(e)||er(e)||St(e)||Oo(e);function f2(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function hs(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(a){let{children:i,position:c,preventExitTransition:l,done:f,nodeRef:g,isIn:y,playToast:v}=a;const b=r?`${t}--${c}`:t,p=r?`${n}--${c}`:n,h=I.useRef(0);return I.useLayoutEffect(()=>{const m=g.current,C=b.split(" "),x=w=>{w.target===g.current&&(v(),m.removeEventListener("animationend",x),m.removeEventListener("animationcancel",x),h.current===0&&w.type!=="animationcancel"&&m.classList.remove(...C))};m.classList.add(...C),m.addEventListener("animationend",x),m.addEventListener("animationcancel",x)},[]),I.useEffect(()=>{const m=g.current,C=()=>{m.removeEventListener("animationend",C),o?f2(m,f,s):f()};y||(l?C():(h.current=1,m.className+=` ${p}`,m.addEventListener("animationend",C)))},[y]),I.createElement(I.Fragment,null,i)}}function Fl(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const ut=new Map;let Fo=[];const qa=new Set,p2=e=>qa.forEach(t=>t(e)),kl=()=>ut.size>0;function Dl(e,t){var n;if(t)return!((n=ut.get(t))==null||!n.isToastActive(e));let r=!1;return ut.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Nl(e,t){Ja(e)&&(kl()||Fo.push({content:e,options:t}),ut.forEach(n=>{n.buildToast(e,t)}))}function Rl(e,t){ut.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function h2(e){const{subscribe:t,getSnapshot:n,setProps:r}=I.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,g,y){let v=1,b=0,p=[],h=[],m=[],C=g;const x=new Map,w=new Set,E=()=>{m=Array.from(x.values()),w.forEach(S=>S())},_=S=>{h=S==null?[]:h.filter(L=>L!==S),E()},T=S=>{const{toastId:L,onOpen:R,updateId:k,children:D}=S.props,M=k==null;S.staleId&&x.delete(S.staleId),x.set(L,S),h=[...h,S.props.toastId].filter(G=>G!==S.staleId),E(),y(Fl(S,M?"added":"updated")),M&&St(R)&&R(I.isValidElement(D)&&D.props)};return{id:f,props:C,observe:S=>(w.add(S),()=>w.delete(S)),toggle:(S,L)=>{x.forEach(R=>{L!=null&&L!==R.props.toastId||St(R.toggle)&&R.toggle(S)})},removeToast:_,toasts:x,clearQueue:()=>{b-=p.length,p=[]},buildToast:(S,L)=>{if((V=>{let{containerId:N,toastId:H,updateId:j}=V;const $=N?N!==f:f!==1,oe=x.has(H)&&j==null;return $||oe})(L))return;const{toastId:R,updateId:k,data:D,staleId:M,delay:G}=L,Y=()=>{_(R)},X=k==null;X&&b++;const J={...C,style:C.toastStyle,key:v++,...Object.fromEntries(Object.entries(L).filter(V=>{let[N,H]=V;return H!=null})),toastId:R,updateId:k,data:D,closeToast:Y,isIn:!1,className:ps(L.className||C.toastClassName),bodyClassName:ps(L.bodyClassName||C.bodyClassName),progressClassName:ps(L.progressClassName||C.progressClassName),autoClose:!L.isLoading&&(z=L.autoClose,q=C.autoClose,z===!1||Oo(z)&&z>0?z:q),deleteToast(){const V=x.get(R),{onClose:N,children:H}=V.props;St(N)&&N(I.isValidElement(H)&&H.props),y(Fl(V,"removed")),x.delete(R),b--,b<0&&(b=0),p.length>0?T(p.shift()):E()}};var z,q;J.closeButton=C.closeButton,L.closeButton===!1||Ja(L.closeButton)?J.closeButton=L.closeButton:L.closeButton===!0&&(J.closeButton=!Ja(C.closeButton)||C.closeButton);let ne=S;I.isValidElement(S)&&!er(S.type)?ne=I.cloneElement(S,{closeToast:Y,toastProps:J,data:D}):St(S)&&(ne=S({closeToast:Y,toastProps:J,data:D}));const ce={content:ne,props:J,staleId:M};C.limit&&C.limit>0&&b>C.limit&&X?p.push(ce):Oo(G)?setTimeout(()=>{T(ce)},G):T(ce)},setProps(S){C=S},setToggle:(S,L)=>{x.get(S).toggle=L},isToastActive:S=>h.some(L=>L===S),getSnapshot:()=>C.newestOnTop?m.reverse():m}}(a,s,p2);ut.set(a,c);const l=c.observe(i);return Fo.forEach(f=>Nl(f.content,f.options)),Fo=[],()=>{l(),ut.delete(a)}},setProps(i){var c;(c=ut.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=ut.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=I.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const a=new Map;return o.forEach(i=>{const{position:c}=i.props;a.has(c)||a.set(c,[]),a.get(c).push(i)}),Array.from(a,i=>s(i[0],i[1]))},isToastActive:Dl,count:o==null?void 0:o.length}}function g2(e){const[t,n]=I.useState(!1),[r,o]=I.useState(!1),s=I.useRef(null),a=I.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:g}=e;var y,v;function b(){n(!0)}function p(){n(!1)}function h(x){const w=s.current;a.canDrag&&w&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?x.clientX-a.start:x.clientY-a.start,a.start!==x.clientX&&(a.canCloseOnClick=!1),w.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,w.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function m(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",m);const x=s.current;if(a.canDrag&&a.didMove&&x){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}(v=ut.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||v.setToggle(y.id,y.fn),I.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",b),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",b),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const C={onPointerDown:function(x){if(e.draggable===!0||e.draggable===x.pointerType){a.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",m);const w=s.current;a.canCloseOnClick=!0,a.canDrag=!0,w.style.transition="none",e.draggableDirection==="x"?(a.start=x.clientX,a.removalDistance=w.offsetWidth*(e.draggablePercent/100)):(a.start=x.clientY,a.removalDistance=w.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(x){const{top:w,bottom:E,left:_,right:T}=s.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&e.pauseOnHover&&x.clientX>=_&&x.clientX<=T&&x.clientY>=w&&x.clientY<=E?p():b()}};return i&&c&&(C.onMouseEnter=p,e.stacked||(C.onMouseLeave=b)),g&&(C.onClick=x=>{f&&f(x),a.canCloseOnClick&&l()}),{playToast:b,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:C}}function m2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:g,theme:y}=e;const v=s||c&&l===0,b={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(b.transform=`scaleX(${l})`);const p=Ln("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${y}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),h=St(a)?a({rtl:f,type:o,defaultClassName:p}):Ln(p,a),m={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{g&&r()}};return I.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},I.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),I.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:h,style:b,...m}))}let b2=1;const Ml=()=>""+b2++;function y2(e){return e&&(er(e.toastId)||Oo(e.toastId))?e.toastId:Ml()}function ko(e,t){return Nl(e,t),t.toastId}function gs(e,t){return{...t,type:t&&t.type||e,toastId:y2(t)}}function ms(e){return(t,n)=>ko(t,gs(e,n))}function Fe(e,t){return ko(e,gs("default",t))}Fe.loading=(e,t)=>ko(e,gs("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Fe.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=er(o)?Fe.loading(o,n):Fe.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,g,y)=>{if(g==null)return void Fe.dismiss(r);const v={type:f,...i,...n,data:y},b=er(g)?{render:g}:g;return r?Fe.update(r,{...v,...b}):Fe(b.render,{...v,...b}),y},l=St(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},Fe.success=ms("success"),Fe.info=ms("info"),Fe.error=ms("error"),Fe.warning=ms("warning"),Fe.warn=Fe.warning,Fe.dark=(e,t)=>ko(e,gs("default",{theme:"dark",...t})),Fe.dismiss=function(e){(function(t){var n;if(kl()){if(t==null||er(n=t)||Oo(n))ut.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=ut.get(t.containerId);r?r.removeToast(t.id):ut.forEach(o=>{o.removeToast(t.id)})}}else Fo=Fo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Fe.clearWaitingQueue=function(e){e===void 0&&(e={}),ut.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Fe.isActive=Dl,Fe.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=ut.get(a||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Ml()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,ko(a,s)}},Fe.done=e=>{Fe.update(e,{progress:1})},Fe.onChange=function(e){return qa.add(e),()=>{qa.delete(e)}},Fe.play=e=>Rl(!0,e),Fe.pause=e=>Rl(!1,e);const C2=typeof window<"u"?I.useLayoutEffect:I.useEffect,bs=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return I.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},Qa={info:function(e){return I.createElement(bs,{...e},I.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return I.createElement(bs,{...e},I.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return I.createElement(bs,{...e},I.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return I.createElement(bs,{...e},I.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return I.createElement("div",{className:"Toastify__spinner"})}},x2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=g2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:g,closeToast:y,transition:v,position:b,className:p,style:h,bodyClassName:m,bodyStyle:C,progressClassName:x,progressStyle:w,updateId:E,role:_,progress:T,rtl:S,toastId:L,deleteToast:R,isIn:k,isLoading:D,closeOnClick:M,theme:G}=e,Y=Ln("Toastify__toast",`Toastify__toast-theme--${G}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),X=St(p)?p({rtl:S,position:b,type:f,defaultClassName:Y}):Ln(Y,p),J=function(ce){let{theme:V,type:N,isLoading:H,icon:j}=ce,$=null;const oe={theme:V,type:N};return j===!1||(St(j)?$=j({...oe,isLoading:H}):I.isValidElement(j)?$=I.cloneElement(j,oe):H?$=Qa.spinner():(re=>re in Qa)(N)&&($=Qa[N](oe))),$}(e),z=!!T||!c,q={closeToast:y,type:f,theme:G};let ne=null;return a===!1||(ne=St(a)?a(q):I.isValidElement(a)?I.cloneElement(a,q):function(ce){let{closeToast:V,theme:N,ariaLabel:H="close"}=ce;return I.createElement("button",{className:`Toastify__close-button Toastify__close-button--${N}`,type:"button",onClick:j=>{j.stopPropagation(),V(j)},"aria-label":H},I.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},I.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(q)),I.createElement(v,{isIn:k,done:R,position:b,preventExitTransition:n,nodeRef:r,playToast:s},I.createElement("div",{id:L,onClick:l,"data-in":k,className:X,...o,style:h,ref:r},I.createElement("div",{...k&&{role:_},className:St(m)?m({type:f}):Ln("Toastify__toast-body",m),style:C},J!=null&&I.createElement("div",{className:Ln("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},J),I.createElement("div",null,i)),ne,I.createElement(m2,{...E&&!z?{key:`pb-${E}`}:{},rtl:S,theme:G,delay:c,isRunning:t,isIn:k,closeToast:y,hide:g,type:f,style:w,className:x,controlledProgress:z,progress:T||0})))},ys=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},v2=hs(ys("bounce",!0));hs(ys("slide",!0)),hs(ys("zoom")),hs(ys("flip"));const E2={position:"top-right",transition:v2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function $a(e){let t={...E2,...e};const n=e.stacked,[r,o]=I.useState(!0),s=I.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=h2(t),{className:l,style:f,rtl:g,containerId:y}=t;function v(p){const h=Ln("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":g});return St(l)?l({position:p,rtl:g,defaultClassName:h}):Ln(h,ps(l))}function b(){n&&(o(!0),Fe.play())}return C2(()=>{if(n){var p;const h=s.current.querySelectorAll('[data-in="true"]'),m=12,C=(p=t.position)==null?void 0:p.includes("top");let x=0,w=0;Array.from(h).reverse().forEach((E,_)=>{const T=E;T.classList.add("Toastify__toast--stacked"),_>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=C?"top":"bot");const S=x*(r?.2:1)+(r?0:m*_);T.style.setProperty("--y",`${C?S:-1*S}px`),T.style.setProperty("--g",`${m}`),T.style.setProperty("--s",""+(1-(r?w:0))),x+=T.offsetHeight,w+=.025})}},[r,c,n]),I.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),Fe.pause())},onMouseLeave:b},a((p,h)=>{const m=h.length?{...f}:{...f,pointerEvents:"none"};return I.createElement("div",{className:v(p),style:m,key:`container-${p}`},h.map(C=>{let{content:x,props:w}=C;return I.createElement(x2,{...w,stacked:n,collapseAll:b,isIn:i(w.toastId,w.containerId),style:w.style,key:`toast-${w.key}`},x)}))}))}var Pr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},tr=typeof window>"u"||"Deno"in globalThis;function Mt(){}function w2(e,t){return typeof e=="function"?e(t):e}function Ua(e){return typeof e=="number"&&e>=0&&e!==1/0}function Pl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function jr(e,t){return typeof e=="function"?e(t):e}function Bt(e,t){return typeof e=="function"?e(t):e}function jl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ka(a,t.options))return!1}else if(!Do(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Bl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(nr(t.options.mutationKey)!==nr(s))return!1}else if(!Do(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ka(e,t){return((t==null?void 0:t.queryKeyHashFn)||nr)(e)}function nr(e){return JSON.stringify(e,(t,n)=>ti(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Do(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Do(e[n],t[n])):!1}function ei(e,t){if(e===t)return e;const n=Vl(e)&&Vl(t);if(n||ti(e)&&ti(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let c=0;for(let l=0;l<a;l++){const f=n?l:s[l];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=ei(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function Cs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Vl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ti(e){if(!Gl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Gl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Gl(e){return Object.prototype.toString.call(e)==="[object Object]"}function I2(e){return new Promise(t=>{setTimeout(t,e)})}function ni(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return ei(e,t)}catch(r){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`)}return ei(e,t)}return t}function _2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function S2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var xs=Symbol();function Hl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===xs&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===xs?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var T2=(Up=class extends Pr{constructor(){super();le(this,vr);le(this,Pn);le(this,ao);K(this,ao,t=>{if(!tr&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Pn)||this.setEventListener(F(this,ao))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Pn))==null||t.call(this),K(this,Pn,void 0))}setEventListener(t){var n;K(this,ao,t),(n=F(this,Pn))==null||n.call(this),K(this,Pn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,vr)!==t&&(K(this,vr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,vr)=="boolean"?F(this,vr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},vr=new WeakMap,Pn=new WeakMap,ao=new WeakMap,Up),ri=new T2,A2=(Kp=class extends Pr{constructor(){super();le(this,io,!0);le(this,jn);le(this,co);K(this,co,t=>{if(!tr&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,jn)||this.setEventListener(F(this,co))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,jn))==null||t.call(this),K(this,jn,void 0))}setEventListener(t){var n;K(this,co,t),(n=F(this,jn))==null||n.call(this),K(this,jn,t(this.setOnline.bind(this)))}setOnline(t){F(this,io)!==t&&(K(this,io,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,io)}},io=new WeakMap,jn=new WeakMap,co=new WeakMap,Kp),vs=new A2;function oi(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function L2(e){return Math.min(1e3*2**e,3e4)}function Wl(e){return(e??"online")==="online"?vs.isOnline():!0}var Zl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function si(e){return e instanceof Zl}function Xl(e){let t=!1,n=0,r=!1,o;const s=oi(),a=p=>{var h;r||(y(new Zl(p)),(h=e.abort)==null||h.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>ri.isFocused()&&(e.networkMode==="always"||vs.isOnline())&&e.canRun(),f=()=>Wl(e.networkMode)&&e.canRun(),g=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),s.resolve(p))},y=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s.reject(p))},v=()=>new Promise(p=>{var h;o=m=>{(r||l())&&p(m)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),b=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(g).catch(m=>{var _;if(r)return;const C=e.retry??(tr?0:3),x=e.retryDelay??L2,w=typeof x=="function"?x(n,m):x,E=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,m);if(t||!E){y(m);return}n++,(_=e.onFail)==null||_.call(e,n,m),I2(w).then(()=>l()?void 0:v()).then(()=>{t?y(m):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?b():v().then(b),s)}}function O2(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=i=>setTimeout(i,0);const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||a()}return c},batchCalls:i=>(...c)=>{s(()=>{i(...c)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var et=O2(),zl=(e2=class{constructor(){le(this,Er)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ua(this.gcTime)&&K(this,Er,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(tr?1/0:5*60*1e3))}clearGcTimeout(){F(this,Er)&&(clearTimeout(F(this,Er)),K(this,Er,void 0))}},Er=new WeakMap,e2),F2=(t2=class extends zl{constructor(t){super();le(this,Qt);le(this,lo);le(this,uo);le(this,Pt);le(this,wr);le(this,lt);le(this,as);le(this,Ir);K(this,Ir,!1),K(this,as,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,wr,t.client),K(this,Pt,F(this,wr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,lo,k2(this.options)),this.state=t.state??F(this,lo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,lt))==null?void 0:t.promise}setOptions(t){this.options={...F(this,as),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Pt).remove(this)}setData(t,n){const r=ni(this.state.data,t,this.options);return be(this,Qt,An).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,Qt,An).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,lt))==null?void 0:r.promise;return(o=F(this,lt))==null||o.cancel(t),n?n.then(Mt).catch(Mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,lo))}isActive(){return this.observers.some(t=>Bt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xs||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Pl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,lt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,lt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Pt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,lt)&&(F(this,Ir)?F(this,lt).cancel({revert:!0}):F(this,lt).cancelRetry()),this.scheduleGc()),F(this,Pt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,Qt,An).call(this,{type:"invalidate"})}fetch(t,n){var c,l,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,lt))return F(this,lt).continueRetry(),F(this,lt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(K(this,Ir,!0),r.signal)})},s=()=>{const g=Hl(this.options,n),y={client:F(this,wr),queryKey:this.queryKey,meta:this.meta};return o(y),K(this,Ir,!1),this.options.persister?this.options.persister(g,y,this):g(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,wr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),K(this,uo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&be(this,Qt,An).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=g=>{var y,v,b,p;si(g)&&g.silent||be(this,Qt,An).call(this,{type:"error",error:g}),si(g)||((v=(y=F(this,Pt).config).onError)==null||v.call(y,g,this),(p=(b=F(this,Pt).config).onSettled)==null||p.call(b,this.state.data,g,this)),this.scheduleGc()};return K(this,lt,Xl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var y,v,b,p;if(g===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(h){i(h);return}(v=(y=F(this,Pt).config).onSuccess)==null||v.call(y,g,this),(p=(b=F(this,Pt).config).onSettled)==null||p.call(b,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,y)=>{be(this,Qt,An).call(this,{type:"failed",failureCount:g,error:y})},onPause:()=>{be(this,Qt,An).call(this,{type:"pause"})},onContinue:()=>{be(this,Qt,An).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,lt).start()}},lo=new WeakMap,uo=new WeakMap,Pt=new WeakMap,wr=new WeakMap,lt=new WeakMap,as=new WeakMap,Ir=new WeakMap,Qt=new WeakSet,An=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Yl(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return si(o)&&o.revert&&F(this,uo)?{...F(this,uo),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),et.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Pt).notify({query:this,type:"updated",action:t})})},t2);function Yl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Wl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function k2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var D2=(n2=class extends Pr{constructor(t={}){super();le(this,ln);this.config=t,K(this,ln,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ka(o,n);let a=this.get(s);return a||(a=new F2({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,ln).has(t.queryHash)||(F(this,ln).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,ln).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,ln).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,ln).get(t)}getAll(){return[...F(this,ln).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>jl(t,r)):n}notify(t){et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ln=new WeakMap,n2),N2=(r2=class extends zl{constructor(t){super();le(this,dn);le(this,un);le(this,dt);le(this,_r);this.mutationId=t.mutationId,K(this,dt,t.mutationCache),K(this,un,[]),this.state=t.state||Jl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,un).includes(t)||(F(this,un).push(t),this.clearGcTimeout(),F(this,dt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,un,F(this,un).filter(n=>n!==t)),this.scheduleGc(),F(this,dt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,un).length||(this.state.status==="pending"?this.scheduleGc():F(this,dt).remove(this))}continue(){var t;return((t=F(this,_r))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,g,y,v,b,p,h,m,C,x,w,E,_,T;K(this,_r,Xl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{be(this,dn,Kn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{be(this,dn,Kn).call(this,{type:"pause"})},onContinue:()=>{be(this,dn,Kn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,dt).canRun(this)}));const n=this.state.status==="pending",r=!F(this,_r).canStart();try{if(!n){be(this,dn,Kn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,dt).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&be(this,dn,Kn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,_r).start();return await((l=(c=F(this,dt).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,S,t,this.state.context)),await((v=(y=F(this,dt).config).onSettled)==null?void 0:v.call(y,S,null,this.state.variables,this.state.context,this)),await((p=(b=this.options).onSettled)==null?void 0:p.call(b,S,null,t,this.state.context)),be(this,dn,Kn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(h=F(this,dt).config).onError)==null?void 0:m.call(h,S,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,S,t,this.state.context)),await((E=(w=F(this,dt).config).onSettled)==null?void 0:E.call(w,void 0,S,this.state.variables,this.state.context,this)),await((T=(_=this.options).onSettled)==null?void 0:T.call(_,void 0,S,t,this.state.context)),S}finally{be(this,dn,Kn).call(this,{type:"error",error:S})}}finally{F(this,dt).runNext(this)}}},un=new WeakMap,dt=new WeakMap,_r=new WeakMap,dn=new WeakSet,Kn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),et.batch(()=>{F(this,un).forEach(r=>{r.onMutationUpdate(t)}),F(this,dt).notify({mutation:this,type:"updated",action:t})})},r2);function Jl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var R2=(o2=class extends Pr{constructor(t={}){super();le(this,wn);le(this,$t);le(this,is);this.config=t,K(this,wn,new Set),K(this,$t,new Map),K(this,is,0)}build(t,n,r){const o=new N2({mutationCache:this,mutationId:++Za(this,is)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,wn).add(t);const n=Es(t);if(typeof n=="string"){const r=F(this,$t).get(n);r?r.push(t):F(this,$t).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,wn).delete(t)){const n=Es(t);if(typeof n=="string"){const r=F(this,$t).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,$t).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Es(t);if(typeof n=="string"){const r=F(this,$t).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Es(t);if(typeof n=="string"){const o=(r=F(this,$t).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){et.batch(()=>{F(this,wn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,wn).clear(),F(this,$t).clear()})}getAll(){return Array.from(F(this,wn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Bl(n,r))}findAll(t={}){return this.getAll().filter(n=>Bl(t,n))}notify(t){et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return et.batch(()=>Promise.all(t.map(n=>n.continue().catch(Mt))))}},wn=new WeakMap,$t=new WeakMap,is=new WeakMap,o2);function Es(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ws(e){return{onFetch:(t,n)=>{var f,g,y,v,b;const r=t.options,o=(y=(g=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:y.direction,s=((v=t.state.data)==null?void 0:v.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const h=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},m=Hl(t.options,t.fetchOptions),C=async(x,w,E)=>{if(p)return Promise.reject();if(w==null&&x.pages.length)return Promise.resolve(x);const _={client:t.client,queryKey:t.queryKey,pageParam:w,direction:E?"backward":"forward",meta:t.options.meta};h(_);const T=await m(_),{maxPages:S}=t.options,L=E?S2:_2;return{pages:L(x.pages,T,S),pageParams:L(x.pageParams,w,S)}};if(o&&s.length){const x=o==="backward",w=x?ql:ai,E={pages:s,pageParams:a},_=w(r,E);i=await C(E,_,x)}else{const x=e??s.length;do{const w=c===0?a[0]??r.initialPageParam:ai(r,i);if(c>0&&w==null)break;i=await C(i,w),c++}while(c<x)}return i};t.options.persister?t.fetchFn=()=>{var p,h;return(h=(p=t.options).persister)==null?void 0:h.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function ai(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ql(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function M2(e,t){return t?ai(e,t)!=null:!1}function P2(e,t){return!t||!e.getPreviousPageParam?!1:ql(e,t)!=null}var j2=(s2=class{constructor(e={}){le(this,Xe);le(this,Bn);le(this,Vn);le(this,fo);le(this,po);le(this,Gn);le(this,ho);le(this,go);K(this,Xe,e.queryCache||new D2),K(this,Bn,e.mutationCache||new R2),K(this,Vn,e.defaultOptions||{}),K(this,fo,new Map),K(this,po,new Map),K(this,Gn,0)}mount(){Za(this,Gn)._++,F(this,Gn)===1&&(K(this,ho,ri.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Xe).onFocus())})),K(this,go,vs.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Xe).onOnline())})))}unmount(){var e,t;Za(this,Gn)._--,F(this,Gn)===0&&((e=F(this,ho))==null||e.call(this),K(this,ho,void 0),(t=F(this,go))==null||t.call(this),K(this,go,void 0))}isFetching(e){return F(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,Bn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Xe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Xe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(jr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Xe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,Xe).get(r.queryHash),s=o==null?void 0:o.state.data,a=w2(t,s);if(a!==void 0)return F(this,Xe).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return et.batch(()=>F(this,Xe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Xe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Xe);et.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Xe);return et.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=et.batch(()=>F(this,Xe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Mt).catch(Mt)}invalidateQueries(e,t={}){return et.batch(()=>(F(this,Xe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=et.batch(()=>F(this,Xe).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Mt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Mt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Xe).build(this,t);return n.isStaleByTime(jr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Mt).catch(Mt)}fetchInfiniteQuery(e){return e.behavior=ws(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Mt).catch(Mt)}ensureInfiniteQueryData(e){return e.behavior=ws(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return vs.isOnline()?F(this,Bn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Xe)}getMutationCache(){return F(this,Bn)}getDefaultOptions(){return F(this,Vn)}setDefaultOptions(e){K(this,Vn,e)}setQueryDefaults(e,t){F(this,fo).set(nr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,fo).values()],n={};return t.forEach(r=>{Do(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,po).set(nr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,po).values()],n={};return t.forEach(r=>{Do(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Vn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ka(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===xs&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Vn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Xe).clear(),F(this,Bn).clear()}},Xe=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,fo=new WeakMap,po=new WeakMap,Gn=new WeakMap,ho=new WeakMap,go=new WeakMap,s2),Ql=(a2=class extends Pr{constructor(t,n){super();le(this,Ne);le(this,xt);le(this,xe);le(this,cs);le(this,ft);le(this,Sr);le(this,mo);le(this,Hn);le(this,fn);le(this,ls);le(this,bo);le(this,yo);le(this,Tr);le(this,Ar);le(this,Wn);le(this,Co,new Set);this.options=n,K(this,xt,t),K(this,fn,null),K(this,Hn,oi()),this.options.experimental_prefetchInRender||F(this,Hn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,xe).addObserver(this),$l(F(this,xe),this.options)?be(this,Ne,ds).call(this):this.updateResult(),be(this,Ne,wl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ii(F(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ii(F(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,Ne,Il).call(this),be(this,Ne,_l).call(this),F(this,xe).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,xe);if(this.options=F(this,xt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Bt(this.options.enabled,F(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,Ne,Sl).call(this),F(this,xe).setOptions(this.options),r._defaulted&&!Cs(this.options,r)&&F(this,xt).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,xe),observer:this});const s=this.hasListeners();s&&Ul(F(this,xe),o,this.options,r)&&be(this,Ne,ds).call(this),this.updateResult(n),s&&(F(this,xe)!==o||Bt(this.options.enabled,F(this,xe))!==Bt(r.enabled,F(this,xe))||jr(this.options.staleTime,F(this,xe))!==jr(r.staleTime,F(this,xe)))&&be(this,Ne,xl).call(this);const a=be(this,Ne,vl).call(this);s&&(F(this,xe)!==o||Bt(this.options.enabled,F(this,xe))!==Bt(r.enabled,F(this,xe))||a!==F(this,Wn))&&be(this,Ne,El).call(this,a)}getOptimisticResult(t){const n=F(this,xt).getQueryCache().build(F(this,xt),t),r=this.createResult(n,t);return V2(this,r)&&(K(this,ft,r),K(this,mo,this.options),K(this,Sr,F(this,xe).state)),r}getCurrentResult(){return F(this,ft)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,Co).add(t)}getCurrentQuery(){return F(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,xt).defaultQueryOptions(t),r=F(this,xt).getQueryCache().build(F(this,xt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,Ne,ds).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,ft)))}createResult(t,n){var S;const r=F(this,xe),o=this.options,s=F(this,ft),a=F(this,Sr),i=F(this,mo),l=t!==r?t.state:F(this,cs),{state:f}=t;let g={...f},y=!1,v;if(n._optimisticResults){const L=this.hasListeners(),R=!L&&$l(t,n),k=L&&Ul(t,r,n,o);(R||k)&&(g={...g,...Yl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:p,status:h}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===F(this,ls))v=F(this,bo);else try{K(this,ls,n.select),v=n.select(g.data),v=ni(s==null?void 0:s.data,v,n),K(this,bo,v),K(this,fn,null)}catch(L){K(this,fn,L)}else v=g.data;if(n.placeholderData!==void 0&&v===void 0&&h==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,yo))==null?void 0:S.state.data,F(this,yo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),K(this,fn,null)}catch(R){K(this,fn,R)}L!==void 0&&(h="success",v=ni(s==null?void 0:s.data,L,n),y=!0)}F(this,fn)&&(b=F(this,fn),v=F(this,bo),p=Date.now(),h="error");const m=g.fetchStatus==="fetching",C=h==="pending",x=h==="error",w=C&&m,E=v!==void 0,T={status:h,fetchStatus:g.fetchStatus,isPending:C,isSuccess:h==="success",isError:x,isInitialLoading:w,isLoading:w,data:v,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:p,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>l.dataUpdateCount||g.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!C,isLoadingError:x&&!E,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:x&&E,isStale:ci(t,n),refetch:this.refetch,promise:F(this,Hn)};if(this.options.experimental_prefetchInRender){const L=D=>{T.status==="error"?D.reject(T.error):T.data!==void 0&&D.resolve(T.data)},R=()=>{const D=K(this,Hn,T.promise=oi());L(D)},k=F(this,Hn);switch(k.status){case"pending":t.queryHash===r.queryHash&&L(k);break;case"fulfilled":(T.status==="error"||T.data!==k.value)&&R();break;case"rejected":(T.status!=="error"||T.error!==k.reason)&&R();break}}return T}updateResult(t){const n=F(this,ft),r=this.createResult(F(this,xe),this.options);if(K(this,Sr,F(this,xe).state),K(this,mo,this.options),F(this,Sr).data!==void 0&&K(this,yo,F(this,xe)),Cs(r,n))return;K(this,ft,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,Co).size)return!0;const c=new Set(i??F(this,Co));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,ft)).some(l=>{const f=l;return F(this,ft)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),be(this,Ne,l2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,Ne,wl).call(this)}},xt=new WeakMap,xe=new WeakMap,cs=new WeakMap,ft=new WeakMap,Sr=new WeakMap,mo=new WeakMap,Hn=new WeakMap,fn=new WeakMap,ls=new WeakMap,bo=new WeakMap,yo=new WeakMap,Tr=new WeakMap,Ar=new WeakMap,Wn=new WeakMap,Co=new WeakMap,Ne=new WeakSet,ds=function(t){be(this,Ne,Sl).call(this);let n=F(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Mt)),n},xl=function(){be(this,Ne,Il).call(this);const t=jr(this.options.staleTime,F(this,xe));if(tr||F(this,ft).isStale||!Ua(t))return;const r=Pl(F(this,ft).dataUpdatedAt,t)+1;K(this,Tr,setTimeout(()=>{F(this,ft).isStale||this.updateResult()},r))},vl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,xe)):this.options.refetchInterval)??!1},El=function(t){be(this,Ne,_l).call(this),K(this,Wn,t),!(tr||Bt(this.options.enabled,F(this,xe))===!1||!Ua(F(this,Wn))||F(this,Wn)===0)&&K(this,Ar,setInterval(()=>{(this.options.refetchIntervalInBackground||ri.isFocused())&&be(this,Ne,ds).call(this)},F(this,Wn)))},wl=function(){be(this,Ne,xl).call(this),be(this,Ne,El).call(this,be(this,Ne,vl).call(this))},Il=function(){F(this,Tr)&&(clearTimeout(F(this,Tr)),K(this,Tr,void 0))},_l=function(){F(this,Ar)&&(clearInterval(F(this,Ar)),K(this,Ar,void 0))},Sl=function(){const t=F(this,xt).getQueryCache().build(F(this,xt),this.options);if(t===F(this,xe))return;const n=F(this,xe);K(this,xe,t),K(this,cs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},l2=function(t){et.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,ft))}),F(this,xt).getQueryCache().notify({query:F(this,xe),type:"observerResultsUpdated"})})},a2);function B2(e,t){return Bt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $l(e,t){return B2(e,t)||e.state.data!==void 0&&ii(e,t,t.refetchOnMount)}function ii(e,t,n){if(Bt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ci(e,t)}return!1}function Ul(e,t,n,r){return(e!==t||Bt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ci(e,n)}function ci(e,t){return Bt(t.enabled,e)!==!1&&e.isStaleByTime(jr(t.staleTime,e))}function V2(e,t){return!Cs(e.getCurrentResult(),t)}var G2=class extends Ql{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:ws()},t)}getOptimisticResult(e){return e.behavior=ws(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,p;const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:a,isRefetchError:i}=r,c=(p=(b=n.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:p.direction,l=a&&c==="forward",f=o&&c==="forward",g=a&&c==="backward",y=o&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:M2(t,n.data),hasPreviousPage:P2(t,n.data),isFetchNextPageError:l,isFetchingNextPage:f,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:i&&!l&&!g,isRefetching:s&&!f&&!y}}},H2=(i2=class extends Pr{constructor(n,r){super();le(this,_n);le(this,Zn);le(this,Xn);le(this,vt);le(this,In);K(this,Zn,n),this.setOptions(r),this.bindMethods(),be(this,_n,Xa).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,Zn).defaultMutationOptions(n),Cs(this.options,r)||F(this,Zn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,vt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&nr(r.mutationKey)!==nr(this.options.mutationKey)?this.reset():((o=F(this,vt))==null?void 0:o.state.status)==="pending"&&F(this,vt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,vt))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,_n,Xa).call(this),be(this,_n,Tl).call(this,n)}getCurrentResult(){return F(this,Xn)}reset(){var n;(n=F(this,vt))==null||n.removeObserver(this),K(this,vt,void 0),be(this,_n,Xa).call(this),be(this,_n,Tl).call(this)}mutate(n,r){var o;return K(this,In,r),(o=F(this,vt))==null||o.removeObserver(this),K(this,vt,F(this,Zn).getMutationCache().build(F(this,Zn),this.options)),F(this,vt).addObserver(this),F(this,vt).execute(n)}},Zn=new WeakMap,Xn=new WeakMap,vt=new WeakMap,In=new WeakMap,_n=new WeakSet,Xa=function(){var r;const n=((r=F(this,vt))==null?void 0:r.state)??Jl();K(this,Xn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Tl=function(n){et.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,In)&&this.hasListeners()){const g=F(this,Xn).variables,y=F(this,Xn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,In)).onSuccess)==null||o.call(r,n.data,g,y),(a=(s=F(this,In)).onSettled)==null||a.call(s,n.data,null,g,y)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,In)).onError)==null||c.call(i,n.error,g,y),(f=(l=F(this,In)).onSettled)==null||f.call(l,void 0,n.error,g,y))}this.listeners.forEach(g=>{g(F(this,Xn))})})},i2),Kl=A.createContext(void 0),Br=e=>{const t=A.useContext(Kl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},W2=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(Kl.Provider,{value:e,children:t})),eu=A.createContext(!1),Z2=()=>A.useContext(eu);eu.Provider;function X2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var z2=A.createContext(X2()),Y2=()=>A.useContext(z2);function tu(e,t){return typeof e=="function"?e(...t):!!e}function li(){}var J2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},q2=e=>{A.useEffect(()=>{e.clearReset()},[e])},Q2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||tu(n,[e.error,r])),$2=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},U2=(e,t)=>e.isLoading&&e.isFetching&&!t,K2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,nu=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ru(e,t,n){var g,y,v,b,p;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Br(),o=Z2(),s=Y2(),a=r.defaultQueryOptions(e);(y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",$2(a),J2(a,s),q2(s);const i=!r.getQueryCache().get(a.queryHash),[c]=A.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(h=>{const m=f?c.subscribe(et.batchCalls(h)):li;return c.updateResult(),m},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),K2(a,l))throw nu(a,c,s);if(Q2({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((b=(v=r.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||b.call(v,a,l),a.experimental_prefetchInRender&&!tr&&U2(l,o)){const h=i?nu(a,c,s):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;h==null||h.catch(li).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function mn(e,t){return ru(e,Ql)}function Vt(e,t){const n=Br(),[r]=A.useState(()=>new H2(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const o=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(et.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=A.useCallback((a,i)=>{r.mutate(a,i).catch(li)},[r]);if(o.error&&tu(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function eh(e,t){return ru(e,G2)}const ui=(e,t)=>t.some(n=>e instanceof n);let ou,su;function th(){return ou||(ou=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function nh(){return su||(su=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const di=new WeakMap,fi=new WeakMap,Is=new WeakMap;function rh(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(rr(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return Is.set(t,e),t}function oh(e){if(di.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),o()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});di.set(e,t)}let pi={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return di.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return rr(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function au(e){pi=e(pi)}function sh(e){return nh().includes(e)?function(...t){return e.apply(hi(this),t),rr(this.request)}:function(...t){return rr(e.apply(hi(this),t))}}function ah(e){return typeof e=="function"?sh(e):(e instanceof IDBTransaction&&oh(e),ui(e,th())?new Proxy(e,pi):e)}function rr(e){if(e instanceof IDBRequest)return rh(e);if(fi.has(e))return fi.get(e);const t=ah(e);return t!==e&&(fi.set(e,t),Is.set(t,e)),t}const hi=e=>Is.get(e);function ih(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=rr(a);return r&&a.addEventListener("upgradeneeded",c=>{r(rr(a.result),c.oldVersion,c.newVersion,rr(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const ch=["get","getKey","getAll","getAllKeys","count"],lh=["put","add","delete","clear"],gi=new Map;function iu(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(gi.get(t))return gi.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=lh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||ch.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[n](...i),o&&c.done]))[0]};return gi.set(t,s),s}au(e=>({...e,get:(t,n,r)=>iu(t,n)||e.get(t,n,r),has:(t,n)=>!!iu(t,n)||e.has(t,n)}));const uh=["continue","continuePrimaryKey","advance"],cu={},mi=new WeakMap,lu=new WeakMap,dh={get(e,t){if(!uh.includes(t))return e[t];let n=cu[t];return n||(n=cu[t]=function(...r){mi.set(this,lu.get(this)[t](...r))}),n}};async function*fh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,dh);for(lu.set(n,t),Is.set(n,hi(t));t;)yield n,t=await(mi.get(n)||t.continue()),mi.delete(n)}function uu(e,t){return t===Symbol.asyncIterator&&ui(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ui(e,[IDBIndex,IDBObjectStore])}au(e=>({...e,get(t,n,r){return uu(t,n)?fh:e.get(t,n,r)},has(t,n){return uu(t,n)||e.has(t,n)}}));const ph="connector-db",hh=1,_s={FEEDBACK:"feedback"},No=`${_s.FEEDBACK}:data`,Ss=`${_s.FEEDBACK}:last_submitted`,Ro=`${_s.FEEDBACK}:capture_on_demand`,Mo=`${_s.FEEDBACK}:show_notification`,gh=12*60*60*1e3,bi=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=gh:!0,du=(e,t=!1)=>e.captureFeedback&&(bi(e.firstViewed)&&(!e.lastSubmittedFeedback||bi(e.lastSubmittedFeedback))||!!t);let or=null;const On=async()=>{try{or||(or=await ih(ph,hh,{upgrade(e){e.objectStoreNames.contains(No)||e.createObjectStore(No),e.objectStoreNames.contains(Ss)||e.createObjectStore(Ss),e.objectStoreNames.contains(Ro)||e.createObjectStore(Ro),e.objectStoreNames.contains(Mo)||e.createObjectStore(Mo)},blocked(){console.warn("Upgrade blocked! Close other tabs using this DB.")},blocking(){console.warn("Another tab is trying to upgrade. Closing connection to allow upgrade."),or&&(or.close(),or=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),or=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return or},yi=async e=>{if(!e)return[];const t=await On();if(!t)return[];try{return await t.get(No,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},mh=async e=>{if(!e)return null;const t=await On();if(!t)return null;try{return await t.get(Ss,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Ts=async e=>{if(!e)return;const t=await On();if(t)try{return await t.get(Ro,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},bh=async e=>{if(!e)return!1;const t=await On();if(!t)return!1;try{return await t.get(Mo,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},yh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await On();if(n)try{const r=await yi(e),o=new Set(r.map(a=>a.connectorId)),s=t.filter(a=>!o.has(a.connector_id)).map(a=>({connectorId:a.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const a=[...r,...s];await n.put(No,a,e),await n.put(Mo,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},Ch=async e=>{if(!e)return;const t=await On();if(t)try{const n=await yi(e),r=await Ts(e),o=new Date,s=n.map(a=>{const i=du(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(No,s,e),await t.put(Ss,o,e),r&&await t.put(Ro,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},fu=async(e,t)=>{if(!e)return;const n=await On();if(n)try{await n.put(Ro,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},xh=async e=>{if(!e)return;const t=await On();if(t)try{await t.put(Mo,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},vh=async e=>{const t=await yi(e),n=await Ts(e);return t.filter(o=>du(o,n))},Ci=async e=>{const t=await mh(e);return t&&!bi(t)?!1:await Ts(e)&&!t?!0:!!(await vh(e)).length},Eh=async(e,t)=>{await yh(e,t)},As=async e=>{e&&await Ch(e)},wh=async(e,t)=>{const n=await Ts(e);t?n!==!1&&await fu(e,t):await fu(e,void 0)},pu=async e=>await bh(e)&&await Ci(e),hu=async e=>{await xh(e)};var xi={},sr={};function gu(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ih}=Object.prototype,{getPrototypeOf:vi}=Object,Ls=(e=>t=>{const n=Ih.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gt=e=>(e=e.toLowerCase(),t=>Ls(t)===e),Os=e=>t=>typeof t===e,{isArray:Vr}=Array,Po=Os("undefined");function _h(e){return e!==null&&!Po(e)&&e.constructor!==null&&!Po(e.constructor)&&Tt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mu=Gt("ArrayBuffer");function Sh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mu(e.buffer),t}const Th=Os("string"),Tt=Os("function"),bu=Os("number"),Fs=e=>e!==null&&typeof e=="object",Ah=e=>e===!0||e===!1,ks=e=>{if(Ls(e)!=="object")return!1;const t=vi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Lh=Gt("Date"),Oh=Gt("File"),Fh=Gt("Blob"),kh=Gt("FileList"),Dh=e=>Fs(e)&&Tt(e.pipe),Nh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tt(e.append)&&((t=Ls(e))==="formdata"||t==="object"&&Tt(e.toString)&&e.toString()==="[object FormData]"))},Rh=Gt("URLSearchParams"),[Mh,Ph,jh,Bh]=["ReadableStream","Request","Response","Headers"].map(Gt),Vh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Vr(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function yu(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:he,Cu=e=>!Po(e)&&e!==ar;function Ei(){const{caseless:e}=Cu(this)&&this||{},t={},n=(r,o)=>{const s=e&&yu(t,o)||o;ks(t[s])&&ks(r)?t[s]=Ei(t[s],r):ks(r)?t[s]=Ei({},r):Vr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&jo(arguments[r],n);return t}const Gh=(e,t,n,{allOwnKeys:r}={})=>(jo(t,(o,s)=>{n&&Tt(o)?e[s]=gu(o,n):e[s]=o},{allOwnKeys:r}),e),Hh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Wh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Zh=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&vi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Xh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},zh=e=>{if(!e)return null;if(Vr(e))return e;let t=e.length;if(!bu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vi(Uint8Array)),Jh=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},qh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Qh=Gt("HTMLFormElement"),$h=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),xu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Uh=Gt("RegExp"),vu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jo(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Kh=e=>{vu(e,(t,n)=>{if(Tt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Tt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},eg=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Vr(e)?r(e):r(String(e).split(t)),n},tg=()=>{},ng=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,wi="abcdefghijklmnopqrstuvwxyz",Eu="0123456789",wu={DIGIT:Eu,ALPHA:wi,ALPHA_DIGIT:wi+wi.toUpperCase()+Eu},rg=(e=16,t=wu.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function og(e){return!!(e&&Tt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const sg=e=>{const t=new Array(10),n=(r,o)=>{if(Fs(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Vr(r)?[]:{};return jo(r,(a,i)=>{const c=n(a,o+1);!Po(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},ag=Gt("AsyncFunction"),ig=e=>e&&(Fs(e)||Tt(e))&&Tt(e.then)&&Tt(e.catch),Iu=((e,t)=>e?setImmediate:t?((n,r)=>(ar.addEventListener("message",({source:o,data:s})=>{o===ar&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ar.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tt(ar.postMessage)),cg=typeof queueMicrotask<"u"?queueMicrotask.bind(ar):typeof process<"u"&&process.nextTick||Iu;var P={isArray:Vr,isArrayBuffer:mu,isBuffer:_h,isFormData:Nh,isArrayBufferView:Sh,isString:Th,isNumber:bu,isBoolean:Ah,isObject:Fs,isPlainObject:ks,isReadableStream:Mh,isRequest:Ph,isResponse:jh,isHeaders:Bh,isUndefined:Po,isDate:Lh,isFile:Oh,isBlob:Fh,isRegExp:Uh,isFunction:Tt,isStream:Dh,isURLSearchParams:Rh,isTypedArray:Yh,isFileList:kh,forEach:jo,merge:Ei,extend:Gh,trim:Vh,stripBOM:Hh,inherits:Wh,toFlatObject:Zh,kindOf:Ls,kindOfTest:Gt,endsWith:Xh,toArray:zh,forEachEntry:Jh,matchAll:qh,isHTMLForm:Qh,hasOwnProperty:xu,hasOwnProp:xu,reduceDescriptors:vu,freezeMethods:Kh,toObjectSet:eg,toCamelCase:$h,noop:tg,toFiniteNumber:ng,findKey:yu,global:ar,isContextDefined:Cu,ALPHABET:wu,generateString:rg,isSpecCompliantForm:og,toJSONObject:sg,isAsyncFn:ag,isThenable:ig,setImmediate:Iu,asap:cg};function ge(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}P.inherits(ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:P.toJSONObject(this.config),code:this.code,status:this.status}}});const _u=ge.prototype,Su={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Su[e]={value:e}}),Object.defineProperties(ge,Su),Object.defineProperty(_u,"isAxiosError",{value:!0}),ge.from=(e,t,n,r,o,s)=>{const a=Object.create(_u);return P.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),ge.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var lg=null;function Ii(e){return P.isPlainObject(e)||P.isArray(e)}function Tu(e){return P.endsWith(e,"[]")?e.slice(0,-2):e}function Au(e,t,n){return e?e.concat(t).map(function(o,s){return o=Tu(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function ug(e){return P.isArray(e)&&!e.some(Ii)}const dg=P.toFlatObject(P,{},null,function(t){return/^is[A-Z]/.test(t)});function Ds(e,t,n){if(!P.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=P.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!P.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(t);if(!P.isFunction(o))throw new TypeError("visitor must be a function");function l(b){if(b===null)return"";if(P.isDate(b))return b.toISOString();if(!c&&P.isBlob(b))throw new ge("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(b)||P.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,p,h){let m=b;if(b&&!h&&typeof b=="object"){if(P.endsWith(p,"{}"))p=r?p:p.slice(0,-2),b=JSON.stringify(b);else if(P.isArray(b)&&ug(b)||(P.isFileList(b)||P.endsWith(p,"[]"))&&(m=P.toArray(b)))return p=Tu(p),m.forEach(function(x,w){!(P.isUndefined(x)||x===null)&&t.append(a===!0?Au([p],w,s):a===null?p:p+"[]",l(x))}),!1}return Ii(b)?!0:(t.append(Au(h,p,s),l(b)),!1)}const g=[],y=Object.assign(dg,{defaultVisitor:f,convertValue:l,isVisitable:Ii});function v(b,p){if(!P.isUndefined(b)){if(g.indexOf(b)!==-1)throw Error("Circular reference detected in "+p.join("."));g.push(b),P.forEach(b,function(m,C){(!(P.isUndefined(m)||m===null)&&o.call(t,m,P.isString(C)?C.trim():C,p,y))===!0&&v(m,p?p.concat(C):[C])}),g.pop()}}if(!P.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Lu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _i(e,t){this._pairs=[],e&&Ds(e,this,t)}const Ou=_i.prototype;Ou.append=function(t,n){this._pairs.push([t,n])},Ou.toString=function(t){const n=t?function(r){return t.call(this,r,Lu)}:Lu;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function fg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Fu(e,t,n){if(!t)return e;const r=n&&n.encode||fg,o=n&&n.serialize;let s;if(o?s=o(t,n):s=P.isURLSearchParams(t)?t.toString():new _i(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class pg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){P.forEach(this.handlers,function(r){r!==null&&t(r)})}}var ku=pg,Du={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},hg=typeof URLSearchParams<"u"?URLSearchParams:_i,gg=typeof FormData<"u"?FormData:null,mg=typeof Blob<"u"?Blob:null,bg={isBrowser:!0,classes:{URLSearchParams:hg,FormData:gg,Blob:mg},protocols:["http","https","file","blob","url","data"]};const Si=typeof window<"u"&&typeof document<"u",Ti=typeof navigator=="object"&&navigator||void 0,yg=Si&&(!Ti||["ReactNative","NativeScript","NS"].indexOf(Ti.product)<0),Cg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xg=Si&&window.location.href||"http://localhost";var vg=Object.freeze({__proto__:null,hasBrowserEnv:Si,hasStandardBrowserWebWorkerEnv:Cg,hasStandardBrowserEnv:yg,navigator:Ti,origin:xg}),ht={...vg,...bg};function Eg(e,t){return Ds(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ht.isNode&&P.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function wg(e){return P.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ig(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Nu(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=s>=n.length;return a=!a&&P.isArray(o)?o.length:a,c?(P.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!P.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&P.isArray(o[a])&&(o[a]=Ig(o[a])),!i)}if(P.isFormData(e)&&P.isFunction(e.entries)){const n={};return P.forEachEntry(e,(r,o)=>{t(wg(r),o,n,0)}),n}return null}function _g(e,t,n){if(P.isString(e))try{return(t||JSON.parse)(e),P.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Ai={transitional:Du,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=P.isObject(t);if(s&&P.isHTMLForm(t)&&(t=new FormData(t)),P.isFormData(t))return o?JSON.stringify(Nu(t)):t;if(P.isArrayBuffer(t)||P.isBuffer(t)||P.isStream(t)||P.isFile(t)||P.isBlob(t)||P.isReadableStream(t))return t;if(P.isArrayBufferView(t))return t.buffer;if(P.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Eg(t,this.formSerializer).toString();if((i=P.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ds(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),_g(t)):t}],transformResponse:[function(t){const n=this.transitional||Ai.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(P.isResponse(t)||P.isReadableStream(t))return t;if(t&&P.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?ge.from(i,ge.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],e=>{Ai.headers[e]={}});var Li=Ai;const Sg=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Tg=e=>{const t={};let n,r,o;return e&&e.split(`
31
+ `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Sg[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Ru=Symbol("internals");function Bo(e){return e&&String(e).trim().toLowerCase()}function Ns(e){return e===!1||e==null?e:P.isArray(e)?e.map(Ns):String(e)}function Ag(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Lg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Oi(e,t,n,r,o){if(P.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!P.isString(t)){if(P.isString(r))return t.indexOf(r)!==-1;if(P.isRegExp(r))return r.test(t)}}function Og(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Fg(e,t){const n=P.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}class Rs{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=Bo(c);if(!f)throw new Error("header name must be a non-empty string");const g=P.findKey(o,f);(!g||o[g]===void 0||l===!0||l===void 0&&o[g]!==!1)&&(o[g||c]=Ns(i))}const a=(i,c)=>P.forEach(i,(l,f)=>s(l,f,c));if(P.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(P.isString(t)&&(t=t.trim())&&!Lg(t))a(Tg(t),n);else if(P.isHeaders(t))for(const[i,c]of t.entries())s(c,i,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=Bo(t),t){const r=P.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Ag(o);if(P.isFunction(n))return n.call(this,o,r);if(P.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Bo(t),t){const r=P.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Oi(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Bo(a),a){const i=P.findKey(r,a);i&&(!n||Oi(r,r[i],i,n))&&(delete r[i],o=!0)}}return P.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Oi(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return P.forEach(this,(o,s)=>{const a=P.findKey(r,s);if(a){n[a]=Ns(o),delete n[s];return}const i=t?Og(s):String(s).trim();i!==s&&delete n[s],n[i]=Ns(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return P.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&P.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
32
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ru]=this[Ru]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Bo(a);r[i]||(Fg(o,a),r[i]=!0)}return P.isArray(t)?t.forEach(s):s(t),this}}Rs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),P.reduceDescriptors(Rs.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),P.freezeMethods(Rs);var Ht=Rs;function Fi(e,t){const n=this||Li,r=t||n,o=Ht.from(r.headers);let s=r.data;return P.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Mu(e){return!!(e&&e.__CANCEL__)}function Gr(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}P.inherits(Gr,ge,{__CANCEL__:!0});function Pu(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Dg(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[s];a||(a=l),n[o]=c,r[o]=l;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const v=f&&l-f;return v?Math.round(y*1e3/v):void 0}}function Ng(e,t){let n=0,r=1e3/t,o,s;const a=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),g=f-n;g>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const Ms=(e,t,n=3)=>{let r=0;const o=Dg(50,250);return Ng(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const g={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&f?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},ju=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Bu=e=>(...t)=>P.asap(()=>e(...t));var Rg=ht.hasStandardBrowserEnv?function(){const t=ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const i=P.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Mg=ht.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];P.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),P.isString(r)&&a.push("path="+r),P.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Pg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Vu(e,t){return e&&!Pg(t)?jg(e,t):t}const Gu=e=>e instanceof Ht?{...e}:e;function ir(e,t){t=t||{};const n={};function r(l,f,g){return P.isPlainObject(l)&&P.isPlainObject(f)?P.merge.call({caseless:g},l,f):P.isPlainObject(f)?P.merge({},f):P.isArray(f)?f.slice():f}function o(l,f,g){if(P.isUndefined(f)){if(!P.isUndefined(l))return r(void 0,l,g)}else return r(l,f,g)}function s(l,f){if(!P.isUndefined(f))return r(void 0,f)}function a(l,f){if(P.isUndefined(f)){if(!P.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function i(l,f,g){if(g in t)return r(l,f);if(g in e)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,f)=>o(Gu(l),Gu(f),!0)};return P.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=c[f]||o,y=g(e[f],t[f],f);P.isUndefined(y)&&g!==i||(n[f]=y)}),n}var Hu=e=>{const t=ir({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Ht.from(a),t.url=Fu(Vu(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(P.isFormData(n)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(ht.hasStandardBrowserEnv&&(r&&P.isFunction(r)&&(r=r(t)),r||r!==!1&&Rg(t.url))){const l=o&&s&&Mg.read(s);l&&a.set(o,l)}return t},Bg=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Hu(e);let s=o.data;const a=Ht.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,g,y,v,b;function p(){v&&v(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function m(){if(!h)return;const x=Ht.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:e,request:h};Pu(function(T){n(T),p()},function(T){r(T),p()},E),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(m)},h.onabort=function(){h&&(r(new ge("Request aborted",ge.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let w=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Du;o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),r(new ge(w,E.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&P.forEach(a.toJSON(),function(w,E){h.setRequestHeader(E,w)}),P.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),l&&([y,b]=Ms(l,!0),h.addEventListener("progress",y)),c&&h.upload&&([g,v]=Ms(c),h.upload.addEventListener("progress",g),h.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(f=x=>{h&&(r(!x||x.type?new Gr(null,e,h):x),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const C=kg(o.url);if(C&&ht.protocols.indexOf(C)===-1){r(new ge("Unsupported protocol "+C+":",ge.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Vg=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,i();const f=l instanceof Error?l:this.reason;r.abort(f instanceof ge?f:new Gr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new ge(`timeout ${t} of ms exceeded`,ge.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>P.asap(i),c}};const Gg=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Hg=async function*(e,t){for await(const n of Wg(e))yield*Gg(n,t)},Wg=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Wu=(e,t,n,r)=>{const o=Hg(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){i(),c.close();return}let g=f.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Ps=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Zu=Ps&&typeof ReadableStream=="function",Zg=Ps&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Xu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Xg=Zu&&Xu(()=>{let e=!1;const t=new Request(ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),zu=64*1024,ki=Zu&&Xu(()=>P.isReadableStream(new Response("").body)),js={stream:ki&&(e=>e.body)};Ps&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!js[t]&&(js[t]=P.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ge(`Response type '${t}' is not supported`,ge.ERR_NOT_SUPPORT,r)})})})(new Response);const zg=async e=>{if(e==null)return 0;if(P.isBlob(e))return e.size;if(P.isSpecCompliantForm(e))return(await new Request(ht.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(P.isArrayBufferView(e)||P.isArrayBuffer(e))return e.byteLength;if(P.isURLSearchParams(e)&&(e=e+""),P.isString(e))return(await Zg(e)).byteLength},Yg=async(e,t)=>{const n=P.toFiniteNumber(e.getContentLength());return n??zg(t)};var Jg=Ps&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:g="same-origin",fetchOptions:y}=Hu(e);l=l?(l+"").toLowerCase():"text";let v=Vg([o,s&&s.toAbortSignal()],a),b;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let h;try{if(c&&Xg&&n!=="get"&&n!=="head"&&(h=await Yg(f,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(P.isFormData(r)&&(_=E.headers.get("content-type"))&&f.setContentType(_),E.body){const[T,S]=ju(h,Ms(Bu(c)));r=Wu(E.body,zu,T,S)}}P.isString(g)||(g=g?"include":"omit");const m="credentials"in Request.prototype;b=new Request(t,{...y,signal:v,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:m?g:void 0});let C=await fetch(b);const x=ki&&(l==="stream"||l==="response");if(ki&&(i||x&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=C[L]});const _=P.toFiniteNumber(C.headers.get("content-length")),[T,S]=i&&ju(_,Ms(Bu(i),!0))||[];C=new Response(Wu(C.body,zu,T,()=>{S&&S(),p&&p()}),E)}l=l||"text";let w=await js[P.findKey(js,l)||"text"](C,e);return!x&&p&&p(),await new Promise((E,_)=>{Pu(E,_,{data:w,headers:Ht.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:b})})}catch(m){throw p&&p(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,e,b),{cause:m.cause||m}):ge.from(m,m&&m.code,e,b)}});const Di={http:lg,xhr:Bg,fetch:Jg};P.forEach(Di,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Yu=e=>`- ${e}`,qg=e=>P.isFunction(e)||e===null||e===!1;var Ju={getAdapter:e=>{e=P.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!qg(n)&&(r=Di[(a=String(n)).toLowerCase()],r===void 0))throw new ge(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,c])=>`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
33
33
  `+s.map(Yu).join(`
34
- `):" "+Yu(s[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Di};function Ni(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vr(null,e)}function qu(e){return Ni(e),e.headers=Ht.from(e.headers),e.data=Fi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ju.getAdapter(e.adapter||Li.adapter)(e).then(function(r){return Ni(e),r.data=Fi.call(e,e.transformResponse,r),r.headers=Ht.from(r.headers),r},function(r){return Mu(r)||(Ni(e),r&&r.response&&(r.response.data=Fi.call(e,e.transformResponse,r.response),r.response.headers=Ht.from(r.response.headers))),Promise.reject(r)})}const Qu="1.7.7",Ri={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ri[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const $u={};Ri.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Qu+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new ge(o(a," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!$u[a]&&($u[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};function Qg(e,t,n){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],c=i===void 0||a(i,s,e);if(c!==!0)throw new ge("option "+s+" must be "+c,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+s,ge.ERR_BAD_OPTION)}}var Mi={assertOptions:Qg,validators:Ri};const Dn=Mi.validators;let Bs=class{constructor(t){this.defaults=t,this.interceptors={request:new ku,response:new ku}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=lr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Mi.assertOptions(r,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),o!=null&&(P.isFunction(o)?n.paramsSerializer={serialize:o}:Mi.assertOptions(o,{encode:Dn.function,serialize:Dn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&P.merge(s.common,s[n.method]);s&&P.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=Ht.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let f,g=0,y;if(!c){const b=[qu.bind(this),void 0];for(b.unshift.apply(b,i),b.push.apply(b,l),y=b.length,f=Promise.resolve(n);g<y;)f=f.then(b[g++],b[g++]);return f}y=i.length;let v=n;for(g=0;g<y;){const b=i[g++],p=i[g++];try{v=b(v)}catch(h){p.call(this,h);break}}try{f=qu.call(this,v)}catch(b){return Promise.reject(b)}for(g=0,y=l.length;g<y;)f=f.then(l[g++],l[g++]);return f}getUri(t){t=lr(this.defaults,t);const n=Vu(t.baseURL,t.url);return Fu(n,t.params,t.paramsSerializer)}};P.forEach(["delete","get","head","options"],function(t){Bs.prototype[t]=function(n,r){return this.request(lr(r||{},{method:t,url:n,data:(r||{}).data}))}}),P.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(lr(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Bs.prototype[t]=n(),Bs.prototype[t+"Form"]=n(!0)});var Vs=Bs;class Pi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new Vr(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Pi(function(o){t=o}),cancel:t}}}var $g=Pi;function Ug(e){return function(n){return e.apply(null,n)}}function Kg(e){return P.isObject(e)&&e.isAxiosError===!0}const ji={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ji).forEach(([e,t])=>{ji[t]=e});var em=ji;function Uu(e){const t=new Vs(e),n=gu(Vs.prototype.request,t);return P.extend(n,Vs.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Uu(lr(e,o))},n}const qe=Uu(Li);qe.Axios=Vs,qe.CanceledError=Vr,qe.CancelToken=$g,qe.isCancel=Mu,qe.VERSION=Qu,qe.toFormData=Ds,qe.AxiosError=ge,qe.Cancel=qe.CanceledError,qe.all=function(t){return Promise.all(t)},qe.spread=Ug,qe.isAxiosError=Kg,qe.mergeConfig=lr,qe.AxiosHeaders=Ht,qe.formToJSON=e=>Nu(P.isHTMLForm(e)?new FormData(e):e),qe.getAdapter=Ju.getAdapter,qe.HttpStatusCode=em,qe.default=qe;var Ku=qe,Te={},Nn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PLATFORM=e.TENANT_PLATFORM=e.API_CALL_ORIGIN=e.TIERS=e.APP_UI=e.CONFIG_HIVER=e.DEFAULT_INIT_CONFIG_HIVER=e.TWO_MINUTES_IN_MS=e.REFETCH_CHECK_DELAY=e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=e.INITIAL_RETRY_DELAY=e.MAX_BACKOFF_LIMIT=e.MAX_CONFLICT_RETRY_DELAY=e.MAX_RETRY_DELAY=e.GET_METHOD=void 0,e.GET_METHOD="GET",e.MAX_RETRY_DELAY=18e4,e.MAX_CONFLICT_RETRY_DELAY=63e3,e.MAX_BACKOFF_LIMIT=8e3,e.INITIAL_RETRY_DELAY=1e3,e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=3e3,e.REFETCH_CHECK_DELAY=168e4,e.TWO_MINUTES_IN_MS=2*60*1e3,e.DEFAULT_INIT_CONFIG_HIVER={getToken:!0,isHiverApiDomain:!0,fetchCsrfToken:function(){return""}},e.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},e.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},e.TIERS={DEV:"dev",SIT:"sit",QA:"qa",PRODUCTION:"production",PROD:"prod"},e.API_CALL_ORIGIN={API_RETRY:"Api Retry"},e.TENANT_PLATFORM={GMAIL:"GMAIL",HIVERWEB:"HIVERWEB"},function(t){t[t.WEB=0]="WEB",t[t.MOBILE=1]="MOBILE"}(e.PLATFORM||(e.PLATFORM={}))})(Nn);var ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.getProdHqConfig=ht.getProdApiConfig=ht.getSitHqConfig=ht.getSitApiConfig=ht.getDevHqConfig=ht.getDevApiConfig=void 0;var Gr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},tm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Gr}};ht.getDevApiConfig=tm;var nm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Gr}};ht.getDevHqConfig=nm;var rm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:Gr}};ht.getSitApiConfig=rm;var om=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:Gr}};ht.getSitHqConfig=om;var sm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Gr}};ht.getProdApiConfig=sm;var am=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Gr}};ht.getProdHqConfig=am;var tn={},nn={};Object.defineProperty(nn,"__esModule",{value:!0}),nn.removeValue=nn.getValue=nn.setValue=void 0;var Bi={};function im(e,t){Bi[e]=t}nn.setValue=im;function cm(e){return Bi[e]}nn.getValue=cm;function lm(e){delete Bi[e]}nn.removeValue=lm,Object.defineProperty(tn,"__esModule",{value:!0}),tn.removeItemFromStorage=tn.setItemInStorage=tn.getItemFromStorage=void 0;var Hr=Nn,Wr=nn,um=function(e,t){switch(t===void 0&&(t=(0,Wr.getValue)("PLATFORM")),t){case Hr.PLATFORM.WEB:return sessionStorage.getItem(e);case Hr.PLATFORM.MOBILE:return(0,Wr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};tn.getItemFromStorage=um;var dm=function(e,t,n){switch(n===void 0&&(n=(0,Wr.getValue)("PLATFORM")),n){case Hr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Hr.PLATFORM.MOBILE:return(0,Wr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};tn.setItemInStorage=dm;var fm=function(e,t){switch(t===void 0&&(t=(0,Wr.getValue)("PLATFORM")),t){case Hr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Hr.PLATFORM.MOBILE:(0,Wr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};tn.removeItemFromStorage=fm;var pm=he&&he.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},hm=he&&he.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Te,"__esModule",{value:!0}),Te.expireToken=Te.invalidateToken=Te.validateToken=Te.validateAccount=Te.getConfig=Te.introduceDelay=Te.isTokenInExpiryWindow=Te.getStoredAuthData=Te.setUserDetails=Te.getRefreshInterval=Te.setTokenAndExpiry=Te.getRandomDelay=Te.hasValidToken=void 0;var bn=Nn,Zr=ht,St=tn,Vi=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Gi=function(e){var t=parseInt((0,St.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,St.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Te.validateAccount=Gi;var gm=function(e){var t=Gi(e);return!ed()&&t};Te.validateToken=gm;var mm=function(e){return e.apiRetry?e.apiRetry>0:!1};Te.invalidateToken=mm;var bm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Te.expireToken=bm;var ym=function(e){var t=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Vi(),o=Gi(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Te.hasValidToken=ym;var Cm=function(){return Math.floor(Math.random()*6e4)+6e4};Te.getRandomDelay=Cm;var xm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,St.setItemInStorage)("hiverAuthUserId",e),(0,St.setItemInStorage)("hiverAuthUserGroupId",t)};Te.setUserDetails=xm;var vm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,St.setItemInStorage)("hiverAuthToken",e),(0,St.setItemInStorage)("hiverAuthTokenExpiry",t)};Te.setTokenAndExpiry=vm;var Em=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,St.getItemFromStorage)("hiverAuthToken"),n=(0,St.getItemFromStorage)("hiverAuthUserId"),r=(0,St.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Te.getStoredAuthData=Em;var ed=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Vi(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Te.isTokenInExpiryWindow=ed;var wm=function(e){return pm(void 0,void 0,void 0,function(){return hm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Te.introduceDelay=wm;var Im=function(e,t,n){switch(n===void 0&&(n=!0),t){case bn.TIERS.SIT:case bn.TIERS.QA:return n?(0,Zr.getSitApiConfig)(e):(0,Zr.getSitHqConfig)(e);case bn.TIERS.PRODUCTION:case bn.TIERS.PROD:return n?(0,Zr.getProdApiConfig)():(0,Zr.getProdHqConfig)();case bn.TIERS.DEV:default:return n?(0,Zr.getDevApiConfig)():(0,Zr.getDevHqConfig)()}};Te.getConfig=Im;var _m=function(){try{var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return bn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Vi();return t.getTime()-n.getTime()>bn.TWO_MINUTES_IN_MS?t.getTime()-bn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),bn.REFETCH_CHECK_DELAY}};Te.getRefreshInterval=_m;var jo={},Wt={},td;function nd(){if(td)return Wt;td=1;var e=he&&he.__awaiter||function(b,p,h,m){function C(x){return x instanceof h?x:new h(function(w){w(x)})}return new(h||(h=Promise))(function(x,w){function E(S){try{A(m.next(S))}catch(L){w(L)}}function _(S){try{A(m.throw(S))}catch(L){w(L)}}function A(S){S.done?x(S.value):C(S.value).then(E,_)}A((m=m.apply(b,p||[])).next())})},t=he&&he.__generator||function(b,p){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},m,C,x,w;return w={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function E(A){return function(S){return _([A,S])}}function _(A){if(m)throw new TypeError("Generator is already executing.");for(;w&&(w=0,A[0]&&(h=0)),h;)try{if(m=1,C&&(x=A[0]&2?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[A[0]&2,x.value]),A[0]){case 0:case 1:x=A;break;case 4:return h.label++,{value:A[1],done:!1};case 5:h.label++,C=A[1],A=[0];continue;case 7:A=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(A[0]===6||A[0]===2)){h=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){h.label=A[1];break}if(A[0]===6&&h.label<x[1]){h.label=x[1],x=A;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(A);break}x[2]&&h.ops.pop(),h.trys.pop();continue}A=p.call(b,h)}catch(S){A=[6,S],C=0}finally{m=x=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.logoutFromHeimdall=Wt.getTenantLoginCode=Wt.getLoginToken=Wt.getAccessToken=void 0;var n=Nn,r=id(),o=Te,s=function(b,p,h,m){var C=(0,o.getStoredAuthData)(),x=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":x},data:{user_id:p.userId,usergroup_id:p.usergroupId,access_token:(C==null?void 0:C.token)||"",source:m}}},a=function(b,p,h,m,C){var x=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:p.heimdallUrl,url:p.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},headers:{"x-hiver-tenant":x,"x-hiver-userid":m,"x-hiver-usergroupid":C}}},i=function(b,p){var h=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":h}}},c=function(b){return parseInt(b,10)},l=function(b,p,h,m){return{root_url:h===n.TENANT_PLATFORM.HIVERWEB?b.hotUrl:b.v2Url,url:h===n.TENANT_PLATFORM.HIVERWEB?b.apiEndpoints.hotLogin:b.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(p.userId),app:m||n.APP_UI.DEFAULT}}},f=function(b,p,h,m,C){return e(void 0,void 0,void 0,function(){var x,w,E,_,A,S,L;return t(this,function(k){switch(k.label){case 0:console.log("GETTOKEN tenantPlatform -> ",m),k.label=1;case 1:return k.trys.push([1,5,,6]),!(0,o.validateToken)(h)||(0,o.invalidateToken)(h)?(console.log("HEIMDALL: No valid token, fetching token"),x=s(p,h,m,C),[4,(0,r.performAxiosCall)(x)]):[3,3];case 2:return w=k.sent(),[2,{atToken:(_=w==null?void 0:w.data.at)===null||_===void 0?void 0:_.token,expiryTime:(A=w==null?void 0:w.data.at)===null||A===void 0?void 0:A.expires_at,userId:(S=w==null?void 0:w.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=w==null?void 0:w.data)===null||L===void 0?void 0:L.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw E=k.sent(),E;case 6:return[2]}})})};Wt.getAccessToken=f;var g=function(b,p,h,m,C,x){return e(void 0,void 0,void 0,function(){var w,E,_,A,S,L,k;return t(this,function(R){switch(R.label){case 0:w=a(b,h,m,C,x),R.label=1;case 1:return R.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(w)];case 2:return E=R.sent(),[2,{userId:(A=E==null?void 0:E.data)===null||A===void 0?void 0:A.user_id,userGroupId:(S=E==null?void 0:E.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=E==null?void 0:E.data.at)===null||L===void 0?void 0:L.token,expiryTime:(k=E==null?void 0:E.data.at)===null||k===void 0?void 0:k.expires_at}];case 3:throw _=R.sent(),_;case 4:return[2]}})})};Wt.getLoginToken=g;var y=function(b,p,h,m,C){return e(void 0,void 0,void 0,function(){var x,w,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",C),x=l(p,h,m,C),[4,(0,r.performAxiosCall)(x)];case 1:return w=_.sent(),[2,w==null?void 0:w.data.code];case 2:throw E=_.sent(),E;case 3:return[2]}})})};Wt.getTenantLoginCode=y;var v=function(b,p,h){return h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var m,C,x;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,5]),m=i(b,p),[4,(0,r.performAxiosCall)(m)];case 1:return C=w.sent(),[2,C==null?void 0:C.status];case 2:return x=w.sent(),h<2?[4,v(b,p,h+1)]:[3,4];case 3:w.sent(),w.label=4;case 4:throw x;case 5:return[2]}})})};return Wt.logoutFromHeimdall=v,Wt}var Gs={},Sm=he&&he.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Am=he&&he.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.subscribeToOnlineEvent=void 0;var rd=Nn,Tm=nn,Lm=function(e,t){switch(t===void 0&&(t=(0,Tm.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case rd.PLATFORM.WEB:return window.addEventListener("online",function(){return Sm(void 0,void 0,void 0,function(){return Am(this,function(n){switch(n.label){case 0:return console.log("Online status detected. Fetching token..."),[4,e()];case 1:return n.sent(),[2]}})})});case rd.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};Gs.subscribeToOnlineEvent=Lm;var od;function sd(){if(od)return jo;od=1;var e=he&&he.__awaiter||function(b,p,h,m){function C(x){return x instanceof h?x:new h(function(w){w(x)})}return new(h||(h=Promise))(function(x,w){function E(S){try{A(m.next(S))}catch(L){w(L)}}function _(S){try{A(m.throw(S))}catch(L){w(L)}}function A(S){S.done?x(S.value):C(S.value).then(E,_)}A((m=m.apply(b,p||[])).next())})},t=he&&he.__generator||function(b,p){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},m,C,x,w;return w={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function E(A){return function(S){return _([A,S])}}function _(A){if(m)throw new TypeError("Generator is already executing.");for(;w&&(w=0,A[0]&&(h=0)),h;)try{if(m=1,C&&(x=A[0]&2?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[A[0]&2,x.value]),A[0]){case 0:case 1:x=A;break;case 4:return h.label++,{value:A[1],done:!1};case 5:h.label++,C=A[1],A=[0];continue;case 7:A=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(A[0]===6||A[0]===2)){h=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){h.label=A[1];break}if(A[0]===6&&h.label<x[1]){h.label=x[1],x=A;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(A);break}x[2]&&h.ops.pop(),h.trys.pop();continue}A=p.call(b,h)}catch(S){A=[6,S],C=0}finally{m=x=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(jo,"__esModule",{value:!0}),jo.fetchAccessToken=void 0;var n=nd(),r=Nn,o=Te,s=Gs,a,i,c,l=function(b,p,h,m,C,x){return x===void 0&&(x=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var w,E,_,A,S,L,k,R,N;return t(this,function(M){switch(M.label){case 0:w=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",x,m),E=void 0,C?[4,C()]:[3,3];case 2:return E=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,p,m,x)];case 4:E=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,b,m,p.userId,p.usergroupId)];case 6:return _=M.sent(),A=_.userId,S=_.userGroupId,L=_.atToken,k=_.expiryTime,(0,o.setTokenAndExpiry)(L,k),(0,o.setUserDetails)(A,S),[3,12];case 7:R=M.sent(),console.log("ERROR debug: in error login:",R,x),N=h,M.label=8;case 8:return N<w?[4,l(b,p,N+1,m,C,x)]:[3,11];case 9:M.sent(),M.label=10;case 10:return N++,[3,8];case 11:throw R;case 12:return[2]}})})},f=function(b,p,h,m,C){return e(void 0,void 0,void 0,function(){var x,w,E,_;return t(this,function(A){switch(A.label){case 0:return p<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,b)})]:[3,3];case 1:return A.sent(),p+=b,b*2<=r.MAX_BACKOFF_LIMIT?b*=2:b=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",b),x=h.retryDelay,w=h.configs,E=h.apiParams,_=h.appUI,[4,g(x,b,p,w,E,m,C,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},g=function(b,p,h,m,C,x,w,E,_){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var A,S,L,k,R,N,M,V,Z,J,$,X,z,se;return t(this,function(de){switch(de.label){case 0:return de.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,m,C,x,E)];case 1:return A=de.sent(),S=A.atToken,L=A.expiryTime,k=A.userId,R=A.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),k&&R&&(0,o.setUserDetails)(k,R),b=r.INITIAL_RETRY_DELAY,p=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return N=de.sent(),console.log("ERROR: Heimdall fetch token",N),((Z=N.response)===null||Z===void 0?void 0:Z.status)===401||((J=N.request)===null||J===void 0?void 0:J.status)===401?(M=1,[4,l(m,C,M,x,w,_)]):[3,4];case 3:return de.sent(),[3,11];case 4:return(($=N.response)===null||$===void 0?void 0:$.status)===409||((X=N.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),V={retryDelay:b,configs:m,apiParams:C,appUI:_},[4,f(p,h,V,x,w)]):[3,6];case 5:if(de.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw N;return[3,11];case 6:if(!(((z=N.response)===null||z===void 0?void 0:z.status)===422||((se=N.request)===null||se===void 0?void 0:se.status)===422))return[3,7];throw console.log("ERROR: Throwing error",N.response.status),N;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(D){return setTimeout(D,b)})]:[3,10];case 8:return de.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,g(b,p,h,m,C,x,w,_)];case 9:return de.sent(),[3,11];case 10:throw N;case 11:return[3,12];case 12:return[2]}})})},y=function(b,p,h,m,C,x,w,E){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var _,A,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),_=(0,o.isTokenInExpiryWindow)(),_?(A=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(A)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,g(h,m,C,b,p,x,w,E)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},v=function(b,p,h,m,C,x,w){return e(void 0,void 0,void 0,function(){var E,_,A,S,L,k;return t(this,function(R){switch(R.label){case 0:a=b,i=p,E=r.INITIAL_RETRY_DELAY,_=r.INITIAL_RETRY_DELAY,A=0,S=(0,o.getConfig)(a,i),console.log("Instance: Fetch Call"),R.label=1;case 1:return R.trys.push([1,3,,4]),[4,g(E,_,A,S,h,m,C,x,w)];case 2:return R.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return y(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,C,w)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(N){switch(N.label){case 0:return[4,y(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,C,w)];case 1:return N.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return k=R.sent(),console.log("ERROR: Fetching token failed",k),[3,4];case 4:return[2]}})})};return jo.fetchAccessToken=v,jo}var ad;function id(){if(ad)return ir;ad=1;var e=he&&he.__assign||function(){return e=Object.assign||function(p){for(var h,m=1,C=arguments.length;m<C;m++){h=arguments[m];for(var x in h)Object.prototype.hasOwnProperty.call(h,x)&&(p[x]=h[x])}return p},e.apply(this,arguments)},t=he&&he.__awaiter||function(p,h,m,C){function x(w){return w instanceof m?w:new m(function(E){E(w)})}return new(m||(m=Promise))(function(w,E){function _(L){try{S(C.next(L))}catch(k){E(k)}}function A(L){try{S(C.throw(L))}catch(k){E(k)}}function S(L){L.done?w(L.value):x(L.value).then(_,A)}S((C=C.apply(p,h||[])).next())})},n=he&&he.__generator||function(p,h){var m={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},C,x,w,E;return E={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function _(S){return function(L){return A([S,L])}}function A(S){if(C)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(m=0)),m;)try{if(C=1,x&&(w=S[0]&2?x.return:S[0]?x.throw||((w=x.return)&&w.call(x),0):x.next)&&!(w=w.call(x,S[1])).done)return w;switch(x=0,w&&(S=[S[0]&2,w.value]),S[0]){case 0:case 1:w=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,x=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(w=m.trys,!(w=w.length>0&&w[w.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!w||S[1]>w[0]&&S[1]<w[3])){m.label=S[1];break}if(S[0]===6&&m.label<w[1]){m.label=w[1],w=S;break}if(w&&m.label<w[2]){m.label=w[2],m.ops.push(S);break}w[2]&&m.ops.pop(),m.trys.pop();continue}S=h.call(p,m)}catch(L){S=[6,L],x=0}finally{C=w=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(ir,"__esModule",{value:!0}),ir.hiverAxiosCall=ir.performAxiosCall=void 0;var r=Ku,o=Te,s=sd(),a=tn,i=Nn,c,l=2,f=function(p,h){var m=h.fetchCsrfToken();p.formData?p.formData.append("_csrf_token",m):(p.data=p.data||{},p.data._csrf_token=m)},g=function(p,h){var m={};!p.method||p.method.toLowerCase()==="get"?m={params:p.params?p.params:p.data}:m=p.params?{params:p,data:p.data}:{data:p.data};var C=e(e({method:p.method,url:"".concat(p.root_url).concat(p.url),headers:p.headers},m),{withCredentials:h,responseType:(p==null?void 0:p.responseType)||""});return C};function y(p,h){return h===void 0&&(h=!0),t(this,void 0,void 0,function(){var m;return n(this,function(C){return m=g(p,h),[2,(0,r.default)(m).then(function(x){return x}).catch(function(x){throw x})]})})}ir.performAxiosCall=y;function v(p,h,m){return t(this,void 0,void 0,function(){var C,x,w;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),p.authTokenFetchingInProgress?[3,2]:(p.authTokenFetchingInProgress=!0,C=p.appEnv,x=p.tier,[4,(0,s.fetchAccessToken)(C,x,h,p.tenantPlatform,p.getTokenForLogin,m)]);case 1:return E.sent(),p.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(_){return setTimeout(_,100)})];case 3:return E.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,v(p,h,m)];case 4:E.sent(),E.label=5;case 5:return[3,8];case 6:return w=E.sent(),console.log("Error while fetching Auth Token :",w),p.authTokenFetchingInProgress=!1,[4,v(p,h,m)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function b(p,h,m,C,x){var w,E;return x===void 0&&(x=0),t(this,void 0,void 0,function(){var _,A,S,L,k,R,N;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(m.getToken&&!(0,o.hasValidToken)(h)))return[3,2];if(_=p.appEnv,A=p.tier,!_||!A)throw Error("appEnv or tier missing : ".concat(_,"/").concat(A));return"userId"in h&&"usergroupId"in h?(S={userId:h.userId,usergroupId:h.usergroupId},[4,v(p,S,C)]):[3,2];case 1:M.sent(),M.label=2;case 2:return p.csrfToken&&f(h,m),L=p.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,h.headers=e(e({},h.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),m.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",h.headers=e(e({},h.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",h),[4,y(h,p.withCredentials)];case 3:return k=M.sent(),h.onSuccess&&h.onSuccess(k),[2,k];case 4:if(R=M.sent(),N=((w=R.response)===null||w===void 0?void 0:w.status)===403||((E=R.request)===null||E===void 0?void 0:E.status)===403,x<l&&N)return(0,o.expireToken)(),[2,b(p,h,m,C,x+1)];if(x>=l&&N||!N)throw h.onFail&&h.onFail(R),console.log("ERROR: Reached make Axios",R),R;return[3,5];case 5:return[2]}})})}return ir.hiverAxiosCall=b,ir}var Bo={},He={},Xe={};Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.TIERS=Xe.APP_UI=Xe.CONFIG_HIVER=Xe.REFETCH_CHECK_DELAY=Xe.INITIAL_RETRY_DELAY=Xe.MAX_BACKOFF_LIMIT=Xe.MAX_CONFLICT_RETRY_DELAY=Xe.MAX_RETRY_DELAY=Xe.GET_METHOD=void 0,Xe.GET_METHOD="GET",Xe.MAX_RETRY_DELAY=18e4,Xe.MAX_CONFLICT_RETRY_DELAY=63e3,Xe.MAX_BACKOFF_LIMIT=8e3,Xe.INITIAL_RETRY_DELAY=1e3,Xe.REFETCH_CHECK_DELAY=168e4,Xe.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Xe.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Xe.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.getProdHqConfig=gt.getProdApiConfig=gt.getSitHqConfig=gt.getSitApiConfig=gt.getDevHqConfig=gt.getDevApiConfig=void 0;var Xr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},Om=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:Xr}};gt.getDevApiConfig=Om;var Fm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:Xr}};gt.getDevHqConfig=Fm;var km=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:Xr}};gt.getSitApiConfig=km;var Dm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:Xr}};gt.getSitHqConfig=Dm;var Nm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:Xr}};gt.getProdApiConfig=Nm;var Rm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:Xr}};gt.getProdHqConfig=Rm;var Mm=he&&he.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Pm=he&&he.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(He,"__esModule",{value:!0}),He.expireToken=He.validateToken=He.validateAccount=He.getConfig=He.introduceDelay=He.isTokenInExpiryWindow=He.getStoredAuthData=He.setUserDetails=He.setTokenAndExpiry=He.getRandomDelay=He.hasValidToken=void 0;var Hi=Xe,ur=gt,cd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Wi=function(e){var t=parseInt(sessionStorage.getItem("hiverAuthUserId")||"0"),n=parseInt(sessionStorage.getItem("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};He.validateAccount=Wi;var jm=function(e){var t=Wi(e);return!ld()&&t};He.validateToken=jm;var Bm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};He.expireToken=Bm;var Vm=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=cd(),o=Wi(e);return r<n&&o};He.hasValidToken=Vm;var Gm=function(){return Math.floor(Math.random()*6e4)+6e4};He.getRandomDelay=Gm;var Hm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");sessionStorage.setItem("hiverAuthUserId",e),sessionStorage.setItem("hiverAuthUserGroupId",t)};He.setUserDetails=Hm;var Wm=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};He.setTokenAndExpiry=Wm;var Zm=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry"),t=sessionStorage.getItem("hiverAuthToken"),n=sessionStorage.getItem("hiverAuthUserId"),r=sessionStorage.getItem("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};He.getStoredAuthData=Zm;var ld=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=cd(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};He.isTokenInExpiryWindow=ld;var Xm=function(e){return Mm(void 0,void 0,void 0,function(){return Pm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};He.introduceDelay=Xm;var zm=function(e,t,n){switch(t){case Hi.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,ur.getSitHqConfig)(e)),n?(0,ur.getSitApiConfig)(e):(0,ur.getSitHqConfig)(e);case Hi.TIERS.PROD:return n?(0,ur.getProdApiConfig)():(0,ur.getProdHqConfig)();case Hi.TIERS.DEV:default:return n?(0,ur.getDevApiConfig)():(0,ur.getDevHqConfig)()}};He.getConfig=zm;var Vo={},yn={},ud;function Ym(){if(ud)return yn;ud=1;var e=he&&he.__awaiter||function(y,v,b,p){function h(m){return m instanceof b?m:new b(function(C){C(m)})}return new(b||(b=Promise))(function(m,C){function x(_){try{E(p.next(_))}catch(A){C(A)}}function w(_){try{E(p.throw(_))}catch(A){C(A)}}function E(_){_.done?m(_.value):h(_.value).then(x,w)}E((p=p.apply(y,v||[])).next())})},t=he&&he.__generator||function(y,v){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(E){return function(_){return w([E,_])}}function w(E){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(b=0)),b;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,h=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){b.label=E[1];break}if(E[0]===6&&b.label<m[1]){b.label=m[1],m=E;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(E);break}m[2]&&b.ops.pop(),b.trys.pop();continue}E=v.call(y,b)}catch(_){E=[6,_],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(yn,"__esModule",{value:!0}),yn.getV2LoginCode=yn.getLoginToken=yn.getAccessToken=void 0;var n=Xe,r=hd(),o=He,s=function(y,v,b){var p=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:v.userId,usergroup_id:v.usergroupId,access_token:(p==null?void 0:p.token)||"",source:b},withCredentials:!0}},a=function(y,v){return{root_url:v.heimdallUrl,url:v.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,v){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:v||n.APP_UI.DEFAULT}}},l=function(y,v,b,p){return e(void 0,void 0,void 0,function(){var h,m,C,x,w,E,_;return t(this,function(A){switch(A.label){case 0:return A.trys.push([0,4,,5]),(0,o.validateToken)(b)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),h=s(v,b,p),[4,(0,r.makeAxiosCall)(h,y)]);case 1:return m=A.sent(),[2,{atToken:(x=m==null?void 0:m.data.at)===null||x===void 0?void 0:x.token,expiryTime:(w=m==null?void 0:m.data.at)===null||w===void 0?void 0:w.expires_at,userId:(E=m==null?void 0:m.data)===null||E===void 0?void 0:E.user_id,userGroupId:(_=m==null?void 0:m.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw C=A.sent(),C;case 5:return[2]}})})};yn.getAccessToken=l;var f=function(y,v,b){return e(void 0,void 0,void 0,function(){var p,h,m,C,x,w,E;return t(this,function(_){switch(_.label){case 0:p=a(y,b),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(p,v)];case 2:return h=_.sent(),[2,{userId:(C=h==null?void 0:h.data)===null||C===void 0?void 0:C.user_id,userGroupId:(x=h==null?void 0:h.data)===null||x===void 0?void 0:x.usergroup_id,atToken:(w=h==null?void 0:h.data.at)===null||w===void 0?void 0:w.token,expiryTime:(E=h==null?void 0:h.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw m=_.sent(),m;case 4:return[2]}})})};yn.getLoginToken=f;var g=function(y,v,b){return e(void 0,void 0,void 0,function(){var p,h,m;return t(this,function(C){switch(C.label){case 0:return C.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),p=c(v,b),[4,(0,r.makeAxiosCall)(p,y)];case 1:return h=C.sent(),console.log("DEBUG HEIMDALL: local storage:",h==null?void 0:h.data),[2,h==null?void 0:h.data.code];case 2:throw m=C.sent(),m;case 3:return[2]}})})};return yn.getV2LoginCode=g,yn}var dd;function fd(){if(dd)return Vo;dd=1;var e=he&&he.__awaiter||function(v,b,p,h){function m(C){return C instanceof p?C:new p(function(x){x(C)})}return new(p||(p=Promise))(function(C,x){function w(A){try{_(h.next(A))}catch(S){x(S)}}function E(A){try{_(h.throw(A))}catch(S){x(S)}}function _(A){A.done?C(A.value):m(A.value).then(w,E)}_((h=h.apply(v,b||[])).next())})},t=he&&he.__generator||function(v,b){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},h,m,C,x;return x={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function w(_){return function(A){return E([_,A])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(p=0)),p;)try{if(h=1,m&&(C=_[0]&2?m.return:_[0]?m.throw||((C=m.return)&&C.call(m),0):m.next)&&!(C=C.call(m,_[1])).done)return C;switch(m=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,m=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){p.label=_[1];break}if(_[0]===6&&p.label<C[1]){p.label=C[1],C=_;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(_);break}C[2]&&p.ops.pop(),p.trys.pop();continue}_=b.call(v,p)}catch(A){_=[6,A],m=0}finally{h=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.fetchToken=void 0;var n=Ym(),r=Xe,o=He,s,a,i,c=function(v,b,p){return p===void 0&&(p=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var h,m,C,x,w,E,_,A,S;return t(this,function(L){switch(L.label){case 0:h=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",p),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,v,p)];case 2:return m=L.sent(),[4,(0,n.getLoginToken)(m,r.CONFIG_HIVER,v)];case 3:return C=L.sent(),x=C.userId,w=C.userGroupId,E=C.atToken,_=C.expiryTime,(0,o.setTokenAndExpiry)(E,_),(0,o.setUserDetails)(x,w),[3,9];case 4:A=L.sent(),console.log("ERROR debug: in error login:",A,p),S=b,L.label=5;case 5:return S<h?[4,c(v,S+1,p)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},l=function(v,b,p){return e(void 0,void 0,void 0,function(){var h,m,C,x;return t(this,function(w){switch(w.label){case 0:return b<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,v)})]:[3,3];case 1:return w.sent(),b+=v,v*2<=r.MAX_BACKOFF_LIMIT?v*=2:v=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",v),h=p.retryDelay,m=p.configs,C=p.api_params,x=p.appUI,[4,f(h,v,b,m,C,x)];case 2:w.sent(),w.label=3;case 3:return[2]}})})},f=function(v,b,p,h,m,C,x){return C===void 0&&(C="default"),e(void 0,void 0,void 0,function(){var w,E,_,A,S,L,k,R,N,M,V,Z,J,$;return t(this,function(X){switch(X.label){case 0:return X.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,m,C)];case 1:return w=X.sent(),E=w.atToken,_=w.expiryTime,A=w.userId,S=w.userGroupId,E&&_&&(0,o.setTokenAndExpiry)(E,_),A&&S&&(0,o.setUserDetails)(A,S),v=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return L=X.sent(),console.log("ERROR: Heimdall fetch token",L),((N=L.response)===null||N===void 0?void 0:N.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(k=1,[4,c(h,k,x)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((V=L.response)===null||V===void 0?void 0:V.status)===409||((Z=L.request)===null||Z===void 0?void 0:Z.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),R={retryDelay:v,configs:h,api_params:m,appUI:x},[4,l(b,p,R)]):[3,6];case 5:if(X.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((J=L.response)===null||J===void 0?void 0:J.status)===422||(($=L.request)===null||$===void 0?void 0:$.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return v<=r.MAX_RETRY_DELAY?[4,new Promise(function(z){return setTimeout(z,v)})]:[3,10];case 8:return X.sent(),v*=2,console.log("Heimdall: Fetch token post doubling retry delay",v),[4,f(v,b,p,h,m,x)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(v,b,p,h,m,C){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=0),e(void 0,void 0,void 0,function(){var x,w,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),x=(0,o.isTokenInExpiryWindow)(),x?(w=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(w)]):[3,3];case 1:return _.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,f(p,h,m,v,b,C)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw E=_.sent(),E;case 5:return[2]}})})},y=function(v,b,p,h,m,C){return e(void 0,void 0,void 0,function(){var x,w,E,_,A;return t(this,function(S){switch(S.label){case 0:s=v,a=b,x=r.INITIAL_RETRY_DELAY,w=r.INITIAL_RETRY_DELAY,E=0,_=(0,o.getConfig)(s,a,h),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(x,w,E,_,p,m,C)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return g(_,p)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",i),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(L){switch(L.label){case 0:return console.log("Online status detected. Fetching token..."),[4,g(_,p)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return Vo.fetchToken=y,Vo}var pd;function hd(){if(pd)return Bo;pd=1;var e=he&&he.__assign||function(){return e=Object.assign||function(y){for(var v,b=1,p=arguments.length;b<p;b++){v=arguments[b];for(var h in v)Object.prototype.hasOwnProperty.call(v,h)&&(y[h]=v[h])}return y},e.apply(this,arguments)},t=he&&he.__awaiter||function(y,v,b,p){function h(m){return m instanceof b?m:new b(function(C){C(m)})}return new(b||(b=Promise))(function(m,C){function x(_){try{E(p.next(_))}catch(A){C(A)}}function w(_){try{E(p.throw(_))}catch(A){C(A)}}function E(_){_.done?m(_.value):h(_.value).then(x,w)}E((p=p.apply(y,v||[])).next())})},n=he&&he.__generator||function(y,v){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(E){return function(_){return w([E,_])}}function w(E){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(b=0)),b;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,h=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){b.label=E[1];break}if(E[0]===6&&b.label<m[1]){b.label=m[1],m=E;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(E);break}m[2]&&b.ops.pop(),b.trys.pop();continue}E=v.call(y,b)}catch(_){E=[6,_],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.makeAxiosCall=void 0;var r=Ku,o=He,s=fd(),a,i=2,c=function(y,v){var b=v.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",b):(y.data=y.data||{},y.data._csrf_token=b)},l=function(y){var v=!y.method||y.method.toLowerCase()==="get"?{params:y.data}:{data:y.data},b=e(e({method:y.method,url:"".concat(y.root_url).concat(y.url),headers:y.headers},v),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return b};function f(y){return t(this,void 0,void 0,function(){var v;return n(this,function(b){return v=l(y),[2,(0,r.default)(v).then(function(p){return p}).catch(function(p){throw p})]})})}function g(y,v,b,p){var h,m;return p===void 0&&(p=0),t(this,void 0,void 0,function(){var C,x,w,E,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(v.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(C=y.app_env,x=y.tier,!C||!x)throw Error("app_env or tier missing : ".concat(C,"/").concat(x));return"userId"in y&&"usergroupId"in y?(w={userId:y.userId,usergroupId:y.usergroupId},typeof v.isHiverApiDomain!="boolean"&&(v.isHiverApiDomain=!0),[4,(0,s.fetchToken)(C,x,w,v.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,v),v.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",y.headers=e(e({},y.headers),{Authorization:"Bearer ".concat(a)})),[4,f(y)];case 3:return E=S.sent(),y.onSuccess&&y.onSuccess(E),[2,E];case 4:if(_=S.sent(),A=((h=_.response)===null||h===void 0?void 0:h.status)===403||((m=_.request)===null||m===void 0?void 0:m.status)===403,p<i&&A)return(0,o.expireToken)(),[2,g(y,v,b,p+1)];if(p>=i&&A||!A)throw y.onFail&&y.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Bo.makeAxiosCall=g,Bo}(function(e){var t=he&&he.__awaiter||function(v,b,p,h){function m(C){return C instanceof p?C:new p(function(x){x(C)})}return new(p||(p=Promise))(function(C,x){function w(A){try{_(h.next(A))}catch(S){x(S)}}function E(A){try{_(h.throw(A))}catch(S){x(S)}}function _(A){A.done?C(A.value):m(A.value).then(w,E)}_((h=h.apply(v,b||[])).next())})},n=he&&he.__generator||function(v,b){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},h,m,C,x;return x={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function w(_){return function(A){return E([_,A])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(p=0)),p;)try{if(h=1,m&&(C=_[0]&2?m.return:_[0]?m.throw||((C=m.return)&&C.call(m),0):m.next)&&!(C=C.call(m,_[1])).done)return C;switch(m=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,m=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){p.label=_[1];break}if(_[0]===6&&p.label<C[1]){p.label=C[1],C=_;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(_);break}C[2]&&p.ops.pop(),p.trys.pop();continue}_=b.call(v,p)}catch(A){_=[6,A],m=0}finally{h=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=id(),o=sd(),s=Nn;Object.defineProperty(e,"TENANT_PLATFORM",{enumerable:!0,get:function(){return s.TENANT_PLATFORM}}),Object.defineProperty(e,"DEFAULT_INIT_CONFIG_HIVER",{enumerable:!0,get:function(){return s.DEFAULT_INIT_CONFIG_HIVER}});var a=nd(),i=Te,c=tn,l=hd();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=fd();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var g=nn,y=function(){function v(b,p,h,m,C,x){h===void 0&&(h=s.TENANT_PLATFORM.GMAIL),m===void 0&&(m=null),C===void 0&&(C=!0),x===void 0&&(x=!1),this.setEnvironment(),this.appEnv=b,this.tier=p,this.tenantPlatform=h,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=m,this.withCredentials=C,this.csrfToken=x}return v.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},v.prototype.hiverAxios=function(b,p,h,m){return p===void 0&&(p=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var C,x;return n(this,function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),m&&m<2?(C={userId:b.userId,usergroupId:b.usergroupId,apiRetry:m},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,C,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:w.sent(),w.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,b,p,h)];case 3:return[2,w.sent()];case 4:throw x=w.sent(),console.log("ERROR: Axios call failed",x),x;case 5:return[2]}})})},v.prototype.fetchAuthToken=function(b,p,h){return t(this,void 0,void 0,function(){var m;return n(this,function(C){switch(C.label){case 0:return C.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,b,this.tenantPlatform,this.getTokenForLogin,p,h)]);case 1:return C.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),C.label=3;case 3:return[3,8];case 4:return m=C.sent(),console.log("ERROR: Fetching token failed",m),this.authTokenFetchingInProgress=!1,[4,new Promise(function(x){return setTimeout(x,100)})];case 5:return C.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,p,h)];case 6:return C.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},v.prototype.logout=function(){return t(this,void 0,void 0,function(){var b,p;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),b=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(b,this.tenantPlatform)];case 1:return h.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw p=h.sent(),console.error("Heimdall: Logout failed",p),p;case 3:return[2]}})})},v.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},v}();e.Bifrost=y})(xi);const Zt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Xt=()=>{if(!Zt.isInitiated)return null;if(!Zt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Zt},Jm=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=xi.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Zt.baseUrl=e,Zt.appEnv=t,Zt.tier=n,Zt.userGroupId=o,Zt.userId=r,Zt.tenantPlatform=s,Zt.bifrost=new xi.Bifrost(t,n,s,i,a),Zt.isInitiated=!0},Ee=(({configHiver:e})=>async n=>{const r=Xt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:a}=r,{url:i,method:c,root_url:l}=n,g={root_url:(l||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(g,{...e,isHiverApiDomain:!0}))}catch(y){throw console.error("API call failed with error: ",y),y}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),qm=e=>T.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1180_840)"},T.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1180_840"},T.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Qm=e=>T.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),T.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),$m=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_825_73646)"},T.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_825_73646"},T.createElement("rect",{width:24,height:24,fill:"white"})))),Um="Rate your experience with Hiver Apps",Km="Share feedback on Apps",e3="Got any feedback?",gd="https://txeep2wshyx.typeform.com/to/RuOwF9SG",t3="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",n3="https://txeep2wshyx.typeform.com/to/bqhVSfDk",r3="https://cdn.hiverhq.com/chat-support/hiver-chat.html",o3="enable_connectors_clicked",s3="learn_more_clicked",a3="connector_card_expand_clicked",i3="connector_card_collapsed_clicked",c3="connector_card_refresh_clicked",l3="connector_cards_loaded",u3="connector_whats_new_card_viewed",d3="connector_whats_new_explore_now_clicked",f3="connector_whats_new_learn_more_clicked",p3="connector_whats_new_dismissed",h3="connector_create_new_object_clicked",g3="connector_link_new_object_clicked",m3="connector_new_object_created_by_form",b3="connector_new_object_linked_by_form",y3="connector_object_unlinked_by_form",C3="connector_link_preview_clicked",x3="connector_create_panel_cancel_clicked",v3="connector_create_panel_back_clicked",E3="card_loaded_on_click",w3="card_loaded",I3="schedule_call_clicked",_3="schedule_call_cross_clicked",md="CONNECTOR_EDIT_CLICKED",S3="CONNECTOR_EDIT_REQUEST_SEND",A3="CONNECTOR_EDIT_CANCELLED",T3="CONNECTOR_EDIT_BACK_CLICKED",L3="CONNECTOR_EDIT_SUCCESS",O3="connector_video_clicked",F3="connector_card_error",Zi="got_any_feedback_clicked",k3="connector_deeplink_clicked",D3="search_bar_tapped",N3="search_suggestions_selected",R3="search_initiated",M3="no_results_found",P3="search_results_found",j3="search_result_selected",B3="search_result_linked",V3="feedback_closed_clicked",G3="help_btn_clicked",H3="connector_chat_support_clicked",W3="missing_field_clicked",Z3="add_custom_field_clicked",X3="add_custom_field_success",z3="update_custom_field_success",bd="clicked_on_lookup_config",Y3="clicked_on_lookup_field",J3="saved_lookup_config",q3={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},We=I.createContext(q3),Hs="hiver_connectors",Xi={NOT_FOUND:404},Q3="ftr-connector-blue-dot",yd="ftr-connectors-write-flow",$3="ftr-connectors-enhancements",U3="ftr-connector-schedule-call-agent",K3="ftr-connectors-edit",e4="enableAllConnectorFtr",t4="ftr-cards-open-state",n4="ftr-connectors-global-search",r4="ftr-connectors-smart-suggestions",o4="ftr-connectors-email-selection",s4="ftr-connector-agent-feedback",Ws="ftr-connector-unified-view",a4="ftr-connectors-expanded-form",Cd="ftr-apps-lookup-revamp",i4="ftr-ci-configurable-fields",xd="Please refresh and try again",c4="No data available",Zs="-",vd="Refresh",Ed="Minimize",zi="Expand",wd="Connectors",Yi="Apps",l4="Collapse",u4="Close",Id="Link",d4="Create",f4="Update",_d="Unlink",Sd="Edit",Ji="Cancel",Ad="Create new object",Td="Link existing object",p4="Are you sure you want to unlink this object?",h4="The object will be removed from this conversation for all users. However the object will still be available on {{connectorName}} if you'd like to link it back in the future.",g4="Edit card",m4="bullet_list",b4="Expanded",y4="Collapsed",Ld="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Od="UNKNOWN_ERROR",C4="https://help.hiverhq.com/custom-connectors/common-connector-errors",Fd={MAIN_BUTTON:"main_button",ICON:"create_icon"},x4="Missing any fields? Inform us.",v4=" Add custom field",qi=e=>{let t=localStorage.getItem(Hs);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},E4=e=>!!qi(e),kd=()=>{const{userId:e=""}=Xt()||{};return String(e)},w4=(e,t=kd())=>{const n=qi(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Qi=(e,t=!1,n=!1)=>{const r=kd(),o=qi(e);if(t||!o){localStorage.removeItem(Hs);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Hs,JSON.stringify(s));return}else{const s=(o==null?void 0:o.isExtensionNew)??[],a=(o==null?void 0:o.extensionExpand)??[],i={[e]:{...o,...!n&&{isExtensionNew:[...new Set([...s,r])]},...n&&{extensionExpand:[...new Set([...a,r])]}}};localStorage.setItem(Hs,JSON.stringify(i));return}},tt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[e4])===!0:(e==null?void 0:e[t])===!0,st=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Dd=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?b4:y4,r&&e?(o.data_state=e==null?void 0:e.status,o.connector_names=(s=e==null?void 0:e.data)==null?void 0:s.connectorNames):e&&(o.data_state=(e==null?void 0:e.status)||"unknown_error"),o},Nd=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==Xi.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay={data:t}}else{const t=e.data.flatDisplay.data.filter(n=>Number(n.statusCode)!==Xi.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay.data=t}break;case"flat_with_list":e.data.listItems.fields=e.data.listItems.fields.map(t=>Array.isArray(t)?{data:t.sort((r,o)=>r.priority-o.priority)}:{data:t.data.sort((r,o)=>r.priority-o.priority),externalResourceId:t.externalResourceId});break}return e},I4=e=>{if(!e||Object.keys(e).length===0)return[];const t=new Set;return Object.values(e).forEach(n=>{n.connectorNames&&n.connectorNames.forEach(r=>t.add(r))}),Array.from(t)},Xs=({url:e,params:t})=>{const n=Object.entries(t).reduce((o,[s,a])=>(a!==void 0&&a!==""&&a!==null&&(o[s]=a),o),{}),r=new URL(e);return Object.entries(n).forEach(([o,s])=>{r.searchParams.set(o,s)}),r.toString()};function Rd(e,t){return e.length>t?e.substring(0,t)+"...":e}const _4=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1187_180)"},T.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1187_180"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),S4=e=>T.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_847_49587)"},T.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_847_49587"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),A4=u.keyframes`
34
+ `):" "+Yu(s[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Di};function Ni(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gr(null,e)}function qu(e){return Ni(e),e.headers=Ht.from(e.headers),e.data=Fi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ju.getAdapter(e.adapter||Li.adapter)(e).then(function(r){return Ni(e),r.data=Fi.call(e,e.transformResponse,r),r.headers=Ht.from(r.headers),r},function(r){return Mu(r)||(Ni(e),r&&r.response&&(r.response.data=Fi.call(e,e.transformResponse,r.response),r.response.headers=Ht.from(r.response.headers))),Promise.reject(r)})}const Qu="1.7.7",Ri={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ri[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const $u={};Ri.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Qu+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new ge(o(a," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!$u[a]&&($u[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};function Qg(e,t,n){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],c=i===void 0||a(i,s,e);if(c!==!0)throw new ge("option "+s+" must be "+c,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+s,ge.ERR_BAD_OPTION)}}var Mi={assertOptions:Qg,validators:Ri};const Fn=Mi.validators;let Bs=class{constructor(t){this.defaults=t,this.interceptors={request:new ku,response:new ku}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
+ `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ir(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Mi.assertOptions(r,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),o!=null&&(P.isFunction(o)?n.paramsSerializer={serialize:o}:Mi.assertOptions(o,{encode:Fn.function,serialize:Fn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&P.merge(s.common,s[n.method]);s&&P.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=Ht.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let f,g=0,y;if(!c){const b=[qu.bind(this),void 0];for(b.unshift.apply(b,i),b.push.apply(b,l),y=b.length,f=Promise.resolve(n);g<y;)f=f.then(b[g++],b[g++]);return f}y=i.length;let v=n;for(g=0;g<y;){const b=i[g++],p=i[g++];try{v=b(v)}catch(h){p.call(this,h);break}}try{f=qu.call(this,v)}catch(b){return Promise.reject(b)}for(g=0,y=l.length;g<y;)f=f.then(l[g++],l[g++]);return f}getUri(t){t=ir(this.defaults,t);const n=Vu(t.baseURL,t.url);return Fu(n,t.params,t.paramsSerializer)}};P.forEach(["delete","get","head","options"],function(t){Bs.prototype[t]=function(n,r){return this.request(ir(r||{},{method:t,url:n,data:(r||{}).data}))}}),P.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(ir(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Bs.prototype[t]=n(),Bs.prototype[t+"Form"]=n(!0)});var Vs=Bs;class Pi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new Gr(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Pi(function(o){t=o}),cancel:t}}}var $g=Pi;function Ug(e){return function(n){return e.apply(null,n)}}function Kg(e){return P.isObject(e)&&e.isAxiosError===!0}const ji={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ji).forEach(([e,t])=>{ji[t]=e});var em=ji;function Uu(e){const t=new Vs(e),n=gu(Vs.prototype.request,t);return P.extend(n,Vs.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Uu(ir(e,o))},n}const $e=Uu(Li);$e.Axios=Vs,$e.CanceledError=Gr,$e.CancelToken=$g,$e.isCancel=Mu,$e.VERSION=Qu,$e.toFormData=Ds,$e.AxiosError=ge,$e.Cancel=$e.CanceledError,$e.all=function(t){return Promise.all(t)},$e.spread=Ug,$e.isAxiosError=Kg,$e.mergeConfig=ir,$e.AxiosHeaders=Ht,$e.formToJSON=e=>Nu(P.isHTMLForm(e)?new FormData(e):e),$e.getAdapter=Ju.getAdapter,$e.HttpStatusCode=em,$e.default=$e;var Ku=$e,Ae={},kn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PLATFORM=e.TENANT_PLATFORM=e.API_CALL_ORIGIN=e.TIERS=e.APP_UI=e.CONFIG_HIVER=e.DEFAULT_INIT_CONFIG_HIVER=e.TWO_MINUTES_IN_MS=e.REFETCH_CHECK_DELAY=e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=e.INITIAL_RETRY_DELAY=e.MAX_BACKOFF_LIMIT=e.MAX_CONFLICT_RETRY_DELAY=e.MAX_RETRY_DELAY=e.GET_METHOD=void 0,e.GET_METHOD="GET",e.MAX_RETRY_DELAY=18e4,e.MAX_CONFLICT_RETRY_DELAY=63e3,e.MAX_BACKOFF_LIMIT=8e3,e.INITIAL_RETRY_DELAY=1e3,e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=3e3,e.REFETCH_CHECK_DELAY=168e4,e.TWO_MINUTES_IN_MS=2*60*1e3,e.DEFAULT_INIT_CONFIG_HIVER={getToken:!0,isHiverApiDomain:!0,fetchCsrfToken:function(){return""}},e.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},e.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},e.TIERS={DEV:"dev",SIT:"sit",QA:"qa",PRODUCTION:"production",PROD:"prod"},e.API_CALL_ORIGIN={API_RETRY:"Api Retry"},e.TENANT_PLATFORM={GMAIL:"GMAIL",HIVERWEB:"HIVERWEB"},function(t){t[t.WEB=0]="WEB",t[t.MOBILE=1]="MOBILE"}(e.PLATFORM||(e.PLATFORM={}))})(kn);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.getProdHqConfig=gt.getProdApiConfig=gt.getSitHqConfig=gt.getSitApiConfig=gt.getDevHqConfig=gt.getDevApiConfig=void 0;var Hr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},tm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Hr}};gt.getDevApiConfig=tm;var nm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Hr}};gt.getDevHqConfig=nm;var rm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:Hr}};gt.getSitApiConfig=rm;var om=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:Hr}};gt.getSitHqConfig=om;var sm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Hr}};gt.getProdApiConfig=sm;var am=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Hr}};gt.getProdHqConfig=am;var en={},tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.removeValue=tn.getValue=tn.setValue=void 0;var Bi={};function im(e,t){Bi[e]=t}tn.setValue=im;function cm(e){return Bi[e]}tn.getValue=cm;function lm(e){delete Bi[e]}tn.removeValue=lm,Object.defineProperty(en,"__esModule",{value:!0}),en.removeItemFromStorage=en.setItemInStorage=en.getItemFromStorage=void 0;var Wr=kn,Zr=tn,um=function(e,t){switch(t===void 0&&(t=(0,Zr.getValue)("PLATFORM")),t){case Wr.PLATFORM.WEB:return sessionStorage.getItem(e);case Wr.PLATFORM.MOBILE:return(0,Zr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};en.getItemFromStorage=um;var dm=function(e,t,n){switch(n===void 0&&(n=(0,Zr.getValue)("PLATFORM")),n){case Wr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Wr.PLATFORM.MOBILE:return(0,Zr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};en.setItemInStorage=dm;var fm=function(e,t){switch(t===void 0&&(t=(0,Zr.getValue)("PLATFORM")),t){case Wr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Wr.PLATFORM.MOBILE:(0,Zr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};en.removeItemFromStorage=fm;var pm=he&&he.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},hm=he&&he.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.expireToken=Ae.invalidateToken=Ae.validateToken=Ae.validateAccount=Ae.getConfig=Ae.introduceDelay=Ae.isTokenInExpiryWindow=Ae.getStoredAuthData=Ae.setUserDetails=Ae.getRefreshInterval=Ae.setTokenAndExpiry=Ae.getRandomDelay=Ae.hasValidToken=void 0;var bn=kn,Xr=gt,At=en,Vi=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Gi=function(e){var t=parseInt((0,At.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,At.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Ae.validateAccount=Gi;var gm=function(e){var t=Gi(e);return!ed()&&t};Ae.validateToken=gm;var mm=function(e){return e.apiRetry?e.apiRetry>0:!1};Ae.invalidateToken=mm;var bm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ae.expireToken=bm;var ym=function(e){var t=(0,At.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Vi(),o=Gi(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Ae.hasValidToken=ym;var Cm=function(){return Math.floor(Math.random()*6e4)+6e4};Ae.getRandomDelay=Cm;var xm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,At.setItemInStorage)("hiverAuthUserId",e),(0,At.setItemInStorage)("hiverAuthUserGroupId",t)};Ae.setUserDetails=xm;var vm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,At.setItemInStorage)("hiverAuthToken",e),(0,At.setItemInStorage)("hiverAuthTokenExpiry",t)};Ae.setTokenAndExpiry=vm;var Em=function(){var e=(0,At.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,At.getItemFromStorage)("hiverAuthToken"),n=(0,At.getItemFromStorage)("hiverAuthUserId"),r=(0,At.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Ae.getStoredAuthData=Em;var ed=function(){var e=(0,At.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Vi(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Ae.isTokenInExpiryWindow=ed;var wm=function(e){return pm(void 0,void 0,void 0,function(){return hm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Ae.introduceDelay=wm;var Im=function(e,t,n){switch(n===void 0&&(n=!0),t){case bn.TIERS.SIT:case bn.TIERS.QA:return n?(0,Xr.getSitApiConfig)(e):(0,Xr.getSitHqConfig)(e);case bn.TIERS.PRODUCTION:case bn.TIERS.PROD:return n?(0,Xr.getProdApiConfig)():(0,Xr.getProdHqConfig)();case bn.TIERS.DEV:default:return n?(0,Xr.getDevApiConfig)():(0,Xr.getDevHqConfig)()}};Ae.getConfig=Im;var _m=function(){try{var e=(0,At.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return bn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Vi();return t.getTime()-n.getTime()>bn.TWO_MINUTES_IN_MS?t.getTime()-bn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),bn.REFETCH_CHECK_DELAY}};Ae.getRefreshInterval=_m;var Vo={},Wt={},td;function nd(){if(td)return Wt;td=1;var e=he&&he.__awaiter||function(b,p,h,m){function C(x){return x instanceof h?x:new h(function(w){w(x)})}return new(h||(h=Promise))(function(x,w){function E(S){try{T(m.next(S))}catch(L){w(L)}}function _(S){try{T(m.throw(S))}catch(L){w(L)}}function T(S){S.done?x(S.value):C(S.value).then(E,_)}T((m=m.apply(b,p||[])).next())})},t=he&&he.__generator||function(b,p){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},m,C,x,w;return w={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function E(T){return function(S){return _([T,S])}}function _(T){if(m)throw new TypeError("Generator is already executing.");for(;w&&(w=0,T[0]&&(h=0)),h;)try{if(m=1,C&&(x=T[0]&2?C.return:T[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,T[1])).done)return x;switch(C=0,x&&(T=[T[0]&2,x.value]),T[0]){case 0:case 1:x=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,C=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!x||T[1]>x[0]&&T[1]<x[3])){h.label=T[1];break}if(T[0]===6&&h.label<x[1]){h.label=x[1],x=T;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(T);break}x[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(b,h)}catch(S){T=[6,S],C=0}finally{m=x=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.logoutFromHeimdall=Wt.getTenantLoginCode=Wt.getLoginToken=Wt.getAccessToken=void 0;var n=kn,r=id(),o=Ae,s=function(b,p,h,m){var C=(0,o.getStoredAuthData)(),x=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":x},data:{user_id:p.userId,usergroup_id:p.usergroupId,access_token:(C==null?void 0:C.token)||"",source:m}}},a=function(b,p,h,m,C){var x=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:p.heimdallUrl,url:p.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},headers:{"x-hiver-tenant":x,"x-hiver-userid":m,"x-hiver-usergroupid":C}}},i=function(b,p){var h=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":h}}},c=function(b){return parseInt(b,10)},l=function(b,p,h,m){return{root_url:h===n.TENANT_PLATFORM.HIVERWEB?b.hotUrl:b.v2Url,url:h===n.TENANT_PLATFORM.HIVERWEB?b.apiEndpoints.hotLogin:b.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(p.userId),app:m||n.APP_UI.DEFAULT}}},f=function(b,p,h,m,C){return e(void 0,void 0,void 0,function(){var x,w,E,_,T,S,L;return t(this,function(R){switch(R.label){case 0:console.log("GETTOKEN tenantPlatform -> ",m),R.label=1;case 1:return R.trys.push([1,5,,6]),!(0,o.validateToken)(h)||(0,o.invalidateToken)(h)?(console.log("HEIMDALL: No valid token, fetching token"),x=s(p,h,m,C),[4,(0,r.performAxiosCall)(x)]):[3,3];case 2:return w=R.sent(),[2,{atToken:(_=w==null?void 0:w.data.at)===null||_===void 0?void 0:_.token,expiryTime:(T=w==null?void 0:w.data.at)===null||T===void 0?void 0:T.expires_at,userId:(S=w==null?void 0:w.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=w==null?void 0:w.data)===null||L===void 0?void 0:L.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw E=R.sent(),E;case 6:return[2]}})})};Wt.getAccessToken=f;var g=function(b,p,h,m,C,x){return e(void 0,void 0,void 0,function(){var w,E,_,T,S,L,R;return t(this,function(k){switch(k.label){case 0:w=a(b,h,m,C,x),k.label=1;case 1:return k.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(w)];case 2:return E=k.sent(),[2,{userId:(T=E==null?void 0:E.data)===null||T===void 0?void 0:T.user_id,userGroupId:(S=E==null?void 0:E.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=E==null?void 0:E.data.at)===null||L===void 0?void 0:L.token,expiryTime:(R=E==null?void 0:E.data.at)===null||R===void 0?void 0:R.expires_at}];case 3:throw _=k.sent(),_;case 4:return[2]}})})};Wt.getLoginToken=g;var y=function(b,p,h,m,C){return e(void 0,void 0,void 0,function(){var x,w,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",C),x=l(p,h,m,C),[4,(0,r.performAxiosCall)(x)];case 1:return w=_.sent(),[2,w==null?void 0:w.data.code];case 2:throw E=_.sent(),E;case 3:return[2]}})})};Wt.getTenantLoginCode=y;var v=function(b,p,h){return h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var m,C,x;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,5]),m=i(b,p),[4,(0,r.performAxiosCall)(m)];case 1:return C=w.sent(),[2,C==null?void 0:C.status];case 2:return x=w.sent(),h<2?[4,v(b,p,h+1)]:[3,4];case 3:w.sent(),w.label=4;case 4:throw x;case 5:return[2]}})})};return Wt.logoutFromHeimdall=v,Wt}var Gs={},Sm=he&&he.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Tm=he&&he.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.subscribeToOnlineEvent=void 0;var rd=kn,Am=tn,Lm=function(e,t){switch(t===void 0&&(t=(0,Am.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case rd.PLATFORM.WEB:return window.addEventListener("online",function(){return Sm(void 0,void 0,void 0,function(){return Tm(this,function(n){switch(n.label){case 0:return console.log("Online status detected. Fetching token..."),[4,e()];case 1:return n.sent(),[2]}})})});case rd.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};Gs.subscribeToOnlineEvent=Lm;var od;function sd(){if(od)return Vo;od=1;var e=he&&he.__awaiter||function(b,p,h,m){function C(x){return x instanceof h?x:new h(function(w){w(x)})}return new(h||(h=Promise))(function(x,w){function E(S){try{T(m.next(S))}catch(L){w(L)}}function _(S){try{T(m.throw(S))}catch(L){w(L)}}function T(S){S.done?x(S.value):C(S.value).then(E,_)}T((m=m.apply(b,p||[])).next())})},t=he&&he.__generator||function(b,p){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},m,C,x,w;return w={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function E(T){return function(S){return _([T,S])}}function _(T){if(m)throw new TypeError("Generator is already executing.");for(;w&&(w=0,T[0]&&(h=0)),h;)try{if(m=1,C&&(x=T[0]&2?C.return:T[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,T[1])).done)return x;switch(C=0,x&&(T=[T[0]&2,x.value]),T[0]){case 0:case 1:x=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,C=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!x||T[1]>x[0]&&T[1]<x[3])){h.label=T[1];break}if(T[0]===6&&h.label<x[1]){h.label=x[1],x=T;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(T);break}x[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(b,h)}catch(S){T=[6,S],C=0}finally{m=x=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.fetchAccessToken=void 0;var n=nd(),r=kn,o=Ae,s=Gs,a,i,c,l=function(b,p,h,m,C,x){return x===void 0&&(x=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var w,E,_,T,S,L,R,k,D;return t(this,function(M){switch(M.label){case 0:w=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",x,m),E=void 0,C?[4,C()]:[3,3];case 2:return E=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,p,m,x)];case 4:E=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,b,m,p.userId,p.usergroupId)];case 6:return _=M.sent(),T=_.userId,S=_.userGroupId,L=_.atToken,R=_.expiryTime,(0,o.setTokenAndExpiry)(L,R),(0,o.setUserDetails)(T,S),[3,12];case 7:k=M.sent(),console.log("ERROR debug: in error login:",k,x),D=h,M.label=8;case 8:return D<w?[4,l(b,p,D+1,m,C,x)]:[3,11];case 9:M.sent(),M.label=10;case 10:return D++,[3,8];case 11:throw k;case 12:return[2]}})})},f=function(b,p,h,m,C){return e(void 0,void 0,void 0,function(){var x,w,E,_;return t(this,function(T){switch(T.label){case 0:return p<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,b)})]:[3,3];case 1:return T.sent(),p+=b,b*2<=r.MAX_BACKOFF_LIMIT?b*=2:b=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",b),x=h.retryDelay,w=h.configs,E=h.apiParams,_=h.appUI,[4,g(x,b,p,w,E,m,C,_)];case 2:T.sent(),T.label=3;case 3:return[2]}})})},g=function(b,p,h,m,C,x,w,E,_){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var T,S,L,R,k,D,M,G,Y,X,J,z,q,ne;return t(this,function(ce){switch(ce.label){case 0:return ce.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,m,C,x,E)];case 1:return T=ce.sent(),S=T.atToken,L=T.expiryTime,R=T.userId,k=T.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),R&&k&&(0,o.setUserDetails)(R,k),b=r.INITIAL_RETRY_DELAY,p=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return D=ce.sent(),console.log("ERROR: Heimdall fetch token",D),((Y=D.response)===null||Y===void 0?void 0:Y.status)===401||((X=D.request)===null||X===void 0?void 0:X.status)===401?(M=1,[4,l(m,C,M,x,w,_)]):[3,4];case 3:return ce.sent(),[3,11];case 4:return((J=D.response)===null||J===void 0?void 0:J.status)===409||((z=D.request)===null||z===void 0?void 0:z.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),G={retryDelay:b,configs:m,apiParams:C,appUI:_},[4,f(p,h,G,x,w)]):[3,6];case 5:if(ce.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw D;return[3,11];case 6:if(!(((q=D.response)===null||q===void 0?void 0:q.status)===422||((ne=D.request)===null||ne===void 0?void 0:ne.status)===422))return[3,7];throw console.log("ERROR: Throwing error",D.response.status),D;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(V){return setTimeout(V,b)})]:[3,10];case 8:return ce.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,g(b,p,h,m,C,x,w,_)];case 9:return ce.sent(),[3,11];case 10:throw D;case 11:return[3,12];case 12:return[2]}})})},y=function(b,p,h,m,C,x,w,E){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var _,T,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),_=(0,o.isTokenInExpiryWindow)(),_?(T=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(T)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,g(h,m,C,b,p,x,w,E)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},v=function(b,p,h,m,C,x,w){return e(void 0,void 0,void 0,function(){var E,_,T,S,L,R;return t(this,function(k){switch(k.label){case 0:a=b,i=p,E=r.INITIAL_RETRY_DELAY,_=r.INITIAL_RETRY_DELAY,T=0,S=(0,o.getConfig)(a,i),console.log("Instance: Fetch Call"),k.label=1;case 1:return k.trys.push([1,3,,4]),[4,g(E,_,T,S,h,m,C,x,w)];case 2:return k.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return y(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,C,w)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(D){switch(D.label){case 0:return[4,y(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,C,w)];case 1:return D.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return R=k.sent(),console.log("ERROR: Fetching token failed",R),[3,4];case 4:return[2]}})})};return Vo.fetchAccessToken=v,Vo}var ad;function id(){if(ad)return sr;ad=1;var e=he&&he.__assign||function(){return e=Object.assign||function(p){for(var h,m=1,C=arguments.length;m<C;m++){h=arguments[m];for(var x in h)Object.prototype.hasOwnProperty.call(h,x)&&(p[x]=h[x])}return p},e.apply(this,arguments)},t=he&&he.__awaiter||function(p,h,m,C){function x(w){return w instanceof m?w:new m(function(E){E(w)})}return new(m||(m=Promise))(function(w,E){function _(L){try{S(C.next(L))}catch(R){E(R)}}function T(L){try{S(C.throw(L))}catch(R){E(R)}}function S(L){L.done?w(L.value):x(L.value).then(_,T)}S((C=C.apply(p,h||[])).next())})},n=he&&he.__generator||function(p,h){var m={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},C,x,w,E;return E={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function _(S){return function(L){return T([S,L])}}function T(S){if(C)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(m=0)),m;)try{if(C=1,x&&(w=S[0]&2?x.return:S[0]?x.throw||((w=x.return)&&w.call(x),0):x.next)&&!(w=w.call(x,S[1])).done)return w;switch(x=0,w&&(S=[S[0]&2,w.value]),S[0]){case 0:case 1:w=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,x=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(w=m.trys,!(w=w.length>0&&w[w.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!w||S[1]>w[0]&&S[1]<w[3])){m.label=S[1];break}if(S[0]===6&&m.label<w[1]){m.label=w[1],w=S;break}if(w&&m.label<w[2]){m.label=w[2],m.ops.push(S);break}w[2]&&m.ops.pop(),m.trys.pop();continue}S=h.call(p,m)}catch(L){S=[6,L],x=0}finally{C=w=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.hiverAxiosCall=sr.performAxiosCall=void 0;var r=Ku,o=Ae,s=sd(),a=en,i=kn,c,l=2,f=function(p,h){var m=h.fetchCsrfToken();p.formData?p.formData.append("_csrf_token",m):(p.data=p.data||{},p.data._csrf_token=m)},g=function(p,h){var m={};!p.method||p.method.toLowerCase()==="get"?m={params:p.params?p.params:p.data}:m=p.params?{params:p,data:p.data}:{data:p.data};var C=e(e({method:p.method,url:"".concat(p.root_url).concat(p.url),headers:p.headers},m),{withCredentials:h,responseType:(p==null?void 0:p.responseType)||""});return C};function y(p,h){return h===void 0&&(h=!0),t(this,void 0,void 0,function(){var m;return n(this,function(C){return m=g(p,h),[2,(0,r.default)(m).then(function(x){return x}).catch(function(x){throw x})]})})}sr.performAxiosCall=y;function v(p,h,m){return t(this,void 0,void 0,function(){var C,x,w;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),p.authTokenFetchingInProgress?[3,2]:(p.authTokenFetchingInProgress=!0,C=p.appEnv,x=p.tier,[4,(0,s.fetchAccessToken)(C,x,h,p.tenantPlatform,p.getTokenForLogin,m)]);case 1:return E.sent(),p.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(_){return setTimeout(_,100)})];case 3:return E.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,v(p,h,m)];case 4:E.sent(),E.label=5;case 5:return[3,8];case 6:return w=E.sent(),console.log("Error while fetching Auth Token :",w),p.authTokenFetchingInProgress=!1,[4,v(p,h,m)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function b(p,h,m,C,x){var w,E;return x===void 0&&(x=0),t(this,void 0,void 0,function(){var _,T,S,L,R,k,D;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(m.getToken&&!(0,o.hasValidToken)(h)))return[3,2];if(_=p.appEnv,T=p.tier,!_||!T)throw Error("appEnv or tier missing : ".concat(_,"/").concat(T));return"userId"in h&&"usergroupId"in h?(S={userId:h.userId,usergroupId:h.usergroupId},[4,v(p,S,C)]):[3,2];case 1:M.sent(),M.label=2;case 2:return p.csrfToken&&f(h,m),L=p.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,h.headers=e(e({},h.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),m.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",h.headers=e(e({},h.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",h),[4,y(h,p.withCredentials)];case 3:return R=M.sent(),h.onSuccess&&h.onSuccess(R),[2,R];case 4:if(k=M.sent(),D=((w=k.response)===null||w===void 0?void 0:w.status)===403||((E=k.request)===null||E===void 0?void 0:E.status)===403,x<l&&D)return(0,o.expireToken)(),[2,b(p,h,m,C,x+1)];if(x>=l&&D||!D)throw h.onFail&&h.onFail(k),console.log("ERROR: Reached make Axios",k),k;return[3,5];case 5:return[2]}})})}return sr.hiverAxiosCall=b,sr}var Go={},Ge={},We={};Object.defineProperty(We,"__esModule",{value:!0}),We.TIERS=We.APP_UI=We.CONFIG_HIVER=We.REFETCH_CHECK_DELAY=We.INITIAL_RETRY_DELAY=We.MAX_BACKOFF_LIMIT=We.MAX_CONFLICT_RETRY_DELAY=We.MAX_RETRY_DELAY=We.GET_METHOD=void 0,We.GET_METHOD="GET",We.MAX_RETRY_DELAY=18e4,We.MAX_CONFLICT_RETRY_DELAY=63e3,We.MAX_BACKOFF_LIMIT=8e3,We.INITIAL_RETRY_DELAY=1e3,We.REFETCH_CHECK_DELAY=168e4,We.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},We.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},We.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.getProdHqConfig=mt.getProdApiConfig=mt.getSitHqConfig=mt.getSitApiConfig=mt.getDevHqConfig=mt.getDevApiConfig=void 0;var zr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},Om=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:zr}};mt.getDevApiConfig=Om;var Fm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:zr}};mt.getDevHqConfig=Fm;var km=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:zr}};mt.getSitApiConfig=km;var Dm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:zr}};mt.getSitHqConfig=Dm;var Nm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:zr}};mt.getProdApiConfig=Nm;var Rm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:zr}};mt.getProdHqConfig=Rm;var Mm=he&&he.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Pm=he&&he.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.expireToken=Ge.validateToken=Ge.validateAccount=Ge.getConfig=Ge.introduceDelay=Ge.isTokenInExpiryWindow=Ge.getStoredAuthData=Ge.setUserDetails=Ge.setTokenAndExpiry=Ge.getRandomDelay=Ge.hasValidToken=void 0;var Hi=We,cr=mt,cd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Wi=function(e){var t=parseInt(sessionStorage.getItem("hiverAuthUserId")||"0"),n=parseInt(sessionStorage.getItem("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Ge.validateAccount=Wi;var jm=function(e){var t=Wi(e);return!ld()&&t};Ge.validateToken=jm;var Bm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ge.expireToken=Bm;var Vm=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=cd(),o=Wi(e);return r<n&&o};Ge.hasValidToken=Vm;var Gm=function(){return Math.floor(Math.random()*6e4)+6e4};Ge.getRandomDelay=Gm;var Hm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");sessionStorage.setItem("hiverAuthUserId",e),sessionStorage.setItem("hiverAuthUserGroupId",t)};Ge.setUserDetails=Hm;var Wm=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Ge.setTokenAndExpiry=Wm;var Zm=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry"),t=sessionStorage.getItem("hiverAuthToken"),n=sessionStorage.getItem("hiverAuthUserId"),r=sessionStorage.getItem("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Ge.getStoredAuthData=Zm;var ld=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=cd(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Ge.isTokenInExpiryWindow=ld;var Xm=function(e){return Mm(void 0,void 0,void 0,function(){return Pm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Ge.introduceDelay=Xm;var zm=function(e,t,n){switch(t){case Hi.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,cr.getSitHqConfig)(e)),n?(0,cr.getSitApiConfig)(e):(0,cr.getSitHqConfig)(e);case Hi.TIERS.PROD:return n?(0,cr.getProdApiConfig)():(0,cr.getProdHqConfig)();case Hi.TIERS.DEV:default:return n?(0,cr.getDevApiConfig)():(0,cr.getDevHqConfig)()}};Ge.getConfig=zm;var Ho={},yn={},ud;function Ym(){if(ud)return yn;ud=1;var e=he&&he.__awaiter||function(y,v,b,p){function h(m){return m instanceof b?m:new b(function(C){C(m)})}return new(b||(b=Promise))(function(m,C){function x(_){try{E(p.next(_))}catch(T){C(T)}}function w(_){try{E(p.throw(_))}catch(T){C(T)}}function E(_){_.done?m(_.value):h(_.value).then(x,w)}E((p=p.apply(y,v||[])).next())})},t=he&&he.__generator||function(y,v){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(E){return function(_){return w([E,_])}}function w(E){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(b=0)),b;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,h=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){b.label=E[1];break}if(E[0]===6&&b.label<m[1]){b.label=m[1],m=E;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(E);break}m[2]&&b.ops.pop(),b.trys.pop();continue}E=v.call(y,b)}catch(_){E=[6,_],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(yn,"__esModule",{value:!0}),yn.getV2LoginCode=yn.getLoginToken=yn.getAccessToken=void 0;var n=We,r=hd(),o=Ge,s=function(y,v,b){var p=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:v.userId,usergroup_id:v.usergroupId,access_token:(p==null?void 0:p.token)||"",source:b},withCredentials:!0}},a=function(y,v){return{root_url:v.heimdallUrl,url:v.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,v){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:v||n.APP_UI.DEFAULT}}},l=function(y,v,b,p){return e(void 0,void 0,void 0,function(){var h,m,C,x,w,E,_;return t(this,function(T){switch(T.label){case 0:return T.trys.push([0,4,,5]),(0,o.validateToken)(b)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),h=s(v,b,p),[4,(0,r.makeAxiosCall)(h,y)]);case 1:return m=T.sent(),[2,{atToken:(x=m==null?void 0:m.data.at)===null||x===void 0?void 0:x.token,expiryTime:(w=m==null?void 0:m.data.at)===null||w===void 0?void 0:w.expires_at,userId:(E=m==null?void 0:m.data)===null||E===void 0?void 0:E.user_id,userGroupId:(_=m==null?void 0:m.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw C=T.sent(),C;case 5:return[2]}})})};yn.getAccessToken=l;var f=function(y,v,b){return e(void 0,void 0,void 0,function(){var p,h,m,C,x,w,E;return t(this,function(_){switch(_.label){case 0:p=a(y,b),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(p,v)];case 2:return h=_.sent(),[2,{userId:(C=h==null?void 0:h.data)===null||C===void 0?void 0:C.user_id,userGroupId:(x=h==null?void 0:h.data)===null||x===void 0?void 0:x.usergroup_id,atToken:(w=h==null?void 0:h.data.at)===null||w===void 0?void 0:w.token,expiryTime:(E=h==null?void 0:h.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw m=_.sent(),m;case 4:return[2]}})})};yn.getLoginToken=f;var g=function(y,v,b){return e(void 0,void 0,void 0,function(){var p,h,m;return t(this,function(C){switch(C.label){case 0:return C.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),p=c(v,b),[4,(0,r.makeAxiosCall)(p,y)];case 1:return h=C.sent(),console.log("DEBUG HEIMDALL: local storage:",h==null?void 0:h.data),[2,h==null?void 0:h.data.code];case 2:throw m=C.sent(),m;case 3:return[2]}})})};return yn.getV2LoginCode=g,yn}var dd;function fd(){if(dd)return Ho;dd=1;var e=he&&he.__awaiter||function(v,b,p,h){function m(C){return C instanceof p?C:new p(function(x){x(C)})}return new(p||(p=Promise))(function(C,x){function w(T){try{_(h.next(T))}catch(S){x(S)}}function E(T){try{_(h.throw(T))}catch(S){x(S)}}function _(T){T.done?C(T.value):m(T.value).then(w,E)}_((h=h.apply(v,b||[])).next())})},t=he&&he.__generator||function(v,b){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},h,m,C,x;return x={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function w(_){return function(T){return E([_,T])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(p=0)),p;)try{if(h=1,m&&(C=_[0]&2?m.return:_[0]?m.throw||((C=m.return)&&C.call(m),0):m.next)&&!(C=C.call(m,_[1])).done)return C;switch(m=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,m=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){p.label=_[1];break}if(_[0]===6&&p.label<C[1]){p.label=C[1],C=_;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(_);break}C[2]&&p.ops.pop(),p.trys.pop();continue}_=b.call(v,p)}catch(T){_=[6,T],m=0}finally{h=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.fetchToken=void 0;var n=Ym(),r=We,o=Ge,s,a,i,c=function(v,b,p){return p===void 0&&(p=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var h,m,C,x,w,E,_,T,S;return t(this,function(L){switch(L.label){case 0:h=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",p),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,v,p)];case 2:return m=L.sent(),[4,(0,n.getLoginToken)(m,r.CONFIG_HIVER,v)];case 3:return C=L.sent(),x=C.userId,w=C.userGroupId,E=C.atToken,_=C.expiryTime,(0,o.setTokenAndExpiry)(E,_),(0,o.setUserDetails)(x,w),[3,9];case 4:T=L.sent(),console.log("ERROR debug: in error login:",T,p),S=b,L.label=5;case 5:return S<h?[4,c(v,S+1,p)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw T;case 9:return[2]}})})},l=function(v,b,p){return e(void 0,void 0,void 0,function(){var h,m,C,x;return t(this,function(w){switch(w.label){case 0:return b<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,v)})]:[3,3];case 1:return w.sent(),b+=v,v*2<=r.MAX_BACKOFF_LIMIT?v*=2:v=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",v),h=p.retryDelay,m=p.configs,C=p.api_params,x=p.appUI,[4,f(h,v,b,m,C,x)];case 2:w.sent(),w.label=3;case 3:return[2]}})})},f=function(v,b,p,h,m,C,x){return C===void 0&&(C="default"),e(void 0,void 0,void 0,function(){var w,E,_,T,S,L,R,k,D,M,G,Y,X,J;return t(this,function(z){switch(z.label){case 0:return z.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,m,C)];case 1:return w=z.sent(),E=w.atToken,_=w.expiryTime,T=w.userId,S=w.userGroupId,E&&_&&(0,o.setTokenAndExpiry)(E,_),T&&S&&(0,o.setUserDetails)(T,S),v=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return L=z.sent(),console.log("ERROR: Heimdall fetch token",L),((D=L.response)===null||D===void 0?void 0:D.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(R=1,[4,c(h,R,x)]):[3,4];case 3:return z.sent(),[3,11];case 4:return((G=L.response)===null||G===void 0?void 0:G.status)===409||((Y=L.request)===null||Y===void 0?void 0:Y.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),k={retryDelay:v,configs:h,api_params:m,appUI:x},[4,l(b,p,k)]):[3,6];case 5:if(z.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((X=L.response)===null||X===void 0?void 0:X.status)===422||((J=L.request)===null||J===void 0?void 0:J.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return v<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,v)})]:[3,10];case 8:return z.sent(),v*=2,console.log("Heimdall: Fetch token post doubling retry delay",v),[4,f(v,b,p,h,m,x)];case 9:return z.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(v,b,p,h,m,C){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=0),e(void 0,void 0,void 0,function(){var x,w,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),x=(0,o.isTokenInExpiryWindow)(),x?(w=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(w)]):[3,3];case 1:return _.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,f(p,h,m,v,b,C)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw E=_.sent(),E;case 5:return[2]}})})},y=function(v,b,p,h,m,C){return e(void 0,void 0,void 0,function(){var x,w,E,_,T;return t(this,function(S){switch(S.label){case 0:s=v,a=b,x=r.INITIAL_RETRY_DELAY,w=r.INITIAL_RETRY_DELAY,E=0,_=(0,o.getConfig)(s,a,h),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(x,w,E,_,p,m,C)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return g(_,p)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",i),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(L){switch(L.label){case 0:return console.log("Online status detected. Fetching token..."),[4,g(_,p)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw T=S.sent(),T;case 4:return[2]}})})};return Ho.fetchToken=y,Ho}var pd;function hd(){if(pd)return Go;pd=1;var e=he&&he.__assign||function(){return e=Object.assign||function(y){for(var v,b=1,p=arguments.length;b<p;b++){v=arguments[b];for(var h in v)Object.prototype.hasOwnProperty.call(v,h)&&(y[h]=v[h])}return y},e.apply(this,arguments)},t=he&&he.__awaiter||function(y,v,b,p){function h(m){return m instanceof b?m:new b(function(C){C(m)})}return new(b||(b=Promise))(function(m,C){function x(_){try{E(p.next(_))}catch(T){C(T)}}function w(_){try{E(p.throw(_))}catch(T){C(T)}}function E(_){_.done?m(_.value):h(_.value).then(x,w)}E((p=p.apply(y,v||[])).next())})},n=he&&he.__generator||function(y,v){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(E){return function(_){return w([E,_])}}function w(E){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(b=0)),b;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,h=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){b.label=E[1];break}if(E[0]===6&&b.label<m[1]){b.label=m[1],m=E;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(E);break}m[2]&&b.ops.pop(),b.trys.pop();continue}E=v.call(y,b)}catch(_){E=[6,_],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Go,"__esModule",{value:!0}),Go.makeAxiosCall=void 0;var r=Ku,o=Ge,s=fd(),a,i=2,c=function(y,v){var b=v.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",b):(y.data=y.data||{},y.data._csrf_token=b)},l=function(y){var v=!y.method||y.method.toLowerCase()==="get"?{params:y.data}:{data:y.data},b=e(e({method:y.method,url:"".concat(y.root_url).concat(y.url),headers:y.headers},v),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return b};function f(y){return t(this,void 0,void 0,function(){var v;return n(this,function(b){return v=l(y),[2,(0,r.default)(v).then(function(p){return p}).catch(function(p){throw p})]})})}function g(y,v,b,p){var h,m;return p===void 0&&(p=0),t(this,void 0,void 0,function(){var C,x,w,E,_,T;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(v.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(C=y.app_env,x=y.tier,!C||!x)throw Error("app_env or tier missing : ".concat(C,"/").concat(x));return"userId"in y&&"usergroupId"in y?(w={userId:y.userId,usergroupId:y.usergroupId},typeof v.isHiverApiDomain!="boolean"&&(v.isHiverApiDomain=!0),[4,(0,s.fetchToken)(C,x,w,v.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,v),v.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",y.headers=e(e({},y.headers),{Authorization:"Bearer ".concat(a)})),[4,f(y)];case 3:return E=S.sent(),y.onSuccess&&y.onSuccess(E),[2,E];case 4:if(_=S.sent(),T=((h=_.response)===null||h===void 0?void 0:h.status)===403||((m=_.request)===null||m===void 0?void 0:m.status)===403,p<i&&T)return(0,o.expireToken)(),[2,g(y,v,b,p+1)];if(p>=i&&T||!T)throw y.onFail&&y.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Go.makeAxiosCall=g,Go}(function(e){var t=he&&he.__awaiter||function(v,b,p,h){function m(C){return C instanceof p?C:new p(function(x){x(C)})}return new(p||(p=Promise))(function(C,x){function w(T){try{_(h.next(T))}catch(S){x(S)}}function E(T){try{_(h.throw(T))}catch(S){x(S)}}function _(T){T.done?C(T.value):m(T.value).then(w,E)}_((h=h.apply(v,b||[])).next())})},n=he&&he.__generator||function(v,b){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},h,m,C,x;return x={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function w(_){return function(T){return E([_,T])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(p=0)),p;)try{if(h=1,m&&(C=_[0]&2?m.return:_[0]?m.throw||((C=m.return)&&C.call(m),0):m.next)&&!(C=C.call(m,_[1])).done)return C;switch(m=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,m=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){p.label=_[1];break}if(_[0]===6&&p.label<C[1]){p.label=C[1],C=_;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(_);break}C[2]&&p.ops.pop(),p.trys.pop();continue}_=b.call(v,p)}catch(T){_=[6,T],m=0}finally{h=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=id(),o=sd(),s=kn;Object.defineProperty(e,"TENANT_PLATFORM",{enumerable:!0,get:function(){return s.TENANT_PLATFORM}}),Object.defineProperty(e,"DEFAULT_INIT_CONFIG_HIVER",{enumerable:!0,get:function(){return s.DEFAULT_INIT_CONFIG_HIVER}});var a=nd(),i=Ae,c=en,l=hd();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=fd();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var g=tn,y=function(){function v(b,p,h,m,C,x){h===void 0&&(h=s.TENANT_PLATFORM.GMAIL),m===void 0&&(m=null),C===void 0&&(C=!0),x===void 0&&(x=!1),this.setEnvironment(),this.appEnv=b,this.tier=p,this.tenantPlatform=h,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=m,this.withCredentials=C,this.csrfToken=x}return v.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},v.prototype.hiverAxios=function(b,p,h,m){return p===void 0&&(p=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var C,x;return n(this,function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),m&&m<2?(C={userId:b.userId,usergroupId:b.usergroupId,apiRetry:m},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,C,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:w.sent(),w.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,b,p,h)];case 3:return[2,w.sent()];case 4:throw x=w.sent(),console.log("ERROR: Axios call failed",x),x;case 5:return[2]}})})},v.prototype.fetchAuthToken=function(b,p,h){return t(this,void 0,void 0,function(){var m;return n(this,function(C){switch(C.label){case 0:return C.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,b,this.tenantPlatform,this.getTokenForLogin,p,h)]);case 1:return C.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),C.label=3;case 3:return[3,8];case 4:return m=C.sent(),console.log("ERROR: Fetching token failed",m),this.authTokenFetchingInProgress=!1,[4,new Promise(function(x){return setTimeout(x,100)})];case 5:return C.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,p,h)];case 6:return C.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},v.prototype.logout=function(){return t(this,void 0,void 0,function(){var b,p;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),b=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(b,this.tenantPlatform)];case 1:return h.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw p=h.sent(),console.error("Heimdall: Logout failed",p),p;case 3:return[2]}})})},v.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},v}();e.Bifrost=y})(xi);const Zt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Xt=()=>{if(!Zt.isInitiated)return null;if(!Zt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Zt},Jm=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=xi.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Zt.baseUrl=e,Zt.appEnv=t,Zt.tier=n,Zt.userGroupId=o,Zt.userId=r,Zt.tenantPlatform=s,Zt.bifrost=new xi.Bifrost(t,n,s,i,a),Zt.isInitiated=!0},Ee=(({configHiver:e})=>async n=>{const r=Xt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:a}=r,{url:i,method:c,root_url:l}=n,g={root_url:(l||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(g,{...e,isHiverApiDomain:!0}))}catch(y){throw console.error("API call failed with error: ",y),y}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),qm=e=>A.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1180_840)"},A.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1180_840"},A.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Qm=e=>A.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),A.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),$m=e=>A.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_825_73646)"},A.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_825_73646"},A.createElement("rect",{width:24,height:24,fill:"white"})))),Um="Rate your experience with Hiver Apps",Km="Share feedback on Apps",e3="Got any feedback?",gd="https://txeep2wshyx.typeform.com/to/RuOwF9SG",t3="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",n3="https://txeep2wshyx.typeform.com/to/bqhVSfDk",r3="https://cdn.hiverhq.com/chat-support/hiver-chat.html",o3="enable_connectors_clicked",s3="learn_more_clicked",a3="connector_card_expand_clicked",i3="connector_card_collapsed_clicked",c3="connector_card_refresh_clicked",l3="connector_cards_loaded",u3="connector_whats_new_card_viewed",d3="connector_whats_new_explore_now_clicked",f3="connector_whats_new_learn_more_clicked",p3="connector_whats_new_dismissed",h3="connector_create_new_object_clicked",g3="connector_link_new_object_clicked",m3="connector_new_object_created_by_form",b3="connector_new_object_linked_by_form",y3="connector_object_unlinked_by_form",C3="connector_link_preview_clicked",x3="connector_create_panel_cancel_clicked",v3="connector_create_panel_back_clicked",E3="card_loaded_on_click",w3="card_loaded",I3="schedule_call_clicked",_3="schedule_call_cross_clicked",md="CONNECTOR_EDIT_CLICKED",S3="CONNECTOR_EDIT_REQUEST_SEND",T3="CONNECTOR_EDIT_CANCELLED",A3="CONNECTOR_EDIT_BACK_CLICKED",L3="CONNECTOR_EDIT_SUCCESS",O3="connector_video_clicked",F3="connector_card_error",Zi="got_any_feedback_clicked",k3="connector_deeplink_clicked",D3="search_bar_tapped",N3="search_suggestions_selected",R3="search_initiated",M3="no_results_found",P3="search_results_found",j3="search_result_selected",B3="search_result_linked",V3="feedback_closed_clicked",G3="help_btn_clicked",H3="connector_chat_support_clicked",W3="missing_field_clicked",Z3="add_custom_field_clicked",X3="add_custom_field_success",z3="update_custom_field_success",bd="clicked_on_lookup_config",Y3="clicked_on_lookup_field",J3="saved_lookup_config",q3={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},He=I.createContext(q3),Hs="hiver_connectors",Xi={NOT_FOUND:404},Q3="ftr-connector-blue-dot",yd="ftr-connectors-write-flow",$3="ftr-connectors-enhancements",U3="ftr-connector-schedule-call-agent",K3="ftr-connectors-edit",e4="enableAllConnectorFtr",t4="ftr-cards-open-state",n4="ftr-connectors-global-search",r4="ftr-connectors-smart-suggestions",o4="ftr-connectors-email-selection",s4="ftr-connector-agent-feedback",Ws="ftr-connector-unified-view",a4="ftr-connectors-expanded-form",Cd="ftr-apps-lookup-revamp",i4="ftr-ci-configurable-fields",xd="Please refresh and try again",c4="No data available",Zs="-",vd="Refresh",Ed="Minimize",zi="Expand",wd="Connectors",Yi="Apps",l4="Collapse",u4="Close",Id="Link",d4="Create",f4="Update",_d="Unlink",Sd="Edit",Ji="Cancel",Td="Create new object",Ad="Link existing object",p4="Are you sure you want to unlink this object?",h4="The object will be removed from this conversation for all users. However the object will still be available on {{connectorName}} if you'd like to link it back in the future.",g4="Edit card",m4="bullet_list",b4="Expanded",y4="Collapsed",Ld="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Od="UNKNOWN_ERROR",C4="https://help.hiverhq.com/custom-connectors/common-connector-errors",Fd={MAIN_BUTTON:"main_button",ICON:"create_icon"},x4="Missing any fields? Inform us.",v4=" Add custom field",qi=e=>{let t=localStorage.getItem(Hs);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},E4=e=>!!qi(e),kd=()=>{const{userId:e=""}=Xt()||{};return String(e)},w4=(e,t=kd())=>{const n=qi(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Qi=(e,t=!1,n=!1)=>{const r=kd(),o=qi(e);if(t||!o){localStorage.removeItem(Hs);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Hs,JSON.stringify(s));return}else{const s=(o==null?void 0:o.isExtensionNew)??[],a=(o==null?void 0:o.extensionExpand)??[],i={[e]:{...o,...!n&&{isExtensionNew:[...new Set([...s,r])]},...n&&{extensionExpand:[...new Set([...a,r])]}}};localStorage.setItem(Hs,JSON.stringify(i));return}},tt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[e4])===!0:(e==null?void 0:e[t])===!0,rt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Dd=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?b4:y4,r&&e?(o.data_state=e==null?void 0:e.status,o.connector_names=(s=e==null?void 0:e.data)==null?void 0:s.connectorNames):e&&(o.data_state=(e==null?void 0:e.status)||"unknown_error"),o},Nd=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==Xi.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay={data:t}}else{const t=e.data.flatDisplay.data.filter(n=>Number(n.statusCode)!==Xi.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay.data=t}break;case"flat_with_list":e.data.listItems.fields=e.data.listItems.fields.map(t=>Array.isArray(t)?{data:t.sort((r,o)=>r.priority-o.priority)}:{data:t.data.sort((r,o)=>r.priority-o.priority),externalResourceId:t.externalResourceId});break}return e},I4=e=>{if(!e||Object.keys(e).length===0)return[];const t=new Set;return Object.values(e).forEach(n=>{n.connectorNames&&n.connectorNames.forEach(r=>t.add(r))}),Array.from(t)},Xs=({url:e,params:t})=>{const n=Object.entries(t).reduce((o,[s,a])=>(a!==void 0&&a!==""&&a!==null&&(o[s]=a),o),{}),r=new URL(e);return Object.entries(n).forEach(([o,s])=>{r.searchParams.set(o,s)}),r.toString()};function Rd(e,t){return e.length>t?e.substring(0,t)+"...":e}const _4=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1187_180)"},A.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1187_180"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),S4=e=>A.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_847_49587)"},A.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_847_49587"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),T4=u.keyframes`
36
36
  from {
37
37
  transform: translateY(-100%);
38
38
  opacity: 0;
@@ -49,7 +49,7 @@ React keys must be passed directly to JSX without using spread:
49
49
  height: 48px;
50
50
  padding-top: 20px;
51
51
  }
52
- `,T4=u.keyframes`
52
+ `,A4=u.keyframes`
53
53
  from {
54
54
  transform: translateY(0);
55
55
  opacity: 1;
@@ -93,7 +93,7 @@ React keys must be passed directly to JSX without using spread:
93
93
  pointer-events: auto;
94
94
  height: 48px;
95
95
  padding-top: 20px;
96
- animation: ${A4} 0.4s ease-in forwards;
96
+ animation: ${T4} 0.4s ease-in forwards;
97
97
  }
98
98
  `,O4=u.styled(u.Stack)`
99
99
  padding: 12px;
@@ -112,7 +112,7 @@ React keys must be passed directly to JSX without using spread:
112
112
  opacity: 0;
113
113
  display: none;
114
114
  pointer-events: none;
115
- animation: ${T4} 0.4s ease-in forwards;
115
+ animation: ${A4} 0.4s ease-in forwards;
116
116
  }
117
117
  `,F4=u.styled(u.IconButton)`
118
118
  position: absolute;
@@ -149,7 +149,7 @@ React keys must be passed directly to JSX without using spread:
149
149
  }
150
150
  `,N4=u.styled(u.Typography)`
151
151
  letter-spacing: 0.042px;
152
- `,R4=({rating:e,setRating:t,count:n=5})=>{const[r,o]=I.useState(e),s=r??e,a=l=>{t(l)},i=l=>{o(l)},c=()=>{o(0)};return d.jsx(k4,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const g=f<s;return d.jsx(D4,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:d.jsxs("div",{children:[d.jsx(S4,{width:"20px",height:"20px",style:{opacity:g?1:0,zIndex:g?2:1}}),d.jsx(_4,{width:"20px",height:"20px",style:{opacity:g?0:1,zIndex:g?1:2}})]})},f)})})},M4=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=I.useContext(We),{userGroupId:s,userId:a}=Xt()||{},i=Xs({url:gd,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[c,l]=I.useState(t),[f,g]=I.useState(!1),[y,v]=I.useState(0),b=()=>{r(Zi,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),Ts(a)},p=C=>{r(Zi,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:C});const x=Xs({url:t3,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(C)}});v(C),window.open(x,"_blank"),l(!1),Ts(a)},h=()=>{r(V3,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),g(!0),Ts(a)},m=()=>{f&&(l(!1),g(!1))};return d.jsxs(d.Fragment,{children:[d.jsxs(O4,{className:f||!c?"slide-down-out":"",onAnimationEnd:m,children:[d.jsxs(u.Stack,{width:"100%",direction:"row",gap:"8px",children:[d.jsx(Qm,{}),d.jsxs(u.Box,{width:"175px",children:[d.jsx(N4,{variant:"h3",children:Um}),d.jsx(R4,{rating:y,setRating:p})]})]}),d.jsx(u.Box,{position:"relative",children:d.jsx(u.Tooltip,{title:"Close",children:d.jsx(F4,{onClick:h,children:d.jsx($m,{width:"16px",height:"16px"})})})})]}),d.jsx(L4,{className:f||!c?"fade-in":"",children:d.jsxs(u.Button,{size:"small",variant:"outlined",color:"tertiary",href:i,target:"_blank",onClick:b,children:[d.jsx(qm,{}),Km]})})]})},P4="Need setup help?",j4="Expert setup assistance available! Book a 15 min call with our integration specialist.",B4="Schedule call",V4="https://calendar.app.google/V2cJcwKMV4ax9rpk9",Md="agent_panel",$i="hiver_schedule_call_close_button_click",G4=u.styled(u.Stack)`
152
+ `,R4=({rating:e,setRating:t,count:n=5})=>{const[r,o]=I.useState(e),s=r??e,a=l=>{t(l)},i=l=>{o(l)},c=()=>{o(0)};return d.jsx(k4,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const g=f<s;return d.jsx(D4,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:d.jsxs("div",{children:[d.jsx(S4,{width:"20px",height:"20px",style:{opacity:g?1:0,zIndex:g?2:1}}),d.jsx(_4,{width:"20px",height:"20px",style:{opacity:g?0:1,zIndex:g?1:2}})]})},f)})})},M4=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=I.useContext(He),{userGroupId:s,userId:a}=Xt()||{},i=Xs({url:gd,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[c,l]=I.useState(t),[f,g]=I.useState(!1),[y,v]=I.useState(0),b=()=>{r(Zi,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),As(a)},p=C=>{r(Zi,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:C});const x=Xs({url:t3,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(C)}});v(C),window.open(x,"_blank"),l(!1),As(a)},h=()=>{r(V3,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),g(!0),As(a)},m=()=>{f&&(l(!1),g(!1))};return d.jsxs(d.Fragment,{children:[d.jsxs(O4,{className:f||!c?"slide-down-out":"",onAnimationEnd:m,children:[d.jsxs(u.Stack,{width:"100%",direction:"row",gap:"8px",children:[d.jsx(Qm,{}),d.jsxs(u.Box,{width:"175px",children:[d.jsx(N4,{variant:"h3",children:Um}),d.jsx(R4,{rating:y,setRating:p})]})]}),d.jsx(u.Box,{position:"relative",children:d.jsx(u.Tooltip,{title:"Close",children:d.jsx(F4,{onClick:h,children:d.jsx($m,{width:"16px",height:"16px"})})})})]}),d.jsx(L4,{className:f||!c?"fade-in":"",children:d.jsxs(u.Button,{size:"small",variant:"outlined",color:"tertiary",href:i,target:"_blank",onClick:b,children:[d.jsx(qm,{}),Km]})})]})},P4="Need setup help?",j4="Expert setup assistance available! Book a 15 min call with our integration specialist.",B4="Schedule call",V4="https://calendar.app.google/V2cJcwKMV4ax9rpk9",Md="agent_panel",$i="hiver_schedule_call_close_button_click",G4=u.styled(u.Stack)`
153
153
  padding: 12px;
154
154
  width: 250px;
155
155
  min-height: 151px;
@@ -186,7 +186,7 @@ React keys must be passed directly to JSX without using spread:
186
186
  color: ${u.theme.palette.gray.black};
187
187
  `,Y4=u.styled(u.Typography)`
188
188
  color: ${u.theme.palette.gray.gray2};
189
- `,J4=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=I.useContext(We),[r,o]=I.useState(()=>!(localStorage.getItem($i)==="true")&&tt(e,U3));I.useEffect(()=>{localStorage.getItem($i)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem($i,"true"),o(!1),t(_3,{source:Md})},a=()=>{window.open(V4,"_blank"),t(I3,{source:Md})};return!r||!n?null:d.jsxs(G4,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[d.jsxs(H4,{gap:"4px",children:[d.jsxs(u.Stack,{direction:"row",justifyContent:"space-between",children:[d.jsx(z4,{variant:"body1_medium",children:P4}),d.jsx(u.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{children:d.jsx(Z4,{})})})})]}),d.jsx(Y4,{variant:"body2",children:j4})]}),d.jsx(u.Stack,{onClick:a,direction:"row",alignItems:"center",children:d.jsxs(W4,{variant:"outlined",size:"small",children:[d.jsx(X4,{}),B4]})})]})},q4="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4649_80352'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='21'%3e%3crect%20y='0.320312'%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4649_80352)'%3e%3cpath%20d='M9.16797%2014.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013%2018.654C8.84852%2018.654%207.76519%2018.4352%206.7513%2017.9977C5.73741%2017.5602%204.85547%2016.9665%204.10547%2016.2165C3.35547%2015.4665%202.76172%2014.5845%202.32422%2013.5706C1.88672%2012.5567%201.66797%2011.4734%201.66797%2010.3206C1.66797%209.16786%201.88672%208.08453%202.32422%207.07064C2.76172%206.05675%203.35547%205.1748%204.10547%204.4248C4.85547%203.6748%205.73741%203.08105%206.7513%202.64355C7.76519%202.20605%208.84852%201.9873%2010.0013%201.9873C11.1541%201.9873%2012.2374%202.20605%2013.2513%202.64355C14.2652%203.08105%2015.1471%203.6748%2015.8971%204.4248C16.6471%205.1748%2017.2409%206.05675%2017.6784%207.07064C18.1159%208.08453%2018.3346%209.16786%2018.3346%2010.3206C18.3346%2011.4734%2018.1159%2012.5567%2017.6784%2013.5706C17.2409%2014.5845%2016.6471%2015.4665%2015.8971%2016.2165C15.1471%2016.9665%2014.2652%2017.5602%2013.2513%2017.9977C12.2374%2018.4352%2011.1541%2018.654%2010.0013%2018.654ZM10.0013%2016.9873C11.8624%2016.9873%2013.4388%2016.3415%2014.7305%2015.0498C16.0221%2013.7581%2016.668%2012.1817%2016.668%2010.3206C16.668%208.45953%2016.0221%206.88314%2014.7305%205.59147C13.4388%204.2998%2011.8624%203.65397%2010.0013%203.65397C8.14019%203.65397%206.5638%204.2998%205.27214%205.59147C3.98047%206.88314%203.33464%208.45953%203.33464%2010.3206C3.33464%2012.1817%203.98047%2013.7581%205.27214%2015.0498C6.5638%2016.3415%208.14019%2016.9873%2010.0013%2016.9873Z'%20fill='%234D596C'/%3e%3c/g%3e%3c/svg%3e",Pd=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M15.505 1.84634C15.1241 1.46545 14.6074 1.25146 14.0688 1.25146C13.5301 1.25146 13.0134 1.46545 12.6325 1.84634L10.6244 3.85447C10.6108 3.3249 10.391 2.82156 10.0116 2.45179C9.63228 2.08203 9.12349 1.87508 8.59375 1.87509H3.90625C3.36753 1.87509 2.85087 2.0891 2.46994 2.47003C2.08901 2.85097 1.875 3.36762 1.875 3.90634V16.0938C1.875 16.6326 2.08901 17.1492 2.46994 17.5302C2.85087 17.9111 3.36753 18.1251 3.90625 18.1251H16.0938C16.6325 18.1251 17.1491 17.9111 17.5301 17.5302C17.911 17.1492 18.125 16.6326 18.125 16.0938V11.4063C18.125 10.8775 17.9189 10.3696 17.5503 9.99039C17.1817 9.6112 16.6798 9.39069 16.1512 9.37572L18.1569 7.37072C18.5378 6.98979 18.7518 6.47316 18.7518 5.93447C18.7518 5.39578 18.5378 4.87915 18.1569 4.49822L15.505 1.84634ZM11.985 9.37509H10.625V8.01509L11.985 9.37509ZM13.5162 2.73009C13.5888 2.65753 13.6749 2.59996 13.7697 2.56069C13.8645 2.52141 13.9661 2.5012 14.0688 2.5012C14.1714 2.5012 14.273 2.52141 14.3678 2.56069C14.4626 2.59996 14.5487 2.65753 14.6212 2.73009L17.2725 5.38197C17.3451 5.45452 17.4026 5.54065 17.4419 5.63545C17.4812 5.73025 17.5014 5.83186 17.5014 5.93447C17.5014 6.03708 17.4812 6.13869 17.4419 6.23349C17.4026 6.32829 17.3451 6.41442 17.2725 6.48697L14.6212 9.13822C14.5487 9.21079 14.4626 9.26835 14.3678 9.30763C14.273 9.3469 14.1714 9.36711 14.0688 9.36711C13.9661 9.36711 13.8645 9.3469 13.7697 9.30763C13.6749 9.26835 13.5888 9.21079 13.5162 9.13822L10.8644 6.48697C10.7918 6.41442 10.7342 6.32829 10.695 6.23349C10.6557 6.13869 10.6355 6.03708 10.6355 5.93447C10.6355 5.83186 10.6557 5.73025 10.695 5.63545C10.7342 5.54065 10.7918 5.45452 10.8644 5.38197L13.5162 2.73009ZM9.375 3.90634V9.37509H3.125V3.90634C3.125 3.47509 3.475 3.12509 3.90625 3.12509H8.59375C9.025 3.12509 9.375 3.47509 9.375 3.90634ZM3.125 16.0938V10.6251H9.375V16.8751H3.90625C3.475 16.8751 3.125 16.5251 3.125 16.0938ZM10.625 10.6251H16.0938C16.525 10.6251 16.875 10.9751 16.875 11.4063V16.0938C16.875 16.5251 16.525 16.8751 16.0938 16.8751H10.625V10.6251Z",fill:"#3E4C5A"}),T.createElement("rect",{x:10.877,y:5.90918,width:4.54545,height:4.54545,rx:1,transform:"rotate(-45 10.877 5.90918)",fill:"#FFE250"}),T.createElement("path",{d:"M3.77344 12.2727C3.77344 11.7204 4.22115 11.2727 4.77344 11.2727H7.77344C8.32572 11.2727 8.77344 11.7204 8.77344 12.2727V15.2727C8.77344 15.825 8.32572 16.2727 7.77344 16.2727H4.77344C4.22115 16.2727 3.77344 15.825 3.77344 15.2727L3.77344 12.2727Z",fill:"#FFE250"})),Q4="data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1012_80924)'%3e%3cpath%20d='M9.66663%2015.1202H11.3333V13.4535H9.66663V15.1202ZM10.5%201.78687C5.89996%201.78687%202.16663%205.5202%202.16663%2010.1202C2.16663%2014.7202%205.89996%2018.4535%2010.5%2018.4535C15.1%2018.4535%2018.8333%2014.7202%2018.8333%2010.1202C18.8333%205.5202%2015.1%201.78687%2010.5%201.78687ZM10.5%2016.7869C6.82496%2016.7869%203.83329%2013.7952%203.83329%2010.1202C3.83329%206.4452%206.82496%203.45353%2010.5%203.45353C14.175%203.45353%2017.1666%206.4452%2017.1666%2010.1202C17.1666%2013.7952%2014.175%2016.7869%2010.5%2016.7869ZM10.5%205.1202C8.65829%205.1202%207.16663%206.61187%207.16663%208.45353H8.83329C8.83329%207.53687%209.58329%206.78687%2010.5%206.78687C11.4166%206.78687%2012.1666%207.53687%2012.1666%208.45353C12.1666%2010.1202%209.66663%209.91187%209.66663%2012.6202H11.3333C11.3333%2010.7452%2013.8333%2010.5369%2013.8333%208.45353C13.8333%206.61187%2012.3416%205.1202%2010.5%205.1202Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1012_80924'%3e%3crect%20width='20'%20height='20'%20fill='white'%20transform='translate(0.5%200.120117)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",$4=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1727)"},T.createElement("path",{d:"M15 1.5H3C2.175 1.5 1.5 2.175 1.5 3V16.5L4.5 13.5H15C15.825 13.5 16.5 12.825 16.5 12V3C16.5 2.175 15.825 1.5 15 1.5ZM15 12H4.5L3 13.5V3H15V12ZM5.25 6.75H6.75V8.25H5.25V6.75ZM8.25 6.75H9.75V8.25H8.25V6.75ZM11.25 6.75H12.75V8.25H11.25V6.75Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1727"},T.createElement("rect",{width:18,height:18,fill:"white"})))),U4=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1720)"},T.createElement("path",{d:"M16.5 6.93L11.1075 6.465L9 1.5L6.8925 6.4725L1.5 6.93L5.595 10.4775L4.365 15.75L9 12.9525L13.635 15.75L12.4125 10.4775L16.5 6.93ZM9 11.55L6.18 13.2525L6.93 10.0425L4.44 7.8825L7.725 7.5975L9 4.575L10.2825 7.605L13.5675 7.89L11.0775 10.05L11.8275 13.26L9 11.55Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1720"},T.createElement("rect",{width:18,height:18,fill:"white"})))),K4="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.3462%208.73757C14.0406%208.43198%2013.5451%208.43198%2013.2395%208.73757C12.9339%209.04316%2012.9339%209.53863%2013.2395%209.84422L14.3462%208.73757ZM15.2392%2010.7372L15.7925%2010.1839L15.2392%2010.7372ZM16.2377%2013.1478L15.4552%2013.1478L16.2377%2013.1478ZM15.2392%2015.5584L14.6859%2015.0051L15.2392%2015.5584ZM10.418%2015.5584L9.86469%2016.1118L10.418%2015.5584ZM9.52499%2013.5588C9.2194%2013.2532%208.72393%2013.2532%208.41834%2013.5588C8.11275%2013.8643%208.11275%2014.3598%208.41834%2014.6654L9.52499%2013.5588ZM5.52477%2011.7731C5.83036%2012.0787%206.32583%2012.0787%206.63142%2011.7731C6.93701%2011.4675%206.93701%2010.972%206.63142%2010.6665L5.52477%2011.7731ZM9.45292%204.95224L10.0062%204.39892L9.45292%204.95224ZM10.346%206.95192C10.6515%207.25752%2011.147%207.25752%2011.4526%206.95192C11.7582%206.64633%2011.7582%206.15087%2011.4526%205.84527L10.346%206.95192ZM13.2395%209.84422L14.6859%2011.2906L15.7925%2010.1839L14.3462%208.73757L13.2395%209.84422ZM14.6859%2011.2906C15.1785%2011.7832%2015.4552%2012.4512%2015.4552%2013.1478L17.0202%2013.1478C17.0202%2012.0362%2016.5786%2010.97%2015.7925%2010.1839L14.6859%2011.2906ZM15.4552%2013.1478C15.4552%2013.8445%2015.1785%2014.5125%2014.6859%2015.0051L15.7925%2016.1118C16.5786%2015.3257%2017.0202%2014.2595%2017.0202%2013.1478L15.4552%2013.1478ZM14.6859%2015.0051C13.6601%2016.0308%2011.9971%2016.0308%2010.9713%2015.0051L9.86469%2016.1118C11.5016%2017.7487%2014.1556%2017.7487%2015.7925%2016.1118L14.6859%2015.0051ZM10.9713%2015.0051L9.52499%2013.5588L8.41834%2014.6654L9.86469%2016.1118L10.9713%2015.0051ZM6.63142%2010.6665L5.18507%209.2201L4.07842%2010.3268L5.52477%2011.7731L6.63142%2010.6665ZM5.18507%209.2201C4.69249%208.72752%204.41576%208.05944%204.41576%207.36283H2.85072C2.85072%208.47452%203.29234%209.54067%204.07842%2010.3268L5.18507%209.2201ZM4.41576%207.36283C4.41576%206.66622%204.69249%205.99815%205.18507%205.50557L4.07842%204.39892C3.29234%205.185%202.85072%206.25115%202.85072%207.36283H4.41576ZM5.18507%205.50557C6.21081%204.47983%207.87386%204.47983%208.8996%205.50557L10.0062%204.39892C8.36932%202.76199%205.71534%202.76199%204.07842%204.39892L5.18507%205.50557ZM8.8996%205.50557L10.346%206.95192L11.4526%205.84527L10.0062%204.39892L8.8996%205.50557Z'%20fill='%234D596C'/%3e%3crect%20x='6.36328'%20y='7.91895'%20width='1.66667'%20height='8.33333'%20rx='0.833333'%20transform='rotate(-45%206.36328%207.91895)'%20fill='%234D596C'/%3e%3c/svg%3e",e5=({options:e,anchor:t,open:n,onClose:r})=>d.jsx(u.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>d.jsxs(u.MenuItem,{onClick:o.onClick,children:[d.jsx(u.ListItemIcon,{children:o.icon}),o.label]},o.id))}),jd="connector-header-stuck",t5=u.styled(u.Stack)`
189
+ `,J4=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=I.useContext(He),[r,o]=I.useState(()=>!(localStorage.getItem($i)==="true")&&tt(e,U3));I.useEffect(()=>{localStorage.getItem($i)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem($i,"true"),o(!1),t(_3,{source:Md})},a=()=>{window.open(V4,"_blank"),t(I3,{source:Md})};return!r||!n?null:d.jsxs(G4,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[d.jsxs(H4,{gap:"4px",children:[d.jsxs(u.Stack,{direction:"row",justifyContent:"space-between",children:[d.jsx(z4,{variant:"body1_medium",children:P4}),d.jsx(u.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{children:d.jsx(Z4,{})})})})]}),d.jsx(Y4,{variant:"body2",children:j4})]}),d.jsx(u.Stack,{onClick:a,direction:"row",alignItems:"center",children:d.jsxs(W4,{variant:"outlined",size:"small",children:[d.jsx(X4,{}),B4]})})]})},q4="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4649_80352'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='21'%3e%3crect%20y='0.320312'%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4649_80352)'%3e%3cpath%20d='M9.16797%2014.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013%2018.654C8.84852%2018.654%207.76519%2018.4352%206.7513%2017.9977C5.73741%2017.5602%204.85547%2016.9665%204.10547%2016.2165C3.35547%2015.4665%202.76172%2014.5845%202.32422%2013.5706C1.88672%2012.5567%201.66797%2011.4734%201.66797%2010.3206C1.66797%209.16786%201.88672%208.08453%202.32422%207.07064C2.76172%206.05675%203.35547%205.1748%204.10547%204.4248C4.85547%203.6748%205.73741%203.08105%206.7513%202.64355C7.76519%202.20605%208.84852%201.9873%2010.0013%201.9873C11.1541%201.9873%2012.2374%202.20605%2013.2513%202.64355C14.2652%203.08105%2015.1471%203.6748%2015.8971%204.4248C16.6471%205.1748%2017.2409%206.05675%2017.6784%207.07064C18.1159%208.08453%2018.3346%209.16786%2018.3346%2010.3206C18.3346%2011.4734%2018.1159%2012.5567%2017.6784%2013.5706C17.2409%2014.5845%2016.6471%2015.4665%2015.8971%2016.2165C15.1471%2016.9665%2014.2652%2017.5602%2013.2513%2017.9977C12.2374%2018.4352%2011.1541%2018.654%2010.0013%2018.654ZM10.0013%2016.9873C11.8624%2016.9873%2013.4388%2016.3415%2014.7305%2015.0498C16.0221%2013.7581%2016.668%2012.1817%2016.668%2010.3206C16.668%208.45953%2016.0221%206.88314%2014.7305%205.59147C13.4388%204.2998%2011.8624%203.65397%2010.0013%203.65397C8.14019%203.65397%206.5638%204.2998%205.27214%205.59147C3.98047%206.88314%203.33464%208.45953%203.33464%2010.3206C3.33464%2012.1817%203.98047%2013.7581%205.27214%2015.0498C6.5638%2016.3415%208.14019%2016.9873%2010.0013%2016.9873Z'%20fill='%234D596C'/%3e%3c/g%3e%3c/svg%3e",Pd=e=>A.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M15.505 1.84634C15.1241 1.46545 14.6074 1.25146 14.0688 1.25146C13.5301 1.25146 13.0134 1.46545 12.6325 1.84634L10.6244 3.85447C10.6108 3.3249 10.391 2.82156 10.0116 2.45179C9.63228 2.08203 9.12349 1.87508 8.59375 1.87509H3.90625C3.36753 1.87509 2.85087 2.0891 2.46994 2.47003C2.08901 2.85097 1.875 3.36762 1.875 3.90634V16.0938C1.875 16.6326 2.08901 17.1492 2.46994 17.5302C2.85087 17.9111 3.36753 18.1251 3.90625 18.1251H16.0938C16.6325 18.1251 17.1491 17.9111 17.5301 17.5302C17.911 17.1492 18.125 16.6326 18.125 16.0938V11.4063C18.125 10.8775 17.9189 10.3696 17.5503 9.99039C17.1817 9.6112 16.6798 9.39069 16.1512 9.37572L18.1569 7.37072C18.5378 6.98979 18.7518 6.47316 18.7518 5.93447C18.7518 5.39578 18.5378 4.87915 18.1569 4.49822L15.505 1.84634ZM11.985 9.37509H10.625V8.01509L11.985 9.37509ZM13.5162 2.73009C13.5888 2.65753 13.6749 2.59996 13.7697 2.56069C13.8645 2.52141 13.9661 2.5012 14.0688 2.5012C14.1714 2.5012 14.273 2.52141 14.3678 2.56069C14.4626 2.59996 14.5487 2.65753 14.6212 2.73009L17.2725 5.38197C17.3451 5.45452 17.4026 5.54065 17.4419 5.63545C17.4812 5.73025 17.5014 5.83186 17.5014 5.93447C17.5014 6.03708 17.4812 6.13869 17.4419 6.23349C17.4026 6.32829 17.3451 6.41442 17.2725 6.48697L14.6212 9.13822C14.5487 9.21079 14.4626 9.26835 14.3678 9.30763C14.273 9.3469 14.1714 9.36711 14.0688 9.36711C13.9661 9.36711 13.8645 9.3469 13.7697 9.30763C13.6749 9.26835 13.5888 9.21079 13.5162 9.13822L10.8644 6.48697C10.7918 6.41442 10.7342 6.32829 10.695 6.23349C10.6557 6.13869 10.6355 6.03708 10.6355 5.93447C10.6355 5.83186 10.6557 5.73025 10.695 5.63545C10.7342 5.54065 10.7918 5.45452 10.8644 5.38197L13.5162 2.73009ZM9.375 3.90634V9.37509H3.125V3.90634C3.125 3.47509 3.475 3.12509 3.90625 3.12509H8.59375C9.025 3.12509 9.375 3.47509 9.375 3.90634ZM3.125 16.0938V10.6251H9.375V16.8751H3.90625C3.475 16.8751 3.125 16.5251 3.125 16.0938ZM10.625 10.6251H16.0938C16.525 10.6251 16.875 10.9751 16.875 11.4063V16.0938C16.875 16.5251 16.525 16.8751 16.0938 16.8751H10.625V10.6251Z",fill:"#3E4C5A"}),A.createElement("rect",{x:10.877,y:5.90918,width:4.54545,height:4.54545,rx:1,transform:"rotate(-45 10.877 5.90918)",fill:"#FFE250"}),A.createElement("path",{d:"M3.77344 12.2727C3.77344 11.7204 4.22115 11.2727 4.77344 11.2727H7.77344C8.32572 11.2727 8.77344 11.7204 8.77344 12.2727V15.2727C8.77344 15.825 8.32572 16.2727 7.77344 16.2727H4.77344C4.22115 16.2727 3.77344 15.825 3.77344 15.2727L3.77344 12.2727Z",fill:"#FFE250"})),Q4="data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1012_80924)'%3e%3cpath%20d='M9.66663%2015.1202H11.3333V13.4535H9.66663V15.1202ZM10.5%201.78687C5.89996%201.78687%202.16663%205.5202%202.16663%2010.1202C2.16663%2014.7202%205.89996%2018.4535%2010.5%2018.4535C15.1%2018.4535%2018.8333%2014.7202%2018.8333%2010.1202C18.8333%205.5202%2015.1%201.78687%2010.5%201.78687ZM10.5%2016.7869C6.82496%2016.7869%203.83329%2013.7952%203.83329%2010.1202C3.83329%206.4452%206.82496%203.45353%2010.5%203.45353C14.175%203.45353%2017.1666%206.4452%2017.1666%2010.1202C17.1666%2013.7952%2014.175%2016.7869%2010.5%2016.7869ZM10.5%205.1202C8.65829%205.1202%207.16663%206.61187%207.16663%208.45353H8.83329C8.83329%207.53687%209.58329%206.78687%2010.5%206.78687C11.4166%206.78687%2012.1666%207.53687%2012.1666%208.45353C12.1666%2010.1202%209.66663%209.91187%209.66663%2012.6202H11.3333C11.3333%2010.7452%2013.8333%2010.5369%2013.8333%208.45353C13.8333%206.61187%2012.3416%205.1202%2010.5%205.1202Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1012_80924'%3e%3crect%20width='20'%20height='20'%20fill='white'%20transform='translate(0.5%200.120117)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",$4=e=>A.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1329_1727)"},A.createElement("path",{d:"M15 1.5H3C2.175 1.5 1.5 2.175 1.5 3V16.5L4.5 13.5H15C15.825 13.5 16.5 12.825 16.5 12V3C16.5 2.175 15.825 1.5 15 1.5ZM15 12H4.5L3 13.5V3H15V12ZM5.25 6.75H6.75V8.25H5.25V6.75ZM8.25 6.75H9.75V8.25H8.25V6.75ZM11.25 6.75H12.75V8.25H11.25V6.75Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1329_1727"},A.createElement("rect",{width:18,height:18,fill:"white"})))),U4=e=>A.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1329_1720)"},A.createElement("path",{d:"M16.5 6.93L11.1075 6.465L9 1.5L6.8925 6.4725L1.5 6.93L5.595 10.4775L4.365 15.75L9 12.9525L13.635 15.75L12.4125 10.4775L16.5 6.93ZM9 11.55L6.18 13.2525L6.93 10.0425L4.44 7.8825L7.725 7.5975L9 4.575L10.2825 7.605L13.5675 7.89L11.0775 10.05L11.8275 13.26L9 11.55Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1329_1720"},A.createElement("rect",{width:18,height:18,fill:"white"})))),K4="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.3462%208.73757C14.0406%208.43198%2013.5451%208.43198%2013.2395%208.73757C12.9339%209.04316%2012.9339%209.53863%2013.2395%209.84422L14.3462%208.73757ZM15.2392%2010.7372L15.7925%2010.1839L15.2392%2010.7372ZM16.2377%2013.1478L15.4552%2013.1478L16.2377%2013.1478ZM15.2392%2015.5584L14.6859%2015.0051L15.2392%2015.5584ZM10.418%2015.5584L9.86469%2016.1118L10.418%2015.5584ZM9.52499%2013.5588C9.2194%2013.2532%208.72393%2013.2532%208.41834%2013.5588C8.11275%2013.8643%208.11275%2014.3598%208.41834%2014.6654L9.52499%2013.5588ZM5.52477%2011.7731C5.83036%2012.0787%206.32583%2012.0787%206.63142%2011.7731C6.93701%2011.4675%206.93701%2010.972%206.63142%2010.6665L5.52477%2011.7731ZM9.45292%204.95224L10.0062%204.39892L9.45292%204.95224ZM10.346%206.95192C10.6515%207.25752%2011.147%207.25752%2011.4526%206.95192C11.7582%206.64633%2011.7582%206.15087%2011.4526%205.84527L10.346%206.95192ZM13.2395%209.84422L14.6859%2011.2906L15.7925%2010.1839L14.3462%208.73757L13.2395%209.84422ZM14.6859%2011.2906C15.1785%2011.7832%2015.4552%2012.4512%2015.4552%2013.1478L17.0202%2013.1478C17.0202%2012.0362%2016.5786%2010.97%2015.7925%2010.1839L14.6859%2011.2906ZM15.4552%2013.1478C15.4552%2013.8445%2015.1785%2014.5125%2014.6859%2015.0051L15.7925%2016.1118C16.5786%2015.3257%2017.0202%2014.2595%2017.0202%2013.1478L15.4552%2013.1478ZM14.6859%2015.0051C13.6601%2016.0308%2011.9971%2016.0308%2010.9713%2015.0051L9.86469%2016.1118C11.5016%2017.7487%2014.1556%2017.7487%2015.7925%2016.1118L14.6859%2015.0051ZM10.9713%2015.0051L9.52499%2013.5588L8.41834%2014.6654L9.86469%2016.1118L10.9713%2015.0051ZM6.63142%2010.6665L5.18507%209.2201L4.07842%2010.3268L5.52477%2011.7731L6.63142%2010.6665ZM5.18507%209.2201C4.69249%208.72752%204.41576%208.05944%204.41576%207.36283H2.85072C2.85072%208.47452%203.29234%209.54067%204.07842%2010.3268L5.18507%209.2201ZM4.41576%207.36283C4.41576%206.66622%204.69249%205.99815%205.18507%205.50557L4.07842%204.39892C3.29234%205.185%202.85072%206.25115%202.85072%207.36283H4.41576ZM5.18507%205.50557C6.21081%204.47983%207.87386%204.47983%208.8996%205.50557L10.0062%204.39892C8.36932%202.76199%205.71534%202.76199%204.07842%204.39892L5.18507%205.50557ZM8.8996%205.50557L10.346%206.95192L11.4526%205.84527L10.0062%204.39892L8.8996%205.50557Z'%20fill='%234D596C'/%3e%3crect%20x='6.36328'%20y='7.91895'%20width='1.66667'%20height='8.33333'%20rx='0.833333'%20transform='rotate(-45%206.36328%207.91895)'%20fill='%234D596C'/%3e%3c/svg%3e",e5=({options:e,anchor:t,open:n,onClose:r})=>d.jsx(u.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>d.jsxs(u.MenuItem,{onClick:o.onClick,children:[d.jsx(u.ListItemIcon,{children:o.icon}),o.label]},o.id))}),jd="connector-header-stuck",t5=u.styled(u.Stack)`
190
190
  position: sticky;
191
191
  top: 0;
192
192
  box-sizing: content-box !important;
@@ -360,10 +360,10 @@ React keys must be passed directly to JSX without using spread:
360
360
  transform: rotate(135deg);
361
361
  }
362
362
  }
363
- `,Rn=u.styled(u.Skeleton)`
363
+ `,Dn=u.styled(u.Skeleton)`
364
364
  display: block;
365
365
  margin: ${e=>e.margin?e.margin:0};
366
- `,zr=u.styled(u.IconButton)`
366
+ `,Yr=u.styled(u.IconButton)`
367
367
  ${e=>e.disabled?"opacity: 0.5;":""}
368
368
  width: 32px;
369
369
  height: 32px;
@@ -497,13 +497,13 @@ React keys must be passed directly to JSX without using spread:
497
497
  background-color: #f0f3ff99;
498
498
  padding: 14px 12px 8px 12px;
499
499
  box-sizing: border-box;
500
- `,A5=u.styled(u.Box)`
500
+ `,T5=u.styled(u.Box)`
501
501
  margin-bottom: 12px;
502
502
  margin-top: 8px;
503
503
  li {
504
504
  display: list-item;
505
505
  }
506
- `,T5=u.styled(u.Stack)`
506
+ `,A5=u.styled(u.Stack)`
507
507
  margin-bottom: 6px;
508
508
  list-style-type: disc;
509
509
  margin-left: ${e=>e.marginLeft?`${e.marginLeft}`:"14px"};
@@ -543,7 +543,7 @@ React keys must be passed directly to JSX without using spread:
543
543
  width: calc(100% - 20px);
544
544
  display: inline-block;
545
545
  color: ${u.theme.palette.gray.gray2};
546
- `,R5=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:a})=>{const i=I.useRef(null),c=I.useRef(null),[l,f]=I.useState(null),g=!!l,{availableFeatures:y,sendTrackingEvent:v,currentSmIds:b,userEmail:p}=I.useContext(We),{userGroupId:h,userId:m}=Xt()||{},C=tt(y,Ws),x=[{id:"rate-experience",label:"Rate your experience",icon:d.jsx(U4,{}),onClick:()=>{f(null);const _=Xs({url:gd,params:{email:p,user_id:m,ug_id:h,sm_ids:b.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(_,"_blank"),v(Zi,{sm_ids:b,ug_id:h,connector_names:e,source:"help_drop_down"}),Ts(m)}},{id:"instant-chat",label:"Instant chat with support",icon:d.jsx($4,{}),onClick:()=>{f(null),window.open(r3,"_blank"),v(H3,{sm_ids:b,ug_id:h,connector_names:e,source:"help_drop_down"})}}],w=I.useCallback(_=>{const A=document.getElementById("connector-agent-container");if(!_||!A)return;c.current&&c.current.disconnect();const S=new IntersectionObserver(L=>{const k=i.current;for(const R of L)k==null||k.classList.toggle(jd,R.intersectionRatio===0)},{root:A});S.observe(_),c.current=S},[]),E=_=>{v(G3,{sm_ids:b,ug_id:h,connector_names:e}),f(_.currentTarget)};return d.jsxs(d.Fragment,{children:[d.jsx(n5,{ref:w}),d.jsx(e5,{options:x,anchor:l,open:g,onClose:()=>f(null)}),d.jsxs(t5,{ref:i,children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[C?d.jsx(Pd,{width:"20px",height:"20px"}):d.jsx(Bd,{}),d.jsx(Vd,{variant:"h2",children:C?Yi:wd})]}),d.jsxs(u.Stack,{direction:"row",children:[d.jsx(u.Tooltip,{title:e3,placement:"bottom",children:d.jsx(u.IconButton,{onClick:E,id:"help-button",sx:{height:"36px",width:"36px"},children:d.jsx("img",{src:Q4,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?d.jsxs(d.Fragment,{children:[r?d.jsx(u.Tooltip,{title:Td,placement:"bottom",children:d.jsx(u.IconButton,{onClick:a,sx:{height:"36px",width:"36px"},children:d.jsx("img",{src:K4,alt:"Link Task",height:"20px"})})}):null,n?d.jsx(u.Tooltip,{title:Ad,placement:"bottom",children:d.jsx(u.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:d.jsx("img",{src:q4,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var Ki={exports:{}},ec={};/**
546
+ `,R5=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:a})=>{const i=I.useRef(null),c=I.useRef(null),[l,f]=I.useState(null),g=!!l,{availableFeatures:y,sendTrackingEvent:v,currentSmIds:b,userEmail:p}=I.useContext(He),{userGroupId:h,userId:m}=Xt()||{},C=tt(y,Ws),x=[{id:"rate-experience",label:"Rate your experience",icon:d.jsx(U4,{}),onClick:()=>{f(null);const _=Xs({url:gd,params:{email:p,user_id:m,ug_id:h,sm_ids:b.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(_,"_blank"),v(Zi,{sm_ids:b,ug_id:h,connector_names:e,source:"help_drop_down"}),As(m)}},{id:"instant-chat",label:"Instant chat with support",icon:d.jsx($4,{}),onClick:()=>{f(null),window.open(r3,"_blank"),v(H3,{sm_ids:b,ug_id:h,connector_names:e,source:"help_drop_down"})}}],w=I.useCallback(_=>{const T=document.getElementById("connector-agent-container");if(!_||!T)return;c.current&&c.current.disconnect();const S=new IntersectionObserver(L=>{const R=i.current;for(const k of L)R==null||R.classList.toggle(jd,k.intersectionRatio===0)},{root:T});S.observe(_),c.current=S},[]),E=_=>{v(G3,{sm_ids:b,ug_id:h,connector_names:e}),f(_.currentTarget)};return d.jsxs(d.Fragment,{children:[d.jsx(n5,{ref:w}),d.jsx(e5,{options:x,anchor:l,open:g,onClose:()=>f(null)}),d.jsxs(t5,{ref:i,children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[C?d.jsx(Pd,{width:"20px",height:"20px"}):d.jsx(Bd,{}),d.jsx(Vd,{variant:"h2",children:C?Yi:wd})]}),d.jsxs(u.Stack,{direction:"row",children:[d.jsx(u.Tooltip,{title:e3,placement:"bottom",children:d.jsx(u.IconButton,{onClick:E,id:"help-button",sx:{height:"36px",width:"36px"},children:d.jsx("img",{src:Q4,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?d.jsxs(d.Fragment,{children:[r?d.jsx(u.Tooltip,{title:Ad,placement:"bottom",children:d.jsx(u.IconButton,{onClick:a,sx:{height:"36px",width:"36px"},children:d.jsx("img",{src:K4,alt:"Link Task",height:"20px"})})}):null,n?d.jsx(u.Tooltip,{title:Td,placement:"bottom",children:d.jsx(u.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:d.jsx("img",{src:q4,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var Ki={exports:{}},ec={};/**
547
547
  * @license React
548
548
  * use-sync-external-store-with-selector.production.min.js
549
549
  *
@@ -551,7 +551,7 @@ React keys must be passed directly to JSX without using spread:
551
551
  *
552
552
  * This source code is licensed under the MIT license found in the
553
553
  * LICENSE file in the root directory of this source tree.
554
- */var Xd;function M5(){if(Xd)return ec;Xd=1;var e=I;function t(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return ec.useSyncExternalStoreWithSelector=function(c,l,f,g,y){var v=o(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=a(function(){function h(E){if(!m){if(m=!0,C=E,E=g(E),y!==void 0&&b.hasValue){var _=b.value;if(y(_,E))return x=_}return x=E}if(_=x,n(C,E))return _;var A=g(E);return y!==void 0&&y(_,A)?_:(C=E,x=A)}var m=!1,C,x,w=f===void 0?null:f;return[function(){return h(l())},w===null?void 0:function(){return h(w())}]},[l,f,g,y]);var p=r(c,v[0],v[1]);return s(function(){b.hasValue=!0,b.value=p},[p]),i(p),p},ec}var tc={};/**
554
+ */var Xd;function M5(){if(Xd)return ec;Xd=1;var e=I;function t(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return ec.useSyncExternalStoreWithSelector=function(c,l,f,g,y){var v=o(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=a(function(){function h(E){if(!m){if(m=!0,C=E,E=g(E),y!==void 0&&b.hasValue){var _=b.value;if(y(_,E))return x=_}return x=E}if(_=x,n(C,E))return _;var T=g(E);return y!==void 0&&y(_,T)?_:(C=E,x=T)}var m=!1,C,x,w=f===void 0?null:f;return[function(){return h(l())},w===null?void 0:function(){return h(w())}]},[l,f,g,y]);var p=r(c,v[0],v[1]);return s(function(){b.hasValue=!0,b.value=p},[p]),i(p),p},ec}var tc={};/**
555
555
  * @license React
556
556
  * use-sync-external-store-with-selector.development.js
557
557
  *
@@ -559,30 +559,30 @@ React keys must be passed directly to JSX without using spread:
559
559
  *
560
560
  * This source code is licensed under the MIT license found in the
561
561
  * LICENSE file in the root directory of this source tree.
562
- */var zd;function P5(){return zd||(zd=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=I;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;function c(l,f,g,y,v){var b=o(null),p;b.current===null?(p={hasValue:!1,value:null},b.current=p):p=b.current;var h=a(function(){var w=!1,E,_,A=function(R){if(!w){w=!0,E=R;var N=y(R);if(v!==void 0&&p.hasValue){var M=p.value;if(v(M,N))return _=M,M}return _=N,N}var V=E,Z=_;if(n(V,R))return Z;var J=y(R);return v!==void 0&&v(Z,J)?Z:(E=R,_=J,J)},S=g===void 0?null:g,L=function(){return A(f())},k=S===null?void 0:function(){return A(S())};return[L,k]},[f,g,y,v]),m=h[0],C=h[1],x=r(l,m,C);return s(function(){p.hasValue=!0,p.value=x},[x]),i(x),x}tc.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),tc}process.env.NODE_ENV==="production"?Ki.exports=M5():Ki.exports=P5();var j5=Ki.exports,At="default"in T?T.default:T,Yd=Symbol.for("react-redux-context"),Jd=typeof globalThis<"u"?globalThis:{};function B5(){if(!At.createContext)return{};const e=Jd[Yd]??(Jd[Yd]=new Map);let t=e.get(At.createContext);return t||(t=At.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(At.createContext,t)),t}var Mn=B5(),V5=()=>{throw new Error("uSES not initialized!")};function nc(e=Mn){return function(){const n=At.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var qd=nc(),Qd=V5,G5=e=>{Qd=e},H5=(e,t)=>e===t;function W5(e=Mn){const t=e===Mn?qd:nc(e),n=(r,o={})=>{const{equalityFn:s=H5,devModeChecks:a={}}=typeof o=="function"?{equalityFn:o}:o;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof s!="function")throw new Error("You must pass a function as an equality function to useSelector")}const{store:i,subscription:c,getServerState:l,stabilityCheck:f,identityFunctionCheck:g}=t(),y=At.useRef(!0),v=At.useCallback({[r.name](p){const h=r(p);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:m,stabilityCheck:C}={stabilityCheck:f,identityFunctionCheck:g,...a};if(C==="always"||C==="once"&&y.current){const x=r(p);if(!s(h,x)){let w;try{throw new Error}catch(E){({stack:w}=E)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
562
+ */var zd;function P5(){return zd||(zd=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=I;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;function c(l,f,g,y,v){var b=o(null),p;b.current===null?(p={hasValue:!1,value:null},b.current=p):p=b.current;var h=a(function(){var w=!1,E,_,T=function(k){if(!w){w=!0,E=k;var D=y(k);if(v!==void 0&&p.hasValue){var M=p.value;if(v(M,D))return _=M,M}return _=D,D}var G=E,Y=_;if(n(G,k))return Y;var X=y(k);return v!==void 0&&v(Y,X)?Y:(E=k,_=X,X)},S=g===void 0?null:g,L=function(){return T(f())},R=S===null?void 0:function(){return T(S())};return[L,R]},[f,g,y,v]),m=h[0],C=h[1],x=r(l,m,C);return s(function(){p.hasValue=!0,p.value=x},[x]),i(x),x}tc.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),tc}process.env.NODE_ENV==="production"?Ki.exports=M5():Ki.exports=P5();var j5=Ki.exports,Lt="default"in A?A.default:A,Yd=Symbol.for("react-redux-context"),Jd=typeof globalThis<"u"?globalThis:{};function B5(){if(!Lt.createContext)return{};const e=Jd[Yd]??(Jd[Yd]=new Map);let t=e.get(Lt.createContext);return t||(t=Lt.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(Lt.createContext,t)),t}var Nn=B5(),V5=()=>{throw new Error("uSES not initialized!")};function nc(e=Nn){return function(){const n=Lt.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var qd=nc(),Qd=V5,G5=e=>{Qd=e},H5=(e,t)=>e===t;function W5(e=Nn){const t=e===Nn?qd:nc(e),n=(r,o={})=>{const{equalityFn:s=H5,devModeChecks:a={}}=typeof o=="function"?{equalityFn:o}:o;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof s!="function")throw new Error("You must pass a function as an equality function to useSelector")}const{store:i,subscription:c,getServerState:l,stabilityCheck:f,identityFunctionCheck:g}=t(),y=Lt.useRef(!0),v=Lt.useCallback({[r.name](p){const h=r(p);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:m,stabilityCheck:C}={stabilityCheck:f,identityFunctionCheck:g,...a};if(C==="always"||C==="once"&&y.current){const x=r(p);if(!s(h,x)){let w;try{throw new Error}catch(E){({stack:w}=E)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
563
563
  Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,{state:p,selected:h,selected2:x,stack:w})}}if((m==="always"||m==="once"&&y.current)&&h===p){let x;try{throw new Error}catch(w){({stack:x}=w)}console.warn("Selector "+(r.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
564
- Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:x})}y.current&&(y.current=!1)}return h}}[r.name],[r,f,a.stabilityCheck]),b=Qd(c.addNestedSub,i.getState,l||i.getState,v,s);return At.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var Z5=W5();function X5(e){e()}function z5(){let e=null,t=null;return{clear(){e=null,t=null},notify(){X5(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var $d={notify(){},get:()=>[]};function Y5(e,t){let n,r=$d,o=0,s=!1;function a(p){f();const h=r.subscribe(p);let m=!1;return()=>{m||(m=!0,h(),g())}}function i(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=z5())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=$d)}function y(){s||(s=!0,f())}function v(){s&&(s=!1,g())}const b={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:y,tryUnsubscribe:v,getListeners:()=>r};return b}var J5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q5=typeof navigator<"u"&&navigator.product==="ReactNative",Q5=J5||q5?At.useLayoutEffect:At.useEffect;function $5({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=At.useMemo(()=>{const l=Y5(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=At.useMemo(()=>e.getState(),[e]);Q5(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]);const c=t||Mn;return At.createElement(c.Provider,{value:a},n)}var rc=$5;function Ud(e=Mn){const t=e===Mn?qd:nc(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var U5=Ud();function K5(e=Mn){const t=e===Mn?U5:Ud(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var eb=K5();G5(j5.useSyncExternalStoreWithSelector);const zt=eb.withTypes(),Ce=Z5.withTypes(),Pe={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},te={IDLE:"idle",LOADING:"loading",FAILED:"failed"},tb="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.7%209.71005L6.19497%207.20503C5.92161%206.93166%205.47839%206.93166%205.20503%207.20503C4.93166%207.47839%204.93166%207.92161%205.20503%208.19497L8.20503%2011.195C8.47839%2011.4683%208.92161%2011.4683%209.19497%2011.195L12.195%208.19497C12.4683%207.92161%2012.4683%207.47839%2012.195%207.20503C11.9216%206.93166%2011.4784%206.93166%2011.205%207.20503L8.7%209.71005Z'%20fill='%23196FE0'/%3e%3c/svg%3e",Kd="Show more",nb="Show less",rb="Show preview",ob="Hide preview",sb="Select email";function at(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ab=typeof Symbol=="function"&&Symbol.observable||"@@observable",e0=ab,oc=()=>Math.random().toString(36).substring(7).split("").join("."),ib={INIT:`@@redux/INIT${oc()}`,REPLACE:`@@redux/REPLACE${oc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${oc()}`},dr=ib;function Go(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function cb(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(db(e))return"date";if(ub(e))return"error";const n=lb(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function lb(e){return typeof e.constructor=="function"?e.constructor.name:null}function ub(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function db(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Pn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=cb(e)),t}function t0(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?at(2):`Expected the root reducer to be a function. Instead, received: '${Pn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?at(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?at(1):`Expected the enhancer to be a function. Instead, received: '${Pn(n)}'`);return n(t0)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((h,m)=>{a.set(m,h)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?at(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?at(4):`Expected the listener to be a function. Instead, received: '${Pn(h)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?at(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;l();const C=i++;return a.set(C,h),function(){if(m){if(c)throw new Error(process.env.NODE_ENV==="production"?at(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,l(),a.delete(C),s=null}}}function y(h){if(!Go(h))throw new Error(process.env.NODE_ENV==="production"?at(7):`Actions must be plain objects. Instead, the actual type was: '${Pn(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?at(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?at(17):`Action "type" property must be a string. Instead, the actual type was: '${Pn(h.type)}'. Value was: '${h.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?at(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,h)}finally{c=!1}return(s=a).forEach(C=>{C()}),h}function v(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?at(10):`Expected the nextReducer to be a function. Instead, received: '${Pn(h)}`);r=h,y({type:dr.REPLACE})}function b(){const h=g;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?at(11):`Expected the observer to be an object. Instead, received: '${Pn(m)}'`);function C(){const w=m;w.next&&w.next(f())}return C(),{unsubscribe:h(C)}},[e0](){return this}}}return y({type:dr.INIT}),{dispatch:y,subscribe:g,getState:f,replaceReducer:v,[e0]:b}}function n0(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function fb(e,t,n,r){const o=Object.keys(t),s=n&&n.type===dr.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Go(e))return`The ${s} has unexpected type of "${Pn(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(i=>!t.hasOwnProperty(i)&&!r[i]);if(a.forEach(i=>{r[i]=!0}),!(n&&n.type===dr.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function pb(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:dr.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?at(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:dr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?at(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${dr.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function r0(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const i=t[a];process.env.NODE_ENV!=="production"&&typeof e[i]>"u"&&n0(`No reducer provided for key "${i}"`),typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let s;try{pb(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=fb(i,n,c,o);g&&n0(g)}let l=!1;const f={};for(let g=0;g<r.length;g++){const y=r[g],v=n[y],b=i[y],p=v(b,c);if(typeof p>"u"){const h=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?at(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${y}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}f[y]=p,l=l||p!==b}return l=l||r.length!==Object.keys(i).length,l?f:i}}function zs(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function hb(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?at(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(c,...l)=>s(c,...l)},i=e.map(c=>c(a));return s=zs(...i)(o.dispatch),{...o,dispatch:s}}}function o0(e){return Go(e)&&"type"in e&&typeof e.type=="string"}var s0=Symbol.for("immer-nothing"),a0=Symbol.for("immer-draftable"),Tt=Symbol.for("immer-state"),gb=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function mt(e,...t){if(process.env.NODE_ENV!=="production"){const n=gb[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Yr=Object.getPrototypeOf;function fr(e){return!!e&&!!e[Tt]}function Cn(e){var t;return e?i0(e)||Array.isArray(e)||!!e[a0]||!!((t=e.constructor)!=null&&t[a0])||qs(e)||Qs(e):!1}var mb=Object.prototype.constructor.toString();function i0(e){if(!e||typeof e!="object")return!1;const t=Yr(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===mb}function Ys(e,t){Js(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Js(e){const t=e[Tt];return t?t.type_:Array.isArray(e)?1:qs(e)?2:Qs(e)?3:0}function sc(e,t){return Js(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c0(e,t,n){const r=Js(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function bb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qs(e){return e instanceof Map}function Qs(e){return e instanceof Set}function pr(e){return e.copy_||e.base_}function ac(e,t){if(qs(e))return new Map(e);if(Qs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=i0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Tt];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const a=o[s],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Yr(e),r)}else{const r=Yr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function ic(e,t=!1){return $s(e)||fr(e)||!Cn(e)||(Js(e)>1&&(e.set=e.add=e.clear=e.delete=yb),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ic(r,!0))),e}function yb(){mt(2)}function $s(e){return Object.isFrozen(e)}var Cb={};function hr(e){const t=Cb[e];return t||mt(0,e),t}var Ho;function l0(){return Ho}function xb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function u0(e,t){t&&(hr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cc(e){lc(e),e.drafts_.forEach(vb),e.drafts_=null}function lc(e){e===Ho&&(Ho=e.parent_)}function d0(e){return Ho=xb(Ho,e)}function vb(e){const t=e[Tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function f0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Tt].modified_&&(cc(t),mt(4)),Cn(e)&&(e=Us(t,e),t.parent_||Ks(t,e)),t.patches_&&hr("Patches").generateReplacementPatches_(n[Tt].base_,e,t.patches_,t.inversePatches_)):e=Us(t,n,[]),cc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==s0?e:void 0}function Us(e,t,n){if($s(t))return t;const r=t[Tt];if(!r)return Ys(t,(o,s)=>p0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ks(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,a=!1;r.type_===3&&(s=new Set(o),o.clear(),a=!0),Ys(s,(i,c)=>p0(e,r,o,i,c,n,a)),Ks(e,o,!1),n&&e.patches_&&hr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function p0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&mt(5),fr(o)){const i=s&&t&&t.type_!==3&&!sc(t.assigned_,r)?s.concat(r):void 0,c=Us(e,o,i);if(c0(n,r,c),fr(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(Cn(o)&&!$s(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Us(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ks(e,o)}}function Ks(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ic(t,n)}function Eb(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:l0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=uc;n&&(o=[r],s=Wo);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var uc={get(e,t){if(t===Tt)return e;const n=pr(e);if(!sc(n,t))return wb(e,n,t);const r=n[t];return e.finalized_||!Cn(r)?r:r===dc(e.base_,t)?(pc(e),e.copy_[t]=hc(r,e)):r},has(e,t){return t in pr(e)},ownKeys(e){return Reflect.ownKeys(pr(e))},set(e,t,n){const r=h0(pr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=dc(pr(e),t),s=o==null?void 0:o[Tt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(bb(n,o)&&(n!==void 0||sc(e.base_,t)))return!0;pc(e),fc(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return dc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,pc(e),fc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=pr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){mt(11)},getPrototypeOf(e){return Yr(e.base_)},setPrototypeOf(){mt(12)}},Wo={};Ys(uc,(e,t)=>{Wo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Wo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&mt(13),Wo.set.call(this,e,t,void 0)},Wo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&mt(14),uc.set.call(this,e[0],t,n,e[0])};function dc(e,t){const n=e[Tt];return(n?pr(n):e)[t]}function wb(e,t,n){var o;const r=h0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function h0(e,t){if(!(t in e))return;let n=Yr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Yr(n)}}function fc(e){e.modified_||(e.modified_=!0,e.parent_&&fc(e.parent_))}function pc(e){e.copy_||(e.copy_=ac(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ib=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(c=s,...l){return a.produce(c,f=>n.call(this,f,...l))}}typeof n!="function"&&mt(6),r!==void 0&&typeof r!="function"&&mt(7);let o;if(Cn(t)){const s=d0(this),a=hc(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?cc(s):lc(s)}return u0(s,r),f0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===s0&&(o=void 0),this.autoFreeze_&&ic(o,!0),r){const s=[],a=[];hr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else mt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...i)=>this.produceWithPatches(a,c=>t(c,...i));let r,o;return[this.produce(t,n,(a,i)=>{r=a,o=i}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Cn(e)||mt(8),fr(e)&&(e=_b(e));const t=d0(this),n=hc(e,void 0);return n[Tt].isManual_=!0,lc(t),n}finishDraft(e,t){const n=e&&e[Tt];(!n||!n.isManual_)&&mt(9);const{scope_:r}=n;return u0(r,t),f0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=hr("Patches").applyPatches_;return fr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function hc(e,t){const n=qs(e)?hr("MapSet").proxyMap_(e,t):Qs(e)?hr("MapSet").proxySet_(e,t):Eb(e,t);return(t?t.scope_:l0()).drafts_.push(n),n}function _b(e){return fr(e)||mt(10,e),g0(e)}function g0(e){if(!Cn(e)||$s(e))return e;const t=e[Tt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ac(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ac(e,!0);return Ys(n,(r,o)=>{c0(n,r,g0(o))}),t&&(t.finalized_=!1),n}var Lt=new Ib,m0=Lt.produce;Lt.produceWithPatches.bind(Lt),Lt.setAutoFreeze.bind(Lt),Lt.setUseStrictShallowCopy.bind(Lt),Lt.applyPatches.bind(Lt),Lt.createDraft.bind(Lt),Lt.finishDraft.bind(Lt);var Sb=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
564
+ Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:x})}y.current&&(y.current=!1)}return h}}[r.name],[r,f,a.stabilityCheck]),b=Qd(c.addNestedSub,i.getState,l||i.getState,v,s);return Lt.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var Z5=W5();function X5(e){e()}function z5(){let e=null,t=null;return{clear(){e=null,t=null},notify(){X5(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var $d={notify(){},get:()=>[]};function Y5(e,t){let n,r=$d,o=0,s=!1;function a(p){f();const h=r.subscribe(p);let m=!1;return()=>{m||(m=!0,h(),g())}}function i(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=z5())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=$d)}function y(){s||(s=!0,f())}function v(){s&&(s=!1,g())}const b={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:y,tryUnsubscribe:v,getListeners:()=>r};return b}var J5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q5=typeof navigator<"u"&&navigator.product==="ReactNative",Q5=J5||q5?Lt.useLayoutEffect:Lt.useEffect;function $5({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=Lt.useMemo(()=>{const l=Y5(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=Lt.useMemo(()=>e.getState(),[e]);Q5(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]);const c=t||Nn;return Lt.createElement(c.Provider,{value:a},n)}var rc=$5;function Ud(e=Nn){const t=e===Nn?qd:nc(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var U5=Ud();function K5(e=Nn){const t=e===Nn?U5:Ud(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var eb=K5();G5(j5.useSyncExternalStoreWithSelector);const zt=eb.withTypes(),Ce=Z5.withTypes(),Pe={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},ee={IDLE:"idle",LOADING:"loading",FAILED:"failed"},tb="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.7%209.71005L6.19497%207.20503C5.92161%206.93166%205.47839%206.93166%205.20503%207.20503C4.93166%207.47839%204.93166%207.92161%205.20503%208.19497L8.20503%2011.195C8.47839%2011.4683%208.92161%2011.4683%209.19497%2011.195L12.195%208.19497C12.4683%207.92161%2012.4683%207.47839%2012.195%207.20503C11.9216%206.93166%2011.4784%206.93166%2011.205%207.20503L8.7%209.71005Z'%20fill='%23196FE0'/%3e%3c/svg%3e",Kd="Show more",nb="Show less",rb="Show preview",ob="Hide preview",sb="Select email";function ot(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ab=typeof Symbol=="function"&&Symbol.observable||"@@observable",e0=ab,oc=()=>Math.random().toString(36).substring(7).split("").join("."),ib={INIT:`@@redux/INIT${oc()}`,REPLACE:`@@redux/REPLACE${oc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${oc()}`},lr=ib;function Wo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function cb(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(db(e))return"date";if(ub(e))return"error";const n=lb(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function lb(e){return typeof e.constructor=="function"?e.constructor.name:null}function ub(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function db(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Rn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=cb(e)),t}function t0(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ot(2):`Expected the root reducer to be a function. Instead, received: '${Rn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ot(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?ot(1):`Expected the enhancer to be a function. Instead, received: '${Rn(n)}'`);return n(t0)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((h,m)=>{a.set(m,h)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?ot(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?ot(4):`Expected the listener to be a function. Instead, received: '${Rn(h)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?ot(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;l();const C=i++;return a.set(C,h),function(){if(m){if(c)throw new Error(process.env.NODE_ENV==="production"?ot(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,l(),a.delete(C),s=null}}}function y(h){if(!Wo(h))throw new Error(process.env.NODE_ENV==="production"?ot(7):`Actions must be plain objects. Instead, the actual type was: '${Rn(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?ot(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?ot(17):`Action "type" property must be a string. Instead, the actual type was: '${Rn(h.type)}'. Value was: '${h.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?ot(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,h)}finally{c=!1}return(s=a).forEach(C=>{C()}),h}function v(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?ot(10):`Expected the nextReducer to be a function. Instead, received: '${Rn(h)}`);r=h,y({type:lr.REPLACE})}function b(){const h=g;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?ot(11):`Expected the observer to be an object. Instead, received: '${Rn(m)}'`);function C(){const w=m;w.next&&w.next(f())}return C(),{unsubscribe:h(C)}},[e0](){return this}}}return y({type:lr.INIT}),{dispatch:y,subscribe:g,getState:f,replaceReducer:v,[e0]:b}}function n0(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function fb(e,t,n,r){const o=Object.keys(t),s=n&&n.type===lr.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Wo(e))return`The ${s} has unexpected type of "${Rn(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(i=>!t.hasOwnProperty(i)&&!r[i]);if(a.forEach(i=>{r[i]=!0}),!(n&&n.type===lr.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function pb(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:lr.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?ot(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:lr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?ot(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${lr.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function r0(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const i=t[a];process.env.NODE_ENV!=="production"&&typeof e[i]>"u"&&n0(`No reducer provided for key "${i}"`),typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let s;try{pb(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=fb(i,n,c,o);g&&n0(g)}let l=!1;const f={};for(let g=0;g<r.length;g++){const y=r[g],v=n[y],b=i[y],p=v(b,c);if(typeof p>"u"){const h=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?ot(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${y}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}f[y]=p,l=l||p!==b}return l=l||r.length!==Object.keys(i).length,l?f:i}}function zs(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function hb(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?ot(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(c,...l)=>s(c,...l)},i=e.map(c=>c(a));return s=zs(...i)(o.dispatch),{...o,dispatch:s}}}function o0(e){return Wo(e)&&"type"in e&&typeof e.type=="string"}var s0=Symbol.for("immer-nothing"),a0=Symbol.for("immer-draftable"),Ot=Symbol.for("immer-state"),gb=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function bt(e,...t){if(process.env.NODE_ENV!=="production"){const n=gb[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jr=Object.getPrototypeOf;function ur(e){return!!e&&!!e[Ot]}function Cn(e){var t;return e?i0(e)||Array.isArray(e)||!!e[a0]||!!((t=e.constructor)!=null&&t[a0])||qs(e)||Qs(e):!1}var mb=Object.prototype.constructor.toString();function i0(e){if(!e||typeof e!="object")return!1;const t=Jr(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===mb}function Ys(e,t){Js(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Js(e){const t=e[Ot];return t?t.type_:Array.isArray(e)?1:qs(e)?2:Qs(e)?3:0}function sc(e,t){return Js(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c0(e,t,n){const r=Js(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function bb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qs(e){return e instanceof Map}function Qs(e){return e instanceof Set}function dr(e){return e.copy_||e.base_}function ac(e,t){if(qs(e))return new Map(e);if(Qs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=i0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ot];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const a=o[s],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Jr(e),r)}else{const r=Jr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function ic(e,t=!1){return $s(e)||ur(e)||!Cn(e)||(Js(e)>1&&(e.set=e.add=e.clear=e.delete=yb),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ic(r,!0))),e}function yb(){bt(2)}function $s(e){return Object.isFrozen(e)}var Cb={};function fr(e){const t=Cb[e];return t||bt(0,e),t}var Zo;function l0(){return Zo}function xb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function u0(e,t){t&&(fr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cc(e){lc(e),e.drafts_.forEach(vb),e.drafts_=null}function lc(e){e===Zo&&(Zo=e.parent_)}function d0(e){return Zo=xb(Zo,e)}function vb(e){const t=e[Ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function f0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ot].modified_&&(cc(t),bt(4)),Cn(e)&&(e=Us(t,e),t.parent_||Ks(t,e)),t.patches_&&fr("Patches").generateReplacementPatches_(n[Ot].base_,e,t.patches_,t.inversePatches_)):e=Us(t,n,[]),cc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==s0?e:void 0}function Us(e,t,n){if($s(t))return t;const r=t[Ot];if(!r)return Ys(t,(o,s)=>p0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ks(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,a=!1;r.type_===3&&(s=new Set(o),o.clear(),a=!0),Ys(s,(i,c)=>p0(e,r,o,i,c,n,a)),Ks(e,o,!1),n&&e.patches_&&fr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function p0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&bt(5),ur(o)){const i=s&&t&&t.type_!==3&&!sc(t.assigned_,r)?s.concat(r):void 0,c=Us(e,o,i);if(c0(n,r,c),ur(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(Cn(o)&&!$s(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Us(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ks(e,o)}}function Ks(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ic(t,n)}function Eb(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:l0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=uc;n&&(o=[r],s=Xo);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var uc={get(e,t){if(t===Ot)return e;const n=dr(e);if(!sc(n,t))return wb(e,n,t);const r=n[t];return e.finalized_||!Cn(r)?r:r===dc(e.base_,t)?(pc(e),e.copy_[t]=hc(r,e)):r},has(e,t){return t in dr(e)},ownKeys(e){return Reflect.ownKeys(dr(e))},set(e,t,n){const r=h0(dr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=dc(dr(e),t),s=o==null?void 0:o[Ot];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(bb(n,o)&&(n!==void 0||sc(e.base_,t)))return!0;pc(e),fc(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return dc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,pc(e),fc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=dr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){bt(11)},getPrototypeOf(e){return Jr(e.base_)},setPrototypeOf(){bt(12)}},Xo={};Ys(uc,(e,t)=>{Xo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&bt(13),Xo.set.call(this,e,t,void 0)},Xo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&bt(14),uc.set.call(this,e[0],t,n,e[0])};function dc(e,t){const n=e[Ot];return(n?dr(n):e)[t]}function wb(e,t,n){var o;const r=h0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function h0(e,t){if(!(t in e))return;let n=Jr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Jr(n)}}function fc(e){e.modified_||(e.modified_=!0,e.parent_&&fc(e.parent_))}function pc(e){e.copy_||(e.copy_=ac(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ib=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(c=s,...l){return a.produce(c,f=>n.call(this,f,...l))}}typeof n!="function"&&bt(6),r!==void 0&&typeof r!="function"&&bt(7);let o;if(Cn(t)){const s=d0(this),a=hc(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?cc(s):lc(s)}return u0(s,r),f0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===s0&&(o=void 0),this.autoFreeze_&&ic(o,!0),r){const s=[],a=[];fr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else bt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...i)=>this.produceWithPatches(a,c=>t(c,...i));let r,o;return[this.produce(t,n,(a,i)=>{r=a,o=i}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Cn(e)||bt(8),ur(e)&&(e=_b(e));const t=d0(this),n=hc(e,void 0);return n[Ot].isManual_=!0,lc(t),n}finishDraft(e,t){const n=e&&e[Ot];(!n||!n.isManual_)&&bt(9);const{scope_:r}=n;return u0(r,t),f0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=fr("Patches").applyPatches_;return ur(e)?r(e,t):this.produce(e,o=>r(o,t))}};function hc(e,t){const n=qs(e)?fr("MapSet").proxyMap_(e,t):Qs(e)?fr("MapSet").proxySet_(e,t):Eb(e,t);return(t?t.scope_:l0()).drafts_.push(n),n}function _b(e){return ur(e)||bt(10,e),g0(e)}function g0(e){if(!Cn(e)||$s(e))return e;const t=e[Ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ac(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ac(e,!0);return Ys(n,(r,o)=>{c0(n,r,g0(o))}),t&&(t.finalized_=!1),n}var Ft=new Ib,m0=Ft.produce;Ft.produceWithPatches.bind(Ft),Ft.setAutoFreeze.bind(Ft),Ft.setUseStrictShallowCopy.bind(Ft),Ft.applyPatches.bind(Ft),Ft.createDraft.bind(Ft),Ft.finishDraft.bind(Ft);var Sb=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
565
565
  \`createSelector([state => state.todos], todos => todos)\`
566
566
  This could lead to inefficient memoization and unnecessary re-renders.
567
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},Ab=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=r(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let l;try{throw new Error}catch(f){({stack:l}=f)}console.warn(`An input selector returned a different result when passed same arguments.
567
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},Tb=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=r(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let l;try{throw new Error}catch(f){({stack:l}=f)}console.warn(`An input selector returned a different result when passed same arguments.
568
568
  This means your output selector will likely run more frequently than intended.
569
569
  Avoid returning a new reference inside your input selector, e.g.
570
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:l})}},Tb={inputStabilityCheck:"once",identityFunctionCheck:"once"};function Lb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Ob(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Fb(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var b0=e=>Array.isArray(e)?e:[e];function kb(e){const t=Array.isArray(e[0])?e[0]:e;return Fb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function y0(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Db=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Tb,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Sb},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:Ab}}},Nb=class{constructor(e){this.value=e}deref(){return this.value}},Rb=typeof WeakRef<"u"?WeakRef:Nb,Mb=0,C0=1;function ea(){return{s:Mb,v:void 0,o:null,p:null}}function x0(e,t={}){let n=ea();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var g;let i=n;const{length:c}=arguments;for(let y=0,v=c;y<v;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let p=i.o;p===null&&(i.o=p=new WeakMap);const h=p.get(b);h===void 0?(i=ea(),p.set(b,i)):i=h}else{let p=i.p;p===null&&(i.p=p=new Map);const h=p.get(b);h===void 0?(i=ea(),p.set(b,i)):i=h}}const l=i;let f;if(i.s===C0)f=i.v;else if(f=e.apply(null,arguments),s++,r){const y=((g=o==null?void 0:o.deref)==null?void 0:g.call(o))??o;y!=null&&r(y,f)&&(f=y,s!==0&&s--),o=typeof f=="object"&&f!==null||typeof f=="function"?new Rb(f):f}return l.s=C0,l.v=f,f}return a.clearCache=()=>{n=ea(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Pb(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,a=0,i,c={},l=o.pop();typeof l=="object"&&(c=l,l=o.pop()),Lb(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const f={...n,...c},{memoize:g,memoizeOptions:y=[],argsMemoize:v=x0,argsMemoizeOptions:b=[],devModeChecks:p={}}=f,h=b0(y),m=b0(b),C=kb(o),x=g(function(){return s++,l.apply(null,arguments)},...h);let w=!0;const E=v(function(){a++;const A=y0(C,arguments);if(i=x.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=Db(w,p);if(S.shouldRun&&S.run(l,A,i),L.shouldRun){const k=y0(C,arguments);L.run({inputSelectorResults:A,inputSelectorResultsCopy:k},{memoize:g,memoizeOptions:h},arguments)}w&&(w=!1)}return i},...m);return Object.assign(E,{resultFunc:l,memoizedResultFunc:x,dependencies:C,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:g,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var jb=Pb(x0),Bb=Object.assign((e,t=jb)=>{Ob(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((a,i,c)=>(a[n[c]]=i,a),{}))},{withTypes:()=>Bb});function v0(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var Vb=v0(),Gb=v0,Hb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?zs:zs.apply(null,arguments)},E0=e=>e&&typeof e.match=="function";function Zo(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?Ve(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>o0(r)&&r.type===e,n}function Wb(e){return typeof e=="function"&&"type"in e&&E0(e)}function Zb(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
570
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:l})}},Ab={inputStabilityCheck:"once",identityFunctionCheck:"once"};function Lb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Ob(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Fb(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var b0=e=>Array.isArray(e)?e:[e];function kb(e){const t=Array.isArray(e[0])?e[0]:e;return Fb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function y0(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Db=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Ab,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Sb},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:Tb}}},Nb=class{constructor(e){this.value=e}deref(){return this.value}},Rb=typeof WeakRef<"u"?WeakRef:Nb,Mb=0,C0=1;function ea(){return{s:Mb,v:void 0,o:null,p:null}}function x0(e,t={}){let n=ea();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var g;let i=n;const{length:c}=arguments;for(let y=0,v=c;y<v;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let p=i.o;p===null&&(i.o=p=new WeakMap);const h=p.get(b);h===void 0?(i=ea(),p.set(b,i)):i=h}else{let p=i.p;p===null&&(i.p=p=new Map);const h=p.get(b);h===void 0?(i=ea(),p.set(b,i)):i=h}}const l=i;let f;if(i.s===C0)f=i.v;else if(f=e.apply(null,arguments),s++,r){const y=((g=o==null?void 0:o.deref)==null?void 0:g.call(o))??o;y!=null&&r(y,f)&&(f=y,s!==0&&s--),o=typeof f=="object"&&f!==null||typeof f=="function"?new Rb(f):f}return l.s=C0,l.v=f,f}return a.clearCache=()=>{n=ea(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Pb(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,a=0,i,c={},l=o.pop();typeof l=="object"&&(c=l,l=o.pop()),Lb(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const f={...n,...c},{memoize:g,memoizeOptions:y=[],argsMemoize:v=x0,argsMemoizeOptions:b=[],devModeChecks:p={}}=f,h=b0(y),m=b0(b),C=kb(o),x=g(function(){return s++,l.apply(null,arguments)},...h);let w=!0;const E=v(function(){a++;const T=y0(C,arguments);if(i=x.apply(null,T),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=Db(w,p);if(S.shouldRun&&S.run(l,T,i),L.shouldRun){const R=y0(C,arguments);L.run({inputSelectorResults:T,inputSelectorResultsCopy:R},{memoize:g,memoizeOptions:h},arguments)}w&&(w=!1)}return i},...m);return Object.assign(E,{resultFunc:l,memoizedResultFunc:x,dependencies:C,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:g,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var jb=Pb(x0),Bb=Object.assign((e,t=jb)=>{Ob(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((a,i,c)=>(a[n[c]]=i,a),{}))},{withTypes:()=>Bb});function v0(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var Vb=v0(),Gb=v0,Hb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?zs:zs.apply(null,arguments)},E0=e=>e&&typeof e.match=="function";function zo(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?Be(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>o0(r)&&r.type===e,n}function Wb(e){return typeof e=="function"&&"type"in e&&E0(e)}function Zb(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
571
571
  Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}function Xb(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Wb}=e;return()=>n=>r=>(t(r)&&console.warn(Zb(r.type)),n(r))}function w0(e,t){let n=0;return{measureTime(r){const o=Date.now();try{return r()}finally{const s=Date.now();n+=s-o}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms.
572
572
  If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
573
- It is disabled in production builds, so you don't need to worry about that.`)}}}var I0=class fs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,fs.prototype)}static get[Symbol.species](){return fs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new fs(...t[0].concat(this)):new fs(...t.concat(this))}};function _0(e){return Cn(e)?m0(e,()=>{}):e}function S0(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(process.env.NODE_ENV==="production"?Ve(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function zb(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Yb(e,t,n){const r=A0(e,t,n);return{detectMutations(){return T0(e,t,r,n)}}}function A0(e,t=[],n,r="",o=new Set){const s={value:n};if(!e(n)&&!o.has(n)){o.add(n),s.children={};for(const a in n){const i=r?r+"."+a:a;t.length&&t.indexOf(i)!==-1||(s.children[a]=A0(e,t,n[a],i))}}return s}function T0(e,t=[],n,r,o=!1,s=""){const a=n?n.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:s};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let f in n.children)c[f]=!0;for(let f in r)c[f]=!0;const l=t.length>0;for(let f in c){const g=s?s+"."+f:f;if(l&&t.some(b=>b instanceof RegExp?b.test(g):g===b))continue;const y=T0(e,t,n.children[f],r[f],i,g);if(y.wasMutated)return y}return{wasMutated:!1}}function Jb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(i,c,l,f){return JSON.stringify(i,n(c,f),l)},n=function(i,c){let l=[],f=[];return c||(c=function(g,y){return l[0]===y?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(y)).join(".")+"]"}),function(g,y){if(l.length>0){var v=l.indexOf(this);~v?l.splice(v+1):l.push(this),~v?f.splice(v,1/0,g):f.push(g),~l.indexOf(y)&&(y=c.call(this,g,y))}else l.push(y);return i==null?y:i.call(this,g,y)}},{isImmutable:r=zb,ignoredPaths:o,warnAfter:s=32}=e;const a=Yb.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return g=>y=>{const v=w0(s,"ImmutableStateInvariantMiddleware");v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Ve(19):`A state mutation was detected between dispatches, in the path '${f.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const b=g(y);return v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Ve(20):`A state mutation was detected inside a dispatch, in the path: ${f.path||""}. Take a look at the reducer(s) handling the action ${t(y)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),v.warnIfExceeded(),b}}}}function L0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||Go(e)}function gc(e,t="",n=L0,r,o=[],s){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const i=r!=null?r(e):Object.entries(e),c=o.length>0;for(const[l,f]of i){const g=t?t+"."+l:l;if(!(c&&o.some(v=>v instanceof RegExp?v.test(g):g===v))){if(!n(f))return{keyPath:g,value:f};if(typeof f=="object"&&(a=gc(f,g,n,r,o,s),a))return a}}return s&&O0(e)&&s.add(e),!1}function O0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!O0(t))return!1;return!0}function qb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=L0,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:a=32,ignoreState:i=!1,ignoreActions:c=!1,disableCache:l=!1}=e,f=!l&&WeakSet?new WeakSet:void 0;return g=>y=>v=>{if(!o0(v))return y(v);const b=y(v),p=w0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(v.type)!==-1)&&p.measureTime(()=>{const h=gc(v,"",t,n,o,f);if(h){const{keyPath:m,value:C}=h;console.error(`A non-serializable value was detected in an action, in the path: \`${m}\`. Value:`,C,`
573
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var I0=class fs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,fs.prototype)}static get[Symbol.species](){return fs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new fs(...t[0].concat(this)):new fs(...t.concat(this))}};function _0(e){return Cn(e)?m0(e,()=>{}):e}function S0(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(process.env.NODE_ENV==="production"?Be(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function zb(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Yb(e,t,n){const r=T0(e,t,n);return{detectMutations(){return A0(e,t,r,n)}}}function T0(e,t=[],n,r="",o=new Set){const s={value:n};if(!e(n)&&!o.has(n)){o.add(n),s.children={};for(const a in n){const i=r?r+"."+a:a;t.length&&t.indexOf(i)!==-1||(s.children[a]=T0(e,t,n[a],i))}}return s}function A0(e,t=[],n,r,o=!1,s=""){const a=n?n.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:s};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let f in n.children)c[f]=!0;for(let f in r)c[f]=!0;const l=t.length>0;for(let f in c){const g=s?s+"."+f:f;if(l&&t.some(b=>b instanceof RegExp?b.test(g):g===b))continue;const y=A0(e,t,n.children[f],r[f],i,g);if(y.wasMutated)return y}return{wasMutated:!1}}function Jb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(i,c,l,f){return JSON.stringify(i,n(c,f),l)},n=function(i,c){let l=[],f=[];return c||(c=function(g,y){return l[0]===y?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(y)).join(".")+"]"}),function(g,y){if(l.length>0){var v=l.indexOf(this);~v?l.splice(v+1):l.push(this),~v?f.splice(v,1/0,g):f.push(g),~l.indexOf(y)&&(y=c.call(this,g,y))}else l.push(y);return i==null?y:i.call(this,g,y)}},{isImmutable:r=zb,ignoredPaths:o,warnAfter:s=32}=e;const a=Yb.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return g=>y=>{const v=w0(s,"ImmutableStateInvariantMiddleware");v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Be(19):`A state mutation was detected between dispatches, in the path '${f.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const b=g(y);return v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Be(20):`A state mutation was detected inside a dispatch, in the path: ${f.path||""}. Take a look at the reducer(s) handling the action ${t(y)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),v.warnIfExceeded(),b}}}}function L0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||Wo(e)}function gc(e,t="",n=L0,r,o=[],s){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const i=r!=null?r(e):Object.entries(e),c=o.length>0;for(const[l,f]of i){const g=t?t+"."+l:l;if(!(c&&o.some(v=>v instanceof RegExp?v.test(g):g===v))){if(!n(f))return{keyPath:g,value:f};if(typeof f=="object"&&(a=gc(f,g,n,r,o,s),a))return a}}return s&&O0(e)&&s.add(e),!1}function O0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!O0(t))return!1;return!0}function qb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=L0,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:a=32,ignoreState:i=!1,ignoreActions:c=!1,disableCache:l=!1}=e,f=!l&&WeakSet?new WeakSet:void 0;return g=>y=>v=>{if(!o0(v))return y(v);const b=y(v),p=w0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(v.type)!==-1)&&p.measureTime(()=>{const h=gc(v,"",t,n,o,f);if(h){const{keyPath:m,value:C}=h;console.error(`A non-serializable value was detected in an action, in the path: \`${m}\`. Value:`,C,`
574
574
  Take a look at the logic that dispatched this action: `,v,`
575
575
  (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
576
576
  (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),i||(p.measureTime(()=>{const h=g.getState(),m=gc(h,"",t,n,s,f);if(m){const{keyPath:C,value:x}=m;console.error(`A non-serializable value was detected in the state, in the path: \`${C}\`. Value:`,x,`
577
577
  Take a look at the reducer(s) handling this action type: ${v.type}.
578
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),b}}}function ta(e){return typeof e=="boolean"}var Qb=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new I0;if(n&&(ta(n)?a.push(Vb):a.push(Gb(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};ta(r)||(i=r),a.unshift(Jb(i))}if(o){let i={};ta(o)||(i=o),a.push(qb(i))}if(s){let i={};ta(s)||(i=s),a.unshift(Xb(i))}}return a},$b="RTK_autoBatch",F0=e=>t=>{setTimeout(t,e)},Ub=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:F0(10),Kb=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,a=!1;const i=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?Ub:e.type==="callback"?e.queueNotification:F0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const g=()=>o&&f(),y=r.subscribe(g);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var g;try{return o=!((g=f==null?void 0:f.meta)!=null&&g[$b]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},ey=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new I0(e);return r&&o.push(Kb(typeof r=="object"?r:void 0)),o};function ty(e){const t=Qb(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let i;if(typeof n=="function")i=n;else if(Go(n))i=r0(n);else throw new Error(process.env.NODE_ENV==="production"?Ve(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Ve(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Ve(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Ve(4):"each middleware provided to configureStore must be a function");let l=zs;o&&(l=Hb({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=hb(...c),g=ey(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Ve(5):"`enhancers` field must be a callback");let y=typeof a=="function"?a(g):g();if(process.env.NODE_ENV!=="production"&&!Array.isArray(y))throw new Error(process.env.NODE_ENV==="production"?Ve(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&y.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Ve(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!y.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=l(...y);return t0(i,s,v)}function k0(e){const t={},n=[];let r;const o={addCase(s,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Ve(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Ve(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i=typeof s=="string"?s:s.type;if(!i)throw new Error(process.env.NODE_ENV==="production"?Ve(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?Ve(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addMatcher(s,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Ve(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:s,reducer:a}),o},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Ve(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function ny(e){return typeof e=="function"}function ry(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Ve(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=k0(t),s;if(ny(e))s=()=>_0(e());else{const i=_0(e);s=()=>i}function a(i=s(),c){let l=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return l.filter(f=>!!f).length===0&&(l=[o]),l.reduce((f,g)=>{if(g)if(fr(f)){const v=g(f,c);return v===void 0?f:v}else{if(Cn(f))return m0(f,y=>g(y,c));{const y=g(f,c);if(y===void 0){if(f===null)return f;throw new Error(process.env.NODE_ENV==="production"?Ve(9):"A case reducer on a non-draftable value must not return undefined")}return y}}return f},i)}return a.getInitialState=s,a}var oy=(e,t)=>E0(e)?e.match(t):e(t);function sy(...e){return t=>e.some(n=>oy(n,t))}var ay="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",iy=(e=21)=>{let t="",n=e;for(;n--;)t+=ay[Math.random()*64|0];return t},cy=["name","message","stack","code"],mc=class{constructor(e,t){Me(this,"_type");this.payload=e,this.meta=t}},D0=class{constructor(e,t){Me(this,"_type");this.payload=e,this.meta=t}},ly=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of cy)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Yt=(()=>{function e(t,n,r){const o=Zo(t+"/fulfilled",(c,l,f,g)=>({payload:c,meta:{...g||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=Zo(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=Zo(t+"/rejected",(c,l,f,g,y)=>({payload:g,error:(r&&r.serializeError||ly)(c||"Rejected"),meta:{...y||{},arg:f,requestId:l,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,g)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):iy(),v=new AbortController;let b,p;function h(C){p=C,v.abort()}const m=async function(){var w,E;let C;try{let _=(w=r==null?void 0:r.condition)==null?void 0:w.call(r,c,{getState:f,extra:g});if(dy(_)&&(_=await _),_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,L)=>{b=()=>{L({name:"AbortError",message:p||"Aborted"})},v.signal.addEventListener("abort",b)});l(s(y,c,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:y,arg:c},{getState:f,extra:g}))),C=await Promise.race([A,Promise.resolve(n(c,{dispatch:l,getState:f,extra:g,requestId:y,signal:v.signal,abort:h,rejectWithValue:(S,L)=>new mc(S,L),fulfillWithValue:(S,L)=>new D0(S,L)})).then(S=>{if(S instanceof mc)throw S;return S instanceof D0?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){C=_ instanceof mc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{b&&v.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&a.match(C)&&C.meta.condition||l(C),C}();return Object.assign(m,{abort:h,requestId:y,arg:c,unwrap(){return m.then(uy)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:sy(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function uy(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function dy(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var fy=Symbol.for("rtk-slice-createasyncthunk");function py(e,t){return`${e}/${t}`}function hy({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[fy];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Ve(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&o.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=(typeof o.reducers=="function"?o.reducers(my()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(x,w){const E=typeof x=="string"?x:x.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?Ve(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Ve(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=w,f},addMatcher(x,w){return l.sliceMatchers.push({matcher:x,reducer:w}),f},exposeAction(x,w){return l.actionCreators[x]=w,f},exposeCaseReducer(x,w){return l.sliceCaseReducersByName[x]=w,f}};c.forEach(x=>{const w=i[x],E={reducerName:x,type:py(s,x),createNotation:typeof o.reducers=="function"};yy(w)?xy(E,w,f,t):by(E,w,f)});function g(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Ve(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[x={},w=[],E=void 0]=typeof o.extraReducers=="function"?k0(o.extraReducers):[o.extraReducers],_={...x,...l.sliceCaseReducersByType};return ry(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of l.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of w)A.addMatcher(S.matcher,S.reducer);E&&A.addDefaultCase(E)})}const y=x=>x,v=new Map;let b;function p(x,w){return b||(b=g()),b(x,w)}function h(){return b||(b=g()),b.getInitialState()}function m(x,w=!1){function E(A){let S=A[x];if(typeof S>"u"){if(w)S=h();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Ve(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(A=y){const S=S0(v,w,{insert:()=>new WeakMap});return S0(S,A,{insert:()=>{const L={};for(const[k,R]of Object.entries(o.selectors??{}))L[k]=gy(R,A,h,w);return L}})}return{reducerPath:x,getSelectors:_,get selectors(){return _(E)},selectSlice:E}}const C={name:s,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...m(a),injectInto(x,{reducerPath:w,...E}={}){const _=w??a;return x.inject({reducerPath:_,reducer:p},E),{...C,...m(_,!0)}}};return C}}function gy(e,t,n,r){function o(s,...a){let i=t(s);if(typeof i>"u"){if(r)i=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Ve(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var bc=hy();function my(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function by({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!Cy(r))throw new Error(process.env.NODE_ENV==="production"?Ve(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=r.reducer,a=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,a?Zo(e,a):Zo(e))}function yy(e){return e._reducerDefinitionType==="asyncThunk"}function Cy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xy({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Ve(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:a,pending:i,rejected:c,settled:l,options:f}=n,g=o(e,s,f);r.exposeAction(t,g),a&&r.addCase(g.fulfilled,a),i&&r.addCase(g.pending,i),c&&r.addCase(g.rejected,c),l&&r.addMatcher(g.settled,l),r.exposeCaseReducer(t,{fulfilled:a||na,pending:i||na,rejected:c||na,settled:l||na})}function na(){}function Ve(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const rn="success",Qe="error",N0="Some error occured. Please contact support@hiverhq.com",R0="Card refreshed successfully",vy="Card linked successfully",Ey="Error in linking the card",wy="Card unlinked successfully",Iy="Failed to unlink the card",xn="Something went wrong",_y="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e",Sy=u.styled(u.Box)`
578
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),b}}}function ta(e){return typeof e=="boolean"}var Qb=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new I0;if(n&&(ta(n)?a.push(Vb):a.push(Gb(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};ta(r)||(i=r),a.unshift(Jb(i))}if(o){let i={};ta(o)||(i=o),a.push(qb(i))}if(s){let i={};ta(s)||(i=s),a.unshift(Xb(i))}}return a},$b="RTK_autoBatch",F0=e=>t=>{setTimeout(t,e)},Ub=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:F0(10),Kb=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,a=!1;const i=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?Ub:e.type==="callback"?e.queueNotification:F0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const g=()=>o&&f(),y=r.subscribe(g);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var g;try{return o=!((g=f==null?void 0:f.meta)!=null&&g[$b]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},ey=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new I0(e);return r&&o.push(Kb(typeof r=="object"?r:void 0)),o};function ty(e){const t=Qb(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let i;if(typeof n=="function")i=n;else if(Wo(n))i=r0(n);else throw new Error(process.env.NODE_ENV==="production"?Be(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Be(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Be(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Be(4):"each middleware provided to configureStore must be a function");let l=zs;o&&(l=Hb({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=hb(...c),g=ey(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Be(5):"`enhancers` field must be a callback");let y=typeof a=="function"?a(g):g();if(process.env.NODE_ENV!=="production"&&!Array.isArray(y))throw new Error(process.env.NODE_ENV==="production"?Be(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&y.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Be(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!y.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=l(...y);return t0(i,s,v)}function k0(e){const t={},n=[];let r;const o={addCase(s,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Be(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Be(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i=typeof s=="string"?s:s.type;if(!i)throw new Error(process.env.NODE_ENV==="production"?Be(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?Be(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addMatcher(s,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Be(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:s,reducer:a}),o},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Be(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function ny(e){return typeof e=="function"}function ry(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Be(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=k0(t),s;if(ny(e))s=()=>_0(e());else{const i=_0(e);s=()=>i}function a(i=s(),c){let l=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return l.filter(f=>!!f).length===0&&(l=[o]),l.reduce((f,g)=>{if(g)if(ur(f)){const v=g(f,c);return v===void 0?f:v}else{if(Cn(f))return m0(f,y=>g(y,c));{const y=g(f,c);if(y===void 0){if(f===null)return f;throw new Error(process.env.NODE_ENV==="production"?Be(9):"A case reducer on a non-draftable value must not return undefined")}return y}}return f},i)}return a.getInitialState=s,a}var oy=(e,t)=>E0(e)?e.match(t):e(t);function sy(...e){return t=>e.some(n=>oy(n,t))}var ay="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",iy=(e=21)=>{let t="",n=e;for(;n--;)t+=ay[Math.random()*64|0];return t},cy=["name","message","stack","code"],mc=class{constructor(e,t){Me(this,"_type");this.payload=e,this.meta=t}},D0=class{constructor(e,t){Me(this,"_type");this.payload=e,this.meta=t}},ly=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of cy)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Yt=(()=>{function e(t,n,r){const o=zo(t+"/fulfilled",(c,l,f,g)=>({payload:c,meta:{...g||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=zo(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=zo(t+"/rejected",(c,l,f,g,y)=>({payload:g,error:(r&&r.serializeError||ly)(c||"Rejected"),meta:{...y||{},arg:f,requestId:l,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,g)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):iy(),v=new AbortController;let b,p;function h(C){p=C,v.abort()}const m=async function(){var w,E;let C;try{let _=(w=r==null?void 0:r.condition)==null?void 0:w.call(r,c,{getState:f,extra:g});if(dy(_)&&(_=await _),_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((S,L)=>{b=()=>{L({name:"AbortError",message:p||"Aborted"})},v.signal.addEventListener("abort",b)});l(s(y,c,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:y,arg:c},{getState:f,extra:g}))),C=await Promise.race([T,Promise.resolve(n(c,{dispatch:l,getState:f,extra:g,requestId:y,signal:v.signal,abort:h,rejectWithValue:(S,L)=>new mc(S,L),fulfillWithValue:(S,L)=>new D0(S,L)})).then(S=>{if(S instanceof mc)throw S;return S instanceof D0?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){C=_ instanceof mc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{b&&v.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&a.match(C)&&C.meta.condition||l(C),C}();return Object.assign(m,{abort:h,requestId:y,arg:c,unwrap(){return m.then(uy)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:sy(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function uy(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function dy(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var fy=Symbol.for("rtk-slice-createasyncthunk");function py(e,t){return`${e}/${t}`}function hy({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[fy];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Be(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&o.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=(typeof o.reducers=="function"?o.reducers(my()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(x,w){const E=typeof x=="string"?x:x.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?Be(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Be(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=w,f},addMatcher(x,w){return l.sliceMatchers.push({matcher:x,reducer:w}),f},exposeAction(x,w){return l.actionCreators[x]=w,f},exposeCaseReducer(x,w){return l.sliceCaseReducersByName[x]=w,f}};c.forEach(x=>{const w=i[x],E={reducerName:x,type:py(s,x),createNotation:typeof o.reducers=="function"};yy(w)?xy(E,w,f,t):by(E,w,f)});function g(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Be(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[x={},w=[],E=void 0]=typeof o.extraReducers=="function"?k0(o.extraReducers):[o.extraReducers],_={...x,...l.sliceCaseReducersByType};return ry(o.initialState,T=>{for(let S in _)T.addCase(S,_[S]);for(let S of l.sliceMatchers)T.addMatcher(S.matcher,S.reducer);for(let S of w)T.addMatcher(S.matcher,S.reducer);E&&T.addDefaultCase(E)})}const y=x=>x,v=new Map;let b;function p(x,w){return b||(b=g()),b(x,w)}function h(){return b||(b=g()),b.getInitialState()}function m(x,w=!1){function E(T){let S=T[x];if(typeof S>"u"){if(w)S=h();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Be(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(T=y){const S=S0(v,w,{insert:()=>new WeakMap});return S0(S,T,{insert:()=>{const L={};for(const[R,k]of Object.entries(o.selectors??{}))L[R]=gy(k,T,h,w);return L}})}return{reducerPath:x,getSelectors:_,get selectors(){return _(E)},selectSlice:E}}const C={name:s,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...m(a),injectInto(x,{reducerPath:w,...E}={}){const _=w??a;return x.inject({reducerPath:_,reducer:p},E),{...C,...m(_,!0)}}};return C}}function gy(e,t,n,r){function o(s,...a){let i=t(s);if(typeof i>"u"){if(r)i=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Be(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var bc=hy();function my(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function by({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!Cy(r))throw new Error(process.env.NODE_ENV==="production"?Be(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=r.reducer,a=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,a?zo(e,a):zo(e))}function yy(e){return e._reducerDefinitionType==="asyncThunk"}function Cy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xy({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Be(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:a,pending:i,rejected:c,settled:l,options:f}=n,g=o(e,s,f);r.exposeAction(t,g),a&&r.addCase(g.fulfilled,a),i&&r.addCase(g.pending,i),c&&r.addCase(g.rejected,c),l&&r.addMatcher(g.settled,l),r.exposeCaseReducer(t,{fulfilled:a||na,pending:i||na,rejected:c||na,settled:l||na})}function na(){}function Be(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const nn="success",Ue="error",N0="Some error occured. Please contact support@hiverhq.com",R0="Card refreshed successfully",vy="Card linked successfully",Ey="Error in linking the card",wy="Card unlinked successfully",Iy="Failed to unlink the card",xn="Something went wrong",_y="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e",Sy=u.styled(u.Box)`
579
579
  display: flex;
580
580
  flex-direction: row;
581
581
  align-items: center;
582
- `,Ay=u.styled(u.Box)`
582
+ `,Ty=u.styled(u.Box)`
583
583
  padding: 5px 8px;
584
584
  color: white;
585
- `,Ty=u.styled(u.brandIcons.Logo)(()=>({height:"26px",width:"26px",color:"#FFFFFF",marginRight:"4px"})),Ly=u.styled(u.Stack)`
585
+ `,Ay=u.styled(u.brandIcons.Logo)(()=>({height:"26px",width:"26px",color:"#FFFFFF",marginRight:"4px"})),Ly=u.styled(u.Stack)`
586
586
  flex-direction: row;
587
587
  padding: 0 10px;
588
588
  img {
@@ -592,26 +592,26 @@ Take a look at the reducer(s) handling this action type: ${v.type}.
592
592
  fill: #ffffff;
593
593
  width: 10px;
594
594
  }
595
- `,Oy=(e,{closeToast:t})=>d.jsx(Ly,{children:d.jsx("img",{src:_y,onClick:t})}),ra=({message:e})=>d.jsxs(Sy,{children:[d.jsx(Ty,{}),d.jsx(Ay,{children:e})]});function Se(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:d.jsx(Oy,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=Fe.success(d.jsx(ra,{message:t}),{...o,icon:!1});break}case"error":{s=Fe.error(d.jsx(ra,{message:t}),{...o,icon:!1});break}case"info-dark":{s=Fe.info(d.jsx(ra,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=Fe.info(d.jsx(ra,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Fy(s)},r&&!isNaN(r)?Number(r):5e3),s}function Fy(e){Fe.dismiss(e)}const M0={updateFormApiStatus:te.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:te.IDLE,unlinkCardApiStatus:te.IDLE,linkCardApiStatus:te.IDLE,optionsMap:null,dropdownOptionsApis:te.IDLE,dependentFieldsMap:{},createFormApiStatus:te.IDLE,currentResourceDetailsApiStatus:te.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},ky="/v1/api"+"/templates/metadata",P0={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},Dy="Required Field",Ny="Invalid date",j0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Ry=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,B0="Please enter a valid URL",My="Please enter valid ID",Py="Please enter valid input",jy="URL must start with https://",By="URL should not end with a slash",Vy="Invalid email address",Gy="Email must be a string",V0="Invalid date",Hy="Date cannot be in the past",Wy="Date cannot be in the future",Zy="Invalid number",Xy="Invalid text",zy=async e=>{const t=new URLSearchParams,{inboxIds:n,channelType:r,conversationId:o,fetchAuthenticatedConnectors:s}=e||{};return n==null||n.forEach(i=>{t.append("inbox_ids",i)}),[["channel_type",r],["conversation_id",o],["fetch_authenticated_connectors",s==null?void 0:s.toString()]].forEach(([i,c])=>{c!==void 0&&t.append(i,c)}),Ee({url:`${ky}?${t.toString()}`,method:P0.GET})},Yy="/v1/api/connectors/ug?onlyEnabledAuthenticated=true&minimal=true",Jy=async()=>{const e=await Ee({url:Yy,method:P0.GET}),t=e==null?void 0:e.data;return Array.isArray(t)?t.map(({id:n,name:r,logo:o,connectorType:s})=>({id:n,name:r,logo:o,connectorType:s})).filter(({logo:n})=>!!n):[]};let Jr={};const qy={get length(){return Object.keys(Jr).length},getItem(e){return Jr[e]??null},setItem(e,t){Jr[e]=t},removeItem(e){delete Jr[e]},clear(){Jr={}},key(e){return Object.keys(Jr)[e]}},Qy={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},G0=(e="LOCAL")=>Qy[e]??qy,$y=(e="LOCAL")=>{const t=G0(e);return{...t,getItem(n){const r=t.getItem(n);if(!r)return r;try{return JSON.parse(r)}catch(o){return console.warn(o),r}},setItem(n,r){try{const o=JSON.stringify(r);t.setItem(n,o)}catch(o){console.warn(o)}}}};var yc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(yc||{});const Uy={[yc.ADD]:(e,t)=>e+t,[yc.MULTIPLY]:(e,t)=>e*t},Ky=e=>e,H0=()=>{if("crypto"in window&&"randomUUID"in window.crypto)return window.crypto.randomUUID();const e=Date.now().toString(16),t=Math.random().toString(16).substring(2,8);return`${e}-${t}`},W0=(e,t)=>{let n;const r=Uy[t]??Ky;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},Z0=(e,t=n=>n)=>{const n=new Set,r=[];for(const o of e){const s=t(o);n.has(s)||(n.add(s),r.push(o))}return r},e6=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?By:j0.test(n)?!0:e||B0:jy}return!1},t6=e=>t=>t&&typeof t=="string"?Ry.test(t)?!0:e||Vy:Gy,n6=e=>t=>t==null||t===""?e||Dy:!0,r6=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Ny)return V0;if(typeof t=="object"){const o=t,s=new Date;s.setHours(0,0,0,0);const a=n.disablePast,i=n.disableFuture;return a&&o<s?e||Hy:i&&o>s?e||Wy:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:V0},o6=e=>(t,n)=>{if(t=Number(t),typeof t=="number"&&!isNaN(t)){const r=n.min,o=n.max;return r!==void 0&&t<r?e||`Value should not be less than ${r}`:o!==void 0&&t>o?e||`Value should not be greater than ${o}`:!0}return e||Zy},Cc=e=>(t,n)=>{if(typeof t=="string"){const r=n.limit;return r!==void 0&&t.length>r?e||`Maximum characters allowed are ${r}`:!0}return e||Xy},s6=e=>t=>typeof t=="string"?t.startsWith("https:")?j0.test(t)?!0:e||B0:t.trim().length>0?!0:e||My:e||Py;function gr(e){"@babel/helpers - typeof";return gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gr(e)}function a6(e,t){if(gr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(gr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X0(e){var t=a6(e,"string");return gr(t)=="symbol"?t:t+""}function qr(e,t,n){return(t=X0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z0(Object(n),!0).forEach(function(r){qr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i6(e){if(Array.isArray(e))return e}function c6(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,i=[],c=!0,l=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function xc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Y0(e,t){if(e){if(typeof e=="string")return xc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xc(e,t):void 0}}function l6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
596
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nt(e,t){return i6(e)||c6(e,t)||Y0(e,t)||l6()}function u6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Jt(e,t){if(e==null)return{};var n,r,o=u6(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d6=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function vc(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,a=s===void 0?null:s,i=e.inputValue,c=e.menuIsOpen,l=e.onChange,f=e.onInputChange,g=e.onMenuClose,y=e.onMenuOpen,v=e.value,b=Jt(e,d6),p=I.useState(i!==void 0?i:n),h=nt(p,2),m=h[0],C=h[1],x=I.useState(c!==void 0?c:o),w=nt(x,2),E=w[0],_=w[1],A=I.useState(v!==void 0?v:a),S=nt(A,2),L=S[0],k=S[1],R=I.useCallback(function(X,z){typeof l=="function"&&l(X,z),k(X)},[l]),N=I.useCallback(function(X,z){var se;typeof f=="function"&&(se=f(X,z)),C(se!==void 0?se:X)},[f]),M=I.useCallback(function(){typeof y=="function"&&y(),_(!0)},[y]),V=I.useCallback(function(){typeof g=="function"&&g(),_(!1)},[g]),Z=i!==void 0?i:m,J=c!==void 0?c:E,$=v!==void 0?v:L;return oe(oe({},b),{},{inputValue:Z,menuIsOpen:J,onChange:R,onInputChange:N,onMenuClose:V,onMenuOpen:M,value:$})}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(null,arguments)}function f6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J0(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,X0(r.key),r)}}function p6(e,t,n){return t&&J0(e.prototype,t),n&&J0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ec(e,t){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ec(e,t)}function h6(e,t){if(typeof t!="function"&&t!==null)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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ec(e,t)}function oa(e){return oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oa(e)}function q0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q0=function(){return!!e})()}function g6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m6(e,t){if(t&&(gr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g6(e)}function b6(e){var t=q0();return function(){var n,r=oa(e);if(t){var o=oa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m6(this,n)}}function y6(e){if(Array.isArray(e))return xc(e)}function C6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
597
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qr(e){return y6(e)||C6(e)||Y0(e)||x6()}var v6=!1;function E6(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function w6(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var I6=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!v6:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(w6(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=E6(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ct="-ms-",sa="-moz-",Le="-webkit-",Q0="comm",wc="rule",Ic="decl",_6="@import",$0="@keyframes",S6="@layer",A6=Math.abs,aa=String.fromCharCode,T6=Object.assign;function L6(e,t){return it(e,0)^45?(((t<<2^it(e,0))<<2^it(e,1))<<2^it(e,2))<<2^it(e,3):0}function U0(e){return e.trim()}function O6(e,t){return(e=t.exec(e))?e[0]:e}function Oe(e,t,n){return e.replace(t,n)}function _c(e,t){return e.indexOf(t)}function it(e,t){return e.charCodeAt(t)|0}function Xo(e,t,n){return e.slice(t,n)}function on(e){return e.length}function Sc(e){return e.length}function ia(e,t){return t.push(e),e}function F6(e,t){return e.map(t).join("")}var ca=1,$r=1,K0=0,bt=0,$e=0,Ur="";function la(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:ca,column:$r,length:a,return:""}}function zo(e,t){return T6(la("",null,null,"",null,null,0),e,{length:-e.length},t)}function k6(){return $e}function D6(){return $e=bt>0?it(Ur,--bt):0,$r--,$e===10&&($r=1,ca--),$e}function Ot(){return $e=bt<K0?it(Ur,bt++):0,$r++,$e===10&&($r=1,ca++),$e}function sn(){return it(Ur,bt)}function ua(){return bt}function Yo(e,t){return Xo(Ur,e,t)}function Jo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ef(e){return ca=$r=1,K0=on(Ur=e),bt=0,[]}function tf(e){return Ur="",e}function da(e){return U0(Yo(bt-1,Ac(e===91?e+2:e===40?e+1:e)))}function N6(e){for(;($e=sn())&&$e<33;)Ot();return Jo(e)>2||Jo($e)>3?"":" "}function R6(e,t){for(;--t&&Ot()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return Yo(e,ua()+(t<6&&sn()==32&&Ot()==32))}function Ac(e){for(;Ot();)switch($e){case e:return bt;case 34:case 39:e!==34&&e!==39&&Ac($e);break;case 40:e===41&&Ac(e);break;case 92:Ot();break}return bt}function M6(e,t){for(;Ot()&&e+$e!==57;)if(e+$e===84&&sn()===47)break;return"/*"+Yo(t,bt-1)+"*"+aa(e===47?e:Ot())}function P6(e){for(;!Jo(sn());)Ot();return Yo(e,bt)}function j6(e){return tf(fa("",null,null,null,[""],e=ef(e),0,[0],e))}function fa(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,g=a,y=0,v=0,b=0,p=1,h=1,m=1,C=0,x="",w=o,E=s,_=r,A=x;h;)switch(b=C,C=Ot()){case 40:if(b!=108&&it(A,g-1)==58){_c(A+=Oe(da(C),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:A+=da(C);break;case 9:case 10:case 13:case 32:A+=N6(b);break;case 92:A+=R6(ua()-1,7);continue;case 47:switch(sn()){case 42:case 47:ia(B6(M6(Ot(),ua()),t,n),c);break;default:A+="/"}break;case 123*p:i[l++]=on(A)*m;case 125*p:case 59:case 0:switch(C){case 0:case 125:h=0;case 59+f:m==-1&&(A=Oe(A,/\f/g,"")),v>0&&on(A)-g&&ia(v>32?rf(A+";",r,n,g-1):rf(Oe(A," ","")+";",r,n,g-2),c);break;case 59:A+=";";default:if(ia(_=nf(A,t,n,l,f,o,i,x,w=[],E=[],g),s),C===123)if(f===0)fa(A,t,_,_,w,s,g,i,E);else switch(y===99&&it(A,3)===110?100:y){case 100:case 108:case 109:case 115:fa(e,_,_,r&&ia(nf(e,_,_,0,0,o,i,x,o,w=[],g),E),o,E,g,i,r?w:E);break;default:fa(A,_,_,_,[""],E,0,i,E)}}l=f=v=0,p=m=1,x=A="",g=a;break;case 58:g=1+on(A),v=b;default:if(p<1){if(C==123)--p;else if(C==125&&p++==0&&D6()==125)continue}switch(A+=aa(C),C*p){case 38:m=f>0?1:(A+="\f",-1);break;case 44:i[l++]=(on(A)-1)*m,m=1;break;case 64:sn()===45&&(A+=da(Ot())),y=sn(),f=g=on(x=A+=P6(ua())),C++;break;case 45:b===45&&on(A)==2&&(p=0)}}return s}function nf(e,t,n,r,o,s,a,i,c,l,f){for(var g=o-1,y=o===0?s:[""],v=Sc(y),b=0,p=0,h=0;b<r;++b)for(var m=0,C=Xo(e,g+1,g=A6(p=a[b])),x=e;m<v;++m)(x=U0(p>0?y[m]+" "+C:Oe(C,/&\f/g,y[m])))&&(c[h++]=x);return la(e,t,n,o===0?wc:i,c,l,f)}function B6(e,t,n){return la(e,t,n,Q0,aa(k6()),Xo(e,2,-2),0)}function rf(e,t,n,r){return la(e,t,n,Ic,Xo(e,0,r),Xo(e,r+1,-1),r)}function Kr(e,t){for(var n="",r=Sc(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function V6(e,t,n,r){switch(e.type){case S6:if(e.children.length)break;case _6:case Ic:return e.return=e.return||e.value;case Q0:return"";case $0:return e.return=e.value+"{"+Kr(e.children,r)+"}";case wc:e.value=e.props.join(",")}return on(n=Kr(e.children,r))?e.return=e.value+"{"+n+"}":""}function G6(e){var t=Sc(e);return function(n,r,o,s){for(var a="",i=0;i<t;i++)a+=e[i](n,r,o,s)||"";return a}}function H6(e){return function(t){t.root||(t=t.return)&&e(t)}}function W6(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Z6=function(t,n,r){for(var o=0,s=0;o=s,s=sn(),o===38&&s===12&&(n[r]=1),!Jo(s);)Ot();return Yo(t,bt)},X6=function(t,n){var r=-1,o=44;do switch(Jo(o)){case 0:o===38&&sn()===12&&(n[r]=1),t[r]+=Z6(bt-1,n,r);break;case 2:t[r]+=da(o);break;case 4:if(o===44){t[++r]=sn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=aa(o)}while(o=Ot());return t},z6=function(t,n){return tf(X6(ef(t),n))},of=new WeakMap,Y6=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!of.get(r))&&!o){of.set(t,!0);for(var s=[],a=z6(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var f=0;f<i.length;f++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},J6=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function sf(e,t){switch(L6(e,t)){case 5103:return Le+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Le+e+sa+e+ct+e+e;case 6828:case 4268:return Le+e+ct+e+e;case 6165:return Le+e+ct+"flex-"+e+e;case 5187:return Le+e+Oe(e,/(\w+).+(:[^]+)/,Le+"box-$1$2"+ct+"flex-$1$2")+e;case 5443:return Le+e+ct+"flex-item-"+Oe(e,/flex-|-self/,"")+e;case 4675:return Le+e+ct+"flex-line-pack"+Oe(e,/align-content|flex-|-self/,"")+e;case 5548:return Le+e+ct+Oe(e,"shrink","negative")+e;case 5292:return Le+e+ct+Oe(e,"basis","preferred-size")+e;case 6060:return Le+"box-"+Oe(e,"-grow","")+Le+e+ct+Oe(e,"grow","positive")+e;case 4554:return Le+Oe(e,/([^-])(transform)/g,"$1"+Le+"$2")+e;case 6187:return Oe(Oe(Oe(e,/(zoom-|grab)/,Le+"$1"),/(image-set)/,Le+"$1"),e,"")+e;case 5495:case 3959:return Oe(e,/(image-set\([^]*)/,Le+"$1$`$1");case 4968:return Oe(Oe(e,/(.+:)(flex-)?(.*)/,Le+"box-pack:$3"+ct+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Le+e+e;case 4095:case 3583:case 4068:case 2532:return Oe(e,/(.+)-inline(.+)/,Le+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(on(e)-1-t>6)switch(it(e,t+1)){case 109:if(it(e,t+4)!==45)break;case 102:return Oe(e,/(.+:)(.+)-([^]+)/,"$1"+Le+"$2-$3$1"+sa+(it(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_c(e,"stretch")?sf(Oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(it(e,t+1)!==115)break;case 6444:switch(it(e,on(e)-3-(~_c(e,"!important")&&10))){case 107:return Oe(e,":",":"+Le)+e;case 101:return Oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Le+(it(e,14)===45?"inline-":"")+"box$3$1"+Le+"$2$3$1"+ct+"$2box$3")+e}break;case 5936:switch(it(e,t+11)){case 114:return Le+e+ct+Oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Le+e+ct+Oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Le+e+ct+Oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Le+e+ct+e+e}return e}var q6=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Ic:t.return=sf(t.value,t.length);break;case $0:return Kr([zo(t,{value:Oe(t.value,"@","@"+Le)})],o);case wc:if(t.length)return F6(t.props,function(s){switch(O6(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Kr([zo(t,{props:[Oe(s,/:(read-\w+)/,":"+sa+"$1")]})],o);case"::placeholder":return Kr([zo(t,{props:[Oe(s,/:(plac\w+)/,":"+Le+"input-$1")]}),zo(t,{props:[Oe(s,/:(plac\w+)/,":"+sa+"$1")]}),zo(t,{props:[Oe(s,/:(plac\w+)/,ct+"input-$1")]})],o)}return""})}},Q6=[q6],$6=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var h=p.getAttribute("data-emotion");h.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||Q6,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var h=p.getAttribute("data-emotion").split(" "),m=1;m<h.length;m++)s[h[m]]=!0;i.push(p)});var c,l=[Y6,J6];{var f,g=[V6,H6(function(p){f.insert(p)})],y=G6(l.concat(o,g)),v=function(h){return Kr(j6(h),y)};c=function(h,m,C,x){f=C,v(h?h+"{"+m.styles+"}":m.styles),x&&(b.inserted[m.name]=!0)}}var b={key:n,sheet:new I6({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return b.sheet.hydrate(i),b},Tc={exports:{}},ke={};/** @license React v16.13.1
595
+ `,Oy=(e,{closeToast:t})=>d.jsx(Ly,{children:d.jsx("img",{src:_y,onClick:t})}),ra=({message:e})=>d.jsxs(Sy,{children:[d.jsx(Ay,{}),d.jsx(Ty,{children:e})]});function _e(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:d.jsx(Oy,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=Fe.success(d.jsx(ra,{message:t}),{...o,icon:!1});break}case"error":{s=Fe.error(d.jsx(ra,{message:t}),{...o,icon:!1});break}case"info-dark":{s=Fe.info(d.jsx(ra,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=Fe.info(d.jsx(ra,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Fy(s)},r&&!isNaN(r)?Number(r):5e3),s}function Fy(e){Fe.dismiss(e)}const M0={updateFormApiStatus:ee.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:ee.IDLE,unlinkCardApiStatus:ee.IDLE,linkCardApiStatus:ee.IDLE,optionsMap:null,dropdownOptionsApis:ee.IDLE,dependentFieldsMap:{},createFormApiStatus:ee.IDLE,currentResourceDetailsApiStatus:ee.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},ky="/v1/api"+"/templates/metadata",P0={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},Dy="Required Field",Ny="Invalid date",j0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Ry=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,B0="Please enter a valid URL",My="Please enter valid ID",Py="Please enter valid input",jy="URL must start with https://",By="URL should not end with a slash",Vy="Invalid email address",Gy="Email must be a string",V0="Invalid date",Hy="Date cannot be in the past",Wy="Date cannot be in the future",Zy="Invalid number",Xy="Invalid text",zy=async e=>{const t=new URLSearchParams,{inboxIds:n,channelType:r,conversationId:o,fetchAuthenticatedConnectors:s}=e||{};return n==null||n.forEach(i=>{t.append("inbox_ids",i)}),[["channel_type",r],["conversation_id",o],["fetch_authenticated_connectors",s==null?void 0:s.toString()]].forEach(([i,c])=>{c!==void 0&&t.append(i,c)}),Ee({url:`${ky}?${t.toString()}`,method:P0.GET})},Yy="/v1/api/connectors/ug?onlyEnabledAuthenticated=true&minimal=true",Jy=async()=>{const e=await Ee({url:Yy,method:P0.GET}),t=e==null?void 0:e.data;return Array.isArray(t)?t.map(({id:n,name:r,logo:o,connectorType:s})=>({id:n,name:r,logo:o,connectorType:s})).filter(({logo:n})=>!!n):[]};let qr={};const qy={get length(){return Object.keys(qr).length},getItem(e){return qr[e]??null},setItem(e,t){qr[e]=t},removeItem(e){delete qr[e]},clear(){qr={}},key(e){return Object.keys(qr)[e]}},Qy={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},G0=(e="LOCAL")=>Qy[e]??qy,$y=(e="LOCAL")=>{const t=G0(e);return{...t,getItem(n){const r=t.getItem(n);if(!r)return r;try{return JSON.parse(r)}catch(o){return console.warn(o),r}},setItem(n,r){try{const o=JSON.stringify(r);t.setItem(n,o)}catch(o){console.warn(o)}}}};var yc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(yc||{});const Uy={[yc.ADD]:(e,t)=>e+t,[yc.MULTIPLY]:(e,t)=>e*t},Ky=e=>e,H0=()=>{if("crypto"in window&&"randomUUID"in window.crypto)return window.crypto.randomUUID();const e=Date.now().toString(16),t=Math.random().toString(16).substring(2,8);return`${e}-${t}`},W0=(e,t)=>{let n;const r=Uy[t]??Ky;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},Z0=(e,t=n=>n)=>{const n=new Set,r=[];for(const o of e){const s=t(o);n.has(s)||(n.add(s),r.push(o))}return r},e6=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?By:j0.test(n)?!0:e||B0:jy}return!1},t6=e=>t=>t&&typeof t=="string"?Ry.test(t)?!0:e||Vy:Gy,n6=e=>t=>t==null||t===""?e||Dy:!0,r6=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Ny)return V0;if(typeof t=="object"){const o=t,s=new Date;s.setHours(0,0,0,0);const a=n.disablePast,i=n.disableFuture;return a&&o<s?e||Hy:i&&o>s?e||Wy:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:V0},o6=e=>(t,n)=>{if(t=Number(t),typeof t=="number"&&!isNaN(t)){const r=n.min,o=n.max;return r!==void 0&&t<r?e||`Value should not be less than ${r}`:o!==void 0&&t>o?e||`Value should not be greater than ${o}`:!0}return e||Zy},Cc=e=>(t,n)=>{if(typeof t=="string"){const r=n.limit;return r!==void 0&&t.length>r?e||`Maximum characters allowed are ${r}`:!0}return e||Xy},s6=e=>t=>typeof t=="string"?t.startsWith("https:")?j0.test(t)?!0:e||B0:t.trim().length>0?!0:e||My:e||Py,a6=["async-select","select","multi-select"],i6=e=>{const t={};for(const n in e){const r=e[n];if(!(r!=null&&r.label)&&!(r!=null&&r.value))continue;const o=r.label??r.value??"";if(r.type==="date"){const s=new Date(parseInt(o));t[n]=isNaN(s.getTime())?o:s.toISOString();continue}if(a6.includes(r.type)){t[n]={label:r.label,value:r.value};continue}t[n]=o}return t};function pr(e){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pr(e)}function c6(e,t){if(pr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(pr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X0(e){var t=c6(e,"string");return pr(t)=="symbol"?t:t+""}function Qr(e,t,n){return(t=X0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z0(Object(n),!0).forEach(function(r){Qr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l6(e){if(Array.isArray(e))return e}function u6(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,i=[],c=!0,l=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function xc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Y0(e,t){if(e){if(typeof e=="string")return xc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xc(e,t):void 0}}function d6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
596
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nt(e,t){return l6(e)||u6(e,t)||Y0(e,t)||d6()}function f6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Jt(e,t){if(e==null)return{};var n,r,o=f6(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p6=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function vc(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,a=s===void 0?null:s,i=e.inputValue,c=e.menuIsOpen,l=e.onChange,f=e.onInputChange,g=e.onMenuClose,y=e.onMenuOpen,v=e.value,b=Jt(e,p6),p=I.useState(i!==void 0?i:n),h=nt(p,2),m=h[0],C=h[1],x=I.useState(c!==void 0?c:o),w=nt(x,2),E=w[0],_=w[1],T=I.useState(v!==void 0?v:a),S=nt(T,2),L=S[0],R=S[1],k=I.useCallback(function(z,q){typeof l=="function"&&l(z,q),R(z)},[l]),D=I.useCallback(function(z,q){var ne;typeof f=="function"&&(ne=f(z,q)),C(ne!==void 0?ne:z)},[f]),M=I.useCallback(function(){typeof y=="function"&&y(),_(!0)},[y]),G=I.useCallback(function(){typeof g=="function"&&g(),_(!1)},[g]),Y=i!==void 0?i:m,X=c!==void 0?c:E,J=v!==void 0?v:L;return ae(ae({},b),{},{inputValue:Y,menuIsOpen:X,onChange:k,onInputChange:D,onMenuClose:G,onMenuOpen:M,value:J})}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(null,arguments)}function h6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J0(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,X0(r.key),r)}}function g6(e,t,n){return t&&J0(e.prototype,t),n&&J0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ec(e,t){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ec(e,t)}function m6(e,t){if(typeof t!="function"&&t!==null)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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ec(e,t)}function oa(e){return oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oa(e)}function q0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q0=function(){return!!e})()}function b6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y6(e,t){if(t&&(pr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b6(e)}function C6(e){var t=q0();return function(){var n,r=oa(e);if(t){var o=oa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y6(this,n)}}function x6(e){if(Array.isArray(e))return xc(e)}function v6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function E6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
597
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $r(e){return x6(e)||v6(e)||Y0(e)||E6()}var w6=!1;function I6(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function _6(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var S6=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!w6:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(_6(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=I6(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ct="-ms-",sa="-moz-",Le="-webkit-",Q0="comm",wc="rule",Ic="decl",T6="@import",$0="@keyframes",A6="@layer",L6=Math.abs,aa=String.fromCharCode,O6=Object.assign;function F6(e,t){return st(e,0)^45?(((t<<2^st(e,0))<<2^st(e,1))<<2^st(e,2))<<2^st(e,3):0}function U0(e){return e.trim()}function k6(e,t){return(e=t.exec(e))?e[0]:e}function Oe(e,t,n){return e.replace(t,n)}function _c(e,t){return e.indexOf(t)}function st(e,t){return e.charCodeAt(t)|0}function Yo(e,t,n){return e.slice(t,n)}function rn(e){return e.length}function Sc(e){return e.length}function ia(e,t){return t.push(e),e}function D6(e,t){return e.map(t).join("")}var ca=1,Ur=1,K0=0,yt=0,Ke=0,Kr="";function la(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:ca,column:Ur,length:a,return:""}}function Jo(e,t){return O6(la("",null,null,"",null,null,0),e,{length:-e.length},t)}function N6(){return Ke}function R6(){return Ke=yt>0?st(Kr,--yt):0,Ur--,Ke===10&&(Ur=1,ca--),Ke}function kt(){return Ke=yt<K0?st(Kr,yt++):0,Ur++,Ke===10&&(Ur=1,ca++),Ke}function on(){return st(Kr,yt)}function ua(){return yt}function qo(e,t){return Yo(Kr,e,t)}function Qo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ef(e){return ca=Ur=1,K0=rn(Kr=e),yt=0,[]}function tf(e){return Kr="",e}function da(e){return U0(qo(yt-1,Tc(e===91?e+2:e===40?e+1:e)))}function M6(e){for(;(Ke=on())&&Ke<33;)kt();return Qo(e)>2||Qo(Ke)>3?"":" "}function P6(e,t){for(;--t&&kt()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return qo(e,ua()+(t<6&&on()==32&&kt()==32))}function Tc(e){for(;kt();)switch(Ke){case e:return yt;case 34:case 39:e!==34&&e!==39&&Tc(Ke);break;case 40:e===41&&Tc(e);break;case 92:kt();break}return yt}function j6(e,t){for(;kt()&&e+Ke!==57;)if(e+Ke===84&&on()===47)break;return"/*"+qo(t,yt-1)+"*"+aa(e===47?e:kt())}function B6(e){for(;!Qo(on());)kt();return qo(e,yt)}function V6(e){return tf(fa("",null,null,null,[""],e=ef(e),0,[0],e))}function fa(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,g=a,y=0,v=0,b=0,p=1,h=1,m=1,C=0,x="",w=o,E=s,_=r,T=x;h;)switch(b=C,C=kt()){case 40:if(b!=108&&st(T,g-1)==58){_c(T+=Oe(da(C),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:T+=da(C);break;case 9:case 10:case 13:case 32:T+=M6(b);break;case 92:T+=P6(ua()-1,7);continue;case 47:switch(on()){case 42:case 47:ia(G6(j6(kt(),ua()),t,n),c);break;default:T+="/"}break;case 123*p:i[l++]=rn(T)*m;case 125*p:case 59:case 0:switch(C){case 0:case 125:h=0;case 59+f:m==-1&&(T=Oe(T,/\f/g,"")),v>0&&rn(T)-g&&ia(v>32?rf(T+";",r,n,g-1):rf(Oe(T," ","")+";",r,n,g-2),c);break;case 59:T+=";";default:if(ia(_=nf(T,t,n,l,f,o,i,x,w=[],E=[],g),s),C===123)if(f===0)fa(T,t,_,_,w,s,g,i,E);else switch(y===99&&st(T,3)===110?100:y){case 100:case 108:case 109:case 115:fa(e,_,_,r&&ia(nf(e,_,_,0,0,o,i,x,o,w=[],g),E),o,E,g,i,r?w:E);break;default:fa(T,_,_,_,[""],E,0,i,E)}}l=f=v=0,p=m=1,x=T="",g=a;break;case 58:g=1+rn(T),v=b;default:if(p<1){if(C==123)--p;else if(C==125&&p++==0&&R6()==125)continue}switch(T+=aa(C),C*p){case 38:m=f>0?1:(T+="\f",-1);break;case 44:i[l++]=(rn(T)-1)*m,m=1;break;case 64:on()===45&&(T+=da(kt())),y=on(),f=g=rn(x=T+=B6(ua())),C++;break;case 45:b===45&&rn(T)==2&&(p=0)}}return s}function nf(e,t,n,r,o,s,a,i,c,l,f){for(var g=o-1,y=o===0?s:[""],v=Sc(y),b=0,p=0,h=0;b<r;++b)for(var m=0,C=Yo(e,g+1,g=L6(p=a[b])),x=e;m<v;++m)(x=U0(p>0?y[m]+" "+C:Oe(C,/&\f/g,y[m])))&&(c[h++]=x);return la(e,t,n,o===0?wc:i,c,l,f)}function G6(e,t,n){return la(e,t,n,Q0,aa(N6()),Yo(e,2,-2),0)}function rf(e,t,n,r){return la(e,t,n,Ic,Yo(e,0,r),Yo(e,r+1,-1),r)}function eo(e,t){for(var n="",r=Sc(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function H6(e,t,n,r){switch(e.type){case A6:if(e.children.length)break;case T6:case Ic:return e.return=e.return||e.value;case Q0:return"";case $0:return e.return=e.value+"{"+eo(e.children,r)+"}";case wc:e.value=e.props.join(",")}return rn(n=eo(e.children,r))?e.return=e.value+"{"+n+"}":""}function W6(e){var t=Sc(e);return function(n,r,o,s){for(var a="",i=0;i<t;i++)a+=e[i](n,r,o,s)||"";return a}}function Z6(e){return function(t){t.root||(t=t.return)&&e(t)}}function X6(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var z6=function(t,n,r){for(var o=0,s=0;o=s,s=on(),o===38&&s===12&&(n[r]=1),!Qo(s);)kt();return qo(t,yt)},Y6=function(t,n){var r=-1,o=44;do switch(Qo(o)){case 0:o===38&&on()===12&&(n[r]=1),t[r]+=z6(yt-1,n,r);break;case 2:t[r]+=da(o);break;case 4:if(o===44){t[++r]=on()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=aa(o)}while(o=kt());return t},J6=function(t,n){return tf(Y6(ef(t),n))},of=new WeakMap,q6=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!of.get(r))&&!o){of.set(t,!0);for(var s=[],a=J6(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var f=0;f<i.length;f++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},Q6=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function sf(e,t){switch(F6(e,t)){case 5103:return Le+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Le+e+sa+e+ct+e+e;case 6828:case 4268:return Le+e+ct+e+e;case 6165:return Le+e+ct+"flex-"+e+e;case 5187:return Le+e+Oe(e,/(\w+).+(:[^]+)/,Le+"box-$1$2"+ct+"flex-$1$2")+e;case 5443:return Le+e+ct+"flex-item-"+Oe(e,/flex-|-self/,"")+e;case 4675:return Le+e+ct+"flex-line-pack"+Oe(e,/align-content|flex-|-self/,"")+e;case 5548:return Le+e+ct+Oe(e,"shrink","negative")+e;case 5292:return Le+e+ct+Oe(e,"basis","preferred-size")+e;case 6060:return Le+"box-"+Oe(e,"-grow","")+Le+e+ct+Oe(e,"grow","positive")+e;case 4554:return Le+Oe(e,/([^-])(transform)/g,"$1"+Le+"$2")+e;case 6187:return Oe(Oe(Oe(e,/(zoom-|grab)/,Le+"$1"),/(image-set)/,Le+"$1"),e,"")+e;case 5495:case 3959:return Oe(e,/(image-set\([^]*)/,Le+"$1$`$1");case 4968:return Oe(Oe(e,/(.+:)(flex-)?(.*)/,Le+"box-pack:$3"+ct+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Le+e+e;case 4095:case 3583:case 4068:case 2532:return Oe(e,/(.+)-inline(.+)/,Le+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(rn(e)-1-t>6)switch(st(e,t+1)){case 109:if(st(e,t+4)!==45)break;case 102:return Oe(e,/(.+:)(.+)-([^]+)/,"$1"+Le+"$2-$3$1"+sa+(st(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_c(e,"stretch")?sf(Oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(st(e,t+1)!==115)break;case 6444:switch(st(e,rn(e)-3-(~_c(e,"!important")&&10))){case 107:return Oe(e,":",":"+Le)+e;case 101:return Oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Le+(st(e,14)===45?"inline-":"")+"box$3$1"+Le+"$2$3$1"+ct+"$2box$3")+e}break;case 5936:switch(st(e,t+11)){case 114:return Le+e+ct+Oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Le+e+ct+Oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Le+e+ct+Oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Le+e+ct+e+e}return e}var $6=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Ic:t.return=sf(t.value,t.length);break;case $0:return eo([Jo(t,{value:Oe(t.value,"@","@"+Le)})],o);case wc:if(t.length)return D6(t.props,function(s){switch(k6(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return eo([Jo(t,{props:[Oe(s,/:(read-\w+)/,":"+sa+"$1")]})],o);case"::placeholder":return eo([Jo(t,{props:[Oe(s,/:(plac\w+)/,":"+Le+"input-$1")]}),Jo(t,{props:[Oe(s,/:(plac\w+)/,":"+sa+"$1")]}),Jo(t,{props:[Oe(s,/:(plac\w+)/,ct+"input-$1")]})],o)}return""})}},U6=[$6],K6=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var h=p.getAttribute("data-emotion");h.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||U6,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var h=p.getAttribute("data-emotion").split(" "),m=1;m<h.length;m++)s[h[m]]=!0;i.push(p)});var c,l=[q6,Q6];{var f,g=[H6,Z6(function(p){f.insert(p)})],y=W6(l.concat(o,g)),v=function(h){return eo(V6(h),y)};c=function(h,m,C,x){f=C,v(h?h+"{"+m.styles+"}":m.styles),x&&(b.inserted[m.name]=!0)}}var b={key:n,sheet:new S6({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return b.sheet.hydrate(i),b},Ac={exports:{}},ke={};/** @license React v16.13.1
598
598
  * react-is.production.min.js
599
599
  *
600
600
  * Copyright (c) Facebook, Inc. and its affiliates.
601
601
  *
602
602
  * This source code is licensed under the MIT license found in the
603
603
  * LICENSE file in the root directory of this source tree.
604
- */var af;function U6(){if(af)return ke;af=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case t:switch(E=E.type,E){case c:case l:case r:case s:case o:case g:return E;default:switch(E=E&&E.$$typeof,E){case i:case f:case b:case v:case a:return E;default:return _}}case n:return _}}}function w(E){return x(E)===l}return ke.AsyncMode=c,ke.ConcurrentMode=l,ke.ContextConsumer=i,ke.ContextProvider=a,ke.Element=t,ke.ForwardRef=f,ke.Fragment=r,ke.Lazy=b,ke.Memo=v,ke.Portal=n,ke.Profiler=s,ke.StrictMode=o,ke.Suspense=g,ke.isAsyncMode=function(E){return w(E)||x(E)===c},ke.isConcurrentMode=w,ke.isContextConsumer=function(E){return x(E)===i},ke.isContextProvider=function(E){return x(E)===a},ke.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ke.isForwardRef=function(E){return x(E)===f},ke.isFragment=function(E){return x(E)===r},ke.isLazy=function(E){return x(E)===b},ke.isMemo=function(E){return x(E)===v},ke.isPortal=function(E){return x(E)===n},ke.isProfiler=function(E){return x(E)===s},ke.isStrictMode=function(E){return x(E)===o},ke.isSuspense=function(E){return x(E)===g},ke.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===s||E===o||E===g||E===y||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===v||E.$$typeof===a||E.$$typeof===i||E.$$typeof===f||E.$$typeof===h||E.$$typeof===m||E.$$typeof===C||E.$$typeof===p)},ke.typeOf=x,ke}var De={};/** @license React v16.13.1
604
+ */var af;function e9(){if(af)return ke;af=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case t:switch(E=E.type,E){case c:case l:case r:case s:case o:case g:return E;default:switch(E=E&&E.$$typeof,E){case i:case f:case b:case v:case a:return E;default:return _}}case n:return _}}}function w(E){return x(E)===l}return ke.AsyncMode=c,ke.ConcurrentMode=l,ke.ContextConsumer=i,ke.ContextProvider=a,ke.Element=t,ke.ForwardRef=f,ke.Fragment=r,ke.Lazy=b,ke.Memo=v,ke.Portal=n,ke.Profiler=s,ke.StrictMode=o,ke.Suspense=g,ke.isAsyncMode=function(E){return w(E)||x(E)===c},ke.isConcurrentMode=w,ke.isContextConsumer=function(E){return x(E)===i},ke.isContextProvider=function(E){return x(E)===a},ke.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ke.isForwardRef=function(E){return x(E)===f},ke.isFragment=function(E){return x(E)===r},ke.isLazy=function(E){return x(E)===b},ke.isMemo=function(E){return x(E)===v},ke.isPortal=function(E){return x(E)===n},ke.isProfiler=function(E){return x(E)===s},ke.isStrictMode=function(E){return x(E)===o},ke.isSuspense=function(E){return x(E)===g},ke.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===s||E===o||E===g||E===y||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===v||E.$$typeof===a||E.$$typeof===i||E.$$typeof===f||E.$$typeof===h||E.$$typeof===m||E.$$typeof===C||E.$$typeof===p)},ke.typeOf=x,ke}var De={};/** @license React v16.13.1
605
605
  * react-is.development.js
606
606
  *
607
607
  * Copyright (c) Facebook, Inc. and its affiliates.
608
608
  *
609
609
  * This source code is licensed under the MIT license found in the
610
610
  * LICENSE file in the root directory of this source tree.
611
- */var cf;function K6(){return cf||(cf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(Y){return typeof Y=="string"||typeof Y=="function"||Y===r||Y===l||Y===s||Y===o||Y===g||Y===y||typeof Y=="object"&&Y!==null&&(Y.$$typeof===b||Y.$$typeof===v||Y.$$typeof===a||Y.$$typeof===i||Y.$$typeof===f||Y.$$typeof===h||Y.$$typeof===m||Y.$$typeof===C||Y.$$typeof===p)}function w(Y){if(typeof Y=="object"&&Y!==null){var Ze=Y.$$typeof;switch(Ze){case t:var _e=Y.type;switch(_e){case c:case l:case r:case s:case o:case g:return _e;default:var et=_e&&_e.$$typeof;switch(et){case i:case f:case b:case v:case a:return et;default:return Ze}}case n:return Ze}}}var E=c,_=l,A=i,S=a,L=t,k=f,R=r,N=b,M=v,V=n,Z=s,J=o,$=g,X=!1;function z(Y){return X||(X=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),se(Y)||w(Y)===c}function se(Y){return w(Y)===l}function de(Y){return w(Y)===i}function D(Y){return w(Y)===a}function H(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===t}function G(Y){return w(Y)===f}function j(Y){return w(Y)===r}function q(Y){return w(Y)===b}function ne(Y){return w(Y)===v}function re(Y){return w(Y)===n}function B(Y){return w(Y)===s}function U(Y){return w(Y)===o}function fe(Y){return w(Y)===g}De.AsyncMode=E,De.ConcurrentMode=_,De.ContextConsumer=A,De.ContextProvider=S,De.Element=L,De.ForwardRef=k,De.Fragment=R,De.Lazy=N,De.Memo=M,De.Portal=V,De.Profiler=Z,De.StrictMode=J,De.Suspense=$,De.isAsyncMode=z,De.isConcurrentMode=se,De.isContextConsumer=de,De.isContextProvider=D,De.isElement=H,De.isForwardRef=G,De.isFragment=j,De.isLazy=q,De.isMemo=ne,De.isPortal=re,De.isProfiler=B,De.isStrictMode=U,De.isSuspense=fe,De.isValidElementType=x,De.typeOf=w}()),De}process.env.NODE_ENV==="production"?Tc.exports=U6():Tc.exports=K6();var e9=Tc.exports,lf=e9,t9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},n9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uf={};uf[lf.ForwardRef]=t9,uf[lf.Memo]=n9;var r9=!0;function o9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var df=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||r9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},s9=function(t,n,r){df(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function a9(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var i9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},c9=!1,l9=/[A-Z]|^ms/g,u9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ff=function(t){return t.charCodeAt(1)===45},pf=function(t){return t!=null&&typeof t!="boolean"},Lc=W6(function(e){return ff(e)?e:e.replace(l9,"-$&").toLowerCase()}),hf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(u9,function(r,o,s){return an={name:o,styles:s,next:an},o})}return i9[t]!==1&&!ff(t)&&typeof n=="number"&&n!==0?n+"px":n},d9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function qo(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return an={name:o.name,styles:o.styles,next:an},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)an={name:a.name,styles:a.styles,next:an},a=a.next;var i=s.styles+";";return i}return f9(e,t,n)}case"function":{if(e!==void 0){var c=an,l=n(e);return an=c,qo(e,t,l)}break}}var f=n;return f}function f9(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=qo(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;pf(i)&&(r+=Lc(s)+":"+hf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&c9)throw new Error(d9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)pf(a[c])&&(r+=Lc(s)+":"+hf(s,a[c])+";");else{var l=qo(e,t,a);switch(s){case"animation":case"animationName":{r+=Lc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var gf=/label:\s*([^\s;{]+)\s*(;|$)/g,an;function mf(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";an=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=qo(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=qo(n,t,e[i]),r){var c=s;o+=c[i]}gf.lastIndex=0;for(var l="",f;(f=gf.exec(o))!==null;)l+="-"+f[1];var g=a9(o)+l;return{name:g,styles:o,next:an}}var p9=function(t){return t()},h9=T.useInsertionEffect?T.useInsertionEffect:!1,g9=h9||p9,m9=!1,bf=T.createContext(typeof HTMLElement<"u"?$6({key:"css"}):null);bf.Provider;var b9=function(t){return I.forwardRef(function(n,r){var o=I.useContext(bf);return t(n,o,r)})},y9=T.createContext({}),Oc={}.hasOwnProperty,Fc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",C9=function(t,n){var r={};for(var o in n)Oc.call(n,o)&&(r[o]=n[o]);return r[Fc]=t,r},x9=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return df(n,r,o),g9(function(){return s9(n,r,o)}),null},v9=b9(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Fc],s=[r],a="";typeof e.className=="string"?a=o9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=mf(s,void 0,T.useContext(y9));a+=t.key+"-"+i.name;var c={};for(var l in e)Oc.call(e,l)&&l!=="css"&&l!==Fc&&!m9&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement(x9,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),E9=v9,ae=function(t,n){var r=arguments;if(n==null||!Oc.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=E9,s[1]=C9(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function kc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return mf(t)}var w9=function(){var t=kc.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function I9(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const _9=Math.min,S9=Math.max,pa=Math.round,ha=Math.floor,ga=e=>({x:e,y:e});function A9(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ma(){return typeof window<"u"}function yf(e){return xf(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cf(e){var t;return(t=(xf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xf(e){return ma()?e instanceof Node||e instanceof vn(e).Node:!1}function T9(e){return ma()?e instanceof Element||e instanceof vn(e).Element:!1}function Dc(e){return ma()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function vf(e){return!ma()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function Ef(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Nc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function L9(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function O9(e){return["html","body","#document"].includes(yf(e))}function Nc(e){return vn(e).getComputedStyle(e)}function F9(e){if(yf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vf(e)&&e.host||Cf(e);return vf(t)?t.host:t}function wf(e){const t=F9(e);return O9(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dc(t)&&Ef(t)?t:wf(t)}function ba(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=vn(o);if(s){const i=Rc(a);return t.concat(a,a.visualViewport||[],Ef(o)?o:[],i&&n?ba(i):[])}return t.concat(o,ba(o,[],n))}function Rc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function k9(e){const t=Nc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Dc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=pa(n)!==s||pa(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Mc(e){return T9(e)?e:e.contextElement}function If(e){const t=Mc(e);if(!Dc(t))return ga(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=k9(t);let a=(s?pa(n.width):n.width)/r,i=(s?pa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const D9=ga(0);function N9(e){const t=vn(e);return!L9()||!t.visualViewport?D9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function R9(e,t,n){return!1}function _f(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Mc(e);let a=ga(1);t&&(a=If(e));const i=R9()?N9(s):ga(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,g=o.height/a.y;if(s){const y=vn(s),v=r;let b=y,p=Rc(b);for(;p&&r&&v!==b;){const h=If(p),m=p.getBoundingClientRect(),C=Nc(p),x=m.left+(p.clientLeft+parseFloat(C.paddingLeft))*h.x,w=m.top+(p.clientTop+parseFloat(C.paddingTop))*h.y;c*=h.x,l*=h.y,f*=h.x,g*=h.y,c+=x,l+=w,b=vn(p),p=Rc(b)}}return A9({width:f,height:g,x:c,y:l})}function M9(e,t){let n=null,r;const o=Cf(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const{left:l,top:f,width:g,height:y}=e.getBoundingClientRect();if(i||t(),!g||!y)return;const v=ha(f),b=ha(o.clientWidth-(l+g)),p=ha(o.clientHeight-(f+y)),h=ha(l),C={rootMargin:-v+"px "+-b+"px "+-p+"px "+-h+"px",threshold:S9(0,_9(1,c))||1};let x=!0;function w(E){const _=E[0].intersectionRatio;if(_!==c){if(!x)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(w,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,C)}n.observe(e)}return a(!0),s}function P9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Mc(e),f=o||s?[...l?ba(l):[],...ba(t)]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const g=l&&i?M9(l,n):null;let y=-1,v=null;a&&(v=new ResizeObserver(m=>{let[C]=m;C&&C.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),n()}),l&&!c&&v.observe(l),v.observe(t));let b,p=c?_f(e):null;c&&h();function h(){const m=_f(e);p&&(m.x!==p.x||m.y!==p.y||m.width!==p.width||m.height!==p.height)&&n(),p=m,b=requestAnimationFrame(h)}return n(),()=>{var m;f.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),g==null||g(),(m=v)==null||m.disconnect(),v=null,c&&cancelAnimationFrame(b)}}var Pc=I.useLayoutEffect,j9=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ya=function(){};function B9(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function V9(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var s=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&s.push("".concat(B9(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var Ca=function(t){return Q9(t)?t.filter(Boolean):gr(t)==="object"&&t!==null?[t]:[]},Sf=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Jt(t,j9);return oe({},n)},ze=function(t,n,r){var o=t.cx,s=t.getStyles,a=t.getClassNames,i=t.className;return{css:s(n,t),className:o(r??{},a(n,t),i)}};function G9(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function xa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function H9(e){return xa(e)?window.innerHeight:e.clientHeight}function Af(e){return xa(e)?window.pageYOffset:e.scrollTop}function va(e,t){if(xa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function W9(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function Z9(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Ea(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ya,o=Af(e),s=t-o,a=10,i=0;function c(){i+=a;var l=Z9(i,o,s,n);va(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Tf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?va(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&va(e,Math.max(t.offsetTop-o,0))}function X9(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Lf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function z9(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Of=!1,Y9={get passive(){return Of=!0}},wa=typeof window<"u"?window:{};wa.addEventListener&&wa.removeEventListener&&(wa.addEventListener("p",ya,Y9),wa.removeEventListener("p",ya,!1));var J9=Of;function q9(e){return e!=null}function Q9(e){return Array.isArray(e)}function Qo(e,t,n){return e?t:n}function nT(e){return e}function rT(e){return e}var $9=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(a){var i=nt(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=nt(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},U9=["children","innerProps"],K9=["children","innerProps"];function eC(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=W9(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),g=f.height,y=n.getBoundingClientRect(),v=y.bottom,b=y.height,p=y.top,h=n.offsetParent.getBoundingClientRect(),m=h.top,C=a?window.innerHeight:H9(c),x=Af(c),w=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),_=m-E,A=C-p,S=_+x,L=g-x-p,k=v-C+x+w,R=x+p-E,N=160;switch(o){case"auto":case"bottom":if(A>=b)return{placement:"bottom",maxHeight:t};if(L>=b&&!a)return s&&Ea(c,k,N),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&Ea(c,k,N);var M=a?A-w:L-w;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var V=t,Z=a?_:S;return Z>=r&&(V=Math.min(Z-w-i,t)),{placement:"top",maxHeight:V}}if(o==="bottom")return s&&va(c,k),{placement:"bottom",maxHeight:t};break;case"top":if(_>=b)return{placement:"top",maxHeight:t};if(S>=b&&!a)return s&&Ea(c,R,N),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var J=t;return(!a&&S>=r||a&&_>=r)&&(J=a?_-E:S-E),s&&Ea(c,R,N),{placement:"top",maxHeight:J}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function tC(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Ff=function(t){return t==="auto"?"bottom":t},nC=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return oe((r={label:"menu"},qr(r,tC(o),"100%"),qr(r,"position","absolute"),qr(r,"width","100%"),qr(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},kf=I.createContext(null),rC=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,l=I.useContext(kf)||{},f=l.setPortalPlacement,g=I.useRef(null),y=I.useState(o),v=nt(y,2),b=v[0],p=v[1],h=I.useState(null),m=nt(h,2),C=m[0],x=m[1],w=c.spacing.controlHeight;return Pc(function(){var E=g.current;if(E){var _=a==="fixed",A=i&&!_,S=eC({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:w});p(S.maxHeight),x(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,w]),n({ref:g,placerProps:oe(oe({},t),{},{placement:C||Ff(s),maxHeight:b})})},oC=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ae("div",ue({},ze(t,"menu",{menu:!0}),{ref:r},o),n)},sC=oC,aC=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return oe({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},iC=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ae("div",ue({},ze(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Df=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return oe({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},cC=Df,lC=Df,uC=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Jt(t,U9);return ae("div",ue({},ze(oe(oe({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},dC=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Jt(t,K9);return ae("div",ue({},ze(oe(oe({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},fC=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},pC=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=I.useRef(null),l=I.useRef(null),f=I.useState(Ff(a)),g=nt(f,2),y=g[0],v=g[1],b=I.useMemo(function(){return{setPortalPlacement:v}},[]),p=I.useState(null),h=nt(p,2),m=h[0],C=h[1],x=I.useCallback(function(){if(o){var A=X9(o),S=i==="fixed"?0:window.pageYOffset,L=A[y]+S;(L!==(m==null?void 0:m.offset)||A.left!==(m==null?void 0:m.rect.left)||A.width!==(m==null?void 0:m.rect.width))&&C({offset:L,rect:A})}},[o,i,y,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);Pc(function(){x()},[x]);var w=I.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=P9(o,c.current,x,{elementResize:"ResizeObserver"in window}))},[o,x]);Pc(function(){w()},[w]);var E=I.useCallback(function(A){c.current=A,w()},[w]);if(!n&&i!=="fixed"||!m)return null;var _=ae("div",ue({ref:E},ze(oe(oe({},t),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ae(kf.Provider,{value:b},n?Ge.createPortal(_,n):_)},hC=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},gC=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ae("div",ue({},ze(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},mC=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return oe({alignItems:"center",display:o&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},bC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ae("div",ue({},ze(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},yC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},CC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},ze(t,"indicatorsContainer",{indicators:!0}),r),n)},Nf,xC=["size"],vC=["innerProps","isRtl","size"];function EC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var wC=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:EC},Rf=function(t){var n=t.size,r=Jt(t,xC);return ae("svg",ue({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:wC},r))},jc=function(t){return ae(Rf,ue({size:20},t),ae("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Mf=function(t){return ae(Rf,ue({size:20},t),ae("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Pf=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return oe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},IC=Pf,_C=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},ze(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ae(Mf,null))},SC=Pf,AC=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},ze(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ae(jc,null))},TC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return oe({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},LC=function(t){var n=t.innerProps;return ae("span",ue({},n,ze(t,"indicatorSeparator",{"indicator-separator":!0})))},OC=w9(Nf||(Nf=I9([`
611
+ */var cf;function t9(){return cf||(cf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===l||Z===s||Z===o||Z===g||Z===y||typeof Z=="object"&&Z!==null&&(Z.$$typeof===b||Z.$$typeof===v||Z.$$typeof===a||Z.$$typeof===i||Z.$$typeof===f||Z.$$typeof===h||Z.$$typeof===m||Z.$$typeof===C||Z.$$typeof===p)}function w(Z){if(typeof Z=="object"&&Z!==null){var Ye=Z.$$typeof;switch(Ye){case t:var Se=Z.type;switch(Se){case c:case l:case r:case s:case o:case g:return Se;default:var Je=Se&&Se.$$typeof;switch(Je){case i:case f:case b:case v:case a:return Je;default:return Ye}}case n:return Ye}}}var E=c,_=l,T=i,S=a,L=t,R=f,k=r,D=b,M=v,G=n,Y=s,X=o,J=g,z=!1;function q(Z){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ne(Z)||w(Z)===c}function ne(Z){return w(Z)===l}function ce(Z){return w(Z)===i}function V(Z){return w(Z)===a}function N(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function H(Z){return w(Z)===f}function j(Z){return w(Z)===r}function $(Z){return w(Z)===b}function oe(Z){return w(Z)===v}function re(Z){return w(Z)===n}function B(Z){return w(Z)===s}function te(Z){return w(Z)===o}function fe(Z){return w(Z)===g}De.AsyncMode=E,De.ConcurrentMode=_,De.ContextConsumer=T,De.ContextProvider=S,De.Element=L,De.ForwardRef=R,De.Fragment=k,De.Lazy=D,De.Memo=M,De.Portal=G,De.Profiler=Y,De.StrictMode=X,De.Suspense=J,De.isAsyncMode=q,De.isConcurrentMode=ne,De.isContextConsumer=ce,De.isContextProvider=V,De.isElement=N,De.isForwardRef=H,De.isFragment=j,De.isLazy=$,De.isMemo=oe,De.isPortal=re,De.isProfiler=B,De.isStrictMode=te,De.isSuspense=fe,De.isValidElementType=x,De.typeOf=w}()),De}process.env.NODE_ENV==="production"?Ac.exports=e9():Ac.exports=t9();var n9=Ac.exports,lf=n9,r9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uf={};uf[lf.ForwardRef]=r9,uf[lf.Memo]=o9;var s9=!0;function a9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var df=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||s9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},i9=function(t,n,r){df(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function c9(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var l9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},u9=!1,d9=/[A-Z]|^ms/g,f9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ff=function(t){return t.charCodeAt(1)===45},pf=function(t){return t!=null&&typeof t!="boolean"},Lc=X6(function(e){return ff(e)?e:e.replace(d9,"-$&").toLowerCase()}),hf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(f9,function(r,o,s){return sn={name:o,styles:s,next:sn},o})}return l9[t]!==1&&!ff(t)&&typeof n=="number"&&n!==0?n+"px":n},p9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function $o(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return sn={name:o.name,styles:o.styles,next:sn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)sn={name:a.name,styles:a.styles,next:sn},a=a.next;var i=s.styles+";";return i}return h9(e,t,n)}case"function":{if(e!==void 0){var c=sn,l=n(e);return sn=c,$o(e,t,l)}break}}var f=n;return f}function h9(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=$o(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;pf(i)&&(r+=Lc(s)+":"+hf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&u9)throw new Error(p9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)pf(a[c])&&(r+=Lc(s)+":"+hf(s,a[c])+";");else{var l=$o(e,t,a);switch(s){case"animation":case"animationName":{r+=Lc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var gf=/label:\s*([^\s;{]+)\s*(;|$)/g,sn;function mf(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";sn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=$o(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=$o(n,t,e[i]),r){var c=s;o+=c[i]}gf.lastIndex=0;for(var l="",f;(f=gf.exec(o))!==null;)l+="-"+f[1];var g=c9(o)+l;return{name:g,styles:o,next:sn}}var g9=function(t){return t()},m9=A.useInsertionEffect?A.useInsertionEffect:!1,b9=m9||g9,y9=!1,bf=A.createContext(typeof HTMLElement<"u"?K6({key:"css"}):null);bf.Provider;var C9=function(t){return I.forwardRef(function(n,r){var o=I.useContext(bf);return t(n,o,r)})},x9=A.createContext({}),Oc={}.hasOwnProperty,Fc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",v9=function(t,n){var r={};for(var o in n)Oc.call(n,o)&&(r[o]=n[o]);return r[Fc]=t,r},E9=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return df(n,r,o),b9(function(){return i9(n,r,o)}),null},w9=C9(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Fc],s=[r],a="";typeof e.className=="string"?a=a9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=mf(s,void 0,A.useContext(x9));a+=t.key+"-"+i.name;var c={};for(var l in e)Oc.call(e,l)&&l!=="css"&&l!==Fc&&!y9&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),A.createElement(A.Fragment,null,A.createElement(E9,{cache:t,serialized:i,isStringTag:typeof o=="string"}),A.createElement(o,c))}),I9=w9,ie=function(t,n){var r=arguments;if(n==null||!Oc.call(n,"css"))return A.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=I9,s[1]=v9(t,n);for(var a=2;a<o;a++)s[a]=r[a];return A.createElement.apply(null,s)};function kc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return mf(t)}var _9=function(){var t=kc.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function S9(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const T9=Math.min,A9=Math.max,pa=Math.round,ha=Math.floor,ga=e=>({x:e,y:e});function L9(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ma(){return typeof window<"u"}function yf(e){return xf(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cf(e){var t;return(t=(xf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xf(e){return ma()?e instanceof Node||e instanceof vn(e).Node:!1}function O9(e){return ma()?e instanceof Element||e instanceof vn(e).Element:!1}function Dc(e){return ma()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function vf(e){return!ma()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function Ef(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Nc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function F9(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function k9(e){return["html","body","#document"].includes(yf(e))}function Nc(e){return vn(e).getComputedStyle(e)}function D9(e){if(yf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vf(e)&&e.host||Cf(e);return vf(t)?t.host:t}function wf(e){const t=D9(e);return k9(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dc(t)&&Ef(t)?t:wf(t)}function ba(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=vn(o);if(s){const i=Rc(a);return t.concat(a,a.visualViewport||[],Ef(o)?o:[],i&&n?ba(i):[])}return t.concat(o,ba(o,[],n))}function Rc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function N9(e){const t=Nc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Dc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=pa(n)!==s||pa(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Mc(e){return O9(e)?e:e.contextElement}function If(e){const t=Mc(e);if(!Dc(t))return ga(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=N9(t);let a=(s?pa(n.width):n.width)/r,i=(s?pa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const R9=ga(0);function M9(e){const t=vn(e);return!F9()||!t.visualViewport?R9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function P9(e,t,n){return!1}function _f(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Mc(e);let a=ga(1);t&&(a=If(e));const i=P9()?M9(s):ga(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,g=o.height/a.y;if(s){const y=vn(s),v=r;let b=y,p=Rc(b);for(;p&&r&&v!==b;){const h=If(p),m=p.getBoundingClientRect(),C=Nc(p),x=m.left+(p.clientLeft+parseFloat(C.paddingLeft))*h.x,w=m.top+(p.clientTop+parseFloat(C.paddingTop))*h.y;c*=h.x,l*=h.y,f*=h.x,g*=h.y,c+=x,l+=w,b=vn(p),p=Rc(b)}}return L9({width:f,height:g,x:c,y:l})}function j9(e,t){let n=null,r;const o=Cf(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const{left:l,top:f,width:g,height:y}=e.getBoundingClientRect();if(i||t(),!g||!y)return;const v=ha(f),b=ha(o.clientWidth-(l+g)),p=ha(o.clientHeight-(f+y)),h=ha(l),C={rootMargin:-v+"px "+-b+"px "+-p+"px "+-h+"px",threshold:A9(0,T9(1,c))||1};let x=!0;function w(E){const _=E[0].intersectionRatio;if(_!==c){if(!x)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(w,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,C)}n.observe(e)}return a(!0),s}function B9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Mc(e),f=o||s?[...l?ba(l):[],...ba(t)]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const g=l&&i?j9(l,n):null;let y=-1,v=null;a&&(v=new ResizeObserver(m=>{let[C]=m;C&&C.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),n()}),l&&!c&&v.observe(l),v.observe(t));let b,p=c?_f(e):null;c&&h();function h(){const m=_f(e);p&&(m.x!==p.x||m.y!==p.y||m.width!==p.width||m.height!==p.height)&&n(),p=m,b=requestAnimationFrame(h)}return n(),()=>{var m;f.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),g==null||g(),(m=v)==null||m.disconnect(),v=null,c&&cancelAnimationFrame(b)}}var Pc=I.useLayoutEffect,V9=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ya=function(){};function G9(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function H9(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var s=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&s.push("".concat(G9(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var Ca=function(t){return U9(t)?t.filter(Boolean):pr(t)==="object"&&t!==null?[t]:[]},Sf=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Jt(t,V9);return ae({},n)},Ze=function(t,n,r){var o=t.cx,s=t.getStyles,a=t.getClassNames,i=t.className;return{css:s(n,t),className:o(r??{},a(n,t),i)}};function W9(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function xa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Z9(e){return xa(e)?window.innerHeight:e.clientHeight}function Tf(e){return xa(e)?window.pageYOffset:e.scrollTop}function va(e,t){if(xa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function X9(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function z9(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Ea(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ya,o=Tf(e),s=t-o,a=10,i=0;function c(){i+=a;var l=z9(i,o,s,n);va(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Af(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?va(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&va(e,Math.max(t.offsetTop-o,0))}function Y9(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Lf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function J9(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Of=!1,q9={get passive(){return Of=!0}},wa=typeof window<"u"?window:{};wa.addEventListener&&wa.removeEventListener&&(wa.addEventListener("p",ya,q9),wa.removeEventListener("p",ya,!1));var Q9=Of;function $9(e){return e!=null}function U9(e){return Array.isArray(e)}function Uo(e,t,n){return e?t:n}function uA(e){return e}function dA(e){return e}var K9=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(a){var i=nt(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=nt(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},eC=["children","innerProps"],tC=["children","innerProps"];function nC(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=X9(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),g=f.height,y=n.getBoundingClientRect(),v=y.bottom,b=y.height,p=y.top,h=n.offsetParent.getBoundingClientRect(),m=h.top,C=a?window.innerHeight:Z9(c),x=Tf(c),w=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),_=m-E,T=C-p,S=_+x,L=g-x-p,R=v-C+x+w,k=x+p-E,D=160;switch(o){case"auto":case"bottom":if(T>=b)return{placement:"bottom",maxHeight:t};if(L>=b&&!a)return s&&Ea(c,R,D),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&T>=r){s&&Ea(c,R,D);var M=a?T-w:L-w;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var G=t,Y=a?_:S;return Y>=r&&(G=Math.min(Y-w-i,t)),{placement:"top",maxHeight:G}}if(o==="bottom")return s&&va(c,R),{placement:"bottom",maxHeight:t};break;case"top":if(_>=b)return{placement:"top",maxHeight:t};if(S>=b&&!a)return s&&Ea(c,k,D),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var X=t;return(!a&&S>=r||a&&_>=r)&&(X=a?_-E:S-E),s&&Ea(c,k,D),{placement:"top",maxHeight:X}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function rC(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Ff=function(t){return t==="auto"?"bottom":t},oC=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return ae((r={label:"menu"},Qr(r,rC(o),"100%"),Qr(r,"position","absolute"),Qr(r,"width","100%"),Qr(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},kf=I.createContext(null),sC=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,l=I.useContext(kf)||{},f=l.setPortalPlacement,g=I.useRef(null),y=I.useState(o),v=nt(y,2),b=v[0],p=v[1],h=I.useState(null),m=nt(h,2),C=m[0],x=m[1],w=c.spacing.controlHeight;return Pc(function(){var E=g.current;if(E){var _=a==="fixed",T=i&&!_,S=nC({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:T,isFixedPosition:_,controlHeight:w});p(S.maxHeight),x(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,w]),n({ref:g,placerProps:ae(ae({},t),{},{placement:C||Ff(s),maxHeight:b})})},aC=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ie("div",de({},Ze(t,"menu",{menu:!0}),{ref:r},o),n)},iC=aC,cC=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ae({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},lC=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ie("div",de({},Ze(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Df=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ae({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},uC=Df,dC=Df,fC=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Jt(t,eC);return ie("div",de({},Ze(ae(ae({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},pC=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Jt(t,tC);return ie("div",de({},Ze(ae(ae({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},hC=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},gC=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=I.useRef(null),l=I.useRef(null),f=I.useState(Ff(a)),g=nt(f,2),y=g[0],v=g[1],b=I.useMemo(function(){return{setPortalPlacement:v}},[]),p=I.useState(null),h=nt(p,2),m=h[0],C=h[1],x=I.useCallback(function(){if(o){var T=Y9(o),S=i==="fixed"?0:window.pageYOffset,L=T[y]+S;(L!==(m==null?void 0:m.offset)||T.left!==(m==null?void 0:m.rect.left)||T.width!==(m==null?void 0:m.rect.width))&&C({offset:L,rect:T})}},[o,i,y,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);Pc(function(){x()},[x]);var w=I.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=B9(o,c.current,x,{elementResize:"ResizeObserver"in window}))},[o,x]);Pc(function(){w()},[w]);var E=I.useCallback(function(T){c.current=T,w()},[w]);if(!n&&i!=="fixed"||!m)return null;var _=ie("div",de({ref:E},Ze(ae(ae({},t),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ie(kf.Provider,{value:b},n?Ve.createPortal(_,n):_)},mC=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},bC=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ie("div",de({},Ze(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},yC=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ae({alignItems:"center",display:o&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},CC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ie("div",de({},Ze(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},xC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},vC=function(t){var n=t.children,r=t.innerProps;return ie("div",de({},Ze(t,"indicatorsContainer",{indicators:!0}),r),n)},Nf,EC=["size"],wC=["innerProps","isRtl","size"];function IC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var _C=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:IC},Rf=function(t){var n=t.size,r=Jt(t,EC);return ie("svg",de({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:_C},r))},jc=function(t){return ie(Rf,de({size:20},t),ie("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Mf=function(t){return ie(Rf,de({size:20},t),ie("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Pf=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ae({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},SC=Pf,TC=function(t){var n=t.children,r=t.innerProps;return ie("div",de({},Ze(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ie(Mf,null))},AC=Pf,LC=function(t){var n=t.children,r=t.innerProps;return ie("div",de({},Ze(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ie(jc,null))},OC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ae({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},FC=function(t){var n=t.innerProps;return ie("span",de({},n,Ze(t,"indicatorSeparator",{"indicator-separator":!0})))},kC=_9(Nf||(Nf=S9([`
612
612
  0%, 80%, 100% { opacity: 0; }
613
613
  40% { opacity: 1; }
614
- `]))),FC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return oe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:i*2})},Bc=function(t){var n=t.delay,r=t.offset;return ae("span",{css:kc({animation:"".concat(OC," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},kC=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Jt(t,vC);return ae("div",ue({},ze(oe(oe({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ae(Bc,{delay:0,offset:r}),ae(Bc,{delay:160,offset:!0}),ae(Bc,{delay:320,offset:!r}))},DC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return oe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:o?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:o?a.primary:a.neutral30}})},NC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ae("div",ue({ref:s},ze(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},RC=NC,MC=["data"],PC=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},jC=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,l=t.label,f=t.theme,g=t.selectProps;return ae("div",ue({},ze(t,"group",{group:!0}),c),ae(a,ue({},i,{selectProps:g,theme:f,getStyles:o,getClassNames:s,cx:r}),l),ae("div",null,n))},BC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return oe({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},VC=function(t){var n=Sf(t);n.data;var r=Jt(n,MC);return ae("div",ue({},ze(t,"groupHeading",{"group-heading":!0}),r))},GC=jC,HC=["innerRef","isDisabled","isHidden","inputClassName"],WC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return oe(oe({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},ZC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},jf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},ZC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":oe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},jf)},XC=function(t){return oe({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},jf)},zC=function(t){var n=t.cx,r=t.value,o=Sf(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Jt(o,HC);return ae("div",ue({},ze(t,"input",{"input-container":!0}),{"data-value":r||""}),ae("input",ue({className:n({input:!0},c),ref:s,style:XC(i),disabled:a},l)))},YC=zC,JC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return oe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},qC=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return oe({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},QC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return oe({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Bf=function(t){var n=t.children,r=t.innerProps;return ae("div",r,n)},$C=Bf,UC=Bf;function KC(e){var t=e.children,n=e.innerProps;return ae("div",ue({role:"button"},n),t||ae(jc,{size:14}))}var e7=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,l=r.Container,f=r.Label,g=r.Remove;return ae(l,{data:o,innerProps:oe(oe({},ze(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ae(f,{data:o,innerProps:oe({},ze(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ae(g,{data:o,innerProps:oe(oe({},ze(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},t7=e7,n7=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return oe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(i.baseUnit*2,"px ").concat(i.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},r7=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ae("div",ue({},ze(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},o7=r7,s7=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return oe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},a7=function(t){var n=t.children,r=t.innerProps;return ae("div",ue({},ze(t,"placeholder",{placeholder:!0}),r),n)},i7=a7,c7=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return oe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},l7=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ae("div",ue({},ze(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},u7=l7,cn={ClearIndicator:AC,Control:RC,DropdownIndicator:_C,DownChevron:Mf,CrossIcon:jc,Group:GC,GroupHeading:VC,IndicatorsContainer:CC,IndicatorSeparator:LC,Input:YC,LoadingIndicator:kC,Menu:sC,MenuList:iC,MenuPortal:pC,LoadingMessage:dC,NoOptionsMessage:uC,MultiValue:t7,MultiValueContainer:$C,MultiValueLabel:UC,MultiValueRemove:KC,Option:o7,Placeholder:i7,SelectContainer:gC,SingleValue:u7,ValueContainer:bC},d7=function(t){return oe(oe({},cn),t.components)},Vf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function f7(e,t){return!!(e===t||Vf(e)&&Vf(t))}function p7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!f7(e[n],t[n]))return!1;return!0}function h7(e,t){t===void 0&&(t=p7);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}function g7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var m7=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:g7},b7=function(t){return ae("span",ue({css:m7},t))},Gf=b7,y7={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,a=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,a=s===void 0?"":s,i=t.selectValue,c=t.isDisabled,l=t.isSelected,f=t.isAppleDevice,g=function(p,h){return p&&p.length?"".concat(p.indexOf(h)+1," of ").concat(p.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(g(i,r),".");if(n==="menu"&&f){var y=c?" disabled":"",v="".concat(l?" selected":"").concat(y);return"".concat(a).concat(v,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},C7=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,l=t.id,f=t.isAppleDevice,g=c.ariaLiveMessages,y=c.getOptionLabel,v=c.inputValue,b=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,C=c.options,x=c.screenReaderStatus,w=c.tabSelectsValue,E=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=I.useMemo(function(){return oe(oe({},y7),g||{})},[g]),L=I.useMemo(function(){var Z="";if(n&&S.onChange){var J=n.option,$=n.options,X=n.removedValue,z=n.removedValues,se=n.value,de=function(re){return Array.isArray(re)?null:re},D=X||J||de(se),H=D?y(D):"",G=$||z||void 0,j=G?G.map(y):[],q=oe({isDisabled:D&&p(D,i),label:H,labels:j},n);Z=S.onChange(q)}return Z},[n,S,p,i,y]),k=I.useMemo(function(){var Z="",J=r||o,$=!!(r&&i&&i.includes(r));if(J&&S.onFocus){var X={focused:J,label:y(J),isDisabled:p(J,i),isSelected:$,options:s,context:J===r?"menu":"value",selectValue:i,isAppleDevice:f};Z=S.onFocus(X)}return Z},[r,o,y,p,S,s,i,f]),R=I.useMemo(function(){var Z="";if(m&&C.length&&!E&&S.onFilter){var J=x({count:s.length});Z=S.onFilter({inputValue:v,resultsMessage:J})}return Z},[s,v,m,S,C,x,E]),N=(n==null?void 0:n.action)==="initial-input-focus",M=I.useMemo(function(){var Z="";if(S.guidance){var J=o?"value":m?"menu":"input";Z=S.guidance({"aria-label":_,context:J,isDisabled:r&&p(r,i),isMulti:b,isSearchable:h,tabSelectsValue:w,isInitialFocus:N})}return Z},[_,r,o,b,p,h,m,S,i,w,N]),V=ae(I.Fragment,null,ae("span",{id:"aria-selection"},L),ae("span",{id:"aria-focused"},k),ae("span",{id:"aria-results"},R),ae("span",{id:"aria-guidance"},M));return ae(I.Fragment,null,ae(Gf,{id:l},N&&V),ae(Gf,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!N&&V))},x7=C7,Vc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],v7=new RegExp("["+Vc.map(function(e){return e.letters}).join("")+"]","g"),Hf={},Gc=0;Gc<Vc.length;Gc++)for(var Hc=Vc[Gc],Wc=0;Wc<Hc.letters.length;Wc++)Hf[Hc.letters[Wc]]=Hc.base;var Wf=function(t){return t.replace(v7,function(n){return Hf[n]})},E7=h7(Wf),Zf=function(t){return t.replace(/^\s+|\s+$/g,"")},w7=function(t){return"".concat(t.label," ").concat(t.value)},I7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=oe({ignoreCase:!0,ignoreAccents:!0,stringify:w7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?Zf(r):r,g=c?Zf(i(n)):i(n);return s&&(f=f.toLowerCase(),g=g.toLowerCase()),a&&(f=E7(f),g=Wf(g)),l==="start"?g.substr(0,f.length)===f:g.indexOf(f)>-1}},_7=["innerRef"];function S7(e){var t=e.innerRef,n=Jt(e,_7),r=$9(n,"onExited","in","enter","exit","appear");return ae("input",ue({ref:t},r,{css:kc({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var A7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function T7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=I.useRef(!1),i=I.useRef(!1),c=I.useRef(0),l=I.useRef(null),f=I.useCallback(function(h,m){if(l.current!==null){var C=l.current,x=C.scrollTop,w=C.scrollHeight,E=C.clientHeight,_=l.current,A=m>0,S=w-E-x,L=!1;S>m&&a.current&&(r&&r(h),a.current=!1),A&&i.current&&(s&&s(h),i.current=!1),A&&m>S?(n&&!a.current&&n(h),_.scrollTop=w,L=!0,a.current=!0):!A&&-m>x&&(o&&!i.current&&o(h),_.scrollTop=0,L=!0,i.current=!0),L&&A7(h)}},[n,r,o,s]),g=I.useCallback(function(h){f(h,h.deltaY)},[f]),y=I.useCallback(function(h){c.current=h.changedTouches[0].clientY},[]),v=I.useCallback(function(h){var m=c.current-h.changedTouches[0].clientY;f(h,m)},[f]),b=I.useCallback(function(h){if(h){var m=J9?{passive:!1}:!1;h.addEventListener("wheel",g,m),h.addEventListener("touchstart",y,m),h.addEventListener("touchmove",v,m)}},[v,y,g]),p=I.useCallback(function(h){h&&(h.removeEventListener("wheel",g,!1),h.removeEventListener("touchstart",y,!1),h.removeEventListener("touchmove",v,!1))},[v,y,g]);return I.useEffect(function(){if(t){var h=l.current;return b(h),function(){p(h)}}},[t,b,p]),function(h){l.current=h}}var Xf=["boxSizing","height","overflow","paddingRight","position"],zf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Yf(e){e.preventDefault()}function Jf(e){e.stopPropagation()}function qf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Qf(){return"ontouchstart"in window||navigator.maxTouchPoints}var $f=!!(typeof window<"u"&&window.document&&window.document.createElement),$o=0,eo={capture:!1,passive:!1};function L7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=I.useRef({}),s=I.useRef(null),a=I.useCallback(function(c){if($f){var l=document.body,f=l&&l.style;if(r&&Xf.forEach(function(b){var p=f&&f[b];o.current[b]=p}),r&&$o<1){var g=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,v=window.innerWidth-y+g||0;Object.keys(zf).forEach(function(b){var p=zf[b];f&&(f[b]=p)}),f&&(f.paddingRight="".concat(v,"px"))}l&&Qf()&&(l.addEventListener("touchmove",Yf,eo),c&&(c.addEventListener("touchstart",qf,eo),c.addEventListener("touchmove",Jf,eo))),$o+=1}},[r]),i=I.useCallback(function(c){if($f){var l=document.body,f=l&&l.style;$o=Math.max($o-1,0),r&&$o<1&&Xf.forEach(function(g){var y=o.current[g];f&&(f[g]=y)}),l&&Qf()&&(l.removeEventListener("touchmove",Yf,eo),c&&(c.removeEventListener("touchstart",qf,eo),c.removeEventListener("touchmove",Jf,eo)))}},[r]);return I.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function O7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var F7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},k7=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:O7};function D7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,c=e.onTopLeave,l=T7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=L7({isEnabled:n}),g=function(v){l(v),f(v)};return ae(I.Fragment,null,n&&ae("div",{onClick:F7,css:k7}),t(g))}function N7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var R7=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:N7},M7=function(t){var n=t.name,r=t.onFocus;return ae("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:R7,value:"",onChange:function(){}})},P7=M7;function Zc(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function j7(){return Zc(/^iPhone/i)}function Uf(){return Zc(/^Mac/i)}function B7(){return Zc(/^iPad/i)||Uf()&&navigator.maxTouchPoints>1}function V7(){return j7()||B7()}function G7(){return Uf()||V7()}var H7=function(t){return t.label},Kf=function(t){return t.label},e1=function(t){return t.value},W7=function(t){return!!t.isDisabled},Z7={clearIndicator:SC,container:hC,control:DC,dropdownIndicator:IC,group:PC,groupHeading:BC,indicatorsContainer:yC,indicatorSeparator:TC,input:WC,loadingIndicator:FC,loadingMessage:lC,menu:nC,menuList:aC,menuPortal:fC,multiValue:JC,multiValueLabel:qC,multiValueRemove:QC,noOptionsMessage:cC,option:n7,placeholder:s7,singleValue:c7,valueContainer:mC},X7={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},z7=4,t1=4,Y7=38,J7=t1*2,q7={baseUnit:t1,controlHeight:Y7,menuGutter:J7},Xc={borderRadius:z7,colors:X7,spacing:q7},Q7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Lf(),captureMenuScroll:!Lf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:I7(),formatGroupLabel:H7,getOptionLabel:Kf,getOptionValue:e1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:W7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!z9(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function n1(e,t,n,r){var o=i1(e,t,n),s=c1(e,t,n),a=a1(e,t),i=_a(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function Ia(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return n1(e,a,t,i)}).filter(function(a){return s1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=n1(e,n,t,r);return s1(e,s)?s:void 0}).filter(q9)}function r1(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Qr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function o1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Qr(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function $7(e,t){return r1(Ia(e,t))}function s1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!u1(e)||!s)&&l1(e,{label:a,value:i,data:o},r)}function U7(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function K7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var zc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},a1=function(t,n){return t.getOptionLabel(n)},_a=function(t,n){return t.getOptionValue(n)};function i1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function c1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=_a(e,t);return n.some(function(o){return _a(e,o)===r})}function l1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var u1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},e8=1,Sa=function(e){h6(n,e);var t=b6(n);function n(r){var o;if(f6(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=G7(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,l){var f=o.props,g=f.onChange,y=f.name;l.name=y,o.ariaOnChange(c,l),g(c,l)},o.setValue=function(c,l,f){var g=o.props,y=g.closeMenuOnSelect,v=g.isMulti,b=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),y&&(o.setState({inputIsHiddenAfterUpdate:!v}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,g=l.isMulti,y=l.name,v=o.state.selectValue,b=g&&o.isOptionSelected(c,v),p=o.isOptionDisabled(c,v);if(b){var h=o.getOptionValue(c);o.setValue(v.filter(function(m){return o.getOptionValue(m)!==h}),"deselect-option",c)}else if(!p)g?o.setValue([].concat(Qr(v),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:y});return}f&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,f=o.state.selectValue,g=o.getOptionValue(c),y=f.filter(function(b){return o.getOptionValue(b)!==g}),v=Qo(l,y,y[0]||null);o.onChange(v,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Qo(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,l=o.state.selectValue,f=l[l.length-1],g=l.slice(0,l.length-1),y=Qo(c,g,g[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return zc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return o1(Ia(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,l=new Array(c),f=0;f<c;f++)l[f]=arguments[f];return V9.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return a1(o.props,c)},o.getOptionValue=function(c){return _a(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,g=Z7[c](l,f);g.boxSizing="border-box";var y=o.props.styles[c];return y?y(g,l):g},o.getClassNames=function(c,l){var f,g;return(f=(g=o.props.classNames)[c])===null||f===void 0?void 0:f.call(g,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return d7(o.props)},o.buildCategorizedOptions=function(){return Ia(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return r1(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:oe({value:c},l)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var l=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():l&&o.openMenu("first"):(l&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var l=o.props,f=l.isMulti,g=l.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&xa(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var l=c.touches,f=l&&l.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,f=l&&l.item(0);if(f){var g=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),v=5;o.userIsDragging=g>v||y>v}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:l}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var l=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:l}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var l=o.getFocusableOptions(),f=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return u1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,g=l.backspaceRemovesValue,y=l.escapeClearsValue,v=l.inputValue,b=l.isClearable,p=l.isDisabled,h=l.menuIsOpen,m=l.onKeyDown,C=l.tabSelectsValue,x=l.openMenuOnFocus,w=o.state,E=w.focusedOption,_=w.focusedValue,A=w.selectValue;if(!p&&!(typeof m=="function"&&(m(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||v)return;o.focusValue("previous");break;case"ArrowRight":if(!f||v)return;o.focusValue("next");break;case"Delete":case"Backspace":if(v)return;if(_)o.removeValue(_);else{if(!g)return;f?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!h||!C||!E||x&&o.isOptionSelected(E,A))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(h){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":h?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:v}),o.onMenuClose()):b&&y&&o.clearValue();break;case" ":if(v)return;if(!h){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":h?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":h?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!h)return;o.focusOption("pageup");break;case"PageDown":if(!h)return;o.focusOption("pagedown");break;case"Home":if(!h)return;o.focusOption("first");break;case"End":if(!h)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++e8),o.state.selectValue=Ca(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),a=o.buildFocusableOptions(),i=a.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=a[i],o.state.focusedOptionId=zc(s,a[i])}return o}return p6(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Tf(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,a=s.isDisabled,i=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&o.isDisabled||c&&i&&!o.menuIsOpen)&&this.focusInput(),c&&a&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!a&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Tf(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,a=this.state,i=a.selectValue,c=a.isFocused,l=this.buildFocusableOptions(),f=o==="first"?0:l.length-1;if(!this.props.isMulti){var g=l.indexOf(i[0]);g>-1&&(f=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[f],focusedOptionId:this.getFocusedOptionId(l[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(i);i||(c=-1);var l=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=l:f=c-1;break;case"next":c>-1&&c<l&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var c=0,l=i.indexOf(a);a||(l=-1),o==="up"?c=l>0?l-1:i.length-1:o==="down"?c=(l+1)%i.length:o==="pageup"?(c=l-s,c<0&&(c=0)):o==="pagedown"?(c=l+s,c>i.length-1&&(c=i.length-1)):o==="last"&&(c=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Xc):oe(oe({},Xc),this.props.theme):Xc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,f=this.setValue,g=this.props,y=g.isMulti,v=g.isRtl,b=g.options,p=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:p,isMulti:y,isRtl:v,options:b,selectOption:l,selectProps:g,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return i1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return c1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return l1(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,a=o.isSearchable,i=o.inputId,c=o.inputValue,l=o.tabIndex,f=o.form,g=o.menuIsOpen,y=o.required,v=this.getComponents(),b=v.Input,p=this.state,h=p.inputIsHidden,m=p.ariaSelection,C=this.commonProps,x=i||this.getElementId("input"),w=oe(oe(oe({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":y,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(b,ue({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:s,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},w)):T.createElement(S7,ue({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ya,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:f,value:""},w))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,f=s.SingleValue,g=s.Placeholder,y=this.commonProps,v=this.props,b=v.controlShouldRenderValue,p=v.isDisabled,h=v.isMulti,m=v.inputValue,C=v.placeholder,x=this.state,w=x.selectValue,E=x.focusedValue,_=x.isFocused;if(!this.hasValue()||!b)return m?null:T.createElement(g,ue({},y,{key:"placeholder",isDisabled:p,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),C);if(h)return w.map(function(S,L){var k=S===E,R="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,ue({},y,{components:{Container:i,Label:c,Remove:l},isFocused:k,isDisabled:p,key:R,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(m)return null;var A=w[0];return T.createElement(f,ue({},y,{data:A,isDisabled:p}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:g,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!s||!l)return null;var g={"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:g,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return T.createElement(a,ue({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:l,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,l=s.MenuList,f=s.MenuPortal,g=s.LoadingMessage,y=s.NoOptionsMessage,v=s.Option,b=this.commonProps,p=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,C=h.inputValue,x=h.isLoading,w=h.loadingMessage,E=h.minMenuHeight,_=h.maxMenuHeight,A=h.menuIsOpen,S=h.menuPlacement,L=h.menuPosition,k=h.menuPortalTarget,R=h.menuShouldBlockScroll,N=h.menuShouldScrollIntoView,M=h.noOptionsMessage,V=h.onMenuScrollToTop,Z=h.onMenuScrollToBottom;if(!A)return null;var J=function(H,G){var j=H.type,q=H.data,ne=H.isDisabled,re=H.isSelected,B=H.label,U=H.value,fe=p===q,Y=ne?void 0:function(){return o.onOptionHover(q)},Ze=ne?void 0:function(){return o.selectOption(q)},_e="".concat(o.getElementId("option"),"-").concat(G),et={id:_e,onClick:Ze,onMouseMove:Y,onMouseOver:Y,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:re};return T.createElement(v,ue({},b,{innerProps:et,data:q,isDisabled:ne,isSelected:re,key:_e,label:B,type:j,value:U,isFocused:fe,innerRef:fe?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(H.data,"menu"))},$;if(this.hasOptions())$=this.getCategorizedOptions().map(function(D){if(D.type==="group"){var H=D.data,G=D.options,j=D.index,q="".concat(o.getElementId("group"),"-").concat(j),ne="".concat(q,"-heading");return T.createElement(a,ue({},b,{key:q,data:H,options:G,Heading:i,headingProps:{id:ne,data:D.data},label:o.formatGroupLabel(D.data)}),D.options.map(function(re){return J(re,"".concat(j,"-").concat(re.index))}))}else if(D.type==="option")return J(D,"".concat(D.index))});else if(x){var X=w({inputValue:C});if(X===null)return null;$=T.createElement(g,b,X)}else{var z=M({inputValue:C});if(z===null)return null;$=T.createElement(y,b,z)}var se={minMenuHeight:E,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:N},de=T.createElement(rC,ue({},b,se),function(D){var H=D.ref,G=D.placerProps,j=G.placement,q=G.maxHeight;return T.createElement(c,ue({},b,se,{innerRef:H,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:x,placement:j}),T.createElement(D7,{captureEnabled:m,onTopArrive:V,onBottomArrive:Z,lockEnabled:R},function(ne){return T.createElement(l,ue({},b,{innerRef:function(B){o.getMenuListRef(B),ne(B)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:x,maxHeight:q,focusedOption:p}),$)}))});return k||L==="fixed"?T.createElement(f,ue({},b,{appendTo:k,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),de):de}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,f=s.required,g=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(P7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var y=g.map(function(p){return o.getOptionValue(p)}).join(a);return T.createElement("input",{name:l,type:"hidden",value:y})}else{var v=g.length>0?g.map(function(p,h){return T.createElement("input",{key:"i-".concat(h),name:l,type:"hidden",value:o.getOptionValue(p)})}):T.createElement("input",{name:l,type:"hidden",value:""});return T.createElement("div",null,v)}else{var b=g[0]?this.getOptionValue(g[0]):"";return T.createElement("input",{name:l,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,f=s.selectValue,g=this.getFocusableOptions();return T.createElement(x7,ue({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,l=this.props,f=l.className,g=l.id,y=l.isDisabled,v=l.menuIsOpen,b=this.state.isFocused,p=this.commonProps=this.getCommonProps();return T.createElement(i,ue({},p,{className:f,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:b}),this.renderLiveRegion(),T.createElement(s,ue({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:b,menuIsOpen:v}),T.createElement(c,ue({},p,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,ue({},p,{isDisabled:y}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,f=s.isFocused,g=s.prevWasFocused,y=s.instancePrefix,v=o.options,b=o.value,p=o.menuIsOpen,h=o.inputValue,m=o.isMulti,C=Ca(b),x={};if(a&&(b!==a.value||v!==a.options||p!==a.menuIsOpen||h!==a.inputValue)){var w=p?$7(o,C):[],E=p?o1(Ia(o,C),"".concat(y,"-option")):[],_=i?U7(s,C):null,A=K7(s,w),S=zc(E,A);x={selectValue:C,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},k=l,R=f&&g;return f&&!R&&(k={value:Qo(m,C,C[0]||null),options:C,action:"initial-input-focus"},R=!g),(l==null?void 0:l.action)==="initial-input-focus"&&(k=null),oe(oe(oe({},x),L),{},{prevProps:o,ariaSelection:k,prevWasFocused:R})}}]),n}(I.Component);Sa.defaultProps=Q7;var t8=I.forwardRef(function(e,t){var n=vc(e);return T.createElement(Sa,ue({ref:t},n))}),n8=t8;const r8=u.styled(u.Box)`
614
+ `]))),DC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return ae({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:i*2})},Bc=function(t){var n=t.delay,r=t.offset;return ie("span",{css:kc({animation:"".concat(kC," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},NC=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Jt(t,wC);return ie("div",de({},Ze(ae(ae({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ie(Bc,{delay:0,offset:r}),ie(Bc,{delay:160,offset:!0}),ie(Bc,{delay:320,offset:!r}))},RC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return ae({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:o?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:o?a.primary:a.neutral30}})},MC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ie("div",de({ref:s},Ze(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},PC=MC,jC=["data"],BC=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},VC=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,l=t.label,f=t.theme,g=t.selectProps;return ie("div",de({},Ze(t,"group",{group:!0}),c),ie(a,de({},i,{selectProps:g,theme:f,getStyles:o,getClassNames:s,cx:r}),l),ie("div",null,n))},GC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ae({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},HC=function(t){var n=Sf(t);n.data;var r=Jt(n,jC);return ie("div",de({},Ze(t,"groupHeading",{"group-heading":!0}),r))},WC=VC,ZC=["innerRef","isDisabled","isHidden","inputClassName"],XC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return ae(ae({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},zC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},jf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},zC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ae({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},jf)},YC=function(t){return ae({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},jf)},JC=function(t){var n=t.cx,r=t.value,o=Sf(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Jt(o,ZC);return ie("div",de({},Ze(t,"input",{"input-container":!0}),{"data-value":r||""}),ie("input",de({className:n({input:!0},c),ref:s,style:YC(i),disabled:a},l)))},qC=JC,QC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return ae({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},$C=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return ae({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},UC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return ae({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Bf=function(t){var n=t.children,r=t.innerProps;return ie("div",r,n)},KC=Bf,e7=Bf;function t7(e){var t=e.children,n=e.innerProps;return ie("div",de({role:"button"},n),t||ie(jc,{size:14}))}var n7=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,l=r.Container,f=r.Label,g=r.Remove;return ie(l,{data:o,innerProps:ae(ae({},Ze(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ie(f,{data:o,innerProps:ae({},Ze(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ie(g,{data:o,innerProps:ae(ae({},Ze(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},r7=n7,o7=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return ae({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(i.baseUnit*2,"px ").concat(i.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},s7=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ie("div",de({},Ze(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},a7=s7,i7=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ae({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},c7=function(t){var n=t.children,r=t.innerProps;return ie("div",de({},Ze(t,"placeholder",{placeholder:!0}),r),n)},l7=c7,u7=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return ae({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},d7=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ie("div",de({},Ze(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},f7=d7,an={ClearIndicator:LC,Control:PC,DropdownIndicator:TC,DownChevron:Mf,CrossIcon:jc,Group:WC,GroupHeading:HC,IndicatorsContainer:vC,IndicatorSeparator:FC,Input:qC,LoadingIndicator:NC,Menu:iC,MenuList:lC,MenuPortal:gC,LoadingMessage:pC,NoOptionsMessage:fC,MultiValue:r7,MultiValueContainer:KC,MultiValueLabel:e7,MultiValueRemove:t7,Option:a7,Placeholder:l7,SelectContainer:bC,SingleValue:f7,ValueContainer:CC},p7=function(t){return ae(ae({},an),t.components)},Vf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function h7(e,t){return!!(e===t||Vf(e)&&Vf(t))}function g7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!h7(e[n],t[n]))return!1;return!0}function m7(e,t){t===void 0&&(t=g7);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}function b7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var y7=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:b7},C7=function(t){return ie("span",de({css:y7},t))},Gf=C7,x7={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,a=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,a=s===void 0?"":s,i=t.selectValue,c=t.isDisabled,l=t.isSelected,f=t.isAppleDevice,g=function(p,h){return p&&p.length?"".concat(p.indexOf(h)+1," of ").concat(p.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(g(i,r),".");if(n==="menu"&&f){var y=c?" disabled":"",v="".concat(l?" selected":"").concat(y);return"".concat(a).concat(v,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},v7=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,l=t.id,f=t.isAppleDevice,g=c.ariaLiveMessages,y=c.getOptionLabel,v=c.inputValue,b=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,C=c.options,x=c.screenReaderStatus,w=c.tabSelectsValue,E=c.isLoading,_=c["aria-label"],T=c["aria-live"],S=I.useMemo(function(){return ae(ae({},x7),g||{})},[g]),L=I.useMemo(function(){var Y="";if(n&&S.onChange){var X=n.option,J=n.options,z=n.removedValue,q=n.removedValues,ne=n.value,ce=function(re){return Array.isArray(re)?null:re},V=z||X||ce(ne),N=V?y(V):"",H=J||q||void 0,j=H?H.map(y):[],$=ae({isDisabled:V&&p(V,i),label:N,labels:j},n);Y=S.onChange($)}return Y},[n,S,p,i,y]),R=I.useMemo(function(){var Y="",X=r||o,J=!!(r&&i&&i.includes(r));if(X&&S.onFocus){var z={focused:X,label:y(X),isDisabled:p(X,i),isSelected:J,options:s,context:X===r?"menu":"value",selectValue:i,isAppleDevice:f};Y=S.onFocus(z)}return Y},[r,o,y,p,S,s,i,f]),k=I.useMemo(function(){var Y="";if(m&&C.length&&!E&&S.onFilter){var X=x({count:s.length});Y=S.onFilter({inputValue:v,resultsMessage:X})}return Y},[s,v,m,S,C,x,E]),D=(n==null?void 0:n.action)==="initial-input-focus",M=I.useMemo(function(){var Y="";if(S.guidance){var X=o?"value":m?"menu":"input";Y=S.guidance({"aria-label":_,context:X,isDisabled:r&&p(r,i),isMulti:b,isSearchable:h,tabSelectsValue:w,isInitialFocus:D})}return Y},[_,r,o,b,p,h,m,S,i,w,D]),G=ie(I.Fragment,null,ie("span",{id:"aria-selection"},L),ie("span",{id:"aria-focused"},R),ie("span",{id:"aria-results"},k),ie("span",{id:"aria-guidance"},M));return ie(I.Fragment,null,ie(Gf,{id:l},D&&G),ie(Gf,{"aria-live":T,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!D&&G))},E7=v7,Vc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],w7=new RegExp("["+Vc.map(function(e){return e.letters}).join("")+"]","g"),Hf={},Gc=0;Gc<Vc.length;Gc++)for(var Hc=Vc[Gc],Wc=0;Wc<Hc.letters.length;Wc++)Hf[Hc.letters[Wc]]=Hc.base;var Wf=function(t){return t.replace(w7,function(n){return Hf[n]})},I7=m7(Wf),Zf=function(t){return t.replace(/^\s+|\s+$/g,"")},_7=function(t){return"".concat(t.label," ").concat(t.value)},S7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ae({ignoreCase:!0,ignoreAccents:!0,stringify:_7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?Zf(r):r,g=c?Zf(i(n)):i(n);return s&&(f=f.toLowerCase(),g=g.toLowerCase()),a&&(f=I7(f),g=Wf(g)),l==="start"?g.substr(0,f.length)===f:g.indexOf(f)>-1}},T7=["innerRef"];function A7(e){var t=e.innerRef,n=Jt(e,T7),r=K9(n,"onExited","in","enter","exit","appear");return ie("input",de({ref:t},r,{css:kc({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var L7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function O7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=I.useRef(!1),i=I.useRef(!1),c=I.useRef(0),l=I.useRef(null),f=I.useCallback(function(h,m){if(l.current!==null){var C=l.current,x=C.scrollTop,w=C.scrollHeight,E=C.clientHeight,_=l.current,T=m>0,S=w-E-x,L=!1;S>m&&a.current&&(r&&r(h),a.current=!1),T&&i.current&&(s&&s(h),i.current=!1),T&&m>S?(n&&!a.current&&n(h),_.scrollTop=w,L=!0,a.current=!0):!T&&-m>x&&(o&&!i.current&&o(h),_.scrollTop=0,L=!0,i.current=!0),L&&L7(h)}},[n,r,o,s]),g=I.useCallback(function(h){f(h,h.deltaY)},[f]),y=I.useCallback(function(h){c.current=h.changedTouches[0].clientY},[]),v=I.useCallback(function(h){var m=c.current-h.changedTouches[0].clientY;f(h,m)},[f]),b=I.useCallback(function(h){if(h){var m=Q9?{passive:!1}:!1;h.addEventListener("wheel",g,m),h.addEventListener("touchstart",y,m),h.addEventListener("touchmove",v,m)}},[v,y,g]),p=I.useCallback(function(h){h&&(h.removeEventListener("wheel",g,!1),h.removeEventListener("touchstart",y,!1),h.removeEventListener("touchmove",v,!1))},[v,y,g]);return I.useEffect(function(){if(t){var h=l.current;return b(h),function(){p(h)}}},[t,b,p]),function(h){l.current=h}}var Xf=["boxSizing","height","overflow","paddingRight","position"],zf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Yf(e){e.preventDefault()}function Jf(e){e.stopPropagation()}function qf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Qf(){return"ontouchstart"in window||navigator.maxTouchPoints}var $f=!!(typeof window<"u"&&window.document&&window.document.createElement),Ko=0,to={capture:!1,passive:!1};function F7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=I.useRef({}),s=I.useRef(null),a=I.useCallback(function(c){if($f){var l=document.body,f=l&&l.style;if(r&&Xf.forEach(function(b){var p=f&&f[b];o.current[b]=p}),r&&Ko<1){var g=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,v=window.innerWidth-y+g||0;Object.keys(zf).forEach(function(b){var p=zf[b];f&&(f[b]=p)}),f&&(f.paddingRight="".concat(v,"px"))}l&&Qf()&&(l.addEventListener("touchmove",Yf,to),c&&(c.addEventListener("touchstart",qf,to),c.addEventListener("touchmove",Jf,to))),Ko+=1}},[r]),i=I.useCallback(function(c){if($f){var l=document.body,f=l&&l.style;Ko=Math.max(Ko-1,0),r&&Ko<1&&Xf.forEach(function(g){var y=o.current[g];f&&(f[g]=y)}),l&&Qf()&&(l.removeEventListener("touchmove",Yf,to),c&&(c.removeEventListener("touchstart",qf,to),c.removeEventListener("touchmove",Jf,to)))}},[r]);return I.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function k7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var D7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},N7=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:k7};function R7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,c=e.onTopLeave,l=O7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=F7({isEnabled:n}),g=function(v){l(v),f(v)};return ie(I.Fragment,null,n&&ie("div",{onClick:D7,css:N7}),t(g))}function M7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var P7=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:M7},j7=function(t){var n=t.name,r=t.onFocus;return ie("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:P7,value:"",onChange:function(){}})},B7=j7;function Zc(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function V7(){return Zc(/^iPhone/i)}function Uf(){return Zc(/^Mac/i)}function G7(){return Zc(/^iPad/i)||Uf()&&navigator.maxTouchPoints>1}function H7(){return V7()||G7()}function W7(){return Uf()||H7()}var Z7=function(t){return t.label},Kf=function(t){return t.label},e1=function(t){return t.value},X7=function(t){return!!t.isDisabled},z7={clearIndicator:AC,container:mC,control:RC,dropdownIndicator:SC,group:BC,groupHeading:GC,indicatorsContainer:xC,indicatorSeparator:OC,input:XC,loadingIndicator:DC,loadingMessage:dC,menu:oC,menuList:cC,menuPortal:hC,multiValue:QC,multiValueLabel:$C,multiValueRemove:UC,noOptionsMessage:uC,option:o7,placeholder:i7,singleValue:u7,valueContainer:yC},Y7={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},J7=4,t1=4,q7=38,Q7=t1*2,$7={baseUnit:t1,controlHeight:q7,menuGutter:Q7},Xc={borderRadius:J7,colors:Y7,spacing:$7},U7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Lf(),captureMenuScroll:!Lf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:S7(),formatGroupLabel:Z7,getOptionLabel:Kf,getOptionValue:e1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:X7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!J9(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function n1(e,t,n,r){var o=i1(e,t,n),s=c1(e,t,n),a=a1(e,t),i=_a(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function Ia(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return n1(e,a,t,i)}).filter(function(a){return s1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=n1(e,n,t,r);return s1(e,s)?s:void 0}).filter($9)}function r1(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,$r(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function o1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,$r(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function K7(e,t){return r1(Ia(e,t))}function s1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!u1(e)||!s)&&l1(e,{label:a,value:i,data:o},r)}function e8(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function t8(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var zc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},a1=function(t,n){return t.getOptionLabel(n)},_a=function(t,n){return t.getOptionValue(n)};function i1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function c1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=_a(e,t);return n.some(function(o){return _a(e,o)===r})}function l1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var u1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},n8=1,Sa=function(e){m6(n,e);var t=C6(n);function n(r){var o;if(h6(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=W7(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,l){var f=o.props,g=f.onChange,y=f.name;l.name=y,o.ariaOnChange(c,l),g(c,l)},o.setValue=function(c,l,f){var g=o.props,y=g.closeMenuOnSelect,v=g.isMulti,b=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),y&&(o.setState({inputIsHiddenAfterUpdate:!v}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,g=l.isMulti,y=l.name,v=o.state.selectValue,b=g&&o.isOptionSelected(c,v),p=o.isOptionDisabled(c,v);if(b){var h=o.getOptionValue(c);o.setValue(v.filter(function(m){return o.getOptionValue(m)!==h}),"deselect-option",c)}else if(!p)g?o.setValue([].concat($r(v),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:y});return}f&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,f=o.state.selectValue,g=o.getOptionValue(c),y=f.filter(function(b){return o.getOptionValue(b)!==g}),v=Uo(l,y,y[0]||null);o.onChange(v,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Uo(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,l=o.state.selectValue,f=l[l.length-1],g=l.slice(0,l.length-1),y=Uo(c,g,g[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return zc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return o1(Ia(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,l=new Array(c),f=0;f<c;f++)l[f]=arguments[f];return H9.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return a1(o.props,c)},o.getOptionValue=function(c){return _a(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,g=z7[c](l,f);g.boxSizing="border-box";var y=o.props.styles[c];return y?y(g,l):g},o.getClassNames=function(c,l){var f,g;return(f=(g=o.props.classNames)[c])===null||f===void 0?void 0:f.call(g,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return p7(o.props)},o.buildCategorizedOptions=function(){return Ia(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return r1(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:ae({value:c},l)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var l=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():l&&o.openMenu("first"):(l&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var l=o.props,f=l.isMulti,g=l.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&xa(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var l=c.touches,f=l&&l.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,f=l&&l.item(0);if(f){var g=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),v=5;o.userIsDragging=g>v||y>v}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:l}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var l=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:l}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var l=o.getFocusableOptions(),f=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return u1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,g=l.backspaceRemovesValue,y=l.escapeClearsValue,v=l.inputValue,b=l.isClearable,p=l.isDisabled,h=l.menuIsOpen,m=l.onKeyDown,C=l.tabSelectsValue,x=l.openMenuOnFocus,w=o.state,E=w.focusedOption,_=w.focusedValue,T=w.selectValue;if(!p&&!(typeof m=="function"&&(m(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||v)return;o.focusValue("previous");break;case"ArrowRight":if(!f||v)return;o.focusValue("next");break;case"Delete":case"Backspace":if(v)return;if(_)o.removeValue(_);else{if(!g)return;f?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!h||!C||!E||x&&o.isOptionSelected(E,T))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(h){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":h?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:v}),o.onMenuClose()):b&&y&&o.clearValue();break;case" ":if(v)return;if(!h){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":h?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":h?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!h)return;o.focusOption("pageup");break;case"PageDown":if(!h)return;o.focusOption("pagedown");break;case"Home":if(!h)return;o.focusOption("first");break;case"End":if(!h)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++n8),o.state.selectValue=Ca(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),a=o.buildFocusableOptions(),i=a.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=a[i],o.state.focusedOptionId=zc(s,a[i])}return o}return g6(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Af(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,a=s.isDisabled,i=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&o.isDisabled||c&&i&&!o.menuIsOpen)&&this.focusInput(),c&&a&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!a&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Af(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,a=this.state,i=a.selectValue,c=a.isFocused,l=this.buildFocusableOptions(),f=o==="first"?0:l.length-1;if(!this.props.isMulti){var g=l.indexOf(i[0]);g>-1&&(f=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[f],focusedOptionId:this.getFocusedOptionId(l[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(i);i||(c=-1);var l=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=l:f=c-1;break;case"next":c>-1&&c<l&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var c=0,l=i.indexOf(a);a||(l=-1),o==="up"?c=l>0?l-1:i.length-1:o==="down"?c=(l+1)%i.length:o==="pageup"?(c=l-s,c<0&&(c=0)):o==="pagedown"?(c=l+s,c>i.length-1&&(c=i.length-1)):o==="last"&&(c=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Xc):ae(ae({},Xc),this.props.theme):Xc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,f=this.setValue,g=this.props,y=g.isMulti,v=g.isRtl,b=g.options,p=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:p,isMulti:y,isRtl:v,options:b,selectOption:l,selectProps:g,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return i1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return c1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return l1(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,a=o.isSearchable,i=o.inputId,c=o.inputValue,l=o.tabIndex,f=o.form,g=o.menuIsOpen,y=o.required,v=this.getComponents(),b=v.Input,p=this.state,h=p.inputIsHidden,m=p.ariaSelection,C=this.commonProps,x=i||this.getElementId("input"),w=ae(ae(ae({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":y,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?A.createElement(b,de({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:s,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},w)):A.createElement(A7,de({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ya,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:f,value:""},w))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,f=s.SingleValue,g=s.Placeholder,y=this.commonProps,v=this.props,b=v.controlShouldRenderValue,p=v.isDisabled,h=v.isMulti,m=v.inputValue,C=v.placeholder,x=this.state,w=x.selectValue,E=x.focusedValue,_=x.isFocused;if(!this.hasValue()||!b)return m?null:A.createElement(g,de({},y,{key:"placeholder",isDisabled:p,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),C);if(h)return w.map(function(S,L){var R=S===E,k="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return A.createElement(a,de({},y,{components:{Container:i,Label:c,Remove:l},isFocused:R,isDisabled:p,key:k,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(m)return null;var T=w[0];return A.createElement(f,de({},y,{data:T,isDisabled:p}),this.formatOptionLabel(T,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:g,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!s||!l)return null;var g={"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:g,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return A.createElement(a,de({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:l,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,l=s.MenuList,f=s.MenuPortal,g=s.LoadingMessage,y=s.NoOptionsMessage,v=s.Option,b=this.commonProps,p=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,C=h.inputValue,x=h.isLoading,w=h.loadingMessage,E=h.minMenuHeight,_=h.maxMenuHeight,T=h.menuIsOpen,S=h.menuPlacement,L=h.menuPosition,R=h.menuPortalTarget,k=h.menuShouldBlockScroll,D=h.menuShouldScrollIntoView,M=h.noOptionsMessage,G=h.onMenuScrollToTop,Y=h.onMenuScrollToBottom;if(!T)return null;var X=function(N,H){var j=N.type,$=N.data,oe=N.isDisabled,re=N.isSelected,B=N.label,te=N.value,fe=p===$,Z=oe?void 0:function(){return o.onOptionHover($)},Ye=oe?void 0:function(){return o.selectOption($)},Se="".concat(o.getElementId("option"),"-").concat(H),Je={id:Se,onClick:Ye,onMouseMove:Z,onMouseOver:Z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:re};return A.createElement(v,de({},b,{innerProps:Je,data:$,isDisabled:oe,isSelected:re,key:Se,label:B,type:j,value:te,isFocused:fe,innerRef:fe?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(N.data,"menu"))},J;if(this.hasOptions())J=this.getCategorizedOptions().map(function(V){if(V.type==="group"){var N=V.data,H=V.options,j=V.index,$="".concat(o.getElementId("group"),"-").concat(j),oe="".concat($,"-heading");return A.createElement(a,de({},b,{key:$,data:N,options:H,Heading:i,headingProps:{id:oe,data:V.data},label:o.formatGroupLabel(V.data)}),V.options.map(function(re){return X(re,"".concat(j,"-").concat(re.index))}))}else if(V.type==="option")return X(V,"".concat(V.index))});else if(x){var z=w({inputValue:C});if(z===null)return null;J=A.createElement(g,b,z)}else{var q=M({inputValue:C});if(q===null)return null;J=A.createElement(y,b,q)}var ne={minMenuHeight:E,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:D},ce=A.createElement(sC,de({},b,ne),function(V){var N=V.ref,H=V.placerProps,j=H.placement,$=H.maxHeight;return A.createElement(c,de({},b,ne,{innerRef:N,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:x,placement:j}),A.createElement(R7,{captureEnabled:m,onTopArrive:G,onBottomArrive:Y,lockEnabled:k},function(oe){return A.createElement(l,de({},b,{innerRef:function(B){o.getMenuListRef(B),oe(B)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:x,maxHeight:$,focusedOption:p}),J)}))});return R||L==="fixed"?A.createElement(f,de({},b,{appendTo:R,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),ce):ce}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,f=s.required,g=this.state.selectValue;if(f&&!this.hasValue()&&!i)return A.createElement(B7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var y=g.map(function(p){return o.getOptionValue(p)}).join(a);return A.createElement("input",{name:l,type:"hidden",value:y})}else{var v=g.length>0?g.map(function(p,h){return A.createElement("input",{key:"i-".concat(h),name:l,type:"hidden",value:o.getOptionValue(p)})}):A.createElement("input",{name:l,type:"hidden",value:""});return A.createElement("div",null,v)}else{var b=g[0]?this.getOptionValue(g[0]):"";return A.createElement("input",{name:l,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,f=s.selectValue,g=this.getFocusableOptions();return A.createElement(E7,de({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,l=this.props,f=l.className,g=l.id,y=l.isDisabled,v=l.menuIsOpen,b=this.state.isFocused,p=this.commonProps=this.getCommonProps();return A.createElement(i,de({},p,{className:f,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:b}),this.renderLiveRegion(),A.createElement(s,de({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:b,menuIsOpen:v}),A.createElement(c,de({},p,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),A.createElement(a,de({},p,{isDisabled:y}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,f=s.isFocused,g=s.prevWasFocused,y=s.instancePrefix,v=o.options,b=o.value,p=o.menuIsOpen,h=o.inputValue,m=o.isMulti,C=Ca(b),x={};if(a&&(b!==a.value||v!==a.options||p!==a.menuIsOpen||h!==a.inputValue)){var w=p?K7(o,C):[],E=p?o1(Ia(o,C),"".concat(y,"-option")):[],_=i?e8(s,C):null,T=t8(s,w),S=zc(E,T);x={selectValue:C,focusedOption:T,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=l,k=f&&g;return f&&!k&&(R={value:Uo(m,C,C[0]||null),options:C,action:"initial-input-focus"},k=!g),(l==null?void 0:l.action)==="initial-input-focus"&&(R=null),ae(ae(ae({},x),L),{},{prevProps:o,ariaSelection:R,prevWasFocused:k})}}]),n}(I.Component);Sa.defaultProps=U7;var r8=I.forwardRef(function(e,t){var n=vc(e);return A.createElement(Sa,de({ref:t},n))}),o8=r8;const s8=u.styled(u.Box)`
615
615
  display: flex;
616
616
  align-items: center;
617
617
  gap: 2px;
@@ -622,12 +622,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
622
622
  max-width: 100%;
623
623
  overflow-wrap: break-word;
624
624
  }
625
- `,o8=u.styled("img")`
625
+ `,a8=u.styled("img")`
626
626
  width: 24px;
627
627
  height: 24px;
628
628
  border-radius: 50%;
629
629
  margin-right: 12px;
630
- `;function d1(e){const{data:t}=e;return d.jsx(cn.Option,{...e,children:d.jsxs(r8,{children:[t.avatarUrl?d.jsx(o8,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,d.jsx("span",{children:e.children})]})})}const s8=u.styled(u.Box)`
630
+ `;function d1(e){const{data:t}=e;return d.jsx(an.Option,{...e,children:d.jsxs(s8,{children:[t.avatarUrl?d.jsx(a8,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,d.jsx("span",{children:e.children})]})})}const i8=u.styled(u.Box)`
631
631
  height: 24px;
632
632
  width: 24px;
633
633
  border-radius: 50%;
@@ -652,27 +652,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
652
652
  &:after {
653
653
  transform: rotate(-45deg);
654
654
  }
655
- `,f1=e=>d.jsx(cn.ClearIndicator,{...e,children:d.jsx(s8,{})}),p1=(e,t)=>({...e,placeholder:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.placeholder)==null?void 0:o.call(e,n,r),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},control:(n,r)=>{var o;return{...n,backgroundColor:"transparent",...(o=e==null?void 0:e.control)==null?void 0:o.call(e,n,r)}},...t?{menuPortal:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.menuPortal)==null?void 0:o.call(e,n,r),zIndex:t,fontFamily:u.theme.typography.fontFamily,fontSize:"13px"}}}:null}),a8=u.styled(u.Stack)`
655
+ `,f1=e=>d.jsx(an.ClearIndicator,{...e,children:d.jsx(i8,{})}),p1=(e,t)=>({...e,placeholder:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.placeholder)==null?void 0:o.call(e,n,r),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},control:(n,r)=>{var o;return{...n,backgroundColor:"transparent",...(o=e==null?void 0:e.control)==null?void 0:o.call(e,n,r)}},...t?{menuPortal:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.menuPortal)==null?void 0:o.call(e,n,r),zIndex:t,fontFamily:u.theme.typography.fontFamily,fontSize:"13px"}}}:null}),c8=u.styled(u.Stack)`
656
656
  width: 0;
657
657
  height: 0;
658
- `,i8=({root:e,rootMargin:t,callback:n})=>{const r=I.useRef(null),o=I.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const a=new IntersectionObserver(i=>{const c=i[0];n(c)},{root:e,rootMargin:t});a.observe(s),r.current=a},[e,t,n]);return d.jsx(a8,{ref:o})},h1=({options:e,isMulti:t,isScrollTarget:n})=>{const r=I.useRef(),o=I.useMemo(()=>e?Object.fromEntries(e.map(i=>[i.value,i])):{},[e]);return{optionsMap:o,getValue:i=>{var f;if(t||typeof i=="object")return i;const c=o[i];return c&&(r.current=c),i===((f=r.current)==null?void 0:f.value)?r.current:i},closeMenuOnScroll:n?i=>{const c=i.target;return!n||!c?!1:n(c)}:void 0}},c8=e=>d.jsx(cn.DropdownIndicator,{...e,children:d.jsx(u.Icon,{children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{}):d.jsx(u.icons.ArrowDropDown,{})})}),g1=()=>({ClearIndicator:f1,DropdownIndicator:c8,IndicatorSeparator:()=>null,Option:d1}),Uo=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=I.useState(!1),c=I.useCallback(g=>{i(!g.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=h1({options:o,isMulti:s,isScrollTarget:t});return d.jsxs(d.Fragment,{children:[n.menuPortalTarget&&n.root?d.jsx(i8,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,d.jsx(n8,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:p1(n.styles,e),components:n.components?n.components:g1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};Uo.getDefaultComponents=g1;const m1="Required Field",l8="Validation Failed";var b1=(e=>(e.DATE="DD/MM/YYYY",e))(b1||{}),u8=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function y1(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var a=e.isLoading,i=a===void 0?!1:a,c=e.onInputChange,l=e.filterOption,f=l===void 0?null:l,g=Jt(e,u8),y=g.inputValue,v=I.useRef(void 0),b=I.useRef(!1),p=I.useState(Array.isArray(n)?n:void 0),h=nt(p,2),m=h[0],C=h[1],x=I.useState(typeof y<"u"?y:""),w=nt(x,2),E=w[0],_=w[1],A=I.useState(n===!0),S=nt(A,2),L=S[0],k=S[1],R=I.useState(void 0),N=nt(R,2),M=N[0],V=N[1],Z=I.useState([]),J=nt(Z,2),$=J[0],X=J[1],z=I.useState(!1),se=nt(z,2),de=se[0],D=se[1],H=I.useState({}),G=nt(H,2),j=G[0],q=G[1],ne=I.useState(void 0),re=nt(ne,2),B=re[0],U=re[1],fe=I.useState(void 0),Y=nt(fe,2),Ze=Y[0],_e=Y[1];o!==Ze&&(q({}),_e(o)),n!==B&&(C(Array.isArray(n)?n:void 0),U(n)),I.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var et=I.useCallback(function(Dt,rt){if(!s)return rt();var Je=s(Dt,rt);Je&&typeof Je.then=="function"&&Je.then(rt,function(){return rt()})},[s]);I.useEffect(function(){n===!0&&et(E,function(Dt){b.current&&(C(Dt||[]),k(!!v.current))})},[]);var kt=I.useCallback(function(Dt,rt){var Je=G9(Dt,rt,c);if(!Je){v.current=void 0,_(""),V(""),X([]),k(!1),D(!1);return}if(o&&j[Je])_(Je),V(Je),X(j[Je]),k(!1),D(!1);else{var Sn=v.current={};_(Je),k(!0),D(!M),et(Je,function(vt){b&&Sn===v.current&&(v.current=void 0,k(!1),V(Je),X(vt||[]),D(!1),q(vt?oe(oe({},j),{},qr({},Je,vt)):j))})}},[o,et,M,j,c]),Jn=de?[]:E&&M?$:m||[];return oe(oe({},g),{},{options:Jn,isLoading:L||i,onInputChange:kt,filterOption:f})}var d8=I.forwardRef(function(e,t){var n=y1(e),r=vc(n);return T.createElement(Sa,ue({ref:t},r))}),f8=d8,p8=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],C1=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return s===o||a===o},Yc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return C1(t,s,o)})||r.some(function(s){return C1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function h8(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,s=e.formatCreateLabel,a=s===void 0?Yc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Yc.isValidNewOption:i,l=e.getNewOptionData,f=l===void 0?Yc.getNewOptionData:l,g=e.onCreateOption,y=e.options,v=y===void 0?[]:y,b=e.onChange,p=Jt(e,p8),h=p.getOptionValue,m=h===void 0?e1:h,C=p.getOptionLabel,x=C===void 0?Kf:C,w=p.inputValue,E=p.isLoading,_=p.isMulti,A=p.value,S=p.name,L=I.useMemo(function(){return c(w,Ca(A),v,{getOptionValue:m,getOptionLabel:x})?f(w,a(w)):void 0},[a,f,x,m,w,c,v,A]),k=I.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat(Qr(v)):[].concat(Qr(v),[L]):v},[n,o,E,L,v]),R=I.useCallback(function(N,M){if(M.action!=="select-option")return b(N,M);var V=Array.isArray(N)?N:[N];if(V[V.length-1]===L){if(g)g(w);else{var Z=f(w,w),J={action:"create-option",name:S,option:Z};b(Qo(_,[].concat(Qr(Ca(A)),[Z]),Z),J)}return}b(N,M)},[f,w,_,S,L,g,b,A]);return oe(oe({},p),{},{options:k,onChange:R})}var g8=I.forwardRef(function(e,t){var n=y1(e),r=vc(n),o=h8(r);return T.createElement(Sa,ue({ref:t},o))}),m8=g8;const b8=u.styled(u.Typography)`
658
+ `,l8=({root:e,rootMargin:t,callback:n})=>{const r=I.useRef(null),o=I.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const a=new IntersectionObserver(i=>{const c=i[0];n(c)},{root:e,rootMargin:t});a.observe(s),r.current=a},[e,t,n]);return d.jsx(c8,{ref:o})},h1=({options:e,isMulti:t,isScrollTarget:n})=>{const r=I.useRef(),o=I.useMemo(()=>e?Object.fromEntries(e.map(i=>[i.value,i])):{},[e]);return{optionsMap:o,getValue:i=>{var f;if(t||typeof i=="object")return i;const c=o[i];return c&&(r.current=c),i===((f=r.current)==null?void 0:f.value)?r.current:i},closeMenuOnScroll:n?i=>{const c=i.target;return!n||!c?!1:n(c)}:void 0}},u8=e=>d.jsx(an.DropdownIndicator,{...e,children:d.jsx(u.Icon,{children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{}):d.jsx(u.icons.ArrowDropDown,{})})}),g1=()=>({ClearIndicator:f1,DropdownIndicator:u8,IndicatorSeparator:()=>null,Option:d1}),es=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=I.useState(!1),c=I.useCallback(g=>{i(!g.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=h1({options:o,isMulti:s,isScrollTarget:t});return d.jsxs(d.Fragment,{children:[n.menuPortalTarget&&n.root?d.jsx(l8,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,d.jsx(o8,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:p1(n.styles,e),components:n.components?n.components:g1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};es.getDefaultComponents=g1;const m1="Required Field",d8="Validation Failed";var b1=(e=>(e.DATE="DD/MM/YYYY",e))(b1||{}),f8=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function y1(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var a=e.isLoading,i=a===void 0?!1:a,c=e.onInputChange,l=e.filterOption,f=l===void 0?null:l,g=Jt(e,f8),y=g.inputValue,v=I.useRef(void 0),b=I.useRef(!1),p=I.useState(Array.isArray(n)?n:void 0),h=nt(p,2),m=h[0],C=h[1],x=I.useState(typeof y<"u"?y:""),w=nt(x,2),E=w[0],_=w[1],T=I.useState(n===!0),S=nt(T,2),L=S[0],R=S[1],k=I.useState(void 0),D=nt(k,2),M=D[0],G=D[1],Y=I.useState([]),X=nt(Y,2),J=X[0],z=X[1],q=I.useState(!1),ne=nt(q,2),ce=ne[0],V=ne[1],N=I.useState({}),H=nt(N,2),j=H[0],$=H[1],oe=I.useState(void 0),re=nt(oe,2),B=re[0],te=re[1],fe=I.useState(void 0),Z=nt(fe,2),Ye=Z[0],Se=Z[1];o!==Ye&&($({}),Se(o)),n!==B&&(C(Array.isArray(n)?n:void 0),te(n)),I.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var Je=I.useCallback(function(Nt,at){if(!s)return at();var ze=s(Nt,at);ze&&typeof ze.then=="function"&&ze.then(at,function(){return at()})},[s]);I.useEffect(function(){n===!0&&Je(E,function(Nt){b.current&&(C(Nt||[]),R(!!v.current))})},[]);var Et=I.useCallback(function(Nt,at){var ze=W9(Nt,at,c);if(!ze){v.current=void 0,_(""),G(""),z([]),R(!1),V(!1);return}if(o&&j[ze])_(ze),G(ze),z(j[ze]),R(!1),V(!1);else{var Yn=v.current={};_(ze),R(!0),V(!M),Je(ze,function(wt){b&&Yn===v.current&&(v.current=void 0,R(!1),G(ze),z(wt||[]),V(!1),$(wt?ae(ae({},j),{},Qr({},ze,wt)):j))})}},[o,Je,M,j,c]),zn=ce?[]:E&&M?J:m||[];return ae(ae({},g),{},{options:zn,isLoading:L||i,onInputChange:Et,filterOption:f})}var p8=I.forwardRef(function(e,t){var n=y1(e),r=vc(n);return A.createElement(Sa,de({ref:t},r))}),h8=p8,g8=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],C1=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return s===o||a===o},Yc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return C1(t,s,o)})||r.some(function(s){return C1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function m8(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,s=e.formatCreateLabel,a=s===void 0?Yc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Yc.isValidNewOption:i,l=e.getNewOptionData,f=l===void 0?Yc.getNewOptionData:l,g=e.onCreateOption,y=e.options,v=y===void 0?[]:y,b=e.onChange,p=Jt(e,g8),h=p.getOptionValue,m=h===void 0?e1:h,C=p.getOptionLabel,x=C===void 0?Kf:C,w=p.inputValue,E=p.isLoading,_=p.isMulti,T=p.value,S=p.name,L=I.useMemo(function(){return c(w,Ca(T),v,{getOptionValue:m,getOptionLabel:x})?f(w,a(w)):void 0},[a,f,x,m,w,c,v,T]),R=I.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat($r(v)):[].concat($r(v),[L]):v},[n,o,E,L,v]),k=I.useCallback(function(D,M){if(M.action!=="select-option")return b(D,M);var G=Array.isArray(D)?D:[D];if(G[G.length-1]===L){if(g)g(w);else{var Y=f(w,w),X={action:"create-option",name:S,option:Y};b(Uo(_,[].concat($r(Ca(T)),[Y]),Y),X)}return}b(D,M)},[f,w,_,S,L,g,b,T]);return ae(ae({},p),{},{options:R,onChange:k})}var b8=I.forwardRef(function(e,t){var n=y1(e),r=vc(n),o=m8(r);return A.createElement(Sa,de({ref:t},o))}),y8=b8;const C8=u.styled(u.Typography)`
659
659
  display: block;
660
660
  white-space: nowrap;
661
661
  overflow: hidden;
662
662
  text-overflow: ellipsis;
663
- `,y8=(e,t)=>{const n=I.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},x1=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function C8(e){return d.jsx(cn.DropdownIndicator,{...e,children:d.jsx(u.Icon,{children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{}):d.jsx(u.icons.ArrowDropDown,{})})})}const x8=e=>d.jsxs(u.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[d.jsx(u.Stack,{flexShrink:0,children:d.jsx(x1,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),d.jsxs(b8,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function v8({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=I.useState([]),[s,a]=I.useState(""),[i,c]=I.useState(!1),l=I.useRef(),{isMulti:f,createOption:g,loadOptions:y,isApiSearchEnabled:v=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:p=!1}=n,{getValue:h,closeMenuOnScroll:m}=h1({options:r,isMulti:f,isScrollTarget:t}),C=(M,V,Z)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,y==null?void 0:y(M,V,Z,l.current)),x=y8((M,V)=>{if(a(M),r.length>0&&!v){const J=r.filter($=>$&&typeof $=="object"&&"label"in $&&typeof $.label=="string"?$.label.toLowerCase().includes(M.toLowerCase()):!1);V(J);return}const Z=J=>{V(J),o(J)};C==null||C(M,Z,!1)},300),w=(M,V)=>{c(!1),!(V&&"isError"in V&&V.isError)&&o(M)},E=M=>{var V;(V=n.onMenuScrollToBottom)==null||V.call(n,M),b&&y&&!i&&(c(!0),C(s,w,!0))},_=(M,V)=>{var Z;(Z=n.onInputChange)==null||Z.call(n,M,V),V.action==="input-change"&&v&&(a(M),o([]),M||(c(!0),x(M,w)))},A=M=>{var V;a(""),(V=n.onBlur)==null||V.call(n,M)},S=M=>{var V;(V=n.onFocus)==null||V.call(n,M),!i&&p&&(o([]),c(!0),C==null||C(s,w,!1))},L=M=>V=>{var J;const Z=V.find($=>$.label===M);!n.isMulti&&Z&&((J=n.onChange)==null||J.call(n,Z,{action:"select-option",name:n.name,option:Z})),o(V),c(!1)},k=M=>{c(!0),g==null||g(M,L(M))},R=()=>{c(!0),C==null||C(s,w,!1)},N=g?m8:f8;return d.jsx(N,{...n,menuShouldScrollIntoView:!1,value:n.value?h(n.value):null,isDisabled:n.disabled,loadOptions:x,onMenuScrollToBottom:E,onInputChange:_,onBlur:A,onFocus:S,onMenuOpen:R,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:p1(n.styles,e),components:{ClearIndicator:f1,DropdownIndicator:C8,IndicatorSeparator:()=>null,Option:d1},closeMenuOnScroll:m,...g?{formatCreateLabel:x8,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:k,options:r}:null})}const to="table-cell-form-field",Aa="60px",Ta="24px",E8=u.styled(u.Box)`
663
+ `,x8=(e,t)=>{const n=I.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},x1=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function v8(e){return d.jsx(an.DropdownIndicator,{...e,children:d.jsx(u.Icon,{children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{}):d.jsx(u.icons.ArrowDropDown,{})})})}const E8=e=>d.jsxs(u.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[d.jsx(u.Stack,{flexShrink:0,children:d.jsx(x1,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),d.jsxs(C8,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function w8({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=I.useState([]),[s,a]=I.useState(""),[i,c]=I.useState(!1),l=I.useRef(),{isMulti:f,createOption:g,loadOptions:y,isApiSearchEnabled:v=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:p=!1}=n,{getValue:h,closeMenuOnScroll:m}=h1({options:r,isMulti:f,isScrollTarget:t}),C=(M,G,Y)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,y==null?void 0:y(M,G,Y,l.current)),x=x8((M,G)=>{if(a(M),r.length>0&&!v){const X=r.filter(J=>J&&typeof J=="object"&&"label"in J&&typeof J.label=="string"?J.label.toLowerCase().includes(M.toLowerCase()):!1);G(X);return}const Y=X=>{G(X),o(X)};C==null||C(M,Y,!1)},300),w=(M,G)=>{c(!1),!(G&&"isError"in G&&G.isError)&&o(M)},E=M=>{var G;(G=n.onMenuScrollToBottom)==null||G.call(n,M),b&&y&&!i&&(c(!0),C(s,w,!0))},_=(M,G)=>{var Y;(Y=n.onInputChange)==null||Y.call(n,M,G),G.action==="input-change"&&v&&(a(M),o([]),M||(c(!0),x(M,w)))},T=M=>{var G;a(""),(G=n.onBlur)==null||G.call(n,M)},S=M=>{var G;(G=n.onFocus)==null||G.call(n,M),!i&&p&&(o([]),c(!0),C==null||C(s,w,!1))},L=M=>G=>{var X;const Y=G.find(J=>J.label===M);!n.isMulti&&Y&&((X=n.onChange)==null||X.call(n,Y,{action:"select-option",name:n.name,option:Y})),o(G),c(!1)},R=M=>{c(!0),g==null||g(M,L(M))},k=()=>{c(!0),C==null||C(s,w,!1)},D=g?y8:h8;return d.jsx(D,{...n,menuShouldScrollIntoView:!1,value:n.value?h(n.value):null,isDisabled:n.disabled,loadOptions:x,onMenuScrollToBottom:E,onInputChange:_,onBlur:T,onFocus:S,onMenuOpen:k,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:p1(n.styles,e),components:{ClearIndicator:f1,DropdownIndicator:v8,IndicatorSeparator:()=>null,Option:d1},closeMenuOnScroll:m,...g?{formatCreateLabel:E8,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:R,options:r}:null})}const no="table-cell-form-field",Ta="60px",Aa="24px",I8=u.styled(u.Box)`
664
664
  width: 100%;
665
- `,w8=u.styled(u.Box)`
665
+ `,_8=u.styled(u.Box)`
666
666
  width: 100%;
667
667
  overflow-x: auto;
668
- `,I8=u.styled(u.Box)`
668
+ `,S8=u.styled(u.Box)`
669
669
  --border-color: rgb(214, 221, 232);
670
670
  --border-size: 1px;
671
671
  display: grid;
672
672
  grid-template-columns: ${({gridColumns:e})=>e};
673
673
  border: 1px solid var(--border-color);
674
674
  border-radius; 4px;
675
- `,_8=u.styled(u.Stack)`
675
+ `,T8=u.styled(u.Stack)`
676
676
  margin-top: 16px;
677
677
  flex-direction: row;
678
678
  justify-content: space-between;
@@ -688,8 +688,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
688
688
  &:last-child {
689
689
  border-bottom: 0;
690
690
  }
691
- `,S8=u.styled(v1)`
692
- --cell-padding: 10px ${Ta};
691
+ `,A8=u.styled(v1)`
692
+ --cell-padding: 10px ${Aa};
693
693
  border-bottom: 1px solid var(--border-color);
694
694
  `,Jc=u.styled(u.Box)`
695
695
  border: var(--border-size) solid transparent;
@@ -718,7 +718,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
718
718
  width: 100%;
719
719
  height: 100%;
720
720
  }
721
- `,A8=u.styled(E1)`
721
+ `,L8=u.styled(E1)`
722
722
  box-sizing: content-box;
723
723
  padding: 4px 12px;
724
724
  color: rgb(80, 109, 255);
@@ -740,9 +740,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
740
740
  width: 20px;
741
741
  height: 20px;
742
742
  }
743
- `,T8=u.styled(u.Box)`
743
+ `,O8=u.styled(u.Box)`
744
744
  margin-left: auto;
745
- `,L8=u.styled(u.Stack)`
745
+ `,F8=u.styled(u.Stack)`
746
746
  box-sizing: content-box;
747
747
  padding: 4px 0;
748
748
  flex-direction: row;
@@ -752,31 +752,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
752
752
  min-height: 28px;
753
753
  color: ${u.theme.palette.gray.gray1};
754
754
  font-weight: bold;
755
- `,O8=u.styled(u.DatePicker)`
756
- &.${to} .MuiInputBase-root {
757
- height: ${Aa};
755
+ `,k8=u.styled(u.DatePicker)`
756
+ &.${no} .MuiInputBase-root {
757
+ height: ${Ta};
758
758
  border: 0;
759
- padding-left: ${Ta};
759
+ padding-left: ${Aa};
760
760
  }
761
- `;function F8(e){const[t,n]=I.useState(!1),r=I.useRef(null);I.useEffect(()=>{t&&r.current&&r.current.focus()},[t]);const o=(s,a)=>{s===null&&e.onChange(s,a),s&&typeof s.getTime=="function"&&!isNaN(s.getTime())&&e.onChange(s,a),e.onChange(s,a)};return d.jsx(O8,{inputFormat:e.inputFormat?e.inputFormat:b1.DATE,...e,value:e.value||null,open:t,onOpen:()=>n(!0),onClose:()=>n(!1),onChange:o,PopperProps:{anchorEl:r.current},renderInput:s=>d.jsx(u.DateTextField,{...s,fullWidth:!0,variant:"outlined",disabled:e.disabled,inputRef:r,inputProps:{...s.inputProps,placeholder:e.placeholder},onBlur:e.onBlur,onFocus:e.onFocus,InputProps:{endAdornment:d.jsx(u.InputAdornment,{position:"end",sx:{cursor:"pointer"},children:d.jsx(u.icons.CalendarTodayOutlinedIcon,{})})},onClick:()=>{t||n(!0)}})})}const k8=u.styled(u.Checkbox)`
762
- &.${to} {
763
- --v-margin: calc((${Aa} - 36px) / 2);
761
+ `;function D8(e){const[t,n]=I.useState(!1),r=I.useRef(null);I.useEffect(()=>{t&&r.current&&r.current.focus()},[t]);const o=(s,a)=>{s===null&&e.onChange(s,a),s&&typeof s.getTime=="function"&&!isNaN(s.getTime())&&e.onChange(s,a),e.onChange(s,a)};return d.jsx(k8,{inputFormat:e.inputFormat?e.inputFormat:b1.DATE,...e,value:e.value||null,open:t,onOpen:()=>n(!0),onClose:()=>n(!1),onChange:o,PopperProps:{anchorEl:r.current},renderInput:s=>d.jsx(u.DateTextField,{...s,fullWidth:!0,variant:"outlined",disabled:e.disabled,inputRef:r,inputProps:{...s.inputProps,placeholder:e.placeholder},onBlur:e.onBlur,onFocus:e.onFocus,InputProps:{endAdornment:d.jsx(u.InputAdornment,{position:"end",sx:{cursor:"pointer"},children:d.jsx(u.icons.CalendarTodayOutlinedIcon,{})})},onClick:()=>{t||n(!0)}})})}const N8=u.styled(u.Checkbox)`
762
+ &.${no} {
763
+ --v-margin: calc((${Ta} - 36px) / 2);
764
764
  --h-margin: calc((100% - 36px) / 2);
765
765
  margin: var(--v-margin) var(--h-margin);
766
766
  }
767
- `,D8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return d.jsx(k8,{onChange:o,onFocus:t,onBlur:n,...r})},w1=({label:e,isRequired:t,prefixNode:n,...r})=>e?d.jsxs(u.Typography,{variant:"h4",component:"label",color:u.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?d.jsx("span",{className:"required__star",children:"*"}):null]}):null,N8=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"})),I1=250,mr="__id",Ko={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:I1,arithmeticOperation:[]},La=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=Ko.defaultNumberOfRows,fixedRows:a=Ko.fixedRows,cellWidth:i=Ko.cellWidth,arithmeticOperation:c=Ko.arithmeticOperation}=Ko,fetchConfig:l={},createConfig:f={},stackIndex:g,onChange:y=()=>{},onFocus:v,onValidationError:b})=>{const p=t??[],h=(o==null?void 0:o.validations)??{},m=I.useRef(),C=I.useRef({}),[x,w]=I.useState({}),{colsLength:E,colsTemplate:_,colWidth:A}=I.useMemo(()=>{let D=0,H="";for(const G of r){let j=G.cols?Number(G.cols):1;isNaN(j)&&(j=1),D+=j,H+=`${G.cols??j}fr `}return a||(D+=.5,H+="0.5fr"),{colsLength:D,colsTemplate:H.trim(),colWidth:`${isNaN(i)?I1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=I.useMemo(()=>{const D={},H={};for(const G of r){if(!G.valueConfig)continue;H[G.name]=G.valueConfig;const j=G.valueConfig.columnNames;for(const q of j)D[q]||(D[q]=[]),D[q].push(G.name)}return{fieldDependency:D,fieldConfigs:H}},[r]);I.useEffect(()=>{if(t)return;const D=[];for(let H=0;H<s;H++){const G=H0();D.push({[mr]:G})}y(D)},[t,y,s]);const k=()=>{const D=Object.entries(C.current).filter(H=>!!H[1])[0];return(D==null?void 0:D[1])??""},R=()=>{const D={[mr]:H0()};y([...p,D])},N=D=>{const H=p.filter(G=>G[mr]!==D);y(H),w(G=>({...G,[D]:{}}));for(const G in C.current)G.startsWith(`${D}.`)&&delete C.current[G];b==null||b(e,k())},M=(D,{columnNames:H=[],operationType:G})=>{const j=H.map(q=>D[q]);return""+W0(j,G)},V=(D,H)=>{const G=p.map(j=>D!==j[mr]?j:{...j,...H});y(G)},Z=(D,H)=>{const G=p.map(j=>{if(D!==j[mr])return j;const q={...j};for(const ne of H)delete q[ne];return q});y(G)},J=(D,H,G,j)=>{var re;const q=((re=j==null?void 0:j.target)==null?void 0:re.value)??"",ne={...G,[H]:q};if(S[H])for(const B of S[H]){const U=M(ne,L[B]);ne[B]=U}V(D,ne)},$=(D,H,G)=>{V(D,{[H]:G})},X=(D,H,G,j)=>{if(G&&typeof G=="object"&&"value"in G&&typeof G.value=="string"&&typeof j.name<"u"){const q="prefillValues"in G&&G.prefillValues,ne={...H,[j.name]:G.value,...q};for(const re in ne)if(S[re])for(const B of S[re]){const U=M(ne,L[B]);ne[B]=U}V(D,ne)}(j==null?void 0:j.action)==="clear"&&j.name&&Z(D,[j.name])},z=(D,H,G)=>{V(D,{[H]:(G==null?void 0:G.toISOString())??""})},se=(D,H,G,j)=>{j&&w(q=>{const ne=q[D]??{};return{...q,[D]:{...ne,[H]:G}}}),C.current={...C.current,[`${D}.${H}`]:typeof G=="string"?G:""},b==null||b(e,k())},de=D=>m.current===D;return d.jsxs(E8,{children:[d.jsx(w8,{ref:m,children:d.jsxs(I8,{gridColumns:_,minWidth:`calc( ${E} * ${A} )`,children:[d.jsx(S8,{children:r.map(({name:D,label:H,isRequired:G})=>d.jsx(Jc,{children:d.jsx(w1,{label:H,isRequired:G})},D))}),p.map(({[mr]:D,...H})=>d.jsxs(v1,{children:[r.map(({name:G,key:j,...q})=>{var ne;return d.jsx(Jc,{hasError:!!((ne=x==null?void 0:x[D])!=null&&ne[G]),children:d.jsx(br,{name:G,value:H[G],...q,className:to,label:"",hideHelperText:!0,validation:h==null?void 0:h[G],onFocus:v,inputChangeHandler:re=>J(D,G,H,re),checkboxChangeHandler:(...re)=>$(D,G,re[1]),selectChangeHandler:(...re)=>X(D,H,...re),dateChangeHandler:(re,B)=>z(D,re,B),onValidationError:(...re)=>se(D,...re),fetchConfig:l==null?void 0:l[G],createConfig:f==null?void 0:f[G],isScrollTarget:de,...g?{menuPortalTarget:document.body,stackIndex:g}:null})},G??j)}),a?null:d.jsx(Jc,{children:d.jsx(u.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:d.jsx(E1,{onClick:()=>N(D),children:d.jsx(N8,{})})})})]},D))]})}),d.jsxs(_8,{children:[a?null:d.jsxs(A8,{onClick:R,children:[d.jsx(x1,{}),d.jsx(u.Typography,{children:"Add Line"})]}),c.length?d.jsx(T8,{children:c.map(({label:D,columnName:H,operationType:G,prefix:j="",prefixKey:q,suffix:ne="",suffixKey:re})=>d.jsxs(L8,{children:[d.jsx(u.Typography,{fontWeight:500,children:D}),d.jsxs(u.Typography,{children:[d.jsxs("span",{children:[n[q]??j," "]}),d.jsx("span",{children:W0(p.map(B=>B[H]),G)}),d.jsx("span",{children:n[re]??ne})]})]},D))}):null]})]})};La.ROW_ID=mr;const R8=u.styled(u.Box)`
767
+ `,R8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return d.jsx(N8,{onChange:o,onFocus:t,onBlur:n,...r})},w1=({label:e,isRequired:t,prefixNode:n,...r})=>e?d.jsxs(u.Typography,{variant:"h4",component:"label",color:u.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?d.jsx("span",{className:"required__star",children:"*"}):null]}):null,M8=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"})),I1=250,hr="__id",ts={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:I1,arithmeticOperation:[]},La=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=ts.defaultNumberOfRows,fixedRows:a=ts.fixedRows,cellWidth:i=ts.cellWidth,arithmeticOperation:c=ts.arithmeticOperation}=ts,fetchConfig:l={},createConfig:f={},stackIndex:g,onChange:y=()=>{},onFocus:v,onValidationError:b})=>{const p=t??[],h=(o==null?void 0:o.validations)??{},m=I.useRef(),C=I.useRef({}),[x,w]=I.useState({}),{colsLength:E,colsTemplate:_,colWidth:T}=I.useMemo(()=>{let V=0,N="";for(const H of r){let j=H.cols?Number(H.cols):1;isNaN(j)&&(j=1),V+=j,N+=`${H.cols??j}fr `}return a||(V+=.5,N+="0.5fr"),{colsLength:V,colsTemplate:N.trim(),colWidth:`${isNaN(i)?I1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=I.useMemo(()=>{const V={},N={};for(const H of r){if(!H.valueConfig)continue;N[H.name]=H.valueConfig;const j=H.valueConfig.columnNames;for(const $ of j)V[$]||(V[$]=[]),V[$].push(H.name)}return{fieldDependency:V,fieldConfigs:N}},[r]);I.useEffect(()=>{if(t)return;const V=[];for(let N=0;N<s;N++){const H=H0();V.push({[hr]:H})}y(V)},[t,y,s]);const R=()=>{const V=Object.entries(C.current).filter(N=>!!N[1])[0];return(V==null?void 0:V[1])??""},k=()=>{const V={[hr]:H0()};y([...p,V])},D=V=>{const N=p.filter(H=>H[hr]!==V);y(N),w(H=>({...H,[V]:{}}));for(const H in C.current)H.startsWith(`${V}.`)&&delete C.current[H];b==null||b(e,R())},M=(V,{columnNames:N=[],operationType:H})=>{const j=N.map($=>V[$]);return""+W0(j,H)},G=(V,N)=>{const H=p.map(j=>V!==j[hr]?j:{...j,...N});y(H)},Y=(V,N)=>{const H=p.map(j=>{if(V!==j[hr])return j;const $={...j};for(const oe of N)delete $[oe];return $});y(H)},X=(V,N,H,j)=>{var re;const $=((re=j==null?void 0:j.target)==null?void 0:re.value)??"",oe={...H,[N]:$};if(S[N])for(const B of S[N]){const te=M(oe,L[B]);oe[B]=te}G(V,oe)},J=(V,N,H)=>{G(V,{[N]:H})},z=(V,N,H,j)=>{if(H&&typeof H=="object"&&"value"in H&&typeof H.value=="string"&&typeof j.name<"u"){const $="prefillValues"in H&&H.prefillValues,oe={...N,[j.name]:H.value,...$};for(const re in oe)if(S[re])for(const B of S[re]){const te=M(oe,L[B]);oe[B]=te}G(V,oe)}(j==null?void 0:j.action)==="clear"&&j.name&&Y(V,[j.name])},q=(V,N,H)=>{G(V,{[N]:(H==null?void 0:H.toISOString())??""})},ne=(V,N,H,j)=>{j&&w($=>{const oe=$[V]??{};return{...$,[V]:{...oe,[N]:H}}}),C.current={...C.current,[`${V}.${N}`]:typeof H=="string"?H:""},b==null||b(e,R())},ce=V=>m.current===V;return d.jsxs(I8,{children:[d.jsx(_8,{ref:m,children:d.jsxs(S8,{gridColumns:_,minWidth:`calc( ${E} * ${T} )`,children:[d.jsx(A8,{children:r.map(({name:V,label:N,isRequired:H})=>d.jsx(Jc,{children:d.jsx(w1,{label:N,isRequired:H})},V))}),p.map(({[hr]:V,...N})=>d.jsxs(v1,{children:[r.map(({name:H,key:j,...$})=>{var oe;return d.jsx(Jc,{hasError:!!((oe=x==null?void 0:x[V])!=null&&oe[H]),children:d.jsx(gr,{name:H,value:N[H],...$,className:no,label:"",hideHelperText:!0,validation:h==null?void 0:h[H],onFocus:v,inputChangeHandler:re=>X(V,H,N,re),checkboxChangeHandler:(...re)=>J(V,H,re[1]),selectChangeHandler:(...re)=>z(V,N,...re),dateChangeHandler:(re,B)=>q(V,re,B),onValidationError:(...re)=>ne(V,...re),fetchConfig:l==null?void 0:l[H],createConfig:f==null?void 0:f[H],isScrollTarget:ce,...g?{menuPortalTarget:document.body,stackIndex:g}:null})},H??j)}),a?null:d.jsx(Jc,{children:d.jsx(u.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:d.jsx(E1,{onClick:()=>D(V),children:d.jsx(M8,{})})})})]},V))]})}),d.jsxs(T8,{children:[a?null:d.jsxs(L8,{onClick:k,children:[d.jsx(x1,{}),d.jsx(u.Typography,{children:"Add Line"})]}),c.length?d.jsx(O8,{children:c.map(({label:V,columnName:N,operationType:H,prefix:j="",prefixKey:$,suffix:oe="",suffixKey:re})=>d.jsxs(F8,{children:[d.jsx(u.Typography,{fontWeight:500,children:V}),d.jsxs(u.Typography,{children:[d.jsxs("span",{children:[n[$]??j," "]}),d.jsx("span",{children:W0(p.map(B=>B[N]),H)}),d.jsx("span",{children:n[re]??oe})]})]},V))}):null]})]})};La.ROW_ID=hr;const P8=u.styled(u.Box)`
768
768
  box-sizing: border-box;
769
- &:not(:has(.${to})) {
769
+ &:not(:has(.${no})) {
770
770
  transform: translate(0, 5px);
771
771
  padding-bottom: 5px;
772
772
  }
773
- `,M8=u.styled(u.TextField)`
774
- &.${to} {
775
- height: ${Aa};
773
+ `,j8=u.styled(u.TextField)`
774
+ &.${no} {
775
+ height: ${Ta};
776
776
  position: relative;
777
777
  & > div {
778
778
  height: 100%;
779
- padding-left: ${Ta};
779
+ padding-left: ${Aa};
780
780
  }
781
781
 
782
782
  fieldset.MuiOutlinedInput-notchedOutline {
@@ -790,7 +790,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
790
790
  margin-top: 0px;
791
791
  }
792
792
  }
793
- `,P8=({inputProps:e,...t})=>{const n=r=>{r.currentTarget&&r.currentTarget.blur(),r.stopPropagation()};return d.jsx(R8,{children:d.jsx(M8,{...t,inputProps:{onWheel:n,...e}})})},j8=u.styled(P8)`
793
+ `,B8=({inputProps:e,...t})=>{const n=r=>{r.currentTarget&&r.currentTarget.blur(),r.stopPropagation()};return d.jsx(P8,{children:d.jsx(j8,{...t,inputProps:{onWheel:n,...e}})})},V8=u.styled(B8)`
794
794
  & .MuiFormHelperText-root {
795
795
  position: absolute;
796
796
  bottom: -24px;
@@ -904,13 +904,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
904
904
  border-radius: 4px;
905
905
  }
906
906
 
907
- & .${to} {
908
- height: ${Aa};
907
+ & .${no} {
908
+ height: ${Ta};
909
909
  .hiverFormField__control {
910
910
  height: 100%;
911
911
  border: 0;
912
912
  .hiverFormField__value-container {
913
- padding-left: ${Ta};
913
+ padding-left: ${Aa};
914
914
  }
915
915
  }
916
916
  .hiverFormField__indicators {
@@ -929,7 +929,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
929
929
  &.helper--error {
930
930
  color: #d32f2f;
931
931
  }
932
- `,B8=u.styled(u.Box)`
932
+ `,G8=u.styled(u.Box)`
933
933
  width: 100%;
934
934
  position: relative;
935
935
  & .MuiInputBase-root {
@@ -943,7 +943,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
943
943
  position: absolute;
944
944
  margin-left: 5px;
945
945
  }
946
- `,V8=u.styled(u.Box)`
946
+ `,H8=u.styled(u.Box)`
947
947
  display: inline-block;
948
948
  margin-right: 9px;
949
949
  width: 9px;
@@ -955,7 +955,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
955
955
  display: inline-block;
956
956
  transition: transform 300ms;
957
957
  }
958
- `,G8=u.styled(u.Stack)`
958
+ `,W8=u.styled(u.Stack)`
959
959
  position: relative;
960
960
  font-family: ${u.theme.typography.fontFamily};
961
961
  &.expandable {
@@ -986,19 +986,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
986
986
  overflow: hidden;
987
987
  }
988
988
  }
989
- `,H8=u.styled(u.IconButton)`
989
+ `,Z8=u.styled(u.IconButton)`
990
990
  position: absolute;
991
991
  top: 0;
992
992
  left: 100%;
993
993
  transform: translate(5px, 0);
994
994
  height: 34px;
995
995
  width: 34px;
996
- `,W8=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),br=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:a,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:f,checkboxChangeHandler:g,...y})=>{const{validation:v,helperText:b,id:p,label:h,name:m,type:C,validateOnBlur:x=!0,validateOnChange:w=!0,isRequired:E,labelSpacing:_=1,showGlobalLoader:A=!1,hideHelperText:S=!1,meta:{isExpandable:L=C==="table",isExpanded:k=!0}={}}=y,[R,N]=I.useState(!1),[M,V]=I.useState(""),[Z,J]=I.useState(k);I.useEffect(()=>{R||X(y.value,!1)},[R,y.value]);const $=B=>{var U;B&&!R&&N(!0),(U=y.onFocus)==null||U.call(y,B)};function X(B,U=!0,fe){let Y="";if((v!=null&&v.isRequired||E)&&(Y=B?"":m1,!B&&typeof(v==null?void 0:v.isRequired)=="function")){const _e=v.isRequired(B);_e&&typeof _e=="boolean"?Y=m1:_e&&(Y=_e)}let Ze={id:p,name:m,label:h};if(y.type==="date"?Ze={...Ze,disableFuture:y.disableFuture,disablePast:y.disablePast}:y.type==="number"?Ze={...Ze,min:y.min,max:y.max}:y.type==="text"&&y.multiline&&(Ze={...Ze,maxCharacters:y.maxCharacters}),B&&!Y&&(v!=null&&v.validate)){const _e=v.validate(B,{...Ze,...fe});typeof _e=="boolean"&&_e===!1?Y=l8:typeof _e=="string"&&(Y=_e)}U&&V(Y),a==null||a(m,Y,U)}const z=B=>{var U;R||N(!0),(U=y.onBlur)==null||U.call(y,B),R&&x&&X(y.value)},se=()=>S?null:y.helperText?d.jsx(S1,{children:b}):R&&M?d.jsx(S1,{className:"helper--error",children:M}):null,de=B=>{B&&!R&&N(!0),i==null||i(B),R&&w&&X(B.target.value)},D=(B,U)=>{B&&!R&&N(!0),g==null||g(B,U),R&&w&&X(U)},H=(B,U)=>{c==null||c(B,U),B&&!R&&N(!0),B&&typeof B=="object"&&"value"in B&&R&&w&&X(B.value)},G=(B,U)=>{l==null||l(m,B,U),B&&!R&&N(!0),R&&w&&X(B)},j=B=>{f==null||f(m,B)},q=(B,U)=>{R&&(a==null||a(B,U),V(typeof U=="string"?U:""))},ne=B=>{J(U=>!U)},re=B=>{if(A)return d.jsx(u.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(B.type){case"select":return d.jsx(_1,{children:d.jsx(Uo,{...B,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&R?"formField__select--error":""} ${B.className||""}`,classNamePrefix:"hiverFormField",onBlur:z,onChange:H,onFocus:$,menuPortalTarget:n})});case"async-select":return d.jsx(_1,{children:d.jsx(v8,{...B,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&R?"formField__select--error":""} ${B.className||""}`,classNamePrefix:"hiverFormField",onBlur:z,onChange:H,onFocus:$,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return d.jsx(F8,{...B,label:void 0,onBlur:z,onFocus:$,onChange:G,error:!!(M&&R)});case"table":return d.jsx(La,{...B,value:B.value,onChange:j,onFocus:$,onValidationError:q,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return d.jsx(D8,{...B,onChange:D,onFocus:$,onBlur:z});default:return d.jsx(j8,{variant:"outlined",fullWidth:!0,id:p,...B,value:B.value,label:void 0,onBlur:z,onChange:de,onFocus:$,error:!!(M&&R),inputProps:{type:B.type,min:B.min,max:B.max,...B.inputProps}})}};return d.jsxs(G8,{spacing:_,useFlexGap:!0,...L&&{className:`expandable ${Z?"open":"close"}`},children:[d.jsx(w1,{label:h,htmlFor:p,isRequired:!!(v!=null&&v.isRequired)||E,prefixNode:L?d.jsx(V8,{children:d.jsx(W8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>ne()}}),d.jsxs(B8,{className:"input-wrapper",children:[d.jsx(u.Tooltip,{title:y.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:re(y)}),r!=null&&r.icon?d.jsx(u.Tooltip,{title:r.toolTipText,placement:"bottom",children:d.jsx(H8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),se()]})},Z8=u.styled(u.Stack)`
996
+ `,X8=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),gr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:a,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:f,checkboxChangeHandler:g,...y})=>{const{validation:v,helperText:b,id:p,label:h,name:m,type:C,validateOnBlur:x=!0,validateOnChange:w=!0,isRequired:E,labelSpacing:_=1,showGlobalLoader:T=!1,hideHelperText:S=!1,meta:{isExpandable:L=C==="table",isExpanded:R=!0}={}}=y,[k,D]=I.useState(!1),[M,G]=I.useState(""),[Y,X]=I.useState(R);I.useEffect(()=>{k||z(y.value,!1)},[k,y.value]);const J=B=>{var te;B&&!k&&D(!0),(te=y.onFocus)==null||te.call(y,B)};function z(B,te=!0,fe){let Z="";if((v!=null&&v.isRequired||E)&&(Z=B?"":m1,!B&&typeof(v==null?void 0:v.isRequired)=="function")){const Se=v.isRequired(B);Se&&typeof Se=="boolean"?Z=m1:Se&&(Z=Se)}let Ye={id:p,name:m,label:h};if(y.type==="date"?Ye={...Ye,disableFuture:y.disableFuture,disablePast:y.disablePast}:y.type==="number"?Ye={...Ye,min:y.min,max:y.max}:y.type==="text"&&y.multiline&&(Ye={...Ye,maxCharacters:y.maxCharacters}),B&&!Z&&(v!=null&&v.validate)){const Se=v.validate(B,{...Ye,...fe});typeof Se=="boolean"&&Se===!1?Z=d8:typeof Se=="string"&&(Z=Se)}te&&G(Z),a==null||a(m,Z,te)}const q=B=>{var te;k||D(!0),(te=y.onBlur)==null||te.call(y,B),k&&x&&z(y.value)},ne=()=>S?null:y.helperText?d.jsx(S1,{children:b}):k&&M?d.jsx(S1,{className:"helper--error",children:M}):null,ce=B=>{B&&!k&&D(!0),i==null||i(B),k&&w&&z(B.target.value)},V=(B,te)=>{B&&!k&&D(!0),g==null||g(B,te),k&&w&&z(te)},N=(B,te)=>{c==null||c(B,te),B&&!k&&D(!0),B&&typeof B=="object"&&"value"in B&&k&&w&&z(B.value)},H=(B,te)=>{l==null||l(m,B,te),B&&!k&&D(!0),k&&w&&z(B)},j=B=>{f==null||f(m,B)},$=(B,te)=>{k&&(a==null||a(B,te),G(typeof te=="string"?te:""))},oe=B=>{X(te=>!te)},re=B=>{if(T)return d.jsx(u.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(B.type){case"select":return d.jsx(_1,{children:d.jsx(es,{...B,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&k?"formField__select--error":""} ${B.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:N,onFocus:J,menuPortalTarget:n})});case"async-select":return d.jsx(_1,{children:d.jsx(w8,{...B,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&k?"formField__select--error":""} ${B.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:N,onFocus:J,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return d.jsx(D8,{...B,label:void 0,onBlur:q,onFocus:J,onChange:H,error:!!(M&&k)});case"table":return d.jsx(La,{...B,value:B.value,onChange:j,onFocus:J,onValidationError:$,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return d.jsx(R8,{...B,onChange:V,onFocus:J,onBlur:q});default:return d.jsx(V8,{variant:"outlined",fullWidth:!0,id:p,...B,value:B.value,label:void 0,onBlur:q,onChange:ce,onFocus:J,error:!!(M&&k),inputProps:{type:B.type,min:B.min,max:B.max,...B.inputProps}})}};return d.jsxs(W8,{spacing:_,useFlexGap:!0,...L&&{className:`expandable ${Y?"open":"close"}`},children:[d.jsx(w1,{label:h,htmlFor:p,isRequired:!!(v!=null&&v.isRequired)||E,prefixNode:L?d.jsx(H8,{children:d.jsx(X8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>oe()}}),d.jsxs(G8,{className:"input-wrapper",children:[d.jsx(u.Tooltip,{title:y.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:re(y)}),r!=null&&r.icon?d.jsx(u.Tooltip,{title:r.toolTipText,placement:"bottom",children:d.jsx(Z8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),ne()]})},z8=u.styled(u.Stack)`
997
997
  & .authform__section-title {
998
998
  margin-top: 32px;
999
999
  margin-bottom: -12px;
1000
1000
  }
1001
- `,X8=u.styled(u.Stack)`
1001
+ `,Y8=u.styled(u.Stack)`
1002
1002
  ${({cols:e,spacing:t,theme:n})=>`
1003
1003
  flex-flow: row wrap;
1004
1004
  justify-content: flex-start;
@@ -1006,13 +1006,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1006
1006
  --field-space: calc( ${e-1} * var(--field-gap));
1007
1007
  --field-width: calc( ( 100% - var(--field-space) ) / ${e} );
1008
1008
  `}
1009
- `,z8=u.styled(u.Box)`
1009
+ `,J8=u.styled(u.Box)`
1010
1010
  --cols: ${({cols:e})=>e};
1011
1011
  --include-gap: calc((var(--cols) - 1) * var(--field-gap));
1012
1012
  --include-width: calc(var(--cols) * var(--field-width));
1013
1013
  width: calc(var(--include-width) + var(--include-gap));
1014
1014
  max-width: 100%;
1015
- `,A1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:l,onValidationError:f,stackIndex:g,sectionSpacing:y=3,fieldsSpacing:v=3,labelSpacing:b=1,fetchConfig:p,createConfig:h,showGlobalLoader:m=!1,cols:C=1})=>{const x=w=>(E,_)=>{n==null||n(E,_,w)};return d.jsx(Z8,{spacing:y,children:e.map(({id:w,title:E,formFields:_})=>_.every(S=>S.hideInUI)?null:d.jsxs(I.Fragment,{children:[E&&_.length?d.jsx(u.Typography,{variant:"h3",className:"authform__section-title",children:E}):null,d.jsx(X8,{useFlexGap:!0,spacing:v,cols:C,children:_.map(S=>{var L;return i&&typeof i=="object"&&S.name in i&&i[S.name]===!1||S.hideInUI?null:d.jsx(z8,{cols:S.cols??1,children:d.jsx(br,{value:c==null?void 0:c[S.name],data:c,...S,stackIndex:g,selectChangeHandler:x(S),inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,validation:l==null?void 0:l[S.name],onValidationError:f,iconData:t==null?void 0:t[S.name],labelSpacing:b,fetchConfig:p==null?void 0:p[S.name],createConfig:h==null?void 0:h[S.name],showGlobalLoader:m})},((L=p==null?void 0:p[S.name])==null?void 0:L.key)||S.name)})})]},w))})},Y8=u.styled(u.Box)`
1015
+ `,T1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:l,onValidationError:f,stackIndex:g,sectionSpacing:y=3,fieldsSpacing:v=3,labelSpacing:b=1,fetchConfig:p,createConfig:h,showGlobalLoader:m=!1,cols:C=1})=>{const x=w=>(E,_)=>{n==null||n(E,_,w)};return d.jsx(z8,{spacing:y,children:e.map(({id:w,title:E,formFields:_})=>_.every(S=>S.hideInUI)?null:d.jsxs(I.Fragment,{children:[E&&_.length?d.jsx(u.Typography,{variant:"h3",className:"authform__section-title",children:E}):null,d.jsx(Y8,{useFlexGap:!0,spacing:v,cols:C,children:_.map(S=>{var L;return i&&typeof i=="object"&&S.name in i&&i[S.name]===!1||S.hideInUI?null:d.jsx(J8,{cols:S.cols??1,children:d.jsx(gr,{value:c==null?void 0:c[S.name],data:c,...S,stackIndex:g,selectChangeHandler:x(S),inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,validation:l==null?void 0:l[S.name],onValidationError:f,iconData:t==null?void 0:t[S.name],labelSpacing:b,fetchConfig:p==null?void 0:p[S.name],createConfig:h==null?void 0:h[S.name],showGlobalLoader:m})},((L=p==null?void 0:p[S.name])==null?void 0:L.key)||S.name)})})]},w))})},q8=u.styled(u.Box)`
1016
1016
  width: 100%;
1017
1017
  aspect-ratio: ${({aspectRatio:e})=>e};
1018
1018
  border-radius: 8px;
@@ -1036,7 +1036,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1036
1036
  width: 40px;
1037
1037
  height: 40px;
1038
1038
  }
1039
- `,J8=e=>T.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),T.createElement("g",{clipPath:"url(#clip0_7787_114457)"},T.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_7787_114457"},T.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),q8=({aspectRatio:e="auto",...t})=>{const[n,r]=I.useState(!1);return n?null:d.jsxs(Y8,{aspectRatio:e,children:[d.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),d.jsx(J8,{className:"play-icon"})]})},T1=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${u.tooltipClasses.arrow}`]:{...t},[`& .${u.tooltipClasses.tooltip}`]:{...e}})),Q8=({argsMap:e,optionalArgsMap:t,data:n})=>{const{args:r,enabled:o}=I.useMemo(()=>{const s={};for(const a in e){const i=e[a],c=n[i];if(!c)return{args:{},enabled:!1};s[a]=c}for(const a in t){const i=t[a],c=n[i];s[a]=c}return{args:s,enabled:!0}},[e,t,n]);return{args:r,enabled:o}},$8=({args:e,enabled:t,searchTerm:n,pagination:r,queryKey:o,debounceTime:s=500,fetchOptions:a})=>{const[i,c]=I.useState({args:e,enabled:t,searchTerm:n,pagination:r});I.useEffect(()=>{const C=setTimeout(()=>{c({args:e,enabled:t,searchTerm:n,pagination:r})},s);return()=>clearTimeout(C)},[e,t,n,r,s]);const l=I.useMemo(()=>{var C,x;return{searchTerm:i.searchTerm,limit:((C=i.pagination)==null?void 0:C.limit)??10,enabled:((x=i.pagination)==null?void 0:x.enabled)??!1}},[i]),{data:f,isLoading:g,isError:y,isFetching:v,isFetchingNextPage:b,hasNextPage:p,fetchNextPage:h}=eh({queryKey:["fetch-options",o,i.args,l],queryFn:({pageParam:C})=>a({args:i.args,pagination:{...l,pageNumber:C}}),getNextPageParam:(C,x)=>C.hasMore?x.length+1:void 0,initialPageParam:1,enabled:i.enabled});return{options:I.useMemo(()=>(f==null?void 0:f.pages.flatMap(C=>C.options))??[],[f]),isLoading:g,isError:y,isFetching:v,isFetchingNextPage:b,hasNextPage:p,fetchNextPage:h}},U8={borderRadius:"8px",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",mt:.5,backgroundColor:"#FFFFFF"},K8={maxHeight:280,overflow:"auto",paddingTop:0,paddingBottom:1},ex={lineHeight:1,padding:"12px 12px 8px",backgroundColor:"#FFFFFF",position:"static"},tx={display:"flex",alignItems:"center",gap:"4px",padding:"8px",border:"1px solid #ECEFF6",borderRadius:"6px",width:"100%",boxSizing:"border-box"},nx={flex:1,minWidth:0,fontSize:13,lineHeight:"18px","& .MuiInputBase-input":{padding:0,"&::placeholder":{color:"#97A3B7",opacity:1}}},rx={fontSize:"14px",width:"100%",minWidth:200,height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"& .MuiSelect-select":{display:"flex",alignItems:"center",paddingLeft:"12px",paddingRight:"8px"},"& .MuiSelect-icon":{color:"#97A3B7"}},ox=e=>({fontSize:14,lineHeight:"18px",minHeight:36,py:.75,pl:2,pr:1.5,color:"#343C45",backgroundColor:e?"#F6F8FC":"transparent","&:hover":{backgroundColor:"#F6F8FC"},"&.Mui-selected":{backgroundColor:"#F6F8FC","&:hover":{backgroundColor:"#F6F8FC"}}}),L1=String(Symbol("_no_results")),sx=({fieldKey:e,value:t,placeholder:n="Select",searchPlaceholder:r="Search",disabled:o=!1,menuZIndex:s=1600,interfaceDetails:a,formData:i,onChange:c,fetchOptions:l})=>{const[f,g]=I.useState(""),{args:y,enabled:v}=Q8({argsMap:a.args,optionalArgsMap:a.optionalArgs,data:i}),{options:b}=$8({args:y,enabled:v,queryKey:e,searchTerm:f,pagination:a.pagination,fetchOptions:l}),p=I.useMemo(()=>{const m=f.trim().toLowerCase();return m?b.filter(C=>String(C.label).toLowerCase().includes(m)):b},[b,f]),h=I.useMemo(()=>{if(t==="")return null;const m=b.find(C=>String(C.value)===String(t));return(m==null?void 0:m.label)??String(t)},[b,t]);return d.jsx(u.FormControl,{fullWidth:!0,disabled:o,sx:{m:0,minWidth:0},children:d.jsxs(u.Select,{displayEmpty:!0,value:t,variant:"outlined",size:"small",sx:rx,onChange:m=>{const C=String(m.target.value);C!==L1&&c(C)},onClose:()=>g(""),renderValue:()=>t===""?d.jsx(u.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:u.theme.palette.gray.gray4},children:n}):d.jsx(u.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:u.theme.palette.gray.gray1},children:h??String(t)}),MenuProps:{autoFocus:!1,sx:{zIndex:s},PaperProps:{sx:U8},MenuListProps:{sx:K8}},children:[d.jsx(u.ListSubheader,{sx:ex,children:d.jsxs(u.Box,{sx:tx,children:[d.jsx(u.icons.Search,{sx:{fontSize:18,color:u.theme.palette.gray.gray3,flexShrink:0}}),d.jsx(u.InputBase,{autoFocus:!0,placeholder:r,value:f,onChange:m=>g(m.target.value),onMouseDown:m=>m.preventDefault(),onKeyDown:m=>{m.key!=="Escape"&&m.stopPropagation()},sx:nx})]})}),p.length===0?d.jsx(u.MenuItem,{disabled:!0,value:L1,sx:{opacity:1,color:u.theme.palette.gray.gray3},children:d.jsx(u.Typography,{variant:"body2",fontSize:14,children:"No results found"})}):p.map(m=>{const C=String(m.value);return d.jsx(u.MenuItem,{value:C,sx:ox(C===String(t)),children:m.label},C)})]})})},ax=u.styled(u.TextField)`
1039
+ `,Q8=e=>A.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),A.createElement("g",{clipPath:"url(#clip0_7787_114457)"},A.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_7787_114457"},A.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),$8=({aspectRatio:e="auto",...t})=>{const[n,r]=I.useState(!1);return n?null:d.jsxs(q8,{aspectRatio:e,children:[d.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),d.jsx(Q8,{className:"play-icon"})]})},A1=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${u.tooltipClasses.arrow}`]:{...t},[`& .${u.tooltipClasses.tooltip}`]:{...e}})),U8=({argsMap:e,optionalArgsMap:t,data:n})=>{const{args:r,enabled:o}=I.useMemo(()=>{const s={};for(const a in e){const i=e[a],c=n[i];if(!c)return{args:{},enabled:!1};s[a]=c}for(const a in t){const i=t[a],c=n[i];s[a]=c}return{args:s,enabled:!0}},[e,t,n]);return{args:r,enabled:o}},K8=({args:e,enabled:t,searchTerm:n,pagination:r,queryKey:o,debounceTime:s=500,fetchOptions:a})=>{const[i,c]=I.useState({args:e,enabled:t,searchTerm:n,pagination:r});I.useEffect(()=>{const C=setTimeout(()=>{c({args:e,enabled:t,searchTerm:n,pagination:r})},s);return()=>clearTimeout(C)},[e,t,n,r,s]);const l=I.useMemo(()=>{var C,x;return{searchTerm:i.searchTerm,limit:((C=i.pagination)==null?void 0:C.limit)??10,enabled:((x=i.pagination)==null?void 0:x.enabled)??!1}},[i]),{data:f,isLoading:g,isError:y,isFetching:v,isFetchingNextPage:b,hasNextPage:p,fetchNextPage:h}=eh({queryKey:["fetch-options",o,i.args,l],queryFn:({pageParam:C})=>a({args:i.args,pagination:{...l,pageNumber:C}}),getNextPageParam:(C,x)=>C.hasMore?x.length+1:void 0,initialPageParam:1,enabled:i.enabled});return{options:I.useMemo(()=>(f==null?void 0:f.pages.flatMap(C=>C.options))??[],[f]),isLoading:g,isError:y,isFetching:v,isFetchingNextPage:b,hasNextPage:p,fetchNextPage:h}},ex={borderRadius:"8px",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",mt:.5,backgroundColor:"#FFFFFF"},tx={maxHeight:280,overflow:"auto",paddingTop:0,paddingBottom:1},nx={lineHeight:1,padding:"12px 12px 8px",backgroundColor:"#FFFFFF",position:"static"},rx={display:"flex",alignItems:"center",gap:"4px",padding:"8px",border:"1px solid #ECEFF6",borderRadius:"6px",width:"100%",boxSizing:"border-box"},ox={flex:1,minWidth:0,fontSize:13,lineHeight:"18px","& .MuiInputBase-input":{padding:0,"&::placeholder":{color:"#97A3B7",opacity:1}}},sx={fontSize:"14px",width:"100%",minWidth:200,height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"& .MuiSelect-select":{display:"flex",alignItems:"center",paddingLeft:"12px",paddingRight:"8px"},"& .MuiSelect-icon":{color:"#97A3B7"}},ax=e=>({fontSize:14,lineHeight:"18px",minHeight:36,py:.75,pl:2,pr:1.5,color:"#343C45",backgroundColor:e?"#F6F8FC":"transparent","&:hover":{backgroundColor:"#F6F8FC"},"&.Mui-selected":{backgroundColor:"#F6F8FC","&:hover":{backgroundColor:"#F6F8FC"}}}),L1=String(Symbol("_no_results")),ix=e=>!!e&&typeof e=="object"&&"label"in e&&"value"in e,cx=({fieldKey:e,value:t,placeholder:n="Select",searchPlaceholder:r="Search",disabled:o=!1,menuZIndex:s=1600,interfaceDetails:a,formData:i,hasApiSearch:c=!1,onChange:l,fetchOptions:f})=>{const[g,y]=I.useState(""),{selectedOption:v,selectedValue:b}=I.useMemo(()=>typeof t=="object"&&"label"in t&&"value"in t?{selectedOption:t,selectedValue:t.value}:{selectedOption:null,selectedValue:t},[t]),{args:p,enabled:h}=U8({argsMap:a.args,optionalArgsMap:a.optionalArgs,data:i}),{options:m}=K8({args:p,enabled:h,queryKey:e,searchTerm:g,pagination:a.pagination,fetchOptions:f}),C=I.useMemo(()=>{let w=m;v&&(w=[v],w.push(...m.filter(_=>_.value!==v.value)));const E=g.trim().toLowerCase();return!E||c?w:w.filter(_=>String(_.label).toLowerCase().includes(E))},[m,g,v,c]),x=I.useMemo(()=>{if(ix(t))return t.label;const w=m.find(E=>String(E.value)===String(t));return(w==null?void 0:w.label)??String(t)},[m,t]);return d.jsx(u.FormControl,{fullWidth:!0,disabled:o,sx:{m:0,minWidth:0},children:d.jsxs(u.Select,{displayEmpty:!0,value:b,variant:"outlined",size:"small",sx,onChange:w=>{const E=String(w.target.value);E!==L1&&l(E)},onClose:()=>y(""),renderValue:()=>t===""?d.jsx(u.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:u.theme.palette.gray.gray4},children:n}):d.jsx(u.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:u.theme.palette.gray.gray1},children:x}),MenuProps:{autoFocus:!1,sx:{zIndex:s},PaperProps:{sx:ex},MenuListProps:{sx:tx}},children:[d.jsx(u.ListSubheader,{sx:nx,children:d.jsxs(u.Box,{sx:rx,children:[d.jsx(u.icons.Search,{sx:{fontSize:18,color:u.theme.palette.gray.gray3,flexShrink:0}}),d.jsx(u.InputBase,{autoFocus:!0,placeholder:r,value:g,onChange:w=>y(w.target.value),onMouseDown:w=>w.preventDefault(),onKeyDown:w=>{w.key!=="Escape"&&w.stopPropagation()},sx:ox})]})}),C.length===0?d.jsx(u.MenuItem,{disabled:!0,value:L1,sx:{opacity:1,color:u.theme.palette.gray.gray3},children:d.jsx(u.Typography,{variant:"body2",fontSize:14,children:"No results found"})}):C.map(w=>{const E=String(w.value);return d.jsx(u.MenuItem,{value:E,sx:ax(E===String(t)),children:w.label},E)})]})})},lx=u.styled(u.TextField)`
1040
1040
  width: 100%;
1041
1041
  & input {
1042
1042
  padding: 13px !important;
@@ -1067,7 +1067,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1067
1067
  border-radius: 8px;
1068
1068
  border: 1px solid #eceff6;
1069
1069
  }
1070
- `,ix=e=>{const t=n=>{var o;const r=n.target;r&&((o=e.onChange)==null||o.call(e,r.value))};return d.jsx(ax,{...e,onChange:t,variant:"outlined"})},cx=u.styled(u.Stack)`
1070
+ `,ux=e=>{const t=n=>{var o;const r=n.target;r&&((o=e.onChange)==null||o.call(e,r.value))};return d.jsx(lx,{...e,onChange:t,variant:"outlined"})},dx=u.styled(u.Stack)`
1071
1071
  flex-direction: column;
1072
1072
  align-items: flex-start;
1073
1073
  box-shadow: 0px 3px 15px 0px #00000040;
@@ -1076,7 +1076,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1076
1076
  max-height: 343.2px;
1077
1077
  overflow-y: auto;
1078
1078
  overflow-x: hidden;
1079
- `,lx=u.styled(u.Box)`
1079
+ `,fx=u.styled(u.Box)`
1080
1080
  padding: 8px 20px;
1081
1081
  height: 24px;
1082
1082
  width: 246px;
@@ -1090,7 +1090,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1090
1090
  &:hover {
1091
1091
  background-color: ${({theme:e})=>{var t,n;return((n=(t=e.palette)==null?void 0:t.gray)==null?void 0:n.gray6)||"#f5f5f5"}};
1092
1092
  }
1093
- `,ux=u.styled(u.Box)`
1093
+ `,px=u.styled(u.Box)`
1094
1094
  box-sizing: border-box;
1095
1095
  background-color: white;
1096
1096
  border: 1px solid #d6dde8;
@@ -1107,18 +1107,48 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1107
1107
  background-color: #f6f8fc;
1108
1108
  border-color: #d6dde8;
1109
1109
  }
1110
- `,dx=u.styled(u.Stack)`
1110
+ `,hx=u.styled(u.Stack)`
1111
1111
  padding-right: 10px;
1112
1112
  justify-content: center;
1113
1113
  align-items: center;
1114
- `,fx=({variables:e,onOptionClick:t})=>d.jsx(cx,{children:e.map(({value:n,title:r},o)=>d.jsx(u.Tooltip,{title:r,placement:"top",arrow:!0,children:d.jsx(lx,{onClick:()=>t({title:r,value:n}),children:d.jsx(u.Typography,{variant:"body1",sx:{color:"black",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})})},`${r}-${n}-${o}`))}),px=({setOpen:e})=>{const t=()=>{e(n=>!n)};return d.jsx(ux,{onClick:t,tabIndex:0,children:d.jsx(u.icons.Add,{sx:{fontSize:"12px",color:"#4d596c"}})})},hx=({variables:e,onOptionClick:t})=>{const[n,r]=I.useState(!1),o=s=>{r(!1),t(s)};return d.jsx(u.ClickAwayListener,{onClickAway:()=>{r(!1)},children:d.jsx(u.Box,{children:d.jsx(u.Tooltip,{title:d.jsx(fx,{variables:e,onOptionClick:o}),placement:"bottom-end",arrow:!1,open:n,PopperProps:{sx:{"& .MuiTooltip-popper":{zIndex:2e3},"& .MuiTooltip-tooltip":{backgroundColor:"transparent",color:"inherit",padding:0,boxShadow:"none",fontSize:"inherit"}}},children:d.jsx(u.Box,{children:d.jsx(px,{setOpen:r})})})})})},gx=()=>{const e=I.useRef(0),t=I.useRef(null);return{onBlur:s=>{var i;const a=((i=s==null?void 0:s.target)==null?void 0:i.selectionStart)??0;e.current=a},inputRef:t,focusInput:(s=0)=>{var l;const a=t.current;if(!a)return;const i=e.current+s;(l=a.focus)==null||l.call(a),(window.requestAnimationFrame??window.setTimeout)(()=>{var f;(f=a.setSelectionRange)==null||f.call(a,i,i)})},insertVariable:(s,a)=>{const i=e.current;return s.slice(0,i)+a+s.slice(i)}}},mx=({value:e,variables:t,onChange:n,hasError:r})=>{const{onBlur:o,inputRef:s,focusInput:a,insertVariable:i}=gx(),c=({value:l})=>{const f=i(e,l);n(f),a(l==null?void 0:l.length)};return d.jsx(ix,{inputRef:s,value:e,onChange:n,onBlur:o,placeholder:"Value",hasError:r,InputProps:{endAdornment:d.jsx(dx,{children:d.jsx(hx,{variables:t,onOptionClick:c})})}})},bx=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 15 15",fill:"none",...e},T.createElement("g",{clipPath:"url(#clip0_833_38792)"},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4 2.52266C11.4 2.86744 11.537 3.1981 11.7808 3.4419C12.0246 3.68569 12.3552 3.82266 12.7 3.82266C13.0448 3.82266 13.3754 3.68569 13.6192 3.4419C13.863 3.1981 14 2.86744 14 2.52266C14 2.17788 13.863 1.84722 13.6192 1.60342C13.3754 1.35962 13.0448 1.22266 12.7 1.22266C12.3552 1.22266 12.0246 1.35962 11.7808 1.60342C11.537 1.84722 11.4 2.17788 11.4 2.52266ZM1 2.52266C1 2.86744 1.13696 3.1981 1.38076 3.44189C1.62456 3.68569 1.95522 3.82266 2.3 3.82266C2.64478 3.82266 2.97544 3.68569 3.21924 3.44189C3.46304 3.1981 3.6 2.86744 3.6 2.52266C3.6 2.17788 3.46304 1.84721 3.21924 1.60342C2.97544 1.35962 2.64478 1.22266 2.3 1.22266C1.95522 1.22266 1.62456 1.35962 1.38076 1.60342C1.13696 1.84721 1 2.17787 1 2.52266Z",fill:"#7853FF",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4 12.3449C11.4 12.6897 11.537 13.0204 11.7808 13.2642C12.0246 13.508 12.3552 13.6449 12.7 13.6449C13.0448 13.6449 13.3754 13.508 13.6192 13.2642C13.863 13.0204 14 12.6897 14 12.3449C14 12.0001 13.863 11.6695 13.6192 11.4257C13.3754 11.1819 13.0448 11.0449 12.7 11.0449C12.3552 11.0449 12.0246 11.1819 11.7808 11.4257C11.537 11.6695 11.4 12.0001 11.4 12.3449ZM1 12.3449C1 12.6897 1.13696 13.0204 1.38076 13.2642C1.62456 13.508 1.95522 13.6449 2.3 13.6449C2.64478 13.6449 2.97544 13.508 3.21924 13.2642C3.46304 13.0204 3.6 12.6897 3.6 12.3449C3.6 12.0001 3.46304 11.6695 3.21924 11.4257C2.97544 11.1819 2.64478 11.0449 2.3 11.0449C1.95522 11.0449 1.62456 11.1819 1.38076 11.4257C1.13696 11.6695 1 12.0001 1 12.3449Z",fill:"#7853FF",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M11.3984 2.52344L3.59844 2.52344L5.77656 2.52344",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M11.3984 12.3457L3.59844 12.3457L5.77656 12.3457",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_833_38792"},T.createElement("rect",{width:15,height:15,fill:"white",transform:"translate(15) rotate(90)"})))),qc={outer:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,bgcolor:"#f3ebff",p:"6px",borderRadius:"8px"},frame:{width:24,height:24,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center"},rotate:{display:"flex",alignItems:"center",justifyContent:"center",transform:"rotate(90deg)",transformOrigin:"center","& svg":{width:15,height:15,display:"block"}}},yx=()=>d.jsx(u.Box,{"aria-hidden":!0,component:"span",sx:qc.outer,children:d.jsx(u.Box,{component:"span",sx:qc.frame,children:d.jsx(u.Box,{component:"span",sx:qc.rotate,children:d.jsx(bx,{})})})}),Cx=u.styled("img")`
1114
+ `,gx=({variables:e,onOptionClick:t})=>d.jsx(dx,{children:e.map(({value:n,title:r},o)=>d.jsx(u.Tooltip,{title:r,placement:"top",arrow:!0,children:d.jsx(fx,{onClick:()=>t({title:r,value:n}),children:d.jsx(u.Typography,{variant:"body1",sx:{color:"black",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})})},`${r}-${n}-${o}`))}),mx=({setOpen:e})=>{const t=()=>{e(n=>!n)};return d.jsx(px,{onClick:t,tabIndex:0,children:d.jsx(u.icons.Add,{sx:{fontSize:"12px",color:"#4d596c"}})})},bx=({variables:e,onOptionClick:t})=>{const[n,r]=I.useState(!1),o=s=>{r(!1),t(s)};return d.jsx(u.ClickAwayListener,{onClickAway:()=>{r(!1)},children:d.jsx(u.Box,{children:d.jsx(u.Tooltip,{title:d.jsx(gx,{variables:e,onOptionClick:o}),placement:"bottom-end",arrow:!1,open:n,PopperProps:{sx:{"& .MuiTooltip-popper":{zIndex:2e3},"& .MuiTooltip-tooltip":{backgroundColor:"transparent",color:"inherit",padding:0,boxShadow:"none",fontSize:"inherit"}}},children:d.jsx(u.Box,{children:d.jsx(mx,{setOpen:r})})})})})},yx=()=>{const e=I.useRef(0),t=I.useRef(null);return{onBlur:s=>{var i;const a=((i=s==null?void 0:s.target)==null?void 0:i.selectionStart)??0;e.current=a},inputRef:t,focusInput:(s=0)=>{var l;const a=t.current;if(!a)return;const i=e.current+s;(l=a.focus)==null||l.call(a),(window.requestAnimationFrame??window.setTimeout)(()=>{var f;(f=a.setSelectionRange)==null||f.call(a,i,i)})},insertVariable:(s,a)=>{const i=e.current;return s.slice(0,i)+a+s.slice(i)}}},Cx=({value:e,type:t,variables:n,onChange:r,hasError:o})=>{const{onBlur:s,inputRef:a,focusInput:i,insertVariable:c}=yx(),l=({value:f})=>{const g=c(e,f);r(g),i(f==null?void 0:f.length)};return console.log("type",t),d.jsx(ux,{inputRef:a,value:e,onChange:r,onBlur:s,placeholder:"Value",hasError:o,InputProps:{endAdornment:n.length>0?d.jsx(hx,{children:d.jsx(bx,{variables:n,onOptionClick:l})}):null}})},xx=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 15 15",fill:"none",...e},A.createElement("g",{clipPath:"url(#clip0_833_38792)"},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4 2.52266C11.4 2.86744 11.537 3.1981 11.7808 3.4419C12.0246 3.68569 12.3552 3.82266 12.7 3.82266C13.0448 3.82266 13.3754 3.68569 13.6192 3.4419C13.863 3.1981 14 2.86744 14 2.52266C14 2.17788 13.863 1.84722 13.6192 1.60342C13.3754 1.35962 13.0448 1.22266 12.7 1.22266C12.3552 1.22266 12.0246 1.35962 11.7808 1.60342C11.537 1.84722 11.4 2.17788 11.4 2.52266ZM1 2.52266C1 2.86744 1.13696 3.1981 1.38076 3.44189C1.62456 3.68569 1.95522 3.82266 2.3 3.82266C2.64478 3.82266 2.97544 3.68569 3.21924 3.44189C3.46304 3.1981 3.6 2.86744 3.6 2.52266C3.6 2.17788 3.46304 1.84721 3.21924 1.60342C2.97544 1.35962 2.64478 1.22266 2.3 1.22266C1.95522 1.22266 1.62456 1.35962 1.38076 1.60342C1.13696 1.84721 1 2.17787 1 2.52266Z",fill:"#7853FF",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4 12.3449C11.4 12.6897 11.537 13.0204 11.7808 13.2642C12.0246 13.508 12.3552 13.6449 12.7 13.6449C13.0448 13.6449 13.3754 13.508 13.6192 13.2642C13.863 13.0204 14 12.6897 14 12.3449C14 12.0001 13.863 11.6695 13.6192 11.4257C13.3754 11.1819 13.0448 11.0449 12.7 11.0449C12.3552 11.0449 12.0246 11.1819 11.7808 11.4257C11.537 11.6695 11.4 12.0001 11.4 12.3449ZM1 12.3449C1 12.6897 1.13696 13.0204 1.38076 13.2642C1.62456 13.508 1.95522 13.6449 2.3 13.6449C2.64478 13.6449 2.97544 13.508 3.21924 13.2642C3.46304 13.0204 3.6 12.6897 3.6 12.3449C3.6 12.0001 3.46304 11.6695 3.21924 11.4257C2.97544 11.1819 2.64478 11.0449 2.3 11.0449C1.95522 11.0449 1.62456 11.1819 1.38076 11.4257C1.13696 11.6695 1 12.0001 1 12.3449Z",fill:"#7853FF",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),A.createElement("path",{d:"M11.3984 2.52344L3.59844 2.52344L5.77656 2.52344",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),A.createElement("path",{d:"M11.3984 12.3457L3.59844 12.3457L5.77656 12.3457",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_833_38792"},A.createElement("rect",{width:15,height:15,fill:"white",transform:"translate(15) rotate(90)"})))),qc={outer:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,bgcolor:"#f3ebff",p:"6px",borderRadius:"8px"},frame:{width:24,height:24,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center"},rotate:{display:"flex",alignItems:"center",justifyContent:"center",transform:"rotate(90deg)",transformOrigin:"center","& svg":{width:15,height:15,display:"block"}}},vx=()=>d.jsx(u.Box,{"aria-hidden":!0,component:"span",sx:qc.outer,children:d.jsx(u.Box,{component:"span",sx:qc.frame,children:d.jsx(u.Box,{component:"span",sx:qc.rotate,children:d.jsx(xx,{})})})}),Ex=u.styled("img")`
1115
1115
  width: 16px;
1116
1116
  height: auto;
1117
1117
  object-fit: cover;
1118
- `,xx=e=>{const[t,n]=I.useState(!1),r=()=>{n(!0)};return t?null:d.jsx(Cx,{...e,onError:r})},vx=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:17,height:15,viewBox:"0 0 17 15",fill:"none",...e},T.createElement("path",{d:"M9.17193 1.59562C8.83327 1.17229 8.9019 0.554585 9.32522 0.215925C9.74855 -0.122735 10.3663 -0.0541004 10.7049 0.369224L9.93842 0.982422L9.17193 1.59562ZM15.0918 7.42414L15.8583 6.81094C16.1451 7.16944 16.1451 7.67884 15.8583 8.03734L15.0918 7.42414ZM10.7049 14.4791C10.3663 14.9024 9.74855 14.971 9.32522 14.6324C8.9019 14.2937 8.83327 13.676 9.17193 13.2527L9.93842 13.8659L10.7049 14.4791ZM14.7237 6.3812C15.2658 6.3812 15.7053 6.82068 15.7053 7.3628C15.7053 7.90492 15.2658 8.34439 14.7237 8.34439V7.3628V6.3812ZM0.981368 8.34439C0.439248 8.34439 -0.000226974 7.90492 -0.000226974 7.3628C-0.000226974 6.82068 0.439248 6.3812 0.981368 6.3812V7.3628V8.34439ZM9.93842 0.982422L10.7049 0.369224L15.8583 6.81094L15.0918 7.42414L14.3253 8.03734L9.17193 1.59562L9.93842 0.982422ZM15.0918 7.42414L15.8583 8.03734L10.7049 14.4791L9.93842 13.8659L9.17193 13.2527L14.3253 6.81094L15.0918 7.42414ZM14.7237 7.3628V8.34439H0.981368V7.3628V6.3812H14.7237V7.3628Z",fill:"#D6DDE8"})),Ex=1600,wx={borderRadius:"12px",padding:0,width:"max-content !important",maxWidth:"max-content !important",height:"100% !important",maxHeight:"100% !important",position:"fixed",top:0,bottom:0,right:0,margin:0};function Ix(e){return e.rowId??e.name}function _x(e){return!!e.interfaceDetails||!!e.searchInterfaceDetails}const Sx=({open:e,onClose:t,formId:n,fields:r,variables:o,connectorLogo:s,title:a="Map fields",fetchOptions:i,onSave:c,onCancel:l})=>{const f=I.useMemo(()=>[...r].sort((h,m)=>h.priority-m.priority),[r]),[g,y]=I.useState({}),v=()=>{t(),y({})},b=()=>{l==null||l(),y({}),t()},p=()=>{c({...g}),t()};return d.jsx(u.Dialog,{open:e,onClose:v,PaperProps:{sx:wx},maxWidth:!1,children:d.jsxs(u.Box,{position:"relative",padding:"24px 12px 20px",children:[d.jsx(u.Box,{position:"absolute",right:8,top:8,children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{onClick:v,size:"small","aria-label":"Close",children:d.jsx(u.icons.Close,{sx:{fontSize:20}})})})}),d.jsxs(u.Stack,{direction:"row",alignItems:"flex-start",gap:2,marginBottom:3,paddingRight:4,children:[d.jsx(yx,{}),d.jsxs(u.Stack,{gap:.5,flex:1,minWidth:0,children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:.5,children:[d.jsx(u.Typography,{variant:"h6",fontSize:18,fontWeight:600,color:u.theme.palette.gray.gray1,children:a}),d.jsx(u.Tooltip,{title:"Map Fields",placement:"top",children:d.jsx(u.IconButton,{size:"small","aria-label":"About mapping fields",sx:{padding:"4px"},children:d.jsx(u.icons.InfoOutlined,{sx:{fontSize:18,color:u.theme.palette.gray.gray3}})})})]}),d.jsx(u.Typography,{variant:"body2",fontSize:14,color:u.theme.palette.gray.gray3,children:"Match your fields to continue."})]})]}),d.jsxs(u.Stack,{border:`1px solid ${u.theme.palette.gray.gray5}`,borderRadius:"8px",overflow:"hidden",marginBottom:3,children:[d.jsxs(u.Stack,{direction:"row",padding:"10px 24px",sx:{backgroundColor:u.theme.palette.gray.gray6a,borderBottom:`1px solid ${u.theme.palette.gray.gray5}`},children:[d.jsx(xx,{src:s,alt:"Connector"}),d.jsx(u.Typography,{variant:"caption",fontWeight:600,color:u.theme.palette.gray.gray3,flex:1,children:"Field"}),d.jsx(u.Typography,{variant:"caption",fontWeight:600,color:u.theme.palette.gray.gray3,width:320,children:"Map to"})]}),f.map((h,m)=>{const C=Ix(h),x=g[C]??"";return d.jsxs(u.Stack,{direction:"row",alignItems:"center",padding:"12px 24px",gap:2,sx:{borderBottom:m<f.length-1?`1px solid ${u.theme.palette.gray.gray5}`:void 0,"&:last-child":{borderBottom:"none"}},children:[d.jsx(u.Stack,{direction:"row",alignItems:"center",gap:1,flex:1,minWidth:125,children:d.jsx(u.Typography,{variant:"body2",fontSize:14,color:u.theme.palette.gray.gray2,noWrap:!0,children:h.label})}),d.jsx(vx,{width:24,height:24}),d.jsx(u.Box,{width:320,flexShrink:0,children:_x(h)?d.jsx(sx,{fieldKey:`${n}-${h.name}`,interfaceDetails:h.interfaceDetails??h.searchInterfaceDetails,value:x,fetchOptions:w=>i(w,{formId:n,fieldName:h.name}),disabled:h.disabled,placeholder:h.placeholder??"Select",menuZIndex:Ex,formData:g,onChange:w=>y(E=>({...E,[C]:w}))}):d.jsx(mx,{variables:o.map(w=>({title:w,value:w})),value:g[C]??"",onChange:w=>y(E=>({...E,[C]:w})),hasError:!1})})]},C)})]}),d.jsxs(u.Stack,{direction:"row",justifyContent:"flex-end",gap:1.5,children:[d.jsx(u.Button,{variant:"outlined",color:"inherit",onClick:b,sx:{textTransform:"none"},children:"Cancel"}),d.jsx(u.Button,{variant:"contained",onClick:p,sx:{textTransform:"none"},children:"Save"})]})]})})},Qc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},Ax=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],es=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},$c=({formFields:e})=>{const t={};return e.forEach(n=>{var r,o,s,a,i,c;if(t[n.name]={},(r=n.validations)!=null&&r.isRequired&&(typeof n.validations.isRequired=="object"?t[n.name].isRequired=n6(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let l=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";l=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:l,t[n.name].validate=r6(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=o6();return}if(n.type==="text"&&n.limit){t[n.name].validate=Cc();return}if(n.type==="table"){const l=$c({formFields:n.columns??[]});t[n.name].validations=l}if((i=n.validations)!=null&&i.isUrl){const l=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=e6(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=t6(l)}}),t},Oa={isMultiSelect:e=>Array.isArray(e)?e.every(t=>typeof t=="object"&&"label"in t&&"value"in t):!1,isTable:e=>Array.isArray(e)?e.some(n=>!!n[La.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},ts=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return Oa.isMultiSelect(o)?s=o.map(a=>a.value):Oa.isTable(o)?s=o.map(({...i})=>(delete i[La.ROW_ID],i)).filter(i=>Object.keys(i).length>0):Oa.isSelect(o)?s=o.value:Oa.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),Tx=(e,t)=>{const n={},r=new Set;let o="";for(const s of e)s.rowId?(n[s.rowId]||(n[s.rowId]=[]),n[s.rowId].push(s),r.add(s.rowId),o=""):!n[o]||n[o].length>=t?(r.add(s.name),n[s.name]=[s],o=s.name):n[o].push(s);return[...r].map(s=>({id:s,formFields:n[s]}))},O1=(e,t)=>{if(!t||!Array.isArray(e))return 0;let n=0;for(const r of e){const o=t[r.name];if(r.type==="table"&&Array.isArray(o)){let s=0;for(const a of o){const i=O1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},yr="/v1/api",Lx=`${yr}/connectors/conversation/:conversationId/metadata`,Ox=`${yr}/connectors/forms/:formId/field/:fieldName/data`,Fx=`${yr}/connectors/form/:formId`,kx=`${yr}/connectors/forms/:id/link`,Dx=`${yr}/connectors/forms/:id/preview`,Nx=`${yr}/connectors/conversation/:conversationId/selected-email`,Rx=`${yr}/connectors/app-cf-values`,F1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:st(`${Ox}?${r.toString()}`,e),method:Pe.POST,data:t})},Mx=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:st(`${Fx}?${r.toString()}`,e),method:Pe.POST,data:t})},Px=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:`${Dx.replace(":id",e)}?${r.toString()}`,method:Pe.POST,data:{args:t}})},jx="https://avatars.githubusercontent.com/u/62397590",k1={optionsMap:null,createOptionApi:te.IDLE,dropdownOptionsApis:te.IDLE,previewCardData:null,previewCardApiStatus:te.IDLE,selectedSuggestionType:"basic"},D1=bc({name:"commonSlice",initialState:k1,reducers:{resetState:()=>k1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=te.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(Fa.pending,t=>{t.createOptionApi=te.LOADING}).addCase(Fa.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=te.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(Fa.rejected,t=>{t.createOptionApi=te.FAILED}).addCase(Cr.pending,t=>{t.dropdownOptionsApis=te.LOADING}).addCase(Cr.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=te.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(Cr.rejected,t=>{t.dropdownOptionsApis=te.FAILED}).addCase(no.pending,t=>{t.previewCardApiStatus=te.LOADING}).addCase(no.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=te.IDLE}).addCase(no.rejected,t=>{t.previewCardApiStatus=te.FAILED})}}),Fa=Yt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var p,h,m;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,g=Qc(c||{},s,r),{common:y}=t(),{options:v=[],...b}=((p=y.optionsMap)==null?void 0:p[g])||{};try{const C=await Mx({fieldName:r,formId:a},{args:l,conversation_id:i});if(!C||!("data"in C)||!("output_variables"in C.data)||!("external_resource_id"in C.data.output_variables))throw C;const x=C.data.output_variables,{external_resource_id:w,...E}=x,A=[{label:o,value:w,prefillValues:E},...v],S=Z0(A,L=>L.value);return f==null||f(S),{optionsList:S,key:g,...b}}catch(C){f==null||f(v);const x=C,w=(h=x==null?void 0:x.response)==null?void 0:h.data,E=typeof w=="string"?w:(w==null?void 0:w.message)||xn;return Se({message:E,type:Qe}),n((m=x==null?void 0:x.response)==null?void 0:m.status)}}),Cr=Yt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:g}=e,y=Qc(c||{},o,r),{common:v}=t();let b=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(b=a.meta.showAvatar);const p=((A=v.optionsMap)==null?void 0:A[y])||{},h=!e.isScrollToBottomEvent&&(!p||s!==p.searchTerm),m=h?[]:p.options||[],C=h?!0:p.hasMore??!0,x=h?0:p.currentPage??0,{enabled:w,limit:E}=f,_=E||10;try{let k;const R=g==null?void 0:g.signal,N=w?{pageNumber:x+1,searchTerm:s,limit:_,enabled:w}:null;if(C&&(k=await F1({fieldName:r,formId:o},{pagination:N||{},args:c,interfaceId:l})),R!=null&&R.aborted)throw R.reason;if(!k||!k.data||!("data"in k.data)||!Array.isArray(k.data.data)||!k.data.data.length){const{common:X}=t(),z=(S=X.optionsMap)==null?void 0:S[y];return i==null||i(z.options??[]),{...z,optionsList:z.options??[],key:y,hasMore:!1}}const V=k.data.data.map(X=>b?{...X,avatarUrl:X.avatarUrl||jx}:(delete X.avatarUrl,X)),Z=[...m,...V],J=w?V.length>=_:!1,$=Z0(Z,X=>X.value);return i==null||i($),{optionsList:$,fieldName:r,formId:o,searchTerm:s,currentPage:x+1,hasMore:J,key:y}}catch(k){const{common:R}=t(),N=((L=R.optionsMap)==null?void 0:L[y])||{};return i==null||i(N.options??[]),n(k)}},{condition:(e,{getState:t})=>{var g;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=Qc(a||{},r,n),{common:c}=t(),l=(g=c.optionsMap)==null?void 0:g[i];if((l==null?void 0:l.searchTerm)!==o)return!0;const f=(l==null?void 0:l.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),no=Yt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await Px(e,t,n),i=a==null?void 0:a.data;return i?(r&&Se({message:R0,type:rn}),{data:Nd(i)}):(r&&Se({message:N0,type:Qe}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:oT,resetPreviewCardData:Bx,setSelectedSuggestionType:Vx}=D1.actions,Gx=D1.reducer,xr="/v1/api",Hx=`${xr}/connectors/forms/list`,Wx=`${xr}/connectors/cards/:id/unlink`,Zx=`${xr}/connectors/forms/:id/link`,Xx=`${xr}/connectors/form/:formId`,zx=`${xr}/connectors/forms/:formId/data`,Yx=`${xr}/connectors/forms/:formId/get_forms_custom_fields`,N1=`${xr}/connectors/forms/:formId/defaults`,Jx=({inboxIds:e,channelType:t,conversationId:n})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",t),r.append("conversation_id",String(n)),Ee({url:`${Hx}?${r.toString()}`,method:Pe.GET})},R1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:st(`${Xx}?${r.toString()}`,e),method:Pe.POST,data:t})},qx=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),Ee({url:`${Wx.replace(":id",e)}?${o.toString()}`,method:Pe.POST,data:{externalResourceId:n,conversationId:r}})},Qx=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),Ee({url:`${Zx.replace(":id",e)}?${s.toString()}`,method:Pe.POST,data:{externalResourceId:t,conversationId:r}})},$x=(e,t="email",n,r,o)=>{const s=new URLSearchParams;return s.append("channel_type",t),s.append("conversation_id",String(n||"")),s.append("senderEmail",o),s.append("externalResourceId",r),Ee({url:`${zx.replace(":formId",e)}?${s.toString()}`,method:Pe.GET})},Ux="Error in previewing the card",M1="Link format isn't recognized. Please check that you've entered a valid URL",Kx="Item already linked",ev="Card linked successfully",tv="Error in linking the card",nv="New card created",rv="Card creation failed",ov="Create and link objects from different apps to this conversation",sv="Are you sure you want to change the primary object?",av="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",iv="Are you sure you want to leave?",cv=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
1119
- Do you want to continue?`,lv="Select an object to create",uv="Select an object to link",P1="Select object",dv="Paste URL or ID",fv="Object ID/Link",pv="Card updated",hv="Card updation failed",j1=3,gv="Map fields",Uc=(e,t)=>{var r,o,s,a,i,c,l,f,g,y,v,b,p;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((f=(l=e.validations)==null?void 0:l.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((y=(g=e.validations)==null?void 0:g.range)==null?void 0:y.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((v=e.validations)==null?void 0:v.maxRows)||5,limit:(b=e.validations)==null?void 0:b.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(p=e.validations)==null?void 0:p.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},B1=bc({name:"writeCapability",initialState:M0,reducers:{resetState:()=>M0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=te.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ka.pending,t=>{t.objectListApiStatus=te.LOADING}).addCase(ka.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=te.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=f}).addCase(ka.rejected,t=>{t.objectListApiStatus=te.FAILED}).addCase(Cr.pending,t=>{t.dropdownOptionsApis=te.LOADING}).addCase(Cr.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=te.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(Cr.rejected,t=>{t.dropdownOptionsApis=te.FAILED}).addCase(Da.pending,t=>{t.createFormApiStatus=te.LOADING}).addCase(Da.fulfilled,t=>{t.createFormApiStatus=te.IDLE}).addCase(Da.rejected,t=>{t.createFormApiStatus=te.FAILED}).addCase(Ma.pending,t=>{t.linkCardApiStatus=te.LOADING}).addCase(Ma.fulfilled,t=>{t.linkCardApiStatus=te.IDLE}).addCase(Ma.rejected,t=>{t.linkCardApiStatus=te.FAILED}).addCase(Ra.pending,t=>{t.unlinkCardApiStatus=te.LOADING}).addCase(Ra.fulfilled,t=>{t.unlinkCardApiStatus=te.IDLE}).addCase(Ra.rejected,t=>{t.unlinkCardApiStatus=te.FAILED}).addCase(Na.pending,t=>{t.updateFormApiStatus=te.LOADING}).addCase(Na.fulfilled,t=>{t.updateFormApiStatus=te.IDLE}).addCase(Na.rejected,t=>{t.updateFormApiStatus=te.FAILED}).addCase(Pa.pending,t=>{t.currentResourceDetailsApiStatus=te.LOADING}).addCase(Pa.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=te.IDLE}).addCase(Pa.rejected,t=>{t.currentResourceDetailsApiStatus=te.FAILED})}}),ka=Yt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await Jx({inboxIds:t,channelType:n,conversationId:r});if(!s||!s.data||!("formsList"in s.data)||!Array.isArray(s.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const a=s.data.formsList,i={},c=[],l=[],f=[],g=[],y=[],v={},b={};return a==null||a.forEach(p=>{var m,C;if(p.expandedView&&!o)return;const h={...p};"fieldList"in h&&delete h.fieldList,b[p.id]=h,i[p.id]||(i[p.id]={}),v[p.id]||(v[p.id]=[]),p.type==="create"&&p.authenticated?(c.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!l.includes(p.connectorName)&&l.push(p.connectorName)):p.type==="link"&&p.authenticated?f.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?g.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&y.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(m=p.fieldList)==null||m.sort((x,w)=>x.priority-w.priority),(C=p.fieldList)==null||C.forEach(x=>{const w=Uc(x);if(w.columns&&(w.columns=w.columns.map(E=>Uc(E,{loadOptionsOnFocus:!0,defaultOptions:!1}))),v[p.id]=[...v[p.id],w],x.interfaceDetails&&(x.interfaceDetails.args||x.interfaceDetails.optionalArgs)){const E={...x.interfaceDetails.args,...x.interfaceDetails.optionalArgs};Object.values(E).forEach(_=>{i[p.id][_]?i[p.id][_]=[...i[p.id][_],x.name]:i[p.id][_]=[x.name]})}})}),{createObjectList:c,createObjectConnectorNamesList:l,linkObjectList:f,editObjectList:g,searchObjectList:y,formFields:v,objectDict:b,dependentFieldsMap:i}}),Da=Yt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await R1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),Se({message:nv,type:rn})}catch(l){const f=l,g=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(g==null?void 0:g.message)??rv;return o==null||o(l),Se({message:y,type:Qe}),t(l)}}),Na=Yt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await R1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),Se({message:pv,type:rn})}catch(f){return o==null||o(f),Se({message:hv,type:Qe}),t(f)}}),Ra=Yt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await qx(e,t,n,r)}),Ma=Yt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await Qx(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Pa=Yt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await $x(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,y])=>{"label"in y&&(y.type&&y.type==="date"?f.values[g]=y.label?new Date(parseInt(y.label)).toISOString():"":y.type&&y.type==="multi-select"&&"value"in y&&"label"in y&&y.value&&y.label?f.values[g]=[{value:y.value,label:y.label}]:y.value?f.values[g]={value:y.value,label:y.label}:f.values[g]=y.label)}),{data:f,status:l}}catch(i){return Se({message:xn,type:Qe}),t(i)}}),{resetState:sT,setCurrentCardInEdit:ro,resetCurrentResourceDetails:mv,setHasUnsavedChanges:V1}=B1.actions,bv=B1.reducer,yv=()=>{const[e,t]=I.useState(null),[n,r]=I.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=I.useCallback(s=>{t(s)},[]);return I.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const a=100;let i=null;const c=150,l=f=>{s||(s=window.setTimeout(()=>{const g=f.target,y=Number(e.dataset.prevScrollLeft)||0,v=Number(e.dataset.prevScrollTop)||0,b=g.scrollLeft,p=g.scrollTop,h=b-y,m=p-v,C=Math.abs(m)>Math.abs(h),x=Math.abs(h)>Math.abs(m);r({isVertical:C,isHorizontal:x,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(p),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(g=>({...g,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},Cv="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8016%2011.709L12.3416%205.16893L11.4298%204.25712L4.88979%2010.7972V11.709H5.8016ZM6.33618%2012.9987H3.6001V10.2626L10.9739%202.88875C11.0948%202.76786%2011.2588%202.69995%2011.4298%202.69995C11.6008%202.69995%2011.7648%202.76786%2011.8857%202.88875L13.71%204.71302C13.8309%204.83395%2013.8988%204.99794%2013.8988%205.16893C13.8988%205.33992%2013.8309%205.50391%2013.71%205.62484L6.33618%2012.9987ZM3.6001%2014.2884H15.2073V15.578H3.6001V14.2884Z'%20fill='%236C7B94'/%3e%3c/svg%3e",xv=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(We),{userGroupId:i}=Xt()||{},[c,l]=yv(),{isScrolling:f,isVertical:g}=c,y=f&&g,v=I.useMemo(()=>(e==null?void 0:e[0].data.map(m=>m.label))||[],[e]),b=I.useMemo(()=>e.map(m=>{const C={cells:{},externalResourceId:m.externalResourceId};return m.data.forEach((x,w)=>{if(v[w]){let E=x.value?x.value:Zs;E&&x.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),C.cells[v[w]]={label:E,deepLink:x==null?void 0:x.deepLink}}}),C}),[e,v]),p=(m,C)=>d.jsx(b5,{align:"left",children:m.deepLink?d.jsx(u.Link,{target:"_blank",underline:"none",href:m.deepLink,children:m.label}):d.jsx(u.Typography,{variant:"body2",color:"gray.black",children:m.label})},`${C}_${m.label}`),h=m=>{!m||!n||(r(!1),s(md,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(ro({...n,externalResourceId:m})))};return d.jsxs(u.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[d.jsx(u.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),d.jsx(u.TableContainer,{ref:l,children:d.jsxs(u.Table,{stickyHeader:!0,children:[d.jsx(h5,{children:d.jsxs(u.TableRow,{children:[v.map(m=>d.jsx(g5,{sx:{whiteSpace:"nowrap"},children:d.jsx(u.Typography,{variant:"overline",color:"gray.gray3",children:m})},m)),d.jsx(C5,{})]})}),d.jsx(u.TableBody,{children:b.map((m,C)=>d.jsxs(m5,{children:[Object.values(m.cells).map((x,w)=>p(x,w)),d.jsx(y5,{children:!y&&m.externalResourceId&&d.jsx(u.Tooltip,{title:Sd,placement:"bottom",children:d.jsx(u.IconButton,{className:"row-edit",onClick:()=>h(m.externalResourceId),children:d.jsx("img",{src:Cv})})})})]},`id_${C}`))})]})})]})},vv=e=>e.cardList.connectorCards,Ev=e=>e.cardList.connectorsEnabled,wv=e=>e.cardList.connectorApiStatus,Iv=e=>e.cardList.cardSpecificData,_v=e=>e.cardList.specificConnectorApiStatus,Sv=e=>e.cardList.specificConnectorErrorCode,Av=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==te.IDLE||!n?!1:Object.values(n).every(r=>r===te.IDLE||r===te.FAILED)},Tv="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.8675L14.6475%2014.625H3.3525L9%204.8675ZM9%201.875L0.75%2016.125H17.25L9%201.875Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%2012.375H8.25V13.875H9.75V12.375Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%207.875H8.25V11.625H9.75V7.875Z'%20fill='%23F07530'/%3e%3c/svg%3e",G1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,H1=e=>{const t=/\(Error code: (.*?)\)$/,n=e.match(t),r=n?n[1]:null,o=n?e.replace(t,"").trim():e;return{error_code:r,error_message:o}},Lv=(e,t)=>`${Ld} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),Ov=(e,t,n)=>{var l,f,g,y,v;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((v=(y=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:y[0])!=null&&v.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&G1.test(c)?!0:!W1(e,t,n)&&!i.length},W1=(e,t,n)=>{var f,g;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(g=(f=o.data)==null?void 0:f.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===te.FAILED,c=o.cardErrorMessage,l=c&&G1.test(c);return i||a||c&&!l};function Fv(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const l=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[l],g=(f==null?void 0:f.connectorNames)??[];for(const y of g)r[y]||(r[y]=[],o[y]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[y].push(c),o[y].cards_visible+=1,o[y].card_key.push(c.id),o[y].card_title.push(c.title),Ov(c,t,n)&&(o[y].empty_cards+=1,s+=1),W1(c,t,n)&&(o[y].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,l])=>({app_name:c,...l})),total_empty_cards:s,total_cards_with_errors:a}}const Z1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:g,cardId:y,isCardLevelError:v,fieldName:b,showErrorIcon:p}=e,h=I.useRef(null),m=I.useRef(null),{email:C,currentSmIds:x,conversationId:w,sendTrackingEvent:E,connectorFunctions:_}=I.useContext(We),A=Ce(Sv),S=A==null?void 0:A[y],[L,k]=I.useState(!1),R=I.useMemo(()=>{if(n&&v){const{error_message:z}=H1(n);return z}return c?Ld.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):xd},[n,c,l,v]),N=I.useCallback(()=>{const z=n||Lv(S,l),{error_code:se,error_message:de}=H1(z);E==null||E(F3,{sm_ids:x,frontend_req_params:{email:C,conversationId:w,externalResourceId:g==null?void 0:g.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:se,error_message:de})},[n,S,E,x,C,w,f,l,g==null?void 0:g.externalResourceId]);I.useEffect(()=>{(n&&v||c&&S)&&N()},[N,S,c,n,v]),I.useEffect(()=>{const z=r?m.current:h.current;if(z){const se=z.scrollHeight>z.clientHeight||z.scrollWidth>z.clientWidth;k(se)}},[t,r]);const M=o==Xi.NOT_FOUND;let V=M?Zs:t;a==="date"&&V&&!M&&(V=new Date(parseInt(V)).toLocaleDateString(navigator.language));const Z=!!n||c,J=()=>{i?_==null||_.redirectToAdmin():window.open(C4,"_blank")},$=()=>{E==null||E(k3,{sm_ids:x,card_title:f,field_name:b})},X=z=>{const se=/<>(.*?)<>/g,de=z.split(se);return d.jsx(I.Fragment,{children:de.map((D,H)=>H%2===1?d.jsx(u5,{variant:"body2",onClick:J,children:D},H):D)})};return s?d.jsx(Rn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):Z?d.jsxs(Hd,{gap:"7px",children:[p?d.jsx(u.Stack,{marginTop:"3px",flexShrink:"0",children:d.jsx("img",{src:Tv,width:"18px",height:"18px"})}):null,d.jsx(Wd,{variant:"body2",children:R?X(R):xd})]}):d.jsx(u.Tooltip,{title:L?V:null,placement:"bottom",children:r?d.jsx(Zd,{ref:m,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:$,children:V||Zs}):d.jsx(f5,{ref:h,variant:"body2",children:V||Zs})})},X1="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_73646)'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_73646'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",vr=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>d.jsx(u.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:d.jsxs(u.Stack,{direction:"row",children:[r&&d.jsx(u.Box,{position:"absolute",right:10,top:10,children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{onClick:()=>t(!1),children:d.jsx("img",{src:X1})})})}),n]})}),z1=e=>{var D,H,G;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===te.IDLE,l=(o==null?void 0:o[t])===te.LOADING,f=(o==null?void 0:o[t])===te.FAILED,{cardType:g,data:y,cardErrorMessage:v,redirectToAdminTab:b,connectorNames:p}=(r==null?void 0:r[t])||{},h=g==="flat",[m,C]=I.useState(!1),[x,w]=I.useState(!1),[E,_]=I.useState(!1),[A,S]=I.useState(!1),L=((D=y==null?void 0:y.listItems)==null?void 0:D.statusCode)!==401,k=I.useMemo(()=>{var j,q,ne,re;return h&&((j=y==null?void 0:y.flatDisplay)!=null&&j.data)?y.flatDisplay.data:!h&&((re=(ne=(q=y==null?void 0:y.listItems)==null?void 0:q.fields)==null?void 0:ne[0])!=null&&re.data)?y.listItems.fields[0].data:[]},[h,y]),R=I.useMemo(()=>k==null?void 0:k.slice(0,5),[k]),[N,M]=I.useState([]),V=I.useRef(null),[Z,J]=I.useState(0),$=m?-180:0,X=h?!1:!!((H=y==null?void 0:y.listItems)!=null&&H.errorMessage),z=X||f||v,se=c&&!X&&s&&(E||x);I.useLayoutEffect(()=>{var j;(j=V.current)!=null&&j.scrollHeight&&J(V.current.scrollHeight+i)},[o==null?void 0:o[t],N,V]),I.useEffect(()=>{var re,B;const j=((k==null?void 0:k.length)||0)>5,q=!h&&(((B=(re=y==null?void 0:y.listItems)==null?void 0:re.fields)==null?void 0:B.length)||0)>1;_(j&&!q),w(q)},[y,h,k==null?void 0:k.length]),I.useEffect(()=>{M(m?k:R)},[y,m,R,k]);const de=()=>{E?C(j=>!j):S(j=>!j)};return d.jsxs(d.Fragment,{children:[d.jsx(vr,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:d.jsx(xv,{data:((G=y==null?void 0:y.listItems)==null?void 0:G.fields)||[],title:n,currentCard:a,setShowModal:S})}),d.jsx(c5,{className:s?"":"slideUp",height:Z,children:d.jsx(u.Stack,{ref:V,gap:1,margin:"12px",children:l&&!(N!=null&&N.length)?d.jsxs(d.Fragment,{children:[d.jsx(Rn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),d.jsx(Rn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):d.jsx(d.Fragment,{children:z?d.jsx(u.Box,{margin:"8px 0",children:d.jsx(Z1,{error:v,isLoading:l,redirectToAdminTab:b,isFailed:f,showErrorIcon:!L,connectorNames:p,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):N!=null&&N.length?N==null?void 0:N.map(j=>{const{value:q,label:ne,deepLink:re,type:B}=j,U="errorMessage"in j?j.errorMessage:null,fe="statusCode"in j?j.statusCode:null;return d.jsxs("div",{children:[d.jsx(l5,{variant:"overline",children:ne}),d.jsx(Z1,{value:q,error:U,deepLink:re,statusCode:fe,isLoading:l,type:B,cardTitle:n,currentCard:a,cardId:t,fieldName:ne})]},ne)}):d.jsx(u.Box,{margin:"8px 0",children:d.jsx(Wd,{children:c4})})})})}),!v&&se&&d.jsx(v5,{variant:"body2_medium",onClick:de,children:E?d.jsxs(d.Fragment,{children:[m?nb:Kd,d.jsx(x5,{src:tb,transformAngle:$})]}):Kd})]})},kv={connectorCards:null,cardSpecificData:null,connectorApiStatus:te.IDLE,conversationMetaDataApiStatus:te.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},Y1="/v1/api",Dv=`${Y1}/connectors/cards`,Nv=`${Y1}/connectors/cards/:id/data`,Rv=({inboxIds:e,conversationId:t,channelType:n="email"})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",n),r.append("conversation_id",String(t||"")),Ee({url:`${Dv}?${r.toString()}`,method:Pe.GET})},Mv=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),Ee({url:`${Nv.replace(":id",e)}?${o.toString()}`,method:Pe.GET})},J1=bc({name:"connectorCardLibrary",initialState:kv,reducers:{updateThreadId(e,t){const{payload:n}=t;e.threadId=n.threadId,e.connectorCards=null},clearConnectorList(e){e.connectorCards=null,e.cardSpecificData=null}},extraReducers:e=>{e.addCase(ja.pending,t=>{t.connectorApiStatus=te.LOADING}).addCase(ja.fulfilled,(t,n)=>{t.connectorApiStatus=te.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(ja.rejected,t=>{t.connectorApiStatus=te.FAILED}).addCase(ns.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:te.LOADING}}).addCase(ns.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:te.IDLE}}).addCase(ns.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:te.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Od;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),ja=Yt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var i;const r=await Rv({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((i=r==null?void 0:r.data)==null?void 0:i.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((c,l)=>(c==null?void 0:c.priority)-(l==null?void 0:l.priority)),connectorsEnabled:s}}),ns=Yt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Mv(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&Se({message:R0,type:rn}),{data:Nd(i),status:c}):(r&&Se({message:N0,type:Qe}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Od})}}),Pv=J1.reducer,q1=J1.actions,Q1="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",jv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.4587%206.7528C11.2244%206.51848%2010.8445%206.51848%2010.6102%206.7528C10.3759%206.98711%2010.3759%207.36701%2010.6102%207.60132L11.4587%206.7528ZM12.1916%208.33414L12.6158%207.90988L12.1916%208.33414ZM8.33462%2012.1911L8.75888%2011.7668L8.33462%2012.1911ZM7.6018%2010.6097C7.36748%2010.3754%206.98758%2010.3754%206.75327%2010.6097C6.51895%2010.8441%206.51895%2011.224%206.75327%2011.4583L7.6018%2010.6097ZM4.43911%209.14411C4.67343%209.37842%205.05333%209.37842%205.28764%209.14411C5.52196%208.9098%205.52196%208.5299%205.28764%208.29558L4.43911%209.14411ZM3.70629%207.56276L4.13056%207.1385L3.70629%207.56276ZM7.56324%203.70582L7.9875%203.28155L7.56324%203.70582ZM8.29606%205.28716C8.53037%205.52148%208.91027%205.52148%209.14459%205.28716C9.3789%205.05285%209.3789%204.67295%209.14459%204.43864L8.29606%205.28716ZM10.6102%207.60132L11.7673%208.75841L12.6158%207.90988L11.4587%206.7528L10.6102%207.60132ZM11.7673%208.75841C12.1662%209.15735%2012.3904%209.69843%2012.3904%2010.2626L13.5904%2010.2626C13.5904%209.38017%2013.2398%208.53387%2012.6158%207.90988L11.7673%208.75841ZM12.3904%2010.2626C12.3904%2010.8268%2012.1662%2011.3679%2011.7673%2011.7668L12.6158%2012.6154C13.2398%2011.9914%2013.5904%2011.1451%2013.5904%2010.2626L12.3904%2010.2626ZM11.7673%2011.7668C10.9365%2012.5976%209.58963%2012.5976%208.75888%2011.7668L7.91035%2012.6154C9.20973%2013.9147%2011.3164%2013.9147%2012.6158%2012.6154L11.7673%2011.7668ZM8.75888%2011.7668L7.6018%2010.6097L6.75327%2011.4583L7.91035%2012.6154L8.75888%2011.7668ZM5.28764%208.29558L4.13056%207.1385L3.28203%207.98703L4.43911%209.14411L5.28764%208.29558ZM4.13056%207.1385C3.73162%206.73956%203.50749%206.19848%203.50749%205.63429L2.30749%205.63429C2.30749%206.51674%202.65804%207.36304%203.28203%207.98703L4.13056%207.1385ZM3.50749%205.63429C3.50749%205.0701%203.73162%204.52902%204.13056%204.13008L3.28203%203.28155C2.65804%203.90554%202.30749%204.75184%202.30749%205.63429L3.50749%205.63429ZM4.13056%204.13008C4.96131%203.29933%206.30822%203.29933%207.13897%204.13008L7.9875%203.28155C6.68812%201.98217%204.58141%201.98217%203.28203%203.28155L4.13056%204.13008ZM7.13897%204.13008L8.29606%205.28716L9.14459%204.43864L7.9875%203.28155L7.13897%204.13008Z'%20fill='%236C7B94'/%3e%3crect%20x='5.08887'%20y='6.0791'%20width='1.33333'%20height='6.66667'%20rx='0.666667'%20transform='rotate(-45%205.08887%206.0791)'%20fill='%236C7B94'/%3e%3cpath%20d='M5.59961%2014.3998V12.7998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.7998%205.59961H14.3998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.40039%2011.2002H4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2002%202.40039V4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Bv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5908_39767)'%3e%3cpath%20d='M9.37333%206.01333L9.98667%206.62667L3.94667%2012.6667H3.33333V12.0533L9.37333%206.01333ZM11.7733%202C11.6067%202%2011.4333%202.06667%2011.3067%202.19333L10.0867%203.41333L12.5867%205.91333L13.8067%204.69333C14.0667%204.43333%2014.0667%204.01333%2013.8067%203.75333L12.2467%202.19333C12.1133%202.06%2011.9467%202%2011.7733%202ZM9.37333%204.12667L2%2011.5V14H4.5L11.8733%206.62667L9.37333%204.12667Z'%20fill='%236C7B94'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5908_39767'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",$1=e=>e.write.createObjectList,Vv=e=>e.write.createObjectConnectorNamesList,U1=e=>e.write.linkObjectList,Gv=e=>e.write.editObjectList,Hv=e=>e.write.objectDict,Wv=e=>e.write.formFields,Zv=e=>e.write.linkCardApiStatus,Xv=e=>e.write.unlinkCardApiStatus,zv=e=>e.write.dependentFieldsMap,Yv=e=>e.write.createFormApiStatus,Jv=e=>e.write.updateFormApiStatus,qv=e=>e.write.currentResourceDetails,Qv=e=>e.write.currentResourceDetailsApiStatus,K1=e=>e.write.currentCardInEdit,ep=e=>e.write.hasUnsavedChanges,$v=e=>typeof e=="string"?/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(e):typeof e=="object"&&"_isValid"in e,tp=e=>Object.keys(e).sort((n,r)=>r.localeCompare(n)).reduce((n,r)=>{var o;return(typeof e[r]=="string"||typeof e[r]=="object"&&e[r]!==null)&&$v(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),Uv=e=>h4.replace("{{connectorName}}",e),Kv=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=zt(),{sendTrackingEvent:c}=I.useContext(We),f=Ce(Xv)===te.LOADING,g=()=>{s&&o&&i(Ra({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(y3,{connector_name:a,conversation_id:s}),t(!1),r(),Se({message:wy,type:rn})}).catch(()=>{Se({message:Iy,type:rn})})};return d.jsx(vr,{shown:e,setShown:t,showCloseButton:!0,children:d.jsxs(u.Stack,{width:"400px",padding:"20px",gap:"8px",children:[d.jsx(u.Typography,{variant:"h2",children:p4}),d.jsx(u.Typography,{variant:"body2",children:Uv(a)}),d.jsxs(u.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[d.jsx(u.Button,{variant:"text",onClick:()=>t(!1),children:Ji}),d.jsx(u.Button,{disabled:f,color:"error",onClick:g,children:_d})]})]})})},eE=({actions:e,isHovered:t=!1})=>{const r=e.filter(i=>i.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),a=t?(s.length+1)*32:32;return d.jsxs(p5,{width:a,isHovered:t,children:[d.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:g})=>d.jsx(u.Tooltip,{title:l,placement:"bottom",children:d.jsx(zr,{onClick:g,disabled:c,children:d.jsx("img",{src:f})})},i))}),o&&d.jsx(u.Tooltip,{title:o.label,placement:"bottom",children:d.jsx(zr,{onClick:o.action,disabled:o.disabled,children:d.jsx("img",{src:o.iconSrc})})},o.id)]})},tE=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=zt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:g}=I.useContext(We),{userGroupId:y}=Xt()||{},[v,b]=I.useState(!!s),[p,h]=I.useState(!1),[m,C]=I.useState(!1),[x,w]=I.useState(!1),{id:E,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let k=E;A&&(k=`${k}_${A}`);const{data:R,cardType:N,cardErrorMessage:M,connectorNames:V}=(n==null?void 0:n[k])??{},Z=(V==null?void 0:V[0])||"",J=(o==null?void 0:o[k])===te.LOADING,$=(o==null?void 0:o[k])===te.FAILED,X=!!(tt(c,yd)&&A),z=I.useMemo(()=>{var B,U;if(M||$||!(tt(c,K3)&&S.some(fe=>fe.type==="edit")))return!1;switch(N){case"flat":return!!((R==null?void 0:R.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((B=R==null?void 0:R.listItems)==null?void 0:B.fields.length)===1?(U=R==null?void 0:R.listItems)==null?void 0:U.fields.some(fe=>fe.externalResourceId):!1;default:return!1}},[R,N,c,S,t,M,$]),se=I.useCallback((B=!1)=>{const U=B?w3:E3;r&&E&&f&&i(ns({id:E,email:r,conversationId:f,externalResourceId:A})).unwrap().then(fe=>{const Y={...Dd(fe,_,B,!0),sm_ids:g};l(U,Y)}).catch(fe=>{const Y={...Dd(fe,_,B,!1),sm_ids:g};l(U,Y)})},[i,r,E,_,l,f,A,g]);I.useEffect(()=>{v&&se(!0)},[v,se]);const de=(B,U)=>{var Y;B==null||B.stopPropagation(),i(ns({id:U,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{l(c3,{id:U})});const fe=B.target.tagName==="BUTTON"?(Y=B.target)==null?void 0:Y.firstChild:B.target;fe.className&&(fe.className=""),setTimeout(()=>fe.className="selected",1)},D=(B,U)=>{B.stopPropagation(),!(n!=null&&n[U])&&!J&&se(),l(v?i3:a3,{id:U}),b(fe=>!fe)},H=B=>{B.stopPropagation();const U=B.currentTarget.offsetWidth<B.currentTarget.scrollWidth;h(!!U)},G=B=>{var fe,Y;B.stopPropagation(),l(md,{card_title:_,connector_name:Z,ug_id:y,sm_ids:g});let U;N==="flat"?U=(R==null?void 0:R.flatDisplay.externalResourceId)??t.externalResourceId:N==="flat_with_list"&&(U=(Y=(fe=R==null?void 0:R.listItems)==null?void 0:fe.fields[0])==null?void 0:Y.externalResourceId),U?i(ro({...t,externalResourceId:U})):Se({message:xn,type:Qe})},j=B=>{B.stopPropagation(),C(!0)},q=()=>{w(!0)},ne=()=>{w(!1)},re=[{id:"unlink",label:_d,disabled:J,shown:X,iconSrc:jv,action:B=>j(B)},{id:"refresh",label:vd,disabled:J,shown:!0,iconSrc:Q1,action:B=>de(B,E)},{id:"edit",label:Sd,disabled:J,shown:z,iconSrc:Bv,action:B=>G(B)}];return d.jsxs(o5,{"data-testid":`test_${E}`,onMouseEnter:q,onMouseLeave:ne,children:[d.jsxs(s5,{className:v?"hiver-card-expanded":"",onClick:B=>D(B,k),children:[d.jsxs(a5,{children:[L&&d.jsx("img",{src:L,alt:_}),d.jsx(u.Tooltip,{title:p?_:"",placement:"bottom",children:d.jsx(i5,{variant:"h4",onMouseOver:B=>H(B),onMouseLeave:B=>H(B),children:_})})]}),d.jsxs(Hd,{children:[d.jsx(eE,{actions:re,isHovered:x}),d.jsx(u.Tooltip,{title:v?Ed:zi,placement:"bottom",children:d.jsx(zr,{onClick:B=>D(B,k),children:d.jsx(Ui,{className:v?"":"hiver-up"})})})]})]}),d.jsx(z1,{id:k,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:v}),d.jsx(Kv,{showUnlinkModal:m,setShowUnlinkModal:C,cardId:E,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:Z})]})},nE=Number.MAX_SAFE_INTEGER,rE=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=I.useContext(We),i=tt(s,t4)?nE:1;return d.jsx(u.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:g}=c;let y=f;return g&&(y=`${y}_${g}`),d.jsx("div",{children:d.jsx(tE,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},y)})})},oo=({children:e})=>{if(!Array.isArray(e))return e;let t=null;return e.find(r=>typeof(r==null?void 0:r.type)!="function"?!1:(r.props.fallback&&(t=r),r.props.condition))??t};function En({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}oo.CaseView=En;const oE="Bring your favourite tools into Hiver",sE="Plugin image",aE="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",iE="Enable Connectors",cE="Enable Apps",lE="Learn more",uE="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",dE="Contact your admin to enable this",fE="https://youtu.be/ODcJnzZLb50",pE="connectors-module/assets/connectors-images/connector-mainpage.png",hE="connectors-module/assets/connectors-images/connector-mainpage-apps.png",gE="Explore connectors",mE="Connectors",bE=u.styled(u.Box)`
1118
+ margin-right: 8px;
1119
+ `,wx=e=>{const[t,n]=I.useState(!1),r=()=>{n(!0)};return t?null:d.jsx(Ex,{...e,onError:r})},Ix=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:17,height:15,viewBox:"0 0 17 15",fill:"none",...e},A.createElement("path",{d:"M9.17193 1.59562C8.83327 1.17229 8.9019 0.554585 9.32522 0.215925C9.74855 -0.122735 10.3663 -0.0541004 10.7049 0.369224L9.93842 0.982422L9.17193 1.59562ZM15.0918 7.42414L15.8583 6.81094C16.1451 7.16944 16.1451 7.67884 15.8583 8.03734L15.0918 7.42414ZM10.7049 14.4791C10.3663 14.9024 9.74855 14.971 9.32522 14.6324C8.9019 14.2937 8.83327 13.676 9.17193 13.2527L9.93842 13.8659L10.7049 14.4791ZM14.7237 6.3812C15.2658 6.3812 15.7053 6.82068 15.7053 7.3628C15.7053 7.90492 15.2658 8.34439 14.7237 8.34439V7.3628V6.3812ZM0.981368 8.34439C0.439248 8.34439 -0.000226974 7.90492 -0.000226974 7.3628C-0.000226974 6.82068 0.439248 6.3812 0.981368 6.3812V7.3628V8.34439ZM9.93842 0.982422L10.7049 0.369224L15.8583 6.81094L15.0918 7.42414L14.3253 8.03734L9.17193 1.59562L9.93842 0.982422ZM15.0918 7.42414L15.8583 8.03734L10.7049 14.4791L9.93842 13.8659L9.17193 13.2527L14.3253 6.81094L15.0918 7.42414ZM14.7237 7.3628V8.34439H0.981368V7.3628V6.3812H14.7237V7.3628Z",fill:"#D6DDE8"})),_x=u.styled(u.Stack)`
1120
+ height: 100%;
1121
+ position: relative;
1122
+
1123
+ align-items: stretch;
1124
+ justify-content: flex-start;
1125
+ padding: 32px 0 0;
1126
+ `,Sx=u.styled(u.Stack)`
1127
+ flex-direction: row;
1128
+ align-items: center;
1129
+ justify-content: space-between;
1130
+ padding: 0 32px 24px;
1131
+ border-bottom: 1px solid ${({theme:e})=>e.palette.gray.gray5};
1132
+ `,Tx=u.styled(u.Stack)`
1133
+ flex-grow: 1;
1134
+ flex-basis: 0;
1135
+ min-height: 0;
1136
+ overflow: auto;
1137
+ `,Ax=u.styled(u.Stack)`
1138
+ border: 1px solid ${({theme:e})=>e.palette.gray.gray5};
1139
+ border-radius: 8px;
1140
+ margin: 16px 32px;
1141
+ `,Lx=u.styled(u.Stack)`
1142
+ flex-direction: row;
1143
+ justify-content: flex-start;
1144
+ margin: auto 0 0;
1145
+ padding: 16px 32px;
1146
+ gap: 10px;
1147
+ border-top: 1px solid ${({theme:e})=>e.palette.gray.gray5};
1148
+ `,Ox=1600,Fx={borderRadius:"0 !important",padding:"0 !important",width:"max-content !important",maxWidth:"max-content !important",height:"100% !important",maxHeight:"100% !important",position:"fixed",boxSizing:"border-box !important",top:0,bottom:0,right:0,margin:0};function kx(e){return e.rowId??e.name}function Dx(e){return!!e.interfaceDetails||!!e.searchInterfaceDetails}const Nx=({open:e,onClose:t,formId:n,fields:r,variables:o,connectorLogo:s,isSaving:a,title:i="Map fields",isLoading:c=!1,defaultValues:l,fetchOptions:f,onSave:g,onCancel:y})=>{const v=I.useMemo(()=>[...r].sort((x,w)=>x.priority-w.priority),[r]),[b,p]=I.useState({});I.useEffect(()=>{l&&e&&p({...l})},[l,e]),I.useEffect(()=>()=>{e||p({})},[e]);const h=()=>{t(),p({})},m=()=>{y==null||y(),p({}),t()},C=()=>{g({...b})};return d.jsx(u.Dialog,{open:e,onClose:h,PaperProps:{sx:Fx},maxWidth:!1,children:c?d.jsx(u.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"615px"},children:d.jsx(u.CircularProgress,{})}):d.jsxs(_x,{children:[d.jsxs(Sx,{children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:2,children:[d.jsx(vx,{}),d.jsx(u.Stack,{gap:.5,flex:1,minWidth:0,children:d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:.5,children:[d.jsx(u.Typography,{variant:"h6",fontSize:18,fontWeight:600,color:u.theme.palette.gray.gray1,children:i}),d.jsx(u.Tooltip,{title:"Assign default values to create fields",placement:"top",children:d.jsx(u.IconButton,{size:"small","aria-label":"About mapping fields",sx:{padding:"4px"},children:d.jsx(u.icons.InfoOutlined,{sx:{fontSize:18,color:u.theme.palette.gray.gray3}})})})]})})]}),d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{onClick:h,size:"small","aria-label":"Close",children:d.jsx(u.icons.Close,{sx:{fontSize:20}})})})]}),d.jsx(Tx,{children:d.jsxs(Ax,{children:[d.jsxs(u.Stack,{direction:"row",padding:"10px 24px",sx:{backgroundColor:u.theme.palette.gray.gray6a,borderBottom:`1px solid ${u.theme.palette.gray.gray5}`},children:[d.jsx(wx,{src:s,alt:"Connector"}),d.jsx(u.Typography,{variant:"caption",fontWeight:600,color:u.theme.palette.gray.gray3,flex:1,children:"Field"}),d.jsx(u.Typography,{variant:"caption",fontWeight:600,color:u.theme.palette.gray.gray3,width:320,children:"Map to"})]}),v.map((x,w)=>{const E=kx(x),_=b[E]??"";return d.jsxs(u.Stack,{direction:"row",alignItems:"center",padding:"12px 24px",gap:2,sx:{borderBottom:w<v.length-1?`1px solid ${u.theme.palette.gray.gray5}`:void 0,"&:last-child":{borderBottom:"none"}},children:[d.jsx(u.Stack,{direction:"row",alignItems:"center",gap:1,flex:1,minWidth:125,children:d.jsx(u.Typography,{variant:"body2",fontSize:14,color:u.theme.palette.gray.gray2,noWrap:!0,children:x.label})}),d.jsx(Ix,{width:24,height:24}),d.jsx(u.Box,{width:320,flexShrink:0,children:Dx(x)?d.jsx(cx,{fieldKey:`${n}-${x.name}`,interfaceDetails:x.interfaceDetails??x.searchInterfaceDetails,value:_,fetchOptions:T=>f(T,{formId:n,fieldName:x.name}),disabled:x.disabled,placeholder:x.placeholder??"Select",menuZIndex:Ox,formData:b,onChange:T=>p(S=>({...S,[E]:T}))}):d.jsx(Cx,{type:x.type,variables:o,value:b[E]??"",onChange:T=>p(S=>({...S,[E]:T})),hasError:!1})})]},E)})]})}),d.jsxs(Lx,{children:[d.jsx(u.Button,{variant:"contained",onClick:C,sx:{textTransform:"none",padding:"3px 32px !important"},disabled:a,children:"Save"}),d.jsx(u.Button,{variant:"outlined",color:"inherit",onClick:m,disabled:a,sx:{textTransform:"none",padding:"3px 12px !important",borderColor:u.theme.palette.gray.gray5},children:"Cancel"})]})]})})},Qc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},Rx=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],ns=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},$c=({formFields:e})=>{const t={};return e.forEach(n=>{var r,o,s,a,i,c;if(t[n.name]={},(r=n.validations)!=null&&r.isRequired&&(typeof n.validations.isRequired=="object"?t[n.name].isRequired=n6(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let l=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";l=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:l,t[n.name].validate=r6(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=o6();return}if(n.type==="text"&&n.limit){t[n.name].validate=Cc();return}if(n.type==="table"){const l=$c({formFields:n.columns??[]});t[n.name].validations=l}if((i=n.validations)!=null&&i.isUrl){const l=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=e6(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=t6(l)}}),t},Oa={isMultiSelect:e=>Array.isArray(e)?e.every(t=>typeof t=="object"&&"label"in t&&"value"in t):!1,isTable:e=>Array.isArray(e)?e.some(n=>!!n[La.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},rs=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return Oa.isMultiSelect(o)?s=o.map(a=>a.value):Oa.isTable(o)?s=o.map(({...i})=>(delete i[La.ROW_ID],i)).filter(i=>Object.keys(i).length>0):Oa.isSelect(o)?s=o.value:Oa.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),Mx=(e,t)=>{const n={},r=new Set;let o="";for(const s of e)s.rowId?(n[s.rowId]||(n[s.rowId]=[]),n[s.rowId].push(s),r.add(s.rowId),o=""):!n[o]||n[o].length>=t?(r.add(s.name),n[s.name]=[s],o=s.name):n[o].push(s);return[...r].map(s=>({id:s,formFields:n[s]}))},O1=(e,t)=>{if(!t||!Array.isArray(e))return 0;let n=0;for(const r of e){const o=t[r.name];if(r.type==="table"&&Array.isArray(o)){let s=0;for(const a of o){const i=O1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},mr="/v1/api",Px=`${mr}/connectors/conversation/:conversationId/metadata`,jx=`${mr}/connectors/forms/:formId/field/:fieldName/data`,Bx=`${mr}/connectors/form/:formId`,Vx=`${mr}/connectors/forms/:id/link`,Gx=`${mr}/connectors/forms/:id/preview`,Hx=`${mr}/connectors/conversation/:conversationId/selected-email`,Wx=`${mr}/connectors/app-cf-values`,F1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${jx}?${r.toString()}`,e),method:Pe.POST,data:t})},Zx=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${Bx}?${r.toString()}`,e),method:Pe.POST,data:t})},Xx=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:`${Gx.replace(":id",e)}?${r.toString()}`,method:Pe.POST,data:{args:t}})},zx="https://avatars.githubusercontent.com/u/62397590",k1={optionsMap:null,createOptionApi:ee.IDLE,dropdownOptionsApis:ee.IDLE,previewCardData:null,previewCardApiStatus:ee.IDLE,selectedSuggestionType:"basic"},D1=bc({name:"commonSlice",initialState:k1,reducers:{resetState:()=>k1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=ee.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(Fa.pending,t=>{t.createOptionApi=ee.LOADING}).addCase(Fa.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=ee.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(Fa.rejected,t=>{t.createOptionApi=ee.FAILED}).addCase(br.pending,t=>{t.dropdownOptionsApis=ee.LOADING}).addCase(br.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=ee.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(br.rejected,t=>{t.dropdownOptionsApis=ee.FAILED}).addCase(ro.pending,t=>{t.previewCardApiStatus=ee.LOADING}).addCase(ro.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=ee.IDLE}).addCase(ro.rejected,t=>{t.previewCardApiStatus=ee.FAILED})}}),Fa=Yt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var p,h,m;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,g=Qc(c||{},s,r),{common:y}=t(),{options:v=[],...b}=((p=y.optionsMap)==null?void 0:p[g])||{};try{const C=await Zx({fieldName:r,formId:a},{args:l,conversation_id:i});if(!C||!("data"in C)||!("output_variables"in C.data)||!("external_resource_id"in C.data.output_variables))throw C;const x=C.data.output_variables,{external_resource_id:w,...E}=x,T=[{label:o,value:w,prefillValues:E},...v],S=Z0(T,L=>L.value);return f==null||f(S),{optionsList:S,key:g,...b}}catch(C){f==null||f(v);const x=C,w=(h=x==null?void 0:x.response)==null?void 0:h.data,E=typeof w=="string"?w:(w==null?void 0:w.message)||xn;return _e({message:E,type:Ue}),n((m=x==null?void 0:x.response)==null?void 0:m.status)}}),br=Yt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var T,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:g}=e,y=Qc(c||{},o,r),{common:v}=t();let b=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(b=a.meta.showAvatar);const p=((T=v.optionsMap)==null?void 0:T[y])||{},h=!e.isScrollToBottomEvent&&(!p||s!==p.searchTerm),m=h?[]:p.options||[],C=h?!0:p.hasMore??!0,x=h?0:p.currentPage??0,{enabled:w,limit:E}=f,_=E||10;try{let R;const k=g==null?void 0:g.signal,D=w?{pageNumber:x+1,searchTerm:s,limit:_,enabled:w}:null;if(C&&(R=await F1({fieldName:r,formId:o},{pagination:D||{},args:c,interfaceId:l})),k!=null&&k.aborted)throw k.reason;if(!R||!R.data||!("data"in R.data)||!Array.isArray(R.data.data)||!R.data.data.length){const{common:z}=t(),q=(S=z.optionsMap)==null?void 0:S[y];return i==null||i(q.options??[]),{...q,optionsList:q.options??[],key:y,hasMore:!1}}const G=R.data.data.map(z=>b?{...z,avatarUrl:z.avatarUrl||zx}:(delete z.avatarUrl,z)),Y=[...m,...G],X=w?G.length>=_:!1,J=Z0(Y,z=>z.value);return i==null||i(J),{optionsList:J,fieldName:r,formId:o,searchTerm:s,currentPage:x+1,hasMore:X,key:y}}catch(R){const{common:k}=t(),D=((L=k.optionsMap)==null?void 0:L[y])||{};return i==null||i(D.options??[]),n(R)}},{condition:(e,{getState:t})=>{var g;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=Qc(a||{},r,n),{common:c}=t(),l=(g=c.optionsMap)==null?void 0:g[i];if((l==null?void 0:l.searchTerm)!==o)return!0;const f=(l==null?void 0:l.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),ro=Yt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await Xx(e,t,n),i=a==null?void 0:a.data;return i?(r&&_e({message:R0,type:nn}),{data:Nd(i)}):(r&&_e({message:N0,type:Ue}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:fA,resetPreviewCardData:Yx,setSelectedSuggestionType:Jx}=D1.actions,qx=D1.reducer,yr="/v1/api",Qx=`${yr}/connectors/forms/list`,$x=`${yr}/connectors/cards/:id/unlink`,Ux=`${yr}/connectors/forms/:id/link`,Kx=`${yr}/connectors/form/:formId`,ev=`${yr}/connectors/forms/:formId/data`,tv=`${yr}/connectors/forms/:formId/get_forms_custom_fields`,N1=`${yr}/connectors/forms/:formId/defaults`,nv=({inboxIds:e,channelType:t,conversationId:n})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",t),r.append("conversation_id",String(n)),Ee({url:`${Qx}?${r.toString()}`,method:Pe.GET})},R1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${Kx}?${r.toString()}`,e),method:Pe.POST,data:t})},rv=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),Ee({url:`${$x.replace(":id",e)}?${o.toString()}`,method:Pe.POST,data:{externalResourceId:n,conversationId:r}})},ov=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),Ee({url:`${Ux.replace(":id",e)}?${s.toString()}`,method:Pe.POST,data:{externalResourceId:t,conversationId:r}})},sv=(e,t="email",n,r,o)=>{const s=new URLSearchParams;return s.append("channel_type",t),s.append("conversation_id",String(n||"")),s.append("senderEmail",o),s.append("externalResourceId",r),Ee({url:`${ev.replace(":formId",e)}?${s.toString()}`,method:Pe.GET})},av="Error in previewing the card",M1="Link format isn't recognized. Please check that you've entered a valid URL",iv="Item already linked",cv="Card linked successfully",lv="Error in linking the card",uv="New card created",dv="Card creation failed",fv="Create and link objects from different apps to this conversation",pv="Are you sure you want to change the primary object?",hv="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",gv="Are you sure you want to leave?",mv=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
1149
+ Do you want to continue?`,bv="Select an object to create",yv="Select an object to link",P1="Select object",Cv="Paste URL or ID",xv="Object ID/Link",vv="Card updated",Ev="Card updation failed",j1=3,wv="Map fields",Uc=(e,t)=>{var r,o,s,a,i,c,l,f,g,y,v,b,p;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((f=(l=e.validations)==null?void 0:l.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((y=(g=e.validations)==null?void 0:g.range)==null?void 0:y.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((v=e.validations)==null?void 0:v.maxRows)||5,limit:(b=e.validations)==null?void 0:b.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(p=e.validations)==null?void 0:p.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},B1=bc({name:"writeCapability",initialState:M0,reducers:{resetState:()=>M0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=ee.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ka.pending,t=>{t.objectListApiStatus=ee.LOADING}).addCase(ka.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=ee.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=f}).addCase(ka.rejected,t=>{t.objectListApiStatus=ee.FAILED}).addCase(br.pending,t=>{t.dropdownOptionsApis=ee.LOADING}).addCase(br.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=ee.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(br.rejected,t=>{t.dropdownOptionsApis=ee.FAILED}).addCase(Da.pending,t=>{t.createFormApiStatus=ee.LOADING}).addCase(Da.fulfilled,t=>{t.createFormApiStatus=ee.IDLE}).addCase(Da.rejected,t=>{t.createFormApiStatus=ee.FAILED}).addCase(Ma.pending,t=>{t.linkCardApiStatus=ee.LOADING}).addCase(Ma.fulfilled,t=>{t.linkCardApiStatus=ee.IDLE}).addCase(Ma.rejected,t=>{t.linkCardApiStatus=ee.FAILED}).addCase(Ra.pending,t=>{t.unlinkCardApiStatus=ee.LOADING}).addCase(Ra.fulfilled,t=>{t.unlinkCardApiStatus=ee.IDLE}).addCase(Ra.rejected,t=>{t.unlinkCardApiStatus=ee.FAILED}).addCase(Na.pending,t=>{t.updateFormApiStatus=ee.LOADING}).addCase(Na.fulfilled,t=>{t.updateFormApiStatus=ee.IDLE}).addCase(Na.rejected,t=>{t.updateFormApiStatus=ee.FAILED}).addCase(Pa.pending,t=>{t.currentResourceDetailsApiStatus=ee.LOADING}).addCase(Pa.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=ee.IDLE}).addCase(Pa.rejected,t=>{t.currentResourceDetailsApiStatus=ee.FAILED})}}),ka=Yt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await nv({inboxIds:t,channelType:n,conversationId:r});if(!s||!s.data||!("formsList"in s.data)||!Array.isArray(s.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const a=s.data.formsList,i={},c=[],l=[],f=[],g=[],y=[],v={},b={};return a==null||a.forEach(p=>{var m,C;if(p.expandedView&&!o)return;const h={...p};"fieldList"in h&&delete h.fieldList,b[p.id]=h,i[p.id]||(i[p.id]={}),v[p.id]||(v[p.id]=[]),p.type==="create"&&p.authenticated?(c.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!l.includes(p.connectorName)&&l.push(p.connectorName)):p.type==="link"&&p.authenticated?f.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?g.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&y.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(m=p.fieldList)==null||m.sort((x,w)=>x.priority-w.priority),(C=p.fieldList)==null||C.forEach(x=>{const w=Uc(x);if(w.columns&&(w.columns=w.columns.map(E=>Uc(E,{loadOptionsOnFocus:!0,defaultOptions:!1}))),v[p.id]=[...v[p.id],w],x.interfaceDetails&&(x.interfaceDetails.args||x.interfaceDetails.optionalArgs)){const E={...x.interfaceDetails.args,...x.interfaceDetails.optionalArgs};Object.values(E).forEach(_=>{i[p.id][_]?i[p.id][_]=[...i[p.id][_],x.name]:i[p.id][_]=[x.name]})}})}),{createObjectList:c,createObjectConnectorNamesList:l,linkObjectList:f,editObjectList:g,searchObjectList:y,formFields:v,objectDict:b,dependentFieldsMap:i}}),Da=Yt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await R1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),_e({message:uv,type:nn})}catch(l){const f=l,g=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(g==null?void 0:g.message)??dv;return o==null||o(l),_e({message:y,type:Ue}),t(l)}}),Na=Yt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await R1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),_e({message:vv,type:nn})}catch(f){return o==null||o(f),_e({message:Ev,type:Ue}),t(f)}}),Ra=Yt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await rv(e,t,n,r)}),Ma=Yt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await ov(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Pa=Yt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await sv(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,y])=>{"label"in y&&(y.type&&y.type==="date"?f.values[g]=y.label?new Date(parseInt(y.label)).toISOString():"":y.type&&y.type==="multi-select"&&"value"in y&&"label"in y&&y.value&&y.label?f.values[g]=[{value:y.value,label:y.label}]:y.value?f.values[g]={value:y.value,label:y.label}:f.values[g]=y.label)}),{data:f,status:l}}catch(i){return _e({message:xn,type:Ue}),t(i)}}),{resetState:pA,setCurrentCardInEdit:oo,resetCurrentResourceDetails:Iv,setHasUnsavedChanges:V1}=B1.actions,_v=B1.reducer,Sv=()=>{const[e,t]=I.useState(null),[n,r]=I.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=I.useCallback(s=>{t(s)},[]);return I.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const a=100;let i=null;const c=150,l=f=>{s||(s=window.setTimeout(()=>{const g=f.target,y=Number(e.dataset.prevScrollLeft)||0,v=Number(e.dataset.prevScrollTop)||0,b=g.scrollLeft,p=g.scrollTop,h=b-y,m=p-v,C=Math.abs(m)>Math.abs(h),x=Math.abs(h)>Math.abs(m);r({isVertical:C,isHorizontal:x,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(p),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(g=>({...g,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},Tv="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8016%2011.709L12.3416%205.16893L11.4298%204.25712L4.88979%2010.7972V11.709H5.8016ZM6.33618%2012.9987H3.6001V10.2626L10.9739%202.88875C11.0948%202.76786%2011.2588%202.69995%2011.4298%202.69995C11.6008%202.69995%2011.7648%202.76786%2011.8857%202.88875L13.71%204.71302C13.8309%204.83395%2013.8988%204.99794%2013.8988%205.16893C13.8988%205.33992%2013.8309%205.50391%2013.71%205.62484L6.33618%2012.9987ZM3.6001%2014.2884H15.2073V15.578H3.6001V14.2884Z'%20fill='%236C7B94'/%3e%3c/svg%3e",Av=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),{userGroupId:i}=Xt()||{},[c,l]=Sv(),{isScrolling:f,isVertical:g}=c,y=f&&g,v=I.useMemo(()=>(e==null?void 0:e[0].data.map(m=>m.label))||[],[e]),b=I.useMemo(()=>e.map(m=>{const C={cells:{},externalResourceId:m.externalResourceId};return m.data.forEach((x,w)=>{if(v[w]){let E=x.value?x.value:Zs;E&&x.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),C.cells[v[w]]={label:E,deepLink:x==null?void 0:x.deepLink}}}),C}),[e,v]),p=(m,C)=>d.jsx(b5,{align:"left",children:m.deepLink?d.jsx(u.Link,{target:"_blank",underline:"none",href:m.deepLink,children:m.label}):d.jsx(u.Typography,{variant:"body2",color:"gray.black",children:m.label})},`${C}_${m.label}`),h=m=>{!m||!n||(r(!1),s(md,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(oo({...n,externalResourceId:m})))};return d.jsxs(u.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[d.jsx(u.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),d.jsx(u.TableContainer,{ref:l,children:d.jsxs(u.Table,{stickyHeader:!0,children:[d.jsx(h5,{children:d.jsxs(u.TableRow,{children:[v.map(m=>d.jsx(g5,{sx:{whiteSpace:"nowrap"},children:d.jsx(u.Typography,{variant:"overline",color:"gray.gray3",children:m})},m)),d.jsx(C5,{})]})}),d.jsx(u.TableBody,{children:b.map((m,C)=>d.jsxs(m5,{children:[Object.values(m.cells).map((x,w)=>p(x,w)),d.jsx(y5,{children:!y&&m.externalResourceId&&d.jsx(u.Tooltip,{title:Sd,placement:"bottom",children:d.jsx(u.IconButton,{className:"row-edit",onClick:()=>h(m.externalResourceId),children:d.jsx("img",{src:Tv})})})})]},`id_${C}`))})]})})]})},Lv=e=>e.cardList.connectorCards,Ov=e=>e.cardList.connectorsEnabled,Fv=e=>e.cardList.connectorApiStatus,kv=e=>e.cardList.cardSpecificData,Dv=e=>e.cardList.specificConnectorApiStatus,Nv=e=>e.cardList.specificConnectorErrorCode,Rv=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==ee.IDLE||!n?!1:Object.values(n).every(r=>r===ee.IDLE||r===ee.FAILED)},Mv="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.8675L14.6475%2014.625H3.3525L9%204.8675ZM9%201.875L0.75%2016.125H17.25L9%201.875Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%2012.375H8.25V13.875H9.75V12.375Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%207.875H8.25V11.625H9.75V7.875Z'%20fill='%23F07530'/%3e%3c/svg%3e",G1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,H1=e=>{const t=/\(Error code: (.*?)\)$/,n=e.match(t),r=n?n[1]:null,o=n?e.replace(t,"").trim():e;return{error_code:r,error_message:o}},Pv=(e,t)=>`${Ld} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),jv=(e,t,n)=>{var l,f,g,y,v;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((v=(y=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:y[0])!=null&&v.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&G1.test(c)?!0:!W1(e,t,n)&&!i.length},W1=(e,t,n)=>{var f,g;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(g=(f=o.data)==null?void 0:f.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===ee.FAILED,c=o.cardErrorMessage,l=c&&G1.test(c);return i||a||c&&!l};function Bv(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const l=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[l],g=(f==null?void 0:f.connectorNames)??[];for(const y of g)r[y]||(r[y]=[],o[y]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[y].push(c),o[y].cards_visible+=1,o[y].card_key.push(c.id),o[y].card_title.push(c.title),jv(c,t,n)&&(o[y].empty_cards+=1,s+=1),W1(c,t,n)&&(o[y].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,l])=>({app_name:c,...l})),total_empty_cards:s,total_cards_with_errors:a}}const Z1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:g,cardId:y,isCardLevelError:v,fieldName:b,showErrorIcon:p}=e,h=I.useRef(null),m=I.useRef(null),{email:C,currentSmIds:x,conversationId:w,sendTrackingEvent:E,connectorFunctions:_}=I.useContext(He),T=Ce(Nv),S=T==null?void 0:T[y],[L,R]=I.useState(!1),k=I.useMemo(()=>{if(n&&v){const{error_message:q}=H1(n);return q}return c?Ld.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):xd},[n,c,l,v]),D=I.useCallback(()=>{const q=n||Pv(S,l),{error_code:ne,error_message:ce}=H1(q);E==null||E(F3,{sm_ids:x,frontend_req_params:{email:C,conversationId:w,externalResourceId:g==null?void 0:g.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:ne,error_message:ce})},[n,S,E,x,C,w,f,l,g==null?void 0:g.externalResourceId]);I.useEffect(()=>{(n&&v||c&&S)&&D()},[D,S,c,n,v]),I.useEffect(()=>{const q=r?m.current:h.current;if(q){const ne=q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth;R(ne)}},[t,r]);const M=o==Xi.NOT_FOUND;let G=M?Zs:t;a==="date"&&G&&!M&&(G=new Date(parseInt(G)).toLocaleDateString(navigator.language));const Y=!!n||c,X=()=>{i?_==null||_.redirectToAdmin():window.open(C4,"_blank")},J=()=>{E==null||E(k3,{sm_ids:x,card_title:f,field_name:b})},z=q=>{const ne=/<>(.*?)<>/g,ce=q.split(ne);return d.jsx(I.Fragment,{children:ce.map((V,N)=>N%2===1?d.jsx(u5,{variant:"body2",onClick:X,children:V},N):V)})};return s?d.jsx(Dn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):Y?d.jsxs(Hd,{gap:"7px",children:[p?d.jsx(u.Stack,{marginTop:"3px",flexShrink:"0",children:d.jsx("img",{src:Mv,width:"18px",height:"18px"})}):null,d.jsx(Wd,{variant:"body2",children:k?z(k):xd})]}):d.jsx(u.Tooltip,{title:L?G:null,placement:"bottom",children:r?d.jsx(Zd,{ref:m,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:J,children:G||Zs}):d.jsx(f5,{ref:h,variant:"body2",children:G||Zs})})},X1="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_73646)'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_73646'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Cr=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>d.jsx(u.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:d.jsxs(u.Stack,{direction:"row",children:[r&&d.jsx(u.Box,{position:"absolute",right:10,top:10,children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{onClick:()=>t(!1),children:d.jsx("img",{src:X1})})})}),n]})}),z1=e=>{var V,N,H;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===ee.IDLE,l=(o==null?void 0:o[t])===ee.LOADING,f=(o==null?void 0:o[t])===ee.FAILED,{cardType:g,data:y,cardErrorMessage:v,redirectToAdminTab:b,connectorNames:p}=(r==null?void 0:r[t])||{},h=g==="flat",[m,C]=I.useState(!1),[x,w]=I.useState(!1),[E,_]=I.useState(!1),[T,S]=I.useState(!1),L=((V=y==null?void 0:y.listItems)==null?void 0:V.statusCode)!==401,R=I.useMemo(()=>{var j,$,oe,re;return h&&((j=y==null?void 0:y.flatDisplay)!=null&&j.data)?y.flatDisplay.data:!h&&((re=(oe=($=y==null?void 0:y.listItems)==null?void 0:$.fields)==null?void 0:oe[0])!=null&&re.data)?y.listItems.fields[0].data:[]},[h,y]),k=I.useMemo(()=>R==null?void 0:R.slice(0,5),[R]),[D,M]=I.useState([]),G=I.useRef(null),[Y,X]=I.useState(0),J=m?-180:0,z=h?!1:!!((N=y==null?void 0:y.listItems)!=null&&N.errorMessage),q=z||f||v,ne=c&&!z&&s&&(E||x);I.useLayoutEffect(()=>{var j;(j=G.current)!=null&&j.scrollHeight&&X(G.current.scrollHeight+i)},[o==null?void 0:o[t],D,G]),I.useEffect(()=>{var re,B;const j=((R==null?void 0:R.length)||0)>5,$=!h&&(((B=(re=y==null?void 0:y.listItems)==null?void 0:re.fields)==null?void 0:B.length)||0)>1;_(j&&!$),w($)},[y,h,R==null?void 0:R.length]),I.useEffect(()=>{M(m?R:k)},[y,m,k,R]);const ce=()=>{E?C(j=>!j):S(j=>!j)};return d.jsxs(d.Fragment,{children:[d.jsx(Cr,{shown:T,setShown:S,showCloseButton:!0,borderRadius:12,children:d.jsx(Av,{data:((H=y==null?void 0:y.listItems)==null?void 0:H.fields)||[],title:n,currentCard:a,setShowModal:S})}),d.jsx(c5,{className:s?"":"slideUp",height:Y,children:d.jsx(u.Stack,{ref:G,gap:1,margin:"12px",children:l&&!(D!=null&&D.length)?d.jsxs(d.Fragment,{children:[d.jsx(Dn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),d.jsx(Dn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):d.jsx(d.Fragment,{children:q?d.jsx(u.Box,{margin:"8px 0",children:d.jsx(Z1,{error:v,isLoading:l,redirectToAdminTab:b,isFailed:f,showErrorIcon:!L,connectorNames:p,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):D!=null&&D.length?D==null?void 0:D.map(j=>{const{value:$,label:oe,deepLink:re,type:B}=j,te="errorMessage"in j?j.errorMessage:null,fe="statusCode"in j?j.statusCode:null;return d.jsxs("div",{children:[d.jsx(l5,{variant:"overline",children:oe}),d.jsx(Z1,{value:$,error:te,deepLink:re,statusCode:fe,isLoading:l,type:B,cardTitle:n,currentCard:a,cardId:t,fieldName:oe})]},oe)}):d.jsx(u.Box,{margin:"8px 0",children:d.jsx(Wd,{children:c4})})})})}),!v&&ne&&d.jsx(v5,{variant:"body2_medium",onClick:ce,children:E?d.jsxs(d.Fragment,{children:[m?nb:Kd,d.jsx(x5,{src:tb,transformAngle:J})]}):Kd})]})},Vv={connectorCards:null,cardSpecificData:null,connectorApiStatus:ee.IDLE,conversationMetaDataApiStatus:ee.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},Y1="/v1/api",Gv=`${Y1}/connectors/cards`,Hv=`${Y1}/connectors/cards/:id/data`,Wv=({inboxIds:e,conversationId:t,channelType:n="email"})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",n),r.append("conversation_id",String(t||"")),Ee({url:`${Gv}?${r.toString()}`,method:Pe.GET})},Zv=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),Ee({url:`${Hv.replace(":id",e)}?${o.toString()}`,method:Pe.GET})},J1=bc({name:"connectorCardLibrary",initialState:Vv,reducers:{updateThreadId(e,t){const{payload:n}=t;e.threadId=n.threadId,e.connectorCards=null},clearConnectorList(e){e.connectorCards=null,e.cardSpecificData=null}},extraReducers:e=>{e.addCase(ja.pending,t=>{t.connectorApiStatus=ee.LOADING}).addCase(ja.fulfilled,(t,n)=>{t.connectorApiStatus=ee.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(ja.rejected,t=>{t.connectorApiStatus=ee.FAILED}).addCase(os.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.LOADING}}).addCase(os.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.IDLE}}).addCase(os.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Od;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),ja=Yt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var i;const r=await Wv({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((i=r==null?void 0:r.data)==null?void 0:i.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((c,l)=>(c==null?void 0:c.priority)-(l==null?void 0:l.priority)),connectorsEnabled:s}}),os=Yt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Zv(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&_e({message:R0,type:nn}),{data:Nd(i),status:c}):(r&&_e({message:N0,type:Ue}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Od})}}),Xv=J1.reducer,q1=J1.actions,Q1="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",zv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.4587%206.7528C11.2244%206.51848%2010.8445%206.51848%2010.6102%206.7528C10.3759%206.98711%2010.3759%207.36701%2010.6102%207.60132L11.4587%206.7528ZM12.1916%208.33414L12.6158%207.90988L12.1916%208.33414ZM8.33462%2012.1911L8.75888%2011.7668L8.33462%2012.1911ZM7.6018%2010.6097C7.36748%2010.3754%206.98758%2010.3754%206.75327%2010.6097C6.51895%2010.8441%206.51895%2011.224%206.75327%2011.4583L7.6018%2010.6097ZM4.43911%209.14411C4.67343%209.37842%205.05333%209.37842%205.28764%209.14411C5.52196%208.9098%205.52196%208.5299%205.28764%208.29558L4.43911%209.14411ZM3.70629%207.56276L4.13056%207.1385L3.70629%207.56276ZM7.56324%203.70582L7.9875%203.28155L7.56324%203.70582ZM8.29606%205.28716C8.53037%205.52148%208.91027%205.52148%209.14459%205.28716C9.3789%205.05285%209.3789%204.67295%209.14459%204.43864L8.29606%205.28716ZM10.6102%207.60132L11.7673%208.75841L12.6158%207.90988L11.4587%206.7528L10.6102%207.60132ZM11.7673%208.75841C12.1662%209.15735%2012.3904%209.69843%2012.3904%2010.2626L13.5904%2010.2626C13.5904%209.38017%2013.2398%208.53387%2012.6158%207.90988L11.7673%208.75841ZM12.3904%2010.2626C12.3904%2010.8268%2012.1662%2011.3679%2011.7673%2011.7668L12.6158%2012.6154C13.2398%2011.9914%2013.5904%2011.1451%2013.5904%2010.2626L12.3904%2010.2626ZM11.7673%2011.7668C10.9365%2012.5976%209.58963%2012.5976%208.75888%2011.7668L7.91035%2012.6154C9.20973%2013.9147%2011.3164%2013.9147%2012.6158%2012.6154L11.7673%2011.7668ZM8.75888%2011.7668L7.6018%2010.6097L6.75327%2011.4583L7.91035%2012.6154L8.75888%2011.7668ZM5.28764%208.29558L4.13056%207.1385L3.28203%207.98703L4.43911%209.14411L5.28764%208.29558ZM4.13056%207.1385C3.73162%206.73956%203.50749%206.19848%203.50749%205.63429L2.30749%205.63429C2.30749%206.51674%202.65804%207.36304%203.28203%207.98703L4.13056%207.1385ZM3.50749%205.63429C3.50749%205.0701%203.73162%204.52902%204.13056%204.13008L3.28203%203.28155C2.65804%203.90554%202.30749%204.75184%202.30749%205.63429L3.50749%205.63429ZM4.13056%204.13008C4.96131%203.29933%206.30822%203.29933%207.13897%204.13008L7.9875%203.28155C6.68812%201.98217%204.58141%201.98217%203.28203%203.28155L4.13056%204.13008ZM7.13897%204.13008L8.29606%205.28716L9.14459%204.43864L7.9875%203.28155L7.13897%204.13008Z'%20fill='%236C7B94'/%3e%3crect%20x='5.08887'%20y='6.0791'%20width='1.33333'%20height='6.66667'%20rx='0.666667'%20transform='rotate(-45%205.08887%206.0791)'%20fill='%236C7B94'/%3e%3cpath%20d='M5.59961%2014.3998V12.7998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.7998%205.59961H14.3998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.40039%2011.2002H4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2002%202.40039V4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Yv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5908_39767)'%3e%3cpath%20d='M9.37333%206.01333L9.98667%206.62667L3.94667%2012.6667H3.33333V12.0533L9.37333%206.01333ZM11.7733%202C11.6067%202%2011.4333%202.06667%2011.3067%202.19333L10.0867%203.41333L12.5867%205.91333L13.8067%204.69333C14.0667%204.43333%2014.0667%204.01333%2013.8067%203.75333L12.2467%202.19333C12.1133%202.06%2011.9467%202%2011.7733%202ZM9.37333%204.12667L2%2011.5V14H4.5L11.8733%206.62667L9.37333%204.12667Z'%20fill='%236C7B94'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5908_39767'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",$1=e=>e.write.createObjectList,Jv=e=>e.write.createObjectConnectorNamesList,U1=e=>e.write.linkObjectList,qv=e=>e.write.editObjectList,Qv=e=>e.write.objectDict,$v=e=>e.write.formFields,Uv=e=>e.write.linkCardApiStatus,Kv=e=>e.write.unlinkCardApiStatus,eE=e=>e.write.dependentFieldsMap,tE=e=>e.write.createFormApiStatus,nE=e=>e.write.updateFormApiStatus,rE=e=>e.write.currentResourceDetails,oE=e=>e.write.currentResourceDetailsApiStatus,K1=e=>e.write.currentCardInEdit,ep=e=>e.write.hasUnsavedChanges,sE=e=>typeof e=="string"?/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(e):typeof e=="object"&&"_isValid"in e,tp=e=>Object.keys(e).sort((n,r)=>r.localeCompare(n)).reduce((n,r)=>{var o;return(typeof e[r]=="string"||typeof e[r]=="object"&&e[r]!==null)&&sE(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),aE=e=>h4.replace("{{connectorName}}",e),iE=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=zt(),{sendTrackingEvent:c}=I.useContext(He),f=Ce(Kv)===ee.LOADING,g=()=>{s&&o&&i(Ra({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(y3,{connector_name:a,conversation_id:s}),t(!1),r(),_e({message:wy,type:nn})}).catch(()=>{_e({message:Iy,type:nn})})};return d.jsx(Cr,{shown:e,setShown:t,showCloseButton:!0,children:d.jsxs(u.Stack,{width:"400px",padding:"20px",gap:"8px",children:[d.jsx(u.Typography,{variant:"h2",children:p4}),d.jsx(u.Typography,{variant:"body2",children:aE(a)}),d.jsxs(u.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[d.jsx(u.Button,{variant:"text",onClick:()=>t(!1),children:Ji}),d.jsx(u.Button,{disabled:f,color:"error",onClick:g,children:_d})]})]})})},cE=({actions:e,isHovered:t=!1})=>{const r=e.filter(i=>i.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),a=t?(s.length+1)*32:32;return d.jsxs(p5,{width:a,isHovered:t,children:[d.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:g})=>d.jsx(u.Tooltip,{title:l,placement:"bottom",children:d.jsx(Yr,{onClick:g,disabled:c,children:d.jsx("img",{src:f})})},i))}),o&&d.jsx(u.Tooltip,{title:o.label,placement:"bottom",children:d.jsx(Yr,{onClick:o.action,disabled:o.disabled,children:d.jsx("img",{src:o.iconSrc})})},o.id)]})},lE=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=zt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:g}=I.useContext(He),{userGroupId:y}=Xt()||{},[v,b]=I.useState(!!s),[p,h]=I.useState(!1),[m,C]=I.useState(!1),[x,w]=I.useState(!1),{id:E,title:_,externalResourceId:T="",forms:S=[],logoUrl:L}=t;let R=E;T&&(R=`${R}_${T}`);const{data:k,cardType:D,cardErrorMessage:M,connectorNames:G}=(n==null?void 0:n[R])??{},Y=(G==null?void 0:G[0])||"",X=(o==null?void 0:o[R])===ee.LOADING,J=(o==null?void 0:o[R])===ee.FAILED,z=!!(tt(c,yd)&&T),q=I.useMemo(()=>{var B,te;if(M||J||!(tt(c,K3)&&S.some(fe=>fe.type==="edit")))return!1;switch(D){case"flat":return!!((k==null?void 0:k.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((B=k==null?void 0:k.listItems)==null?void 0:B.fields.length)===1?(te=k==null?void 0:k.listItems)==null?void 0:te.fields.some(fe=>fe.externalResourceId):!1;default:return!1}},[k,D,c,S,t,M,J]),ne=I.useCallback((B=!1)=>{const te=B?w3:E3;r&&E&&f&&i(os({id:E,email:r,conversationId:f,externalResourceId:T})).unwrap().then(fe=>{const Z={...Dd(fe,_,B,!0),sm_ids:g};l(te,Z)}).catch(fe=>{const Z={...Dd(fe,_,B,!1),sm_ids:g};l(te,Z)})},[i,r,E,_,l,f,T,g]);I.useEffect(()=>{v&&ne(!0)},[v,ne]);const ce=(B,te)=>{var Z;B==null||B.stopPropagation(),i(os({id:te,email:r,conversationId:f,isRefresh:!0,externalResourceId:T})).unwrap().then(()=>{l(c3,{id:te})});const fe=B.target.tagName==="BUTTON"?(Z=B.target)==null?void 0:Z.firstChild:B.target;fe.className&&(fe.className=""),setTimeout(()=>fe.className="selected",1)},V=(B,te)=>{B.stopPropagation(),!(n!=null&&n[te])&&!X&&ne(),l(v?i3:a3,{id:te}),b(fe=>!fe)},N=B=>{B.stopPropagation();const te=B.currentTarget.offsetWidth<B.currentTarget.scrollWidth;h(!!te)},H=B=>{var fe,Z;B.stopPropagation(),l(md,{card_title:_,connector_name:Y,ug_id:y,sm_ids:g});let te;D==="flat"?te=(k==null?void 0:k.flatDisplay.externalResourceId)??t.externalResourceId:D==="flat_with_list"&&(te=(Z=(fe=k==null?void 0:k.listItems)==null?void 0:fe.fields[0])==null?void 0:Z.externalResourceId),te?i(oo({...t,externalResourceId:te})):_e({message:xn,type:Ue})},j=B=>{B.stopPropagation(),C(!0)},$=()=>{w(!0)},oe=()=>{w(!1)},re=[{id:"unlink",label:_d,disabled:X,shown:z,iconSrc:zv,action:B=>j(B)},{id:"refresh",label:vd,disabled:X,shown:!0,iconSrc:Q1,action:B=>ce(B,E)},{id:"edit",label:Sd,disabled:X,shown:q,iconSrc:Yv,action:B=>H(B)}];return d.jsxs(o5,{"data-testid":`test_${E}`,onMouseEnter:$,onMouseLeave:oe,children:[d.jsxs(s5,{className:v?"hiver-card-expanded":"",onClick:B=>V(B,R),children:[d.jsxs(a5,{children:[L&&d.jsx("img",{src:L,alt:_}),d.jsx(u.Tooltip,{title:p?_:"",placement:"bottom",children:d.jsx(i5,{variant:"h4",onMouseOver:B=>N(B),onMouseLeave:B=>N(B),children:_})})]}),d.jsxs(Hd,{children:[d.jsx(cE,{actions:re,isHovered:x}),d.jsx(u.Tooltip,{title:v?Ed:zi,placement:"bottom",children:d.jsx(Yr,{onClick:B=>V(B,R),children:d.jsx(Ui,{className:v?"":"hiver-up"})})})]})]}),d.jsx(z1,{id:R,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:v}),d.jsx(iE,{showUnlinkModal:m,setShowUnlinkModal:C,cardId:E,onCardUnlinking:a,conversationId:f,externalResourceId:T,connectorName:Y})]})},uE=Number.MAX_SAFE_INTEGER,dE=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=I.useContext(He),i=tt(s,t4)?uE:1;return d.jsx(u.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:g}=c;let y=f;return g&&(y=`${y}_${g}`),d.jsx("div",{children:d.jsx(lE,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},y)})})},so=({children:e})=>{if(!Array.isArray(e))return e;let t=null;return e.find(r=>typeof(r==null?void 0:r.type)!="function"?!1:(r.props.fallback&&(t=r),r.props.condition))??t};function En({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}so.CaseView=En;const fE="Bring your favourite tools into Hiver",pE="Plugin image",hE="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",gE="Enable Connectors",mE="Enable Apps",bE="Learn more",yE="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",CE="Contact your admin to enable this",xE="https://youtu.be/ODcJnzZLb50",vE="connectors-module/assets/connectors-images/connector-mainpage.png",EE="connectors-module/assets/connectors-images/connector-mainpage-apps.png",wE="Explore connectors",IE="Connectors",_E=u.styled(u.Box)`
1120
1150
  padding-top: 20px;
1121
- `,yE=u.styled(u.Stack)`
1151
+ `,SE=u.styled(u.Stack)`
1122
1152
  width: 100%;
1123
1153
  height: 97px;
1124
1154
  background-color: ${u.theme.palette.purple.light};
@@ -1134,17 +1164,17 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1134
1164
  height: 56px;
1135
1165
  width: 102px;
1136
1166
  }
1137
- `,CE=u.styled(u.Typography)`
1167
+ `,TE=u.styled(u.Typography)`
1138
1168
  color: ${u.theme.palette.gray.gray1};
1139
1169
  height: 54px;
1140
1170
  width: 120px;
1141
1171
  line-height: 18px;
1142
- `,xE=u.styled(u.Link)`
1172
+ `,AE=u.styled(u.Link)`
1143
1173
  display: block;
1144
1174
  width: 100%;
1145
1175
  margin-bottom: 20px;
1146
1176
  margin-top: 12px;
1147
- `,vE=u.styled(u.Typography)`
1177
+ `,LE=u.styled(u.Typography)`
1148
1178
  color: ${u.theme.palette.gray.gray1};
1149
1179
  font-size: 13px;
1150
1180
  margin-bottom: 24px;
@@ -1158,17 +1188,17 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1158
1188
  background-color: #e3dfff;
1159
1189
  border: 1px solid ${u.theme.palette.purple.primary};
1160
1190
  }
1161
- `,EE=u.styled(u.Stack)`
1191
+ `,OE=u.styled(u.Stack)`
1162
1192
  margin-top: 16px;
1163
1193
  justify-content: center;
1164
1194
  align-items: center;
1165
1195
  gap: 8px;
1166
- `,wE=u.styled(u.icons.InfoOutlined)`
1196
+ `,FE=u.styled(u.icons.InfoOutlined)`
1167
1197
  width: 18px;
1168
1198
  color: ${u.theme.palette.gray.gray3};
1169
- `,IE=u.styled(u.Typography)`
1199
+ `,kE=u.styled(u.Typography)`
1170
1200
  color: ${u.theme.palette.gray.gray3};
1171
- `,_E="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",SE={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_HIVER_CDN_URL:"https://cdn.hiverhq.com/",VITE_MY_ENV_VAR:"myVariable From Agent"},{VITE_HIVER_CDN_URL:AE}=SE,rp=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=I.useContext(We),s=tt(r,$3),a=tt(r,Ws),i=g=>{g.stopPropagation(),n(o3),o==null||o.redirectToAdmin()},c=g=>{g.stopPropagation(),n(s3),window.open(uE,"_blank")},l=()=>{n(O3,{source:"main_tab"})},f=a?hE:pE;return d.jsxs(bE,{"data-testid":"noConnectors",children:[s?d.jsxs(d.Fragment,{children:[t?null:d.jsx(u.Typography,{variant:"h2",children:a?Yi:mE}),d.jsx(xE,{onClick:l,href:fE,target:"_blank",children:d.jsx(q8,{src:AE+f,alt:gE,aspectRatio:"1000/783"})})]}):d.jsxs(yE,{children:[d.jsx(CE,{variant:"body1_medium",children:oE}),d.jsx("img",{src:_E,alt:sE})]}),d.jsx(vE,{variant:"body2",children:aE}),e?d.jsx(np,{endIcon:d.jsx(u.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?cE:iE}):d.jsxs(d.Fragment,{children:[d.jsx(np,{onClick:c,children:lE}),d.jsxs(EE,{direction:"row",children:[d.jsx(wE,{}),d.jsx(IE,{variant:"caption",children:dE})]})]})]})},TE=()=>{const{availableFeatures:e}=I.useContext(We),t=tt(e,Ws);return d.jsxs(Gd,{children:[d.jsxs(u.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?d.jsx(Pd,{width:"20px",height:"20px"}):d.jsx(Bd,{}),d.jsx(Vd,{variant:"h2",children:t?Yi:wd})]}),d.jsxs(u.Stack,{gap:"12px",children:[d.jsx(Rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),d.jsx(Rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),d.jsx(Rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},LE=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=I.useContext(We),[o,s]=I.useState(!1),a=I.useRef(null),[i,c]=I.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:g=[],title:y}=l||{},{version:v=""}=l||{},b=w4(v),p=I.useMemo(()=>E4(v),[v]),h=I.useMemo(()=>(g==null?void 0:g.filter(({isAdminPanelLink:w})=>!(!n&&w)))??[],[g,n]);if(I.useEffect(()=>{!p&&l&&Qi(v,!0)},[p,v,l]),I.useLayoutEffect(()=>{var w;(w=a.current)!=null&&w.scrollHeight&&c(a.current.scrollHeight)},[a]),I.useEffect(()=>{l&&!b&&t(u3,{update_version_id:v})},[]),!l||b)return null;const m=w=>{var E;w.stopPropagation(),s(_=>!_),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Qi(v,!1,!0)},C=(w,E="",_=!1,A=!1)=>{var S;if(w.stopPropagation(),_&&A?t(d3,{update_version_id:v}):A&&t(f3,{update_version_id:v}),!_&&E){(S=window.open(E,"_blank"))==null||S.focus();return}x(w,!1),r==null||r.redirectToAdmin()},x=(w,E=!0)=>{w.stopPropagation(),Qi(v,!1),s(!1),E&&t(p3,{update_version_id:v})};return d.jsxs(w5,{children:[d.jsxs(I5,{children:[d.jsx(E5,{variant:"h3",children:y}),d.jsxs(u.Box,{children:[o?d.jsx(u.Tooltip,{title:u4,placement:"bottom",children:d.jsx(u.IconButton,{onClick:x,children:d.jsx(u.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,d.jsx(u.Tooltip,{title:o?l4:zi,placement:"bottom",children:d.jsx(zr,{onClick:m,children:d.jsx(Ui,{className:o?"":"hiver-up"})})})]})]}),d.jsx(_5,{className:o?"slideDown":"slideUp",ref:a,height:i,children:d.jsxs(S5,{children:[f.map(({title:w,items:E,type:_})=>d.jsxs(F5,{children:[d.jsx(u.Typography,{variant:"body2_medium",children:w}),E.map(A=>{const S=_===m4,{deeplink:L,textHtml:k,imageUrl:R}=A,N=()=>d.jsx(d5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:k}});return d.jsx(A5,{component:"ul",children:d.jsxs(T5,{component:S?"li":"div",marginLeft:R?"0":"14px",children:[R?d.jsx("img",{src:R}):null,L?d.jsx(Zd,{target:"_blank",underline:"none",onClick:M=>C(M,L),fontSize:"13px",children:N()}):N()]})},k)})]},w)),d.jsx(u.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:h.map(({text:w,link:E,isAdminPanelLink:_})=>d.jsx(L5,{variant:_?"contained":"text",children:d.jsx(O5,{variant:"caption",onClick:A=>C(A,E,_,!0),children:w})},w))})]})})]})},OE=({selectedEmail:e,conversationId:t})=>Ee({url:Nx.replace(":conversationId",""+t),method:Pe.PATCH,data:{selectedEmail:e}}),FE="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",op=e=>{const t=I.useRef(null),[n,r]=I.useState(!1);return I.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},kE=e=>{const{textRef:t,isOverflow:n}=op(e.data.label);return d.jsx(u.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:d.jsx(k5,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},DE=e=>d.jsxs(cn.MenuList,{...e,children:[d.jsx(D5,{children:d.jsx(u.Typography,{variant:"body2_medium",children:sb})}),e.children]}),NE=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=op(e.data.label);return d.jsx(cn.Option,{...e,children:d.jsxs(u.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[d.jsx(u.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:d.jsx(N5,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?d.jsx("img",{src:FE,width:"14px",height:"14px"}):null]})})},RE=e=>d.jsx(cn.ValueContainer,{...e,children:d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[d.jsx(u.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:u.theme.palette.gray.gray3,flexShrink:0}}),d.jsx(u.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),ME=e=>d.jsx(cn.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:u.theme.palette.gray.gray3}}):d.jsx(u.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:u.theme.palette.gray.gray3}})}),PE={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?u.theme.palette.gray.gray3:u.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${u.theme.palette.gray.gray3}`:"none",backgroundColor:u.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:u.theme.palette.gray.white,color:u.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?u.theme.palette.gray.gray7:u.theme.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},jE=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=I.useContext(We),a=t?Object.entries(t).map(([c])=>({value:c,label:c})):e?[{value:e,label:e}]:[];I.useEffect(()=>{if(!e&&!r&&t&&Object.keys(t).length>0){const c=Object.keys(t)[0];c&&o(c)}},[t,o,e,r]);const i=c=>{const l=String((c==null?void 0:c.value)||"");l&&s&&OE({selectedEmail:l,conversationId:s}),o(l)};return d.jsx(u.Tooltip,{title:"Selected email",placement:"top",children:d.jsx("div",{style:{marginTop:"12px"},children:d.jsx(Uo,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...Uo.getDefaultComponents(),MenuList:DE,Option:NE,SingleValue:kE,DropdownIndicator:ME,ValueContainer:RE},root:n,styles:PE,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})};u.styled(u.Paper)`
1201
+ `,DE="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",NE={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_HIVER_CDN_URL:"https://cdn.hiverhq.com/",VITE_MY_ENV_VAR:"myVariable From Agent"},{VITE_HIVER_CDN_URL:RE}=NE,rp=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=I.useContext(He),s=tt(r,$3),a=tt(r,Ws),i=g=>{g.stopPropagation(),n(o3),o==null||o.redirectToAdmin()},c=g=>{g.stopPropagation(),n(s3),window.open(yE,"_blank")},l=()=>{n(O3,{source:"main_tab"})},f=a?EE:vE;return d.jsxs(_E,{"data-testid":"noConnectors",children:[s?d.jsxs(d.Fragment,{children:[t?null:d.jsx(u.Typography,{variant:"h2",children:a?Yi:IE}),d.jsx(AE,{onClick:l,href:xE,target:"_blank",children:d.jsx($8,{src:RE+f,alt:wE,aspectRatio:"1000/783"})})]}):d.jsxs(SE,{children:[d.jsx(TE,{variant:"body1_medium",children:fE}),d.jsx("img",{src:DE,alt:pE})]}),d.jsx(LE,{variant:"body2",children:hE}),e?d.jsx(np,{endIcon:d.jsx(u.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?mE:gE}):d.jsxs(d.Fragment,{children:[d.jsx(np,{onClick:c,children:bE}),d.jsxs(OE,{direction:"row",children:[d.jsx(FE,{}),d.jsx(kE,{variant:"caption",children:CE})]})]})]})},ME=()=>{const{availableFeatures:e}=I.useContext(He),t=tt(e,Ws);return d.jsxs(Gd,{children:[d.jsxs(u.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?d.jsx(Pd,{width:"20px",height:"20px"}):d.jsx(Bd,{}),d.jsx(Vd,{variant:"h2",children:t?Yi:wd})]}),d.jsxs(u.Stack,{gap:"12px",children:[d.jsx(Dn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),d.jsx(Dn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),d.jsx(Dn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},PE=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=I.useContext(He),[o,s]=I.useState(!1),a=I.useRef(null),[i,c]=I.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:g=[],title:y}=l||{},{version:v=""}=l||{},b=w4(v),p=I.useMemo(()=>E4(v),[v]),h=I.useMemo(()=>(g==null?void 0:g.filter(({isAdminPanelLink:w})=>!(!n&&w)))??[],[g,n]);if(I.useEffect(()=>{!p&&l&&Qi(v,!0)},[p,v,l]),I.useLayoutEffect(()=>{var w;(w=a.current)!=null&&w.scrollHeight&&c(a.current.scrollHeight)},[a]),I.useEffect(()=>{l&&!b&&t(u3,{update_version_id:v})},[]),!l||b)return null;const m=w=>{var E;w.stopPropagation(),s(_=>!_),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Qi(v,!1,!0)},C=(w,E="",_=!1,T=!1)=>{var S;if(w.stopPropagation(),_&&T?t(d3,{update_version_id:v}):T&&t(f3,{update_version_id:v}),!_&&E){(S=window.open(E,"_blank"))==null||S.focus();return}x(w,!1),r==null||r.redirectToAdmin()},x=(w,E=!0)=>{w.stopPropagation(),Qi(v,!1),s(!1),E&&t(p3,{update_version_id:v})};return d.jsxs(w5,{children:[d.jsxs(I5,{children:[d.jsx(E5,{variant:"h3",children:y}),d.jsxs(u.Box,{children:[o?d.jsx(u.Tooltip,{title:u4,placement:"bottom",children:d.jsx(u.IconButton,{onClick:x,children:d.jsx(u.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,d.jsx(u.Tooltip,{title:o?l4:zi,placement:"bottom",children:d.jsx(Yr,{onClick:m,children:d.jsx(Ui,{className:o?"":"hiver-up"})})})]})]}),d.jsx(_5,{className:o?"slideDown":"slideUp",ref:a,height:i,children:d.jsxs(S5,{children:[f.map(({title:w,items:E,type:_})=>d.jsxs(F5,{children:[d.jsx(u.Typography,{variant:"body2_medium",children:w}),E.map(T=>{const S=_===m4,{deeplink:L,textHtml:R,imageUrl:k}=T,D=()=>d.jsx(d5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:R}});return d.jsx(T5,{component:"ul",children:d.jsxs(A5,{component:S?"li":"div",marginLeft:k?"0":"14px",children:[k?d.jsx("img",{src:k}):null,L?d.jsx(Zd,{target:"_blank",underline:"none",onClick:M=>C(M,L),fontSize:"13px",children:D()}):D()]})},R)})]},w)),d.jsx(u.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:h.map(({text:w,link:E,isAdminPanelLink:_})=>d.jsx(L5,{variant:_?"contained":"text",children:d.jsx(O5,{variant:"caption",onClick:T=>C(T,E,_,!0),children:w})},w))})]})})]})},jE=({selectedEmail:e,conversationId:t})=>Ee({url:Hx.replace(":conversationId",""+t),method:Pe.PATCH,data:{selectedEmail:e}}),BE="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",op=e=>{const t=I.useRef(null),[n,r]=I.useState(!1);return I.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},VE=e=>{const{textRef:t,isOverflow:n}=op(e.data.label);return d.jsx(u.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:d.jsx(k5,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},GE=e=>d.jsxs(an.MenuList,{...e,children:[d.jsx(D5,{children:d.jsx(u.Typography,{variant:"body2_medium",children:sb})}),e.children]}),HE=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=op(e.data.label);return d.jsx(an.Option,{...e,children:d.jsxs(u.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[d.jsx(u.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:d.jsx(N5,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?d.jsx("img",{src:BE,width:"14px",height:"14px"}):null]})})},WE=e=>d.jsx(an.ValueContainer,{...e,children:d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[d.jsx(u.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:u.theme.palette.gray.gray3,flexShrink:0}}),d.jsx(u.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),ZE=e=>d.jsx(an.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:u.theme.palette.gray.gray3}}):d.jsx(u.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:u.theme.palette.gray.gray3}})}),XE={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?u.theme.palette.gray.gray3:u.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${u.theme.palette.gray.gray3}`:"none",backgroundColor:u.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:u.theme.palette.gray.white,color:u.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?u.theme.palette.gray.gray7:u.theme.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},zE=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=I.useContext(He),a=t?Object.entries(t).map(([c])=>({value:c,label:c})):e?[{value:e,label:e}]:[];I.useEffect(()=>{if(!e&&!r&&t&&Object.keys(t).length>0){const c=Object.keys(t)[0];c&&o(c)}},[t,o,e,r]);const i=c=>{const l=String((c==null?void 0:c.value)||"");l&&s&&jE({selectedEmail:l,conversationId:s}),o(l)};return d.jsx(u.Tooltip,{title:"Selected email",placement:"top",children:d.jsx("div",{style:{marginTop:"12px"},children:d.jsx(es,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...es.getDefaultComponents(),MenuList:GE,Option:HE,SingleValue:VE,DropdownIndicator:ZE,ValueContainer:WE},root:n,styles:XE,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})};u.styled(u.Paper)`
1172
1202
  width: stretch;
1173
1203
  height: 100%;
1174
1204
  position: absolute;
@@ -1178,7 +1208,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1178
1208
  padding: 20px 14px;
1179
1209
  box-sizing: border-box;
1180
1210
  overflow: hidden;
1181
- `;const BE=u.styled(u.Paper)`
1211
+ `;const YE=u.styled(u.Paper)`
1182
1212
  width: stretch;
1183
1213
  height: 100%;
1184
1214
  top: 0px;
@@ -1186,17 +1216,17 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1186
1216
  padding: 0 14px 20px;
1187
1217
  box-sizing: border-box;
1188
1218
  overflow: hidden;
1189
- `,VE=u.styled("img")`
1219
+ `,JE=u.styled("img")`
1190
1220
  height: 16px;
1191
1221
  width: 16px;
1192
- `,GE=u.styled(u.Box)`
1222
+ `,qE=u.styled(u.Box)`
1193
1223
  margin-top: 12px;
1194
1224
  height: 100%;
1195
- `,HE="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_4735_44625)'%3e%3cpath%20d='M7.9987%2013.334L8.9387%2012.394L5.2187%208.66732H13.332V7.33398L5.2187%207.33398L8.9387%203.60732L7.9987%202.66732L2.66537%208.00065L7.9987%2013.334Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_4735_44625'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Kc=({children:e,rightNode:t,title:n="Back",backButtonTooltip:r,onClose:o})=>d.jsxs(BE,{children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[d.jsx(u.Tooltip,{title:r,placement:"bottom",children:d.jsx(u.IconButton,{onClick:o,children:d.jsx(VE,{src:HE})})}),d.jsx(u.Typography,{children:n})]}),d.jsx(u.Stack,{direction:"row",alignItems:"center",children:t})]}),d.jsx(GE,{children:e})]}),sp=e=>e.common.previewCardData,ap=e=>e.common.previewCardApiStatus,WE=e=>e.common.selectedSuggestionType,ZE=u.styled(u.Stack)`
1225
+ `,QE="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_4735_44625)'%3e%3cpath%20d='M7.9987%2013.334L8.9387%2012.394L5.2187%208.66732H13.332V7.33398L5.2187%207.33398L8.9387%203.60732L7.9987%202.66732L2.66537%208.00065L7.9987%2013.334Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_4735_44625'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Kc=({children:e,rightNode:t,title:n="Back",backButtonTooltip:r,onClose:o})=>d.jsxs(YE,{children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[d.jsx(u.Tooltip,{title:r,placement:"bottom",children:d.jsx(u.IconButton,{onClick:o,children:d.jsx(JE,{src:QE})})}),d.jsx(u.Typography,{children:n})]}),d.jsx(u.Stack,{direction:"row",alignItems:"center",children:t})]}),d.jsx(qE,{children:e})]}),sp=e=>e.common.previewCardData,ap=e=>e.common.previewCardApiStatus,$E=e=>e.common.selectedSuggestionType,UE=u.styled(u.Stack)`
1196
1226
  width: 100%;
1197
1227
  border-radius: 8px;
1198
1228
  border: 1px solid ${u.theme.palette.gray.gray5};
1199
- `,XE=u.styled(u.Stack)`
1229
+ `,KE=u.styled(u.Stack)`
1200
1230
  padding: 11px;
1201
1231
  height: 46px;
1202
1232
  background: ${u.theme.palette.gray.gray6};
@@ -1206,7 +1236,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1206
1236
  white-space: nowrap;
1207
1237
  overflow: hidden;
1208
1238
  }
1209
- `,zE=u.styled(u.Button)`
1239
+ `,ew=u.styled(u.Button)`
1210
1240
  &:hover {
1211
1241
  background-color: #e3e9ff !important;
1212
1242
  color: ${u.theme.palette.purple.primary} !important;
@@ -1214,7 +1244,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1214
1244
  }
1215
1245
  margin-top: 10px;
1216
1246
  display: block;
1217
- `,YE=u.styled(u.Stack)`
1247
+ `,tw=u.styled(u.Stack)`
1218
1248
  flex-direction: row;
1219
1249
  flex-grow: 1;
1220
1250
  align-items: center;
@@ -1225,7 +1255,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1225
1255
  height: 20px;
1226
1256
  flex-shrink: 0;
1227
1257
  }
1228
- `,ip=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=zt(),[s,a]=I.useState(!1),[i,c]=I.useState(!0),{id:l="",cardTitle:f="",logoUrl:g}=e||{},y=t===te.LOADING,v=p=>{p.stopPropagation();const h=p.currentTarget.offsetWidth<p.currentTarget.scrollWidth;a(!!h)},b=p=>{var m;o(no({id:n,args:r,isRefresh:!0}));const h=p.target.tagName==="BUTTON"?(m=p.target)==null?void 0:m.firstChild:p.target;h.className&&(h.className=""),setTimeout(()=>h.className="selected",1)};return d.jsxs(ZE,{children:[d.jsxs(XE,{direction:"row",justifyContent:"space-between",children:[y?d.jsxs(u.Stack,{gap:"6px",direction:"row",children:[d.jsx(Rn,{width:"16px",height:"24px"}),d.jsx(Rn,{width:"100px",height:"24px"})]}):d.jsxs(YE,{children:[g&&d.jsx("img",{src:g,alt:f}),d.jsx(u.Tooltip,{title:s?f:"",children:d.jsx(u.Typography,{variant:"h4",onMouseOver:p=>v(p),onMouseLeave:p=>v(p),children:f})})]}),d.jsxs(u.Stack,{direction:"row",alignItems:"center",children:[i?d.jsx(u.Tooltip,{title:vd,placement:"bottom",children:d.jsx(zr,{onClick:p=>b(p),children:d.jsx("img",{src:Q1})})}):null,d.jsx(u.Tooltip,{title:i?Ed:zi,placement:"bottom",children:d.jsx(zr,{onClick:()=>c(p=>!p),children:d.jsx(Ui,{className:i?"":"hiver-up"})})})]})]}),d.jsx(z1,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},cp={values:{},errors:{}},yt={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",SET_FORM_DEFAULTS:"SET_FORM_DEFAULTS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},JE=(e,t)=>{const{type:n,payload:r}=t;switch(n){case yt.SET_FIELD_VALUE:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return{...e,values:{...e.values,[o]:s}}}case yt.SET_FIELD_ERROR:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return typeof s=="boolean"||typeof s=="string"?{...e,errors:{...e.errors,[o]:s}}:e}case yt.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case yt.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case yt.SET_FORM_DEFAULTS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:{...e.values,...o}}}case yt.CLEAR_FIELDS:{const{fieldNames:o}=r??{};if(!Array.isArray(o))return e;const s={...e.values},a={...e.errors};for(const i of o)delete s[i],delete a[i];return{...e,values:s,errors:a}}case yt.RESET_STATE:return cp}return e},lp=()=>I.useReducer(JE,cp),up=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(v,b)=>{t({type:yt.SET_FIELD_VALUE,payload:{value:{value:b,name:v}}})},a=I.useCallback(v=>{t({type:yt.SET_FORM_DEFAULTS,payload:{values:v}})},[t]),i=I.useCallback(()=>Object.keys(o).filter(b=>!!o[b]).length>0,[o]),c=v=>{v.stopPropagation();const{name:b,value:p}=(v==null?void 0:v.target)||{};s(b,p)},l=(v,b)=>{v.stopPropagation();const{name:p}=(v==null?void 0:v.target)||{};s(p,b)},f=(v,b)=>{s(v,b||"")},g=(v,b)=>{e.errors[v]!==b&&t({type:yt.SET_FIELD_ERROR,payload:{value:{name:v,value:b}}})},y=(v,b)=>{if(b){const p=b[v];p==null||p.forEach(h=>{var m;s(h,""),b[h]&&y(h,b),(m=n[h])!=null&&m.isRequired&&g(h,!0)})}};return I.useEffect(()=>{if(Array.isArray(r))return()=>{const v=r.map(b=>b.name);t({type:yt.CLEAR_FIELDS,payload:{fieldNames:v}})}},[r,t]),{setValue:s,setFormDefaults:a,isErrorInValidations:i,inputChangeHandler:c,checkboxChangeHandler:l,dateChangeHandler:f,handleValidationError:g,clearDependentFields:y}},dp=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const a=s.interfaceDetails,i={loadOptions:(c,l,f,g)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const v=Ax(n,y==null?void 0:y.args),b=Object.values((y==null?void 0:y.args)||{});if(v.length===b.length){r(Cr({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:y==null?void 0:y.id,pagination:y==null?void 0:y.pagination,callback:l,args:{...es(n,y==null?void 0:y.args),...es(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:g}));return}return l([])}};return{...o,[s.name]:i}},{}),fp=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,a)=>{if(!a.createOptionInterfaceDetails)return s;const i=a.createOptionInterfaceDetails;return{...s,[a.name]:{createOption:(c,l)=>{var g,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(Fa({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...es(n,(g=a==null?void 0:a.interfaceDetails)==null?void 0:g.args),...es(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...es(f,i.args)}}))}}}},{}),pp=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=zt(),s=I.useMemo(()=>{if(e&&e.length){const i=dp({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=dp({formFields:g,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=I.useMemo(()=>{const i=fp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=fp({formFields:g,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[f.name]:{createOptionList:y}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},qE=async({formId:e,args:t})=>{try{const n=await Ee({url:st(Yx,{formId:e}),data:{args:t},method:Pe.POST});return(n==null?void 0:n.data).fieldList.map(o=>Uc(o))}catch(n){throw console.error(n),n}},QE=({formId:e,args:t,enabled:n,delay:r=500})=>{const[o,s]=I.useState(t);return I.useEffect(()=>{const a=setTimeout(()=>s(t),r);return()=>clearTimeout(a)},[t,r]),mn({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>qE({formId:e,args:t}),refetchOnMount:!1,enabled:n})},$E=async({formId:e})=>{try{const t=await Ee({url:st(N1,{formId:e}),method:Pe.GET}),n=t==null?void 0:t.data;return n.enabled?{...n.defaults}:{}}catch(t){throw console.error(t),t}},hp=({formId:e})=>["Global","WriteForm","FormDefaults",e],UE=({formId:e})=>{const t=I.useRef(!0),n=mn({queryKey:hp({formId:e}),queryFn:async()=>{const r=await $E({formId:e});return t.current=!1,r},refetchOnMount:!0,enabled:t.current&&!!e,staleTime:0});return{enabledRef:t,...n}},KE=async({formId:e,data:t})=>{try{const n=await Ee({url:st(N1,{formId:e}),data:{defaults:t},method:Pe.PUT}),r=n==null?void 0:n.data;return r.enabled?r.defaults:{}}catch(n){throw console.error(n),n}},ew=({formId:e,onSuccess:t,onError:n})=>{const r=jr();return Vt({mutationFn:o=>KE({formId:e,data:o}),onSuccess:()=>{r.invalidateQueries({queryKey:hp({formId:e})}),t==null||t()},onError:n})},tw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 275 81",fill:"none","aria-hidden":"true",...e},T.createElement("defs",null,T.createElement("filter",{id:"autofillCardShadow",x:"-30%",y:"-30%",width:"160%",height:"160%"},T.createElement("feDropShadow",{dx:0,dy:1,stdDeviation:2,floodColor:"#000",floodOpacity:.08})),T.createElement("linearGradient",{id:"autofillHoneycomb",x1:0,y1:0,x2:1,y2:1,gradientUnits:"objectBoundingBox"},T.createElement("stop",{offset:0,stopColor:"#FFD54F"}),T.createElement("stop",{offset:1,stopColor:"#FFB300"}))),T.createElement("g",{transform:"translate(14 10) rotate(-2.75 44 29)",filter:"url(#autofillCardShadow)"},T.createElement("rect",{width:88,height:56,rx:6,fill:"#fff",stroke:"#EEE",strokeWidth:.75}),T.createElement("circle",{cx:14,cy:6,r:8,fill:"#fff",stroke:"#EEE",strokeWidth:.6}),T.createElement("path",{d:"M10.5 6l2.2 2.5L15.5 4",stroke:"#506DFF",strokeWidth:1.1,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("rect",{x:10,y:18,width:68,height:14,rx:7,fill:"#fff",stroke:"#D1D8FA",strokeWidth:.5}),T.createElement("text",{x:14,y:27.5,fill:"#334155",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:600},"Source field 1"),T.createElement("rect",{x:10,y:36,width:68,height:14,rx:7,fill:"#fff",stroke:"#F5F5F5",strokeWidth:.5}),T.createElement("text",{x:14,y:45.5,fill:"#6F7C90",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:500},"Source field 2")),T.createElement("path",{d:"M108 40H175",stroke:"#9CA3AF",strokeWidth:.9,strokeDasharray:"3 3",strokeLinecap:"round"}),T.createElement("circle",{cx:142,cy:40,r:9,fill:"#fff",stroke:"#E5E7EB",strokeWidth:.75}),T.createElement("path",{d:"M137.5 40h9M135 40l2.5-2M135 40l2.5 2M149.5 40l-2.5-2M149.5 40l-2.5 2",stroke:"#506DFF",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("g",{transform:"translate(186 18)",filter:"url(#autofillCardShadow)"},T.createElement("rect",{width:72,height:46,rx:5,fill:"#fff",stroke:"#EEE",strokeWidth:.75}),T.createElement("circle",{cx:12,cy:5,r:7,fill:"#fff",stroke:"#EEE",strokeWidth:.6}),T.createElement("circle",{cx:12,cy:5,r:4,fill:"url(#autofillHoneycomb)"}),T.createElement("rect",{x:8,y:16,width:56,height:13,rx:6.5,fill:"#fff",stroke:"#D1D8FA",strokeWidth:.5}),T.createElement("text",{x:12,y:24.5,fill:"#334155",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:600},"Target field"))),nw=u.styled(u.Stack)`
1258
+ `,ip=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=zt(),[s,a]=I.useState(!1),[i,c]=I.useState(!0),{id:l="",cardTitle:f="",logoUrl:g}=e||{},y=t===ee.LOADING,v=p=>{p.stopPropagation();const h=p.currentTarget.offsetWidth<p.currentTarget.scrollWidth;a(!!h)},b=p=>{var m;o(ro({id:n,args:r,isRefresh:!0}));const h=p.target.tagName==="BUTTON"?(m=p.target)==null?void 0:m.firstChild:p.target;h.className&&(h.className=""),setTimeout(()=>h.className="selected",1)};return d.jsxs(UE,{children:[d.jsxs(KE,{direction:"row",justifyContent:"space-between",children:[y?d.jsxs(u.Stack,{gap:"6px",direction:"row",children:[d.jsx(Dn,{width:"16px",height:"24px"}),d.jsx(Dn,{width:"100px",height:"24px"})]}):d.jsxs(tw,{children:[g&&d.jsx("img",{src:g,alt:f}),d.jsx(u.Tooltip,{title:s?f:"",children:d.jsx(u.Typography,{variant:"h4",onMouseOver:p=>v(p),onMouseLeave:p=>v(p),children:f})})]}),d.jsxs(u.Stack,{direction:"row",alignItems:"center",children:[i?d.jsx(u.Tooltip,{title:vd,placement:"bottom",children:d.jsx(Yr,{onClick:p=>b(p),children:d.jsx("img",{src:Q1})})}):null,d.jsx(u.Tooltip,{title:i?Ed:zi,placement:"bottom",children:d.jsx(Yr,{onClick:()=>c(p=>!p),children:d.jsx(Ui,{className:i?"":"hiver-up"})})})]})]}),d.jsx(z1,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},cp={values:{},errors:{}},Ct={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",SET_FORM_DEFAULTS:"SET_FORM_DEFAULTS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},nw=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Ct.SET_FIELD_VALUE:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return{...e,values:{...e.values,[o]:s}}}case Ct.SET_FIELD_ERROR:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return typeof s=="boolean"||typeof s=="string"?{...e,errors:{...e.errors,[o]:s}}:e}case Ct.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case Ct.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case Ct.SET_FORM_DEFAULTS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,errors:{},values:{...e.values,...o}}}case Ct.CLEAR_FIELDS:{const{fieldNames:o}=r??{};if(!Array.isArray(o))return e;const s={...e.values},a={...e.errors};for(const i of o)delete s[i],delete a[i];return{...e,values:s,errors:a}}case Ct.RESET_STATE:return cp}return e},lp=()=>I.useReducer(nw,cp),up=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(v,b)=>{t({type:Ct.SET_FIELD_VALUE,payload:{value:{value:b,name:v}}})},a=I.useCallback(v=>{t({type:Ct.SET_FORM_DEFAULTS,payload:{values:v}})},[t]),i=I.useCallback(()=>Object.keys(o).filter(b=>!!o[b]).length>0,[o]),c=v=>{v.stopPropagation();const{name:b,value:p}=(v==null?void 0:v.target)||{};s(b,p)},l=(v,b)=>{v.stopPropagation();const{name:p}=(v==null?void 0:v.target)||{};s(p,b)},f=(v,b)=>{s(v,b||"")},g=(v,b)=>{e.errors[v]!==b&&t({type:Ct.SET_FIELD_ERROR,payload:{value:{name:v,value:b}}})},y=(v,b)=>{if(b){const p=b[v];p==null||p.forEach(h=>{var m;s(h,""),b[h]&&y(h,b),(m=n[h])!=null&&m.isRequired&&g(h,!0)})}};return I.useEffect(()=>{if(Array.isArray(r))return()=>{const v=r.map(b=>b.name);t({type:Ct.CLEAR_FIELDS,payload:{fieldNames:v}})}},[r,t]),{setValue:s,setFormDefaults:a,isErrorInValidations:i,inputChangeHandler:c,checkboxChangeHandler:l,dateChangeHandler:f,handleValidationError:g,clearDependentFields:y}},dp=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const a=s.interfaceDetails,i={loadOptions:(c,l,f,g)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const v=Rx(n,y==null?void 0:y.args),b=Object.values((y==null?void 0:y.args)||{});if(v.length===b.length){r(br({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:y==null?void 0:y.id,pagination:y==null?void 0:y.pagination,callback:l,args:{...ns(n,y==null?void 0:y.args),...ns(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:g}));return}return l([])}};return{...o,[s.name]:i}},{}),fp=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,a)=>{if(!a.createOptionInterfaceDetails)return s;const i=a.createOptionInterfaceDetails;return{...s,[a.name]:{createOption:(c,l)=>{var g,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(Fa({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...ns(n,(g=a==null?void 0:a.interfaceDetails)==null?void 0:g.args),...ns(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...ns(f,i.args)}}))}}}},{}),pp=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=zt(),s=I.useMemo(()=>{if(e&&e.length){const i=dp({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=dp({formFields:g,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=I.useMemo(()=>{const i=fp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=fp({formFields:g,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[f.name]:{createOptionList:y}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},rw=async({formId:e,args:t})=>{try{const n=await Ee({url:rt(tv,{formId:e}),data:{args:t},method:Pe.POST});return(n==null?void 0:n.data).fieldList.map(o=>Uc(o))}catch(n){throw console.error(n),n}},ow=({formId:e,args:t,enabled:n,delay:r=500})=>{const[o,s]=I.useState(t);return I.useEffect(()=>{const a=setTimeout(()=>s(t),r);return()=>clearTimeout(a)},[t,r]),mn({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>rw({formId:e,args:t}),refetchOnMount:!1,enabled:n})},sw=async({formId:e})=>{try{const t=await Ee({url:rt(N1,{formId:e}),method:Pe.GET}),n=t==null?void 0:t.data;return n.enabled?i6(n.defaults):{}}catch(t){throw console.error(t),t}},hp=({formId:e})=>["Global","WriteForm","FormDefaults",e],aw=({formId:e,enabled:t})=>{const n=I.useRef(!0),r=mn({queryKey:hp({formId:e}),queryFn:async()=>{const o=await sw({formId:e});return n.current=!1,o},refetchOnMount:!0,enabled:n.current&&!!e&&t,staleTime:0});return{enabledRef:n,...r}},iw=async({formId:e,data:t})=>{try{const n=await Ee({url:rt(N1,{formId:e}),data:{defaults:t},method:Pe.PUT}),r=n==null?void 0:n.data;return r.enabled?r.defaults:{}}catch(n){throw console.error(n),n}},cw=({formId:e,onSuccess:t,onError:n})=>{const r=Br();return Vt({mutationFn:o=>iw({formId:e,data:o}),onSuccess:()=>{r.invalidateQueries({queryKey:hp({formId:e})}),t==null||t()},onError:n})},lw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 275 81",fill:"none","aria-hidden":"true",...e},A.createElement("defs",null,A.createElement("filter",{id:"autofillCardShadow",x:"-30%",y:"-30%",width:"160%",height:"160%"},A.createElement("feDropShadow",{dx:0,dy:1,stdDeviation:2,floodColor:"#000",floodOpacity:.08})),A.createElement("linearGradient",{id:"autofillHoneycomb",x1:0,y1:0,x2:1,y2:1,gradientUnits:"objectBoundingBox"},A.createElement("stop",{offset:0,stopColor:"#FFD54F"}),A.createElement("stop",{offset:1,stopColor:"#FFB300"}))),A.createElement("g",{transform:"translate(14 10) rotate(-2.75 44 29)",filter:"url(#autofillCardShadow)"},A.createElement("rect",{width:88,height:56,rx:6,fill:"#fff",stroke:"#EEE",strokeWidth:.75}),A.createElement("circle",{cx:14,cy:6,r:8,fill:"#fff",stroke:"#EEE",strokeWidth:.6}),A.createElement("path",{d:"M10.5 6l2.2 2.5L15.5 4",stroke:"#506DFF",strokeWidth:1.1,strokeLinecap:"round",strokeLinejoin:"round"}),A.createElement("rect",{x:10,y:18,width:68,height:14,rx:7,fill:"#fff",stroke:"#D1D8FA",strokeWidth:.5}),A.createElement("text",{x:14,y:27.5,fill:"#334155",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:600},"Source field 1"),A.createElement("rect",{x:10,y:36,width:68,height:14,rx:7,fill:"#fff",stroke:"#F5F5F5",strokeWidth:.5}),A.createElement("text",{x:14,y:45.5,fill:"#6F7C90",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:500},"Source field 2")),A.createElement("path",{d:"M108 40H175",stroke:"#9CA3AF",strokeWidth:.9,strokeDasharray:"3 3",strokeLinecap:"round"}),A.createElement("circle",{cx:142,cy:40,r:9,fill:"#fff",stroke:"#E5E7EB",strokeWidth:.75}),A.createElement("path",{d:"M137.5 40h9M135 40l2.5-2M135 40l2.5 2M149.5 40l-2.5-2M149.5 40l-2.5 2",stroke:"#506DFF",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),A.createElement("g",{transform:"translate(186 18)",filter:"url(#autofillCardShadow)"},A.createElement("rect",{width:72,height:46,rx:5,fill:"#fff",stroke:"#EEE",strokeWidth:.75}),A.createElement("circle",{cx:12,cy:5,r:7,fill:"#fff",stroke:"#EEE",strokeWidth:.6}),A.createElement("circle",{cx:12,cy:5,r:4,fill:"url(#autofillHoneycomb)"}),A.createElement("rect",{x:8,y:16,width:56,height:13,rx:6.5,fill:"#fff",stroke:"#D1D8FA",strokeWidth:.5}),A.createElement("text",{x:12,y:24.5,fill:"#334155",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:600},"Target field"))),uw=u.styled(u.Stack)`
1229
1259
  gap: 12px;
1230
1260
  align-items: stretch;
1231
1261
  background-color: #f3f8ff;
@@ -1234,7 +1264,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1234
1264
  padding: 8px;
1235
1265
  padding-bottom: 12px;
1236
1266
  margin-bottom: 20px;
1237
- `,rw=u.styled(u.Box)`
1267
+ `,dw=u.styled(u.Box)`
1238
1268
  display: flex;
1239
1269
  align-items: center;
1240
1270
  justify-content: center;
@@ -1250,20 +1280,20 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1250
1280
  height: 100%;
1251
1281
  object-fit: cover;
1252
1282
  }
1253
- `,ow=u.styled(u.Stack)`
1283
+ `,fw=u.styled(u.Stack)`
1254
1284
  gap: 16px;
1255
1285
  align-items: flex-start;
1256
1286
  width: 100%;
1257
- `,sw=u.styled(u.Stack)`
1287
+ `,pw=u.styled(u.Stack)`
1258
1288
  gap: 2px;
1259
1289
  align-items: flex-start;
1260
1290
  width: 100%;
1261
- `,aw=u.styled(u.Stack)`
1291
+ `,hw=u.styled(u.Stack)`
1262
1292
  flex-direction: row;
1263
1293
  gap: 12px;
1264
1294
  align-items: center;
1265
- `,iw=({onPrimaryClick:e})=>{const[t,n]=I.useState(!1);return t?null:d.jsxs(nw,{children:[d.jsx(rw,{children:d.jsx(tw,{style:{backgroundColor:"#FFDD57"}})}),d.jsxs(ow,{children:[d.jsxs(sw,{children:[d.jsx(u.Typography,{variant:"body2",sx:{fontWeight:600,color:u.theme.palette.gray.black,lineHeight:"18px"},children:"Autofill data with Map fields"}),d.jsx(u.Typography,{variant:"caption",color:u.theme.palette.gray.gray3,sx:{letterSpacing:"0.2px",lineHeight:"16px"},children:"Now you can configure what data to auto fill these fields"})]}),d.jsxs(aw,{children:[d.jsx(u.Button,{size:"small",onClick:e,children:"Checkout"}),d.jsx(u.Button,{variant:"text",size:"small",sx:{color:u.theme.palette.gray.gray2},onClick:()=>{n(!0)},children:"Dismiss"})]})]})]})},gp=({setShown:e,shown:t,title:n,description:r,buttons:o})=>d.jsx(vr,{shown:t,setShown:e,showCloseButton:!0,children:d.jsxs(u.Stack,{width:"400px",padding:"20px",children:[d.jsx(u.Typography,{variant:"h2",marginBottom:"8px",children:n}),d.jsx(u.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
1266
- `).map((s,a)=>d.jsx(u.Typography,{variant:"body2",children:s},a))}),d.jsx(u.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>d.jsx(u.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),mp="connector-agent-expanded-write-form",bp=({metaData:e,isEdit:t=!1,defaultOption:n,connectors:r,mapFormOpen:o,onClose:s,onCreateSuccess:a,setMetaData:i,setMapFormOpen:c})=>{var wo;const{userGroupId:l,userId:f}=Xt()||{},[g,y]=I.useState(null),[v,b]=I.useState(!1),p=I.useRef(null),{conversationId:h,availableFeatures:m,sendTrackingEvent:C,currentSmIds:x,connectorFunctions:{redirectToAdmin:w,getFormElement:E,toggleFormElement:_},stackingContext:A,userEmail:S,isAdmin:L}=I.useContext(We),[k,R]=lp(),N=Ce(K1),M=Ce(t?Gv:$1),V=Ce(Wv),Z=Ce(Hv),J=Ce(zv),$=Ce(Yv),X=Ce(Jv),z=Ce(qv),se=Ce(Qv),de=Ce(ep),D=Z==null?void 0:Z[(g==null?void 0:g.value)??""],H=tt(m,i4),G=(D==null?void 0:D.hasCustomFields)??!1,{customFieldsArgsPresent:j,customFieldsArgs:q}=I.useMemo(()=>{if(!G)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const ie=Object.values((D==null?void 0:D.customFieldsArgs)??{}).every(ot=>!!k.values[ot]);if(!ie)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const ve=(D==null?void 0:D.customFieldsArgs)??{},je=ts(k,ve);return{customFieldsArgsPresent:ie,customFieldsArgs:je}},[G,k,D==null?void 0:D.customFieldsArgs]),ne=G&&j&&H,{data:re}=QE({formId:String(g==null?void 0:g.value),args:q,enabled:ne}),B=I.useMemo(()=>ne?re??[]:[],[ne,re]),U=D==null?void 0:D.expandedView,{formConfigs:fe,formViewConfigs:Y}=I.useMemo(()=>{if(g&&"value"in g&&V&&V[g.value]&&Array.isArray(V[g.value])){const ve=[...V[g.value],...B],je=[{id:g.value,formFields:ve}];return{formConfigs:je,formViewConfigs:U?Tx(ve,j1):je}}const ie=[{id:"emptyFormId",formFields:[]}];return{formConfigs:ie,formViewConfigs:ie}},[V,B,g,U]),Ze=I.useMemo(()=>{var ve;const ie=((ve=fe==null?void 0:fe[0])==null?void 0:ve.formFields)||[];return $c({formFields:ie})},[fe]),{setValue:_e,setFormDefaults:et,inputChangeHandler:kt,checkboxChangeHandler:Jn,dateChangeHandler:Dt,clearDependentFields:rt,handleValidationError:Je,isErrorInValidations:Sn}=up({state:k,dispatch:R,validations:Ze,dynamicFields:B}),{data:vt,enabledRef:cs}=UE({formId:fe[0].id}),{mutate:An}=ew({formId:fe[0].id,onSuccess:()=>{cs.current=!0}});I.useEffect(()=>{vt&&et(vt)},[vt,et]);const{userGroupId:qn}=Xt()||{},{fetchConfig:Qn,createConfig:Et}=pp({formFields:fe[0].formFields,formId:fe[0].id,formState:k,conversationId:h}),Ut=(wo=N==null?void 0:N.forms.find(ie=>ie.type==="edit"))==null?void 0:wo.id,{externalResourceId:$n}=N??{},Tn=[$,X,se].includes(te.LOADING),Kt=I.useMemo(()=>!U||!E?null:E(),[U,E]),hn=zt();I.useEffect(()=>(U&&_&&_(!0),()=>{U&&_&&_(!1)}),[U,_]),I.useEffect(()=>{hn(V1(t?!(z&&"values"in z&&"values"in k&&JSON.stringify(tp(k.values))===JSON.stringify(tp(z.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,z,k,hn]),I.useEffect(()=>(t&&z&&R({type:yt.SET_FIELDS,payload:z}),()=>{R({type:yt.SET_FIELDS,payload:{values:{}}})}),[t,R,z]),I.useEffect(()=>{g!==null&&i(ie=>({...ie,object_type:g.label}))},[g,i]),I.useEffect(()=>{if(k.values){const ie=O1(fe[0].formFields,k.values);i(ve=>({...ve,fields_filled:ie}))}},[k,fe,i]),I.useEffect(()=>{if(n&&!t)return y(n);M&&M.length&&y(t&&Ut?M.find(ie=>ie.value===Ut)??null:ie=>ie||!Z?ie:M.length===1?M[0]:M.find(je=>!Z[je.value].expandedView)??null)},[M,Z,t,Ut,n]);const Un=()=>{y(p.current),b(!1),R({type:yt.RESET_STATE})},ls=(ie,ve)=>{_e(ie,ve)},Fr=(ie,ve,je)=>{if(ve.action==="clear"&&ve.name&&(_e(ve.name,""),g!=null&&g.value&&rt(ve.name,J==null?void 0:J[g.value]),Ze[ve.name].isRequired&&Je(ve.name,!0)),ie&&typeof ie=="object"&&"label"in ie&&typeof ie.label=="string"&&"value"in ie&&(typeof ie.value=="string"||typeof ie.value=="number")&&typeof ve.name<"u")if(ve.name==="form-object")p.current={value:ie.value,label:ie.label},k.values&&ie.value!==(g==null?void 0:g.value)&&(Object.values(k.values).filter(Ue=>Ue!=="").length>0?b(!0):Un());else{let ot=!1;je&&(ot=je.isMultiSelect||!1);const Ue=!ot&&"prefillValues"in ie&&ie.prefillValues,Mt=ot?[{value:ie.value,label:ie.label}]:{value:ie.value,label:ie.label};if(_e(ve.name,Mt),Ue)for(const Pt in Ue)_e(Pt,Ue[Pt]);g!=null&&g.value&&rt(ve.name,J==null?void 0:J[g.value])}},Co=()=>{if(!Sn()&&Ut&&(Z!=null&&Z[Ut])&&h&&$n){const{connectorName:ie,title:ve}=N;C(S3,{connector_name:ie,card_title:ve,sm_ids:x,ug_id:qn});const je=Z[Ut].interfaceDetails;if(!je||!z)return;const{id:ot,args:Ue={},previousArgs:Mt={}}=je,Pt=ts(z,Mt),Ln=ts(k,Ue);hn(Na({formId:String(Ut),conversationId:h,args:Ln,previousArgs:Pt,externalResourceId:$n,interfaceId:ot,successCallback:()=>{a()}})).unwrap().then(()=>{var Nr;C(L3,{connector_name:ie,card_title:ve,sm_ids:x,ug_id:qn});const en=((Nr=fe[0].formFields)==null?void 0:Nr.filter(O=>O.isCustomField))??[],Io=en.length>0,us=en.some(O=>k.values[O.name]);C(z3,{sm_ids:x,ug_id:l,connector_name:D==null?void 0:D.connectorName,form_object:D==null?void 0:D.name,object_type:g==null?void 0:g.label,has_custom_fields:Io,custom_fields_used:us})}).finally(()=>{hn(ro(null))})}},xo=()=>{if(!Sn()&&g&&(Z!=null&&Z[g.value])&&h){const ie=Z==null?void 0:Z[g.value].interfaceDetails;if(!ie)return;const{id:ve,args:je={}}=ie,ot=ts(k,je);hn(Da({formId:String(g.value),conversationId:h,args:ot,interfaceId:ve,successCallback:()=>{a()}})).unwrap().then(()=>{var Ln;C(m3,{object_type:g});const Ue=((Ln=fe[0].formFields)==null?void 0:Ln.filter(en=>en.isCustomField))??[],Mt=Ue.length>0,Pt=Ue.some(en=>k.values[en.name]);C(X3,{sm_ids:x,ug_id:l,connector_name:D==null?void 0:D.connectorName,form_object:D==null?void 0:D.name,object_type:g==null?void 0:g.label,has_custom_fields:Mt,custom_fields_used:Pt})})}},vo=[{label:"Cancel",action:()=>b(!1),variant:"text"},{label:"Continue",action:Un}],kr=Xs({url:n3,params:{email:S,user_id:f,ug_id:l,sm_ids:x.join(","),connector_names:r.join(","),form_object:D==null?void 0:D.name}}),Eo=()=>{window.open(kr,"_blank"),C(W3,{sm_ids:x,ug_id:l,connector_name:D==null?void 0:D.connectorName,form_object:D==null?void 0:D.name})},gn=()=>{w(D==null?void 0:D.connectorId,{isEdit:!0,tabIndex:2,editCard:(D==null?void 0:D.cardId)??""}),C(Z3,{sm_ids:x,ug_id:l,connector_name:D==null?void 0:D.connectorName,form_object:D==null?void 0:D.name})},Kn=async({args:ie,pagination:ve},{formId:je,fieldName:ot})=>{const Ue=await F1({formId:je,fieldName:ot},{pagination:ve,args:ie}),Mt=Array.isArray(Ue==null?void 0:Ue.data.data)?Ue.data.data:[];return{options:Mt,hasMore:!!Mt.length}},er=L&&H,Dr=d.jsxs(vp,{className:U?mp:"",children:[c&&d.jsx(Sx,{open:o??!1,onClose:()=>c==null?void 0:c(!1),fields:fe[0].formFields,variables:["test","test2"],title:"Map fields",connectorLogo:(D==null?void 0:D.logoUrl)??"",formId:fe[0].id,fetchOptions:Kn,onSave:ie=>{An(ie)},onCancel:()=>c==null?void 0:c(!1)}),d.jsx(iw,{onPrimaryClick:()=>{c==null||c(!0)}}),d.jsx(gp,{shown:v,setShown:b,title:sv,description:av,buttons:vo}),U?d.jsxs(cw,{children:[d.jsxs(u.Typography,{children:[t?"Edit":"Add"," to ",D.connectorName]}),d.jsx(u.Tooltip,{title:"Close Popup",placement:"bottom",children:d.jsx(u.IconButton,{onClick:s,children:d.jsx(lw,{src:X1})})})]}):null,d.jsxs(xp,{spacing:3,children:[!t&&!U?d.jsx(br,{type:"select",placeholder:P1,options:M,value:g,name:"form-object",selectChangeHandler:Fr,label:lv,labelSpacing:.5,validation:{isRequired:!0}}):null,d.jsx(A1,{showGlobalLoader:se===te.LOADING,formConfig:Y,selectChangeHandler:Fr,inputChangeHandler:kt,checkboxChangeHandler:Jn,dateChangeHandler:Dt,tableChangeHandler:ls,onValidationError:Je,fieldsSpacing:3,labelSpacing:.5,fetchConfig:Qn,createConfig:Et,values:k.values,validations:Ze,...U?{cols:j1,stackIndex:A.expandedForm}:null}),er?d.jsx(u.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:d.jsx(u.Button,{variant:"text",startIcon:d.jsx(dw,{}),onClick:gn,size:"small",children:v4})}):null,d.jsx(u.Stack,{marginTop:er?"4px !important":"28px",width:"100%",justifyContent:"center",children:d.jsx(uw,{variant:"text",onClick:Eo,size:"small",children:x4})})]}),d.jsxs(Cp,{children:[d.jsx(u.Button,{disabled:Sn()||Tn||!de,onClick:t?Co:xo,size:"small",...U?{style:{order:2}}:null,children:t?f4:d4}),d.jsx(Ep,{variant:"outlined",color:"tertiary",size:"small",onClick:s,disabled:Tn,children:Ji})]})]});return U&&Kt?Ge.createPortal(Dr,Kt):Dr},yp=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},T.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),Cp=u.styled(u.Box)`
1295
+ `,gw=({onPrimaryClick:e})=>{const[t,n]=I.useState(!1);return t?null:d.jsxs(uw,{children:[d.jsx(dw,{children:d.jsx(lw,{style:{backgroundColor:"#FFDD57"}})}),d.jsxs(fw,{children:[d.jsxs(pw,{children:[d.jsx(u.Typography,{variant:"body2",sx:{fontWeight:600,color:u.theme.palette.gray.black,lineHeight:"18px"},children:"Autofill data with Map fields"}),d.jsx(u.Typography,{variant:"caption",color:u.theme.palette.gray.gray3,sx:{letterSpacing:"0.2px",lineHeight:"16px"},children:"Now you can configure what data to auto fill these fields"})]}),d.jsxs(hw,{children:[d.jsx(u.Button,{size:"small",onClick:e,children:"Checkout"}),d.jsx(u.Button,{variant:"text",size:"small",sx:{color:u.theme.palette.gray.gray2},onClick:()=>{n(!0)},children:"Dismiss"})]})]})]})},gp=({setShown:e,shown:t,title:n,description:r,buttons:o})=>d.jsx(Cr,{shown:t,setShown:e,showCloseButton:!0,children:d.jsxs(u.Stack,{width:"400px",padding:"20px",children:[d.jsx(u.Typography,{variant:"h2",marginBottom:"8px",children:n}),d.jsx(u.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
1296
+ `).map((s,a)=>d.jsx(u.Typography,{variant:"body2",children:s},a))}),d.jsx(u.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>d.jsx(u.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),mp="connector-agent-expanded-write-form",bp=({metaData:e,isEdit:t=!1,defaultOption:n,connectors:r,mapFormOpen:o,onClose:s,onCreateSuccess:a,setMetaData:i,setMapFormOpen:c})=>{var Rr;const{userGroupId:l,userId:f}=Xt()||{},[g,y]=I.useState(null),[v,b]=I.useState(!1),p=I.useRef(null),{conversationId:h,availableFeatures:m,sendTrackingEvent:C,currentSmIds:x,connectorFunctions:{redirectToAdmin:w,getFormElement:E,toggleFormElement:_},stackingContext:T,userEmail:S,isAdmin:L,variables:R}=I.useContext(He),[k,D]=lp(),M=Ce(K1),G=Ce(t?qv:$1),Y=Ce($v),X=Ce(Qv),J=Ce(eE),z=Ce(tE),q=Ce(nE),ne=Ce(rE),ce=Ce(oE),V=Ce(ep),N=X==null?void 0:X[(g==null?void 0:g.value)??""],H=tt(m,i4),j=(N==null?void 0:N.hasCustomFields)??!1,{customFieldsArgsPresent:$,customFieldsArgs:oe}=I.useMemo(()=>{if(!j)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const se=Object.values((N==null?void 0:N.customFieldsArgs)??{}).every(it=>!!k.values[it]);if(!se)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const ve=(N==null?void 0:N.customFieldsArgs)??{},qe=rs(k,ve);return{customFieldsArgsPresent:se,customFieldsArgs:qe}},[j,k,N==null?void 0:N.customFieldsArgs]),re=j&&$&&H,{data:B}=ow({formId:String(g==null?void 0:g.value),args:oe,enabled:re}),te=I.useMemo(()=>re?B??[]:[],[re,B]),fe=N==null?void 0:N.expandedView,{formConfigs:Z,formViewConfigs:Ye}=I.useMemo(()=>{if(g&&"value"in g&&Y&&Y[g.value]&&Array.isArray(Y[g.value])){const ve=[...Y[g.value],...te],qe=[{id:g.value,formFields:ve}];return{formConfigs:qe,formViewConfigs:fe?Mx(ve,j1):qe}}const se=[{id:"emptyFormId",formFields:[]}];return{formConfigs:se,formViewConfigs:se}},[Y,te,g,fe]),Se=I.useMemo(()=>{var ve;const se=((ve=Z==null?void 0:Z[0])==null?void 0:ve.formFields)||[];return $c({formFields:se})},[Z]),{setValue:Je,setFormDefaults:Et,inputChangeHandler:zn,checkboxChangeHandler:Nt,dateChangeHandler:at,clearDependentFields:ze,handleValidationError:Yn,isErrorInValidations:wt}=up({state:k,dispatch:D,validations:Se,dynamicFields:te}),{data:Jn,enabledRef:Sn}=aw({formId:Z[0].id,enabled:!t}),{mutate:Lr,isPending:qn}=cw({formId:Z[0].id,onSuccess:()=>{Sn.current=!0,c==null||c(!1)}});I.useEffect(()=>{Jn&&Et(Jn)},[Jn,Et]);const{userGroupId:pt}=Xt()||{},{fetchConfig:us,createConfig:Or}=pp({formFields:Z[0].formFields,formId:Z[0].id,formState:k,conversationId:h}),It=(Rr=M==null?void 0:M.forms.find(se=>se.type==="edit"))==null?void 0:Rr.id,{externalResourceId:Ut}=M??{},xo=[z,q,ce].includes(ee.LOADING),Qn=I.useMemo(()=>!fe||!E?null:E(),[fe,E]),pn=zt();I.useEffect(()=>(fe&&_&&_(!0),()=>{fe&&_&&_(!1)}),[fe,_]),I.useEffect(()=>{pn(V1(t?!(ne&&"values"in ne&&"values"in k&&JSON.stringify(tp(k.values))===JSON.stringify(tp(ne.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,ne,k,pn]),I.useEffect(()=>(t&&ne&&D({type:Ct.SET_FIELDS,payload:ne}),()=>{D({type:Ct.SET_FIELDS,payload:{values:{}}})}),[t,D,ne]),I.useEffect(()=>{g!==null&&i(se=>({...se,object_type:g.label}))},[g,i]),I.useEffect(()=>{if(k.values){const se=O1(Z[0].formFields,k.values);i(ve=>({...ve,fields_filled:se}))}},[k,Z,i]),I.useEffect(()=>{if(n&&!t)return y(n);G&&G.length&&y(t&&It?G.find(se=>se.value===It)??null:se=>se||!X?se:G.length===1?G[0]:G.find(qe=>!X[qe.value].expandedView)??null)},[G,X,t,It,n]);const Fr=()=>{y(p.current),b(!1),D({type:Ct.RESET_STATE})},vo=(se,ve)=>{Je(se,ve)},kr=(se,ve,qe)=>{if(ve.action==="clear"&&ve.name&&(Je(ve.name,""),g!=null&&g.value&&ze(ve.name,J==null?void 0:J[g.value]),Se[ve.name].isRequired&&Yn(ve.name,!0)),se&&typeof se=="object"&&"label"in se&&typeof se.label=="string"&&"value"in se&&(typeof se.value=="string"||typeof se.value=="number")&&typeof ve.name<"u")if(ve.name==="form-object")p.current={value:se.value,label:se.label},k.values&&se.value!==(g==null?void 0:g.value)&&(Object.values(k.values).filter(Qe=>Qe!=="").length>0?b(!0):Fr());else{let it=!1;qe&&(it=qe.isMultiSelect||!1);const Qe=!it&&"prefillValues"in se&&se.prefillValues,Rt=it?[{value:se.value,label:se.label}]:{value:se.value,label:se.label};if(Je(ve.name,Rt),Qe)for(const Kt in Qe)Je(Kt,Qe[Kt]);g!=null&&g.value&&ze(ve.name,J==null?void 0:J[g.value])}},Eo=()=>{if(!wt()&&It&&(X!=null&&X[It])&&h&&Ut){const{connectorName:se,title:ve}=M;C(S3,{connector_name:se,card_title:ve,sm_ids:x,ug_id:pt});const qe=X[It].interfaceDetails;if(!qe||!ne)return;const{id:it,args:Qe={},previousArgs:Rt={}}=qe,Kt=rs(ne,Rt),Tn=rs(k,Qe);pn(Na({formId:String(It),conversationId:h,args:Tn,previousArgs:Kt,externalResourceId:Ut,interfaceId:it,successCallback:()=>{a()}})).unwrap().then(()=>{var W;C(L3,{connector_name:se,card_title:ve,sm_ids:x,ug_id:pt});const gn=((W=Z[0].formFields)==null?void 0:W.filter(Q=>Q.isCustomField))??[],So=gn.length>0,O=gn.some(Q=>k.values[Q.name]);C(z3,{sm_ids:x,ug_id:l,connector_name:N==null?void 0:N.connectorName,form_object:N==null?void 0:N.name,object_type:g==null?void 0:g.label,has_custom_fields:So,custom_fields_used:O})}).finally(()=>{pn(oo(null))})}},Dr=()=>{if(!wt()&&g&&(X!=null&&X[g.value])&&h){const se=X==null?void 0:X[g.value].interfaceDetails;if(!se)return;const{id:ve,args:qe={}}=se,it=rs(k,qe);pn(Da({formId:String(g.value),conversationId:h,args:it,interfaceId:ve,successCallback:()=>{a()}})).unwrap().then(()=>{var Tn;C(m3,{object_type:g});const Qe=((Tn=Z[0].formFields)==null?void 0:Tn.filter(gn=>gn.isCustomField))??[],Rt=Qe.length>0,Kt=Qe.some(gn=>k.values[gn.name]);C(X3,{sm_ids:x,ug_id:l,connector_name:N==null?void 0:N.connectorName,form_object:N==null?void 0:N.name,object_type:g==null?void 0:g.label,has_custom_fields:Rt,custom_fields_used:Kt})})}},wo=[{label:"Cancel",action:()=>b(!1),variant:"text"},{label:"Continue",action:Fr}],hn=Xs({url:n3,params:{email:S,user_id:f,ug_id:l,sm_ids:x.join(","),connector_names:r.join(","),form_object:N==null?void 0:N.name}}),$n=()=>{window.open(hn,"_blank"),C(W3,{sm_ids:x,ug_id:l,connector_name:N==null?void 0:N.connectorName,form_object:N==null?void 0:N.name})},Nr=()=>{w(N==null?void 0:N.connectorId,{isEdit:!0,tabIndex:2,editCard:(N==null?void 0:N.cardId)??""}),C(Z3,{sm_ids:x,ug_id:l,connector_name:N==null?void 0:N.connectorName,form_object:N==null?void 0:N.name})},Io=async({args:se,pagination:ve},{formId:qe,fieldName:it})=>{const Qe=await F1({formId:qe,fieldName:it},{pagination:ve,args:se}),Rt=Array.isArray(Qe==null?void 0:Qe.data.data)?Qe.data.data:[];return{options:Rt,hasMore:!!Rt.length}},_o=L&&H,Un=d.jsxs(vp,{className:fe?mp:"",children:[c&&d.jsx(Nx,{open:o??!1,onClose:()=>c==null?void 0:c(!1),fields:Z[0].formFields,variables:R??[],title:(N==null?void 0:N.name)||"Map Fields",connectorLogo:(N==null?void 0:N.logoUrl)??"",formId:Z[0].id,fetchOptions:Io,onSave:se=>{Lr(se)},onCancel:()=>c==null?void 0:c(!1),isSaving:qn,defaultValues:Jn}),d.jsx(gw,{onPrimaryClick:()=>{c==null||c(!0)}}),d.jsx(gp,{shown:v,setShown:b,title:pv,description:hv,buttons:wo}),fe?d.jsxs(mw,{children:[d.jsxs(u.Typography,{children:[t?"Edit":"Add"," to ",N.connectorName]}),d.jsx(u.Tooltip,{title:"Close Popup",placement:"bottom",children:d.jsx(u.IconButton,{onClick:s,children:d.jsx(bw,{src:X1})})})]}):null,d.jsxs(xp,{spacing:3,children:[!t&&!fe?d.jsx(gr,{type:"select",placeholder:P1,options:G,value:g,name:"form-object",selectChangeHandler:kr,label:bv,labelSpacing:.5,validation:{isRequired:!0}}):null,d.jsx(T1,{showGlobalLoader:ce===ee.LOADING,formConfig:Ye,selectChangeHandler:kr,inputChangeHandler:zn,checkboxChangeHandler:Nt,dateChangeHandler:at,tableChangeHandler:vo,onValidationError:Yn,fieldsSpacing:3,labelSpacing:.5,fetchConfig:us,createConfig:Or,values:k.values,validations:Se,...fe?{cols:j1,stackIndex:T.expandedForm}:null}),_o?d.jsx(u.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:d.jsx(u.Button,{variant:"text",startIcon:d.jsx(Cw,{}),onClick:Nr,size:"small",children:v4})}):null,d.jsx(u.Stack,{marginTop:_o?"4px !important":"28px",width:"100%",justifyContent:"center",children:d.jsx(yw,{variant:"text",onClick:$n,size:"small",children:x4})})]}),d.jsxs(Cp,{children:[d.jsx(u.Button,{disabled:wt()||xo||!V,onClick:t?Eo:Dr,size:"small",...fe?{style:{order:2}}:null,children:t?f4:d4}),d.jsx(Ep,{variant:"outlined",color:"tertiary",size:"small",onClick:s,disabled:xo,children:Ji})]})]});return fe&&Qn?Ve.createPortal(Un,Qn):Un},yp=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},A.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),Cp=u.styled(u.Box)`
1267
1297
  box-sizing: border-box;
1268
1298
  height: 52px;
1269
1299
  background-color: var(--form-background-color, inherit);
@@ -1310,7 +1340,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1310
1340
  color: ${u.theme.palette.purple.primary} !important;
1311
1341
  border: 1px solid ${u.theme.palette.purple.primary} !important;
1312
1342
  }
1313
- `,cw=u.styled(u.Stack)`
1343
+ `,mw=u.styled(u.Stack)`
1314
1344
  box-sizing: border-box;
1315
1345
  flex-flow: row nowrap;
1316
1346
  justify-content: space-between;
@@ -1322,20 +1352,20 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1322
1352
  background-color: var(--form-background-color, inherit);
1323
1353
  padding-top: 20px;
1324
1354
  padding-bottom: 10px;
1325
- `,lw=u.styled("img")`
1355
+ `,bw=u.styled("img")`
1326
1356
  height: 16px;
1327
1357
  width: 16px;
1328
- `,uw=u.styled(u.Button)`
1358
+ `,yw=u.styled(u.Button)`
1329
1359
  color: ${u.theme.palette.gray.gray3};
1330
1360
  &:hover {
1331
1361
  color: ${u.theme.palette.purple.primary};
1332
1362
  }
1333
- `,dw=u.styled(yp)`
1363
+ `,Cw=u.styled(yp)`
1334
1364
  fill: ${u.theme.palette.purple.primary};
1335
1365
  path {
1336
1366
  fill: ${u.theme.palette.purple.primary} !important;
1337
1367
  }
1338
- `,fw=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=zt(),r=Ce(sp),o=Ce(ap),s=Ce(Zv),a=Ce(U1),[i,c]=I.useState(!1),[l,f]=I.useState(null),[g,y]=I.useState(""),[v,b]=I.useState({}),{conversationId:p,sendTrackingEvent:h,email:m}=I.useContext(We);I.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const C={externalResourceId:g},x=o===te.LOADING,w=s===te.LOADING,E=()=>{!i&&l&&"value"in l&&(h(C3,{object_type:l.label}),n(no({id:String(l==null?void 0:l.value),args:C})).unwrap().catch(N=>{(N==null?void 0:N.status)===400?Se({message:M1,type:Qe}):Se({message:Ux,type:Qe})})),c(N=>!N)},_=()=>{l&&"value"in l&&p&&n(Ma({id:String(l.value),externalResourceId:g,conversationId:p,email:m})).unwrap().then(()=>{h(b3,{object_type:l.label,input_type:g}),Se({message:ev,type:rn}),e(!1),t()}).catch(N=>{(N==null?void 0:N.status)===400?Se({message:M1,type:Qe}):(N==null?void 0:N.status)===409?Se({message:Kx,type:Qe}):Se({message:tv,type:Qe})})},A=()=>{e(!1),c(!1)},S=(N,M)=>{N&&typeof N=="object"&&"label"in N&&typeof N.label=="string"&&"value"in N&&(typeof N.value=="string"||typeof N.value=="number")&&typeof M.name<"u"&&(f({value:N.value,label:N.label}),y(""))},L=N=>{N.stopPropagation();const{value:M}=(N==null?void 0:N.target)||{};y(M),c(!1)},k=(N,M)=>{b(V=>({...V,[N]:!!M}))},R=()=>Object.keys(v).filter(M=>v[M]).length>0;return d.jsxs(vp,{children:[d.jsxs(xp,{spacing:3,children:[d.jsx(br,{type:"select",placeholder:P1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:uv,labelSpacing:.5,validation:{isRequired:!0},onValidationError:k}),d.jsx(br,{type:"text",placeholder:dv,value:g,name:"resourceId",inputChangeHandler:L,label:fv,labelSpacing:.5,validation:{isRequired:!0,validate:s6()},onValidationError:k}),i?d.jsx(ip,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:C}):null,d.jsx(zE,{fullWidth:!0,disabled:R()||x,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?ob:rb})]}),d.jsxs(Cp,{children:[d.jsx(u.Button,{onClick:_,disabled:R()||w,size:"small",children:Id}),d.jsx(Ep,{color:"tertiary",variant:"outlined",onClick:A,disabled:w,size:"small",children:Ji})]})]})},pw=u.styled(u.Button)`
1368
+ `,xw=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=zt(),r=Ce(sp),o=Ce(ap),s=Ce(Uv),a=Ce(U1),[i,c]=I.useState(!1),[l,f]=I.useState(null),[g,y]=I.useState(""),[v,b]=I.useState({}),{conversationId:p,sendTrackingEvent:h,email:m}=I.useContext(He);I.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const C={externalResourceId:g},x=o===ee.LOADING,w=s===ee.LOADING,E=()=>{!i&&l&&"value"in l&&(h(C3,{object_type:l.label}),n(ro({id:String(l==null?void 0:l.value),args:C})).unwrap().catch(D=>{(D==null?void 0:D.status)===400?_e({message:M1,type:Ue}):_e({message:av,type:Ue})})),c(D=>!D)},_=()=>{l&&"value"in l&&p&&n(Ma({id:String(l.value),externalResourceId:g,conversationId:p,email:m})).unwrap().then(()=>{h(b3,{object_type:l.label,input_type:g}),_e({message:cv,type:nn}),e(!1),t()}).catch(D=>{(D==null?void 0:D.status)===400?_e({message:M1,type:Ue}):(D==null?void 0:D.status)===409?_e({message:iv,type:Ue}):_e({message:lv,type:Ue})})},T=()=>{e(!1),c(!1)},S=(D,M)=>{D&&typeof D=="object"&&"label"in D&&typeof D.label=="string"&&"value"in D&&(typeof D.value=="string"||typeof D.value=="number")&&typeof M.name<"u"&&(f({value:D.value,label:D.label}),y(""))},L=D=>{D.stopPropagation();const{value:M}=(D==null?void 0:D.target)||{};y(M),c(!1)},R=(D,M)=>{b(G=>({...G,[D]:!!M}))},k=()=>Object.keys(v).filter(M=>v[M]).length>0;return d.jsxs(vp,{children:[d.jsxs(xp,{spacing:3,children:[d.jsx(gr,{type:"select",placeholder:P1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:yv,labelSpacing:.5,validation:{isRequired:!0},onValidationError:R}),d.jsx(gr,{type:"text",placeholder:Cv,value:g,name:"resourceId",inputChangeHandler:L,label:xv,labelSpacing:.5,validation:{isRequired:!0,validate:s6()},onValidationError:R}),i?d.jsx(ip,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:C}):null,d.jsx(ew,{fullWidth:!0,disabled:k()||x,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?ob:rb})]}),d.jsxs(Cp,{children:[d.jsx(u.Button,{onClick:_,disabled:k()||w,size:"small",children:Id}),d.jsx(Ep,{color:"tertiary",variant:"outlined",onClick:T,disabled:w,size:"small",children:Ji})]})]})},vw=u.styled(u.Button)`
1339
1369
  &:hover {
1340
1370
  background-color: #e3e9ff !important;
1341
1371
  color: ${u.theme.palette.purple.primary} !important;
@@ -1349,14 +1379,14 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1349
1379
  & .content__btn {
1350
1380
  margin-left: 8px;
1351
1381
  }
1352
- `,hw=u.styled(u.Button)`
1382
+ `,Ew=u.styled(u.Button)`
1353
1383
  & path {
1354
1384
  fill: #fff;
1355
1385
  }
1356
1386
  & .content__btn {
1357
1387
  margin-left: 8px;
1358
1388
  }
1359
- `,gw=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},T.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),T.createElement("g",{mask:"url(#mask0_4649_80352)"},T.createElement("path",{d:"M9.16797 14.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013 18.654C8.84852 18.654 7.76519 18.4352 6.7513 17.9977C5.73741 17.5602 4.85547 16.9665 4.10547 16.2165C3.35547 15.4665 2.76172 14.5845 2.32422 13.5706C1.88672 12.5567 1.66797 11.4734 1.66797 10.3206C1.66797 9.16786 1.88672 8.08453 2.32422 7.07064C2.76172 6.05675 3.35547 5.1748 4.10547 4.4248C4.85547 3.6748 5.73741 3.08105 6.7513 2.64355C7.76519 2.20605 8.84852 1.9873 10.0013 1.9873C11.1541 1.9873 12.2374 2.20605 13.2513 2.64355C14.2652 3.08105 15.1471 3.6748 15.8971 4.4248C16.6471 5.1748 17.2409 6.05675 17.6784 7.07064C18.1159 8.08453 18.3346 9.16786 18.3346 10.3206C18.3346 11.4734 18.1159 12.5567 17.6784 13.5706C17.2409 14.5845 16.6471 15.4665 15.8971 16.2165C15.1471 16.9665 14.2652 17.5602 13.2513 17.9977C12.2374 18.4352 11.1541 18.654 10.0013 18.654ZM10.0013 16.9873C11.8624 16.9873 13.4388 16.3415 14.7305 15.0498C16.0221 13.7581 16.668 12.1817 16.668 10.3206C16.668 8.45953 16.0221 6.88314 14.7305 5.59147C13.4388 4.2998 11.8624 3.65397 10.0013 3.65397C8.14019 3.65397 6.5638 4.2998 5.27214 5.59147C3.98047 6.88314 3.33464 8.45953 3.33464 10.3206C3.33464 12.1817 3.98047 13.7581 5.27214 15.0498C6.5638 16.3415 8.14019 16.9873 10.0013 16.9873Z",fill:"#4D596C"}))),mw=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M14.3462 8.73757C14.0406 8.43198 13.5451 8.43198 13.2395 8.73757C12.9339 9.04316 12.9339 9.53863 13.2395 9.84422L14.3462 8.73757ZM15.2392 10.7372L15.7925 10.1839L15.2392 10.7372ZM16.2377 13.1478L15.4552 13.1478L16.2377 13.1478ZM15.2392 15.5584L14.6859 15.0051L15.2392 15.5584ZM10.418 15.5584L9.86469 16.1118L10.418 15.5584ZM9.52499 13.5588C9.2194 13.2532 8.72393 13.2532 8.41834 13.5588C8.11275 13.8643 8.11275 14.3598 8.41834 14.6654L9.52499 13.5588ZM5.52477 11.7731C5.83036 12.0787 6.32583 12.0787 6.63142 11.7731C6.93701 11.4675 6.93701 10.972 6.63142 10.6665L5.52477 11.7731ZM9.45292 4.95224L10.0062 4.39892L9.45292 4.95224ZM10.346 6.95192C10.6515 7.25752 11.147 7.25752 11.4526 6.95192C11.7582 6.64633 11.7582 6.15087 11.4526 5.84527L10.346 6.95192ZM13.2395 9.84422L14.6859 11.2906L15.7925 10.1839L14.3462 8.73757L13.2395 9.84422ZM14.6859 11.2906C15.1785 11.7832 15.4552 12.4512 15.4552 13.1478L17.0202 13.1478C17.0202 12.0362 16.5786 10.97 15.7925 10.1839L14.6859 11.2906ZM15.4552 13.1478C15.4552 13.8445 15.1785 14.5125 14.6859 15.0051L15.7925 16.1118C16.5786 15.3257 17.0202 14.2595 17.0202 13.1478L15.4552 13.1478ZM14.6859 15.0051C13.6601 16.0308 11.9971 16.0308 10.9713 15.0051L9.86469 16.1118C11.5016 17.7487 14.1556 17.7487 15.7925 16.1118L14.6859 15.0051ZM10.9713 15.0051L9.52499 13.5588L8.41834 14.6654L9.86469 16.1118L10.9713 15.0051ZM6.63142 10.6665L5.18507 9.2201L4.07842 10.3268L5.52477 11.7731L6.63142 10.6665ZM5.18507 9.2201C4.69249 8.72752 4.41576 8.05944 4.41576 7.36283H2.85072C2.85072 8.47452 3.29234 9.54067 4.07842 10.3268L5.18507 9.2201ZM4.41576 7.36283C4.41576 6.66622 4.69249 5.99815 5.18507 5.50557L4.07842 4.39892C3.29234 5.185 2.85072 6.25115 2.85072 7.36283H4.41576ZM5.18507 5.50557C6.21081 4.47983 7.87386 4.47983 8.8996 5.50557L10.0062 4.39892C8.36932 2.76199 5.71534 2.76199 4.07842 4.39892L5.18507 5.50557ZM8.8996 5.50557L10.346 6.95192L11.4526 5.84527L10.0062 4.39892L8.8996 5.50557Z",fill:"#4D596C"}),T.createElement("rect",{x:6.36328,y:7.91895,width:1.66667,height:8.33333,rx:.833333,transform:"rotate(-45 6.36328 7.91895)",fill:"#4D596C"})),bw=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>d.jsxs(u.Stack,{gap:2,marginTop:"12px",children:[d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray1,children:ov}),d.jsxs(u.Stack,{gap:"12px",children:[n?d.jsxs(hw,{fullWidth:!0,onClick:e,size:"medium",children:[d.jsx(gw,{}),d.jsx("span",{className:"content__btn",children:Ad})]}):null,r?d.jsxs(pw,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[d.jsx(mw,{}),d.jsx("span",{className:"content__btn",children:Td})]}):null]})]}),yw=e=>e.write.searchObjectList,wp=e=>e.write.objectDict,Cw=e=>e.write.formFields,xw=e=>e.write.dependentFieldsMap,vw="Search in Connectors",Ew="Search in Apps",ww="Start typing to search..",Iw="Smart search suggestions",_w=":count result:countSuffix found for :searchObject in :connectorName",Sw="Back to search results",Aw="No search results found",Ip=e=>T.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{id:"icons/Actions/Search"},T.createElement("path",{id:"Shape",fillRule:"evenodd",clipRule:"evenodd",d:"M8.57633 7.54717H8.03431L7.8422 7.36192C8.51458 6.57976 8.91938 5.56432 8.91938 4.45969C8.91938 1.99657 6.92281 0 4.45969 0C1.99657 0 0 1.99657 0 4.45969C0 6.92281 1.99657 8.91938 4.45969 8.91938C5.56432 8.91938 6.57976 8.51458 7.36192 7.8422L7.54717 8.03431V8.57633L10.9777 12L12 10.9777L8.57633 7.54717ZM4.45969 7.54717C2.75129 7.54717 1.37221 6.1681 1.37221 4.45969C1.37221 2.75129 2.75129 1.37221 4.45969 1.37221C6.1681 1.37221 7.54717 2.75129 7.54717 4.45969C7.54717 6.1681 6.1681 7.54717 4.45969 7.54717Z"}))),Tw=u.styled(u.Stack)`
1389
+ `,ww=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},A.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),A.createElement("g",{mask:"url(#mask0_4649_80352)"},A.createElement("path",{d:"M9.16797 14.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013 18.654C8.84852 18.654 7.76519 18.4352 6.7513 17.9977C5.73741 17.5602 4.85547 16.9665 4.10547 16.2165C3.35547 15.4665 2.76172 14.5845 2.32422 13.5706C1.88672 12.5567 1.66797 11.4734 1.66797 10.3206C1.66797 9.16786 1.88672 8.08453 2.32422 7.07064C2.76172 6.05675 3.35547 5.1748 4.10547 4.4248C4.85547 3.6748 5.73741 3.08105 6.7513 2.64355C7.76519 2.20605 8.84852 1.9873 10.0013 1.9873C11.1541 1.9873 12.2374 2.20605 13.2513 2.64355C14.2652 3.08105 15.1471 3.6748 15.8971 4.4248C16.6471 5.1748 17.2409 6.05675 17.6784 7.07064C18.1159 8.08453 18.3346 9.16786 18.3346 10.3206C18.3346 11.4734 18.1159 12.5567 17.6784 13.5706C17.2409 14.5845 16.6471 15.4665 15.8971 16.2165C15.1471 16.9665 14.2652 17.5602 13.2513 17.9977C12.2374 18.4352 11.1541 18.654 10.0013 18.654ZM10.0013 16.9873C11.8624 16.9873 13.4388 16.3415 14.7305 15.0498C16.0221 13.7581 16.668 12.1817 16.668 10.3206C16.668 8.45953 16.0221 6.88314 14.7305 5.59147C13.4388 4.2998 11.8624 3.65397 10.0013 3.65397C8.14019 3.65397 6.5638 4.2998 5.27214 5.59147C3.98047 6.88314 3.33464 8.45953 3.33464 10.3206C3.33464 12.1817 3.98047 13.7581 5.27214 15.0498C6.5638 16.3415 8.14019 16.9873 10.0013 16.9873Z",fill:"#4D596C"}))),Iw=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M14.3462 8.73757C14.0406 8.43198 13.5451 8.43198 13.2395 8.73757C12.9339 9.04316 12.9339 9.53863 13.2395 9.84422L14.3462 8.73757ZM15.2392 10.7372L15.7925 10.1839L15.2392 10.7372ZM16.2377 13.1478L15.4552 13.1478L16.2377 13.1478ZM15.2392 15.5584L14.6859 15.0051L15.2392 15.5584ZM10.418 15.5584L9.86469 16.1118L10.418 15.5584ZM9.52499 13.5588C9.2194 13.2532 8.72393 13.2532 8.41834 13.5588C8.11275 13.8643 8.11275 14.3598 8.41834 14.6654L9.52499 13.5588ZM5.52477 11.7731C5.83036 12.0787 6.32583 12.0787 6.63142 11.7731C6.93701 11.4675 6.93701 10.972 6.63142 10.6665L5.52477 11.7731ZM9.45292 4.95224L10.0062 4.39892L9.45292 4.95224ZM10.346 6.95192C10.6515 7.25752 11.147 7.25752 11.4526 6.95192C11.7582 6.64633 11.7582 6.15087 11.4526 5.84527L10.346 6.95192ZM13.2395 9.84422L14.6859 11.2906L15.7925 10.1839L14.3462 8.73757L13.2395 9.84422ZM14.6859 11.2906C15.1785 11.7832 15.4552 12.4512 15.4552 13.1478L17.0202 13.1478C17.0202 12.0362 16.5786 10.97 15.7925 10.1839L14.6859 11.2906ZM15.4552 13.1478C15.4552 13.8445 15.1785 14.5125 14.6859 15.0051L15.7925 16.1118C16.5786 15.3257 17.0202 14.2595 17.0202 13.1478L15.4552 13.1478ZM14.6859 15.0051C13.6601 16.0308 11.9971 16.0308 10.9713 15.0051L9.86469 16.1118C11.5016 17.7487 14.1556 17.7487 15.7925 16.1118L14.6859 15.0051ZM10.9713 15.0051L9.52499 13.5588L8.41834 14.6654L9.86469 16.1118L10.9713 15.0051ZM6.63142 10.6665L5.18507 9.2201L4.07842 10.3268L5.52477 11.7731L6.63142 10.6665ZM5.18507 9.2201C4.69249 8.72752 4.41576 8.05944 4.41576 7.36283H2.85072C2.85072 8.47452 3.29234 9.54067 4.07842 10.3268L5.18507 9.2201ZM4.41576 7.36283C4.41576 6.66622 4.69249 5.99815 5.18507 5.50557L4.07842 4.39892C3.29234 5.185 2.85072 6.25115 2.85072 7.36283H4.41576ZM5.18507 5.50557C6.21081 4.47983 7.87386 4.47983 8.8996 5.50557L10.0062 4.39892C8.36932 2.76199 5.71534 2.76199 4.07842 4.39892L5.18507 5.50557ZM8.8996 5.50557L10.346 6.95192L11.4526 5.84527L10.0062 4.39892L8.8996 5.50557Z",fill:"#4D596C"}),A.createElement("rect",{x:6.36328,y:7.91895,width:1.66667,height:8.33333,rx:.833333,transform:"rotate(-45 6.36328 7.91895)",fill:"#4D596C"})),_w=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>d.jsxs(u.Stack,{gap:2,marginTop:"12px",children:[d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray1,children:fv}),d.jsxs(u.Stack,{gap:"12px",children:[n?d.jsxs(Ew,{fullWidth:!0,onClick:e,size:"medium",children:[d.jsx(ww,{}),d.jsx("span",{className:"content__btn",children:Td})]}):null,r?d.jsxs(vw,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[d.jsx(Iw,{}),d.jsx("span",{className:"content__btn",children:Ad})]}):null]})]}),Sw=e=>e.write.searchObjectList,wp=e=>e.write.objectDict,Tw=e=>e.write.formFields,Aw=e=>e.write.dependentFieldsMap,Lw="Search in Connectors",Ow="Search in Apps",Fw="Start typing to search..",kw="Smart search suggestions",Dw=":count result:countSuffix found for :searchObject in :connectorName",Nw="Back to search results",Rw="No search results found",Ip=e=>A.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{id:"icons/Actions/Search"},A.createElement("path",{id:"Shape",fillRule:"evenodd",clipRule:"evenodd",d:"M8.57633 7.54717H8.03431L7.8422 7.36192C8.51458 6.57976 8.91938 5.56432 8.91938 4.45969C8.91938 1.99657 6.92281 0 4.45969 0C1.99657 0 0 1.99657 0 4.45969C0 6.92281 1.99657 8.91938 4.45969 8.91938C5.56432 8.91938 6.57976 8.51458 7.36192 7.8422L7.54717 8.03431V8.57633L10.9777 12L12 10.9777L8.57633 7.54717ZM4.45969 7.54717C2.75129 7.54717 1.37221 6.1681 1.37221 4.45969C1.37221 2.75129 2.75129 1.37221 4.45969 1.37221C6.1681 1.37221 7.54717 2.75129 7.54717 4.45969C7.54717 6.1681 6.1681 7.54717 4.45969 7.54717Z"}))),Mw=u.styled(u.Stack)`
1360
1390
  flex-flow: row nowrap;
1361
1391
  align-items: center;
1362
1392
  column-gap: 12px;
@@ -1366,28 +1396,28 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1366
1396
  &:hover {
1367
1397
  background-color: ${({isSelected:e})=>e?"rgb(80, 109, 255, 0.12)":"rgba(0, 0, 0, 0.04)"};
1368
1398
  }
1369
- `,Lw=u.styled("img")`
1399
+ `,Pw=u.styled("img")`
1370
1400
  flex-shrink: 0;
1371
1401
  display: block;
1372
1402
  width: 24px;
1373
1403
  height: 24px;
1374
1404
  border-radius: 50%;
1375
- `,_p=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(We),{label:i,description:c,avatarUrl:l,connectorName:f}=e,g=()=>{s(N3,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:f}),r(e,t),o(Vx(t))};return d.jsxs(Tw,{isSelected:n,onClick:g,children:[d.jsx(Lw,{src:l,alt:"option"}),d.jsxs(u.Stack,{children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray1,children:i}),d.jsx(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:"12px",children:c})]})]})},Ow=u.styled(u.Stack)`
1405
+ `,_p=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),{label:i,description:c,avatarUrl:l,connectorName:f}=e,g=()=>{s(N3,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:f}),r(e,t),o(Jx(t))};return d.jsxs(Mw,{isSelected:n,onClick:g,children:[d.jsx(Pw,{src:l,alt:"option"}),d.jsxs(u.Stack,{children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray1,children:i}),d.jsx(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:"12px",children:c})]})]})},jw=u.styled(u.Stack)`
1376
1406
  padding: 10px 0 10px 10px;
1377
- `,{Control:Fw}=cn,kw=({children:e,...t})=>d.jsxs(Fw,{...t,children:[d.jsx(Ow,{children:d.jsx(Ip,{})}),e]}),Dw=e=>{const{data:t,isSelected:n,selectOption:r}=e;return d.jsx(_p,{data:t,isSelected:n,onSelect:r})},Nw={control:(e,{isFocused:t})=>({...e,cursor:"pointer",boxShadow:"none",borderColor:t?"#196FE0 !important":"#D6DDE8",borderWidth:"1px"}),menu:e=>({...e,marginTop:0,padding:0,borderRadius:"4px",background:"#fff",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",zIndex:3}),input:e=>({...e,"& input":{opacity:"1 !important"}}),menuPortal:e=>({...e,zIndex:3})},Rw=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:f,currentSmIds:g}=I.useContext(We),y=tt(l,Ws),v=(h,{action:m})=>{m==="input-change"&&(s(h),h||a())},b=h=>{o(h),h||(s(""),a())},p=()=>{const h=[...new Set(e.map(m=>m.connectorName))];f(D3,{connector_names:h,sm_ids:g})};return d.jsx(Uo,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:y?Ew:vw,isSearchable:!0,filterOption:null,styles:Nw,onInputChange:v,onChange:b,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:p,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:Dw,Control:kw,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},Mw=u.styled(u.Stack)`
1407
+ `,{Control:Bw}=an,Vw=({children:e,...t})=>d.jsxs(Bw,{...t,children:[d.jsx(jw,{children:d.jsx(Ip,{})}),e]}),Gw=e=>{const{data:t,isSelected:n,selectOption:r}=e;return d.jsx(_p,{data:t,isSelected:n,onSelect:r})},Hw={control:(e,{isFocused:t})=>({...e,cursor:"pointer",boxShadow:"none",borderColor:t?"#196FE0 !important":"#D6DDE8",borderWidth:"1px"}),menu:e=>({...e,marginTop:0,padding:0,borderRadius:"4px",background:"#fff",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",zIndex:3}),input:e=>({...e,"& input":{opacity:"1 !important"}}),menuPortal:e=>({...e,zIndex:3})},Ww=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:f,currentSmIds:g}=I.useContext(He),y=tt(l,Ws),v=(h,{action:m})=>{m==="input-change"&&(s(h),h||a())},b=h=>{o(h),h||(s(""),a())},p=()=>{const h=[...new Set(e.map(m=>m.connectorName))];f(D3,{connector_names:h,sm_ids:g})};return d.jsx(es,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:y?Ow:Lw,isSearchable:!0,filterOption:null,styles:Hw,onInputChange:v,onChange:b,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:p,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:Gw,Control:Vw,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},Zw=u.styled(u.Stack)`
1378
1408
  margin: ${({isEmpty:e})=>e?"0":"12px 0"};
1379
- `,Pw=({objectId:e,searchString:t,fetchSearchResults:n})=>{var w;const[r,o]=lp(),s=I.useRef(null),a=Ce(wp),i=Ce(Cw),c=Ce(xw),l=I.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),f=I.useMemo(()=>{const E=(l==null?void 0:l.formFields)||[];return $c({formFields:E})},[l]),{setValue:g,inputChangeHandler:y,dateChangeHandler:v,clearDependentFields:b,handleValidationError:p,isErrorInValidations:h}=up({state:r,dispatch:o,validations:f}),{fetchConfig:m}=pp({formState:r,formFields:l.formFields,formId:l.id}),C=I.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);I.useEffect(()=>{const E=r.values,_=l.id,A=l.formFields;if(Object.values(E).filter(V=>!!V).length<A.length||!a||h()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:k,args:R={}}=S,N=ts(r,R);C({id:_,interfaceId:k,searchString:t,connectorName:L,args:N})},[r,l,a,e,t,h,C]),I.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const x=(E,_,A)=>{if(_.action==="clear"&&_.name&&(g(_.name,""),b(_.name,c[e]),f[_.name].isRequired&&p(_.name,!0)),E&&typeof E=="object"&&"label"in E&&typeof E.label=="string"&&"value"in E&&(typeof E.value=="string"||typeof E.value=="number")&&typeof _.name<"u"){let S=!1;A&&(S=A.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};g(_.name,L),b(_.name,c[e])}};return d.jsx(Mw,{isEmpty:((w=l.formFields)==null?void 0:w.length)===0,children:d.jsx(A1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:x,inputChangeHandler:y,dateChangeHandler:v,onValidationError:p,labelSpacing:.5,fetchConfig:m,values:r.values,validations:f})})},el="@connector-agent-global-search-priority",tl=$y(),jw=({objectList:e})=>({sortedObjectList:I.useMemo(()=>{const r=tl.getItem(el);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=tl.getItem(el)??{};o[r]||(o[r]=0),o[r]++,tl.setItem(el,o)}}),Bw=u.styled(u.Stack)`
1409
+ `,Xw=({objectId:e,searchString:t,fetchSearchResults:n})=>{var w;const[r,o]=lp(),s=I.useRef(null),a=Ce(wp),i=Ce(Tw),c=Ce(Aw),l=I.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),f=I.useMemo(()=>{const E=(l==null?void 0:l.formFields)||[];return $c({formFields:E})},[l]),{setValue:g,inputChangeHandler:y,dateChangeHandler:v,clearDependentFields:b,handleValidationError:p,isErrorInValidations:h}=up({state:r,dispatch:o,validations:f}),{fetchConfig:m}=pp({formState:r,formFields:l.formFields,formId:l.id}),C=I.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);I.useEffect(()=>{const E=r.values,_=l.id,T=l.formFields;if(Object.values(E).filter(G=>!!G).length<T.length||!a||h()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:R,args:k={}}=S,D=rs(r,k);C({id:_,interfaceId:R,searchString:t,connectorName:L,args:D})},[r,l,a,e,t,h,C]),I.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const x=(E,_,T)=>{if(_.action==="clear"&&_.name&&(g(_.name,""),b(_.name,c[e]),f[_.name].isRequired&&p(_.name,!0)),E&&typeof E=="object"&&"label"in E&&typeof E.label=="string"&&"value"in E&&(typeof E.value=="string"||typeof E.value=="number")&&typeof _.name<"u"){let S=!1;T&&(S=T.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};g(_.name,L),b(_.name,c[e])}};return d.jsx(Zw,{isEmpty:((w=l.formFields)==null?void 0:w.length)===0,children:d.jsx(T1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:x,inputChangeHandler:y,dateChangeHandler:v,onValidationError:p,labelSpacing:.5,fetchConfig:m,values:r.values,validations:f})})},el="@connector-agent-global-search-priority",tl=$y(),zw=({objectList:e})=>({sortedObjectList:I.useMemo(()=>{const r=tl.getItem(el);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=tl.getItem(el)??{};o[r]||(o[r]=0),o[r]++,tl.setItem(el,o)}}),Yw=u.styled(u.Stack)`
1380
1410
  padding: 8px 0;
1381
- `,Vw=u.styled(u.Typography)`
1411
+ `,Jw=u.styled(u.Typography)`
1382
1412
  padding: 6px 16px;
1383
1413
  color: ${u.theme.palette.gray.gray4};
1384
1414
  font-size: 13px;
1385
- `,Gw=u.styled(u.Typography)`
1415
+ `,qw=u.styled(u.Typography)`
1386
1416
  padding: 6px 16px;
1387
1417
  color: ${u.theme.palette.gray.gray3};
1388
1418
  font-size: 11px;
1389
1419
  text-transform: uppercase;
1390
- `,Hw=({onSelect:e,selectedOption:t,options:n})=>n.length?d.jsxs(Bw,{children:[d.jsx(Vw,{children:ww}),d.jsx(Gw,{children:Iw}),n.map(r=>d.jsx(_p,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null,Ww=e=>new Promise(t=>setTimeout(t,e)),Sp=({apiFn:e,intervalMillis:t,maxRetries:n,increaseIntervalMillis:r=0,isSatisfied:o,pushIntermediateResults:s=()=>{}})=>(...i)=>{const c=async(l=0)=>{const f=await e(...i);if(s(f),o(f))return s(null),f;if(l>=n)throw f;return l++,t+=r,Ww(t).then(()=>c(l))};return c()},Zw=async({conversationId:e,senderEmail:t})=>{try{const n=await Ee({url:st(Lx,{conversationId:e}),params:{senderEmail:t},method:Pe.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},Ap=({conversationId:e,senderEmail:t,enabled:n})=>mn({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>Zw({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),Tp="/v1/api",Xw=`${Tp}/connectors/forms/:formId/search`,zw=`${Tp}/connectors/conversation/:conversationId/smart-suggestions`,Yw=e=>{if(e.status!=="completed")return e;const t=e.smart_suggestions??[],n=[];for(const r of t)n.push({label:r.search_string,description:`${r.connector_name??""} - ${r.object_name??""}`,avatarUrl:r.connector_logo,value:r.form_id,connectorName:r.connector_name,objectName:r.object_name});return{...e,suggestedOptions:n}},Jw=Sp({apiFn:async({conversationId:e})=>{try{const t=await Ee({url:st(zw,{conversationId:e}),method:Pe.GET}),n=t==null?void 0:t.data;return Yw(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),qw=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=Ap({conversationId:e,senderEmail:t,enabled:n});return mn({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>Jw({conversationId:e}),enabled:n&&r})},Qw=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=I.useState(""),{conversationId:i,email:c,availableFeatures:l}=I.useContext(We),f=Ce(yw),g=Ce(wp),y=tt(l,r4),{sortedObjectList:v,updatePriority:b}=jw({objectList:f}),{data:p}=qw({enabled:y&&!!i,conversationId:String(i),senderEmail:c}),h=(p==null?void 0:p.suggestedOptions)??[],m=I.useMemo(()=>!g||!v.length?[]:v.map(({value:x})=>{const w=g[x];return w?{description:`${w.connectorName??""} - ${w.searchObject}`,avatarUrl:w.logoUrl,label:"",value:x,connectorName:w.connectorName,objectName:w.searchObject}:null}).filter(x=>!!x),[v,g]),C=x=>{n(x),x&&b(""+x.value)};return m.length?d.jsxs(u.Stack,{children:[d.jsx(Rw,{value:e,options:m.map(x=>({...x,label:s})),inputValue:s,root:t,onInputChange:a,onChange:C,onReset:o,NoOptionsMessage:({selectOption:x})=>d.jsx(Hw,{selectedOption:e,onSelect:x,options:h}),menuOpen:!s&&!h.length?!1:void 0}),e?d.jsx(Pw,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},$w="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='%236C7B94'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.00483%2012.5052C7.73146%2012.7786%207.73146%2013.2218%208.00483%2013.4952C8.2782%2013.7685%208.72141%2013.7685%208.99478%2013.4952L11.9948%2010.4952C12.2681%2010.2218%2012.2681%209.77859%2011.9948%209.50522L8.99478%206.50522C8.72141%206.23185%208.2782%206.23185%208.00483%206.50522C7.73146%206.77859%207.73146%207.2218%208.00483%207.49517L10.5099%2010.0002L8.00483%2012.5052Z'/%3e%3c/svg%3e",Uw=async({id:e,externalResourceId:t,conversationId:n,channelType:r="email",email:o})=>{const s=new URLSearchParams;s.append("channel_type",r),o&&s.append("senderEmail",o),await Ee({url:`${kx.replace(":id",e)}?${s.toString()}`,method:Pe.POST,data:{externalResourceId:t,conversationId:n}})},Kw=({onSuccess:e})=>Vt({mutationFn:Uw,onSuccess:()=>{Se({message:vy,type:rn}),e==null||e()},onError:()=>{Se({message:Ey,type:Qe})}}),eI="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8444_63907)'%3e%3cpath%20d='M7.99967%2013.333L8.93967%2012.393L5.21968%208.66634H13.333V7.33301L5.21968%207.33301L8.93967%203.60634L7.99967%202.66634L2.66634%207.99967L7.99967%2013.333Z'%20fill='%23343C45'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8444_63907'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",tI=u.styled(u.Stack)`
1420
+ `,Qw=({onSelect:e,selectedOption:t,options:n})=>n.length?d.jsxs(Yw,{children:[d.jsx(Jw,{children:Fw}),d.jsx(qw,{children:kw}),n.map(r=>d.jsx(_p,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null,$w=e=>new Promise(t=>setTimeout(t,e)),Sp=({apiFn:e,intervalMillis:t,maxRetries:n,increaseIntervalMillis:r=0,isSatisfied:o,pushIntermediateResults:s=()=>{}})=>(...i)=>{const c=async(l=0)=>{const f=await e(...i);if(s(f),o(f))return s(null),f;if(l>=n)throw f;return l++,t+=r,$w(t).then(()=>c(l))};return c()},Uw=async({conversationId:e,senderEmail:t})=>{try{const n=await Ee({url:rt(Px,{conversationId:e}),params:{senderEmail:t},method:Pe.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},Tp=({conversationId:e,senderEmail:t,enabled:n})=>mn({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>Uw({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),Ap="/v1/api",Kw=`${Ap}/connectors/forms/:formId/search`,eI=`${Ap}/connectors/conversation/:conversationId/smart-suggestions`,tI=e=>{if(e.status!=="completed")return e;const t=e.smart_suggestions??[],n=[];for(const r of t)n.push({label:r.search_string,description:`${r.connector_name??""} - ${r.object_name??""}`,avatarUrl:r.connector_logo,value:r.form_id,connectorName:r.connector_name,objectName:r.object_name});return{...e,suggestedOptions:n}},nI=Sp({apiFn:async({conversationId:e})=>{try{const t=await Ee({url:rt(eI,{conversationId:e}),method:Pe.GET}),n=t==null?void 0:t.data;return tI(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),rI=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=Tp({conversationId:e,senderEmail:t,enabled:n});return mn({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>nI({conversationId:e}),enabled:n&&r})},oI=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=I.useState(""),{conversationId:i,email:c,availableFeatures:l}=I.useContext(He),f=Ce(Sw),g=Ce(wp),y=tt(l,r4),{sortedObjectList:v,updatePriority:b}=zw({objectList:f}),{data:p}=rI({enabled:y&&!!i,conversationId:String(i),senderEmail:c}),h=(p==null?void 0:p.suggestedOptions)??[],m=I.useMemo(()=>!g||!v.length?[]:v.map(({value:x})=>{const w=g[x];return w?{description:`${w.connectorName??""} - ${w.searchObject}`,avatarUrl:w.logoUrl,label:"",value:x,connectorName:w.connectorName,objectName:w.searchObject}:null}).filter(x=>!!x),[v,g]),C=x=>{n(x),x&&b(""+x.value)};return m.length?d.jsxs(u.Stack,{children:[d.jsx(Ww,{value:e,options:m.map(x=>({...x,label:s})),inputValue:s,root:t,onInputChange:a,onChange:C,onReset:o,NoOptionsMessage:({selectOption:x})=>d.jsx(Qw,{selectedOption:e,onSelect:x,options:h}),menuOpen:!s&&!h.length?!1:void 0}),e?d.jsx(Xw,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},sI="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='%236C7B94'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.00483%2012.5052C7.73146%2012.7786%207.73146%2013.2218%208.00483%2013.4952C8.2782%2013.7685%208.72141%2013.7685%208.99478%2013.4952L11.9948%2010.4952C12.2681%2010.2218%2012.2681%209.77859%2011.9948%209.50522L8.99478%206.50522C8.72141%206.23185%208.2782%206.23185%208.00483%206.50522C7.73146%206.77859%207.73146%207.2218%208.00483%207.49517L10.5099%2010.0002L8.00483%2012.5052Z'/%3e%3c/svg%3e",aI=async({id:e,externalResourceId:t,conversationId:n,channelType:r="email",email:o})=>{const s=new URLSearchParams;s.append("channel_type",r),o&&s.append("senderEmail",o),await Ee({url:`${Vx.replace(":id",e)}?${s.toString()}`,method:Pe.POST,data:{externalResourceId:t,conversationId:n}})},iI=({onSuccess:e})=>Vt({mutationFn:aI,onSuccess:()=>{_e({message:vy,type:nn}),e==null||e()},onError:()=>{_e({message:Ey,type:Ue})}}),cI="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8444_63907)'%3e%3cpath%20d='M7.99967%2013.333L8.93967%2012.393L5.21968%208.66634H13.333V7.33301L5.21968%207.33301L8.93967%203.60634L7.99967%202.66634L2.66634%207.99967L7.99967%2013.333Z'%20fill='%23343C45'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8444_63907'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",lI=u.styled(u.Stack)`
1391
1421
  width: fit-content;
1392
1422
  cursor: pointer;
1393
1423
  gap: 8px;
@@ -1399,7 +1429,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1399
1429
  letter-spacing: 0.4px;
1400
1430
  text-align: center;
1401
1431
  vertical-align: middle;
1402
- `,nI=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=zt(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=I.useContext(We),g=Ce(sp),y=Ce(ap),{mutate:v,isPending:b}=Kw({onSuccess:s}),p=y===te.LOADING,h={externalResourceId:e};I.useEffect(()=>{a(no({id:t,args:{externalResourceId:e}}))},[e,t,a]);const m=()=>{l(B3,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:g==null?void 0:g.cardTitle,connector_names:g==null?void 0:g.connectorNames}),v({id:t,externalResourceId:e,conversationId:i,email:f})};return d.jsxs(u.Stack,{gap:"12px",marginTop:"12px",children:[d.jsxs(tI,{onClick:o,children:[d.jsx("img",{src:eI,width:"16px",height:"16px"}),d.jsx(u.Typography,{children:Sw})]}),d.jsxs(u.Stack,{gap:"24px",children:[d.jsx(ip,{cardData:g,cardDataApiStatus:y,objectToLink:t,args:h}),d.jsx(u.Stack,{alignItems:"flex-end",children:d.jsx(u.Button,{size:"small",disabled:p||b,onClick:m,children:Id})})]})]})},Lp=u.styled(u.Stack)`
1432
+ `,uI=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=zt(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=I.useContext(He),g=Ce(sp),y=Ce(ap),{mutate:v,isPending:b}=iI({onSuccess:s}),p=y===ee.LOADING,h={externalResourceId:e};I.useEffect(()=>{a(ro({id:t,args:{externalResourceId:e}}))},[e,t,a]);const m=()=>{l(B3,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:g==null?void 0:g.cardTitle,connector_names:g==null?void 0:g.connectorNames}),v({id:t,externalResourceId:e,conversationId:i,email:f})};return d.jsxs(u.Stack,{gap:"12px",marginTop:"12px",children:[d.jsxs(lI,{onClick:o,children:[d.jsx("img",{src:cI,width:"16px",height:"16px"}),d.jsx(u.Typography,{children:Nw})]}),d.jsxs(u.Stack,{gap:"24px",children:[d.jsx(ip,{cardData:g,cardDataApiStatus:y,objectToLink:t,args:h}),d.jsx(u.Stack,{alignItems:"flex-end",children:d.jsx(u.Button,{size:"small",disabled:p||b,onClick:m,children:Id})})]})]})},Lp=u.styled(u.Stack)`
1403
1433
  padding: 12px 12px 12px 11px;
1404
1434
  border: 1px solid ${u.theme.palette.gray.gray5};
1405
1435
  border-radius: 8px;
@@ -1415,10 +1445,10 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1415
1445
  }
1416
1446
  }
1417
1447
  `};
1418
- `,rI="data:image/svg+xml,%3csvg%20width='124'%20height='107'%20viewBox='0%200%20124%20107'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M28.6168%2054.7446C28.6931%2052.5589%2031.0146%2051.1102%2033.0842%2051.8174C35.9985%2052.8133%2040.0375%2053.9024%2044.0621%2054.043C48.0034%2054.1806%2051.968%2053.4097%2054.8762%2052.6339C57.0264%2052.0602%2059.2927%2053.6932%2059.215%2055.9172C59.1742%2057.0856%2058.4742%2058.1269%2057.3723%2058.5178C54.8051%2059.4284%2049.7633%2060.8927%2044.3075%2060.7022C38.7694%2060.5088%2033.1999%2058.6241%2030.4004%2057.5311C29.2637%2057.0873%2028.5742%2055.9641%2028.6168%2054.7446Z'%20fill='url(%23paint0_linear_8481_102191)'/%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='url(%23paint1_linear_8481_102191)'/%3e%3cmask%20id='mask0_8481_102191'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='46'%20y='14'%20width='60'%20height='79'%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_8481_102191)'%3e%3cellipse%20cx='63.7775'%20cy='46.8684'%20rx='1.48152'%20ry='1.39438'%20transform='rotate(-12%2063.7775%2046.8684)'%20fill='%23435C71'/%3e%3crect%20x='47.4368'%20y='59.3203'%20width='53.657'%20height='13.2235'%20transform='rotate(-12%2047.4368%2059.3203)'%20fill='url(%23paint2_linear_8481_102191)'/%3e%3crect%20x='51.1907'%20y='76.9824'%20width='53.657'%20height='10.4263'%20transform='rotate(-12%2051.1907%2076.9824)'%20fill='url(%23paint3_linear_8481_102191)'/%3e%3c/g%3e%3cpath%20opacity='0.883952'%20d='M113.939%2051.0679C114.775%2055%20112.265%2058.865%20108.333%2059.7008L107.842%2059.8052C103.639%2060.6986%2099.5073%2058.0155%2098.6139%2053.8123L97.205%2047.1837L105.307%2045.4616C109.239%2044.6259%20113.104%2047.1359%20113.939%2051.0679Z'%20fill='url(%23paint4_linear_8481_102191)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M68.7215%2066.4138C67.1801%2064.8725%2067.6745%2062.2062%2069.587%2061.1603C72.4457%2059.5969%2076.2861%2057.1773%2079.3785%2054.0849C82.4099%2051.0535%2084.752%2047.3461%2086.2775%2044.5465C87.3388%2042.5989%2090.0598%2042.0819%2091.6282%2043.6503C92.4782%2044.5003%2092.758%2045.7623%2092.2604%2046.8566C91.0829%2049.4466%2088.5191%2054.344%2084.4346%2058.4285C80.2853%2062.5778%2074.8639%2065.591%2072.0553%2066.9952C70.9363%2067.5548%2069.6062%2067.2985%2068.7215%2066.4138Z'%20fill='url(%23paint5_linear_8481_102191)'/%3e%3crect%20x='48.7264'%20y='33.7744'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2048.7264%2033.7744)'%20fill='url(%23paint6_linear_8481_102191)'/%3e%3crect%20x='50.0175'%20y='35.8193'%20width='4.0158'%20height='3.84848'%20rx='1.92424'%20transform='rotate(-12%2050.0175%2035.8193)'%20fill='%23435C71'/%3e%3crect%20x='59.2875'%20y='31.5723'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2059.2875%2031.5723)'%20fill='%23FFFEFE'/%3e%3cpath%20opacity='0.883952'%20d='M111.25%2038.5376C110.415%2034.6055%20106.55%2032.0955%20102.618%2032.9313L102.127%2033.0356C97.9234%2033.9291%2095.2403%2038.0607%2096.1337%2042.2639L97.5426%2048.8925L105.644%2047.1705C109.576%2046.3347%20112.086%2042.4696%20111.25%2038.5376Z'%20fill='url(%23paint7_linear_8481_102191)'/%3e%3crect%20x='60.0181'%20y='33.8037'%20width='3.84848'%20height='3.84848'%20rx='1.90724'%20transform='rotate(-12%2060.0181%2033.8037)'%20fill='%23435C71'/%3e%3cpath%20d='M36.9246%2059.1604C36.4487%2060.717%2034.7371%2061.6271%2033.1805%2061.1512C32.3613%2060.9007%2031.7241%2060.3475%2031.3259%2059.5987L25.2059%2046.7983C24.9784%2046.3703%2025.1286%2045.8788%2025.5566%2045.6513L28.338%2044.1724C28.7659%2043.9449%2029.2574%2044.0951%2029.4849%2044.5231L36.6496%2056.8367C37.0728%2057.5036%2037.15%2058.423%2036.9246%2059.1604Z'%20fill='%23FFDF9F'/%3e%3crect%20x='27.9973'%20y='44.333'%20width='2.39869'%20height='3.59807'%20transform='rotate(152%2027.9973%2044.333)'%20fill='%23FF9090'/%3e%3cpath%20d='M26.6628%2044.3769L26.9472%2044.9118L28.0169%2044.343L26.3106%2041.1338L24.171%2042.2714L25.0243%2043.876C25.6661%2043.5347%2026.3215%2043.7351%2026.6628%2044.3769Z'%20fill='%23FFB19F'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.26386%2027.248C9.3428%2020.4481%2016.5101%2016.6372%2023.31%2018.7161C30.11%2020.7951%2033.9209%2027.9624%2031.8419%2034.7623C29.763%2041.5622%2022.5956%2045.3731%2015.7958%2043.2942C8.99587%2041.2152%205.18493%2034.0479%207.26386%2027.248ZM9.72157%2027.9983C8.06843%2033.4055%2011.1399%2039.1821%2016.5471%2040.8352C21.9543%2042.4884%2027.7309%2039.4168%2029.384%2034.0096C31.0372%2028.6024%2027.9657%2022.8258%2022.5585%2021.1727C17.1513%2019.5196%2011.3747%2022.5911%209.72157%2027.9983Z'%20fill='%23FFE69F'/%3e%3ccircle%20opacity='0.414016'%20cx='19.5529'%20cy='31.0039'%20r='10.2804'%20transform='rotate(17%2019.5529%2031.0039)'%20fill='%23BBDEFC'/%3e%3cpath%20d='M14.3685%2030.6746C15.7299%2027.6867%2018.9391%2025.9803%2022.1776%2026.5225L22.2595%2026.5475C23.7024%2026.8095%2024.3854%2024.8682%2023.1497%2024.2218C22.3806%2023.8074%2021.5613%2023.557%2020.717%2023.3884C17.3715%2022.9031%2014.0553%2024.6664%2012.6939%2027.6543C12.2796%2028.4235%2012.0859%2029.3497%2012.0244%2030.1372C11.8444%2031.6051%2013.8607%2032.0424%2014.4503%2030.6997C14.3434%2030.7566%2014.3685%2030.6746%2014.3685%2030.6746Z'%20fill='%23F6FBFF'/%3e%3cpath%20d='M10.2904%2029.0679C11.9436%2023.6607%2017.7202%2020.5893%2023.1274%2022.2424C25.6671%2023.0189%2027.5785%2024.6783%2028.9301%2026.704C27.7539%2024.1048%2025.508%2022.0744%2022.5586%2021.1727C17.1514%2019.5196%2011.3748%2022.591%209.72165%2027.9982C8.81993%2030.9476%209.32924%2033.97%2010.7444%2036.3735C9.82081%2034.1203%209.51395%2031.6077%2010.2904%2029.0679Z'%20fill='%23ADCBE7'/%3e%3cpath%20opacity='0.406087'%20d='M36.4864%2056.8021L36.1373%2056.2691C36.3845%2056.8563%2036.428%2057.5516%2036.2372%2058.1754C35.9273%2059.189%2034.5593%2059.1971%2034.0713%2058.2806L28.3787%2047.5877C28.0534%2046.9767%2027.3508%2046.7619%2026.7395%2047.0866L25.7206%2047.6277L31.4395%2059.3516C31.7648%2059.9627%2032.27%2060.5434%2032.8706%2060.8123C33.7054%2061.1528%2034.6593%2061.1034%2035.3726%2060.7247C36.0858%2060.3459%2036.6602%2059.5837%2036.8444%2058.7021C37.0351%2058.0783%2036.8117%2057.4132%2036.4864%2056.8021Z'%20fill='white'/%3e%3cpath%20d='M29.8826%2048.4977C29.8006%2048.4726%2029.6368%2048.4225%2029.5799%2048.3155L28.1579%2045.6411C28.0442%2045.4272%2028.1193%2045.1814%2028.3332%2045.0677C28.5472%2044.9539%2028.7929%2045.0291%2028.9067%2045.243L30.3287%2047.9174C30.4424%2048.1313%2030.3673%2048.3771%2030.1534%2048.4908C30.1284%2048.5728%2029.9645%2048.5227%2029.8826%2048.4977Z'%20fill='%23FFF5EB'/%3e%3cellipse%20cx='29.2637'%20cy='54.631'%20rx='1.50593'%20ry='3.17918'%20transform='rotate(-23%2029.2637%2054.631)'%20fill='%23FFC478'/%3e%3cellipse%20cx='34.0592'%20cy='52.4078'%20rx='0.920288'%20ry='1.67325'%20transform='rotate(106%2034.0592%2052.4078)'%20fill='%23FFC478'/%3e%3cpath%20d='M89.1282%2019.2055L68.2257%2026.8725L45.9197%2028.3898L44.4929%2016.4082C44.3371%2013.798%2047.5283%2011.4502%2050.9859%2011.6309L65.1429%2012.369L67.3969%2012.4869C68.5309%2012.5463%2069.7066%2012.3289%2070.7522%2011.8627L78.6899%208.34726C81.725%206.99992%2085.3012%207.87475%2086.2125%2010.1876L89.1282%2019.2055Z'%20fill='url(%23paint8_linear_8481_102191)'/%3e%3cpath%20opacity='0.479771'%20d='M88.6262%2019.0953L68.3101%2026.5288L65.3314%2012.5149L67.5211%2012.6263C68.6228%2012.6824%2069.7652%2012.471%2070.7816%2012.0192L78.4972%208.61266C81.4474%207.30707%2084.9208%208.14856%2085.8036%2010.3829L88.6262%2019.0953Z'%20fill='%23ADCBE7'/%3e%3cpath%20d='M91.6332%2026.6212L46.9517%2036.1186L46.0387%2028.4438L89.2535%2019.2582L91.6332%2026.6212Z'%20fill='%23717DAD'/%3e%3cpath%20d='M102.961%2024.2033C103.125%2024.9722%20102.371%2025.7829%20101.278%2026.015L37.9675%2039.4722C36.8754%2039.7043%2035.8568%2039.2704%2035.6933%2038.5015C35.5301%2037.7336%2036.284%2036.922%2037.3761%2036.6898L100.687%2023.2327C101.779%2023.0005%20102.798%2023.4354%20102.961%2024.2033Z'%20fill='%239ED1FF'/%3e%3cpath%20d='M102.703%2024.1718C102.838%2024.805%20102.067%2025.5045%20100.983%2025.7349L69.5583%2032.4144L69.0712%2030.123L100.496%2023.4436C101.58%2023.2131%20102.569%2023.5394%20102.703%2024.1718Z'%20fill='%2378AFE1'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8481_102191'%20x1='32.2665'%20y1='59.6553'%20x2='59.0518'%20y2='60.5906'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8481_102191'%20x1='67.3434'%20y1='85.966'%20x2='103.216'%20y2='78.3411'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8481_102191'%20x1='51.4347'%20y1='74.8197'%20x2='91.1539'%20y2='74.8197'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8481_102191'%20x1='55.1887'%20y1='89.2031'%20x2='94.9078'%20y2='89.2031'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_8481_102191'%20x1='94.5023'%20y1='53.1799'%20x2='106.762'%20y2='58.7056'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_8481_102191'%20x1='74.9906'%20y1='66.9871'%20x2='94.9778'%20y2='46.9999'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint6_linear_8481_102191'%20x1='50.5805'%20y1='44.0581'%20x2='59.9372'%20y2='44.0581'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23E3EEF3'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint7_linear_8481_102191'%20x1='88.4187'%20y1='43.3906'%20x2='99.3981'%20y2='25.1833'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint8_linear_8481_102191'%20x1='56.4985'%20y1='29.5482'%20x2='100.532'%20y2='20.1885'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ECF7FF'/%3e%3cstop%20offset='1'%20stop-color='%23C2E0FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",oI=()=>d.jsxs(u.Box,{justifyItems:"center",marginTop:"40px",children:[d.jsx("img",{src:rI,width:124,height:107}),d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:Aw})]}),sI=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(We),[i,c]=I.useState(null),l=st(_w,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(v,b)=>{s(j3,{search_keyword:t.label,search_result_label:b,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:v,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},g=()=>{c(null),o(Bx())},y=()=>{n(),r(),g()};return e.length?i?d.jsx(nI,{meta:i,onBack:g,onLink:y}):d.jsxs(u.Stack,{gap:"14px",marginTop:"12px",children:[d.jsx(u.Typography,{variant:"body2",children:l}),d.jsx(u.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:v,name:b,description:p})=>d.jsxs(Lp,{onClick:()=>f(v,b),direction:"row",children:[d.jsxs(u.Stack,{flexGrow:1,children:[d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray1,children:b}),d.jsx(u.Typography,{variant:"caption",color:u.theme.palette.gray.gray3,children:p})]}),d.jsx(u.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:d.jsx("img",{src:$w})})]},v))})]}):d.jsx(oI,{})},nl=u.styled(u.Skeleton)`
1448
+ `,dI="data:image/svg+xml,%3csvg%20width='124'%20height='107'%20viewBox='0%200%20124%20107'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M28.6168%2054.7446C28.6931%2052.5589%2031.0146%2051.1102%2033.0842%2051.8174C35.9985%2052.8133%2040.0375%2053.9024%2044.0621%2054.043C48.0034%2054.1806%2051.968%2053.4097%2054.8762%2052.6339C57.0264%2052.0602%2059.2927%2053.6932%2059.215%2055.9172C59.1742%2057.0856%2058.4742%2058.1269%2057.3723%2058.5178C54.8051%2059.4284%2049.7633%2060.8927%2044.3075%2060.7022C38.7694%2060.5088%2033.1999%2058.6241%2030.4004%2057.5311C29.2637%2057.0873%2028.5742%2055.9641%2028.6168%2054.7446Z'%20fill='url(%23paint0_linear_8481_102191)'/%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='url(%23paint1_linear_8481_102191)'/%3e%3cmask%20id='mask0_8481_102191'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='46'%20y='14'%20width='60'%20height='79'%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_8481_102191)'%3e%3cellipse%20cx='63.7775'%20cy='46.8684'%20rx='1.48152'%20ry='1.39438'%20transform='rotate(-12%2063.7775%2046.8684)'%20fill='%23435C71'/%3e%3crect%20x='47.4368'%20y='59.3203'%20width='53.657'%20height='13.2235'%20transform='rotate(-12%2047.4368%2059.3203)'%20fill='url(%23paint2_linear_8481_102191)'/%3e%3crect%20x='51.1907'%20y='76.9824'%20width='53.657'%20height='10.4263'%20transform='rotate(-12%2051.1907%2076.9824)'%20fill='url(%23paint3_linear_8481_102191)'/%3e%3c/g%3e%3cpath%20opacity='0.883952'%20d='M113.939%2051.0679C114.775%2055%20112.265%2058.865%20108.333%2059.7008L107.842%2059.8052C103.639%2060.6986%2099.5073%2058.0155%2098.6139%2053.8123L97.205%2047.1837L105.307%2045.4616C109.239%2044.6259%20113.104%2047.1359%20113.939%2051.0679Z'%20fill='url(%23paint4_linear_8481_102191)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M68.7215%2066.4138C67.1801%2064.8725%2067.6745%2062.2062%2069.587%2061.1603C72.4457%2059.5969%2076.2861%2057.1773%2079.3785%2054.0849C82.4099%2051.0535%2084.752%2047.3461%2086.2775%2044.5465C87.3388%2042.5989%2090.0598%2042.0819%2091.6282%2043.6503C92.4782%2044.5003%2092.758%2045.7623%2092.2604%2046.8566C91.0829%2049.4466%2088.5191%2054.344%2084.4346%2058.4285C80.2853%2062.5778%2074.8639%2065.591%2072.0553%2066.9952C70.9363%2067.5548%2069.6062%2067.2985%2068.7215%2066.4138Z'%20fill='url(%23paint5_linear_8481_102191)'/%3e%3crect%20x='48.7264'%20y='33.7744'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2048.7264%2033.7744)'%20fill='url(%23paint6_linear_8481_102191)'/%3e%3crect%20x='50.0175'%20y='35.8193'%20width='4.0158'%20height='3.84848'%20rx='1.92424'%20transform='rotate(-12%2050.0175%2035.8193)'%20fill='%23435C71'/%3e%3crect%20x='59.2875'%20y='31.5723'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2059.2875%2031.5723)'%20fill='%23FFFEFE'/%3e%3cpath%20opacity='0.883952'%20d='M111.25%2038.5376C110.415%2034.6055%20106.55%2032.0955%20102.618%2032.9313L102.127%2033.0356C97.9234%2033.9291%2095.2403%2038.0607%2096.1337%2042.2639L97.5426%2048.8925L105.644%2047.1705C109.576%2046.3347%20112.086%2042.4696%20111.25%2038.5376Z'%20fill='url(%23paint7_linear_8481_102191)'/%3e%3crect%20x='60.0181'%20y='33.8037'%20width='3.84848'%20height='3.84848'%20rx='1.90724'%20transform='rotate(-12%2060.0181%2033.8037)'%20fill='%23435C71'/%3e%3cpath%20d='M36.9246%2059.1604C36.4487%2060.717%2034.7371%2061.6271%2033.1805%2061.1512C32.3613%2060.9007%2031.7241%2060.3475%2031.3259%2059.5987L25.2059%2046.7983C24.9784%2046.3703%2025.1286%2045.8788%2025.5566%2045.6513L28.338%2044.1724C28.7659%2043.9449%2029.2574%2044.0951%2029.4849%2044.5231L36.6496%2056.8367C37.0728%2057.5036%2037.15%2058.423%2036.9246%2059.1604Z'%20fill='%23FFDF9F'/%3e%3crect%20x='27.9973'%20y='44.333'%20width='2.39869'%20height='3.59807'%20transform='rotate(152%2027.9973%2044.333)'%20fill='%23FF9090'/%3e%3cpath%20d='M26.6628%2044.3769L26.9472%2044.9118L28.0169%2044.343L26.3106%2041.1338L24.171%2042.2714L25.0243%2043.876C25.6661%2043.5347%2026.3215%2043.7351%2026.6628%2044.3769Z'%20fill='%23FFB19F'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.26386%2027.248C9.3428%2020.4481%2016.5101%2016.6372%2023.31%2018.7161C30.11%2020.7951%2033.9209%2027.9624%2031.8419%2034.7623C29.763%2041.5622%2022.5956%2045.3731%2015.7958%2043.2942C8.99587%2041.2152%205.18493%2034.0479%207.26386%2027.248ZM9.72157%2027.9983C8.06843%2033.4055%2011.1399%2039.1821%2016.5471%2040.8352C21.9543%2042.4884%2027.7309%2039.4168%2029.384%2034.0096C31.0372%2028.6024%2027.9657%2022.8258%2022.5585%2021.1727C17.1513%2019.5196%2011.3747%2022.5911%209.72157%2027.9983Z'%20fill='%23FFE69F'/%3e%3ccircle%20opacity='0.414016'%20cx='19.5529'%20cy='31.0039'%20r='10.2804'%20transform='rotate(17%2019.5529%2031.0039)'%20fill='%23BBDEFC'/%3e%3cpath%20d='M14.3685%2030.6746C15.7299%2027.6867%2018.9391%2025.9803%2022.1776%2026.5225L22.2595%2026.5475C23.7024%2026.8095%2024.3854%2024.8682%2023.1497%2024.2218C22.3806%2023.8074%2021.5613%2023.557%2020.717%2023.3884C17.3715%2022.9031%2014.0553%2024.6664%2012.6939%2027.6543C12.2796%2028.4235%2012.0859%2029.3497%2012.0244%2030.1372C11.8444%2031.6051%2013.8607%2032.0424%2014.4503%2030.6997C14.3434%2030.7566%2014.3685%2030.6746%2014.3685%2030.6746Z'%20fill='%23F6FBFF'/%3e%3cpath%20d='M10.2904%2029.0679C11.9436%2023.6607%2017.7202%2020.5893%2023.1274%2022.2424C25.6671%2023.0189%2027.5785%2024.6783%2028.9301%2026.704C27.7539%2024.1048%2025.508%2022.0744%2022.5586%2021.1727C17.1514%2019.5196%2011.3748%2022.591%209.72165%2027.9982C8.81993%2030.9476%209.32924%2033.97%2010.7444%2036.3735C9.82081%2034.1203%209.51395%2031.6077%2010.2904%2029.0679Z'%20fill='%23ADCBE7'/%3e%3cpath%20opacity='0.406087'%20d='M36.4864%2056.8021L36.1373%2056.2691C36.3845%2056.8563%2036.428%2057.5516%2036.2372%2058.1754C35.9273%2059.189%2034.5593%2059.1971%2034.0713%2058.2806L28.3787%2047.5877C28.0534%2046.9767%2027.3508%2046.7619%2026.7395%2047.0866L25.7206%2047.6277L31.4395%2059.3516C31.7648%2059.9627%2032.27%2060.5434%2032.8706%2060.8123C33.7054%2061.1528%2034.6593%2061.1034%2035.3726%2060.7247C36.0858%2060.3459%2036.6602%2059.5837%2036.8444%2058.7021C37.0351%2058.0783%2036.8117%2057.4132%2036.4864%2056.8021Z'%20fill='white'/%3e%3cpath%20d='M29.8826%2048.4977C29.8006%2048.4726%2029.6368%2048.4225%2029.5799%2048.3155L28.1579%2045.6411C28.0442%2045.4272%2028.1193%2045.1814%2028.3332%2045.0677C28.5472%2044.9539%2028.7929%2045.0291%2028.9067%2045.243L30.3287%2047.9174C30.4424%2048.1313%2030.3673%2048.3771%2030.1534%2048.4908C30.1284%2048.5728%2029.9645%2048.5227%2029.8826%2048.4977Z'%20fill='%23FFF5EB'/%3e%3cellipse%20cx='29.2637'%20cy='54.631'%20rx='1.50593'%20ry='3.17918'%20transform='rotate(-23%2029.2637%2054.631)'%20fill='%23FFC478'/%3e%3cellipse%20cx='34.0592'%20cy='52.4078'%20rx='0.920288'%20ry='1.67325'%20transform='rotate(106%2034.0592%2052.4078)'%20fill='%23FFC478'/%3e%3cpath%20d='M89.1282%2019.2055L68.2257%2026.8725L45.9197%2028.3898L44.4929%2016.4082C44.3371%2013.798%2047.5283%2011.4502%2050.9859%2011.6309L65.1429%2012.369L67.3969%2012.4869C68.5309%2012.5463%2069.7066%2012.3289%2070.7522%2011.8627L78.6899%208.34726C81.725%206.99992%2085.3012%207.87475%2086.2125%2010.1876L89.1282%2019.2055Z'%20fill='url(%23paint8_linear_8481_102191)'/%3e%3cpath%20opacity='0.479771'%20d='M88.6262%2019.0953L68.3101%2026.5288L65.3314%2012.5149L67.5211%2012.6263C68.6228%2012.6824%2069.7652%2012.471%2070.7816%2012.0192L78.4972%208.61266C81.4474%207.30707%2084.9208%208.14856%2085.8036%2010.3829L88.6262%2019.0953Z'%20fill='%23ADCBE7'/%3e%3cpath%20d='M91.6332%2026.6212L46.9517%2036.1186L46.0387%2028.4438L89.2535%2019.2582L91.6332%2026.6212Z'%20fill='%23717DAD'/%3e%3cpath%20d='M102.961%2024.2033C103.125%2024.9722%20102.371%2025.7829%20101.278%2026.015L37.9675%2039.4722C36.8754%2039.7043%2035.8568%2039.2704%2035.6933%2038.5015C35.5301%2037.7336%2036.284%2036.922%2037.3761%2036.6898L100.687%2023.2327C101.779%2023.0005%20102.798%2023.4354%20102.961%2024.2033Z'%20fill='%239ED1FF'/%3e%3cpath%20d='M102.703%2024.1718C102.838%2024.805%20102.067%2025.5045%20100.983%2025.7349L69.5583%2032.4144L69.0712%2030.123L100.496%2023.4436C101.58%2023.2131%20102.569%2023.5394%20102.703%2024.1718Z'%20fill='%2378AFE1'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8481_102191'%20x1='32.2665'%20y1='59.6553'%20x2='59.0518'%20y2='60.5906'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8481_102191'%20x1='67.3434'%20y1='85.966'%20x2='103.216'%20y2='78.3411'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8481_102191'%20x1='51.4347'%20y1='74.8197'%20x2='91.1539'%20y2='74.8197'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8481_102191'%20x1='55.1887'%20y1='89.2031'%20x2='94.9078'%20y2='89.2031'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_8481_102191'%20x1='94.5023'%20y1='53.1799'%20x2='106.762'%20y2='58.7056'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_8481_102191'%20x1='74.9906'%20y1='66.9871'%20x2='94.9778'%20y2='46.9999'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint6_linear_8481_102191'%20x1='50.5805'%20y1='44.0581'%20x2='59.9372'%20y2='44.0581'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23E3EEF3'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint7_linear_8481_102191'%20x1='88.4187'%20y1='43.3906'%20x2='99.3981'%20y2='25.1833'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint8_linear_8481_102191'%20x1='56.4985'%20y1='29.5482'%20x2='100.532'%20y2='20.1885'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ECF7FF'/%3e%3cstop%20offset='1'%20stop-color='%23C2E0FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",fI=()=>d.jsxs(u.Box,{justifyItems:"center",marginTop:"40px",children:[d.jsx("img",{src:dI,width:124,height:107}),d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:Rw})]}),pI=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),[i,c]=I.useState(null),l=rt(Dw,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(v,b)=>{s(j3,{search_keyword:t.label,search_result_label:b,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:v,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},g=()=>{c(null),o(Yx())},y=()=>{n(),r(),g()};return e.length?i?d.jsx(uI,{meta:i,onBack:g,onLink:y}):d.jsxs(u.Stack,{gap:"14px",marginTop:"12px",children:[d.jsx(u.Typography,{variant:"body2",children:l}),d.jsx(u.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:v,name:b,description:p})=>d.jsxs(Lp,{onClick:()=>f(v,b),direction:"row",children:[d.jsxs(u.Stack,{flexGrow:1,children:[d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray1,children:b}),d.jsx(u.Typography,{variant:"caption",color:u.theme.palette.gray.gray3,children:p})]}),d.jsx(u.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:d.jsx("img",{src:sI})})]},v))})]}):d.jsx(fI,{})},nl=u.styled(u.Skeleton)`
1419
1449
  display: block;
1420
1450
  margin: ${e=>e.margin?e.margin:0};
1421
- `,aI=()=>d.jsxs(u.Stack,{marginTop:"12px",children:[d.jsx(nl,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),d.jsx(u.Stack,{gap:"17px",children:d.jsxs(Lp,{gap:"8px",disableHover:!0,children:[d.jsx(nl,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),d.jsx(nl,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let rl={};const ol=new Set,iI=(e,t)=>{rl={...rl,[e]:t},ol.forEach(n=>n())},cI=e=>(ol.add(e),()=>ol.delete(e)),lI=e=>I.useSyncExternalStore(cI,()=>rl)[e],uI=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await Ee({url:Xw.replace(":formId",e.toString()),method:Pe.POST,data:{search_string:t,args:n}});let o=null;return r!=null&&r.data&&"data"in r.data&&(o=r.data.data),o}catch(r){Se({message:xn,type:Qe}),console.error(r)}},dI=(e,t)=>Vt({mutationFn:uI,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),sl={OPEN_FORM_VIEW:"connector-agent-open-form-view"},fI=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=I.useRef(!1),o=I.useRef(void 0),s=I.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=I.useCallback((c,l="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(l),r.current=!0},n)))},[s,n]),i=I.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return I.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},pI=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.86993 0.652446C7.56922 0.248711 8.43078 0.248711 9.13007 0.652446L13.7981 3.34755C14.4974 3.75129 14.9282 4.49742 14.9282 5.30489V10.6951C14.9282 11.5026 14.4974 12.2487 13.7981 12.6524L9.13007 15.3476C8.43078 15.7513 7.56922 15.7513 6.86993 15.3476L2.20187 12.6524C1.50258 12.2487 1.0718 11.5026 1.0718 10.6951V5.30489C1.0718 4.49742 1.50258 3.75129 2.20187 3.34755L6.86993 0.652446Z",fill:"#FFD122"}),T.createElement("g",{filter:"url(#filter0_d_360_39563)"},T.createElement("path",{d:"M5.83154 4.43359V4.43359C6.84296 4.43359 7.66287 5.25351 7.66287 6.26492V11.5179V11.5179C6.65146 11.5179 5.83154 10.698 5.83154 9.68661V4.43359Z",fill:"white"})),T.createElement("g",{filter:"url(#filter1_d_360_39563)"},T.createElement("path",{d:"M8.57812 7.66211V7.66211C9.58954 7.66211 10.4095 8.48202 10.4095 9.49343V11.7103V11.7103C9.39804 11.7103 8.57812 10.8904 8.57812 9.87898V7.66211Z",fill:"white"})),T.createElement("defs",null,T.createElement("filter",{id:"filter0_d_360_39563",x:4.76488,y:3.36693,width:3.96488,height:9.21732,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})),T.createElement("filter",{id:"filter1_d_360_39563",x:7.51146,y:6.59544,width:3.96488,height:6.18216,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})))),hI="/v1/api/connectors/lookup/bulk",gI="/v1/api/connectors/lookup/bulk",mI=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${hI}?${t.toString()}`,r=await Ee({url:n,method:Pe.GET});return r==null?void 0:r.data},bI=async e=>{const t=await Ee({url:gI,method:Pe.PUT,data:{entries:e}});return t==null?void 0:t.data},yI={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},CI={border:`1px solid ${u.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},Op={flex:1,height:"1px",backgroundColor:u.theme.palette.gray.gray6},xI={flexShrink:0,border:`1px solid ${u.theme.palette.gray.gray6}`,borderRadius:"15px"},vI={border:`1px solid ${u.theme.palette.gray.gray6}`,backgroundColor:u.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},EI=I.memo(function({connector:t,selectedHiverParam:n,onChange:r,sendTrackingEvent:o}){var i;const s=((i=(t.presets??[]).find(c=>c.hiverParam===n))==null?void 0:i.objectParamLabel)??"",a=I.useCallback(c=>{o(Y3,{hiver_param:c.target.value,connector_name:t.connectorName,page:"agent_connector_panel"}),r(t.connectorId,c.target.value)},[t.connectorId,t.connectorName,r,o]);return d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[d.jsx(u.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:yI,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(g=>g.hiverParam===c))==null?void 0:f.label)??"";return d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[d.jsx(pI,{width:18,height:18}),d.jsx("span",{children:l})]})},children:(t.presets??[]).map(c=>d.jsx(u.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),d.jsx(u.Box,{sx:Op}),d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:xI,children:[t.logo&&d.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),d.jsxs(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),d.jsx(u.Box,{sx:Op}),d.jsx(u.Box,{sx:vI,children:d.jsx(u.Typography,{variant:"body2",fontSize:14,children:s})})]})}),wI=I.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=I.useContext(We),[a,i]=I.useState({});I.useEffect(()=>{if(t&&r.length>0){const b={};r.filter(p=>{var h;return((h=p.presets)==null?void 0:h.length)>1}).forEach(p=>{b[p.connectorId]=p.hiverParam}),i(b)}},[t,r]);const c=jr(),{mutate:l,isPending:f}=Vt({mutationFn:bI,onSuccess:b=>{const p={};b.results.forEach(({connectorId:h,hiverParam:m})=>{p[h]=m}),c.setQueriesData({queryKey:["lookup","bulk"]},h=>h&&{...h,connectors:h.connectors.map(m=>p[m.connectorId]!==void 0?{...m,hiverParam:p[m.connectorId]}:m)}),s(J3,{page:"agent_connector_panel"}),Se({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{Se({message:"Failed to save identity mapping",type:"error"})}}),g=I.useCallback(()=>{const b=Object.entries(a).map(([p,h])=>({connector_id:p,hiver_param:h}));l(b)},[a,l]),y=I.useCallback((b,p)=>{i(h=>({...h,[b]:p}))},[]),v=I.useCallback(b=>{b||n()},[n]);return d.jsx(vr,{shown:t,setShown:v,showCloseButton:!1,children:d.jsxs(u.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[d.jsx(u.Typography,{variant:"h2",children:"Customer identity mapping"}),d.jsx(u.Typography,{variant:"body2",children:"Choose how Hiver should identify customers when fetching data from connected apps."}),r.some(b=>{var p;return((p=b.presets)==null?void 0:p.length)>1})&&d.jsx(u.Stack,{gap:"8px",sx:CI,children:r.filter(b=>{var p;return((p=b.presets)==null?void 0:p.length)>1}).map(b=>d.jsx(EI,{connector:b,selectedHiverParam:a[b.connectorId]??b.hiverParam,onChange:y,sendTrackingEvent:s},b.connectorId))}),d.jsxs(u.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[d.jsx(u.Button,{variant:"text",onClick:n,children:"Cancel"}),d.jsx(u.Button,{variant:"contained",onClick:g,disabled:f,children:"Save"})]})]})})}),II=({enabled:e,...t})=>{const{actionQueue:n}=I.useContext(We);n&&e&&n.register(t),I.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},_I=({isAdmin:e=!1})=>{var Re,ye;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s}=I.useContext(We),a=zt(),{userGroupId:i,userId:c}=Xt()||{},l=I.useRef(!1),f=I.useRef(null),g=I.useRef(null),y=I.useRef(null),[v,b]=I.useState({}),[p,h]=I.useState(!1),[m,C]=I.useState(!1),[x,w]=I.useState(!1),[E,_]=I.useState(!1),[A,S]=I.useState(),[L,k]=I.useState(!1),[R,N]=I.useState(null),[M,V]=I.useState(),[Z,J]=I.useState(null),[$,X]=I.useState(!1),[z,se]=I.useState(!1),[de,D]=I.useState(!1),[H,G]=I.useState(!1),j=Ce(vv),q=Ce(Ev),ne=Ce(Iv),re=Ce(_v),B=Ce(Av),U=Ce(wv),fe=Ce($1),Y=Ce(Vv),Ze=Ce(U1),_e=Ce(K1),et=Ce(ep),kt=Ce(WE),Jn=tt(o,Q3),Dt=tt(o,yd),rt=tt(o,n4),Je=tt(o,o4),Sn=tt(o,s4),vt=tt(o,a4),cs=(Re=Xt())==null?void 0:Re.tenantPlatform,An=tt(o,cs==="HIVERWEB"?`hot-${Cd}`:Cd),{data:qn}=mn({queryKey:["connectors","enabledAuthenticated"],queryFn:Jy,enabled:An&&e}),Qn=I.useMemo(()=>(qn??[]).map(K=>K.id),[qn]),{data:Et,isSuccess:Ut}=mn({queryKey:["lookup","bulk",Qn.join(",")],queryFn:()=>mI(Qn),enabled:Qn.length>0&&An&&e,refetchOnMount:!1}),$n=Ut&&((Et==null?void 0:Et.connectors)??[]).some(K=>{var me;return(((me=K.presets)==null?void 0:me.length)??0)>1});II({conversationId:s,openCreateForm:()=>w(!0),enabled:q});const Tn=I.useMemo(()=>!j||!j.length?null:Fv(j,ne,re),[j,ne,re]),Kt=I4(ne),{data:hn,isLoading:Un}=Ap({senderEmail:t,conversationId:String(s),enabled:Je&&!!t}),{emailHeaders:ls,selectedEmail:Fr}=hn??{},{scrollOnceAfterLoad:Co,resetScrollState:xo}=fI(g),vo=U!==te.LOADING&&(!re||!Object.values(re).some(K=>K===te.LOADING))&&j&&j.length>0;I.useLayoutEffect(()=>{var K;$&&!p&&z&&((K=y==null?void 0:y.current)!=null&&K.scrollHeight)&&Co(!!vo,"smooth")},[$,p,z,vo,Co,(ye=y==null?void 0:y.current)==null?void 0:ye.scrollHeight,c]);const kr=(K,me)=>{r(R3,{search_keyword:K,sm_ids:n,connector_name:me,suggestion_type:kt})},Eo=(K,me,we)=>{!Array.isArray(me)||!me.length?r(M3,{search_keyword:K,sm_ids:n,connector_name:we,suggestion_type:kt}):me.length&&r(P3,{num_of_results:me.length,search_keyword:K,sm_ids:n,connector_name:we,suggestion_type:kt})},{mutate:gn,reset:Kn,data:er,isPending:Dr,isIdle:wo}=dI(kr,Eo),ie=I.useCallback(()=>{Kn(),N(null)},[Kn,N]),ve=jr(),je=I.useCallback(()=>{t&&n.length&&s&&a(ja({inboxIds:n,conversationId:s}))},[a,t,n,s]),ot=I.useCallback(()=>{ve.invalidateQueries({queryKey:["lookup","bulk"]}),je()},[ve,je]),Ue=I.useCallback((K,me)=>{K&&s&&me&&a(Pa({id:K,channelType:"email",conversationId:s,externalResourceId:me,contactEmail:t})).unwrap().catch(()=>{a(ro(null))})},[a,s,t]);if(I.useEffect(()=>{(async()=>{c&&(X(await Ci(c)),se(await pu(c)))})()},[c]),I.useEffect(()=>{Un||V(Fr||t)},[t,Fr,Un]),I.useEffect(()=>{M&&s&&iI(String(s),M)},[M,s]),I.useEffect(()=>{z&&c&&hu(c)},[z,c]),I.useEffect(()=>{var K;if(_e){C(!0);const{externalResourceId:me}=_e,we=(K=_e.forms.find(Be=>Be.type==="edit"))==null?void 0:K.id;Ue(we,me)}else C(!1),a(mv())},[_e,Ue,a]),I.useEffect(()=>(je(),xo(),()=>{a(q1.clearConnectorList())}),[a,je,xo]),I.useEffect(()=>{if(B&&j&&j.length&&Tn&&!l.current){const{cards_per_app:K,total_empty_cards:me,total_cards_with_errors:we}=Tn;r(l3,{numOfCards:j.length,total_cards_loaded:j.length,total_empty_cards:me,total_cards_with_errors:we,cards_per_app:K,sm_ids:n}),l.current=!0}return()=>{l.current=!1}},[B,j,Tn,r,n]),I.useEffect(()=>{s&&n&&n.length&&a(ka({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:vt}))},[a,n,s,vt]),I.useEffect(()=>{const K=me=>{var Be;if(!(me instanceof CustomEvent))return;const we=(Be=me.detail)==null?void 0:Be.connectorKey;b({connectorKey:we})};return window.addEventListener(sl.OPEN_FORM_VIEW,K),()=>{window.removeEventListener(sl.OPEN_FORM_VIEW,K)}},[]),I.useEffect(()=>{if(!(fe!=null&&fe.length)||!v.connectorKey)return;const K=v.connectorKey;b({});const me=fe.find(we=>{var Be;return((Be=we.connectorKey)==null?void 0:Be.toLowerCase())===(K==null?void 0:K.toLowerCase())});me&&(J(me),w(!0))},[fe,v]),!t.length||U===te.LOADING)return d.jsx(TE,{});const Mt=K=>{r(h3,{connector_name:Y,source:K,sm_ids:n})},Pt=K=>{w(!0),Mt(K)},Ln=()=>{_(!0),r(g3)},en=K=>{r(K,A),et?k(!0):(w(!1),J(null))},Io=K=>{if(_e){const{connectorName:me,title:we}=_e;r(K,{connector_name:me,card_title:we,sm_ids:n,ug_id:i})}et?k(!0):a(ro(null))},us=()=>{w(!1),a(ro(null)),S(void 0),k(!1)},Nr=()=>{je(),a(q1.clearConnectorList())},O=[{label:"Go back",variant:"text",action:us},{label:"Stay",variant:"contained",action:()=>k(!1)}],W=fe.length>0,Q=Ze.length>0,pe=x||m||E,Ae=()=>W||Q?d.jsx(bw,{haveCreateObjects:W,haveLinkObjects:Q,onCreateClick:()=>Pt(Fd.MAIN_BUTTON),onLinkClick:()=>_(!0)}):d.jsx(rp,{isAdmin:e,hideHeading:!0});return d.jsxs(Gd,{ref:f,"data-testid":Array.isArray(j)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:x||E,children:[d.jsx(gp,{shown:L,setShown:k,title:iv,description:cv,buttons:O}),d.jsx(r5,{onWheel:()=>h(!0),ref:y,children:q?d.jsxs(d.Fragment,{children:[d.jsx(R5,{connectors:Kt,isWriteFlowEnabled:Dt,haveCreateObjects:W,haveLinkObjects:Q,cards:j,handleCreateNewObject:()=>Pt(Fd.ICON),handleLinkNewObject:Ln}),rt&&!pe?d.jsx(Qw,{selectedObject:R,setSelectedObject:N,fetchSearchResults:gn,onReset:ie,root:f.current}):null,d.jsxs(oo,{children:[d.jsx(En,{condition:rt&&Dr,children:d.jsx(aI,{})},"search"),d.jsx(En,{condition:rt&&!!R&&!wo,children:d.jsx(sI,{searchResults:er??[],selectedObject:R,onReset:ie,fetchCards:je})},"results"),d.jsx(En,{condition:x,children:d.jsx(Kc,{onClose:()=>en(v3),rightNode:d.jsx(u.Typography,{variant:"body2",color:"primary.main",fontSize:14,fontWeight:500,lineHeight:"20px",onClick:()=>D(!0),style:{cursor:"pointer"},children:gv}),children:d.jsx(bp,{onClose:()=>en(x3),onCreateSuccess:Nr,metaData:A,setMetaData:S,defaultOption:Z,connectors:Kt,mapFormOpen:de,setMapFormOpen:D})})},"create-form"),d.jsx(En,{condition:m,children:d.jsx(Kc,{onClose:()=>Io(T3),title:g4,backButtonTooltip:"Back",children:d.jsx(bp,{isEdit:!0,onClose:()=>Io(A3),onCreateSuccess:Nr,metaData:A,setMetaData:S,connectors:Kt})})},"edit-form"),d.jsx(En,{condition:E,children:d.jsx(Kc,{onClose:()=>_(!1),children:d.jsx(fw,{setOpenTaskLinking:_,onLinkingSuccess:je})})},"link-form"),d.jsxs(En,{fallback:!0,children:[Je&&(j!=null&&j.length)?d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[d.jsx(u.Stack,{sx:{flex:1,minWidth:0},children:d.jsx(jE,{emailHeaders:ls,selectedEmail:M,root:f.current,isLoading:Un,setSelectedEmail:V})}),An&&$n&&e&&d.jsx(u.Tooltip,{title:"Update customer identity mapping",placement:"top",children:d.jsx(u.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(bd,{page:"agent_connector_panel"}),G(!0)},children:d.jsx(u.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!Je&&An&&$n&&e&&(j!=null&&j.length)?d.jsx(u.Button,{fullWidth:!0,variant:"contained",startIcon:d.jsx(u.icons.SettingsOutlined,{sx:{height:"14px",width:"14px"}}),sx:{backgroundColor:"#edf1f6",color:"#4d596c",borderRadius:"6px",padding:"9px 12px",marginTop:"12px",textTransform:"none",fontWeight:500,fontSize:"14px",lineHeight:"20px",boxShadow:"none","&:hover":{backgroundColor:"#e2e8f0",boxShadow:"none"}},onClick:()=>{r(bd,{page:"agent_connector_panel"}),G(!0)},children:"Customer identity mapping"}):null,Jn?d.jsx(LE,{}):null,d.jsxs(oo,{children:[d.jsxs(En,{condition:!!j&&j.length>0,children:[d.jsx(rE,{cards:j,specificCardData:ne,email:M??"",specificConnectorApiStatus:re,onCardUnlinking:je}),d.jsx("div",{ref:g,children:Sn?d.jsx(M4,{connectors:Kt,expanded:$}):null})]},"cards-list"),d.jsx(En,{condition:!(j!=null&&j.length)&&Dt,children:Ae()},"create-banner")]})]},"cards")]})]}):d.jsx(rp,{isAdmin:e})}),!q&&d.jsx(J4,{}),An&&d.jsx(wI,{open:H,onClose:()=>G(!1),connectors:(Et==null?void 0:Et.connectors)??[],onSaveSuccess:ot})]})},SI=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:g=!1,actionQueue:y})=>{const v=I.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:l,stackingContext:f,actionQueue:y}),[s,n,r,t,o,a,i,c,g,l,f,y]);return d.jsx(We.Provider,{value:v,children:e})},al=({children:e})=>{const[t]=I.useState(()=>new j2);return d.jsx(W2,{client:t,children:e})},AI=r0({cardList:Pv,write:bv,common:Gx}),il=ty({reducer:AI,devTools:!0}),TI=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c})=>d.jsx(rc,{store:il,children:d.jsx(u.HiverProvider,{custom:!0,children:d.jsx(al,{children:d.jsx(SI,{userEmail:t,availableFeatures:s,sendTrackingEvent:n==null?void 0:n.sendTrackingEvent,contactEmail:r,currentSmIds:n==null?void 0:n.currentSmIds,metaData:n==null?void 0:n.metaData,conversationId:n==null?void 0:n.conversationId,baseUrls:o,connectorFunctions:a,stackingContext:i,actionQueue:c,isAdmin:n==null?void 0:n.isAdmin,children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:e})})})})}),cl=u.styled(u.Box)`
1451
+ `,hI=()=>d.jsxs(u.Stack,{marginTop:"12px",children:[d.jsx(nl,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),d.jsx(u.Stack,{gap:"17px",children:d.jsxs(Lp,{gap:"8px",disableHover:!0,children:[d.jsx(nl,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),d.jsx(nl,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let rl={};const ol=new Set,gI=(e,t)=>{rl={...rl,[e]:t},ol.forEach(n=>n())},mI=e=>(ol.add(e),()=>ol.delete(e)),bI=e=>I.useSyncExternalStore(mI,()=>rl)[e],yI=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await Ee({url:Kw.replace(":formId",e.toString()),method:Pe.POST,data:{search_string:t,args:n}});let o=null;return r!=null&&r.data&&"data"in r.data&&(o=r.data.data),o}catch(r){_e({message:xn,type:Ue}),console.error(r)}},CI=(e,t)=>Vt({mutationFn:yI,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),sl={OPEN_FORM_VIEW:"connector-agent-open-form-view"},xI=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=I.useRef(!1),o=I.useRef(void 0),s=I.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=I.useCallback((c,l="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(l),r.current=!0},n)))},[s,n]),i=I.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return I.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},vI=e=>A.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.86993 0.652446C7.56922 0.248711 8.43078 0.248711 9.13007 0.652446L13.7981 3.34755C14.4974 3.75129 14.9282 4.49742 14.9282 5.30489V10.6951C14.9282 11.5026 14.4974 12.2487 13.7981 12.6524L9.13007 15.3476C8.43078 15.7513 7.56922 15.7513 6.86993 15.3476L2.20187 12.6524C1.50258 12.2487 1.0718 11.5026 1.0718 10.6951V5.30489C1.0718 4.49742 1.50258 3.75129 2.20187 3.34755L6.86993 0.652446Z",fill:"#FFD122"}),A.createElement("g",{filter:"url(#filter0_d_360_39563)"},A.createElement("path",{d:"M5.83154 4.43359V4.43359C6.84296 4.43359 7.66287 5.25351 7.66287 6.26492V11.5179V11.5179C6.65146 11.5179 5.83154 10.698 5.83154 9.68661V4.43359Z",fill:"white"})),A.createElement("g",{filter:"url(#filter1_d_360_39563)"},A.createElement("path",{d:"M8.57812 7.66211V7.66211C9.58954 7.66211 10.4095 8.48202 10.4095 9.49343V11.7103V11.7103C9.39804 11.7103 8.57812 10.8904 8.57812 9.87898V7.66211Z",fill:"white"})),A.createElement("defs",null,A.createElement("filter",{id:"filter0_d_360_39563",x:4.76488,y:3.36693,width:3.96488,height:9.21732,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",null),A.createElement("feGaussianBlur",{stdDeviation:.533333}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),A.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})),A.createElement("filter",{id:"filter1_d_360_39563",x:7.51146,y:6.59544,width:3.96488,height:6.18216,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",null),A.createElement("feGaussianBlur",{stdDeviation:.533333}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),A.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})))),EI="/v1/api/connectors/lookup/bulk",wI="/v1/api/connectors/lookup/bulk",II=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${EI}?${t.toString()}`,r=await Ee({url:n,method:Pe.GET});return r==null?void 0:r.data},_I=async e=>{const t=await Ee({url:wI,method:Pe.PUT,data:{entries:e}});return t==null?void 0:t.data},SI={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},TI={border:`1px solid ${u.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},Op={flex:1,height:"1px",backgroundColor:u.theme.palette.gray.gray6},AI={flexShrink:0,border:`1px solid ${u.theme.palette.gray.gray6}`,borderRadius:"15px"},LI={border:`1px solid ${u.theme.palette.gray.gray6}`,backgroundColor:u.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},OI=I.memo(function({connector:t,selectedHiverParam:n,onChange:r,sendTrackingEvent:o}){var i;const s=((i=(t.presets??[]).find(c=>c.hiverParam===n))==null?void 0:i.objectParamLabel)??"",a=I.useCallback(c=>{o(Y3,{hiver_param:c.target.value,connector_name:t.connectorName,page:"agent_connector_panel"}),r(t.connectorId,c.target.value)},[t.connectorId,t.connectorName,r,o]);return d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[d.jsx(u.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:SI,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(g=>g.hiverParam===c))==null?void 0:f.label)??"";return d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[d.jsx(vI,{width:18,height:18}),d.jsx("span",{children:l})]})},children:(t.presets??[]).map(c=>d.jsx(u.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),d.jsx(u.Box,{sx:Op}),d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:AI,children:[t.logo&&d.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),d.jsxs(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),d.jsx(u.Box,{sx:Op}),d.jsx(u.Box,{sx:LI,children:d.jsx(u.Typography,{variant:"body2",fontSize:14,children:s})})]})}),FI=I.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=I.useContext(He),[a,i]=I.useState({});I.useEffect(()=>{if(t&&r.length>0){const b={};r.filter(p=>{var h;return((h=p.presets)==null?void 0:h.length)>1}).forEach(p=>{b[p.connectorId]=p.hiverParam}),i(b)}},[t,r]);const c=Br(),{mutate:l,isPending:f}=Vt({mutationFn:_I,onSuccess:b=>{const p={};b.results.forEach(({connectorId:h,hiverParam:m})=>{p[h]=m}),c.setQueriesData({queryKey:["lookup","bulk"]},h=>h&&{...h,connectors:h.connectors.map(m=>p[m.connectorId]!==void 0?{...m,hiverParam:p[m.connectorId]}:m)}),s(J3,{page:"agent_connector_panel"}),_e({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{_e({message:"Failed to save identity mapping",type:"error"})}}),g=I.useCallback(()=>{const b=Object.entries(a).map(([p,h])=>({connector_id:p,hiver_param:h}));l(b)},[a,l]),y=I.useCallback((b,p)=>{i(h=>({...h,[b]:p}))},[]),v=I.useCallback(b=>{b||n()},[n]);return d.jsx(Cr,{shown:t,setShown:v,showCloseButton:!1,children:d.jsxs(u.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[d.jsx(u.Typography,{variant:"h2",children:"Customer identity mapping"}),d.jsx(u.Typography,{variant:"body2",children:"Choose how Hiver should identify customers when fetching data from connected apps."}),r.some(b=>{var p;return((p=b.presets)==null?void 0:p.length)>1})&&d.jsx(u.Stack,{gap:"8px",sx:TI,children:r.filter(b=>{var p;return((p=b.presets)==null?void 0:p.length)>1}).map(b=>d.jsx(OI,{connector:b,selectedHiverParam:a[b.connectorId]??b.hiverParam,onChange:y,sendTrackingEvent:s},b.connectorId))}),d.jsxs(u.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[d.jsx(u.Button,{variant:"text",onClick:n,children:"Cancel"}),d.jsx(u.Button,{variant:"contained",onClick:g,disabled:f,children:"Save"})]})]})})}),kI=({enabled:e,...t})=>{const{actionQueue:n}=I.useContext(He);n&&e&&n.register(t),I.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},DI=({isAdmin:e=!1})=>{var Re,ye;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s}=I.useContext(He),a=zt(),{userGroupId:i,userId:c}=Xt()||{},l=I.useRef(!1),f=I.useRef(null),g=I.useRef(null),y=I.useRef(null),[v,b]=I.useState({}),[p,h]=I.useState(!1),[m,C]=I.useState(!1),[x,w]=I.useState(!1),[E,_]=I.useState(!1),[T,S]=I.useState(),[L,R]=I.useState(!1),[k,D]=I.useState(null),[M,G]=I.useState(),[Y,X]=I.useState(null),[J,z]=I.useState(!1),[q,ne]=I.useState(!1),[ce,V]=I.useState(!1),[N,H]=I.useState(!1),j=Ce(Lv),$=Ce(Ov),oe=Ce(kv),re=Ce(Dv),B=Ce(Rv),te=Ce(Fv),fe=Ce($1),Z=Ce(Jv),Ye=Ce(U1),Se=Ce(K1),Je=Ce(ep),Et=Ce($E),zn=tt(o,Q3),Nt=tt(o,yd),at=tt(o,n4),ze=tt(o,o4),Yn=tt(o,s4),wt=tt(o,a4),Jn=(Re=Xt())==null?void 0:Re.tenantPlatform,Sn=tt(o,Jn==="HIVERWEB"?`hot-${Cd}`:Cd),{data:Lr}=mn({queryKey:["connectors","enabledAuthenticated"],queryFn:Jy,enabled:Sn&&e}),qn=I.useMemo(()=>(Lr??[]).map(U=>U.id),[Lr]),{data:pt,isSuccess:us}=mn({queryKey:["lookup","bulk",qn.join(",")],queryFn:()=>II(qn),enabled:qn.length>0&&Sn&&e,refetchOnMount:!1}),Or=us&&((pt==null?void 0:pt.connectors)??[]).some(U=>{var me;return(((me=U.presets)==null?void 0:me.length)??0)>1});kI({conversationId:s,openCreateForm:()=>w(!0),enabled:$});const It=I.useMemo(()=>!j||!j.length?null:Bv(j,oe,re),[j,oe,re]),Ut=I4(oe),{data:xo,isLoading:Qn}=Tp({senderEmail:t,conversationId:String(s),enabled:ze&&!!t}),{emailHeaders:pn,selectedEmail:Fr}=xo??{},{scrollOnceAfterLoad:vo,resetScrollState:kr}=xI(g),Eo=te!==ee.LOADING&&(!re||!Object.values(re).some(U=>U===ee.LOADING))&&j&&j.length>0;I.useLayoutEffect(()=>{var U;J&&!p&&q&&((U=y==null?void 0:y.current)!=null&&U.scrollHeight)&&vo(!!Eo,"smooth")},[J,p,q,Eo,vo,(ye=y==null?void 0:y.current)==null?void 0:ye.scrollHeight,c]);const Dr=(U,me)=>{r(R3,{search_keyword:U,sm_ids:n,connector_name:me,suggestion_type:Et})},wo=(U,me,we)=>{!Array.isArray(me)||!me.length?r(M3,{search_keyword:U,sm_ids:n,connector_name:we,suggestion_type:Et}):me.length&&r(P3,{num_of_results:me.length,search_keyword:U,sm_ids:n,connector_name:we,suggestion_type:Et})},{mutate:hn,reset:$n,data:Nr,isPending:Io,isIdle:_o}=CI(Dr,wo),Un=I.useCallback(()=>{$n(),D(null)},[$n,D]),Rr=Br(),se=I.useCallback(()=>{t&&n.length&&s&&a(ja({inboxIds:n,conversationId:s}))},[a,t,n,s]),ve=I.useCallback(()=>{Rr.invalidateQueries({queryKey:["lookup","bulk"]}),se()},[Rr,se]),qe=I.useCallback((U,me)=>{U&&s&&me&&a(Pa({id:U,channelType:"email",conversationId:s,externalResourceId:me,contactEmail:t})).unwrap().catch(()=>{a(oo(null))})},[a,s,t]);if(I.useEffect(()=>{(async()=>{c&&(z(await Ci(c)),ne(await pu(c)))})()},[c]),I.useEffect(()=>{Qn||G(Fr||t)},[t,Fr,Qn]),I.useEffect(()=>{M&&s&&gI(String(s),M)},[M,s]),I.useEffect(()=>{q&&c&&hu(c)},[q,c]),I.useEffect(()=>{var U;if(Se){C(!0);const{externalResourceId:me}=Se,we=(U=Se.forms.find(je=>je.type==="edit"))==null?void 0:U.id;qe(we,me)}else C(!1),a(Iv())},[Se,qe,a]),I.useEffect(()=>(se(),kr(),()=>{a(q1.clearConnectorList())}),[a,se,kr]),I.useEffect(()=>{if(B&&j&&j.length&&It&&!l.current){const{cards_per_app:U,total_empty_cards:me,total_cards_with_errors:we}=It;r(l3,{numOfCards:j.length,total_cards_loaded:j.length,total_empty_cards:me,total_cards_with_errors:we,cards_per_app:U,sm_ids:n}),l.current=!0}return()=>{l.current=!1}},[B,j,It,r,n]),I.useEffect(()=>{s&&n&&n.length&&a(ka({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:wt}))},[a,n,s,wt]),I.useEffect(()=>{const U=me=>{var je;if(!(me instanceof CustomEvent))return;const we=(je=me.detail)==null?void 0:je.connectorKey;b({connectorKey:we})};return window.addEventListener(sl.OPEN_FORM_VIEW,U),()=>{window.removeEventListener(sl.OPEN_FORM_VIEW,U)}},[]),I.useEffect(()=>{if(!(fe!=null&&fe.length)||!v.connectorKey)return;const U=v.connectorKey;b({});const me=fe.find(we=>{var je;return((je=we.connectorKey)==null?void 0:je.toLowerCase())===(U==null?void 0:U.toLowerCase())});me&&(X(me),w(!0))},[fe,v]),!t.length||te===ee.LOADING)return d.jsx(ME,{});const it=U=>{r(h3,{connector_name:Z,source:U,sm_ids:n})},Qe=U=>{w(!0),it(U)},Rt=()=>{_(!0),r(g3)},Kt=U=>{r(U,T),Je?R(!0):(w(!1),X(null))},Tn=U=>{if(Se){const{connectorName:me,title:we}=Se;r(U,{connector_name:me,card_title:we,sm_ids:n,ug_id:i})}Je?R(!0):a(oo(null))},gn=()=>{w(!1),a(oo(null)),S(void 0),R(!1)},So=()=>{se(),a(q1.clearConnectorList())},O=[{label:"Go back",variant:"text",action:gn},{label:"Stay",variant:"contained",action:()=>R(!1)}],W=fe.length>0,Q=Ye.length>0,pe=x||m||E,Te=()=>W||Q?d.jsx(_w,{haveCreateObjects:W,haveLinkObjects:Q,onCreateClick:()=>Qe(Fd.MAIN_BUTTON),onLinkClick:()=>_(!0)}):d.jsx(rp,{isAdmin:e,hideHeading:!0});return d.jsxs(Gd,{ref:f,"data-testid":Array.isArray(j)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:x||E,children:[d.jsx(gp,{shown:L,setShown:R,title:gv,description:mv,buttons:O}),d.jsx(r5,{onWheel:()=>h(!0),ref:y,children:$?d.jsxs(d.Fragment,{children:[d.jsx(R5,{connectors:Ut,isWriteFlowEnabled:Nt,haveCreateObjects:W,haveLinkObjects:Q,cards:j,handleCreateNewObject:()=>Qe(Fd.ICON),handleLinkNewObject:Rt}),at&&!pe?d.jsx(oI,{selectedObject:k,setSelectedObject:D,fetchSearchResults:hn,onReset:Un,root:f.current}):null,d.jsxs(so,{children:[d.jsx(En,{condition:at&&Io,children:d.jsx(hI,{})},"search"),d.jsx(En,{condition:at&&!!k&&!_o,children:d.jsx(pI,{searchResults:Nr??[],selectedObject:k,onReset:Un,fetchCards:se})},"results"),d.jsx(En,{condition:x,children:d.jsx(Kc,{onClose:()=>Kt(v3),rightNode:d.jsx(u.Typography,{variant:"body2",color:"primary.main",fontSize:14,fontWeight:500,lineHeight:"20px",onClick:()=>V(!0),style:{cursor:"pointer"},children:wv}),children:d.jsx(bp,{onClose:()=>Kt(x3),onCreateSuccess:So,metaData:T,setMetaData:S,defaultOption:Y,connectors:Ut,mapFormOpen:ce,setMapFormOpen:V})})},"create-form"),d.jsx(En,{condition:m,children:d.jsx(Kc,{onClose:()=>Tn(A3),title:g4,backButtonTooltip:"Back",children:d.jsx(bp,{isEdit:!0,onClose:()=>Tn(T3),onCreateSuccess:So,metaData:T,setMetaData:S,connectors:Ut})})},"edit-form"),d.jsx(En,{condition:E,children:d.jsx(Kc,{onClose:()=>_(!1),children:d.jsx(xw,{setOpenTaskLinking:_,onLinkingSuccess:se})})},"link-form"),d.jsxs(En,{fallback:!0,children:[ze&&(j!=null&&j.length)?d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[d.jsx(u.Stack,{sx:{flex:1,minWidth:0},children:d.jsx(zE,{emailHeaders:pn,selectedEmail:M,root:f.current,isLoading:Qn,setSelectedEmail:G})}),Sn&&Or&&e&&d.jsx(u.Tooltip,{title:"Update customer identity mapping",placement:"top",children:d.jsx(u.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(bd,{page:"agent_connector_panel"}),H(!0)},children:d.jsx(u.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!ze&&Sn&&Or&&e&&(j!=null&&j.length)?d.jsx(u.Button,{fullWidth:!0,variant:"contained",startIcon:d.jsx(u.icons.SettingsOutlined,{sx:{height:"14px",width:"14px"}}),sx:{backgroundColor:"#edf1f6",color:"#4d596c",borderRadius:"6px",padding:"9px 12px",marginTop:"12px",textTransform:"none",fontWeight:500,fontSize:"14px",lineHeight:"20px",boxShadow:"none","&:hover":{backgroundColor:"#e2e8f0",boxShadow:"none"}},onClick:()=>{r(bd,{page:"agent_connector_panel"}),H(!0)},children:"Customer identity mapping"}):null,zn?d.jsx(PE,{}):null,d.jsxs(so,{children:[d.jsxs(En,{condition:!!j&&j.length>0,children:[d.jsx(dE,{cards:j,specificCardData:oe,email:M??"",specificConnectorApiStatus:re,onCardUnlinking:se}),d.jsx("div",{ref:g,children:Yn?d.jsx(M4,{connectors:Ut,expanded:J}):null})]},"cards-list"),d.jsx(En,{condition:!(j!=null&&j.length)&&Nt,children:Te()},"create-banner")]})]},"cards")]})]}):d.jsx(rp,{isAdmin:e})}),!$&&d.jsx(J4,{}),Sn&&d.jsx(FI,{open:N,onClose:()=>H(!1),connectors:(pt==null?void 0:pt.connectors)??[],onSaveSuccess:ve})]})},NI=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:g=!1,actionQueue:y,variables:v})=>{const b=I.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:l,stackingContext:f,actionQueue:y,variables:v}),[s,n,r,t,o,a,i,c,g,l,f,y,v]);return d.jsx(He.Provider,{value:b,children:e})},al=({children:e})=>{const[t]=I.useState(()=>new j2);return d.jsx(W2,{client:t,children:e})},RI=r0({cardList:Xv,write:_v,common:qx}),il=ty({reducer:RI,devTools:!0}),MI=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c})=>d.jsx(rc,{store:il,children:d.jsx(u.HiverProvider,{custom:!0,children:d.jsx(al,{children:d.jsx(NI,{...n,userEmail:t,availableFeatures:s,sendTrackingEvent:n==null?void 0:n.sendTrackingEvent,contactEmail:r,currentSmIds:n==null?void 0:n.currentSmIds,metaData:n==null?void 0:n.metaData,conversationId:n==null?void 0:n.conversationId,baseUrls:o,connectorFunctions:a,stackingContext:i,actionQueue:c,isAdmin:n==null?void 0:n.isAdmin,children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:e})})})})}),cl=u.styled(u.Box)`
1422
1452
  height: inherit;
1423
1453
  .MuiScopedCssBaseline-root {
1424
1454
  height: inherit;
@@ -1526,7 +1556,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
1526
1556
  [hidden] {
1527
1557
  display: none;
1528
1558
  }
1529
- `,LI=u.styled(u.Box)`
1559
+ `,PI=u.styled(u.Box)`
1530
1560
  :root {
1531
1561
  --toastify-color-light: #fff;
1532
1562
  --toastify-color-dark: #121212;
@@ -2257,7 +2287,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2257
2287
  transform: rotate(360deg);
2258
2288
  }
2259
2289
  }
2260
- `,ll=u.styled(LI)`
2290
+ `,ll=u.styled(PI)`
2261
2291
  .Toastify__toast-container {
2262
2292
  min-width: 320px !important;
2263
2293
  font-size: 16px;
@@ -2306,7 +2336,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2306
2336
  align-self: auto !important;
2307
2337
  margin-left: 12px;
2308
2338
  }
2309
- `,OI=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i})=>d.jsx(cl,{children:d.jsxs(TI,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,children:[d.jsx(_I,{isAdmin:r==null?void 0:r.isAdmin}),Ge.createPortal(d.jsx(ll,{id:"toast-message",children:d.jsx($a,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!a.toastMessage&&{style:{zIndex:a.toastMessage}}})}),document.body),d.jsx("div",{"data-connectorid":"connector-layover-portal"})]})}),Fp="/v1/api",FI=`${Fp}/connector/conversation/:conversationId/data`,kI=`${Fp}/connector/feedback/conversation/:conversationId`,DI=async(e,t)=>{try{let n=FI.replace(":conversationId",e)+"?channel_type=email";if(t!=null&&t.length){const o=t.map(s=>`inbox_ids=${encodeURIComponent(s)}`).join("&");n+=`&${o}`}const r=await Ee({url:n,method:Pe.GET});return r!=null&&r.data&&Array.isArray(r.data)?r.data.reduce((s,a)=>{var i,c;return s[(i=a==null?void 0:a.cardData)==null?void 0:i.textToHighlight]||(s[(c=a==null?void 0:a.cardData)==null?void 0:c.textToHighlight]={...a}),s},{}):null}catch(n){return Promise.reject(n)}};function NI(e,t,n){return mn({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await DI(e,n),enabled:!!t&&!!e})}class RI{constructor(t=[],n=null){Me(this,"highlightTerms");Me(this,"observer");Me(this,"isHighlighting");Me(this,"debounceTimer");Me(this,"debounceDelay");Me(this,"onHighlightsUpdated");this.highlightTerms=t,this.observer=null,this.isHighlighting=!1,this.debounceTimer=null,this.debounceDelay=500,this.onHighlightsUpdated=n,this.init()}init(){this.highlightAllEmails(),this.startObserver()}startObserver(){const t=this.findGmailContainer();if(!t){console.warn("Gmail container not found");return}this.observer=new MutationObserver(n=>{if(this.isHighlighting)return;let r=!1;n.forEach(o=>{o.type==="childList"&&Array.from(o.addedNodes).some(i=>{var c,l,f,g;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((l=i.classList)==null?void 0:l.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((g=i.querySelector)==null?void 0:g.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
2339
+ `,jI=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i})=>d.jsx(cl,{children:d.jsxs(MI,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,children:[d.jsx(DI,{isAdmin:r==null?void 0:r.isAdmin}),Ve.createPortal(d.jsx(ll,{id:"toast-message",children:d.jsx($a,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!a.toastMessage&&{style:{zIndex:a.toastMessage}}})}),document.body),d.jsx("div",{"data-connectorid":"connector-layover-portal"})]})}),Fp="/v1/api",BI=`${Fp}/connector/conversation/:conversationId/data`,VI=`${Fp}/connector/feedback/conversation/:conversationId`,GI=async(e,t)=>{try{let n=BI.replace(":conversationId",e)+"?channel_type=email";if(t!=null&&t.length){const o=t.map(s=>`inbox_ids=${encodeURIComponent(s)}`).join("&");n+=`&${o}`}const r=await Ee({url:n,method:Pe.GET});return r!=null&&r.data&&Array.isArray(r.data)?r.data.reduce((s,a)=>{var i,c;return s[(i=a==null?void 0:a.cardData)==null?void 0:i.textToHighlight]||(s[(c=a==null?void 0:a.cardData)==null?void 0:c.textToHighlight]={...a}),s},{}):null}catch(n){return Promise.reject(n)}};function HI(e,t,n){return mn({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await GI(e,n),enabled:!!t&&!!e})}class WI{constructor(t=[],n=null){Me(this,"highlightTerms");Me(this,"observer");Me(this,"isHighlighting");Me(this,"debounceTimer");Me(this,"debounceDelay");Me(this,"onHighlightsUpdated");this.highlightTerms=t,this.observer=null,this.isHighlighting=!1,this.debounceTimer=null,this.debounceDelay=500,this.onHighlightsUpdated=n,this.init()}init(){this.highlightAllEmails(),this.startObserver()}startObserver(){const t=this.findGmailContainer();if(!t){console.warn("Gmail container not found");return}this.observer=new MutationObserver(n=>{if(this.isHighlighting)return;let r=!1;n.forEach(o=>{o.type==="childList"&&Array.from(o.addedNodes).some(i=>{var c,l,f,g;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((l=i.classList)==null?void 0:l.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((g=i.querySelector)==null?void 0:g.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
2310
2340
  .gmail-highlight {
2311
2341
  background-color: #ECEFF6 !important;
2312
2342
  color: #2c3e50 !important;
@@ -2336,7 +2366,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2336
2366
  transform: translateY(0) !important;
2337
2367
  box-shadow: none !important;
2338
2368
  }
2339
- `,document.head.appendChild(e)}function MI(){return Vt({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await Ee({url:kI.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const PI="Everything looks good",jI="Something is not working",BI="Share feedback",VI="Manage Smart Previews",GI="Reach out to your admin to disable this feature",HI="Go to Apps",WI="Disable Feature",ZI="Tell us what went wrong",XI="Please provide feedback",zI=[{label:"Data is not accurate",value:"Data is not accurate"},{label:"Data is from the wrong App",value:"Data is from the wrong App"},{label:"Other",value:"other"}],YI="Tell us more (optional)",JI="Enter your feedback",ul=40,qI="Feedback submitted",QI="Failed to submit feedback",ln={OBJECT_HIGHLIGHTED:"app_object_detection_highlighted",OBJECT_HOVERED:"app_object_detection_hovered",PERMALINK_CLICKED:"app_object_detection_permalink_clicked",POSITIVE_FEEDBACK_CLICKED:"app_object_detection_positive_feedback_detected",NEGATIVE_FEEDBACK_CLICKED:"app_object_detection_negative_feedback_clicked",NEGATIVE_FEEDBACK_SUBMITTED:"app_object_detection_negative_feedback_submitted",FEEDBACK_OPTION_CLICKED:"app_object_detection_general_feedback_clicked",FEEDBACK_OPTION_SUBMITTED:"app_object_detection_general_feedback_submitted",DATA_CARD_DURATION:"app_object_detection_data_card_duration",DATA_CARD_SCROLLED:"app_object_detection_data_card_scrolled"},kp=e=>d.jsx(u.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?d.jsx(u.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),$I=u.styled(u.Box)`
2369
+ `,document.head.appendChild(e)}function ZI(){return Vt({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await Ee({url:VI.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const XI="Everything looks good",zI="Something is not working",YI="Share feedback",JI="Manage Smart Previews",qI="Reach out to your admin to disable this feature",QI="Go to Apps",$I="Disable Feature",UI="Tell us what went wrong",KI="Please provide feedback",e_=[{label:"Data is not accurate",value:"Data is not accurate"},{label:"Data is from the wrong App",value:"Data is from the wrong App"},{label:"Other",value:"other"}],t_="Tell us more (optional)",n_="Enter your feedback",ul=40,r_="Feedback submitted",o_="Failed to submit feedback",cn={OBJECT_HIGHLIGHTED:"app_object_detection_highlighted",OBJECT_HOVERED:"app_object_detection_hovered",PERMALINK_CLICKED:"app_object_detection_permalink_clicked",POSITIVE_FEEDBACK_CLICKED:"app_object_detection_positive_feedback_detected",NEGATIVE_FEEDBACK_CLICKED:"app_object_detection_negative_feedback_clicked",NEGATIVE_FEEDBACK_SUBMITTED:"app_object_detection_negative_feedback_submitted",FEEDBACK_OPTION_CLICKED:"app_object_detection_general_feedback_clicked",FEEDBACK_OPTION_SUBMITTED:"app_object_detection_general_feedback_submitted",DATA_CARD_DURATION:"app_object_detection_data_card_duration",DATA_CARD_SCROLLED:"app_object_detection_data_card_scrolled"},kp=e=>d.jsx(u.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?d.jsx(u.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),s_=u.styled(u.Box)`
2340
2370
  max-height: 340px;
2341
2371
  width: 440px;
2342
2372
  border-radius: 12px;
@@ -2350,15 +2380,15 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2350
2380
  flex-direction: row;
2351
2381
  margin-bottom: 12px;
2352
2382
  }
2353
- `,UI=u.styled(u.Box)`
2383
+ `,a_=u.styled(u.Box)`
2354
2384
  border-bottom: 1px solid ${u.theme.palette.gray.gray6};
2355
2385
  margin: 12px -16px;
2356
- `,KI=u.styled(u.Box)`
2386
+ `,i_=u.styled(u.Box)`
2357
2387
  display: flex;
2358
2388
  justify-content: flex-end;
2359
2389
  margin-top: 30px;
2360
2390
  gap: 8px;
2361
- `,Dp=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=I.useState(""),[i,c]=I.useState(""),l=b=>{a(b.target.value)},f=b=>{b.stopPropagation();const{value:p}=(b==null?void 0:b.target)||{};c(p)},g=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},v=r?!s:!i;return d.jsxs($I,{children:[d.jsx(u.Typography,{variant:"h3",children:o}),d.jsx(UI,{}),r?d.jsx(u.FormControl,{children:d.jsx(u.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:l,children:zI.map(b=>d.jsx(u.FormControlLabel,{value:b.value,control:d.jsx(u.Radio,{}),label:b.label},b.value))})}):null,d.jsx(br,{type:"text",placeholder:r?YI:JI,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:Cc()}}),d.jsxs(KI,{children:[d.jsx(u.Button,{variant:"text",color:"primary",style:{color:u.theme.palette.gray.gray3},disabled:n,onClick:y,children:"Cancel"}),d.jsx(kp,{variant:"contained",color:"primary",isLoading:n,disabled:v,label:"Submit",onClick:g})]})]})},e_=u.styled(u.Box)`
2391
+ `,Dp=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=I.useState(""),[i,c]=I.useState(""),l=b=>{a(b.target.value)},f=b=>{b.stopPropagation();const{value:p}=(b==null?void 0:b.target)||{};c(p)},g=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},v=r?!s:!i;return d.jsxs(s_,{children:[d.jsx(u.Typography,{variant:"h3",children:o}),d.jsx(a_,{}),r?d.jsx(u.FormControl,{children:d.jsx(u.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:l,children:e_.map(b=>d.jsx(u.FormControlLabel,{value:b.value,control:d.jsx(u.Radio,{}),label:b.label},b.value))})}):null,d.jsx(gr,{type:"text",placeholder:r?t_:n_,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:Cc()}}),d.jsxs(i_,{children:[d.jsx(u.Button,{variant:"text",color:"primary",style:{color:u.theme.palette.gray.gray3},disabled:n,onClick:y,children:"Cancel"}),d.jsx(kp,{variant:"contained",color:"primary",isLoading:n,disabled:v,label:"Submit",onClick:g})]})]})},c_=u.styled(u.Box)`
2362
2392
  border-radius: 12px;
2363
2393
  max-height: 298px;
2364
2394
  width: 288px;
@@ -2368,29 +2398,29 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2368
2398
  & > * {
2369
2399
  box-sizing: border-box;
2370
2400
  }
2371
- `,t_=u.styled(u.Box)`
2401
+ `,l_=u.styled(u.Box)`
2372
2402
  height: 24px;
2373
2403
  display: flex;
2374
2404
  align-items: center;
2375
2405
  justify-content: space-between;
2376
2406
  padding: 12px 0px;
2377
- `,n_=u.styled(u.Typography)`
2407
+ `,u_=u.styled(u.Typography)`
2378
2408
  white-space: nowrap;
2379
2409
  overflow: hidden;
2380
2410
  text-overflow: ellipsis;
2381
2411
  width: ${e=>e.width||"200px"};
2382
2412
  line-height: 18px;
2383
- `,r_=u.styled(u.Box)`
2413
+ `,d_=u.styled(u.Box)`
2384
2414
  height: 1px;
2385
2415
  background-color: ${u.theme.palette.gray.gray6};
2386
2416
  margin: 0 -16px;
2387
- `,o_=u.styled(u.Box)`
2417
+ `,f_=u.styled(u.Box)`
2388
2418
  padding: 0px 16px;
2389
2419
  border-radius: 12px;
2390
2420
  height: calc(100% - 82px);
2391
2421
  overflow-y: auto;
2392
2422
  scrollbar-width: thin;
2393
- `,s_=u.styled(u.Typography)`
2423
+ `,p_=u.styled(u.Typography)`
2394
2424
  font-size: 12px;
2395
2425
  font-weight: 400;
2396
2426
  color: ${u.theme.palette.gray.gray1};
@@ -2398,7 +2428,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2398
2428
  min-width: 80px;
2399
2429
  margin-right: 12px;
2400
2430
  text-align: left;
2401
- `,a_=u.styled(u.Typography)`
2431
+ `,h_=u.styled(u.Typography)`
2402
2432
  font-size: 12px;
2403
2433
  font-weight: 400;
2404
2434
  color: ${u.theme.palette.gray.black};
@@ -2407,11 +2437,11 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2407
2437
  margin-right: 0px;
2408
2438
  word-break: 'break-word';
2409
2439
  text-align: right;
2410
- `,i_=u.styled(u.Box)`
2440
+ `,g_=u.styled(u.Box)`
2411
2441
  display: flex;
2412
2442
  justify-content: space-between;
2413
2443
  margin-bottom: 20px;
2414
- `,c_=u.styled(u.Box)`
2444
+ `,m_=u.styled(u.Box)`
2415
2445
  display: flex;
2416
2446
  justify-content: space-between;
2417
2447
  align-items: center;
@@ -2419,16 +2449,16 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2419
2449
  width: 100%;
2420
2450
  min-height: 40px;
2421
2451
  background-color: ${u.theme.palette.gray.gray6a};
2422
- `,rs=u.styled(u.Tooltip)`
2452
+ `,ss=u.styled(u.Tooltip)`
2423
2453
  padding: 6px;
2424
2454
  border-radius: 6px;
2425
- `,l_=u.styled(u.Button)`
2455
+ `,b_=u.styled(u.Button)`
2426
2456
  background-color: #f3f8ff;
2427
2457
  border-radius: 360px;
2428
2458
  color: #196fe0;
2429
2459
  padding: 5px 12px;
2430
2460
  min-width: 100px;
2431
- `,Np=e=>T.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M7.87354 2.73877C7.87354 2.30139 7.53821 1.94227 7.11084 1.90381L5.09229 6.44775C5.06387 6.51167 5.02799 6.57074 4.98975 6.62744V12.3667H10.4722C11.0395 12.3665 11.5225 11.9529 11.6089 11.3921L12.2368 7.30811C12.3437 6.61168 11.8047 5.98395 11.1001 5.98389H9.05615C8.40276 5.98371 7.87354 5.45372 7.87354 4.80029V2.73877ZM2.07275 11.8003C2.07275 12.1133 2.32718 12.3667 2.64014 12.3667H3.78955V7.1499H2.64014C2.32718 7.1499 2.07275 7.40432 2.07275 7.71729V11.8003ZM9.07275 4.78369H11.1001C12.5403 4.78375 13.6412 6.0673 13.4224 7.49072L12.7944 11.5747C12.6179 12.7208 11.6318 13.5667 10.4722 13.5669H2.64014C1.66443 13.5669 0.873535 12.776 0.873535 11.8003V7.71729C0.873535 6.74158 1.66443 5.95068 2.64014 5.95068H3.99951L6.04834 1.34131L6.12256 1.20166C6.31844 0.892431 6.66142 0.700708 7.03467 0.700684C8.16045 0.700684 9.07275 1.61299 9.07275 2.73877V4.78369Z",fill:"#97A3B7"})),Rp=e=>T.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M11.8008 3.16651C11.8008 2.83026 11.7996 2.61407 11.7861 2.44972C11.7733 2.29228 11.7516 2.23558 11.7383 2.20948C11.684 2.10311 11.5976 2.0167 11.4912 1.96241C11.4651 1.94911 11.4084 1.92742 11.251 1.91456C11.0866 1.90113 10.8698 1.89991 10.5332 1.89991H10.084V7.11671H10.5332C10.8697 7.11671 11.0866 7.11647 11.251 7.10304C11.4084 7.09017 11.4651 7.06848 11.4912 7.05519C11.5977 7.00085 11.684 6.91369 11.7383 6.80714C11.7516 6.78095 11.7733 6.72473 11.7861 6.56788C11.7996 6.40344 11.8008 6.18671 11.8008 5.85011V3.16651ZM6.00001 11.5288C6.00014 11.9658 6.33491 12.3239 6.76173 12.3628L8.68946 8.02784C8.73905 7.91626 8.79776 7.77463 8.8838 7.6421V1.89991H4.30275C3.86739 1.89991 3.57385 1.9011 3.34571 1.91847C3.12524 1.93527 3.00982 1.96482 2.92677 2.00245C2.72742 2.09281 2.55809 2.23906 2.43849 2.42237C2.38875 2.49873 2.34108 2.60774 2.29103 2.82276C2.23917 3.04561 2.19414 3.33583 2.12794 3.76612L1.82325 5.74952C1.73618 6.31551 1.67724 6.70248 1.65724 7.00245C1.63765 7.29653 1.66125 7.4439 1.69923 7.54347C1.79436 7.79282 1.97309 8.00139 2.20509 8.13331C2.29773 8.18598 2.43978 8.23198 2.73341 8.25733C3.03294 8.28318 3.42441 8.2837 3.99708 8.2837H4.46681C4.62026 8.2837 4.77205 8.28306 4.89943 8.29347C5.00019 8.30172 5.11526 8.31839 5.23439 8.36085L5.3545 8.41261L5.51271 8.51026C5.61292 8.58313 5.70157 8.67078 5.77443 8.77101L5.8711 8.93019L5.92286 9.0503C5.96524 9.1694 5.98202 9.28456 5.99025 9.38526C6.00063 9.51256 6.00001 9.66359 6.00001 9.8169V11.5288ZM13 5.85011C13 6.1669 13.0008 6.44089 12.9824 6.66554C12.9635 6.89709 12.9214 7.12868 12.8076 7.35206C12.6383 7.68439 12.3684 7.95514 12.0361 8.12452C11.8127 8.23838 11.5803 8.2804 11.3486 8.29933C11.124 8.31767 10.8499 8.3169 10.5332 8.3169H10.0899C9.97739 8.31691 9.91771 8.31637 9.87501 8.31886C9.85536 8.35692 9.83103 8.41194 9.78517 8.51515L7.82521 12.9263C7.6519 13.3159 7.26532 13.5669 6.83888 13.5669C5.71318 13.5669 4.80093 12.6545 4.80079 11.5288V9.8169C4.80079 9.64881 4.799 9.55553 4.79396 9.48878C4.72728 9.48383 4.63383 9.4839 4.46681 9.4839H3.99708C3.44579 9.4839 2.99395 9.48395 2.63087 9.45265C2.26202 9.42082 1.92186 9.35223 1.61232 9.17628C1.13824 8.90671 0.772529 8.48073 0.578136 7.9712C0.451217 7.63844 0.43534 7.29185 0.459972 6.92237C0.484222 6.55869 0.552876 6.11195 0.63673 5.5669L0.942394 3.58351C1.00581 3.17132 1.05751 2.82883 1.12208 2.55128C1.18838 2.26634 1.27691 2.00629 1.4336 1.76612C1.67803 1.39152 2.02424 1.0943 2.43165 0.909678C2.69285 0.791323 2.96319 0.743407 3.25489 0.721201C3.53908 0.699573 3.8856 0.700693 4.30275 0.700693H10.5332C10.8499 0.700693 11.124 0.69993 11.3486 0.718272C11.5803 0.737198 11.8127 0.779216 12.0361 0.893076C12.3683 1.06241 12.6383 1.33244 12.8076 1.66456C12.9215 1.88802 12.9635 2.12041 12.9824 2.35206C13.0008 2.57656 13 2.85001 13 3.16651V5.85011Z",fill:"#97A3B7"})),u_=e=>T.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6.02637 0.261719C6.91006 0.100716 7.81654 0.108586 8.69727 0.285156C8.77943 0.301685 8.85737 0.335356 8.92578 0.383789C8.99413 0.432207 9.05187 0.494446 9.09473 0.566406L10.1699 2.37109L12.2686 2.40137C12.3521 2.40267 12.4348 2.42105 12.5107 2.45605C12.5866 2.49114 12.6547 2.5417 12.71 2.60449L12.9268 2.8623C13.4177 3.47393 13.8044 4.1638 14.0703 4.90332H14.0713C14.1006 4.98499 14.1111 5.07276 14.1035 5.15918C14.0958 5.24545 14.0694 5.32914 14.0264 5.4043L13.0107 7.17676L14.0654 8.97949C14.1089 9.05374 14.1349 9.13706 14.1436 9.22266C14.1522 9.30829 14.143 9.39509 14.1152 9.47656C13.8308 10.316 13.3846 11.0919 12.8008 11.7588C12.7442 11.8235 12.6731 11.8748 12.5947 11.9102C12.5163 11.9454 12.4307 11.9644 12.3447 11.9639L10.2559 11.9512L9.22656 13.7188C9.18293 13.7935 9.12263 13.8576 9.05176 13.9072C8.98094 13.9567 8.90045 13.9914 8.81543 14.0068C7.9318 14.1675 7.02506 14.1583 6.14453 13.9814L6.14355 13.9824C6.0797 13.9694 6.01838 13.9446 5.96191 13.9121C5.87332 13.8615 5.7985 13.7897 5.74609 13.7021L4.67188 11.8955L2.56934 11.8682C2.48571 11.8669 2.4031 11.8485 2.32715 11.8135C2.25108 11.7784 2.18323 11.727 2.12793 11.6641C1.60736 11.0751 1.18875 10.4045 0.888672 9.67969L0.767578 9.36621C0.738264 9.28452 0.726773 9.19681 0.734375 9.11035C0.742031 9.02393 0.768379 8.93953 0.811523 8.86426L1.82617 7.0918L0.772461 5.28906C0.729026 5.2148 0.702006 5.1315 0.693359 5.0459C0.684801 4.96052 0.695058 4.87421 0.722656 4.79297C1.00784 3.95289 1.45608 3.17678 2.04102 2.50977C2.09771 2.44503 2.16762 2.39274 2.24609 2.35742C2.32438 2.32222 2.40928 2.30426 2.49512 2.30469L4.58398 2.31543L5.61426 0.549805C5.65789 0.474997 5.71718 0.410066 5.78809 0.360352C5.8591 0.31064 5.94107 0.277156 6.02637 0.261719ZM7.53809 14.0195C7.59898 14.0196 7.65982 14.0181 7.7207 14.0166C7.65982 14.0181 7.59898 14.0196 7.53809 14.0195ZM7.2334 14.0117C7.28581 14.014 7.33818 14.0164 7.39062 14.0176C7.33818 14.0164 7.28581 14.014 7.2334 14.0117ZM7.85742 14.0127C7.89653 14.0109 7.93552 14.0073 7.97461 14.0049C7.93552 14.0073 7.89654 14.0109 7.85742 14.0127ZM6.91113 13.9902C6.97295 13.9958 7.03476 14.0009 7.09668 14.0049C7.03476 14.0009 6.97295 13.9958 6.91113 13.9902ZM6.6543 13.9619C6.6898 13.9665 6.72519 13.9716 6.76074 13.9756C6.72519 13.9716 6.6898 13.9665 6.6543 13.9619ZM5.91016 13.75C5.94027 13.7795 5.97474 13.8051 6.01172 13.8262L5.95898 13.791C5.94197 13.7782 5.92535 13.7649 5.91016 13.75ZM6.58008 12.9414H6.58105H6.58008ZM8.2002 1.41895C7.63858 1.33129 7.06722 1.32543 6.50391 1.40137L5.5127 3.10059C5.45667 3.19686 5.37383 3.27503 5.27539 3.32715C5.21254 3.36088 5.14878 3.39942 5.08594 3.43555L5.08496 3.43457C4.99197 3.48895 4.88605 3.51825 4.77832 3.51758L2.77637 3.50586C2.43354 3.9367 2.15694 4.41647 1.95508 4.92871L2.96875 6.66211H2.96973C3.01013 6.73278 3.03531 6.81132 3.04492 6.8916L3.04883 6.97461C3.04667 7.04613 3.0485 7.11658 3.05078 7.18945C3.0548 7.30124 3.02821 7.41268 2.97266 7.50977L1.99609 9.21289C2.21404 9.7388 2.50744 10.2299 2.86621 10.6719L4.88281 10.7012H4.88379C4.99002 10.7034 5.09368 10.7341 5.18457 10.7891L5.39258 10.9082C5.45916 10.9464 5.51715 10.9978 5.56445 11.0576L5.6084 11.1201L6.6416 12.8486C7.20362 12.9365 7.77513 12.9432 8.33887 12.8672L9.3291 11.1689C9.38528 11.0722 9.46843 10.9926 9.56738 10.9404C9.63017 10.9067 9.69505 10.8701 9.75781 10.834L9.8291 10.7988C9.90336 10.7678 9.98341 10.7514 10.0645 10.752L12.0664 10.7646C12.4092 10.3324 12.6847 9.85062 12.8857 9.33691L11.8711 7.60645L11.8721 7.60547C11.8181 7.51108 11.7903 7.40365 11.792 7.29492L11.791 7.29395C11.7932 7.22206 11.7923 7.15042 11.79 7.07715C11.7862 6.96565 11.8128 6.85466 11.8682 6.75781L12.8438 5.05371C12.6258 4.52811 12.3333 4.03648 11.9746 3.59473L9.95801 3.56641H9.95703C9.85067 3.56414 9.74722 3.53265 9.65625 3.47754V3.47852L9.45898 3.36426L9.39258 3.32129C9.32844 3.27486 9.27351 3.21669 9.23242 3.14844V3.14746L8.2002 1.41895ZM2.4668 11.7559L2.57031 11.7686H2.57129C2.50157 11.7675 2.43246 11.7518 2.36914 11.7227L2.4668 11.7559ZM1.78809 11.082V11.0811V11.082ZM13.0244 11.3203C13.0502 11.2862 13.0774 11.2533 13.1025 11.2188C13.0774 11.2533 13.0502 11.2862 13.0244 11.3203ZM13.2051 11.0713C13.2348 11.0279 13.2643 10.9845 13.293 10.9404C13.2643 10.9845 13.2348 11.0279 13.2051 11.0713ZM9.90918 10.876C9.90231 10.8782 9.89544 10.8803 9.88867 10.8828C9.89545 10.8803 9.90231 10.8782 9.90918 10.876ZM13.3535 10.8447C13.3903 10.7861 13.426 10.7268 13.4609 10.667C13.426 10.7268 13.3903 10.7861 13.3535 10.8447ZM13.5049 10.5928C13.5426 10.5264 13.5789 10.4593 13.6143 10.3916C13.5789 10.4593 13.5426 10.5264 13.5049 10.5928ZM13.6582 10.3066C13.695 10.2337 13.7305 10.1602 13.7646 10.0859C13.7305 10.1602 13.695 10.2337 13.6582 10.3066ZM7.2168 4.04004C7.82858 3.99994 8.43974 4.14269 8.9707 4.44922C9.68176 4.86085 10.2003 5.53844 10.4131 6.33203C10.6256 7.12573 10.5145 7.97155 10.1045 8.68359C9.79803 9.21429 9.34157 9.64291 8.79199 9.91406C8.24214 10.1852 7.62346 10.287 7.01562 10.207C6.40793 10.127 5.83684 9.86895 5.37598 9.46484C4.91529 9.06072 4.58448 8.52844 4.42578 7.93652C4.26721 7.34451 4.28843 6.71808 4.48535 6.1377C4.68236 5.55755 5.04627 5.04792 5.53223 4.6748C6.01845 4.30171 6.60526 4.08027 7.2168 4.04004ZM13.7852 10.041C13.8281 9.94559 13.8697 9.84945 13.9082 9.75195V9.75098C13.8696 9.84876 13.8283 9.94531 13.7852 10.041ZM6.40918 9.95703C6.46044 9.97542 6.51219 9.99222 6.56445 10.0078C6.51219 9.99225 6.46044 9.97539 6.40918 9.95703ZM6.20996 9.87695C6.25096 9.89508 6.2922 9.91244 6.33398 9.92871C6.2922 9.91247 6.25097 9.89505 6.20996 9.87695ZM6.02832 9.79004C6.0678 9.81077 6.10809 9.82969 6.14844 9.84863C6.10808 9.82972 6.06781 9.81074 6.02832 9.79004ZM5.84082 9.68262C5.87596 9.70443 5.9113 9.72578 5.94727 9.74609C5.91128 9.7258 5.87597 9.7044 5.84082 9.68262ZM12.9131 9.53613C12.9421 9.46825 12.9707 9.40012 12.9971 9.33105L12.9961 9.33008C12.9697 9.3993 12.9422 9.46808 12.9131 9.53613ZM5.66602 9.56543C5.7015 9.59105 5.73694 9.61662 5.77344 9.64062C5.73693 9.61664 5.70151 9.59104 5.66602 9.56543ZM1.97461 9.41699C1.99284 9.4575 2.01311 9.49704 2.03223 9.53711C1.98023 9.42813 1.93016 9.31814 1.88477 9.20605L1.97461 9.41699ZM5.59277 9.5127C5.59556 9.51484 5.59877 9.51642 5.60156 9.51855C5.54737 9.47722 5.49386 9.43478 5.44238 9.38965L5.59277 9.5127ZM8.03125 5.33496C7.67547 5.21424 7.29063 5.20159 6.92773 5.29883C6.56509 5.39617 6.23977 5.59952 5.99219 5.88184C5.74452 6.16433 5.58615 6.51424 5.53711 6.88672C5.48824 7.25901 5.54977 7.63783 5.71582 7.97461C5.88202 8.31152 6.14537 8.59145 6.4707 8.7793C6.90703 9.0311 7.42549 9.09913 7.91211 8.96875C8.39876 8.83831 8.81448 8.52031 9.06641 8.08398C9.25414 7.7587 9.3409 7.38453 9.31641 7.00977C9.2918 6.635 9.15631 6.27555 8.92773 5.97754C8.69908 5.67961 8.38685 5.45577 8.03125 5.33496ZM6.17676 8.69922C6.25355 8.76023 6.3343 8.81676 6.41992 8.86621L6.4209 8.86523C6.33525 8.81578 6.2536 8.76024 6.17676 8.69922ZM8.47754 8.83203V8.83105V8.83203ZM5.77637 8.27246C5.83227 8.35318 5.89399 8.4295 5.96094 8.50098L5.86426 8.38965C5.83359 8.35168 5.80422 8.31265 5.77637 8.27246ZM4.52246 7.91113C4.5608 8.0541 4.60948 8.19346 4.66797 8.32812C4.60945 8.19325 4.56083 8.05334 4.52246 7.91016V7.91113ZM9.40039 6.85645C9.40722 6.90519 9.41278 6.95457 9.41602 7.00391C9.41922 7.05311 9.42035 7.1023 9.41992 7.15137C9.42035 7.10204 9.41926 7.05239 9.41602 7.00293C9.41279 6.95379 9.40719 6.90498 9.40039 6.85645ZM11.9004 6.95215C11.8982 6.96247 11.897 6.97295 11.8955 6.9834C11.8971 6.97295 11.8982 6.96247 11.9004 6.95215ZM4.65137 5.97754C4.62849 6.03229 4.60852 6.08831 4.58887 6.14453C4.60851 6.0883 4.6285 6.03229 4.65137 5.97754ZM4.73633 5.79492C4.7241 5.81941 4.71274 5.8443 4.70117 5.86914C4.71273 5.8443 4.72411 5.81941 4.73633 5.79492ZM4.84473 5.59863C4.82627 5.62957 4.80836 5.66078 4.79102 5.69238C4.80835 5.66077 4.82628 5.62957 4.84473 5.59863ZM4.95605 5.42383C4.93113 5.45972 4.90714 5.49624 4.88379 5.5332C4.90712 5.49623 4.93114 5.45973 4.95605 5.42383ZM8.31445 4.27051C8.52443 4.33607 8.72746 4.42504 8.91992 4.53613L8.9209 4.53516C8.72801 4.42379 8.52395 4.33516 8.31348 4.26953L8.31445 4.27051ZM5.09082 5.24609C5.06172 5.28198 5.03326 5.3183 5.00586 5.35547C5.03325 5.31828 5.06173 5.28199 5.09082 5.24609ZM6.63965 5.29199C6.64276 5.29067 6.6463 5.29037 6.64941 5.28906C6.6463 5.29037 6.64276 5.29067 6.63965 5.29199ZM7.9209 5.19824H7.92188H7.9209ZM6.90234 5.20215H6.90332H6.90234ZM5.23145 5.08496C5.19896 5.11965 5.16651 5.15429 5.13574 5.19043C5.1665 5.15428 5.19897 5.11966 5.23145 5.08496ZM13.9766 4.93652V4.9375V4.93652ZM0.922852 4.53613C0.885573 4.63126 0.850299 4.72727 0.817383 4.82422V4.8252C0.850362 4.72803 0.885496 4.63148 0.922852 4.53613ZM2.01855 4.5293H2.01953H2.01855ZM1.04688 4.24316C1.02195 4.29878 0.998013 4.35481 0.974609 4.41113C0.998008 4.35481 1.02196 4.29878 1.04688 4.24316ZM7.22363 4.13965L7.22461 4.14062L7.22363 4.13965ZM7.66699 4.14453L7.66602 4.14355L7.66699 4.14453ZM1.17188 3.97852C1.1445 4.03303 1.11865 4.08828 1.09277 4.14355C1.11864 4.08828 1.14451 4.03304 1.17188 3.97852ZM12.4287 4.0498V4.04883V4.0498ZM12.6348 2.66992V2.6709C12.8546 2.91962 13.0566 3.1828 13.2383 3.45898C13.1171 3.27471 12.987 3.09618 12.8486 2.92383C12.7796 2.83782 12.708 2.75273 12.6348 2.66992ZM1.30859 3.72168C1.28765 3.75921 1.26729 3.79703 1.24707 3.83496C1.26728 3.79703 1.28765 3.75921 1.30859 3.72168ZM2.72656 3.40723V3.4082L4.7793 3.41797V3.41699L2.72656 3.40723ZM12.0234 3.49707C12.0719 3.55591 12.1198 3.61522 12.166 3.67578L12.0234 3.49609L9.95898 3.4668L12.0234 3.49707ZM1.47852 3.43457C1.45114 3.47831 1.42381 3.52205 1.39746 3.56641C1.4238 3.52204 1.45115 3.47831 1.47852 3.43457ZM9.78809 3.43164C9.79329 3.43365 9.79845 3.43566 9.80371 3.4375C9.79845 3.43567 9.79329 3.43365 9.78809 3.43164ZM5.22852 3.23926V3.24023V3.23926ZM1.64746 3.17676C1.61837 3.21879 1.58963 3.26104 1.56152 3.30371C1.58963 3.26104 1.61837 3.21879 1.64746 3.17676ZM2.11523 2.5752H2.11621H2.11523ZM8.94629 0.53418C8.96978 0.559626 8.99096 0.587273 9.00879 0.617188C8.97313 0.557368 8.92497 0.505135 8.86816 0.464844L8.94629 0.53418ZM6.37305 0.307617C6.26302 0.322319 6.15337 0.34041 6.04395 0.360352C6.15337 0.340409 6.26301 0.322304 6.37305 0.307617ZM8.35059 0.325195C8.25055 0.310024 8.15027 0.296933 8.0498 0.286133C8.15027 0.296945 8.25055 0.310026 8.35059 0.325195ZM7.92578 0.275391C7.85971 0.269476 7.79372 0.26282 7.72754 0.258789C7.79372 0.262834 7.85971 0.269466 7.92578 0.275391ZM6.9502 0.255859C6.89287 0.258741 6.83558 0.262311 6.77832 0.266602C6.83559 0.262325 6.89287 0.258726 6.9502 0.255859ZM7.58008 0.25293C7.53418 0.251105 7.4883 0.248968 7.44238 0.248047C7.4883 0.24898 7.53418 0.251094 7.58008 0.25293ZM7.12988 0.249023C7.17448 0.24794 7.21907 0.247302 7.26367 0.24707C7.21907 0.247314 7.17448 0.247928 7.12988 0.249023ZM6.67871 0.274414C6.57668 0.283521 6.47471 0.294033 6.37305 0.307617C6.47471 0.294047 6.57668 0.283499 6.67871 0.274414Z",fill:"#97A3B7"})),d_=e=>T.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_189_1728)"},T.createElement("path",{d:"M2.33317 2.4672H11.6665V9.4672H3.01567L2.33317 10.1497V2.4672ZM2.33317 1.30054C1.6915 1.30054 1.17234 1.82554 1.17234 2.4672L1.1665 12.9672L3.49984 10.6339H11.6665C12.3082 10.6339 12.8332 10.1089 12.8332 9.4672V2.4672C12.8332 1.82554 12.3082 1.30054 11.6665 1.30054H2.33317ZM3.49984 7.13387H8.1665V8.30054H3.49984V7.13387ZM3.49984 5.38387H10.4998V6.55054H3.49984V5.38387ZM3.49984 3.63387H10.4998V4.80054H3.49984V3.63387Z",fill:"#97A3B7"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_189_1728"},T.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),f_=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_3803_129233)"},T.createElement("path",{d:"M7.3335 4.66683H8.66683V6.00016H7.3335V4.66683ZM7.3335 7.3335H8.66683V11.3335H7.3335V7.3335ZM8.00016 1.3335C4.32016 1.3335 1.3335 4.32016 1.3335 8.00016C1.3335 11.6802 4.32016 14.6668 8.00016 14.6668C11.6802 14.6668 14.6668 11.6802 14.6668 8.00016C14.6668 4.32016 11.6802 1.3335 8.00016 1.3335ZM8.00016 13.3335C5.06016 13.3335 2.66683 10.9402 2.66683 8.00016C2.66683 5.06016 5.06016 2.66683 8.00016 2.66683C10.9402 2.66683 13.3335 5.06016 13.3335 8.00016C13.3335 10.9402 10.9402 13.3335 8.00016 13.3335Z",fill:"#6F7C90"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_3803_129233"},T.createElement("rect",{width:16,height:16,fill:"white"})))),p_=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,f]=I.useState(!1),g=I.useRef(!1),[y,v]=I.useState(!1),[b,p]=I.useState([]),{mutate:h,isPending:m}=MI(),{logoUrl:C,cardTitle:x,id:w,externalResourceId:E,connectorId:_,textToHighlight:A}=e.cardData||{},S=I.useMemo(()=>({key:A,card_id:w,card_title:x,connector_id:_,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,w,x,_,E,r,n]);if(I.useEffect(()=>{const X=Date.now();return()=>{c(ln.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),I.useEffect(()=>{var z,se,de;const X=(de=(se=(z=e==null?void 0:e.cardData)==null?void 0:z.data)==null?void 0:se.flatDetails)==null?void 0:de.data;if(X){const D=X.sort((H,G)=>H.priority-G.priority);p(D),c(ln.OBJECT_HOVERED,S)}},[e,c,S]),!b||b.length===0)return null;const L=()=>{f(!0),c(ln.FEEDBACK_OPTION_CLICKED,S)},k=()=>{v(!0),c(ln.NEGATIVE_FEEDBACK_CLICKED,S)},R=X=>{const z={card_id:w,entity_id:E,comment:X.feedbackComment,option:X.feedbackOption,feedback_type:"entity_extraction"};typeof X.isThumbsUp<"u"&&(z.positive_feedback=X.isThumbsUp),h({conversationId:r,feedbackData:z},{onSuccess:()=>{l?c(ln.FEEDBACK_OPTION_SUBMITTED,S):y&&c(ln.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),v(!1),Se({message:qI,type:rn})},onError:()=>{Se({message:QI,type:Qe})}})},N=()=>{R({isThumbsUp:!0}),c(ln.POSITIVE_FEEDBACK_CLICKED,S)},M=X=>{R({...X,isThumbsUp:!1})},V=()=>{s==null||s(_),i()},Z=()=>{a==null||a()},J=X=>{c(ln.PERMALINK_CLICKED,{...S,clicked_value:X})},$=()=>{g.current||(c(ln.DATA_CARD_SCROLLED,S),g.current=!0)};return d.jsxs(d.Fragment,{children:[d.jsxs(e_,{children:[d.jsxs(o_,{onScroll:$,children:[d.jsxs(t_,{children:[d.jsxs(u.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[C&&d.jsx("img",{src:C,alt:"Logo",style:{marginRight:8},height:18,width:18}),d.jsx(u.Tooltip,{title:x,arrow:!0,placement:"top",children:d.jsx(n_,{variant:"h3",color:u.theme.palette.gray.black,width:o?"100px":"200px",children:x})})]}),o?d.jsx(l_,{variant:"text",size:"small",endIcon:d.jsx(u.icons.ArrowForward,{}),onClick:Z,children:HI}):null]}),d.jsx(r_,{}),d.jsx(u.Box,{paddingY:"16px",children:b.map(({key:X,value:z,label:se,deepLink:de})=>d.jsxs(i_,{children:[d.jsxs(s_,{children:[se,":"]}),d.jsx(u.Tooltip,{title:(z==null?void 0:z.length)>ul?z:"",arrow:!0,placement:"top",children:de?d.jsx(u.Link,{href:de,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:u.theme.palette.primary.main},onClick:()=>J(z),children:Rd(z||"N/A",ul)}):d.jsx(a_,{children:Rd(z||"N/A",ul)})})]},X))})]}),d.jsxs(c_,{children:[d.jsx(u.Stack,{flexDirection:"row",alignItems:"center",children:t?d.jsx(rs,{arrow:!0,title:VI,placement:"top",children:d.jsx(u.IconButton,{onClick:V,children:d.jsx(u_,{})})}):d.jsxs(d.Fragment,{children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:12,children:WI}),d.jsx(rs,{arrow:!0,title:GI,placement:"top",children:d.jsx(u.IconButton,{size:"small",children:d.jsx(f_,{})})})]})}),d.jsxs(u.Stack,{flexDirection:"row",alignItems:"center",children:[d.jsx(rs,{arrow:!0,title:PI,placement:"top",children:d.jsx(u.IconButton,{size:"small",disabled:m,onClick:N,children:d.jsx(Np,{})})}),d.jsx(rs,{arrow:!0,title:jI,placement:"top",children:d.jsx(u.IconButton,{size:"small",disabled:m,onClick:k,children:d.jsx(Rp,{})})}),d.jsx(rs,{arrow:!0,title:BI,placement:"top",children:d.jsx(u.IconButton,{onClick:L,size:"small",disabled:m,children:d.jsx(d_,{})})})]})]})]}),d.jsx(vr,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:d.jsx(Dp,{onCancel:()=>f(!1),onSubmit:R,isLoading:m,showOptions:!1,title:XI})}),d.jsx(vr,{shown:y,setShown:v,borderRadius:12,sx:{zIndex:15002},children:d.jsx(Dp,{onCancel:()=>v(!1),onSubmit:M,isLoading:m,title:ZI})})]})},Mp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,Pp=(e,t=350,n=400)=>{const r=e.getBoundingClientRect(),o=window.innerHeight,s=window.innerWidth,a=r.top,i=o-r.bottom;return i>=t||i>a?r.left<n/2?"bottom-start":s-r.right<n/2?"bottom-end":"bottom":r.left<n/2?"top-start":s-r.right<n/2?"top-end":"top"},h_=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${u.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",maxHeight:"300px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${u.theme.palette.gray.gray6}`,position:"relative"}}));function g_({elements:e,title:t,onKeyChange:n}){const[r,o]=I.useState(!1),[s,a]=I.useState(null),[i,c]=I.useState(""),[l,f]=I.useState("bottom"),[g,y]=I.useState(!1),v=I.useRef(null),b=I.useRef({x:0,y:0}),p=I.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]);I.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,k=L.textContent||"",R=Pp(L);f(R),c(k),n&&n(k),a(L),o(!0)},_=()=>{if(r&&s){const S=Pp(s);f(S)}},A=S=>{if(b.current={x:S.clientX,y:S.clientY},!r||g)return;const L=S.clientX,k=S.clientY;let R=!1;for(const N of e)if(Mp(L,k,N.getBoundingClientRect())){R=!0;break}if(!R){const N=document.querySelector(`.${u.tooltipClasses.tooltip}`);N&&Mp(L,k,N.getBoundingClientRect())&&(R=!0)}R||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",A),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",A),p()}}},[e,n,r,s,g,p]);const h=()=>{y(!0),p()},m=()=>{y(!1),v.current=setTimeout(()=>{o(!1),a(null)},150)},x=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,w=d.jsx("div",{onMouseEnter:h,onMouseLeave:m,children:x});return d.jsx(h_,{title:w,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:d.jsx("span",{})})}const m_=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=I.useState(null),[l,f]=I.useState([]),{data:g,isError:y}=NI(e,t,n);return I.useEffect(()=>{g?c(g):y&&c(null)},[g,y]),I.useEffect(()=>{let v=null;if(i&&Object.keys(i).length&&e){v=new RI(Object.keys(i)||[],f);const b=Object.keys(i).map(p=>{var m;const h=((m=i[p])==null?void 0:m.cardData)||{};return{key:p,card_title:h.cardTitle,connector_id:h.connectorId}});a(ln.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:b})}return()=>{v&&v.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),d.jsx("div",{children:d.jsx(g_,{elements:l,title:(v,b)=>{var p;return!i||!v||!((p=i[v])!=null&&p.cardData)?d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray6,children:"Loading data..."}):d.jsx(p_,{smIds:n,conversationId:e||"",analysisData:i[v],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:b,sendTrackingEvent:a})}})})},b_=({children:e})=>d.jsx(rc,{store:il,children:d.jsx(u.HiverProvider,{custom:!0,children:d.jsx(al,{children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:e})})})}),y_=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>d.jsx(cl,{children:d.jsxs(b_,{children:[d.jsx(m_,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Ge.createPortal(d.jsx(ll,{id:"toast-message",children:d.jsx($a,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),jp={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},C_=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class x_{constructor({processDelay:t=1e3}){Me(this,"_processDelay");Me(this,"initialized",!1);Me(this,"_queue",[]);Me(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});Me(this,"ACTIONS",jp);this._processDelay=t}register(t){this._queueProps=t,!this.initialized&&(this.initialized=!0,this._delay(this._processDelay).then(()=>this._process()))}add(t){this._queue.push(t),this._process()}_delay(t){return new Promise(n=>setTimeout(n,t))}_process(){if(this.initialized)for(;this._queue.length>0;){const t=this._queue.shift();if(t)switch(t.type){case jp.OPEN_CREATE_FORM:C_(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var Ie=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(Ie||{}),Ba=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Ba||{});const v_=e=>{const t=[],n={};for(const r of e){const o=n[r.entityType];if(o===void 0){const s={type:r.entityType,entities:[r]};n[r.entityType]=t.length,t.push(s)}else t[o].entities.push(r)}return t},E_=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Ba.UNAUTHENTICATED?Ie.UNAUTHENTICATED:n.pending>0?Ie.PENDING:n.failed?Ie.ERROR:r.length===0?Ie.NOT_LOGGED:o?Ie.LOGGED:Ie.PAUSED},dl=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},T.createElement("path",{d:"M6.3335 8.99967H7.66683V10.333H6.3335V8.99967ZM6.3335 3.66634H7.66683V7.66634H6.3335V3.66634ZM6.9935 0.333008C3.3135 0.333008 0.333496 3.31967 0.333496 6.99967C0.333496 10.6797 3.3135 13.6663 6.9935 13.6663C10.6802 13.6663 13.6668 10.6797 13.6668 6.99967C13.6668 3.31967 10.6802 0.333008 6.9935 0.333008ZM7.00016 12.333C4.0535 12.333 1.66683 9.94634 1.66683 6.99967C1.66683 4.05301 4.0535 1.66634 7.00016 1.66634C9.94683 1.66634 12.3335 4.05301 12.3335 6.99967C12.3335 9.94634 9.94683 12.333 7.00016 12.333Z"})),w_=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},T.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z",fill:"white"})),I_=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},T.createElement("g",{clipPath:"url(#clip0_532_206243)"},T.createElement("path",{d:"M9.94092 3V0.75L6.94092 3.75L9.94092 6.75V4.5C12.4234 4.5 14.4409 6.5175 14.4409 9C14.4409 9.7575 14.2534 10.4775 13.9159 11.1L15.0109 12.195C15.5959 11.2725 15.9409 10.1775 15.9409 9C15.9409 5.685 13.2559 3 9.94092 3ZM9.94092 13.5C7.45842 13.5 5.44092 11.4825 5.44092 9C5.44092 8.2425 5.62842 7.5225 5.96592 6.9L4.87092 5.805C4.28592 6.7275 3.94092 7.8225 3.94092 9C3.94092 12.315 6.62592 15 9.94092 15V17.25L12.9409 14.25L9.94092 11.25V13.5Z"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_532_206243"},T.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),__=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},T.createElement("g",{clipPath:"url(#clip0_1_11813)"},T.createElement("path",{d:"M9.05859 0C4.09059 0 0.0585938 4.032 0.0585938 9C0.0585938 13.968 4.09059 18 9.05859 18C14.0266 18 18.0586 13.968 18.0586 9C18.0586 4.032 14.0266 0 9.05859 0ZM8.15859 12.6H6.35859V5.4H8.15859V12.6ZM11.7586 12.6H9.95859V5.4H11.7586V12.6Z",fill:"#F2A579"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1_11813"},T.createElement("rect",{width:18,height:18,fill:"white"})))),Va=u.keyframes`
2461
+ `,Np=e=>A.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M7.87354 2.73877C7.87354 2.30139 7.53821 1.94227 7.11084 1.90381L5.09229 6.44775C5.06387 6.51167 5.02799 6.57074 4.98975 6.62744V12.3667H10.4722C11.0395 12.3665 11.5225 11.9529 11.6089 11.3921L12.2368 7.30811C12.3437 6.61168 11.8047 5.98395 11.1001 5.98389H9.05615C8.40276 5.98371 7.87354 5.45372 7.87354 4.80029V2.73877ZM2.07275 11.8003C2.07275 12.1133 2.32718 12.3667 2.64014 12.3667H3.78955V7.1499H2.64014C2.32718 7.1499 2.07275 7.40432 2.07275 7.71729V11.8003ZM9.07275 4.78369H11.1001C12.5403 4.78375 13.6412 6.0673 13.4224 7.49072L12.7944 11.5747C12.6179 12.7208 11.6318 13.5667 10.4722 13.5669H2.64014C1.66443 13.5669 0.873535 12.776 0.873535 11.8003V7.71729C0.873535 6.74158 1.66443 5.95068 2.64014 5.95068H3.99951L6.04834 1.34131L6.12256 1.20166C6.31844 0.892431 6.66142 0.700708 7.03467 0.700684C8.16045 0.700684 9.07275 1.61299 9.07275 2.73877V4.78369Z",fill:"#97A3B7"})),Rp=e=>A.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M11.8008 3.16651C11.8008 2.83026 11.7996 2.61407 11.7861 2.44972C11.7733 2.29228 11.7516 2.23558 11.7383 2.20948C11.684 2.10311 11.5976 2.0167 11.4912 1.96241C11.4651 1.94911 11.4084 1.92742 11.251 1.91456C11.0866 1.90113 10.8698 1.89991 10.5332 1.89991H10.084V7.11671H10.5332C10.8697 7.11671 11.0866 7.11647 11.251 7.10304C11.4084 7.09017 11.4651 7.06848 11.4912 7.05519C11.5977 7.00085 11.684 6.91369 11.7383 6.80714C11.7516 6.78095 11.7733 6.72473 11.7861 6.56788C11.7996 6.40344 11.8008 6.18671 11.8008 5.85011V3.16651ZM6.00001 11.5288C6.00014 11.9658 6.33491 12.3239 6.76173 12.3628L8.68946 8.02784C8.73905 7.91626 8.79776 7.77463 8.8838 7.6421V1.89991H4.30275C3.86739 1.89991 3.57385 1.9011 3.34571 1.91847C3.12524 1.93527 3.00982 1.96482 2.92677 2.00245C2.72742 2.09281 2.55809 2.23906 2.43849 2.42237C2.38875 2.49873 2.34108 2.60774 2.29103 2.82276C2.23917 3.04561 2.19414 3.33583 2.12794 3.76612L1.82325 5.74952C1.73618 6.31551 1.67724 6.70248 1.65724 7.00245C1.63765 7.29653 1.66125 7.4439 1.69923 7.54347C1.79436 7.79282 1.97309 8.00139 2.20509 8.13331C2.29773 8.18598 2.43978 8.23198 2.73341 8.25733C3.03294 8.28318 3.42441 8.2837 3.99708 8.2837H4.46681C4.62026 8.2837 4.77205 8.28306 4.89943 8.29347C5.00019 8.30172 5.11526 8.31839 5.23439 8.36085L5.3545 8.41261L5.51271 8.51026C5.61292 8.58313 5.70157 8.67078 5.77443 8.77101L5.8711 8.93019L5.92286 9.0503C5.96524 9.1694 5.98202 9.28456 5.99025 9.38526C6.00063 9.51256 6.00001 9.66359 6.00001 9.8169V11.5288ZM13 5.85011C13 6.1669 13.0008 6.44089 12.9824 6.66554C12.9635 6.89709 12.9214 7.12868 12.8076 7.35206C12.6383 7.68439 12.3684 7.95514 12.0361 8.12452C11.8127 8.23838 11.5803 8.2804 11.3486 8.29933C11.124 8.31767 10.8499 8.3169 10.5332 8.3169H10.0899C9.97739 8.31691 9.91771 8.31637 9.87501 8.31886C9.85536 8.35692 9.83103 8.41194 9.78517 8.51515L7.82521 12.9263C7.6519 13.3159 7.26532 13.5669 6.83888 13.5669C5.71318 13.5669 4.80093 12.6545 4.80079 11.5288V9.8169C4.80079 9.64881 4.799 9.55553 4.79396 9.48878C4.72728 9.48383 4.63383 9.4839 4.46681 9.4839H3.99708C3.44579 9.4839 2.99395 9.48395 2.63087 9.45265C2.26202 9.42082 1.92186 9.35223 1.61232 9.17628C1.13824 8.90671 0.772529 8.48073 0.578136 7.9712C0.451217 7.63844 0.43534 7.29185 0.459972 6.92237C0.484222 6.55869 0.552876 6.11195 0.63673 5.5669L0.942394 3.58351C1.00581 3.17132 1.05751 2.82883 1.12208 2.55128C1.18838 2.26634 1.27691 2.00629 1.4336 1.76612C1.67803 1.39152 2.02424 1.0943 2.43165 0.909678C2.69285 0.791323 2.96319 0.743407 3.25489 0.721201C3.53908 0.699573 3.8856 0.700693 4.30275 0.700693H10.5332C10.8499 0.700693 11.124 0.69993 11.3486 0.718272C11.5803 0.737198 11.8127 0.779216 12.0361 0.893076C12.3683 1.06241 12.6383 1.33244 12.8076 1.66456C12.9215 1.88802 12.9635 2.12041 12.9824 2.35206C13.0008 2.57656 13 2.85001 13 3.16651V5.85011Z",fill:"#97A3B7"})),y_=e=>A.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6.02637 0.261719C6.91006 0.100716 7.81654 0.108586 8.69727 0.285156C8.77943 0.301685 8.85737 0.335356 8.92578 0.383789C8.99413 0.432207 9.05187 0.494446 9.09473 0.566406L10.1699 2.37109L12.2686 2.40137C12.3521 2.40267 12.4348 2.42105 12.5107 2.45605C12.5866 2.49114 12.6547 2.5417 12.71 2.60449L12.9268 2.8623C13.4177 3.47393 13.8044 4.1638 14.0703 4.90332H14.0713C14.1006 4.98499 14.1111 5.07276 14.1035 5.15918C14.0958 5.24545 14.0694 5.32914 14.0264 5.4043L13.0107 7.17676L14.0654 8.97949C14.1089 9.05374 14.1349 9.13706 14.1436 9.22266C14.1522 9.30829 14.143 9.39509 14.1152 9.47656C13.8308 10.316 13.3846 11.0919 12.8008 11.7588C12.7442 11.8235 12.6731 11.8748 12.5947 11.9102C12.5163 11.9454 12.4307 11.9644 12.3447 11.9639L10.2559 11.9512L9.22656 13.7188C9.18293 13.7935 9.12263 13.8576 9.05176 13.9072C8.98094 13.9567 8.90045 13.9914 8.81543 14.0068C7.9318 14.1675 7.02506 14.1583 6.14453 13.9814L6.14355 13.9824C6.0797 13.9694 6.01838 13.9446 5.96191 13.9121C5.87332 13.8615 5.7985 13.7897 5.74609 13.7021L4.67188 11.8955L2.56934 11.8682C2.48571 11.8669 2.4031 11.8485 2.32715 11.8135C2.25108 11.7784 2.18323 11.727 2.12793 11.6641C1.60736 11.0751 1.18875 10.4045 0.888672 9.67969L0.767578 9.36621C0.738264 9.28452 0.726773 9.19681 0.734375 9.11035C0.742031 9.02393 0.768379 8.93953 0.811523 8.86426L1.82617 7.0918L0.772461 5.28906C0.729026 5.2148 0.702006 5.1315 0.693359 5.0459C0.684801 4.96052 0.695058 4.87421 0.722656 4.79297C1.00784 3.95289 1.45608 3.17678 2.04102 2.50977C2.09771 2.44503 2.16762 2.39274 2.24609 2.35742C2.32438 2.32222 2.40928 2.30426 2.49512 2.30469L4.58398 2.31543L5.61426 0.549805C5.65789 0.474997 5.71718 0.410066 5.78809 0.360352C5.8591 0.31064 5.94107 0.277156 6.02637 0.261719ZM7.53809 14.0195C7.59898 14.0196 7.65982 14.0181 7.7207 14.0166C7.65982 14.0181 7.59898 14.0196 7.53809 14.0195ZM7.2334 14.0117C7.28581 14.014 7.33818 14.0164 7.39062 14.0176C7.33818 14.0164 7.28581 14.014 7.2334 14.0117ZM7.85742 14.0127C7.89653 14.0109 7.93552 14.0073 7.97461 14.0049C7.93552 14.0073 7.89654 14.0109 7.85742 14.0127ZM6.91113 13.9902C6.97295 13.9958 7.03476 14.0009 7.09668 14.0049C7.03476 14.0009 6.97295 13.9958 6.91113 13.9902ZM6.6543 13.9619C6.6898 13.9665 6.72519 13.9716 6.76074 13.9756C6.72519 13.9716 6.6898 13.9665 6.6543 13.9619ZM5.91016 13.75C5.94027 13.7795 5.97474 13.8051 6.01172 13.8262L5.95898 13.791C5.94197 13.7782 5.92535 13.7649 5.91016 13.75ZM6.58008 12.9414H6.58105H6.58008ZM8.2002 1.41895C7.63858 1.33129 7.06722 1.32543 6.50391 1.40137L5.5127 3.10059C5.45667 3.19686 5.37383 3.27503 5.27539 3.32715C5.21254 3.36088 5.14878 3.39942 5.08594 3.43555L5.08496 3.43457C4.99197 3.48895 4.88605 3.51825 4.77832 3.51758L2.77637 3.50586C2.43354 3.9367 2.15694 4.41647 1.95508 4.92871L2.96875 6.66211H2.96973C3.01013 6.73278 3.03531 6.81132 3.04492 6.8916L3.04883 6.97461C3.04667 7.04613 3.0485 7.11658 3.05078 7.18945C3.0548 7.30124 3.02821 7.41268 2.97266 7.50977L1.99609 9.21289C2.21404 9.7388 2.50744 10.2299 2.86621 10.6719L4.88281 10.7012H4.88379C4.99002 10.7034 5.09368 10.7341 5.18457 10.7891L5.39258 10.9082C5.45916 10.9464 5.51715 10.9978 5.56445 11.0576L5.6084 11.1201L6.6416 12.8486C7.20362 12.9365 7.77513 12.9432 8.33887 12.8672L9.3291 11.1689C9.38528 11.0722 9.46843 10.9926 9.56738 10.9404C9.63017 10.9067 9.69505 10.8701 9.75781 10.834L9.8291 10.7988C9.90336 10.7678 9.98341 10.7514 10.0645 10.752L12.0664 10.7646C12.4092 10.3324 12.6847 9.85062 12.8857 9.33691L11.8711 7.60645L11.8721 7.60547C11.8181 7.51108 11.7903 7.40365 11.792 7.29492L11.791 7.29395C11.7932 7.22206 11.7923 7.15042 11.79 7.07715C11.7862 6.96565 11.8128 6.85466 11.8682 6.75781L12.8438 5.05371C12.6258 4.52811 12.3333 4.03648 11.9746 3.59473L9.95801 3.56641H9.95703C9.85067 3.56414 9.74722 3.53265 9.65625 3.47754V3.47852L9.45898 3.36426L9.39258 3.32129C9.32844 3.27486 9.27351 3.21669 9.23242 3.14844V3.14746L8.2002 1.41895ZM2.4668 11.7559L2.57031 11.7686H2.57129C2.50157 11.7675 2.43246 11.7518 2.36914 11.7227L2.4668 11.7559ZM1.78809 11.082V11.0811V11.082ZM13.0244 11.3203C13.0502 11.2862 13.0774 11.2533 13.1025 11.2188C13.0774 11.2533 13.0502 11.2862 13.0244 11.3203ZM13.2051 11.0713C13.2348 11.0279 13.2643 10.9845 13.293 10.9404C13.2643 10.9845 13.2348 11.0279 13.2051 11.0713ZM9.90918 10.876C9.90231 10.8782 9.89544 10.8803 9.88867 10.8828C9.89545 10.8803 9.90231 10.8782 9.90918 10.876ZM13.3535 10.8447C13.3903 10.7861 13.426 10.7268 13.4609 10.667C13.426 10.7268 13.3903 10.7861 13.3535 10.8447ZM13.5049 10.5928C13.5426 10.5264 13.5789 10.4593 13.6143 10.3916C13.5789 10.4593 13.5426 10.5264 13.5049 10.5928ZM13.6582 10.3066C13.695 10.2337 13.7305 10.1602 13.7646 10.0859C13.7305 10.1602 13.695 10.2337 13.6582 10.3066ZM7.2168 4.04004C7.82858 3.99994 8.43974 4.14269 8.9707 4.44922C9.68176 4.86085 10.2003 5.53844 10.4131 6.33203C10.6256 7.12573 10.5145 7.97155 10.1045 8.68359C9.79803 9.21429 9.34157 9.64291 8.79199 9.91406C8.24214 10.1852 7.62346 10.287 7.01562 10.207C6.40793 10.127 5.83684 9.86895 5.37598 9.46484C4.91529 9.06072 4.58448 8.52844 4.42578 7.93652C4.26721 7.34451 4.28843 6.71808 4.48535 6.1377C4.68236 5.55755 5.04627 5.04792 5.53223 4.6748C6.01845 4.30171 6.60526 4.08027 7.2168 4.04004ZM13.7852 10.041C13.8281 9.94559 13.8697 9.84945 13.9082 9.75195V9.75098C13.8696 9.84876 13.8283 9.94531 13.7852 10.041ZM6.40918 9.95703C6.46044 9.97542 6.51219 9.99222 6.56445 10.0078C6.51219 9.99225 6.46044 9.97539 6.40918 9.95703ZM6.20996 9.87695C6.25096 9.89508 6.2922 9.91244 6.33398 9.92871C6.2922 9.91247 6.25097 9.89505 6.20996 9.87695ZM6.02832 9.79004C6.0678 9.81077 6.10809 9.82969 6.14844 9.84863C6.10808 9.82972 6.06781 9.81074 6.02832 9.79004ZM5.84082 9.68262C5.87596 9.70443 5.9113 9.72578 5.94727 9.74609C5.91128 9.7258 5.87597 9.7044 5.84082 9.68262ZM12.9131 9.53613C12.9421 9.46825 12.9707 9.40012 12.9971 9.33105L12.9961 9.33008C12.9697 9.3993 12.9422 9.46808 12.9131 9.53613ZM5.66602 9.56543C5.7015 9.59105 5.73694 9.61662 5.77344 9.64062C5.73693 9.61664 5.70151 9.59104 5.66602 9.56543ZM1.97461 9.41699C1.99284 9.4575 2.01311 9.49704 2.03223 9.53711C1.98023 9.42813 1.93016 9.31814 1.88477 9.20605L1.97461 9.41699ZM5.59277 9.5127C5.59556 9.51484 5.59877 9.51642 5.60156 9.51855C5.54737 9.47722 5.49386 9.43478 5.44238 9.38965L5.59277 9.5127ZM8.03125 5.33496C7.67547 5.21424 7.29063 5.20159 6.92773 5.29883C6.56509 5.39617 6.23977 5.59952 5.99219 5.88184C5.74452 6.16433 5.58615 6.51424 5.53711 6.88672C5.48824 7.25901 5.54977 7.63783 5.71582 7.97461C5.88202 8.31152 6.14537 8.59145 6.4707 8.7793C6.90703 9.0311 7.42549 9.09913 7.91211 8.96875C8.39876 8.83831 8.81448 8.52031 9.06641 8.08398C9.25414 7.7587 9.3409 7.38453 9.31641 7.00977C9.2918 6.635 9.15631 6.27555 8.92773 5.97754C8.69908 5.67961 8.38685 5.45577 8.03125 5.33496ZM6.17676 8.69922C6.25355 8.76023 6.3343 8.81676 6.41992 8.86621L6.4209 8.86523C6.33525 8.81578 6.2536 8.76024 6.17676 8.69922ZM8.47754 8.83203V8.83105V8.83203ZM5.77637 8.27246C5.83227 8.35318 5.89399 8.4295 5.96094 8.50098L5.86426 8.38965C5.83359 8.35168 5.80422 8.31265 5.77637 8.27246ZM4.52246 7.91113C4.5608 8.0541 4.60948 8.19346 4.66797 8.32812C4.60945 8.19325 4.56083 8.05334 4.52246 7.91016V7.91113ZM9.40039 6.85645C9.40722 6.90519 9.41278 6.95457 9.41602 7.00391C9.41922 7.05311 9.42035 7.1023 9.41992 7.15137C9.42035 7.10204 9.41926 7.05239 9.41602 7.00293C9.41279 6.95379 9.40719 6.90498 9.40039 6.85645ZM11.9004 6.95215C11.8982 6.96247 11.897 6.97295 11.8955 6.9834C11.8971 6.97295 11.8982 6.96247 11.9004 6.95215ZM4.65137 5.97754C4.62849 6.03229 4.60852 6.08831 4.58887 6.14453C4.60851 6.0883 4.6285 6.03229 4.65137 5.97754ZM4.73633 5.79492C4.7241 5.81941 4.71274 5.8443 4.70117 5.86914C4.71273 5.8443 4.72411 5.81941 4.73633 5.79492ZM4.84473 5.59863C4.82627 5.62957 4.80836 5.66078 4.79102 5.69238C4.80835 5.66077 4.82628 5.62957 4.84473 5.59863ZM4.95605 5.42383C4.93113 5.45972 4.90714 5.49624 4.88379 5.5332C4.90712 5.49623 4.93114 5.45973 4.95605 5.42383ZM8.31445 4.27051C8.52443 4.33607 8.72746 4.42504 8.91992 4.53613L8.9209 4.53516C8.72801 4.42379 8.52395 4.33516 8.31348 4.26953L8.31445 4.27051ZM5.09082 5.24609C5.06172 5.28198 5.03326 5.3183 5.00586 5.35547C5.03325 5.31828 5.06173 5.28199 5.09082 5.24609ZM6.63965 5.29199C6.64276 5.29067 6.6463 5.29037 6.64941 5.28906C6.6463 5.29037 6.64276 5.29067 6.63965 5.29199ZM7.9209 5.19824H7.92188H7.9209ZM6.90234 5.20215H6.90332H6.90234ZM5.23145 5.08496C5.19896 5.11965 5.16651 5.15429 5.13574 5.19043C5.1665 5.15428 5.19897 5.11966 5.23145 5.08496ZM13.9766 4.93652V4.9375V4.93652ZM0.922852 4.53613C0.885573 4.63126 0.850299 4.72727 0.817383 4.82422V4.8252C0.850362 4.72803 0.885496 4.63148 0.922852 4.53613ZM2.01855 4.5293H2.01953H2.01855ZM1.04688 4.24316C1.02195 4.29878 0.998013 4.35481 0.974609 4.41113C0.998008 4.35481 1.02196 4.29878 1.04688 4.24316ZM7.22363 4.13965L7.22461 4.14062L7.22363 4.13965ZM7.66699 4.14453L7.66602 4.14355L7.66699 4.14453ZM1.17188 3.97852C1.1445 4.03303 1.11865 4.08828 1.09277 4.14355C1.11864 4.08828 1.14451 4.03304 1.17188 3.97852ZM12.4287 4.0498V4.04883V4.0498ZM12.6348 2.66992V2.6709C12.8546 2.91962 13.0566 3.1828 13.2383 3.45898C13.1171 3.27471 12.987 3.09618 12.8486 2.92383C12.7796 2.83782 12.708 2.75273 12.6348 2.66992ZM1.30859 3.72168C1.28765 3.75921 1.26729 3.79703 1.24707 3.83496C1.26728 3.79703 1.28765 3.75921 1.30859 3.72168ZM2.72656 3.40723V3.4082L4.7793 3.41797V3.41699L2.72656 3.40723ZM12.0234 3.49707C12.0719 3.55591 12.1198 3.61522 12.166 3.67578L12.0234 3.49609L9.95898 3.4668L12.0234 3.49707ZM1.47852 3.43457C1.45114 3.47831 1.42381 3.52205 1.39746 3.56641C1.4238 3.52204 1.45115 3.47831 1.47852 3.43457ZM9.78809 3.43164C9.79329 3.43365 9.79845 3.43566 9.80371 3.4375C9.79845 3.43567 9.79329 3.43365 9.78809 3.43164ZM5.22852 3.23926V3.24023V3.23926ZM1.64746 3.17676C1.61837 3.21879 1.58963 3.26104 1.56152 3.30371C1.58963 3.26104 1.61837 3.21879 1.64746 3.17676ZM2.11523 2.5752H2.11621H2.11523ZM8.94629 0.53418C8.96978 0.559626 8.99096 0.587273 9.00879 0.617188C8.97313 0.557368 8.92497 0.505135 8.86816 0.464844L8.94629 0.53418ZM6.37305 0.307617C6.26302 0.322319 6.15337 0.34041 6.04395 0.360352C6.15337 0.340409 6.26301 0.322304 6.37305 0.307617ZM8.35059 0.325195C8.25055 0.310024 8.15027 0.296933 8.0498 0.286133C8.15027 0.296945 8.25055 0.310026 8.35059 0.325195ZM7.92578 0.275391C7.85971 0.269476 7.79372 0.26282 7.72754 0.258789C7.79372 0.262834 7.85971 0.269466 7.92578 0.275391ZM6.9502 0.255859C6.89287 0.258741 6.83558 0.262311 6.77832 0.266602C6.83559 0.262325 6.89287 0.258726 6.9502 0.255859ZM7.58008 0.25293C7.53418 0.251105 7.4883 0.248968 7.44238 0.248047C7.4883 0.24898 7.53418 0.251094 7.58008 0.25293ZM7.12988 0.249023C7.17448 0.24794 7.21907 0.247302 7.26367 0.24707C7.21907 0.247314 7.17448 0.247928 7.12988 0.249023ZM6.67871 0.274414C6.57668 0.283521 6.47471 0.294033 6.37305 0.307617C6.47471 0.294047 6.57668 0.283499 6.67871 0.274414Z",fill:"#97A3B7"})),C_=e=>A.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_189_1728)"},A.createElement("path",{d:"M2.33317 2.4672H11.6665V9.4672H3.01567L2.33317 10.1497V2.4672ZM2.33317 1.30054C1.6915 1.30054 1.17234 1.82554 1.17234 2.4672L1.1665 12.9672L3.49984 10.6339H11.6665C12.3082 10.6339 12.8332 10.1089 12.8332 9.4672V2.4672C12.8332 1.82554 12.3082 1.30054 11.6665 1.30054H2.33317ZM3.49984 7.13387H8.1665V8.30054H3.49984V7.13387ZM3.49984 5.38387H10.4998V6.55054H3.49984V5.38387ZM3.49984 3.63387H10.4998V4.80054H3.49984V3.63387Z",fill:"#97A3B7"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_189_1728"},A.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),x_=e=>A.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_3803_129233)"},A.createElement("path",{d:"M7.3335 4.66683H8.66683V6.00016H7.3335V4.66683ZM7.3335 7.3335H8.66683V11.3335H7.3335V7.3335ZM8.00016 1.3335C4.32016 1.3335 1.3335 4.32016 1.3335 8.00016C1.3335 11.6802 4.32016 14.6668 8.00016 14.6668C11.6802 14.6668 14.6668 11.6802 14.6668 8.00016C14.6668 4.32016 11.6802 1.3335 8.00016 1.3335ZM8.00016 13.3335C5.06016 13.3335 2.66683 10.9402 2.66683 8.00016C2.66683 5.06016 5.06016 2.66683 8.00016 2.66683C10.9402 2.66683 13.3335 5.06016 13.3335 8.00016C13.3335 10.9402 10.9402 13.3335 8.00016 13.3335Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_3803_129233"},A.createElement("rect",{width:16,height:16,fill:"white"})))),v_=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,f]=I.useState(!1),g=I.useRef(!1),[y,v]=I.useState(!1),[b,p]=I.useState([]),{mutate:h,isPending:m}=ZI(),{logoUrl:C,cardTitle:x,id:w,externalResourceId:E,connectorId:_,textToHighlight:T}=e.cardData||{},S=I.useMemo(()=>({key:T,card_id:w,card_title:x,connector_id:_,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[T,w,x,_,E,r,n]);if(I.useEffect(()=>{const z=Date.now();return()=>{c(cn.DATA_CARD_DURATION,{...S,duration:Date.now()-z})}},[c]),I.useEffect(()=>{var q,ne,ce;const z=(ce=(ne=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:ne.flatDetails)==null?void 0:ce.data;if(z){const V=z.sort((N,H)=>N.priority-H.priority);p(V),c(cn.OBJECT_HOVERED,S)}},[e,c,S]),!b||b.length===0)return null;const L=()=>{f(!0),c(cn.FEEDBACK_OPTION_CLICKED,S)},R=()=>{v(!0),c(cn.NEGATIVE_FEEDBACK_CLICKED,S)},k=z=>{const q={card_id:w,entity_id:E,comment:z.feedbackComment,option:z.feedbackOption,feedback_type:"entity_extraction"};typeof z.isThumbsUp<"u"&&(q.positive_feedback=z.isThumbsUp),h({conversationId:r,feedbackData:q},{onSuccess:()=>{l?c(cn.FEEDBACK_OPTION_SUBMITTED,S):y&&c(cn.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),v(!1),_e({message:r_,type:nn})},onError:()=>{_e({message:o_,type:Ue})}})},D=()=>{k({isThumbsUp:!0}),c(cn.POSITIVE_FEEDBACK_CLICKED,S)},M=z=>{k({...z,isThumbsUp:!1})},G=()=>{s==null||s(_),i()},Y=()=>{a==null||a()},X=z=>{c(cn.PERMALINK_CLICKED,{...S,clicked_value:z})},J=()=>{g.current||(c(cn.DATA_CARD_SCROLLED,S),g.current=!0)};return d.jsxs(d.Fragment,{children:[d.jsxs(c_,{children:[d.jsxs(f_,{onScroll:J,children:[d.jsxs(l_,{children:[d.jsxs(u.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[C&&d.jsx("img",{src:C,alt:"Logo",style:{marginRight:8},height:18,width:18}),d.jsx(u.Tooltip,{title:x,arrow:!0,placement:"top",children:d.jsx(u_,{variant:"h3",color:u.theme.palette.gray.black,width:o?"100px":"200px",children:x})})]}),o?d.jsx(b_,{variant:"text",size:"small",endIcon:d.jsx(u.icons.ArrowForward,{}),onClick:Y,children:QI}):null]}),d.jsx(d_,{}),d.jsx(u.Box,{paddingY:"16px",children:b.map(({key:z,value:q,label:ne,deepLink:ce})=>d.jsxs(g_,{children:[d.jsxs(p_,{children:[ne,":"]}),d.jsx(u.Tooltip,{title:(q==null?void 0:q.length)>ul?q:"",arrow:!0,placement:"top",children:ce?d.jsx(u.Link,{href:ce,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:u.theme.palette.primary.main},onClick:()=>X(q),children:Rd(q||"N/A",ul)}):d.jsx(h_,{children:Rd(q||"N/A",ul)})})]},z))})]}),d.jsxs(m_,{children:[d.jsx(u.Stack,{flexDirection:"row",alignItems:"center",children:t?d.jsx(ss,{arrow:!0,title:JI,placement:"top",children:d.jsx(u.IconButton,{onClick:G,children:d.jsx(y_,{})})}):d.jsxs(d.Fragment,{children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:12,children:$I}),d.jsx(ss,{arrow:!0,title:qI,placement:"top",children:d.jsx(u.IconButton,{size:"small",children:d.jsx(x_,{})})})]})}),d.jsxs(u.Stack,{flexDirection:"row",alignItems:"center",children:[d.jsx(ss,{arrow:!0,title:XI,placement:"top",children:d.jsx(u.IconButton,{size:"small",disabled:m,onClick:D,children:d.jsx(Np,{})})}),d.jsx(ss,{arrow:!0,title:zI,placement:"top",children:d.jsx(u.IconButton,{size:"small",disabled:m,onClick:R,children:d.jsx(Rp,{})})}),d.jsx(ss,{arrow:!0,title:YI,placement:"top",children:d.jsx(u.IconButton,{onClick:L,size:"small",disabled:m,children:d.jsx(C_,{})})})]})]})]}),d.jsx(Cr,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:d.jsx(Dp,{onCancel:()=>f(!1),onSubmit:k,isLoading:m,showOptions:!1,title:KI})}),d.jsx(Cr,{shown:y,setShown:v,borderRadius:12,sx:{zIndex:15002},children:d.jsx(Dp,{onCancel:()=>v(!1),onSubmit:M,isLoading:m,title:UI})})]})},Mp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,Pp=(e,t=350,n=400)=>{const r=e.getBoundingClientRect(),o=window.innerHeight,s=window.innerWidth,a=r.top,i=o-r.bottom;return i>=t||i>a?r.left<n/2?"bottom-start":s-r.right<n/2?"bottom-end":"bottom":r.left<n/2?"top-start":s-r.right<n/2?"top-end":"top"},E_=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${u.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",maxHeight:"300px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${u.theme.palette.gray.gray6}`,position:"relative"}}));function w_({elements:e,title:t,onKeyChange:n}){const[r,o]=I.useState(!1),[s,a]=I.useState(null),[i,c]=I.useState(""),[l,f]=I.useState("bottom"),[g,y]=I.useState(!1),v=I.useRef(null),b=I.useRef({x:0,y:0}),p=I.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]);I.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,R=L.textContent||"",k=Pp(L);f(k),c(R),n&&n(R),a(L),o(!0)},_=()=>{if(r&&s){const S=Pp(s);f(S)}},T=S=>{if(b.current={x:S.clientX,y:S.clientY},!r||g)return;const L=S.clientX,R=S.clientY;let k=!1;for(const D of e)if(Mp(L,R,D.getBoundingClientRect())){k=!0;break}if(!k){const D=document.querySelector(`.${u.tooltipClasses.tooltip}`);D&&Mp(L,R,D.getBoundingClientRect())&&(k=!0)}k||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",T),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",T),p()}}},[e,n,r,s,g,p]);const h=()=>{y(!0),p()},m=()=>{y(!1),v.current=setTimeout(()=>{o(!1),a(null)},150)},x=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,w=d.jsx("div",{onMouseEnter:h,onMouseLeave:m,children:x});return d.jsx(E_,{title:w,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:d.jsx("span",{})})}const I_=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=I.useState(null),[l,f]=I.useState([]),{data:g,isError:y}=HI(e,t,n);return I.useEffect(()=>{g?c(g):y&&c(null)},[g,y]),I.useEffect(()=>{let v=null;if(i&&Object.keys(i).length&&e){v=new WI(Object.keys(i)||[],f);const b=Object.keys(i).map(p=>{var m;const h=((m=i[p])==null?void 0:m.cardData)||{};return{key:p,card_title:h.cardTitle,connector_id:h.connectorId}});a(cn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:b})}return()=>{v&&v.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),d.jsx("div",{children:d.jsx(w_,{elements:l,title:(v,b)=>{var p;return!i||!v||!((p=i[v])!=null&&p.cardData)?d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray6,children:"Loading data..."}):d.jsx(v_,{smIds:n,conversationId:e||"",analysisData:i[v],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:b,sendTrackingEvent:a})}})})},__=({children:e})=>d.jsx(rc,{store:il,children:d.jsx(u.HiverProvider,{custom:!0,children:d.jsx(al,{children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:e})})})}),S_=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>d.jsx(cl,{children:d.jsxs(__,{children:[d.jsx(I_,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Ve.createPortal(d.jsx(ll,{id:"toast-message",children:d.jsx($a,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),jp={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},T_=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class A_{constructor({processDelay:t=1e3}){Me(this,"_processDelay");Me(this,"initialized",!1);Me(this,"_queue",[]);Me(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});Me(this,"ACTIONS",jp);this._processDelay=t}register(t){this._queueProps=t,!this.initialized&&(this.initialized=!0,this._delay(this._processDelay).then(()=>this._process()))}add(t){this._queue.push(t),this._process()}_delay(t){return new Promise(n=>setTimeout(n,t))}_process(){if(this.initialized)for(;this._queue.length>0;){const t=this._queue.shift();if(t)switch(t.type){case jp.OPEN_CREATE_FORM:T_(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var Ie=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(Ie||{}),Ba=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Ba||{});const L_=e=>{const t=[],n={};for(const r of e){const o=n[r.entityType];if(o===void 0){const s={type:r.entityType,entities:[r]};n[r.entityType]=t.length,t.push(s)}else t[o].entities.push(r)}return t},O_=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Ba.UNAUTHENTICATED?Ie.UNAUTHENTICATED:n.pending>0?Ie.PENDING:n.failed?Ie.ERROR:r.length===0?Ie.NOT_LOGGED:o?Ie.LOGGED:Ie.PAUSED},dl=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},A.createElement("path",{d:"M6.3335 8.99967H7.66683V10.333H6.3335V8.99967ZM6.3335 3.66634H7.66683V7.66634H6.3335V3.66634ZM6.9935 0.333008C3.3135 0.333008 0.333496 3.31967 0.333496 6.99967C0.333496 10.6797 3.3135 13.6663 6.9935 13.6663C10.6802 13.6663 13.6668 10.6797 13.6668 6.99967C13.6668 3.31967 10.6802 0.333008 6.9935 0.333008ZM7.00016 12.333C4.0535 12.333 1.66683 9.94634 1.66683 6.99967C1.66683 4.05301 4.0535 1.66634 7.00016 1.66634C9.94683 1.66634 12.3335 4.05301 12.3335 6.99967C12.3335 9.94634 9.94683 12.333 7.00016 12.333Z"})),F_=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},A.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z",fill:"white"})),k_=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},A.createElement("g",{clipPath:"url(#clip0_532_206243)"},A.createElement("path",{d:"M9.94092 3V0.75L6.94092 3.75L9.94092 6.75V4.5C12.4234 4.5 14.4409 6.5175 14.4409 9C14.4409 9.7575 14.2534 10.4775 13.9159 11.1L15.0109 12.195C15.5959 11.2725 15.9409 10.1775 15.9409 9C15.9409 5.685 13.2559 3 9.94092 3ZM9.94092 13.5C7.45842 13.5 5.44092 11.4825 5.44092 9C5.44092 8.2425 5.62842 7.5225 5.96592 6.9L4.87092 5.805C4.28592 6.7275 3.94092 7.8225 3.94092 9C3.94092 12.315 6.62592 15 9.94092 15V17.25L12.9409 14.25L9.94092 11.25V13.5Z"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_532_206243"},A.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),D_=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},A.createElement("g",{clipPath:"url(#clip0_1_11813)"},A.createElement("path",{d:"M9.05859 0C4.09059 0 0.0585938 4.032 0.0585938 9C0.0585938 13.968 4.09059 18 9.05859 18C14.0266 18 18.0586 13.968 18.0586 9C18.0586 4.032 14.0266 0 9.05859 0ZM8.15859 12.6H6.35859V5.4H8.15859V12.6ZM11.7586 12.6H9.95859V5.4H11.7586V12.6Z",fill:"#F2A579"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1_11813"},A.createElement("rect",{width:18,height:18,fill:"white"})))),Va=u.keyframes`
2432
2462
  from {
2433
2463
  transform: rotate(0deg);
2434
2464
  }
@@ -2441,73 +2471,73 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2441
2471
  border-radius: 50%;
2442
2472
  justify-content: center;
2443
2473
  align-items: center;
2444
- `,S_=u.styled(fl)`
2474
+ `,N_=u.styled(fl)`
2445
2475
  background-color: #ffe250;
2446
- `,A_=u.styled(fl)`
2476
+ `,R_=u.styled(fl)`
2447
2477
  background-color: #00bc7e;
2448
- `,T_=u.styled(fl)`
2478
+ `,M_=u.styled(fl)`
2449
2479
  animation: ${Va} 1s linear infinite;
2450
2480
  animation-fill-mode: backwards;
2451
2481
  animation-direction: reverse;
2452
- `,L_={[Ie.NOT_LOGGED]:d.jsx(S_,{children:d.jsx(yp,{})}),[Ie.PENDING]:d.jsx(T_,{children:d.jsx(I_,{})}),[Ie.LOGGED]:d.jsx(A_,{children:d.jsx(w_,{})}),[Ie.ERROR]:d.jsx(dl,{}),[Ie.UNAUTHENTICATED]:d.jsx(dl,{}),[Ie.PAUSED]:d.jsx(__,{})},Bp=u.styled(u.Typography)`
2482
+ `,P_={[Ie.NOT_LOGGED]:d.jsx(N_,{children:d.jsx(yp,{})}),[Ie.PENDING]:d.jsx(M_,{children:d.jsx(k_,{})}),[Ie.LOGGED]:d.jsx(R_,{children:d.jsx(F_,{})}),[Ie.ERROR]:d.jsx(dl,{}),[Ie.UNAUTHENTICATED]:d.jsx(dl,{}),[Ie.PAUSED]:d.jsx(D_,{})},Bp=u.styled(u.Typography)`
2453
2483
  font-size: 12px;
2454
2484
  line-height: 14px;
2455
2485
  font-weight: 500;
2456
2486
  color: #4d596c;
2457
- `,O_=u.styled(Bp)`
2487
+ `,j_=u.styled(Bp)`
2458
2488
  color: #6f7c90;
2459
- `,pl=e=>d.jsx(Bp,{children:e}),hl=e=>d.jsx(O_,{children:e}),F_={[Ie.NOT_LOGGED]:pl,[Ie.PENDING]:hl,[Ie.LOGGED]:pl,[Ie.PAUSED]:pl,[Ie.ERROR]:hl,[Ie.UNAUTHENTICATED]:hl},k_={[Ie.NOT_LOGGED]:"Sync conversation",[Ie.PENDING]:"Syncing in progress",[Ie.LOGGED]:"Synced",[Ie.PAUSED]:"Synced",[Ie.ERROR]:"Syncing failed",[Ie.UNAUTHENTICATED]:"Sync conversation"},qt=I.createContext({}),D_=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${u.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",height:"405px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${u.theme.palette.gray.gray6}`,position:"relative"}})),N_=u.styled(u.Box)`
2489
+ `,pl=e=>d.jsx(Bp,{children:e}),hl=e=>d.jsx(j_,{children:e}),B_={[Ie.NOT_LOGGED]:pl,[Ie.PENDING]:hl,[Ie.LOGGED]:pl,[Ie.PAUSED]:pl,[Ie.ERROR]:hl,[Ie.UNAUTHENTICATED]:hl},V_={[Ie.NOT_LOGGED]:"Sync conversation",[Ie.PENDING]:"Syncing in progress",[Ie.LOGGED]:"Synced",[Ie.PAUSED]:"Synced",[Ie.ERROR]:"Syncing failed",[Ie.UNAUTHENTICATED]:"Sync conversation"},qt=I.createContext({}),G_=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${u.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",height:"405px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${u.theme.palette.gray.gray6}`,position:"relative"}})),H_=u.styled(u.Box)`
2460
2490
  width: fit-content;
2461
2491
  height: fit-content;
2462
- `,R_=({children:e,renderTooltip:t,defaultOpen:n})=>{const[r,o]=I.useState(n),s=()=>o(!1),a=()=>o(!0),i=c=>{c.stopPropagation()};return d.jsx(u.ClickAwayListener,{onClickAway:s,children:d.jsx(N_,{onClick:a,children:d.jsx(D_,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:d.jsx(u.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},M_="Turn off to stop syncing this conversation.",P_="Turn on to continue syncing this conversation.",j_="Authentication failed",B_="Retry authentication to use this functionality and save in ':connectorName'",V_="Reach out to your admin to reauthenticate :connectorName",G_="Syncing this conversation to :connectorName. Refresh the page to see updates.",H_="Something went wrong while syncing this conversation. Please try again.",W_="No recommendations found",Z_="Already synced email cannot be removed",X_="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",z_="Log this email thread to your CRM",Y_="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",Vp="connector-agent_email-logger_welcomed",Gp="connector-agent_email-logger_welcome_shown",J_="Tell us how we can improve",q_="Everything looks good",Q_="Something is not working",$_="Please provide your feedback",U_="Feedback submitted",K_="Failed to submit feedback",Hp="email-logging",eS=[{label:"Records are not accurate",value:"not_accurate"},{label:"Search is not working",value:"search_not_working"},{label:"Other",value:"other"}],Ft={email_logging_intro_popup_shown:"email_logging_intro_popup_shown",email_logging_intro_popup_continue_clicked:"email_logging_intro_popup_continue_clicked",email_logging_intro_popup_learn_more_clicked:"email_logging_intro_popup_learn_more_clicked",email_logging_log_config_saved:"email_logging_log_config_saved",email_logging_log_config_canceled:"email_logging_log_config_canceled",email_logging_auto_log_enabled:"email_logging_auto_log_enabled",email_logging_auto_log_disabled:"email_logging_auto_log_disabled",email_logging_search_initiated:"email_logging_search_initiated",email_logging_search_results_found:"email_logging_search_results_found",email_logging_search_result_selected:"email_logging_search_result_selected",email_logging_smart_suggestion_initiated:"email_logging_smart_suggestion_initiated",email_logging_smart_suggestion_selected:"email_logging_smart_suggestion_selected",email_logging_smart_suggestion_not_found:"email_logging_smart_suggestion_not_found",email_logging_failed_clicked:"email_logging_failed_clicked"},tS={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:u.theme.palette.gray.gray3,padding:"0px"},nS={color:"#fff !important"},rS=u.styled(u.Stack)`
2492
+ `,W_=({children:e,renderTooltip:t,defaultOpen:n})=>{const[r,o]=I.useState(n),s=()=>o(!1),a=()=>o(!0),i=c=>{c.stopPropagation()};return d.jsx(u.ClickAwayListener,{onClickAway:s,children:d.jsx(H_,{onClick:a,children:d.jsx(G_,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:d.jsx(u.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},Z_="Turn off to stop syncing this conversation.",X_="Turn on to continue syncing this conversation.",z_="Authentication failed",Y_="Retry authentication to use this functionality and save in ':connectorName'",J_="Reach out to your admin to reauthenticate :connectorName",q_="Syncing this conversation to :connectorName. Refresh the page to see updates.",Q_="Something went wrong while syncing this conversation. Please try again.",$_="No recommendations found",U_="Already synced email cannot be removed",K_="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",eS="Log this email thread to your CRM",tS="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",Vp="connector-agent_email-logger_welcomed",Gp="connector-agent_email-logger_welcome_shown",nS="Tell us how we can improve",rS="Everything looks good",oS="Something is not working",sS="Please provide your feedback",aS="Feedback submitted",iS="Failed to submit feedback",Hp="email-logging",cS=[{label:"Records are not accurate",value:"not_accurate"},{label:"Search is not working",value:"search_not_working"},{label:"Other",value:"other"}],Dt={email_logging_intro_popup_shown:"email_logging_intro_popup_shown",email_logging_intro_popup_continue_clicked:"email_logging_intro_popup_continue_clicked",email_logging_intro_popup_learn_more_clicked:"email_logging_intro_popup_learn_more_clicked",email_logging_log_config_saved:"email_logging_log_config_saved",email_logging_log_config_canceled:"email_logging_log_config_canceled",email_logging_auto_log_enabled:"email_logging_auto_log_enabled",email_logging_auto_log_disabled:"email_logging_auto_log_disabled",email_logging_search_initiated:"email_logging_search_initiated",email_logging_search_results_found:"email_logging_search_results_found",email_logging_search_result_selected:"email_logging_search_result_selected",email_logging_smart_suggestion_initiated:"email_logging_smart_suggestion_initiated",email_logging_smart_suggestion_selected:"email_logging_smart_suggestion_selected",email_logging_smart_suggestion_not_found:"email_logging_smart_suggestion_not_found",email_logging_failed_clicked:"email_logging_failed_clicked"},lS={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:u.theme.palette.gray.gray3,padding:"0px"},uS={color:"#fff !important"},dS=u.styled(u.Stack)`
2463
2493
  box-sizing: border-box;
2464
2494
  padding: 16px;
2465
- `,oS=u.styled("img")`
2495
+ `,fS=u.styled("img")`
2466
2496
  display: block;
2467
2497
  width: 100%;
2468
2498
  aspect-ratio: 3 / 2;
2469
2499
  border-radius: 8px;
2470
2500
  background: #ecedff;
2471
2501
  object-fit: cover;
2472
- `,sS=u.styled(u.Typography)`
2502
+ `,pS=u.styled(u.Typography)`
2473
2503
  margin-top: 10px;
2474
2504
  color: #343c45;
2475
2505
  font-size: 14px;
2476
2506
  font-weight: 600;
2477
2507
  line-height: 18px;
2478
2508
  letter-spacing: -0.28px;
2479
- `,aS=u.styled(u.Typography)`
2509
+ `,hS=u.styled(u.Typography)`
2480
2510
  margin-top: 6px;
2481
2511
  color: #3e4c5a;
2482
2512
  font-size: 13px;
2483
2513
  font-weight: 400;
2484
2514
  line-height: 18px;
2485
2515
  letter-spacing: -0.13px;
2486
- `,iS=u.styled(u.Stack)`
2516
+ `,gS=u.styled(u.Stack)`
2487
2517
  margin-top: 20px;
2488
2518
  flex-flow: row nowrap;
2489
2519
  justify-content: flex-end;
2490
2520
  column-gap: 8px;
2491
- `,Wp=G0(),cS=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=I.useContext(qt),r=n==null?void 0:n.sendTrackingEvent;return I.useEffect(()=>{const o=Wp.getItem(Gp);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(Ft.email_logging_intro_popup_shown,{app_name:t}),Wp.setItem(Gp,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),d.jsxs(rS,{children:[d.jsx(oS,{src:X_,alt:"Welcome"}),d.jsx(sS,{children:z_}),d.jsx(aS,{children:Y_}),d.jsx(iS,{children:e?d.jsx(u.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},lS=({children:e,onContinue:t,connectorName:n})=>d.jsx(T1,{title:d.jsx(cS,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:tS,arrowStyle:nS,children:e}),uS={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:u.theme.palette.gray.gray3,padding:"0px"},dS={color:"#fff !important"},fS=u.styled(u.Box)`
2521
+ `,Wp=G0(),mS=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=I.useContext(qt),r=n==null?void 0:n.sendTrackingEvent;return I.useEffect(()=>{const o=Wp.getItem(Gp);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(Dt.email_logging_intro_popup_shown,{app_name:t}),Wp.setItem(Gp,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),d.jsxs(dS,{children:[d.jsx(fS,{src:K_,alt:"Welcome"}),d.jsx(pS,{children:eS}),d.jsx(hS,{children:tS}),d.jsx(gS,{children:e?d.jsx(u.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},bS=({children:e,onContinue:t,connectorName:n})=>d.jsx(A1,{title:d.jsx(mS,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:lS,arrowStyle:uS,children:e}),yS={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:u.theme.palette.gray.gray3,padding:"0px"},CS={color:"#fff !important"},xS=u.styled(u.Box)`
2492
2522
  padding: 16px;
2493
- `,pS=u.styled(u.Typography)`
2523
+ `,vS=u.styled(u.Typography)`
2494
2524
  font-weight: 600;
2495
2525
  font-size: 14px;
2496
2526
  line-height: 130%;
2497
2527
  color: ${u.theme.palette.gray.gray1};
2498
- `,hS=u.styled(u.Typography)`
2528
+ `,ES=u.styled(u.Typography)`
2499
2529
  font-weight: 400;
2500
2530
  font-size: 13px;
2501
2531
  line-height: 135%;
2502
2532
  color: ${u.theme.palette.gray.gray3};
2503
2533
  margin-top: 6px;
2504
- `,gS=u.styled(u.Box)`
2534
+ `,wS=u.styled(u.Box)`
2505
2535
  display: flex;
2506
2536
  justify-content: space-between;
2507
2537
  align-items: center;
2508
2538
  margin-top: 20px;
2509
2539
  width: 100%;
2510
- `,mS=e=>T.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.9082 1.37598C10.221 0.614497 11.8414 0.614651 13.1543 1.37598L19.9619 5.32422C21.2668 6.08111 22.0702 7.47589 22.0703 8.98438V16.916C22.0703 18.4247 21.2669 19.8192 19.9619 20.5762L13.1543 24.5244C11.8414 25.2858 10.2211 25.2859 8.9082 24.5244L2.10156 20.5762C0.796567 19.8192 -0.00683594 18.4247 -0.00683594 16.916V8.98438C-0.00668786 7.47589 0.796688 6.08111 2.10156 5.32422L8.9082 1.37598ZM11.9531 15.9727C11.9531 17.5841 13.2597 18.8906 14.8711 18.8906V15.3281C14.871 13.7167 13.5645 12.4102 11.9531 12.4102V15.9727ZM7.57617 15.6641C7.57619 17.2755 8.88271 18.582 10.4941 18.582V10.1592C10.4939 8.54793 9.18748 7.24219 7.57617 7.24219V15.6641Z",fill:"#D0D8E3"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.4643 7.74676V11.8643C27.8476 11.0201 28.9238 10.6646 29.6462 10.6646C31.4006 10.6646 32.4325 11.8199 32.4325 13.7898V17.0335C32.4325 17.4482 32.0935 17.8037 31.6512 17.8037C31.2384 17.8037 30.914 17.4482 30.914 17.0335V13.8787C30.914 12.7975 30.2359 12.1606 29.3808 12.1606C28.511 12.1606 27.4643 12.6493 27.4643 14.012V17.0335C27.4643 17.4482 27.1252 17.8037 26.6829 17.8037C26.2701 17.8037 25.9458 17.4482 25.9458 17.0335V7.74676C25.9458 7.33204 26.2849 6.97656 26.7272 6.97656C27.1399 6.97656 27.4643 7.33204 27.4643 7.74676ZM33.6052 8.01336C33.6052 7.46534 34.0769 7.05062 34.6224 7.05062C35.1826 7.05062 35.6249 7.46534 35.6249 8.01336C35.6249 8.56139 35.1826 8.97611 34.6224 8.97611C34.0769 8.97611 33.6052 8.56139 33.6052 8.01336ZM35.389 17.0335C35.389 17.4482 35.0499 17.8037 34.6077 17.8037C34.1949 17.8037 33.8705 17.4482 33.8705 17.0335V11.5089C33.8705 11.0941 34.1949 10.7387 34.6077 10.7387C35.0499 10.7387 35.389 11.0941 35.389 11.5089V17.0335ZM42.7241 11.7014L40.4685 17.1076C40.2915 17.5371 39.9967 17.8037 39.5544 17.8037H39.466C39.0237 17.8037 38.7141 17.5371 38.5372 17.1076L36.2963 11.7014C36.1341 11.3163 36.3848 10.8275 36.7976 10.7535C37.1956 10.6794 37.5642 10.872 37.7116 11.2571L39.5102 15.7894L41.3088 11.2571C41.4562 10.872 41.8248 10.6794 42.2228 10.7535C42.6356 10.8275 42.8862 11.3163 42.7241 11.7014ZM44.6044 13.701H48.5996C48.4522 12.6197 47.6708 11.9976 46.6388 11.9976C45.5774 11.9976 44.7518 12.6345 44.6044 13.701ZM50.0886 14.1157C50.0886 14.5156 49.7643 14.8118 49.3957 14.8118H44.6044C44.7518 15.8782 45.6069 16.5447 46.7125 16.5447C47.4349 16.5447 47.8477 16.293 48.349 15.8782C48.5996 15.6709 49.0124 15.5672 49.322 15.819C49.6021 16.0412 49.6168 16.5003 49.3515 16.7817C48.6586 17.5075 47.6561 17.8778 46.6388 17.8778C44.6781 17.8778 43.1006 16.4411 43.1006 14.249C43.1006 12.0569 44.6781 10.6646 46.6388 10.6646C48.5554 10.6646 50.0296 11.9976 50.0886 14.1157ZM54.4162 12.1013C53.1188 12.1013 52.5733 13.4047 52.5733 15.2413V17.0335C52.5733 17.4482 52.2343 17.8037 51.792 17.8037C51.3792 17.8037 51.0548 17.4482 51.0548 17.0335V11.5089C51.0548 11.0941 51.3792 10.7387 51.792 10.7387C52.2343 10.7387 52.5733 11.0941 52.5733 11.5089V12.3975C52.9272 11.1682 53.6053 10.6646 54.4604 10.6646C54.6815 10.6646 54.9027 10.6794 55.1091 10.7239C55.4924 10.8127 55.743 11.1978 55.6545 11.5977C55.5218 12.2642 54.8584 12.1013 54.4162 12.1013Z",fill:"#D0D8E3"})),bS=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?B_:V_,{connectorFunctions:s}=I.useContext(qt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return d.jsxs(fS,{children:[d.jsx(pS,{children:j_}),d.jsx(hS,{children:st(o,{connectorName:n})}),d.jsxs(gS,{children:[d.jsx("div",{children:d.jsx(mS,{})}),e?d.jsx(u.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},yS=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=I.useState(!0),i=()=>a(!0),c=()=>a(!1);return d.jsx(T1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?d.jsx(bS,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:uS,arrowStyle:dS,children:o})},CS=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=I.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=I.useState(()=>localStorage.getItem(Vp)==="true"),[f,g]=I.useState(!1),{connectorId:y,connectorName:v,connectorStatus:b}=n??{},p=t||b!==Ba.DISABLED,h=b===Ba.UNAUTHENTICATED,m=r===Ie.PENDING,C=()=>{localStorage.setItem(Vp,"true"),l(!0),g(!0),i==null||i(Ft.email_logging_intro_popup_continue_clicked,{app_name:v})};return c?h?d.jsx(yS,{connectorId:y,connectorName:v,isAdmin:t,isAuthenticated:!1,children:e}):o?d.jsx(u.Tooltip,{title:H_,children:e}):m?d.jsx(u.Tooltip,{title:G_.replace(":connectorName",v),children:e}):s?d.jsx(R_,{defaultOpen:f,renderTooltip:s,children:e}):d.jsx(d.Fragment,{children:e}):d.jsx(lS,{onContinue:p?C:void 0,connectorName:v,children:e})},xS=e=>T.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.6168 54.7446C28.6931 52.5589 31.0146 51.1102 33.0842 51.8174C35.9985 52.8133 40.0375 53.9024 44.0621 54.043C48.0034 54.1806 51.968 53.4097 54.8762 52.6339C57.0264 52.0602 59.2927 53.6932 59.215 55.9172C59.1742 57.0856 58.4742 58.1269 57.3723 58.5178C54.8051 59.4284 49.7633 60.8927 44.3075 60.7022C38.7694 60.5088 33.1999 58.6241 30.4004 57.5311C29.2637 57.0873 28.5742 55.9641 28.6168 54.7446Z",fill:"url(#paint0_linear_8481_102191)"}),T.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"url(#paint1_linear_8481_102191)"}),T.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},T.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"white"})),T.createElement("g",{mask:"url(#mask0_8481_102191)"},T.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),T.createElement("rect",{x:47.4368,y:59.3203,width:53.657,height:13.2235,transform:"rotate(-12 47.4368 59.3203)",fill:"url(#paint2_linear_8481_102191)"}),T.createElement("rect",{x:51.1907,y:76.9824,width:53.657,height:10.4263,transform:"rotate(-12 51.1907 76.9824)",fill:"url(#paint3_linear_8481_102191)"})),T.createElement("path",{opacity:.883952,d:"M113.939 51.0679C114.775 55 112.265 58.865 108.333 59.7008L107.842 59.8052C103.639 60.6986 99.5073 58.0155 98.6139 53.8123L97.205 47.1837L105.307 45.4616C109.239 44.6259 113.104 47.1359 113.939 51.0679Z",fill:"url(#paint4_linear_8481_102191)"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M68.7215 66.4138C67.1801 64.8725 67.6745 62.2062 69.587 61.1603C72.4457 59.5969 76.2861 57.1773 79.3785 54.0849C82.4099 51.0535 84.752 47.3461 86.2775 44.5465C87.3388 42.5989 90.0598 42.0819 91.6282 43.6503C92.4782 44.5003 92.758 45.7623 92.2604 46.8566C91.0829 49.4466 88.5191 54.344 84.4346 58.4285C80.2853 62.5778 74.8639 65.591 72.0553 66.9952C70.9363 67.5548 69.6062 67.2985 68.7215 66.4138Z",fill:"url(#paint5_linear_8481_102191)"}),T.createElement("rect",{x:48.7264,y:33.7744,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 48.7264 33.7744)",fill:"url(#paint6_linear_8481_102191)"}),T.createElement("rect",{x:50.0175,y:35.8193,width:4.0158,height:3.84848,rx:1.92424,transform:"rotate(-12 50.0175 35.8193)",fill:"#435C71"}),T.createElement("rect",{x:59.2875,y:31.5723,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 59.2875 31.5723)",fill:"#FFFEFE"}),T.createElement("path",{opacity:.883952,d:"M111.25 38.5376C110.415 34.6055 106.55 32.0955 102.618 32.9313L102.127 33.0356C97.9234 33.9291 95.2403 38.0607 96.1337 42.2639L97.5426 48.8925L105.644 47.1705C109.576 46.3347 112.086 42.4696 111.25 38.5376Z",fill:"url(#paint7_linear_8481_102191)"}),T.createElement("rect",{x:60.0181,y:33.8037,width:3.84848,height:3.84848,rx:1.90724,transform:"rotate(-12 60.0181 33.8037)",fill:"#435C71"}),T.createElement("path",{d:"M36.9246 59.1604C36.4487 60.717 34.7371 61.6271 33.1805 61.1512C32.3613 60.9007 31.7241 60.3475 31.3259 59.5987L25.2059 46.7983C24.9784 46.3703 25.1286 45.8788 25.5566 45.6513L28.338 44.1724C28.7659 43.9449 29.2574 44.0951 29.4849 44.5231L36.6496 56.8367C37.0728 57.5036 37.15 58.423 36.9246 59.1604Z",fill:"#FFDF9F"}),T.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),T.createElement("path",{d:"M26.6628 44.3769L26.9472 44.9118L28.0169 44.343L26.3106 41.1338L24.171 42.2714L25.0243 43.876C25.6661 43.5347 26.3215 43.7351 26.6628 44.3769Z",fill:"#FFB19F"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.26386 27.248C9.3428 20.4481 16.5101 16.6372 23.31 18.7161C30.11 20.7951 33.9209 27.9624 31.8419 34.7623C29.763 41.5622 22.5956 45.3731 15.7958 43.2942C8.99587 41.2152 5.18493 34.0479 7.26386 27.248ZM9.72157 27.9983C8.06843 33.4055 11.1399 39.1821 16.5471 40.8352C21.9543 42.4884 27.7309 39.4168 29.384 34.0096C31.0372 28.6024 27.9657 22.8258 22.5585 21.1727C17.1513 19.5196 11.3747 22.5911 9.72157 27.9983Z",fill:"#FFE69F"}),T.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),T.createElement("path",{d:"M14.3685 30.6746C15.7299 27.6867 18.9391 25.9803 22.1776 26.5225L22.2595 26.5475C23.7024 26.8095 24.3854 24.8682 23.1497 24.2218C22.3806 23.8074 21.5613 23.557 20.717 23.3884C17.3715 22.9031 14.0553 24.6664 12.6939 27.6543C12.2796 28.4235 12.0859 29.3497 12.0244 30.1372C11.8444 31.6051 13.8607 32.0424 14.4503 30.6997C14.3434 30.7566 14.3685 30.6746 14.3685 30.6746Z",fill:"#F6FBFF"}),T.createElement("path",{d:"M10.2904 29.0679C11.9436 23.6607 17.7202 20.5893 23.1274 22.2424C25.6671 23.0189 27.5785 24.6783 28.9301 26.704C27.7539 24.1048 25.508 22.0744 22.5586 21.1727C17.1514 19.5196 11.3748 22.591 9.72165 27.9982C8.81993 30.9476 9.32924 33.97 10.7444 36.3735C9.82081 34.1203 9.51395 31.6077 10.2904 29.0679Z",fill:"#ADCBE7"}),T.createElement("path",{opacity:.406087,d:"M36.4864 56.8021L36.1373 56.2691C36.3845 56.8563 36.428 57.5516 36.2372 58.1754C35.9273 59.189 34.5593 59.1971 34.0713 58.2806L28.3787 47.5877C28.0534 46.9767 27.3508 46.7619 26.7395 47.0866L25.7206 47.6277L31.4395 59.3516C31.7648 59.9627 32.27 60.5434 32.8706 60.8123C33.7054 61.1528 34.6593 61.1034 35.3726 60.7247C36.0858 60.3459 36.6602 59.5837 36.8444 58.7021C37.0351 58.0783 36.8117 57.4132 36.4864 56.8021Z",fill:"white"}),T.createElement("path",{d:"M29.8826 48.4977C29.8006 48.4726 29.6368 48.4225 29.5799 48.3155L28.1579 45.6411C28.0442 45.4272 28.1193 45.1814 28.3332 45.0677C28.5472 44.9539 28.7929 45.0291 28.9067 45.243L30.3287 47.9174C30.4424 48.1313 30.3673 48.3771 30.1534 48.4908C30.1284 48.5728 29.9645 48.5227 29.8826 48.4977Z",fill:"#FFF5EB"}),T.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),T.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),T.createElement("path",{d:"M89.1282 19.2055L68.2257 26.8725L45.9197 28.3898L44.4929 16.4082C44.3371 13.798 47.5283 11.4502 50.9859 11.6309L65.1429 12.369L67.3969 12.4869C68.5309 12.5463 69.7066 12.3289 70.7522 11.8627L78.6899 8.34726C81.725 6.99992 85.3012 7.87475 86.2125 10.1876L89.1282 19.2055Z",fill:"url(#paint8_linear_8481_102191)"}),T.createElement("path",{opacity:.479771,d:"M88.6262 19.0953L68.3101 26.5288L65.3314 12.5149L67.5211 12.6263C68.6228 12.6824 69.7652 12.471 70.7816 12.0192L78.4972 8.61266C81.4474 7.30707 84.9208 8.14856 85.8036 10.3829L88.6262 19.0953Z",fill:"#ADCBE7"}),T.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),T.createElement("path",{d:"M102.961 24.2033C103.125 24.9722 102.371 25.7829 101.278 26.015L37.9675 39.4722C36.8754 39.7043 35.8568 39.2704 35.6933 38.5015C35.5301 37.7336 36.284 36.922 37.3761 36.6898L100.687 23.2327C101.779 23.0005 102.798 23.4354 102.961 24.2033Z",fill:"#9ED1FF"}),T.createElement("path",{d:"M102.703 24.1718C102.838 24.805 102.067 25.5045 100.983 25.7349L69.5583 32.4144L69.0712 30.123L100.496 23.4436C101.58 23.2131 102.569 23.5394 102.703 24.1718Z",fill:"#78AFE1"}),T.createElement("defs",null,T.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFABC"}),T.createElement("stop",{offset:1,stopColor:"#FFA650"})),T.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"white"}),T.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),T.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#ECF7FF"}),T.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),gl=({message:e})=>d.jsxs(u.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[d.jsx(xS,{width:124,height:107}),d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:e})]}),jn="/v1/api",vS=`${jn}/connector/conversation/:conversationId/email_log_status`,ES=`${jn}/connector/conversation/:conversationId/entity_recommendations`,wS=`${jn}/connector/conversation/:conversationId/retry_emails_log`,IS=`${jn}/connector/conversation/:conversationId/validate_entity`,_S=`${jn}/connectors/forms/:formId/search`,SS=`${jn}/connector/conversation/:conversationId/log_emails`,AS=`${jn}/connector/feedback/conversation/:conversationId`,TS=`${jn}/connector/conversation/:conversationId/log_emails`,LS=async({payload:e,entity:t,conversationId:n})=>{if("externalResourceId"in t)return t;try{if(!n)throw new Error("Conversation ID is required to validate entity");const r=await Ee({url:st(IS,{conversationId:n}),data:e,method:Pe.POST}),o=r==null?void 0:r.data;if(!o.valid)throw new Error("Entity validation failed");return{...o,...t}}catch(r){throw console.error(r),r}},OS=({onSuccess:e,onError:t})=>Vt({mutationFn:LS,onSuccess:e,onError:t}),ml=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},T.createElement("path",{d:"M6.99967 13.6654C6.08856 13.6654 5.22745 13.4903 4.41634 13.14C3.60523 12.7898 2.89701 12.312 2.29167 11.7067C1.68634 11.1014 1.20856 10.3931 0.858341 9.58203C0.508119 8.77092 0.333008 7.90981 0.333008 6.9987C0.333008 6.07648 0.508119 5.2127 0.858341 4.40736C1.20856 3.60203 1.68634 2.89648 2.29167 2.2907C2.89701 1.68492 3.60523 1.20714 4.41634 0.857365C5.22745 0.507587 6.08856 0.332476 6.99967 0.332031C7.18856 0.332031 7.34701 0.396031 7.47501 0.524031C7.60301 0.652031 7.66679 0.810253 7.66634 0.998698C7.6659 1.18714 7.6019 1.34559 7.47434 1.47403C7.34679 1.60248 7.18856 1.66625 6.99967 1.66536C5.5219 1.66536 4.26345 2.18492 3.22434 3.22403C2.18523 4.26314 1.6659 5.52136 1.66634 6.9987C1.66679 8.47603 2.18634 9.73448 3.22501 10.774C4.26367 11.8136 5.5219 12.3329 6.99967 12.332C8.47745 12.3311 9.7359 11.8118 10.775 10.774C11.8141 9.73625 12.3335 8.47781 12.333 6.9987C12.333 6.80981 12.397 6.65159 12.525 6.52403C12.653 6.39648 12.8112 6.33248 12.9997 6.33203C13.1881 6.33159 13.3466 6.39559 13.475 6.52403C13.6035 6.65248 13.6672 6.8107 13.6663 6.9987C13.6663 7.90981 13.4912 8.77092 13.141 9.58203C12.7908 10.3931 12.313 11.1016 11.7077 11.7074C11.1023 12.3131 10.3968 12.7909 9.59101 13.1407C8.78523 13.4905 7.92145 13.6654 6.99967 13.6654Z"})),FS=u.styled(u.Stack)`
2540
+ `,IS=e=>A.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M8.9082 1.37598C10.221 0.614497 11.8414 0.614651 13.1543 1.37598L19.9619 5.32422C21.2668 6.08111 22.0702 7.47589 22.0703 8.98438V16.916C22.0703 18.4247 21.2669 19.8192 19.9619 20.5762L13.1543 24.5244C11.8414 25.2858 10.2211 25.2859 8.9082 24.5244L2.10156 20.5762C0.796567 19.8192 -0.00683594 18.4247 -0.00683594 16.916V8.98438C-0.00668786 7.47589 0.796688 6.08111 2.10156 5.32422L8.9082 1.37598ZM11.9531 15.9727C11.9531 17.5841 13.2597 18.8906 14.8711 18.8906V15.3281C14.871 13.7167 13.5645 12.4102 11.9531 12.4102V15.9727ZM7.57617 15.6641C7.57619 17.2755 8.88271 18.582 10.4941 18.582V10.1592C10.4939 8.54793 9.18748 7.24219 7.57617 7.24219V15.6641Z",fill:"#D0D8E3"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.4643 7.74676V11.8643C27.8476 11.0201 28.9238 10.6646 29.6462 10.6646C31.4006 10.6646 32.4325 11.8199 32.4325 13.7898V17.0335C32.4325 17.4482 32.0935 17.8037 31.6512 17.8037C31.2384 17.8037 30.914 17.4482 30.914 17.0335V13.8787C30.914 12.7975 30.2359 12.1606 29.3808 12.1606C28.511 12.1606 27.4643 12.6493 27.4643 14.012V17.0335C27.4643 17.4482 27.1252 17.8037 26.6829 17.8037C26.2701 17.8037 25.9458 17.4482 25.9458 17.0335V7.74676C25.9458 7.33204 26.2849 6.97656 26.7272 6.97656C27.1399 6.97656 27.4643 7.33204 27.4643 7.74676ZM33.6052 8.01336C33.6052 7.46534 34.0769 7.05062 34.6224 7.05062C35.1826 7.05062 35.6249 7.46534 35.6249 8.01336C35.6249 8.56139 35.1826 8.97611 34.6224 8.97611C34.0769 8.97611 33.6052 8.56139 33.6052 8.01336ZM35.389 17.0335C35.389 17.4482 35.0499 17.8037 34.6077 17.8037C34.1949 17.8037 33.8705 17.4482 33.8705 17.0335V11.5089C33.8705 11.0941 34.1949 10.7387 34.6077 10.7387C35.0499 10.7387 35.389 11.0941 35.389 11.5089V17.0335ZM42.7241 11.7014L40.4685 17.1076C40.2915 17.5371 39.9967 17.8037 39.5544 17.8037H39.466C39.0237 17.8037 38.7141 17.5371 38.5372 17.1076L36.2963 11.7014C36.1341 11.3163 36.3848 10.8275 36.7976 10.7535C37.1956 10.6794 37.5642 10.872 37.7116 11.2571L39.5102 15.7894L41.3088 11.2571C41.4562 10.872 41.8248 10.6794 42.2228 10.7535C42.6356 10.8275 42.8862 11.3163 42.7241 11.7014ZM44.6044 13.701H48.5996C48.4522 12.6197 47.6708 11.9976 46.6388 11.9976C45.5774 11.9976 44.7518 12.6345 44.6044 13.701ZM50.0886 14.1157C50.0886 14.5156 49.7643 14.8118 49.3957 14.8118H44.6044C44.7518 15.8782 45.6069 16.5447 46.7125 16.5447C47.4349 16.5447 47.8477 16.293 48.349 15.8782C48.5996 15.6709 49.0124 15.5672 49.322 15.819C49.6021 16.0412 49.6168 16.5003 49.3515 16.7817C48.6586 17.5075 47.6561 17.8778 46.6388 17.8778C44.6781 17.8778 43.1006 16.4411 43.1006 14.249C43.1006 12.0569 44.6781 10.6646 46.6388 10.6646C48.5554 10.6646 50.0296 11.9976 50.0886 14.1157ZM54.4162 12.1013C53.1188 12.1013 52.5733 13.4047 52.5733 15.2413V17.0335C52.5733 17.4482 52.2343 17.8037 51.792 17.8037C51.3792 17.8037 51.0548 17.4482 51.0548 17.0335V11.5089C51.0548 11.0941 51.3792 10.7387 51.792 10.7387C52.2343 10.7387 52.5733 11.0941 52.5733 11.5089V12.3975C52.9272 11.1682 53.6053 10.6646 54.4604 10.6646C54.6815 10.6646 54.9027 10.6794 55.1091 10.7239C55.4924 10.8127 55.743 11.1978 55.6545 11.5977C55.5218 12.2642 54.8584 12.1013 54.4162 12.1013Z",fill:"#D0D8E3"})),_S=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?Y_:J_,{connectorFunctions:s}=I.useContext(qt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return d.jsxs(xS,{children:[d.jsx(vS,{children:z_}),d.jsx(ES,{children:rt(o,{connectorName:n})}),d.jsxs(wS,{children:[d.jsx("div",{children:d.jsx(IS,{})}),e?d.jsx(u.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},SS=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=I.useState(!0),i=()=>a(!0),c=()=>a(!1);return d.jsx(A1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?d.jsx(_S,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:yS,arrowStyle:CS,children:o})},TS=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=I.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=I.useState(()=>localStorage.getItem(Vp)==="true"),[f,g]=I.useState(!1),{connectorId:y,connectorName:v,connectorStatus:b}=n??{},p=t||b!==Ba.DISABLED,h=b===Ba.UNAUTHENTICATED,m=r===Ie.PENDING,C=()=>{localStorage.setItem(Vp,"true"),l(!0),g(!0),i==null||i(Dt.email_logging_intro_popup_continue_clicked,{app_name:v})};return c?h?d.jsx(SS,{connectorId:y,connectorName:v,isAdmin:t,isAuthenticated:!1,children:e}):o?d.jsx(u.Tooltip,{title:Q_,children:e}):m?d.jsx(u.Tooltip,{title:q_.replace(":connectorName",v),children:e}):s?d.jsx(W_,{defaultOpen:f,renderTooltip:s,children:e}):d.jsx(d.Fragment,{children:e}):d.jsx(bS,{onContinue:p?C:void 0,connectorName:v,children:e})},AS=e=>A.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.6168 54.7446C28.6931 52.5589 31.0146 51.1102 33.0842 51.8174C35.9985 52.8133 40.0375 53.9024 44.0621 54.043C48.0034 54.1806 51.968 53.4097 54.8762 52.6339C57.0264 52.0602 59.2927 53.6932 59.215 55.9172C59.1742 57.0856 58.4742 58.1269 57.3723 58.5178C54.8051 59.4284 49.7633 60.8927 44.3075 60.7022C38.7694 60.5088 33.1999 58.6241 30.4004 57.5311C29.2637 57.0873 28.5742 55.9641 28.6168 54.7446Z",fill:"url(#paint0_linear_8481_102191)"}),A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"url(#paint1_linear_8481_102191)"}),A.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"white"})),A.createElement("g",{mask:"url(#mask0_8481_102191)"},A.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),A.createElement("rect",{x:47.4368,y:59.3203,width:53.657,height:13.2235,transform:"rotate(-12 47.4368 59.3203)",fill:"url(#paint2_linear_8481_102191)"}),A.createElement("rect",{x:51.1907,y:76.9824,width:53.657,height:10.4263,transform:"rotate(-12 51.1907 76.9824)",fill:"url(#paint3_linear_8481_102191)"})),A.createElement("path",{opacity:.883952,d:"M113.939 51.0679C114.775 55 112.265 58.865 108.333 59.7008L107.842 59.8052C103.639 60.6986 99.5073 58.0155 98.6139 53.8123L97.205 47.1837L105.307 45.4616C109.239 44.6259 113.104 47.1359 113.939 51.0679Z",fill:"url(#paint4_linear_8481_102191)"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M68.7215 66.4138C67.1801 64.8725 67.6745 62.2062 69.587 61.1603C72.4457 59.5969 76.2861 57.1773 79.3785 54.0849C82.4099 51.0535 84.752 47.3461 86.2775 44.5465C87.3388 42.5989 90.0598 42.0819 91.6282 43.6503C92.4782 44.5003 92.758 45.7623 92.2604 46.8566C91.0829 49.4466 88.5191 54.344 84.4346 58.4285C80.2853 62.5778 74.8639 65.591 72.0553 66.9952C70.9363 67.5548 69.6062 67.2985 68.7215 66.4138Z",fill:"url(#paint5_linear_8481_102191)"}),A.createElement("rect",{x:48.7264,y:33.7744,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 48.7264 33.7744)",fill:"url(#paint6_linear_8481_102191)"}),A.createElement("rect",{x:50.0175,y:35.8193,width:4.0158,height:3.84848,rx:1.92424,transform:"rotate(-12 50.0175 35.8193)",fill:"#435C71"}),A.createElement("rect",{x:59.2875,y:31.5723,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 59.2875 31.5723)",fill:"#FFFEFE"}),A.createElement("path",{opacity:.883952,d:"M111.25 38.5376C110.415 34.6055 106.55 32.0955 102.618 32.9313L102.127 33.0356C97.9234 33.9291 95.2403 38.0607 96.1337 42.2639L97.5426 48.8925L105.644 47.1705C109.576 46.3347 112.086 42.4696 111.25 38.5376Z",fill:"url(#paint7_linear_8481_102191)"}),A.createElement("rect",{x:60.0181,y:33.8037,width:3.84848,height:3.84848,rx:1.90724,transform:"rotate(-12 60.0181 33.8037)",fill:"#435C71"}),A.createElement("path",{d:"M36.9246 59.1604C36.4487 60.717 34.7371 61.6271 33.1805 61.1512C32.3613 60.9007 31.7241 60.3475 31.3259 59.5987L25.2059 46.7983C24.9784 46.3703 25.1286 45.8788 25.5566 45.6513L28.338 44.1724C28.7659 43.9449 29.2574 44.0951 29.4849 44.5231L36.6496 56.8367C37.0728 57.5036 37.15 58.423 36.9246 59.1604Z",fill:"#FFDF9F"}),A.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),A.createElement("path",{d:"M26.6628 44.3769L26.9472 44.9118L28.0169 44.343L26.3106 41.1338L24.171 42.2714L25.0243 43.876C25.6661 43.5347 26.3215 43.7351 26.6628 44.3769Z",fill:"#FFB19F"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.26386 27.248C9.3428 20.4481 16.5101 16.6372 23.31 18.7161C30.11 20.7951 33.9209 27.9624 31.8419 34.7623C29.763 41.5622 22.5956 45.3731 15.7958 43.2942C8.99587 41.2152 5.18493 34.0479 7.26386 27.248ZM9.72157 27.9983C8.06843 33.4055 11.1399 39.1821 16.5471 40.8352C21.9543 42.4884 27.7309 39.4168 29.384 34.0096C31.0372 28.6024 27.9657 22.8258 22.5585 21.1727C17.1513 19.5196 11.3747 22.5911 9.72157 27.9983Z",fill:"#FFE69F"}),A.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),A.createElement("path",{d:"M14.3685 30.6746C15.7299 27.6867 18.9391 25.9803 22.1776 26.5225L22.2595 26.5475C23.7024 26.8095 24.3854 24.8682 23.1497 24.2218C22.3806 23.8074 21.5613 23.557 20.717 23.3884C17.3715 22.9031 14.0553 24.6664 12.6939 27.6543C12.2796 28.4235 12.0859 29.3497 12.0244 30.1372C11.8444 31.6051 13.8607 32.0424 14.4503 30.6997C14.3434 30.7566 14.3685 30.6746 14.3685 30.6746Z",fill:"#F6FBFF"}),A.createElement("path",{d:"M10.2904 29.0679C11.9436 23.6607 17.7202 20.5893 23.1274 22.2424C25.6671 23.0189 27.5785 24.6783 28.9301 26.704C27.7539 24.1048 25.508 22.0744 22.5586 21.1727C17.1514 19.5196 11.3748 22.591 9.72165 27.9982C8.81993 30.9476 9.32924 33.97 10.7444 36.3735C9.82081 34.1203 9.51395 31.6077 10.2904 29.0679Z",fill:"#ADCBE7"}),A.createElement("path",{opacity:.406087,d:"M36.4864 56.8021L36.1373 56.2691C36.3845 56.8563 36.428 57.5516 36.2372 58.1754C35.9273 59.189 34.5593 59.1971 34.0713 58.2806L28.3787 47.5877C28.0534 46.9767 27.3508 46.7619 26.7395 47.0866L25.7206 47.6277L31.4395 59.3516C31.7648 59.9627 32.27 60.5434 32.8706 60.8123C33.7054 61.1528 34.6593 61.1034 35.3726 60.7247C36.0858 60.3459 36.6602 59.5837 36.8444 58.7021C37.0351 58.0783 36.8117 57.4132 36.4864 56.8021Z",fill:"white"}),A.createElement("path",{d:"M29.8826 48.4977C29.8006 48.4726 29.6368 48.4225 29.5799 48.3155L28.1579 45.6411C28.0442 45.4272 28.1193 45.1814 28.3332 45.0677C28.5472 44.9539 28.7929 45.0291 28.9067 45.243L30.3287 47.9174C30.4424 48.1313 30.3673 48.3771 30.1534 48.4908C30.1284 48.5728 29.9645 48.5227 29.8826 48.4977Z",fill:"#FFF5EB"}),A.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),A.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),A.createElement("path",{d:"M89.1282 19.2055L68.2257 26.8725L45.9197 28.3898L44.4929 16.4082C44.3371 13.798 47.5283 11.4502 50.9859 11.6309L65.1429 12.369L67.3969 12.4869C68.5309 12.5463 69.7066 12.3289 70.7522 11.8627L78.6899 8.34726C81.725 6.99992 85.3012 7.87475 86.2125 10.1876L89.1282 19.2055Z",fill:"url(#paint8_linear_8481_102191)"}),A.createElement("path",{opacity:.479771,d:"M88.6262 19.0953L68.3101 26.5288L65.3314 12.5149L67.5211 12.6263C68.6228 12.6824 69.7652 12.471 70.7816 12.0192L78.4972 8.61266C81.4474 7.30707 84.9208 8.14856 85.8036 10.3829L88.6262 19.0953Z",fill:"#ADCBE7"}),A.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),A.createElement("path",{d:"M102.961 24.2033C103.125 24.9722 102.371 25.7829 101.278 26.015L37.9675 39.4722C36.8754 39.7043 35.8568 39.2704 35.6933 38.5015C35.5301 37.7336 36.284 36.922 37.3761 36.6898L100.687 23.2327C101.779 23.0005 102.798 23.4354 102.961 24.2033Z",fill:"#9ED1FF"}),A.createElement("path",{d:"M102.703 24.1718C102.838 24.805 102.067 25.5045 100.983 25.7349L69.5583 32.4144L69.0712 30.123L100.496 23.4436C101.58 23.2131 102.569 23.5394 102.703 24.1718Z",fill:"#78AFE1"}),A.createElement("defs",null,A.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFABC"}),A.createElement("stop",{offset:1,stopColor:"#FFA650"})),A.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"white"}),A.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),A.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#ECF7FF"}),A.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),gl=({message:e})=>d.jsxs(u.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[d.jsx(AS,{width:124,height:107}),d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:e})]}),Mn="/v1/api",LS=`${Mn}/connector/conversation/:conversationId/email_log_status`,OS=`${Mn}/connector/conversation/:conversationId/entity_recommendations`,FS=`${Mn}/connector/conversation/:conversationId/retry_emails_log`,kS=`${Mn}/connector/conversation/:conversationId/validate_entity`,DS=`${Mn}/connectors/forms/:formId/search`,NS=`${Mn}/connector/conversation/:conversationId/log_emails`,RS=`${Mn}/connector/feedback/conversation/:conversationId`,MS=`${Mn}/connector/conversation/:conversationId/log_emails`,PS=async({payload:e,entity:t,conversationId:n})=>{if("externalResourceId"in t)return t;try{if(!n)throw new Error("Conversation ID is required to validate entity");const r=await Ee({url:rt(kS,{conversationId:n}),data:e,method:Pe.POST}),o=r==null?void 0:r.data;if(!o.valid)throw new Error("Entity validation failed");return{...o,...t}}catch(r){throw console.error(r),r}},jS=({onSuccess:e,onError:t})=>Vt({mutationFn:PS,onSuccess:e,onError:t}),ml=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},A.createElement("path",{d:"M6.99967 13.6654C6.08856 13.6654 5.22745 13.4903 4.41634 13.14C3.60523 12.7898 2.89701 12.312 2.29167 11.7067C1.68634 11.1014 1.20856 10.3931 0.858341 9.58203C0.508119 8.77092 0.333008 7.90981 0.333008 6.9987C0.333008 6.07648 0.508119 5.2127 0.858341 4.40736C1.20856 3.60203 1.68634 2.89648 2.29167 2.2907C2.89701 1.68492 3.60523 1.20714 4.41634 0.857365C5.22745 0.507587 6.08856 0.332476 6.99967 0.332031C7.18856 0.332031 7.34701 0.396031 7.47501 0.524031C7.60301 0.652031 7.66679 0.810253 7.66634 0.998698C7.6659 1.18714 7.6019 1.34559 7.47434 1.47403C7.34679 1.60248 7.18856 1.66625 6.99967 1.66536C5.5219 1.66536 4.26345 2.18492 3.22434 3.22403C2.18523 4.26314 1.6659 5.52136 1.66634 6.9987C1.66679 8.47603 2.18634 9.73448 3.22501 10.774C4.26367 11.8136 5.5219 12.3329 6.99967 12.332C8.47745 12.3311 9.7359 11.8118 10.775 10.774C11.8141 9.73625 12.3335 8.47781 12.333 6.9987C12.333 6.80981 12.397 6.65159 12.525 6.52403C12.653 6.39648 12.8112 6.33248 12.9997 6.33203C13.1881 6.33159 13.3466 6.39559 13.475 6.52403C13.6035 6.65248 13.6672 6.8107 13.6663 6.9987C13.6663 7.90981 13.4912 8.77092 13.141 9.58203C12.7908 10.3931 12.313 11.1016 11.7077 11.7074C11.1023 12.3131 10.3968 12.7909 9.59101 13.1407C8.78523 13.4905 7.92145 13.6654 6.99967 13.6654Z"})),BS=u.styled(u.Stack)`
2511
2541
  display: flex;
2512
2542
  flex-flow: row nowrap;
2513
2543
  justify-content: flex-start;
@@ -2523,7 +2553,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2523
2553
  cursor: not-allowed;
2524
2554
  }
2525
2555
  `:null}
2526
- `,kS=u.styled(u.Checkbox)`
2556
+ `,VS=u.styled(u.Checkbox)`
2527
2557
  padding: 0;
2528
2558
  margin: 0;
2529
2559
  svg {
@@ -2539,12 +2569,12 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2539
2569
  input:checked:disabled ~ svg {
2540
2570
  fill: #d6dde8;
2541
2571
  }
2542
- `,DS=u.styled(ml)`
2572
+ `,GS=u.styled(ml)`
2543
2573
  width: 16px;
2544
2574
  height: 16px;
2545
2575
  fill: #506dff;
2546
2576
  animation: ${Va} 1s linear infinite;
2547
- `,NS=u.styled(u.Typography)`
2577
+ `,HS=u.styled(u.Typography)`
2548
2578
  font-size: 13px;
2549
2579
  overflow: hidden;
2550
2580
  text-overflow: ellipsis;
@@ -2552,7 +2582,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2552
2582
  `,Zp=u.styled(u.Stack)`
2553
2583
  margin-left: auto;
2554
2584
  flex-shrink: 0;
2555
- `,RS=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=I.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,g=m=>{o==null||o(C=>({...C,[l+c]:m})),i==null||i(Ft.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},y=()=>{i==null||i(Ft.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:v,isPending:b,isError:p}=OS({onSuccess:g,onError:y}),h=()=>{!o||b||r||p||(n?o(m=>{const C={...m};return delete C[l+c],C}):(i==null||i(Ft.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),v({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return d.jsx(u.Tooltip,{title:r?Z_:"",placement:"top",children:d.jsxs(FS,{disabled:b||p,onClick:h,children:[d.jsx(kS,{value:n,checked:n,disabled:r}),d.jsx(u.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:d.jsx(NS,{variant:"body2",children:c})}),b?d.jsx(Zp,{children:d.jsx(DS,{})}):null,p?d.jsx(u.Tooltip,{title:"Record not found in "+e,children:d.jsx(Zp,{children:d.jsx(dl,{})})}):null]})})},MS=u.styled(u.Stack)`
2585
+ `,WS=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=I.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,g=m=>{o==null||o(C=>({...C,[l+c]:m})),i==null||i(Dt.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},y=()=>{i==null||i(Dt.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:v,isPending:b,isError:p}=jS({onSuccess:g,onError:y}),h=()=>{!o||b||r||p||(n?o(m=>{const C={...m};return delete C[l+c],C}):(i==null||i(Dt.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),v({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return d.jsx(u.Tooltip,{title:r?U_:"",placement:"top",children:d.jsxs(BS,{disabled:b||p,onClick:h,children:[d.jsx(VS,{value:n,checked:n,disabled:r}),d.jsx(u.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:d.jsx(HS,{variant:"body2",children:c})}),b?d.jsx(Zp,{children:d.jsx(GS,{})}):null,p?d.jsx(u.Tooltip,{title:"Record not found in "+e,children:d.jsx(Zp,{children:d.jsx(dl,{})})}):null]})})},ZS=u.styled(u.Stack)`
2556
2586
  color: #343c45;
2557
2587
  padding: 18px 0;
2558
2588
  box-sizing: border-box;
@@ -2563,7 +2593,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2563
2593
  overflow-y: auto;
2564
2594
  scrollbar-width: thin;
2565
2595
  scrollbar-color: #97a3b7 transparent;
2566
- `;const PS=u.styled(u.Stack)`
2596
+ `;const XS=u.styled(u.Stack)`
2567
2597
  display: grid;
2568
2598
  grid-template-rows: max-content 0fr;
2569
2599
  transition: grid-template-rows 300ms ease-out;
@@ -2576,7 +2606,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2576
2606
  transform: rotate(-90deg);
2577
2607
  }
2578
2608
  }
2579
- `,jS=u.styled(u.Stack)`
2609
+ `,zS=u.styled(u.Stack)`
2580
2610
  cursor: pointer;
2581
2611
  flex-flow: row nowrap;
2582
2612
  justify-content: space-between;
@@ -2589,19 +2619,19 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2589
2619
  transform-origin: center;
2590
2620
  transition: transform 300ms ease-out;
2591
2621
  }
2592
- `,BS=u.styled(u.Typography)`
2622
+ `,YS=u.styled(u.Typography)`
2593
2623
  font-size: 13px;
2594
2624
  line-height: 18px;
2595
2625
  font-weight: 400;
2596
2626
  color: #6f7c90;
2597
2627
  text-transform: capitalize;
2598
- `,VS=u.styled(u.Stack)`
2628
+ `,JS=u.styled(u.Stack)`
2599
2629
  overflow: hidden;
2600
- `,Xp=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00483 12.5052C7.73146 12.7786 7.73146 13.2218 8.00483 13.4952C8.2782 13.7685 8.72141 13.7685 8.99478 13.4952L11.9948 10.4952C12.2681 10.2218 12.2681 9.77859 11.9948 9.50522L8.99478 6.50522C8.72141 6.23185 8.2782 6.23185 8.00483 6.50522C7.73146 6.77859 7.73146 7.2218 8.00483 7.49517L10.5099 10.0002L8.00483 12.5052Z"})),zp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=I.useMemo(()=>v_(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const l=c.parentElement;l&&l.classList.toggle("expanded")};return t!=null&&t.length?d.jsx(MS,{children:s.map(i=>d.jsxs(PS,{className:"expanded",children:[d.jsxs(jS,{onClick:a,children:[d.jsx(BS,{variant:"body2",children:i.type}),d.jsx(Xp,{className:"toggle-arrow-icon"})]}),d.jsx(VS,{children:i.entities.map(c=>d.jsx(RS,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):d.jsx(gl,{message:W_})},GS=u.styled(u.Stack)`
2630
+ `,Xp=e=>A.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00483 12.5052C7.73146 12.7786 7.73146 13.2218 8.00483 13.4952C8.2782 13.7685 8.72141 13.7685 8.99478 13.4952L11.9948 10.4952C12.2681 10.2218 12.2681 9.77859 11.9948 9.50522L8.99478 6.50522C8.72141 6.23185 8.2782 6.23185 8.00483 6.50522C7.73146 6.77859 7.73146 7.2218 8.00483 7.49517L10.5099 10.0002L8.00483 12.5052Z"})),zp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=I.useMemo(()=>L_(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const l=c.parentElement;l&&l.classList.toggle("expanded")};return t!=null&&t.length?d.jsx(ZS,{children:s.map(i=>d.jsxs(XS,{className:"expanded",children:[d.jsxs(zS,{onClick:a,children:[d.jsx(YS,{variant:"body2",children:i.type}),d.jsx(Xp,{className:"toggle-arrow-icon"})]}),d.jsx(JS,{children:i.entities.map(c=>d.jsx(WS,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):d.jsx(gl,{message:$_})},qS=u.styled(u.Stack)`
2601
2631
  padding: 18px 0;
2602
2632
  row-gap: 12px;
2603
2633
  box-sizing: border-box;
2604
- `,HS=u.styled(u.Stack)`
2634
+ `,QS=u.styled(u.Stack)`
2605
2635
  cursor: pointer;
2606
2636
  position: relative;
2607
2637
  z-index: 1;
@@ -2612,7 +2642,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2612
2642
  background-color: rgba(0, 0, 0, 0.04);
2613
2643
  z-index: -1;
2614
2644
  }
2615
- `,WS=({searchText:e,connectorName:t,formData:n,onClick:r})=>d.jsxs(HS,{onClick:r,children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray1,children:e}),d.jsxs(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:"12px",textTransform:"capitalize",children:[t," - ",n==null?void 0:n.searchObject]})]}),ZS=({searchText:e,connectorName:t,options:n,onSearch:r})=>{const o=s=>{r({formId:s.id,searchObject:s.searchObject,searchText:e})};return d.jsx(GS,{children:n.map(s=>d.jsx(WS,{searchText:e,connectorName:t,formData:s,onClick:()=>o(s)},t+(s==null?void 0:s.searchObject)))})},XS=u.styled(u.Stack)`
2645
+ `,$S=({searchText:e,connectorName:t,formData:n,onClick:r})=>d.jsxs(QS,{onClick:r,children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray1,children:e}),d.jsxs(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:"12px",textTransform:"capitalize",children:[t," - ",n==null?void 0:n.searchObject]})]}),US=({searchText:e,connectorName:t,options:n,onSearch:r})=>{const o=s=>{r({formId:s.id,searchObject:s.searchObject,searchText:e})};return d.jsx(qS,{children:n.map(s=>d.jsx($S,{searchText:e,connectorName:t,formData:s,onClick:()=>o(s)},t+(s==null?void 0:s.searchObject)))})},KS=u.styled(u.Stack)`
2616
2646
  padding: 12px 12px 12px 11px;
2617
2647
  border: 1px solid ${u.theme.palette.gray.gray5};
2618
2648
  border-radius: 8px;
@@ -2626,26 +2656,26 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2626
2656
  transform: translateX(6px);
2627
2657
  }
2628
2658
  }
2629
- `,zS=u.styled(u.Stack)`
2659
+ `,eT=u.styled(u.Stack)`
2630
2660
  padding: 14px 0;
2631
2661
  row-gap: 12px;
2632
2662
  column-gap: 16px;
2633
2663
  box-sizing: border-box;
2634
- `,YS=u.styled(u.Stack)`
2664
+ `,tT=u.styled(u.Stack)`
2635
2665
  padding: 8px 0;
2636
2666
  row-gap: 12px;
2637
2667
  box-sizing: border-box;
2638
- `,JS=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return d.jsxs(XS,{onClick:t,direction:"row",children:[d.jsx(u.Stack,{flexGrow:1,children:d.jsx(u.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),d.jsx(Xp,{})]},n)},qS=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=I.useContext(qt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return d.jsx(gl,{message:"No results found"});const c=l=>{o(l),i==null||i(Ft.email_logging_search_result_selected,{app_name:e,object_name:l.displayValue,object_key:l.entityType})};return d.jsxs(zS,{children:[d.jsxs(u.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),d.jsx(YS,{children:t.map(l=>d.jsx(JS,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},QS=u.styled(u.Stack)`
2668
+ `,nT=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return d.jsxs(KS,{onClick:t,direction:"row",children:[d.jsx(u.Stack,{flexGrow:1,children:d.jsx(u.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),d.jsx(Xp,{})]},n)},rT=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=I.useContext(qt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return d.jsx(gl,{message:"No results found"});const c=l=>{o(l),i==null||i(Dt.email_logging_search_result_selected,{app_name:e,object_name:l.displayValue,object_key:l.entityType})};return d.jsxs(eT,{children:[d.jsxs(u.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),d.jsx(tT,{children:t.map(l=>d.jsx(nT,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},oT=u.styled(u.Stack)`
2639
2669
  height: 100%;
2640
2670
  row-gap: 8px;
2641
2671
  align-items: center;
2642
2672
  justify-content: center;
2643
- `,$S=u.styled(ml)`
2673
+ `,sT=u.styled(ml)`
2644
2674
  width: 32px;
2645
2675
  height: 32px;
2646
2676
  fill: #506dff;
2647
2677
  animation: ${Va} 1s linear infinite;
2648
- `,US=({message:e="Fetching details"})=>d.jsxs(QS,{children:[d.jsx($S,{}),d.jsx(u.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),KS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await Ee({url:st(vS,{conversationId:e}),method:Pe.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},eA=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},Ga=({conversationId:e})=>{const t=jr(),{queryKey:n,polledLogsStatus:r}=I.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=Sp({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:KS,isSatisfied:eA,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return mn({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},tA=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await Ee({url:st(SS,{conversationId:t}),data:e,method:Pe.POST});return n==null?void 0:n.data}catch(n){throw Se({message:xn,type:Qe}),console.error(n),n}},nA=({onSuccess:e})=>Vt({mutationFn:tA,onSuccess:e}),rA=u.styled(u.Stack)`
2678
+ `,aT=({message:e="Fetching details"})=>d.jsxs(oT,{children:[d.jsx(sT,{}),d.jsx(u.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),iT=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await Ee({url:rt(LS,{conversationId:e}),method:Pe.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},cT=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},Ga=({conversationId:e})=>{const t=Br(),{queryKey:n,polledLogsStatus:r}=I.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=Sp({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:iT,isSatisfied:cT,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return mn({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},lT=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await Ee({url:rt(NS,{conversationId:t}),data:e,method:Pe.POST});return n==null?void 0:n.data}catch(n){throw _e({message:xn,type:Ue}),console.error(n),n}},uT=({onSuccess:e})=>Vt({mutationFn:lT,onSuccess:e}),dT=u.styled(u.Stack)`
2649
2679
  padding: 12px;
2650
2680
  flex-flow: row nowrap;
2651
2681
  justify-content: flex-end;
@@ -2662,7 +2692,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2662
2692
  padding: 7px 10px;
2663
2693
  }
2664
2694
  }
2665
- `,oA=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=I.useContext(qt),{refetch:a}=Ga({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const b=Object.values(e),p=b.map(m=>m.displayValue).join(", "),h=Array.from(new Set(b.map(m=>m==null?void 0:m.entityType)));i==null||i(Ft.email_logging_log_config_saved,{app_name:n,num_of_keys_selected:b.length,list_of_keys:p,list_of_objects:h.join(", "),num_of_objects_selected:h.length})},{mutate:l,isPending:f}=nA({onSuccess:c}),g=Object.keys(e).length>0,y=()=>{const b=Object.values(e);l({conversationId:o,payload:{selectedEntities:b,connectorId:r,autoLogEnabled:!0}})},v=()=>{t==null||t(),i==null||i(Ft.email_logging_log_config_canceled,{app_name:n})};return d.jsxs(rA,{children:[d.jsx(u.Button,{variant:"text",size:"small",onClick:v,children:"Cancel"}),d.jsxs(u.Button,{variant:"contained",size:"small",className:"primary-action",disabled:f||!g,onClick:y,children:[f?d.jsx(u.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},sA="Tell us more (optional)",aA=u.styled(u.Box)`
2695
+ `,fT=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=I.useContext(qt),{refetch:a}=Ga({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const b=Object.values(e),p=b.map(m=>m.displayValue).join(", "),h=Array.from(new Set(b.map(m=>m==null?void 0:m.entityType)));i==null||i(Dt.email_logging_log_config_saved,{app_name:n,num_of_keys_selected:b.length,list_of_keys:p,list_of_objects:h.join(", "),num_of_objects_selected:h.length})},{mutate:l,isPending:f}=uT({onSuccess:c}),g=Object.keys(e).length>0,y=()=>{const b=Object.values(e);l({conversationId:o,payload:{selectedEntities:b,connectorId:r,autoLogEnabled:!0}})},v=()=>{t==null||t(),i==null||i(Dt.email_logging_log_config_canceled,{app_name:n})};return d.jsxs(dT,{children:[d.jsx(u.Button,{variant:"text",size:"small",onClick:v,children:"Cancel"}),d.jsxs(u.Button,{variant:"contained",size:"small",className:"primary-action",disabled:f||!g,onClick:y,children:[f?d.jsx(u.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},pT="Tell us more (optional)",hT=u.styled(u.Box)`
2666
2696
  width: ${({width:e})=>e||"440px"};
2667
2697
  border-radius: 12px;
2668
2698
  padding: 16px;
@@ -2675,15 +2705,15 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2675
2705
  flex-direction: row;
2676
2706
  margin-bottom: 12px;
2677
2707
  }
2678
- `,iA=u.styled(u.Box)`
2708
+ `,gT=u.styled(u.Box)`
2679
2709
  border-bottom: 1px solid ${u.theme.palette.gray.gray6};
2680
2710
  margin: 12px -16px;
2681
- `,cA=u.styled(u.Box)`
2711
+ `,mT=u.styled(u.Box)`
2682
2712
  display: flex;
2683
2713
  justify-content: flex-end;
2684
2714
  margin-top: 30px;
2685
2715
  gap: 8px;
2686
- `,lA=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=sA})=>{const[c,l]=I.useState(""),[f,g]=I.useState(""),y=m=>{l(m.target.value)},v=m=>{m.stopPropagation();const{value:C}=(m==null?void 0:m.target)||{};g(C)},b=()=>{t({feedbackOption:c,feedbackComment:f})},p=()=>{e==null||e()},h=r?!c:!f;return d.jsxs(aA,{width:s,children:[d.jsx(u.Typography,{variant:"h3",children:o}),d.jsx(iA,{}),r?d.jsx(u.FormControl,{children:d.jsx(u.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:y,children:a.map(m=>d.jsx(u.FormControlLabel,{value:m.value,control:d.jsx(u.Radio,{}),label:m.label},m.value))})}):null,d.jsx(br,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:v,multiline:!0,rows:5,limit:250,validation:{validate:Cc()}}),d.jsxs(cA,{children:[d.jsx(u.Button,{variant:"text",color:"primary",style:{color:u.theme.palette.gray.gray3},disabled:n,onClick:p,children:"Cancel"}),d.jsx(kp,{variant:"contained",color:"primary",isLoading:n,disabled:h,label:"Submit",onClick:b})]})]})},uA=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await Ee({url:AS.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return Se({message:U_,type:rn}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),Se({message:K_,type:Qe}),n}};function dA({onSuccess:e}){return Vt({mutationFn:uA,onSuccess:e})}const fA=u.styled(u.Stack)`
2716
+ `,bT=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=pT})=>{const[c,l]=I.useState(""),[f,g]=I.useState(""),y=m=>{l(m.target.value)},v=m=>{m.stopPropagation();const{value:C}=(m==null?void 0:m.target)||{};g(C)},b=()=>{t({feedbackOption:c,feedbackComment:f})},p=()=>{e==null||e()},h=r?!c:!f;return d.jsxs(hT,{width:s,children:[d.jsx(u.Typography,{variant:"h3",children:o}),d.jsx(gT,{}),r?d.jsx(u.FormControl,{children:d.jsx(u.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:y,children:a.map(m=>d.jsx(u.FormControlLabel,{value:m.value,control:d.jsx(u.Radio,{}),label:m.label},m.value))})}):null,d.jsx(gr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:v,multiline:!0,rows:5,limit:250,validation:{validate:Cc()}}),d.jsxs(mT,{children:[d.jsx(u.Button,{variant:"text",color:"primary",style:{color:u.theme.palette.gray.gray3},disabled:n,onClick:p,children:"Cancel"}),d.jsx(kp,{variant:"contained",color:"primary",isLoading:n,disabled:h,label:"Submit",onClick:b})]})]})},yT=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await Ee({url:RS.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return _e({message:aS,type:nn}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),_e({message:iS,type:Ue}),n}};function CT({onSuccess:e}){return Vt({mutationFn:yT,onSuccess:e})}const xT=u.styled(u.Stack)`
2687
2717
  flex-flow: row nowrap;
2688
2718
  justify-content: space-between;
2689
2719
  align-items: center;
@@ -2695,7 +2725,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2695
2725
  &:disabled {
2696
2726
  opacity: 0.4;
2697
2727
  }
2698
- `,pA=u.styled(u.Typography)`
2728
+ `,vT=u.styled(u.Typography)`
2699
2729
  color: #6f7c90;
2700
2730
  font-size: 11px;
2701
2731
  font-weight: 400;
@@ -2704,35 +2734,35 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2704
2734
  `,Jp=u.styled(u.Tooltip)`
2705
2735
  padding: 6px;
2706
2736
  border-radius: 6px;
2707
- `,hA=()=>{const{conversationId:e}=I.useContext(qt),[t,n]=I.useState(!1),r=()=>{n(!1)},{mutate:o,isPending:s}=dA({onSuccess:r}),a=()=>{o({conversationId:e,feedbackData:{feedback_type:Hp,positive_feedback:!1}})},i=()=>{n(!0)},c=({feedbackComment:l,feedbackOption:f})=>{o({conversationId:e,feedbackData:{feedback_type:Hp,comment:l,option:f,positive_feedback:!1}})};return d.jsxs(fA,{children:[d.jsx(pA,{children:$_}),d.jsxs(u.Stack,{flexDirection:"row",alignItems:"flex-end",children:[d.jsx(Jp,{arrow:!0,title:q_,placement:"top",children:d.jsx(Yp,{className:"feedback-button",size:"small",onClick:a,disabled:s,children:d.jsx(Np,{})})}),d.jsx(Jp,{arrow:!0,title:Q_,placement:"top",children:d.jsx(Yp,{className:"feedback-button",size:"small",onClick:i,disabled:s,children:d.jsx(Rp,{})})})]}),d.jsx(vr,{shown:t,setShown:n,borderRadius:12,sx:{zIndex:15002},children:d.jsx(lA,{onCancel:()=>n(!1),onSubmit:c,isLoading:s,title:J_,feedbackOptions:eS,width:"440px"})})]})},gA=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await Ee({url:st(ES,{conversationId:e}),method:Pe.GET}),n=t==null?void 0:t.data;return(n==null?void 0:n.results)??[]}catch(t){throw console.error(t),t}},mA=({conversationId:e,enabled:t=!0})=>mn({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>gA({conversationId:e}),enabled:!!e&&t}),bA=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await Ee({url:st(_S,{formId:e}),data:{search_string:n,args:{}},method:Pe.POST}),o=r==null?void 0:r.data;if(!o||o.errorMessage)throw new Error(o.errorMessage||"Failed to fetch search entities");return{results:o.data,searchObject:t,formId:e}}catch(r){throw Se({message:xn,type:Qe}),console.error(r),r}},yA=({onSuccess:e})=>Vt({mutationFn:bA,onSuccess:e}),CA=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await Ee({url:st(TS,{conversationId:t}),data:e,method:Pe.PATCH});return n==null?void 0:n.data}catch(n){throw Se({message:xn,type:Qe}),console.error(n),n}},xA=({onSuccess:e})=>Vt({mutationFn:CA,onSuccess:e}),vA=u.styled(u.Stack)`
2737
+ `,ET=()=>{const{conversationId:e}=I.useContext(qt),[t,n]=I.useState(!1),r=()=>{n(!1)},{mutate:o,isPending:s}=CT({onSuccess:r}),a=()=>{o({conversationId:e,feedbackData:{feedback_type:Hp,positive_feedback:!1}})},i=()=>{n(!0)},c=({feedbackComment:l,feedbackOption:f})=>{o({conversationId:e,feedbackData:{feedback_type:Hp,comment:l,option:f,positive_feedback:!1}})};return d.jsxs(xT,{children:[d.jsx(vT,{children:sS}),d.jsxs(u.Stack,{flexDirection:"row",alignItems:"flex-end",children:[d.jsx(Jp,{arrow:!0,title:rS,placement:"top",children:d.jsx(Yp,{className:"feedback-button",size:"small",onClick:a,disabled:s,children:d.jsx(Np,{})})}),d.jsx(Jp,{arrow:!0,title:oS,placement:"top",children:d.jsx(Yp,{className:"feedback-button",size:"small",onClick:i,disabled:s,children:d.jsx(Rp,{})})})]}),d.jsx(Cr,{shown:t,setShown:n,borderRadius:12,sx:{zIndex:15002},children:d.jsx(bT,{onCancel:()=>n(!1),onSubmit:c,isLoading:s,title:nS,feedbackOptions:cS,width:"440px"})})]})},wT=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await Ee({url:rt(OS,{conversationId:e}),method:Pe.GET}),n=t==null?void 0:t.data;return(n==null?void 0:n.results)??[]}catch(t){throw console.error(t),t}},IT=({conversationId:e,enabled:t=!0})=>mn({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>wT({conversationId:e}),enabled:!!e&&t}),_T=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await Ee({url:rt(DS,{formId:e}),data:{search_string:n,args:{}},method:Pe.POST}),o=r==null?void 0:r.data;if(!o||o.errorMessage)throw new Error(o.errorMessage||"Failed to fetch search entities");return{results:o.data,searchObject:t,formId:e}}catch(r){throw _e({message:xn,type:Ue}),console.error(r),r}},ST=({onSuccess:e})=>Vt({mutationFn:_T,onSuccess:e}),TT=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await Ee({url:rt(MS,{conversationId:t}),data:e,method:Pe.PATCH});return n==null?void 0:n.data}catch(n){throw _e({message:xn,type:Ue}),console.error(n),n}},AT=({onSuccess:e})=>Vt({mutationFn:TT,onSuccess:e}),LT=u.styled(u.Stack)`
2708
2738
  color: #343c45;
2709
2739
  height: 100%;
2710
2740
  box-sizing: border-box;
2711
- `,EA=u.styled(u.Stack)`
2741
+ `,OT=u.styled(u.Stack)`
2712
2742
  flex-flow: row nowrap;
2713
2743
  justify-content: space-between;
2714
2744
  align-items: center;
2715
2745
  column-gap: 8px;
2716
2746
  padding: 12px 16px;
2717
2747
  background-color: #f6f8fc;
2718
- `,wA=u.styled(u.Stack)`
2748
+ `,FT=u.styled(u.Stack)`
2719
2749
  flex-flow: row nowrap;
2720
2750
  justify-content: flex-start;
2721
2751
  align-items: center;
2722
2752
  column-gap: 8px;
2723
- `,IA=u.styled(u.Stack)`
2753
+ `,kT=u.styled(u.Stack)`
2724
2754
  flex-flow: row nowrap;
2725
2755
  justify-content: flex-end;
2726
2756
  align-items: center;
2727
2757
  column-gap: 6px;
2728
- `,_A=u.styled(u.Stack)`
2758
+ `,DT=u.styled(u.Stack)`
2729
2759
  padding: 4px;
2730
2760
  background-color: #ffffff;
2731
2761
  border-radius: 50%;
2732
- `,SA=u.styled("img")`
2762
+ `,NT=u.styled("img")`
2733
2763
  width: 16px;
2734
2764
  height: 16px;
2735
- `,AA=u.styled(u.Stack)`
2765
+ `,RT=u.styled(u.Stack)`
2736
2766
  flex-grow: 1;
2737
2767
  `,qp=u.styled(u.Stack)`
2738
2768
  flex-grow: 1;
@@ -2745,10 +2775,10 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2745
2775
  overflow-y: auto;
2746
2776
  scrollbar-width: thin;
2747
2777
  scrollbar-color: #97a3b7 transparent;
2748
- `,TA=u.styled(u.Stack)`
2778
+ `,MT=u.styled(u.Stack)`
2749
2779
  padding: 12px 16px 0;
2750
2780
  position: relative;
2751
- `,LA=u.styled(u.OutlinedInput)`
2781
+ `,PT=u.styled(u.OutlinedInput)`
2752
2782
  padding: 0;
2753
2783
  fieldset {
2754
2784
  border-radius: 4px;
@@ -2767,7 +2797,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2767
2797
  border-width: 1px !important;
2768
2798
  }
2769
2799
  }
2770
- `,OA=u.styled(u.Stack)`
2800
+ `,jT=u.styled(u.Stack)`
2771
2801
  padding: 8px 0 8px 12px;
2772
2802
  justify-content: center;
2773
2803
  align-items: center;
@@ -2776,12 +2806,12 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2776
2806
  height: 15px;
2777
2807
  fill: #4d596c;
2778
2808
  }
2779
- `,FA=e=>d.jsx(u.Switch,{disableRipple:!0,...e}),kA=u.styled(FA)(({disabled:e})=>({padding:0,width:"32px",height:"16px","& .MuiSwitch-switchBase":{padding:2,margin:0,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:e?"#d6dde8":"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:e?"#4d596c":"#506DFF"}}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:12,height:12},"& .MuiSwitch-track":{borderRadius:8}})),DA=u.styled(ml)`
2809
+ `,BT=e=>d.jsx(u.Switch,{disableRipple:!0,...e}),VT=u.styled(BT)(({disabled:e})=>({padding:0,width:"32px",height:"16px","& .MuiSwitch-switchBase":{padding:2,margin:0,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:e?"#d6dde8":"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:e?"#4d596c":"#506DFF"}}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:12,height:12},"& .MuiSwitch-track":{borderRadius:8}})),GT=u.styled(ml)`
2780
2810
  width: 14px;
2781
2811
  height: 14px;
2782
2812
  fill: #4d596c;
2783
2813
  animation: ${Va} 1s linear infinite;
2784
- `,Er=oo.CaseView,NA=({emailLogStatus:e,close:t})=>{const{emailLogSettings:n,autoLogEnabled:r,selectedEntities:o,formList:s}=e,{connectorName:a,connectorId:i,logoUrl:c}=n??{},l=(o==null?void 0:o.length)>0,[f,g]=I.useState(""),[y,v]=I.useState([]),[b,p]=I.useState({}),{conversationId:h,connectorFunctions:m}=I.useContext(qt),C=m==null?void 0:m.sendTrackingEvent,{data:x,isError:w,isLoading:E}=mA({conversationId:h,enabled:!l}),{refetch:_}=Ga({conversationId:h}),A=()=>{C==null||C(Ft.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:k,isIdle:R,reset:N}=yA({onSuccess:A}),{mutate:M,isPending:V}=xA({onSuccess:_}),{results:Z=[],...J}=L??{},$=I.useMemo(()=>{const H={},G=[];for(const j of y){const q=j.entityType+j.displayValue;H[q]||G.push(j),H[q]=j}for(const j of x??[]){const q=j.entityType+j.displayValue;H[q]||G.push(j),H[q]=j}return G},[x,y]),X=H=>{g(H.target.value),R||N()},z=H=>{const{entityType:G,displayValue:j}=H;p(q=>({...q,[G+j]:H})),v(q=>[H,...q]),g(""),N()},se=()=>{C==null||C(Ft.email_logging_search_initiated,{app_name:a})},de=()=>{M({payload:{autoLogEnabled:!r},conversationId:h});const H=r?Ft.email_logging_auto_log_disabled:Ft.email_logging_auto_log_enabled;C==null||C(H,{app_name:a})},D=E||k;return d.jsxs(vA,{children:[d.jsxs(EA,{children:[d.jsxs(wA,{children:[d.jsx(_A,{children:d.jsx(SA,{src:c,alt:"connector"})}),d.jsx(u.Typography,{children:"Sync conversation"})]}),d.jsxs(IA,{children:[V?d.jsx(DA,{}):null,l?d.jsx(u.Tooltip,{arrow:!0,title:r?M_:P_,children:d.jsx(u.Stack,{children:d.jsx(kA,{checked:r,value:r,onClick:de,disabled:V})})}):null]})]}),d.jsx(AA,{children:d.jsxs(oo,{children:[d.jsxs(Er,{condition:l,children:[d.jsx(qp,{children:d.jsx(Qp,{children:d.jsx(zp,{connectorName:a,entities:o,disabled:!0})})}),d.jsx(hA,{})]},"disabled-view"),d.jsxs(Er,{fallback:!0,children:[d.jsx(TA,{children:d.jsx(LA,{type:"text",name:"search",value:f,onChange:X,onFocus:se,startAdornment:d.jsx(OA,{children:d.jsx(Ip,{})}),size:"small"})}),d.jsx(qp,{children:d.jsx(Qp,{children:d.jsxs(oo,{children:[d.jsx(Er,{condition:D,children:d.jsx(US,{message:k?"Searching...":"Loading..."})},"loading"),d.jsx(Er,{condition:f===""&&$.length>0,children:d.jsx(zp,{connectorName:a,checkedEntities:b,setCheckedEntities:p,entities:$??[]})},"entity-suggestions"),d.jsx(Er,{condition:!!f&&R,children:d.jsx(ZS,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),d.jsx(Er,{condition:!!f&&!R,children:d.jsx(qS,{connectorName:a,results:Z,...J,addEntity:z})},"search-results"),d.jsx(Er,{condition:!$.length&&w,children:d.jsx(gl,{message:xn})},"error")]})})}),f?null:d.jsx(oA,{connectorName:a,connectorId:i,checkedEntities:b,close:t})]},"select-logs")]})})]})},RA=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await Ee({url:st(wS,{conversationId:e}),method:Pe.POST});return t==null?void 0:t.data}catch(t){throw Se({message:xn,type:Qe}),console.error(t),t}},MA=({onSuccess:e})=>Vt({mutationFn:RA,onSuccess:e}),PA=u.styled(u.Stack)`
2814
+ `,xr=so.CaseView,HT=({emailLogStatus:e,close:t})=>{const{emailLogSettings:n,autoLogEnabled:r,selectedEntities:o,formList:s}=e,{connectorName:a,connectorId:i,logoUrl:c}=n??{},l=(o==null?void 0:o.length)>0,[f,g]=I.useState(""),[y,v]=I.useState([]),[b,p]=I.useState({}),{conversationId:h,connectorFunctions:m}=I.useContext(qt),C=m==null?void 0:m.sendTrackingEvent,{data:x,isError:w,isLoading:E}=IT({conversationId:h,enabled:!l}),{refetch:_}=Ga({conversationId:h}),T=()=>{C==null||C(Dt.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:R,isIdle:k,reset:D}=ST({onSuccess:T}),{mutate:M,isPending:G}=AT({onSuccess:_}),{results:Y=[],...X}=L??{},J=I.useMemo(()=>{const N={},H=[];for(const j of y){const $=j.entityType+j.displayValue;N[$]||H.push(j),N[$]=j}for(const j of x??[]){const $=j.entityType+j.displayValue;N[$]||H.push(j),N[$]=j}return H},[x,y]),z=N=>{g(N.target.value),k||D()},q=N=>{const{entityType:H,displayValue:j}=N;p($=>({...$,[H+j]:N})),v($=>[N,...$]),g(""),D()},ne=()=>{C==null||C(Dt.email_logging_search_initiated,{app_name:a})},ce=()=>{M({payload:{autoLogEnabled:!r},conversationId:h});const N=r?Dt.email_logging_auto_log_disabled:Dt.email_logging_auto_log_enabled;C==null||C(N,{app_name:a})},V=E||R;return d.jsxs(LT,{children:[d.jsxs(OT,{children:[d.jsxs(FT,{children:[d.jsx(DT,{children:d.jsx(NT,{src:c,alt:"connector"})}),d.jsx(u.Typography,{children:"Sync conversation"})]}),d.jsxs(kT,{children:[G?d.jsx(GT,{}):null,l?d.jsx(u.Tooltip,{arrow:!0,title:r?Z_:X_,children:d.jsx(u.Stack,{children:d.jsx(VT,{checked:r,value:r,onClick:ce,disabled:G})})}):null]})]}),d.jsx(RT,{children:d.jsxs(so,{children:[d.jsxs(xr,{condition:l,children:[d.jsx(qp,{children:d.jsx(Qp,{children:d.jsx(zp,{connectorName:a,entities:o,disabled:!0})})}),d.jsx(ET,{})]},"disabled-view"),d.jsxs(xr,{fallback:!0,children:[d.jsx(MT,{children:d.jsx(PT,{type:"text",name:"search",value:f,onChange:z,onFocus:ne,startAdornment:d.jsx(jT,{children:d.jsx(Ip,{})}),size:"small"})}),d.jsx(qp,{children:d.jsx(Qp,{children:d.jsxs(so,{children:[d.jsx(xr,{condition:V,children:d.jsx(aT,{message:R?"Searching...":"Loading..."})},"loading"),d.jsx(xr,{condition:f===""&&J.length>0,children:d.jsx(zp,{connectorName:a,checkedEntities:b,setCheckedEntities:p,entities:J??[]})},"entity-suggestions"),d.jsx(xr,{condition:!!f&&k,children:d.jsx(US,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),d.jsx(xr,{condition:!!f&&!k,children:d.jsx(rT,{connectorName:a,results:Y,...X,addEntity:q})},"search-results"),d.jsx(xr,{condition:!J.length&&w,children:d.jsx(gl,{message:xn})},"error")]})})}),f?null:d.jsx(fT,{connectorName:a,connectorId:i,checkedEntities:b,close:t})]},"select-logs")]})})]})},WT=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await Ee({url:rt(FS,{conversationId:e}),method:Pe.POST});return t==null?void 0:t.data}catch(t){throw _e({message:xn,type:Ue}),console.error(t),t}},ZT=({onSuccess:e})=>Vt({mutationFn:WT,onSuccess:e}),XT=u.styled(u.Stack)`
2785
2815
  border-radius: 100px;
2786
2816
  background: #f6f8fc;
2787
2817
  flex-flow: row nowrap;
@@ -2790,7 +2820,7 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2790
2820
  padding: 8px;
2791
2821
  width: fit-content;
2792
2822
  cursor: pointer;
2793
- `,jA=u.styled(u.Button)`
2823
+ `,zT=u.styled(u.Button)`
2794
2824
  padding: 0;
2795
2825
  background: none;
2796
2826
  border: none;
@@ -2799,4 +2829,4 @@ Do you want to continue?`,lv="Select an object to create",uv="Select an object t
2799
2829
  line-height: 14px;
2800
2830
  color: #506dff;
2801
2831
  margin-left: 6px;
2802
- `,BA=[Ie.PENDING,Ie.LOGGED,Ie.NOT_LOGGED,Ie.PAUSED],VA=[Ie.LOGGED,Ie.PAUSED],GA=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=I.useContext(qt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=Ga({conversationId:r}),{mutate:i,isPending:c}=MA({onSuccess:a}),l=L_[e],f=k_[e],g=F_[e],{emailLogSettings:y,messageLogStatus:v}=t,{connectorName:b}=y??{},{logged:p,total:h}=v??{},m=VA.includes(e)&&h?` (${p}/${h})`:"",C=e===Ie.ERROR,x=BA.includes(e),w=({close:_})=>d.jsx(NA,{close:_,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Ft.email_logging_failed_clicked,{app_name:b})};return d.jsx(CS,{logSettings:y,status:e,isAdmin:n,retry:C,renderEntities:x?w:void 0,children:d.jsxs(PA,{style:{cursor:x?"pointer":"not-allowed"},children:[l,g?g(`${f} ${m}`):null,C?d.jsx(jA,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},bl=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=E_(e);return Ge.createPortal(d.jsx(GA,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},HA=({observer:e})=>{var v;const[t,n]=I.useState({}),[r,o]=I.useState({}),[s,a]=I.useState({}),{conversationId:i}=I.useContext(qt),{data:c}=Ga({conversationId:i}),l=(v=c==null?void 0:c.emailLogSettings)==null?void 0:v.enabled,f=b=>{n(p=>({...p,...b}))},g=b=>{o(p=>({...p,...b}))},y=b=>{a(b)};return I.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:g,setSubjectButtonContainers:y}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?d.jsxs(d.Fragment,{children:[Object.entries(t).map(([b,p])=>d.jsx(bl,{emailLogStatus:c,containerElement:p.element,messageId:p.messageId,legacyMessageId:p.legacyMessageId},b)),Object.entries(r).map(([b,p])=>d.jsx(bl,{emailLogStatus:c,containerElement:p.element},b)),Object.entries(s).map(([b,p])=>d.jsx(bl,{emailLogStatus:c,containerElement:p.element},b))]}):null},WA=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=I.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return d.jsx(qt.Provider,{value:o,children:r})},ZA=({children:e,...t})=>d.jsx(rc,{store:il,children:d.jsx(u.HiverProvider,{custom:!0,children:d.jsx(al,{children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:d.jsx(WA,{...t,children:e})})})})}),Ha=".hiver-log-crm-button",Wa=".hiver-log-crm-compose-button",$p=".hiver-log-crm-subject-button";class XA{constructor({emailNodeFilter:t,composeNodeFilter:n,emailHeaderTargetSelector:r=".gE.iv.gt .c2",composeHeaderTargetSelector:o=".aoD.hl .bgW",emailMessageContainerSelector:s=".adn.ads",subjectContainer:a=null,disableAutoLogInEmail:i=!1,disableAutoLogInCompose:c=!1,disableAutoLogInSubject:l=!1}={}){Me(this,"observer",null);Me(this,"setComposeButtonContainers",null);Me(this,"setEmailButtonContainers",null);Me(this,"setSubjectButtonContainers",null);Me(this,"emailNodeFilter");Me(this,"composeNodeFilter");Me(this,"emailHeaderTargetSelector");Me(this,"composeHeaderTargetSelector");Me(this,"emailMessageContainerSelector");Me(this,"disableAutoLogInEmail");Me(this,"disableAutoLogInCompose");Me(this,"disableAutoLogInSubject");Me(this,"subjectContainer",null);Me(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(Ha).forEach(r=>r.remove());const n=document.querySelectorAll(this.emailMessageContainerSelector);n.length&&n.forEach(r=>{var c;const o=r.querySelector(this.emailHeaderTargetSelector),s=r.getAttribute("data-message-id")||null,a=r.getAttribute("data-legacy-message-id")||null;if(o!=null&&o.querySelector(Ha))return;const i=document.createElement("div");i.classList.add(Ha.slice(1)),i.style.display="inline-block",i.style.marginLeft="8px",o==null||o.appendChild(i),(c=this.setEmailButtonContainers)==null||c.call(this,{[s??""]:{element:i,messageId:s,legacyMessageId:a}})})});Me(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Wa).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Wa))return;const s=document.createElement("div");s.classList.add(Wa.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});Me(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll($p);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add($p.slice(1)),n.style.display="inline-block",(o=this.subjectContainer)==null||o.appendChild(n),(s=this.setSubjectButtonContainers)==null||s.call(this,{crm_subject:{element:n}})});this.emailNodeFilter=t||this._defaultEmailNodeFilter,this.composeNodeFilter=n||this._defaultComposeNodeFilter,this.emailHeaderTargetSelector=r,this.composeHeaderTargetSelector=o,this.emailMessageContainerSelector=s,this.subjectContainer=a,this.disableAutoLogInEmail=i,this.disableAutoLogInCompose=c,this.disableAutoLogInSubject=l}_defaultEmailNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("a3s")||(r=t.classList)!=null&&r.contains("ii")||typeof t.querySelector=="function"&&t.querySelector(".a3s")))}_defaultComposeNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("hiver-new-email-top-div")||(r=t.classList)!=null&&r.contains("hiver-compose-bar")))}_initMutationObserver(){this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let n=!1,r=!1;t.forEach(o=>{if(o.type==="childList"){const s=Array.from(o.addedNodes);this.disableAutoLogInEmail||s.some(this.emailNodeFilter)&&(n=!0),this.disableAutoLogInCompose||s.some(this.composeNodeFilter)&&(r=!0)}}),n&&setTimeout(()=>this._addLogButtonsOnEmail(),100),r&&setTimeout(()=>this._addLogButtonsOnCompose(),100)}),this.observer.observe(document.body,{childList:!0,subtree:!0})}_init(){this._addLogButtonsOnEmail(),this._addLogButtonsOnCompose(),this._addLogButtonOnSubject()}observe({setComposeButtonContainers:t,setEmailButtonContainers:n,setSubjectButtonContainers:r}){this.setComposeButtonContainers=t,this.setEmailButtonContainers=n,this.setSubjectButtonContainers=r,this._init(),(!this.disableAutoLogInEmail||!this.disableAutoLogInCompose)&&this._initMutationObserver()}destroy(){document.querySelectorAll(Ha).forEach(r=>r.remove()),document.querySelectorAll(Wa).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const zA=({observer:e,...t})=>d.jsx(cl,{children:d.jsxs(ZA,{...t,children:[d.jsx(HA,{observer:e}),Ge.createPortal(d.jsx(ll,{id:"toast-message",children:d.jsx($a,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),YA=e=>Ee({url:Rx,method:Pe.POST,data:e});le.ActionQueue=x_,le.CONNECTORS_AGENT_EVENTS=sl,le.ConnectorCardList=OI,le.EmailLogger=zA,le.GmailLogObserver=XA,le.HiverConnectorBifrostAuth=Ee,le.IntegrationSense=y_,le.addNewConnectors=Eh,le.dismissNotification=hu,le.fetchAppCfValues=YA,le.getConnectorsBifrostConfigs=Xt,le.getMetaData=zy,le.initConnectorsBifrost=Jm,le.setCaptureFeedbackOnDemand=wh,le.shouldCaptureFeedback=Ci,le.shouldShowNotification=pu,le.useConnectorSelectedEmail=lI,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
2832
+ `,YT=[Ie.PENDING,Ie.LOGGED,Ie.NOT_LOGGED,Ie.PAUSED],JT=[Ie.LOGGED,Ie.PAUSED],qT=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=I.useContext(qt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=Ga({conversationId:r}),{mutate:i,isPending:c}=ZT({onSuccess:a}),l=P_[e],f=V_[e],g=B_[e],{emailLogSettings:y,messageLogStatus:v}=t,{connectorName:b}=y??{},{logged:p,total:h}=v??{},m=JT.includes(e)&&h?` (${p}/${h})`:"",C=e===Ie.ERROR,x=YT.includes(e),w=({close:_})=>d.jsx(HT,{close:_,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Dt.email_logging_failed_clicked,{app_name:b})};return d.jsx(TS,{logSettings:y,status:e,isAdmin:n,retry:C,renderEntities:x?w:void 0,children:d.jsxs(XT,{style:{cursor:x?"pointer":"not-allowed"},children:[l,g?g(`${f} ${m}`):null,C?d.jsx(zT,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},bl=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=O_(e);return Ve.createPortal(d.jsx(qT,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},QT=({observer:e})=>{var v;const[t,n]=I.useState({}),[r,o]=I.useState({}),[s,a]=I.useState({}),{conversationId:i}=I.useContext(qt),{data:c}=Ga({conversationId:i}),l=(v=c==null?void 0:c.emailLogSettings)==null?void 0:v.enabled,f=b=>{n(p=>({...p,...b}))},g=b=>{o(p=>({...p,...b}))},y=b=>{a(b)};return I.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:g,setSubjectButtonContainers:y}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?d.jsxs(d.Fragment,{children:[Object.entries(t).map(([b,p])=>d.jsx(bl,{emailLogStatus:c,containerElement:p.element,messageId:p.messageId,legacyMessageId:p.legacyMessageId},b)),Object.entries(r).map(([b,p])=>d.jsx(bl,{emailLogStatus:c,containerElement:p.element},b)),Object.entries(s).map(([b,p])=>d.jsx(bl,{emailLogStatus:c,containerElement:p.element},b))]}):null},$T=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=I.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return d.jsx(qt.Provider,{value:o,children:r})},UT=({children:e,...t})=>d.jsx(rc,{store:il,children:d.jsx(u.HiverProvider,{custom:!0,children:d.jsx(al,{children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:d.jsx($T,{...t,children:e})})})})}),Ha=".hiver-log-crm-button",Wa=".hiver-log-crm-compose-button",$p=".hiver-log-crm-subject-button";class KT{constructor({emailNodeFilter:t,composeNodeFilter:n,emailHeaderTargetSelector:r=".gE.iv.gt .c2",composeHeaderTargetSelector:o=".aoD.hl .bgW",emailMessageContainerSelector:s=".adn.ads",subjectContainer:a=null,disableAutoLogInEmail:i=!1,disableAutoLogInCompose:c=!1,disableAutoLogInSubject:l=!1}={}){Me(this,"observer",null);Me(this,"setComposeButtonContainers",null);Me(this,"setEmailButtonContainers",null);Me(this,"setSubjectButtonContainers",null);Me(this,"emailNodeFilter");Me(this,"composeNodeFilter");Me(this,"emailHeaderTargetSelector");Me(this,"composeHeaderTargetSelector");Me(this,"emailMessageContainerSelector");Me(this,"disableAutoLogInEmail");Me(this,"disableAutoLogInCompose");Me(this,"disableAutoLogInSubject");Me(this,"subjectContainer",null);Me(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(Ha).forEach(r=>r.remove());const n=document.querySelectorAll(this.emailMessageContainerSelector);n.length&&n.forEach(r=>{var c;const o=r.querySelector(this.emailHeaderTargetSelector),s=r.getAttribute("data-message-id")||null,a=r.getAttribute("data-legacy-message-id")||null;if(o!=null&&o.querySelector(Ha))return;const i=document.createElement("div");i.classList.add(Ha.slice(1)),i.style.display="inline-block",i.style.marginLeft="8px",o==null||o.appendChild(i),(c=this.setEmailButtonContainers)==null||c.call(this,{[s??""]:{element:i,messageId:s,legacyMessageId:a}})})});Me(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Wa).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Wa))return;const s=document.createElement("div");s.classList.add(Wa.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});Me(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll($p);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add($p.slice(1)),n.style.display="inline-block",(o=this.subjectContainer)==null||o.appendChild(n),(s=this.setSubjectButtonContainers)==null||s.call(this,{crm_subject:{element:n}})});this.emailNodeFilter=t||this._defaultEmailNodeFilter,this.composeNodeFilter=n||this._defaultComposeNodeFilter,this.emailHeaderTargetSelector=r,this.composeHeaderTargetSelector=o,this.emailMessageContainerSelector=s,this.subjectContainer=a,this.disableAutoLogInEmail=i,this.disableAutoLogInCompose=c,this.disableAutoLogInSubject=l}_defaultEmailNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("a3s")||(r=t.classList)!=null&&r.contains("ii")||typeof t.querySelector=="function"&&t.querySelector(".a3s")))}_defaultComposeNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("hiver-new-email-top-div")||(r=t.classList)!=null&&r.contains("hiver-compose-bar")))}_initMutationObserver(){this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let n=!1,r=!1;t.forEach(o=>{if(o.type==="childList"){const s=Array.from(o.addedNodes);this.disableAutoLogInEmail||s.some(this.emailNodeFilter)&&(n=!0),this.disableAutoLogInCompose||s.some(this.composeNodeFilter)&&(r=!0)}}),n&&setTimeout(()=>this._addLogButtonsOnEmail(),100),r&&setTimeout(()=>this._addLogButtonsOnCompose(),100)}),this.observer.observe(document.body,{childList:!0,subtree:!0})}_init(){this._addLogButtonsOnEmail(),this._addLogButtonsOnCompose(),this._addLogButtonOnSubject()}observe({setComposeButtonContainers:t,setEmailButtonContainers:n,setSubjectButtonContainers:r}){this.setComposeButtonContainers=t,this.setEmailButtonContainers=n,this.setSubjectButtonContainers=r,this._init(),(!this.disableAutoLogInEmail||!this.disableAutoLogInCompose)&&this._initMutationObserver()}destroy(){document.querySelectorAll(Ha).forEach(r=>r.remove()),document.querySelectorAll(Wa).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const eA=({observer:e,...t})=>d.jsx(cl,{children:d.jsxs(UT,{...t,children:[d.jsx(QT,{observer:e}),Ve.createPortal(d.jsx(ll,{id:"toast-message",children:d.jsx($a,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),tA=e=>Ee({url:Wx,method:Pe.POST,data:e});ue.ActionQueue=A_,ue.CONNECTORS_AGENT_EVENTS=sl,ue.ConnectorCardList=jI,ue.EmailLogger=eA,ue.GmailLogObserver=KT,ue.HiverConnectorBifrostAuth=Ee,ue.IntegrationSense=S_,ue.addNewConnectors=Eh,ue.dismissNotification=hu,ue.fetchAppCfValues=tA,ue.getConnectorsBifrostConfigs=Xt,ue.getMetaData=zy,ue.initConnectorsBifrost=Jm,ue.setCaptureFeedbackOnDemand=wh,ue.shouldCaptureFeedback=Ci,ue.shouldShowNotification=pu,ue.useConnectorSelectedEmail=bI,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});