@hiver/connector-agent 4.3.3 → 4.3.4-quickbooksEvent-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/app/connector-cards.d.ts.map +1 -1
- package/index.es.js +3028 -3021
- package/index.umd.js +91 -91
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ue,_){typeof exports=="object"&&typeof module<"u"?_(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"],_):(ue=typeof globalThis<"u"?globalThis:ue||self,_(ue["@hiver/connector-agent"]={},ue.React,ue.ReactDOM,ue.hiverUiKit))})(this,function(ue,_,ke,v){"use strict";var aA=Object.defineProperty;var Hp=ue=>{throw TypeError(ue)};var cA=(ue,_,ke)=>_ in ue?aA(ue,_,{enumerable:!0,configurable:!0,writable:!0,value:ke}):ue[_]=ke;var
|
|
1
|
+
(function(ue,_){typeof exports=="object"&&typeof module<"u"?_(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"],_):(ue=typeof globalThis<"u"?globalThis:ue||self,_(ue["@hiver/connector-agent"]={},ue.React,ue.ReactDOM,ue.hiverUiKit))})(this,function(ue,_,ke,v){"use strict";var aA=Object.defineProperty;var Hp=ue=>{throw TypeError(ue)};var cA=(ue,_,ke)=>_ in ue?aA(ue,_,{enumerable:!0,configurable:!0,writable:!0,value:ke}):ue[_]=ke;var Lc=(ue,_,ke)=>cA(ue,typeof _!="symbol"?_+"":_,ke),Fc=(ue,_,ke)=>_.has(ue)||Hp("Cannot "+ke);var L=(ue,_,ke)=>(Fc(ue,_,"read from private field"),ke?ke.call(ue):_.get(ue)),ie=(ue,_,ke)=>_.has(ue)?Hp("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(ue):_.set(ue,ke),$=(ue,_,ke,v)=>(Fc(ue,_,"write to private field"),v?v.call(ue,ke):_.set(ue,ke),ke),he=(ue,_,ke)=>(Fc(ue,_,"access private method"),ke);var bi=(ue,_,ke,v)=>({set _(vi){$(ue,_,vi,ke)},get _(){return L(ue,_,v)}});var qn,xn,Rr,Lp,kr,wn,Nr,Fp,Un,Dp,Pr,Mr,Lt,Kn,nt,Fo,er,Ht,hn,Rp,qt,kp,Ut,at,tr,Kt,kn,Np,ln,Wt,Do,Pp,Ve,An,Sn,Br,jr,_n,Vr,Gr,Mp,bt,me,Ro,ct,nr,Hr,Tn,en,ko,Wr,Zr,rr,or,On,Xr,_e,jo,Dc,Rc,kc,Nc,Pc,Mc,Bc,Wp,Bp,Ln,Fn,yt,un,dn,yi,jc,jp;function vi(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 k=vi(_);var fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ci={exports:{}},Ur={};/**
|
|
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
|
|
9
|
+
*/var Vc;function Zp(){if(Vc)return Ur;Vc=1;var e=_,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 i(c,l,a){var u,p={},g=null,E=null;a!==void 0&&(g=""+a),l.key!==void 0&&(g=""+l.key),l.ref!==void 0&&(E=l.ref);for(u in l)r.call(l,u)&&!s.hasOwnProperty(u)&&(p[u]=l[u]);if(c&&c.defaultProps)for(u in l=c.defaultProps,l)p[u]===void 0&&(p[u]=l[u]);return{$$typeof:t,type:c,key:g,ref:E,props:p,_owner:o.current}}return Ur.Fragment=n,Ur.jsx=i,Ur.jsxs=i,Ur}var Kr={};/**
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+ge[
|
|
17
|
+
*/var Gc;function Xp(){return Gc||(Gc=1,process.env.NODE_ENV!=="production"&&function(){var e=_,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"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),b=Symbol.iterator,d="@@iterator";function f(T){if(T===null||typeof T!="object")return null;var G=b&&T[b]||T[d];return typeof G=="function"?G:null}var h=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(T){{for(var G=arguments.length,Q=new Array(G>1?G-1:0),de=1;de<G;de++)Q[de-1]=arguments[de];m("error",T,Q)}}function m(T,G,Q){{var de=h.ReactDebugCurrentFrame,Oe=de.getStackAddendum();Oe!==""&&(G+="%s",Q=Q.concat([Oe]));var De=Q.map(function(Ce){return String(Ce)});De.unshift("Warning: "+G),Function.prototype.apply.call(console[T],console,De)}}var x=!1,I=!1,w=!1,A=!1,S=!1,O;O=Symbol.for("react.module.reference");function R(T){return!!(typeof T=="string"||typeof T=="function"||T===r||T===s||S||T===o||T===a||T===u||A||T===E||x||I||w||typeof T=="object"&&T!==null&&(T.$$typeof===g||T.$$typeof===p||T.$$typeof===i||T.$$typeof===c||T.$$typeof===l||T.$$typeof===O||T.getModuleId!==void 0))}function D(T,G,Q){var de=T.displayName;if(de)return de;var Oe=G.displayName||G.name||"";return Oe!==""?Q+"("+Oe+")":Q}function F(T){return T.displayName||"Context"}function P(T){if(T==null)return null;if(typeof T.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case a:return"Suspense";case u:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case c:var G=T;return F(G)+".Consumer";case i:var Q=T;return F(Q._context)+".Provider";case l:return D(T,T.render,"ForwardRef");case p:var de=T.displayName||null;return de!==null?de:P(T.type)||"Memo";case g:{var Oe=T,De=Oe._payload,Ce=Oe._init;try{return P(Ce(De))}catch{return null}}}return null}var j=Object.assign,X=0,z,q,Y,K,ce,ee,B;function H(){}H.__reactDisabledLog=!0;function V(){{if(X===0){z=console.log,q=console.info,Y=console.warn,K=console.error,ce=console.group,ee=console.groupCollapsed,B=console.groupEnd;var T={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}X++}}function W(){{if(X--,X===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},T,{value:z}),info:j({},T,{value:q}),warn:j({},T,{value:Y}),error:j({},T,{value:K}),group:j({},T,{value:ce}),groupCollapsed:j({},T,{value:ee}),groupEnd:j({},T,{value:B})})}X<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=h.ReactCurrentDispatcher,re;function oe(T,G,Q){{if(re===void 0)try{throw Error()}catch(Oe){var de=Oe.stack.trim().match(/\n( *(at )?)/);re=de&&de[1]||""}return`
|
|
18
|
+
`+re+T}}var M=!1,te;{var be=typeof WeakMap=="function"?WeakMap:Map;te=new be}function Z(T,G){if(!T||M)return"";{var Q=te.get(T);if(Q!==void 0)return Q}var de;M=!0;var Oe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var De;De=J.current,J.current=null,V();try{if(G){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(Ct){de=Ct}Reflect.construct(T,[],Ce)}else{try{Ce.call()}catch(Ct){de=Ct}T.call(Ce.prototype)}}else{try{throw Error()}catch(Ct){de=Ct}T()}}catch(Ct){if(Ct&&de&&typeof Ct.stack=="string"){for(var ge=Ct.stack.split(`
|
|
19
|
+
`),ut=de.stack.split(`
|
|
20
|
+
`),We=ge.length-1,ze=ut.length-1;We>=1&&ze>=0&&ge[We]!==ut[ze];)ze--;for(;We>=1&&ze>=0;We--,ze--)if(ge[We]!==ut[ze]){if(We!==1||ze!==1)do if(We--,ze--,ze<0||ge[We]!==ut[ze]){var Rt=`
|
|
21
|
+
`+ge[We].replace(" at new "," at ");return T.displayName&&Rt.includes("<anonymous>")&&(Rt=Rt.replace("<anonymous>",T.displayName)),typeof T=="function"&&te.set(T,Rt),Rt}while(We>=1&&ze>=0);break}}}finally{M=!1,J.current=De,W(),Error.prepareStackTrace=Oe}var qr=T?T.displayName||T.name:"",cr=qr?oe(qr):"";return typeof T=="function"&&te.set(T,cr),cr}function Ne(T,G,Q){return Z(T,!1)}function Le(T){var G=T.prototype;return!!(G&&G.isReactComponent)}function Je(T,G,Q){if(T==null)return"";if(typeof T=="function")return Z(T,Le(T));if(typeof T=="string")return oe(T);switch(T){case a:return oe("Suspense");case u:return oe("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case l:return Ne(T.render);case p:return Je(T.type,G,Q);case g:{var de=T,Oe=de._payload,De=de._init;try{return Je(De(Oe),G,Q)}catch{}}}return""}var rt=Object.prototype.hasOwnProperty,tn={},lt=h.ReactDebugCurrentFrame;function ot(T){if(T){var G=T._owner,Q=Je(T.type,T._source,G?G.type:null);lt.setExtraStackFrame(Q)}else lt.setExtraStackFrame(null)}function He(T,G,Q,de,Oe){{var De=Function.call.bind(rt);for(var Ce in T)if(De(T,Ce)){var ge=void 0;try{if(typeof T[Ce]!="function"){var ut=Error((de||"React class")+": "+Q+" type `"+Ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[Ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}ge=T[Ce](G,Ce,de,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(We){ge=We}ge&&!(ge instanceof Error)&&(ot(Oe),y("%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).",de||"React class",Q,Ce,typeof ge),ot(null)),ge instanceof Error&&!(ge.message in tn)&&(tn[ge.message]=!0,ot(Oe),y("Failed %s type: %s",Q,ge.message),ot(null))}}}var sr=Array.isArray;function Ft(T){return sr(T)}function zr(T){{var G=typeof Symbol=="function"&&Symbol.toStringTag,Q=G&&T[Symbol.toStringTag]||T.constructor.name||"Object";return Q}}function Yr(T){try{return Dn(T),!1}catch{return!0}}function Dn(T){return""+T}function ir(T){if(Yr(T))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",zr(T)),Dn(T)}var le=h.ReactCurrentOwner,Te={key:!0,ref:!0,__self:!0,__source:!0},$e,vt,Tt;Tt={};function ar(T){if(rt.call(T,"ref")){var G=Object.getOwnPropertyDescriptor(T,"ref").get;if(G&&G.isReactWarning)return!1}return T.ref!==void 0}function fn(T){if(rt.call(T,"key")){var G=Object.getOwnPropertyDescriptor(T,"key").get;if(G&&G.isReactWarning)return!1}return T.key!==void 0}function nn(T,G){if(typeof T.ref=="string"&&le.current&&G&&le.current.stateNode!==G){var Q=P(le.current.type);Tt[Q]||(y('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',P(le.current.type),T.ref),Tt[Q]=!0)}}function pi(T,G){{var Q=function(){$e||($e=!0,y("%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)",G))};Q.isReactWarning=!0,Object.defineProperty(T,"key",{get:Q,configurable:!0})}}function _c(T,G){{var Q=function(){vt||(vt=!0,y("%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)",G))};Q.isReactWarning=!0,Object.defineProperty(T,"ref",{get:Q,configurable:!0})}}var hi=function(T,G,Q,de,Oe,De,Ce){var ge={$$typeof:t,type:T,key:G,ref:Q,props:Ce,_owner:De};return ge._store={},Object.defineProperty(ge._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ge,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(ge,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Oe}),Object.freeze&&(Object.freeze(ge.props),Object.freeze(ge)),ge};function Tc(T,G,Q,de,Oe){{var De,Ce={},ge=null,ut=null;Q!==void 0&&(ir(Q),ge=""+Q),fn(G)&&(ir(G.key),ge=""+G.key),ar(G)&&(ut=G.ref,nn(G,Oe));for(De in G)rt.call(G,De)&&!Te.hasOwnProperty(De)&&(Ce[De]=G[De]);if(T&&T.defaultProps){var We=T.defaultProps;for(De in We)Ce[De]===void 0&&(Ce[De]=We[De])}if(ge||ut){var ze=typeof T=="function"?T.displayName||T.name||"Unknown":T;ge&&pi(Ce,ze),ut&&_c(Ce,ze)}return hi(T,ge,ut,Oe,de,le.current,Ce)}}var Jr=h.ReactCurrentOwner,No=h.ReactDebugCurrentFrame;function Rn(T){if(T){var G=T._owner,Q=Je(T.type,T._source,G?G.type:null);No.setExtraStackFrame(Q)}else No.setExtraStackFrame(null)}var Qr;Qr=!1;function Po(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function $r(){{if(Jr.current){var T=P(Jr.current.type);if(T)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+T+"`."}return""}}function Mo(T){return""}var gi={};function mi(T){{var G=$r();if(!G){var Q=typeof T=="string"?T:T.displayName||T.name;Q&&(G=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+Q+">.")}return G}}function
|
|
25
|
+
Check the top-level render call using <`+Q+">.")}return G}}function ve(T,G){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var Q=mi(G);if(gi[Q])return;gi[Q]=!0;var de="";T&&T._owner&&T._owner!==Jr.current&&(de=" It was passed a child from "+P(T._owner.type)+"."),Rn(T),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,de),Rn(null)}}function Pe(T,G){{if(typeof T!="object")return;if(Ft(T))for(var Q=0;Q<T.length;Q++){var de=T[Q];Po(de)&&ve(de,G)}else if(Po(T))T._store&&(T._store.validated=!0);else if(T){var Oe=f(T);if(typeof Oe=="function"&&Oe!==T.entries)for(var De=Oe.call(T),Ce;!(Ce=De.next()).done;)Po(Ce.value)&&ve(Ce.value,G)}}}function Dt(T){{var G=T.type;if(G==null||typeof G=="string")return;var Q;if(typeof G=="function")Q=G.propTypes;else if(typeof G=="object"&&(G.$$typeof===l||G.$$typeof===p))Q=G.propTypes;else return;if(Q){var de=P(G);He(Q,T.props,"prop",de,T)}else if(G.PropTypes!==void 0&&!Qr){Qr=!0;var Oe=P(G);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Oe||"Unknown")}typeof G.getDefaultProps=="function"&&!G.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pn(T){{for(var G=Object.keys(T.props),Q=0;Q<G.length;Q++){var de=G[Q];if(de!=="children"&&de!=="key"){Rn(T),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),Rn(null);break}}T.ref!==null&&(Rn(T),y("Invalid attribute `ref` supplied to `React.Fragment`."),Rn(null))}}var Vp={};function Gp(T,G,Q,de,Oe,De){{var Ce=R(T);if(!Ce){var ge="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(ge+=" 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 ut=Mo();ut?ge+=ut:ge+=$r();var We;T===null?We="null":Ft(T)?We="array":T!==void 0&&T.$$typeof===t?(We="<"+(P(T.type)||"Unknown")+" />",ge=" Did you accidentally export a JSX literal instead of a component?"):We=typeof T,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",We,ge)}var ze=Tc(T,G,Q,Oe,De);if(ze==null)return ze;if(Ce){var Rt=G.children;if(Rt!==void 0)if(de)if(Ft(Rt)){for(var qr=0;qr<Rt.length;qr++)Pe(Rt[qr],T);Object.freeze&&Object.freeze(Rt)}else y("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 Pe(Rt,T)}if(rt.call(G,"key")){var cr=P(T),Ct=Object.keys(G).filter(function(iA){return iA!=="key"}),Oc=Ct.length>0?"{key: someKey, "+Ct.join(": ..., ")+": ...}":"{key: someKey}";if(!Vp[cr+Oc]){var sA=Ct.length>0?"{"+Ct.join(": ..., ")+": ...}":"{}";y(`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} />`,Lc,lr,sA,lr),Po[lr+Lc]=!0}}return O===r?Oc(Xe):bi(Xe),Xe}}function tA(O,G,Q){return Gp(O,G,Q,!0)}function nA(O,G,Q){return Gp(O,G,Q,!1)}var rA=nA,oA=tA;$r.Fragment=r,$r.jsx=rA,$r.jsxs=oA}()),$r}process.env.NODE_ENV==="production"?Ii.exports=Zp():Ii.exports=Xp();var C=Ii.exports;function Wc(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=Wc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function hn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wc(e))&&(r&&(r+=" "),r+=t);return r}const qr=e=>typeof e=="number"&&!isNaN(e),kn=e=>typeof e=="string",Et=e=>typeof e=="function",jo=e=>kn(e)||Et(e)?e:null,Ei=e=>_.isValidElement(e)||kn(e)||Et(e)||qr(e);function zp(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 Vo(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(i){let{children:c,position:l,preventExitTransition:a,done:u,nodeRef:p,isIn:g,playToast:E}=i;const b=r?`${t}--${l}`:t,d=r?`${n}--${l}`:n,f=_.useRef(0);return _.useLayoutEffect(()=>{const h=p.current,y=b.split(" "),m=x=>{x.target===p.current&&(E(),h.removeEventListener("animationend",m),h.removeEventListener("animationcancel",m),f.current===0&&x.type!=="animationcancel"&&h.classList.remove(...y))};h.classList.add(...y),h.addEventListener("animationend",m),h.addEventListener("animationcancel",m)},[]),_.useEffect(()=>{const h=p.current,y=()=>{h.removeEventListener("animationend",y),o?zp(h,u,s):u()};g||(a?y():(f.current=1,h.className+=` ${d}`,h.addEventListener("animationend",y)))},[g]),_.createElement(_.Fragment,null,c)}}function Zc(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 st=new Map;let Ur=[];const xi=new Set,Yp=e=>xi.forEach(t=>t(e)),Xc=()=>st.size>0;function zc(e,t){var n;if(t)return!((n=st.get(t))==null||!n.isToastActive(e));let r=!1;return st.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Yc(e,t){Ei(e)&&(Xc()||Ur.push({content:e,options:t}),st.forEach(n=>{n.buildToast(e,t)}))}function Jc(e,t){st.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 Jp(e){const{subscribe:t,getSnapshot:n,setProps:r}=_.useRef(function(s){const i=s.containerId||1;return{subscribe(c){const l=function(u,p,g){let E=1,b=0,d=[],f=[],h=[],y=p;const m=new Map,x=new Set,I=()=>{h=Array.from(m.values()),x.forEach(S=>S())},w=S=>{f=S==null?[]:f.filter(T=>T!==S),I()},A=S=>{const{toastId:T,onOpen:R,updateId:D,children:F}=S.props,P=D==null;S.staleId&&m.delete(S.staleId),m.set(T,S),f=[...f,S.props.toastId].filter(j=>j!==S.staleId),I(),g(Zc(S,P?"added":"updated")),P&&Et(R)&&R(_.isValidElement(F)&&F.props)};return{id:u,props:y,observe:S=>(x.add(S),()=>x.delete(S)),toggle:(S,T)=>{m.forEach(R=>{T!=null&&T!==R.props.toastId||Et(R.toggle)&&R.toggle(S)})},removeToast:w,toasts:m,clearQueue:()=>{b-=d.length,d=[]},buildToast:(S,T)=>{if((B=>{let{containerId:H,toastId:V,updateId:Z}=B;const U=H?H!==u:u!==1,ee=m.has(V)&&Z==null;return U||ee})(T))return;const{toastId:R,updateId:D,data:F,staleId:P,delay:j}=T,X=()=>{w(R)},Y=D==null;Y&&b++;const q={...y,style:y.toastStyle,key:E++,...Object.fromEntries(Object.entries(T).filter(B=>{let[H,V]=B;return V!=null})),toastId:R,updateId:D,data:F,closeToast:X,isIn:!1,className:jo(T.className||y.toastClassName),bodyClassName:jo(T.bodyClassName||y.bodyClassName),progressClassName:jo(T.progressClassName||y.progressClassName),autoClose:!T.isLoading&&(J=T.autoClose,z=y.autoClose,J===!1||qr(J)&&J>0?J:z),deleteToast(){const B=m.get(R),{onClose:H,children:V}=B.props;Et(H)&&H(_.isValidElement(V)&&V.props),g(Zc(B,"removed")),m.delete(R),b--,b<0&&(b=0),d.length>0?A(d.shift()):I()}};var J,z;q.closeButton=y.closeButton,T.closeButton===!1||Ei(T.closeButton)?q.closeButton=T.closeButton:T.closeButton===!0&&(q.closeButton=!Ei(y.closeButton)||y.closeButton);let ae=S;_.isValidElement(S)&&!kn(S.type)?ae=_.cloneElement(S,{closeToast:X,toastProps:q,data:F}):Et(S)&&(ae=S({closeToast:X,toastProps:q,data:F}));const le={content:ae,props:q,staleId:P};y.limit&&y.limit>0&&b>y.limit&&Y?d.push(le):qr(j)?setTimeout(()=>{A(le)},j):A(le)},setProps(S){y=S},setToggle:(S,T)=>{m.get(S).toggle=T},isToastActive:S=>f.some(T=>T===S),getSnapshot:()=>y.newestOnTop?h.reverse():h}}(i,s,Yp);st.set(i,l);const a=l.observe(c);return Ur.forEach(u=>Yc(u.content,u.options)),Ur=[],()=>{a(),st.delete(i)}},setProps(c){var l;(l=st.get(i))==null||l.setProps(c)},getSnapshot(){var c;return(c=st.get(i))==null?void 0:c.getSnapshot()}}}(e)).current;r(e);const o=_.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const i=new Map;return o.forEach(c=>{const{position:l}=c.props;i.has(l)||i.set(l,[]),i.get(l).push(c)}),Array.from(i,c=>s(c[0],c[1]))},isToastActive:zc,count:o==null?void 0:o.length}}function Qp(e){const[t,n]=_.useState(!1),[r,o]=_.useState(!1),s=_.useRef(null),i=_.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:l,closeToast:a,onClick:u,closeOnClick:p}=e;var g,E;function b(){n(!0)}function d(){n(!1)}function f(m){const x=s.current;i.canDrag&&x&&(i.didMove=!0,t&&d(),i.delta=e.draggableDirection==="x"?m.clientX-i.start:m.clientY-i.start,i.start!==m.clientX&&(i.canCloseOnClick=!1),x.style.transform=`translate3d(${e.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`},0)`,x.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function h(){document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",h);const m=s.current;if(i.canDrag&&i.didMove&&m){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();m.style.transition="transform 0.2s, opacity 0.2s",m.style.removeProperty("transform"),m.style.removeProperty("opacity")}}(E=st.get((g={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||E.setToggle(g.id,g.fn),_.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||d(),window.addEventListener("focus",b),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",b),window.removeEventListener("blur",d)}},[e.pauseOnFocusLoss]);const y={onPointerDown:function(m){if(e.draggable===!0||e.draggable===m.pointerType){i.didMove=!1,document.addEventListener("pointermove",f),document.addEventListener("pointerup",h);const x=s.current;i.canCloseOnClick=!0,i.canDrag=!0,x.style.transition="none",e.draggableDirection==="x"?(i.start=m.clientX,i.removalDistance=x.offsetWidth*(e.draggablePercent/100)):(i.start=m.clientY,i.removalDistance=x.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(m){const{top:x,bottom:I,left:w,right:A}=s.current.getBoundingClientRect();m.nativeEvent.type!=="touchend"&&e.pauseOnHover&&m.clientX>=w&&m.clientX<=A&&m.clientY>=x&&m.clientY<=I?d():b()}};return c&&l&&(y.onMouseEnter=d,e.stacked||(y.onMouseLeave=b)),p&&(y.onClick=m=>{u&&u(m),i.canCloseOnClick&&a()}),{playToast:b,pauseToast:d,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:y}}function $p(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:i,style:c,controlledProgress:l,progress:a,rtl:u,isIn:p,theme:g}=e;const E=s||l&&a===0,b={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(b.transform=`scaleX(${a})`);const d=hn("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),f=Et(i)?i({rtl:u,type:o,defaultClassName:d}):hn(d,i),h={[l&&a>=1?"onTransitionEnd":"onAnimationEnd"]:l&&a<1?null:()=>{p&&r()}};return _.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":E},_.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${o}`}),_.createElement("div",{role:"progressbar","aria-hidden":E?"true":"false","aria-label":"notification timer",className:f,style:b,...h}))}let qp=1;const Qc=()=>""+qp++;function Up(e){return e&&(kn(e.toastId)||qr(e.toastId))?e.toastId:Qc()}function Kr(e,t){return Yc(e,t),t.toastId}function Go(e,t){return{...t,type:t&&t.type||e,toastId:Up(t)}}function Ho(e){return(t,n)=>Kr(t,Go(e,n))}function xe(e,t){return Kr(e,Go("default",t))}xe.loading=(e,t)=>Kr(e,Go("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),xe.promise=function(e,t,n){let r,{pending:o,error:s,success:i}=t;o&&(r=kn(o)?xe.loading(o,n):xe.loading(o.render,{...n,...o}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,p,g)=>{if(p==null)return void xe.dismiss(r);const E={type:u,...c,...n,data:g},b=kn(p)?{render:p}:p;return r?xe.update(r,{...E,...b}):xe(b.render,{...E,...b}),g},a=Et(e)?e():e;return a.then(u=>l("success",i,u)).catch(u=>l("error",s,u)),a},xe.success=Ho("success"),xe.info=Ho("info"),xe.error=Ho("error"),xe.warning=Ho("warning"),xe.warn=xe.warning,xe.dark=(e,t)=>Kr(e,Go("default",{theme:"dark",...t})),xe.dismiss=function(e){(function(t){var n;if(Xc()){if(t==null||kn(n=t)||qr(n))st.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=st.get(t.containerId);r?r.removeToast(t.id):st.forEach(o=>{o.removeToast(t.id)})}}else Ur=Ur.filter(r=>t!=null&&r.options.toastId!==t)})(e)},xe.clearWaitingQueue=function(e){e===void 0&&(e={}),st.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},xe.isActive=zc,xe.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:i}=o;return(s=st.get(i||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:Qc()};s.toastId!==e&&(s.staleId=e);const i=s.render||o;delete s.render,Kr(i,s)}},xe.done=e=>{xe.update(e,{progress:1})},xe.onChange=function(e){return xi.add(e),()=>{xi.delete(e)}},xe.play=e=>Jc(!0,e),xe.pause=e=>Jc(!1,e);const Kp=typeof window<"u"?_.useLayoutEffect:_.useEffect,Wo=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return _.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},wi={info:function(e){return _.createElement(Wo,{...e},_.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 _.createElement(Wo,{...e},_.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 _.createElement(Wo,{...e},_.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 _.createElement(Wo,{...e},_.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 _.createElement("div",{className:"Toastify__spinner"})}},eh=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=Qp(e),{closeButton:i,children:c,autoClose:l,onClick:a,type:u,hideProgressBar:p,closeToast:g,transition:E,position:b,className:d,style:f,bodyClassName:h,bodyStyle:y,progressClassName:m,progressStyle:x,updateId:I,role:w,progress:A,rtl:S,toastId:T,deleteToast:R,isIn:D,isLoading:F,closeOnClick:P,theme:j}=e,X=hn("Toastify__toast",`Toastify__toast-theme--${j}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":P}),Y=Et(d)?d({rtl:S,position:b,type:u,defaultClassName:X}):hn(X,d),q=function(le){let{theme:B,type:H,isLoading:V,icon:Z}=le,U=null;const ee={theme:B,type:H};return Z===!1||(Et(Z)?U=Z({...ee,isLoading:V}):_.isValidElement(Z)?U=_.cloneElement(Z,ee):V?U=wi.spinner():(re=>re in wi)(H)&&(U=wi[H](ee))),U}(e),J=!!A||!l,z={closeToast:g,type:u,theme:j};let ae=null;return i===!1||(ae=Et(i)?i(z):_.isValidElement(i)?_.cloneElement(i,z):function(le){let{closeToast:B,theme:H,ariaLabel:V="close"}=le;return _.createElement("button",{className:`Toastify__close-button Toastify__close-button--${H}`,type:"button",onClick:Z=>{Z.stopPropagation(),B(Z)},"aria-label":V},_.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},_.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)),_.createElement(E,{isIn:D,done:R,position:b,preventExitTransition:n,nodeRef:r,playToast:s},_.createElement("div",{id:T,onClick:a,"data-in":D,className:Y,...o,style:f,ref:r},_.createElement("div",{...D&&{role:w},className:Et(h)?h({type:u}):hn("Toastify__toast-body",h),style:y},q!=null&&_.createElement("div",{className:hn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!F})},q),_.createElement("div",null,c)),ae,_.createElement($p,{...I&&!J?{key:`pb-${I}`}:{},rtl:S,theme:j,delay:l,isRunning:t,isIn:D,closeToast:g,hide:p,type:u,style:x,className:m,controlledProgress:J,progress:A||0})))},Zo=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},th=Vo(Zo("bounce",!0));Vo(Zo("slide",!0)),Vo(Zo("zoom")),Vo(Zo("flip"));const nh={position:"top-right",transition:th,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function rh(e){let t={...nh,...e};const n=e.stacked,[r,o]=_.useState(!0),s=_.useRef(null),{getToastToRender:i,isToastActive:c,count:l}=Jp(t),{className:a,style:u,rtl:p,containerId:g}=t;function E(d){const f=hn("Toastify__toast-container",`Toastify__toast-container--${d}`,{"Toastify__toast-container--rtl":p});return Et(a)?a({position:d,rtl:p,defaultClassName:f}):hn(f,jo(a))}function b(){n&&(o(!0),xe.play())}return Kp(()=>{if(n){var d;const f=s.current.querySelectorAll('[data-in="true"]'),h=12,y=(d=t.position)==null?void 0:d.includes("top");let m=0,x=0;Array.from(f).reverse().forEach((I,w)=>{const A=I;A.classList.add("Toastify__toast--stacked"),w>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=y?"top":"bot");const S=m*(r?.2:1)+(r?0:h*w);A.style.setProperty("--y",`${y?S:-1*S}px`),A.style.setProperty("--g",`${h}`),A.style.setProperty("--s",""+(1-(r?x:0))),m+=A.offsetHeight,x+=.025})}},[r,l,n]),_.createElement("div",{ref:s,className:"Toastify",id:g,onMouseEnter:()=>{n&&(o(!1),xe.pause())},onMouseLeave:b},i((d,f)=>{const h=f.length?{...u}:{...u,pointerEvents:"none"};return _.createElement("div",{className:E(d),style:h,key:`container-${d}`},f.map(y=>{let{content:m,props:x}=y;return _.createElement(eh,{...x,stacked:n,collapseAll:b,isIn:c(x.toastId,x.containerId),style:x.style,key:`toast-${x.key}`},m)}))}))}const Ai=(e,t)=>t.some(n=>e instanceof n);let $c,qc;function oh(){return $c||($c=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function sh(){return qc||(qc=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Si=new WeakMap,_i=new WeakMap,Xo=new WeakMap;function ih(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Nn(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return Xo.set(t,e),t}function ah(e){if(Si.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),o()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});Si.set(e,t)}let Ti={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Si.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Nn(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 Uc(e){Ti=e(Ti)}function ch(e){return sh().includes(e)?function(...t){return e.apply(Oi(this),t),Nn(this.request)}:function(...t){return Nn(e.apply(Oi(this),t))}}function lh(e){return typeof e=="function"?ch(e):(e instanceof IDBTransaction&&ah(e),Ai(e,oh())?new Proxy(e,Ti):e)}function Nn(e){if(e instanceof IDBRequest)return ih(e);if(_i.has(e))return _i.get(e);const t=lh(e);return t!==e&&(_i.set(e,t),Xo.set(t,e)),t}const Oi=e=>Xo.get(e);function uh(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),c=Nn(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Nn(i.result),l.oldVersion,l.newVersion,Nn(i.transaction),l)}),n&&i.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),c.then(l=>{s&&l.addEventListener("close",()=>s()),o&&l.addEventListener("versionchange",a=>o(a.oldVersion,a.newVersion,a))}).catch(()=>{}),c}const dh=["get","getKey","getAll","getAllKeys","count"],fh=["put","add","delete","clear"],Li=new Map;function Kc(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Li.get(t))return Li.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=fh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||dh.includes(n)))return;const s=async function(i,...c){const l=this.transaction(i,o?"readwrite":"readonly");let a=l.store;return r&&(a=a.index(c.shift())),(await Promise.all([a[n](...c),o&&l.done]))[0]};return Li.set(t,s),s}Uc(e=>({...e,get:(t,n,r)=>Kc(t,n)||e.get(t,n,r),has:(t,n)=>!!Kc(t,n)||e.has(t,n)}));const ph=["continue","continuePrimaryKey","advance"],el={},Fi=new WeakMap,tl=new WeakMap,hh={get(e,t){if(!ph.includes(t))return e[t];let n=el[t];return n||(n=el[t]=function(...r){Fi.set(this,tl.get(this)[t](...r))}),n}};async function*gh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,hh);for(tl.set(n,t),Xo.set(n,Oi(t));t;)yield n,t=await(Fi.get(n)||t.continue()),Fi.delete(n)}function nl(e,t){return t===Symbol.asyncIterator&&Ai(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Ai(e,[IDBIndex,IDBObjectStore])}Uc(e=>({...e,get(t,n,r){return nl(t,n)?gh:e.get(t,n,r)},has(t,n){return nl(t,n)||e.has(t,n)}}));const mh="connector-db",bh=1,zo={FEEDBACK:"feedback"},eo=`${zo.FEEDBACK}:data`,Yo=`${zo.FEEDBACK}:last_submitted`,to=`${zo.FEEDBACK}:capture_on_demand`,no=`${zo.FEEDBACK}:show_notification`,yh=12*60*60*1e3,Di=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=yh:!0,rl=(e,t=!1)=>e.captureFeedback&&(Di(e.firstViewed)&&(!e.lastSubmittedFeedback||Di(e.lastSubmittedFeedback))||!!t);let Pn=null;const gn=async()=>{try{Pn||(Pn=await uh(mh,bh,{upgrade(e){e.objectStoreNames.contains(eo)||e.createObjectStore(eo),e.objectStoreNames.contains(Yo)||e.createObjectStore(Yo),e.objectStoreNames.contains(to)||e.createObjectStore(to),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."),Pn&&(Pn.close(),Pn=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Pn=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Pn},Ri=async e=>{if(!e)return[];const t=await gn();if(!t)return[];try{return await t.get(eo,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},vh=async e=>{if(!e)return null;const t=await gn();if(!t)return null;try{return await t.get(Yo,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Jo=async e=>{if(!e)return;const t=await gn();if(t)try{return await t.get(to,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},Ch=async e=>{if(!e)return!1;const t=await gn();if(!t)return!1;try{return await t.get(no,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},Ih=async(e,t)=>{if(!e||!t||!t.length)return;const n=await gn();if(n)try{const r=await Ri(e),o=new Set(r.map(i=>i.connectorId)),s=t.filter(i=>!o.has(i.connector_id)).map(i=>({connectorId:i.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const i=[...r,...s];await n.put(eo,i,e),await n.put(no,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},Eh=async e=>{if(!e)return;const t=await gn();if(t)try{const n=await Ri(e),r=await Jo(e),o=new Date,s=n.map(i=>{const c=rl(i,r);return{...i,lastSubmittedFeedback:c?o:i.lastSubmittedFeedback,captureFeedback:i.captureFeedback!==c}});await t.put(eo,s,e),await t.put(Yo,o,e),r&&await t.put(to,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},ol=async(e,t)=>{if(!e)return;const n=await gn();if(n)try{await n.put(to,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},xh=async e=>{if(!e)return;const t=await gn();if(t)try{await t.put(no,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},wh=async e=>{const t=await Ri(e),n=await Jo(e);return t.filter(o=>rl(o,n))},ki=async e=>{const t=await vh(e);return t&&!Di(t)?!1:await Jo(e)&&!t?!0:!!(await wh(e)).length},Ah=async(e,t)=>{await Ih(e,t)},Qo=async e=>{e&&await Eh(e)},Sh=async(e,t)=>{const n=await Jo(e);t?n!==!1&&await ol(e,t):await ol(e,void 0)},sl=async e=>await Ch(e)&&await ki(e),il=async e=>{await xh(e)};var Ni={},Mn={};function al(e,t){return function(){return e.apply(t,arguments)}}const{toString:_h}=Object.prototype,{getPrototypeOf:Pi}=Object,$o=(e=>t=>{const n=_h.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Nt=e=>(e=e.toLowerCase(),t=>$o(t)===e),qo=e=>t=>typeof t===e,{isArray:ur}=Array,ro=qo("undefined");function Th(e){return e!==null&&!ro(e)&&e.constructor!==null&&!ro(e.constructor)&&xt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const cl=Nt("ArrayBuffer");function Oh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&cl(e.buffer),t}const Lh=qo("string"),xt=qo("function"),ll=qo("number"),Uo=e=>e!==null&&typeof e=="object",Fh=e=>e===!0||e===!1,Ko=e=>{if($o(e)!=="object")return!1;const t=Pi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Dh=Nt("Date"),Rh=Nt("File"),kh=Nt("Blob"),Nh=Nt("FileList"),Ph=e=>Uo(e)&&xt(e.pipe),Mh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||xt(e.append)&&((t=$o(e))==="formdata"||t==="object"&&xt(e.toString)&&e.toString()==="[object FormData]"))},Bh=Nt("URLSearchParams"),[jh,Vh,Gh,Hh]=["ReadableStream","Request","Response","Headers"].map(Nt),Wh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ur(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),i=s.length;let c;for(r=0;r<i;r++)c=s[r],t.call(null,e[c],c,e)}}function ul(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 Bn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:fe,dl=e=>!ro(e)&&e!==Bn;function Mi(){const{caseless:e}=dl(this)&&this||{},t={},n=(r,o)=>{const s=e&&ul(t,o)||o;Ko(t[s])&&Ko(r)?t[s]=Mi(t[s],r):Ko(r)?t[s]=Mi({},r):ur(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oo(arguments[r],n);return t}const Zh=(e,t,n,{allOwnKeys:r}={})=>(oo(t,(o,s)=>{n&&xt(o)?e[s]=al(o,n):e[s]=o},{allOwnKeys:r}),e),Xh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zh=(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)},Yh=(e,t,n,r)=>{let o,s,i;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&Pi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jh=(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},Qh=e=>{if(!e)return null;if(ur(e))return e;let t=e.length;if(!ll(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$h=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pi(Uint8Array)),qh=(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])}},Uh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Kh=Nt("HTMLFormElement"),e2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),fl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),t2=Nt("RegExp"),pl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oo(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},n2=e=>{pl(e,(t,n)=>{if(xt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(xt(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+"'")})}})},r2=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return ur(e)?r(e):r(String(e).split(t)),n},o2=()=>{},s2=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Bi="abcdefghijklmnopqrstuvwxyz",hl="0123456789",gl={DIGIT:hl,ALPHA:Bi,ALPHA_DIGIT:Bi+Bi.toUpperCase()+hl},i2=(e=16,t=gl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function a2(e){return!!(e&&xt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const c2=e=>{const t=new Array(10),n=(r,o)=>{if(Uo(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=ur(r)?[]:{};return oo(r,(i,c)=>{const l=n(i,o+1);!ro(l)&&(s[c]=l)}),t[o]=void 0,s}}return r};return n(e,0)},l2=Nt("AsyncFunction"),u2=e=>e&&(Uo(e)||xt(e))&&xt(e.then)&&xt(e.catch),ml=((e,t)=>e?setImmediate:t?((n,r)=>(Bn.addEventListener("message",({source:o,data:s})=>{o===Bn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Bn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",xt(Bn.postMessage)),d2=typeof queueMicrotask<"u"?queueMicrotask.bind(Bn):typeof process<"u"&&process.nextTick||ml;var N={isArray:ur,isArrayBuffer:cl,isBuffer:Th,isFormData:Mh,isArrayBufferView:Oh,isString:Lh,isNumber:ll,isBoolean:Fh,isObject:Uo,isPlainObject:Ko,isReadableStream:jh,isRequest:Vh,isResponse:Gh,isHeaders:Hh,isUndefined:ro,isDate:Dh,isFile:Rh,isBlob:kh,isRegExp:t2,isFunction:xt,isStream:Ph,isURLSearchParams:Bh,isTypedArray:$h,isFileList:Nh,forEach:oo,merge:Mi,extend:Zh,trim:Wh,stripBOM:Xh,inherits:zh,toFlatObject:Yh,kindOf:$o,kindOfTest:Nt,endsWith:Jh,toArray:Qh,forEachEntry:qh,matchAll:Uh,isHTMLForm:Kh,hasOwnProperty:fl,hasOwnProp:fl,reduceDescriptors:pl,freezeMethods:n2,toObjectSet:r2,toCamelCase:e2,noop:o2,toFiniteNumber:s2,findKey:ul,global:Bn,isContextDefined:dl,ALPHABET:gl,generateString:i2,isSpecCompliantForm:a2,toJSONObject:c2,isAsyncFn:l2,isThenable:u2,setImmediate:ml,asap:d2};function pe(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)}N.inherits(pe,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:N.toJSONObject(this.config),code:this.code,status:this.status}}});const bl=pe.prototype,yl={};["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=>{yl[e]={value:e}}),Object.defineProperties(pe,yl),Object.defineProperty(bl,"isAxiosError",{value:!0}),pe.from=(e,t,n,r,o,s)=>{const i=Object.create(bl);return N.toFlatObject(e,i,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),pe.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};var f2=null;function ji(e){return N.isPlainObject(e)||N.isArray(e)}function vl(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function Cl(e,t,n){return e?e.concat(t).map(function(o,s){return o=vl(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function p2(e){return N.isArray(e)&&!e.some(ji)}const h2=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function es(e,t,n){if(!N.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,f){return!N.isUndefined(f[d])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(t);if(!N.isFunction(o))throw new TypeError("visitor must be a function");function a(b){if(b===null)return"";if(N.isDate(b))return b.toISOString();if(!l&&N.isBlob(b))throw new pe("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(b)||N.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function u(b,d,f){let h=b;if(b&&!f&&typeof b=="object"){if(N.endsWith(d,"{}"))d=r?d:d.slice(0,-2),b=JSON.stringify(b);else if(N.isArray(b)&&p2(b)||(N.isFileList(b)||N.endsWith(d,"[]"))&&(h=N.toArray(b)))return d=vl(d),h.forEach(function(m,x){!(N.isUndefined(m)||m===null)&&t.append(i===!0?Cl([d],x,s):i===null?d:d+"[]",a(m))}),!1}return ji(b)?!0:(t.append(Cl(f,d,s),a(b)),!1)}const p=[],g=Object.assign(h2,{defaultVisitor:u,convertValue:a,isVisitable:ji});function E(b,d){if(!N.isUndefined(b)){if(p.indexOf(b)!==-1)throw Error("Circular reference detected in "+d.join("."));p.push(b),N.forEach(b,function(h,y){(!(N.isUndefined(h)||h===null)&&o.call(t,h,N.isString(y)?y.trim():y,d,g))===!0&&E(h,d?d.concat(y):[y])}),p.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Il(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Vi(e,t){this._pairs=[],e&&es(e,this,t)}const El=Vi.prototype;El.append=function(t,n){this._pairs.push([t,n])},El.toString=function(t){const n=t?function(r){return t.call(this,r,Il)}:Il;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function g2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xl(e,t,n){if(!t)return e;const r=n&&n.encode||g2,o=n&&n.serialize;let s;if(o?s=o(t,n):s=N.isURLSearchParams(t)?t.toString():new Vi(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class m2{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){N.forEach(this.handlers,function(r){r!==null&&t(r)})}}var wl=m2,Al={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},b2=typeof URLSearchParams<"u"?URLSearchParams:Vi,y2=typeof FormData<"u"?FormData:null,v2=typeof Blob<"u"?Blob:null,C2={isBrowser:!0,classes:{URLSearchParams:b2,FormData:y2,Blob:v2},protocols:["http","https","file","blob","url","data"]};const Gi=typeof window<"u"&&typeof document<"u",Hi=typeof navigator=="object"&&navigator||void 0,I2=Gi&&(!Hi||["ReactNative","NativeScript","NS"].indexOf(Hi.product)<0),E2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",x2=Gi&&window.location.href||"http://localhost";var w2=Object.freeze({__proto__:null,hasBrowserEnv:Gi,hasStandardBrowserWebWorkerEnv:E2,hasStandardBrowserEnv:I2,navigator:Hi,origin:x2}),ut={...w2,...C2};function A2(e,t){return es(e,new ut.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ut.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function S2(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _2(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 Sl(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),l=s>=n.length;return i=!i&&N.isArray(o)?o.length:i,l?(N.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!c):((!o[i]||!N.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&N.isArray(o[i])&&(o[i]=_2(o[i])),!c)}if(N.isFormData(e)&&N.isFunction(e.entries)){const n={};return N.forEachEntry(e,(r,o)=>{t(S2(r),o,n,0)}),n}return null}function T2(e,t,n){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Wi={transitional:Al,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=N.isObject(t);if(s&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return o?JSON.stringify(Sl(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)||N.isReadableStream(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return A2(t,this.formSerializer).toString();if((c=N.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return es(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),T2(t)):t}],transformResponse:[function(t){const n=this.transitional||Wi.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(N.isResponse(t)||N.isReadableStream(t))return t;if(t&&N.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?pe.from(c,pe.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ut.classes.FormData,Blob:ut.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],e=>{Wi.headers[e]={}});var Zi=Wi;const O2=N.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 L2=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
31
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&O2[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const
|
|
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[_l]=this[_l]={accessors:{}}).accessors,o=this.prototype;function s(i){const c=so(i);r[c]||(k2(o,i),r[c]=!0)}return N.isArray(t)?t.forEach(s):s(t),this}}ns.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(ns.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),N.freezeMethods(ns);var Pt=ns;function zi(e,t){const n=this||Zi,r=t||n,o=Pt.from(r.headers);let s=r.data;return N.forEach(e,function(c){s=c.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Tl(e){return!!(e&&e.__CANCEL__)}function dr(e,t,n){pe.call(this,e??"canceled",pe.ERR_CANCELED,t,n),this.name="CanceledError"}N.inherits(dr,pe,{__CANCEL__:!0});function Ol(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pe("Request failed with status code "+n.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function N2(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function P2(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const a=Date.now(),u=r[s];i||(i=a),n[o]=l,r[o]=a;let p=s,g=0;for(;p!==o;)g+=n[p++],p=p%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),a-i<t)return;const E=u&&a-u;return E?Math.round(g*1e3/E):void 0}}function M2(e,t){let n=0,r=1e3/t,o,s;const i=(a,u=Date.now())=>{n=u,o=null,s&&(clearTimeout(s),s=null),e.apply(null,a)};return[(...a)=>{const u=Date.now(),p=u-n;p>=r?i(a,u):(o=a,s||(s=setTimeout(()=>{s=null,i(o)},r-p)))},()=>o&&i(o)]}const rs=(e,t,n=3)=>{let r=0;const o=P2(50,250);return M2(s=>{const i=s.loaded,c=s.lengthComputable?s.total:void 0,l=i-r,a=o(l),u=i<=c;r=i;const p={loaded:i,total:c,progress:c?i/c:void 0,bytes:l,rate:a||void 0,estimated:a&&c&&u?(c-i)/a:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},Ll=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Fl=e=>(...t)=>N.asap(()=>e(...t));var B2=ut.hasStandardBrowserEnv?function(){const t=ut.navigator&&/(msie|trident)/i.test(ut.navigator.userAgent),n=document.createElement("a");let r;function o(s){let i=s;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{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(i){const c=N.isString(i)?o(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),j2=ut.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];N.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),N.isString(r)&&i.push("path="+r),N.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.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 V2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function G2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Dl(e,t){return e&&!V2(t)?G2(e,t):t}const Rl=e=>e instanceof Pt?{...e}:e;function jn(e,t){t=t||{};const n={};function r(a,u,p){return N.isPlainObject(a)&&N.isPlainObject(u)?N.merge.call({caseless:p},a,u):N.isPlainObject(u)?N.merge({},u):N.isArray(u)?u.slice():u}function o(a,u,p){if(N.isUndefined(u)){if(!N.isUndefined(a))return r(void 0,a,p)}else return r(a,u,p)}function s(a,u){if(!N.isUndefined(u))return r(void 0,u)}function i(a,u){if(N.isUndefined(u)){if(!N.isUndefined(a))return r(void 0,a)}else return r(void 0,u)}function c(a,u,p){if(p in t)return r(a,u);if(p in e)return r(void 0,a)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(a,u)=>o(Rl(a),Rl(u),!0)};return N.forEach(Object.keys(Object.assign({},e,t)),function(u){const p=l[u]||o,g=p(e[u],t[u],u);N.isUndefined(g)&&p!==c||(n[u]=g)}),n}var kl=e=>{const t=jn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;t.headers=i=Pt.from(i),t.url=xl(Dl(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(N.isFormData(n)){if(ut.hasStandardBrowserEnv||ut.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[a,...u]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];i.setContentType([a||"multipart/form-data",...u].join("; "))}}if(ut.hasStandardBrowserEnv&&(r&&N.isFunction(r)&&(r=r(t)),r||r!==!1&&B2(t.url))){const a=o&&s&&j2.read(s);a&&i.set(o,a)}return t},H2=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=kl(e);let s=o.data;const i=Pt.from(o.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:a}=o,u,p,g,E,b;function d(){E&&E(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function h(){if(!f)return;const m=Pt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),I={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:m,config:e,request:f};Ol(function(A){n(A),d()},function(A){r(A),d()},I),f=null}"onloadend"in f?f.onloadend=h:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(h)},f.onabort=function(){f&&(r(new pe("Request aborted",pe.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new pe("Network Error",pe.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const I=o.transitional||Al;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new pe(x,I.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&N.forEach(i.toJSON(),function(x,I){f.setRequestHeader(I,x)}),N.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),c&&c!=="json"&&(f.responseType=o.responseType),a&&([g,b]=rs(a,!0),f.addEventListener("progress",g)),l&&f.upload&&([p,E]=rs(l),f.upload.addEventListener("progress",p),f.upload.addEventListener("loadend",E)),(o.cancelToken||o.signal)&&(u=m=>{f&&(r(!m||m.type?new dr(null,e,f):m),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const y=N2(o.url);if(y&&ut.protocols.indexOf(y)===-1){r(new pe("Unsupported protocol "+y+":",pe.ERR_BAD_REQUEST,e));return}f.send(s||null)})},W2=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(a){if(!o){o=!0,c();const u=a instanceof Error?a:this.reason;r.abort(u instanceof pe?u:new dr(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,s(new pe(`timeout ${t} of ms exceeded`,pe.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(s):a.removeEventListener("abort",s)}),e=null)};e.forEach(a=>a.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>N.asap(c),l}};const Z2=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},X2=async function*(e,t){for await(const n of z2(e))yield*Z2(n,t)},z2=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()}},Nl=(e,t,n,r)=>{const o=X2(e,t);let s=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:a,value:u}=await o.next();if(a){c(),l.close();return}let p=u.byteLength;if(n){let g=s+=p;n(g)}l.enqueue(new Uint8Array(u))}catch(a){throw c(a),a}},cancel(l){return c(l),o.return()}},{highWaterMark:2})},os=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Pl=os&&typeof ReadableStream=="function",Y2=os&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ml=(e,...t)=>{try{return!!e(...t)}catch{return!1}},J2=Pl&&Ml(()=>{let e=!1;const t=new Request(ut.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Bl=64*1024,Yi=Pl&&Ml(()=>N.isReadableStream(new Response("").body)),ss={stream:Yi&&(e=>e.body)};os&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ss[t]&&(ss[t]=N.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new pe(`Response type '${t}' is not supported`,pe.ERR_NOT_SUPPORT,r)})})})(new Response);const Q2=async e=>{if(e==null)return 0;if(N.isBlob(e))return e.size;if(N.isSpecCompliantForm(e))return(await new Request(ut.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(N.isArrayBufferView(e)||N.isArrayBuffer(e))return e.byteLength;if(N.isURLSearchParams(e)&&(e=e+""),N.isString(e))return(await Y2(e)).byteLength},$2=async(e,t)=>{const n=N.toFiniteNumber(e.getContentLength());return n??Q2(t)};var q2=os&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:l,responseType:a,headers:u,withCredentials:p="same-origin",fetchOptions:g}=kl(e);a=a?(a+"").toLowerCase():"text";let E=W2([o,s&&s.toAbortSignal()],i),b;const d=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let f;try{if(l&&J2&&n!=="get"&&n!=="head"&&(f=await $2(u,r))!==0){let I=new Request(t,{method:"POST",body:r,duplex:"half"}),w;if(N.isFormData(r)&&(w=I.headers.get("content-type"))&&u.setContentType(w),I.body){const[A,S]=Ll(f,rs(Fl(l)));r=Nl(I.body,Bl,A,S)}}N.isString(p)||(p=p?"include":"omit");const h="credentials"in Request.prototype;b=new Request(t,{...g,signal:E,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:h?p:void 0});let y=await fetch(b);const m=Yi&&(a==="stream"||a==="response");if(Yi&&(c||m&&d)){const I={};["status","statusText","headers"].forEach(T=>{I[T]=y[T]});const w=N.toFiniteNumber(y.headers.get("content-length")),[A,S]=c&&Ll(w,rs(Fl(c),!0))||[];y=new Response(Nl(y.body,Bl,A,()=>{S&&S(),d&&d()}),I)}a=a||"text";let x=await ss[N.findKey(ss,a)||"text"](y,e);return!m&&d&&d(),await new Promise((I,w)=>{Ol(I,w,{data:x,headers:Pt.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:b})})}catch(h){throw d&&d(),h&&h.name==="TypeError"&&/fetch/i.test(h.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,e,b),{cause:h.cause||h}):pe.from(h,h&&h.code,e,b)}});const Ji={http:f2,xhr:H2,fetch:q2};N.forEach(Ji,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jl=e=>`- ${e}`,U2=e=>N.isFunction(e)||e===null||e===!1;var Vl={getAdapter:e=>{e=N.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!U2(n)&&(r=Ji[(i=String(n)).toLowerCase()],r===void 0))throw new pe(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
33
|
-
`+s.map(
|
|
34
|
-
`):" "+
|
|
35
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=jn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&qi.assertOptions(r,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean)},!1),o!=null&&(N.isFunction(o)?n.paramsSerializer={serialize:o}:qi.assertOptions(o,{encode:mn.function,serialize:mn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&N.merge(s.common,s[n.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=Pt.concat(i,s);const c=[];let l=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(n)===!1||(l=l&&d.synchronous,c.unshift(d.fulfilled,d.rejected))});const a=[];this.interceptors.response.forEach(function(d){a.push(d.fulfilled,d.rejected)});let u,p=0,g;if(!l){const b=[Gl.bind(this),void 0];for(b.unshift.apply(b,c),b.push.apply(b,a),g=b.length,u=Promise.resolve(n);p<g;)u=u.then(b[p++],b[p++]);return u}g=c.length;let E=n;for(p=0;p<g;){const b=c[p++],d=c[p++];try{E=b(E)}catch(f){d.call(this,f);break}}try{u=Gl.call(this,E)}catch(b){return Promise.reject(b)}for(p=0,g=a.length;p<g;)u=u.then(a[p++],a[p++]);return u}getUri(t){t=jn(this.defaults,t);const n=Dl(t.baseURL,t.url);return xl(n,t.params,t.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(t){is.prototype[t]=function(n,r){return this.request(jn(r||{},{method:t,url:n,data:(r||{}).data}))}}),N.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,c){return this.request(jn(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}is.prototype[t]=n(),is.prototype[t+"Form"]=n(!0)});var as=is;class Ui{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 i=new Promise(c=>{r.subscribe(c),s=c}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,c){r.reason||(r.reason=new dr(s,i,c),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 Ui(function(o){t=o}),cancel:t}}}var eg=Ui;function tg(e){return function(n){return e.apply(null,n)}}function ng(e){return N.isObject(e)&&e.isAxiosError===!0}const Ki={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(Ki).forEach(([e,t])=>{Ki[t]=e});var rg=Ki;function Zl(e){const t=new as(e),n=al(as.prototype.request,t);return N.extend(n,as.prototype,t,{allOwnKeys:!0}),N.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Zl(jn(e,o))},n}const He=Zl(Zi);He.Axios=as,He.CanceledError=dr,He.CancelToken=eg,He.isCancel=Tl,He.VERSION=Hl,He.toFormData=es,He.AxiosError=pe,He.Cancel=He.CanceledError,He.all=function(t){return Promise.all(t)},He.spread=tg,He.isAxiosError=ng,He.mergeConfig=jn,He.AxiosHeaders=Pt,He.formToJSON=e=>Sl(N.isHTMLForm(e)?new FormData(e):e),He.getAdapter=Vl.getAdapter,He.HttpStatusCode=rg,He.default=He;var Xl=He,Ce={},bn={};(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={}))})(bn);var dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.getProdHqConfig=dt.getProdApiConfig=dt.getSitHqConfig=dt.getSitApiConfig=dt.getDevHqConfig=dt.getDevApiConfig=void 0;var fr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},og=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:fr}};dt.getDevApiConfig=og;var sg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:fr}};dt.getDevHqConfig=sg;var ig=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:fr}};dt.getSitApiConfig=ig;var ag=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:fr}};dt.getSitHqConfig=ag;var cg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:fr}};dt.getProdApiConfig=cg;var lg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:fr}};dt.getProdHqConfig=lg;var Xt={},zt={};Object.defineProperty(zt,"__esModule",{value:!0}),zt.removeValue=zt.getValue=zt.setValue=void 0;var ea={};function ug(e,t){ea[e]=t}zt.setValue=ug;function dg(e){return ea[e]}zt.getValue=dg;function fg(e){delete ea[e]}zt.removeValue=fg,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.removeItemFromStorage=Xt.setItemInStorage=Xt.getItemFromStorage=void 0;var pr=bn,hr=zt,pg=function(e,t){switch(t===void 0&&(t=(0,hr.getValue)("PLATFORM")),t){case pr.PLATFORM.WEB:return sessionStorage.getItem(e);case pr.PLATFORM.MOBILE:return(0,hr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};Xt.getItemFromStorage=pg;var hg=function(e,t,n){switch(n===void 0&&(n=(0,hr.getValue)("PLATFORM")),n){case pr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case pr.PLATFORM.MOBILE:return(0,hr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};Xt.setItemInStorage=hg;var gg=function(e,t){switch(t===void 0&&(t=(0,hr.getValue)("PLATFORM")),t){case pr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case pr.PLATFORM.MOBILE:(0,hr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};Xt.removeItemFromStorage=gg;var mg=fe&&fe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(u){try{a(r.next(u))}catch(p){i(p)}}function l(u){try{a(r.throw(u))}catch(p){i(p)}}function a(u){u.done?s(u.value):o(u.value).then(c,l)}a((r=r.apply(e,t||[])).next())})},bg=fe&&fe.__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,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(a){return function(u){return l([a,u])}}function l(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(n=0)),n;)try{if(r=1,o&&(s=a[0]&2?o.return:a[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;switch(o=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,o=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(u){a=[6,u],o=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.expireToken=Ce.invalidateToken=Ce.validateToken=Ce.validateAccount=Ce.getConfig=Ce.introduceDelay=Ce.isTokenInExpiryWindow=Ce.getStoredAuthData=Ce.setUserDetails=Ce.getRefreshInterval=Ce.setTokenAndExpiry=Ce.getRandomDelay=Ce.hasValidToken=void 0;var nn=bn,gr=dt,wt=Xt,ta=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},na=function(e){var t=parseInt((0,wt.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,wt.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Ce.validateAccount=na;var yg=function(e){var t=na(e);return!zl()&&t};Ce.validateToken=yg;var vg=function(e){return e.apiRetry?e.apiRetry>0:!1};Ce.invalidateToken=vg;var Cg=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ce.expireToken=Cg;var Ig=function(e){var t=(0,wt.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=ta(),o=na(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Ce.hasValidToken=Ig;var Eg=function(){return Math.floor(Math.random()*6e4)+6e4};Ce.getRandomDelay=Eg;var xg=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,wt.setItemInStorage)("hiverAuthUserId",e),(0,wt.setItemInStorage)("hiverAuthUserGroupId",t)};Ce.setUserDetails=xg;var wg=function(e,t){if(!e)throw new Error("Token not found in the response");(0,wt.setItemInStorage)("hiverAuthToken",e),(0,wt.setItemInStorage)("hiverAuthTokenExpiry",t)};Ce.setTokenAndExpiry=wg;var Ag=function(){var e=(0,wt.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,wt.getItemFromStorage)("hiverAuthToken"),n=(0,wt.getItemFromStorage)("hiverAuthUserId"),r=(0,wt.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Ce.getStoredAuthData=Ag;var zl=function(){var e=(0,wt.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=ta(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Ce.isTokenInExpiryWindow=zl;var Sg=function(e){return mg(void 0,void 0,void 0,function(){return bg(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Ce.introduceDelay=Sg;var _g=function(e,t,n){switch(n===void 0&&(n=!0),t){case nn.TIERS.SIT:case nn.TIERS.QA:return n?(0,gr.getSitApiConfig)(e):(0,gr.getSitHqConfig)(e);case nn.TIERS.PRODUCTION:case nn.TIERS.PROD:return n?(0,gr.getProdApiConfig)():(0,gr.getProdHqConfig)();case nn.TIERS.DEV:default:return n?(0,gr.getDevApiConfig)():(0,gr.getDevHqConfig)()}};Ce.getConfig=_g;var Tg=function(){try{var e=(0,wt.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return nn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=ta();return t.getTime()-n.getTime()>nn.TWO_MINUTES_IN_MS?t.getTime()-nn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),nn.REFETCH_CHECK_DELAY}};Ce.getRefreshInterval=Tg;var io={},Mt={},Yl;function Jl(){if(Yl)return Mt;Yl=1;var e=fe&&fe.__awaiter||function(b,d,f,h){function y(m){return m instanceof f?m:new f(function(x){x(m)})}return new(f||(f=Promise))(function(m,x){function I(S){try{A(h.next(S))}catch(T){x(T)}}function w(S){try{A(h.throw(S))}catch(T){x(T)}}function A(S){S.done?m(S.value):y(S.value).then(I,w)}A((h=h.apply(b,d||[])).next())})},t=fe&&fe.__generator||function(b,d){var f={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},h,y,m,x;return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(A){return function(S){return w([A,S])}}function w(A){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,A[0]&&(f=0)),f;)try{if(h=1,y&&(m=A[0]&2?y.return:A[0]?y.throw||((m=y.return)&&m.call(y),0):y.next)&&!(m=m.call(y,A[1])).done)return m;switch(y=0,m&&(A=[A[0]&2,m.value]),A[0]){case 0:case 1:m=A;break;case 4:return f.label++,{value:A[1],done:!1};case 5:f.label++,y=A[1],A=[0];continue;case 7:A=f.ops.pop(),f.trys.pop();continue;default:if(m=f.trys,!(m=m.length>0&&m[m.length-1])&&(A[0]===6||A[0]===2)){f=0;continue}if(A[0]===3&&(!m||A[1]>m[0]&&A[1]<m[3])){f.label=A[1];break}if(A[0]===6&&f.label<m[1]){f.label=m[1],m=A;break}if(m&&f.label<m[2]){f.label=m[2],f.ops.push(A);break}m[2]&&f.ops.pop(),f.trys.pop();continue}A=d.call(b,f)}catch(S){A=[6,S],y=0}finally{h=m=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.logoutFromHeimdall=Mt.getTenantLoginCode=Mt.getLoginToken=Mt.getAccessToken=void 0;var n=bn,r=Kl(),o=Ce,s=function(b,d,f,h){var y=(0,o.getStoredAuthData)(),m=f===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":m},data:{user_id:d.userId,usergroup_id:d.usergroupId,access_token:(y==null?void 0:y.token)||"",source:h}}},i=function(b,d,f,h,y){var m=f===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:d.heimdallUrl,url:d.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},headers:{"x-hiver-tenant":m,"x-hiver-userid":h,"x-hiver-usergroupid":y}}},c=function(b,d){var f=d===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":f}}},l=function(b){return parseInt(b,10)},a=function(b,d,f,h){return{root_url:f===n.TENANT_PLATFORM.HIVERWEB?b.hotUrl:b.v2Url,url:f===n.TENANT_PLATFORM.HIVERWEB?b.apiEndpoints.hotLogin:b.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:l(d.userId),app:h||n.APP_UI.DEFAULT}}},u=function(b,d,f,h,y){return e(void 0,void 0,void 0,function(){var m,x,I,w,A,S,T;return t(this,function(R){switch(R.label){case 0:console.log("GETTOKEN tenantPlatform -> ",h),R.label=1;case 1:return R.trys.push([1,5,,6]),!(0,o.validateToken)(f)||(0,o.invalidateToken)(f)?(console.log("HEIMDALL: No valid token, fetching token"),m=s(d,f,h,y),[4,(0,r.performAxiosCall)(m)]):[3,3];case 2:return x=R.sent(),[2,{atToken:(w=x==null?void 0:x.data.at)===null||w===void 0?void 0:w.token,expiryTime:(A=x==null?void 0:x.data.at)===null||A===void 0?void 0:A.expires_at,userId:(S=x==null?void 0:x.data)===null||S===void 0?void 0:S.user_id,userGroupId:(T=x==null?void 0:x.data)===null||T===void 0?void 0:T.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw I=R.sent(),I;case 6:return[2]}})})};Mt.getAccessToken=u;var p=function(b,d,f,h,y,m){return e(void 0,void 0,void 0,function(){var x,I,w,A,S,T,R;return t(this,function(D){switch(D.label){case 0:x=i(b,f,h,y,m),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(x)];case 2:return I=D.sent(),[2,{userId:(A=I==null?void 0:I.data)===null||A===void 0?void 0:A.user_id,userGroupId:(S=I==null?void 0:I.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(T=I==null?void 0:I.data.at)===null||T===void 0?void 0:T.token,expiryTime:(R=I==null?void 0:I.data.at)===null||R===void 0?void 0:R.expires_at}];case 3:throw w=D.sent(),w;case 4:return[2]}})})};Mt.getLoginToken=p;var g=function(b,d,f,h,y){return e(void 0,void 0,void 0,function(){var m,x,I;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",y),m=a(d,f,h,y),[4,(0,r.performAxiosCall)(m)];case 1:return x=w.sent(),[2,x==null?void 0:x.data.code];case 2:throw I=w.sent(),I;case 3:return[2]}})})};Mt.getTenantLoginCode=g;var E=function(b,d,f){return f===void 0&&(f=0),e(void 0,void 0,void 0,function(){var h,y,m;return t(this,function(x){switch(x.label){case 0:return x.trys.push([0,2,,5]),h=c(b,d),[4,(0,r.performAxiosCall)(h)];case 1:return y=x.sent(),[2,y==null?void 0:y.status];case 2:return m=x.sent(),f<2?[4,E(b,d,f+1)]:[3,4];case 3:x.sent(),x.label=4;case 4:throw m;case 5:return[2]}})})};return Mt.logoutFromHeimdall=E,Mt}var cs={},Og=fe&&fe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(u){try{a(r.next(u))}catch(p){i(p)}}function l(u){try{a(r.throw(u))}catch(p){i(p)}}function a(u){u.done?s(u.value):o(u.value).then(c,l)}a((r=r.apply(e,t||[])).next())})},Lg=fe&&fe.__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,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(a){return function(u){return l([a,u])}}function l(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(n=0)),n;)try{if(r=1,o&&(s=a[0]&2?o.return:a[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;switch(o=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,o=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(u){a=[6,u],o=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(cs,"__esModule",{value:!0}),cs.subscribeToOnlineEvent=void 0;var Ql=bn,Fg=zt,Dg=function(e,t){switch(t===void 0&&(t=(0,Fg.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Ql.PLATFORM.WEB:return window.addEventListener("online",function(){return Og(void 0,void 0,void 0,function(){return Lg(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 Ql.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};cs.subscribeToOnlineEvent=Dg;var $l;function ql(){if($l)return io;$l=1;var e=fe&&fe.__awaiter||function(b,d,f,h){function y(m){return m instanceof f?m:new f(function(x){x(m)})}return new(f||(f=Promise))(function(m,x){function I(S){try{A(h.next(S))}catch(T){x(T)}}function w(S){try{A(h.throw(S))}catch(T){x(T)}}function A(S){S.done?m(S.value):y(S.value).then(I,w)}A((h=h.apply(b,d||[])).next())})},t=fe&&fe.__generator||function(b,d){var f={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},h,y,m,x;return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(A){return function(S){return w([A,S])}}function w(A){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,A[0]&&(f=0)),f;)try{if(h=1,y&&(m=A[0]&2?y.return:A[0]?y.throw||((m=y.return)&&m.call(y),0):y.next)&&!(m=m.call(y,A[1])).done)return m;switch(y=0,m&&(A=[A[0]&2,m.value]),A[0]){case 0:case 1:m=A;break;case 4:return f.label++,{value:A[1],done:!1};case 5:f.label++,y=A[1],A=[0];continue;case 7:A=f.ops.pop(),f.trys.pop();continue;default:if(m=f.trys,!(m=m.length>0&&m[m.length-1])&&(A[0]===6||A[0]===2)){f=0;continue}if(A[0]===3&&(!m||A[1]>m[0]&&A[1]<m[3])){f.label=A[1];break}if(A[0]===6&&f.label<m[1]){f.label=m[1],m=A;break}if(m&&f.label<m[2]){f.label=m[2],f.ops.push(A);break}m[2]&&f.ops.pop(),f.trys.pop();continue}A=d.call(b,f)}catch(S){A=[6,S],y=0}finally{h=m=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(io,"__esModule",{value:!0}),io.fetchAccessToken=void 0;var n=Jl(),r=bn,o=Ce,s=cs,i,c,l,a=function(b,d,f,h,y,m){return m===void 0&&(m=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var x,I,w,A,S,T,R,D,F;return t(this,function(P){switch(P.label){case 0:x=2,P.label=1;case 1:return P.trys.push([1,7,,12]),console.log("ERROR debug: in login:",m,h),I=void 0,y?[4,y()]:[3,3];case 2:return I=P.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,d,h,m)];case 4:I=P.sent(),P.label=5;case 5:return[4,(0,n.getLoginToken)(I,r.CONFIG_HIVER,b,h,d.userId,d.usergroupId)];case 6:return w=P.sent(),A=w.userId,S=w.userGroupId,T=w.atToken,R=w.expiryTime,(0,o.setTokenAndExpiry)(T,R),(0,o.setUserDetails)(A,S),[3,12];case 7:D=P.sent(),console.log("ERROR debug: in error login:",D,m),F=f,P.label=8;case 8:return F<x?[4,a(b,d,F+1,h,y,m)]:[3,11];case 9:P.sent(),P.label=10;case 10:return F++,[3,8];case 11:throw D;case 12:return[2]}})})},u=function(b,d,f,h,y){return e(void 0,void 0,void 0,function(){var m,x,I,w;return t(this,function(A){switch(A.label){case 0:return d<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,b)})]:[3,3];case 1:return A.sent(),d+=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),m=f.retryDelay,x=f.configs,I=f.apiParams,w=f.appUI,[4,p(m,b,d,x,I,h,y,w)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},p=function(b,d,f,h,y,m,x,I,w){return I===void 0&&(I="default"),e(void 0,void 0,void 0,function(){var A,S,T,R,D,F,P,j,X,Y,q,J,z,ae;return t(this,function(le){switch(le.label){case 0:return le.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",l),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,y,m,I)];case 1:return A=le.sent(),S=A.atToken,T=A.expiryTime,R=A.userId,D=A.userGroupId,S&&T&&(0,o.setTokenAndExpiry)(S,T),R&&D&&(0,o.setUserDetails)(R,D),b=r.INITIAL_RETRY_DELAY,d=r.INITIAL_RETRY_DELAY,f=0,[3,12];case 2:return F=le.sent(),console.log("ERROR: Heimdall fetch token",F),((X=F.response)===null||X===void 0?void 0:X.status)===401||((Y=F.request)===null||Y===void 0?void 0:Y.status)===401?(P=1,[4,a(h,y,P,m,x,w)]):[3,4];case 3:return le.sent(),[3,11];case 4:return((q=F.response)===null||q===void 0?void 0:q.status)===409||((J=F.request)===null||J===void 0?void 0:J.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),j={retryDelay:b,configs:h,apiParams:y,appUI:w},[4,u(d,f,j,m,x)]):[3,6];case 5:if(le.sent(),f>=r.MAX_CONFLICT_RETRY_DELAY)throw F;return[3,11];case 6:if(!(((z=F.response)===null||z===void 0?void 0:z.status)===422||((ae=F.request)===null||ae===void 0?void 0:ae.status)===422))return[3,7];throw console.log("ERROR: Throwing error",F.response.status),F;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(B){return setTimeout(B,b)})]:[3,10];case 8:return le.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,p(b,d,f,h,y,m,x,w)];case 9:return le.sent(),[3,11];case 10:throw F;case 11:return[3,12];case 12:return[2]}})})},g=function(b,d,f,h,y,m,x,I){return f===void 0&&(f=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var w,A,S;return t(this,function(T){switch(T.label){case 0:return T.trys.push([0,4,,5]),w=(0,o.isTokenInExpiryWindow)(),w?(A=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(A)]):[3,3];case 1:return T.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,p(f,h,y,b,d,m,x,I)];case 2:T.sent(),T.label=3;case 3:return[3,5];case 4:throw S=T.sent(),S;case 5:return[2]}})})},E=function(b,d,f,h,y,m,x){return e(void 0,void 0,void 0,function(){var I,w,A,S,T,R;return t(this,function(D){switch(D.label){case 0:i=b,c=d,I=r.INITIAL_RETRY_DELAY,w=r.INITIAL_RETRY_DELAY,A=0,S=(0,o.getConfig)(i,c),console.log("Instance: Fetch Call"),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,p(I,w,A,S,f,h,y,m,x)];case 2:return D.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",l),clearInterval(l),l=setInterval(function(){return g(S,f,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,h,y,x)},r.REFETCH_CHECK_DELAY),T=function(){return e(void 0,void 0,void 0,function(){return t(this,function(F){switch(F.label){case 0:return[4,g(S,f,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,h,y,x)];case 1:return F.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",l),(0,s.subscribeToOnlineEvent)(T),[3,4];case 3:return R=D.sent(),console.log("ERROR: Fetching token failed",R),[3,4];case 4:return[2]}})})};return io.fetchAccessToken=E,io}var Ul;function Kl(){if(Ul)return Mn;Ul=1;var e=fe&&fe.__assign||function(){return e=Object.assign||function(d){for(var f,h=1,y=arguments.length;h<y;h++){f=arguments[h];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(d[m]=f[m])}return d},e.apply(this,arguments)},t=fe&&fe.__awaiter||function(d,f,h,y){function m(x){return x instanceof h?x:new h(function(I){I(x)})}return new(h||(h=Promise))(function(x,I){function w(T){try{S(y.next(T))}catch(R){I(R)}}function A(T){try{S(y.throw(T))}catch(R){I(R)}}function S(T){T.done?x(T.value):m(T.value).then(w,A)}S((y=y.apply(d,f||[])).next())})},n=fe&&fe.__generator||function(d,f){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},y,m,x,I;return I={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function w(S){return function(T){return A([S,T])}}function A(S){if(y)throw new TypeError("Generator is already executing.");for(;I&&(I=0,S[0]&&(h=0)),h;)try{if(y=1,m&&(x=S[0]&2?m.return:S[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,S[1])).done)return x;switch(m=0,x&&(S=[S[0]&2,x.value]),S[0]){case 0:case 1:x=S;break;case 4:return h.label++,{value:S[1],done:!1};case 5:h.label++,m=S[1],S=[0];continue;case 7:S=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(S[0]===6||S[0]===2)){h=0;continue}if(S[0]===3&&(!x||S[1]>x[0]&&S[1]<x[3])){h.label=S[1];break}if(S[0]===6&&h.label<x[1]){h.label=x[1],x=S;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(S);break}x[2]&&h.ops.pop(),h.trys.pop();continue}S=f.call(d,h)}catch(T){S=[6,T],m=0}finally{y=x=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.hiverAxiosCall=Mn.performAxiosCall=void 0;var r=Xl,o=Ce,s=ql(),i=Xt,c=bn,l,a=2,u=function(d,f){var h=f.fetchCsrfToken();d.formData?d.formData.append("_csrf_token",h):(d.data=d.data||{},d.data._csrf_token=h)},p=function(d,f){var h={};!d.method||d.method.toLowerCase()==="get"?h={params:d.params?d.params:d.data}:h=d.params?{params:d,data:d.data}:{data:d.data};var y=e(e({method:d.method,url:"".concat(d.root_url).concat(d.url),headers:d.headers},h),{withCredentials:f,responseType:(d==null?void 0:d.responseType)||""});return y};function g(d,f){return f===void 0&&(f=!0),t(this,void 0,void 0,function(){var h;return n(this,function(y){return h=p(d,f),[2,(0,r.default)(h).then(function(m){return m}).catch(function(m){throw m})]})})}Mn.performAxiosCall=g;function E(d,f,h){return t(this,void 0,void 0,function(){var y,m,x;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,6,,8]),d.authTokenFetchingInProgress?[3,2]:(d.authTokenFetchingInProgress=!0,y=d.appEnv,m=d.tier,[4,(0,s.fetchAccessToken)(y,m,f,d.tenantPlatform,d.getTokenForLogin,h)]);case 1:return I.sent(),d.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(w){return setTimeout(w,100)})];case 3:return I.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,E(d,f,h)];case 4:I.sent(),I.label=5;case 5:return[3,8];case 6:return x=I.sent(),console.log("Error while fetching Auth Token :",x),d.authTokenFetchingInProgress=!1,[4,E(d,f,h)];case 7:return I.sent(),[3,8];case 8:return[2]}})})}function b(d,f,h,y,m){var x,I;return m===void 0&&(m=0),t(this,void 0,void 0,function(){var w,A,S,T,R,D,F;return n(this,function(P){switch(P.label){case 0:if(P.trys.push([0,4,,5]),!(h.getToken&&!(0,o.hasValidToken)(f)))return[3,2];if(w=d.appEnv,A=d.tier,!w||!A)throw Error("appEnv or tier missing : ".concat(w,"/").concat(A));return"userId"in f&&"usergroupId"in f?(S={userId:f.userId,usergroupId:f.usergroupId},[4,E(d,S,y)]):[3,2];case 1:P.sent(),P.label=2;case 2:return d.csrfToken&&u(f,h),T=d.tenantPlatform===c.TENANT_PLATFORM.HIVERWEB?c.TENANT_PLATFORM.HIVERWEB:c.TENANT_PLATFORM.GMAIL,f.headers=e(e({},f.headers),{"x-hiver-tenant":T,"x-hiver-userid":(0,i.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,i.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),h.getToken&&(l=(0,i.getItemFromStorage)("hiverAuthToken")||"",f.headers=e(e({},f.headers),{Authorization:"Bearer ".concat(l)})),console.log("Performing axios call for:",f),[4,g(f,d.withCredentials)];case 3:return R=P.sent(),f.onSuccess&&f.onSuccess(R),[2,R];case 4:if(D=P.sent(),F=((x=D.response)===null||x===void 0?void 0:x.status)===403||((I=D.request)===null||I===void 0?void 0:I.status)===403,m<a&&F)return(0,o.expireToken)(),[2,b(d,f,h,y,m+1)];if(m>=a&&F||!F)throw f.onFail&&f.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return Mn.hiverAxiosCall=b,Mn}var ao={},De={},Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.TIERS=Pe.APP_UI=Pe.CONFIG_HIVER=Pe.REFETCH_CHECK_DELAY=Pe.INITIAL_RETRY_DELAY=Pe.MAX_BACKOFF_LIMIT=Pe.MAX_CONFLICT_RETRY_DELAY=Pe.MAX_RETRY_DELAY=Pe.GET_METHOD=void 0,Pe.GET_METHOD="GET",Pe.MAX_RETRY_DELAY=18e4,Pe.MAX_CONFLICT_RETRY_DELAY=63e3,Pe.MAX_BACKOFF_LIMIT=8e3,Pe.INITIAL_RETRY_DELAY=1e3,Pe.REFETCH_CHECK_DELAY=168e4,Pe.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Pe.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Pe.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.getProdHqConfig=ft.getProdApiConfig=ft.getSitHqConfig=ft.getSitApiConfig=ft.getDevHqConfig=ft.getDevApiConfig=void 0;var mr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},Rg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:mr}};ft.getDevApiConfig=Rg;var kg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:mr}};ft.getDevHqConfig=kg;var Ng=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:mr}};ft.getSitApiConfig=Ng;var Pg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:mr}};ft.getSitHqConfig=Pg;var Mg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:mr}};ft.getProdApiConfig=Mg;var Bg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:mr}};ft.getProdHqConfig=Bg;var jg=fe&&fe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(u){try{a(r.next(u))}catch(p){i(p)}}function l(u){try{a(r.throw(u))}catch(p){i(p)}}function a(u){u.done?s(u.value):o(u.value).then(c,l)}a((r=r.apply(e,t||[])).next())})},Vg=fe&&fe.__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,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(a){return function(u){return l([a,u])}}function l(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(n=0)),n;)try{if(r=1,o&&(s=a[0]&2?o.return:a[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;switch(o=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,o=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(u){a=[6,u],o=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(De,"__esModule",{value:!0}),De.expireToken=De.validateToken=De.validateAccount=De.getConfig=De.introduceDelay=De.isTokenInExpiryWindow=De.getStoredAuthData=De.setUserDetails=De.setTokenAndExpiry=De.getRandomDelay=De.hasValidToken=void 0;var ra=Pe,Vn=ft,eu=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},oa=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};De.validateAccount=oa;var Gg=function(e){var t=oa(e);return!tu()&&t};De.validateToken=Gg;var Hg=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};De.expireToken=Hg;var Wg=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=eu(),o=oa(e);return r<n&&o};De.hasValidToken=Wg;var Zg=function(){return Math.floor(Math.random()*6e4)+6e4};De.getRandomDelay=Zg;var Xg=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)};De.setUserDetails=Xg;var zg=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};De.setTokenAndExpiry=zg;var Yg=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}};De.getStoredAuthData=Yg;var tu=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=eu(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};De.isTokenInExpiryWindow=tu;var Jg=function(e){return jg(void 0,void 0,void 0,function(){return Vg(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};De.introduceDelay=Jg;var Qg=function(e,t,n){switch(t){case ra.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,Vn.getSitHqConfig)(e)),n?(0,Vn.getSitApiConfig)(e):(0,Vn.getSitHqConfig)(e);case ra.TIERS.PROD:return n?(0,Vn.getProdApiConfig)():(0,Vn.getProdHqConfig)();case ra.TIERS.DEV:default:return n?(0,Vn.getDevApiConfig)():(0,Vn.getDevHqConfig)()}};De.getConfig=Qg;var co={},rn={},nu;function $g(){if(nu)return rn;nu=1;var e=fe&&fe.__awaiter||function(g,E,b,d){function f(h){return h instanceof b?h:new b(function(y){y(h)})}return new(b||(b=Promise))(function(h,y){function m(w){try{I(d.next(w))}catch(A){y(A)}}function x(w){try{I(d.throw(w))}catch(A){y(A)}}function I(w){w.done?h(w.value):f(w.value).then(m,x)}I((d=d.apply(g,E||[])).next())})},t=fe&&fe.__generator||function(g,E){var b={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},d,f,h,y;return y={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function m(I){return function(w){return x([I,w])}}function x(I){if(d)throw new TypeError("Generator is already executing.");for(;y&&(y=0,I[0]&&(b=0)),b;)try{if(d=1,f&&(h=I[0]&2?f.return:I[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,I[1])).done)return h;switch(f=0,h&&(I=[I[0]&2,h.value]),I[0]){case 0:case 1:h=I;break;case 4:return b.label++,{value:I[1],done:!1};case 5:b.label++,f=I[1],I=[0];continue;case 7:I=b.ops.pop(),b.trys.pop();continue;default:if(h=b.trys,!(h=h.length>0&&h[h.length-1])&&(I[0]===6||I[0]===2)){b=0;continue}if(I[0]===3&&(!h||I[1]>h[0]&&I[1]<h[3])){b.label=I[1];break}if(I[0]===6&&b.label<h[1]){b.label=h[1],h=I;break}if(h&&b.label<h[2]){b.label=h[2],b.ops.push(I);break}h[2]&&b.ops.pop(),b.trys.pop();continue}I=E.call(g,b)}catch(w){I=[6,w],f=0}finally{d=h=0}if(I[0]&5)throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}};Object.defineProperty(rn,"__esModule",{value:!0}),rn.getV2LoginCode=rn.getLoginToken=rn.getAccessToken=void 0;var n=Pe,r=iu(),o=De,s=function(g,E,b){var d=(0,o.getStoredAuthData)();return{root_url:g.heimdallUrl,url:g.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:E.userId,usergroup_id:E.usergroupId,access_token:(d==null?void 0:d.token)||"",source:b},withCredentials:!0}},i=function(g,E){return{root_url:E.heimdallUrl,url:E.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:g},withCredentials:!0}},c=function(g){return parseInt(g,10)},l=function(g,E){return{root_url:g.v2Url,url:g.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:c(localStorage.getItem("hiver-config.usersession")),app:E||n.APP_UI.DEFAULT}}},a=function(g,E,b,d){return e(void 0,void 0,void 0,function(){var f,h,y,m,x,I,w;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"),f=s(E,b,d),[4,(0,r.makeAxiosCall)(f,g)]);case 1:return h=A.sent(),[2,{atToken:(m=h==null?void 0:h.data.at)===null||m===void 0?void 0:m.token,expiryTime:(x=h==null?void 0:h.data.at)===null||x===void 0?void 0:x.expires_at,userId:(I=h==null?void 0:h.data)===null||I===void 0?void 0:I.user_id,userGroupId:(w=h==null?void 0:h.data)===null||w===void 0?void 0:w.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw y=A.sent(),y;case 5:return[2]}})})};rn.getAccessToken=a;var u=function(g,E,b){return e(void 0,void 0,void 0,function(){var d,f,h,y,m,x,I;return t(this,function(w){switch(w.label){case 0:d=i(g,b),w.label=1;case 1:return w.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(d,E)];case 2:return f=w.sent(),[2,{userId:(y=f==null?void 0:f.data)===null||y===void 0?void 0:y.user_id,userGroupId:(m=f==null?void 0:f.data)===null||m===void 0?void 0:m.usergroup_id,atToken:(x=f==null?void 0:f.data.at)===null||x===void 0?void 0:x.token,expiryTime:(I=f==null?void 0:f.data.at)===null||I===void 0?void 0:I.expires_at}];case 3:throw h=w.sent(),h;case 4:return[2]}})})};rn.getLoginToken=u;var p=function(g,E,b){return e(void 0,void 0,void 0,function(){var d,f,h;return t(this,function(y){switch(y.label){case 0:return y.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),d=l(E,b),[4,(0,r.makeAxiosCall)(d,g)];case 1:return f=y.sent(),console.log("DEBUG HEIMDALL: local storage:",f==null?void 0:f.data),[2,f==null?void 0:f.data.code];case 2:throw h=y.sent(),h;case 3:return[2]}})})};return rn.getV2LoginCode=p,rn}var ru;function ou(){if(ru)return co;ru=1;var e=fe&&fe.__awaiter||function(E,b,d,f){function h(y){return y instanceof d?y:new d(function(m){m(y)})}return new(d||(d=Promise))(function(y,m){function x(A){try{w(f.next(A))}catch(S){m(S)}}function I(A){try{w(f.throw(A))}catch(S){m(S)}}function w(A){A.done?y(A.value):h(A.value).then(x,I)}w((f=f.apply(E,b||[])).next())})},t=fe&&fe.__generator||function(E,b){var d={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},f,h,y,m;return m={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function x(w){return function(A){return I([w,A])}}function I(w){if(f)throw new TypeError("Generator is already executing.");for(;m&&(m=0,w[0]&&(d=0)),d;)try{if(f=1,h&&(y=w[0]&2?h.return:w[0]?h.throw||((y=h.return)&&y.call(h),0):h.next)&&!(y=y.call(h,w[1])).done)return y;switch(h=0,y&&(w=[w[0]&2,y.value]),w[0]){case 0:case 1:y=w;break;case 4:return d.label++,{value:w[1],done:!1};case 5:d.label++,h=w[1],w=[0];continue;case 7:w=d.ops.pop(),d.trys.pop();continue;default:if(y=d.trys,!(y=y.length>0&&y[y.length-1])&&(w[0]===6||w[0]===2)){d=0;continue}if(w[0]===3&&(!y||w[1]>y[0]&&w[1]<y[3])){d.label=w[1];break}if(w[0]===6&&d.label<y[1]){d.label=y[1],y=w;break}if(y&&d.label<y[2]){d.label=y[2],d.ops.push(w);break}y[2]&&d.ops.pop(),d.trys.pop();continue}w=b.call(E,d)}catch(A){w=[6,A],h=0}finally{f=y=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}};Object.defineProperty(co,"__esModule",{value:!0}),co.fetchToken=void 0;var n=$g(),r=Pe,o=De,s,i,c,l=function(E,b,d){return d===void 0&&(d=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var f,h,y,m,x,I,w,A,S;return t(this,function(T){switch(T.label){case 0:f=2,T.label=1;case 1:return T.trys.push([1,4,,9]),console.log("ERROR debug: in login:",d),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,E,d)];case 2:return h=T.sent(),[4,(0,n.getLoginToken)(h,r.CONFIG_HIVER,E)];case 3:return y=T.sent(),m=y.userId,x=y.userGroupId,I=y.atToken,w=y.expiryTime,(0,o.setTokenAndExpiry)(I,w),(0,o.setUserDetails)(m,x),[3,9];case 4:A=T.sent(),console.log("ERROR debug: in error login:",A,d),S=b,T.label=5;case 5:return S<f?[4,l(E,S+1,d)]:[3,8];case 6:T.sent(),T.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},a=function(E,b,d){return e(void 0,void 0,void 0,function(){var f,h,y,m;return t(this,function(x){switch(x.label){case 0:return b<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(I){return setTimeout(I,E)})]:[3,3];case 1:return x.sent(),b+=E,E*2<=r.MAX_BACKOFF_LIMIT?E*=2:E=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",E),f=d.retryDelay,h=d.configs,y=d.api_params,m=d.appUI,[4,u(f,E,b,h,y,m)];case 2:x.sent(),x.label=3;case 3:return[2]}})})},u=function(E,b,d,f,h,y,m){return y===void 0&&(y="default"),e(void 0,void 0,void 0,function(){var x,I,w,A,S,T,R,D,F,P,j,X,Y,q;return t(this,function(J){switch(J.label){case 0:return J.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,f,h,y)];case 1:return x=J.sent(),I=x.atToken,w=x.expiryTime,A=x.userId,S=x.userGroupId,I&&w&&(0,o.setTokenAndExpiry)(I,w),A&&S&&(0,o.setUserDetails)(A,S),E=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,d=0,[3,12];case 2:return T=J.sent(),console.log("ERROR: Heimdall fetch token",T),((F=T.response)===null||F===void 0?void 0:F.status)===401||((P=T.request)===null||P===void 0?void 0:P.status)===401?(R=1,[4,l(f,R,m)]):[3,4];case 3:return J.sent(),[3,11];case 4:return((j=T.response)===null||j===void 0?void 0:j.status)===409||((X=T.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:E,configs:f,api_params:h,appUI:m},[4,a(b,d,D)]):[3,6];case 5:if(J.sent(),d>=r.MAX_CONFLICT_RETRY_DELAY)throw T;return[3,11];case 6:if(!(((Y=T.response)===null||Y===void 0?void 0:Y.status)===422||((q=T.request)===null||q===void 0?void 0:q.status)===422))return[3,7];throw console.log("ERROR: Throwing error",T.response.status),T;case 7:return E<=r.MAX_RETRY_DELAY?[4,new Promise(function(z){return setTimeout(z,E)})]:[3,10];case 8:return J.sent(),E*=2,console.log("Heimdall: Fetch token post doubling retry delay",E),[4,u(E,b,d,f,h,m)];case 9:return J.sent(),[3,11];case 10:throw T;case 11:return[3,12];case 12:return[2]}})})},p=function(E,b,d,f,h,y){return d===void 0&&(d=r.INITIAL_RETRY_DELAY),f===void 0&&(f=r.INITIAL_RETRY_DELAY),h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var m,x,I;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),m=(0,o.isTokenInExpiryWindow)(),m?(x=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(x)]):[3,3];case 1:return w.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,u(d,f,h,E,b,y)];case 2:w.sent(),w.label=3;case 3:return[3,5];case 4:throw I=w.sent(),I;case 5:return[2]}})})},g=function(E,b,d,f,h,y){return e(void 0,void 0,void 0,function(){var m,x,I,w,A;return t(this,function(S){switch(S.label){case 0:s=E,i=b,m=r.INITIAL_RETRY_DELAY,x=r.INITIAL_RETRY_DELAY,I=0,w=(0,o.getConfig)(s,i,f),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,u(m,x,I,w,d,h,y)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return p(w,d)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",c),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(T){switch(T.label){case 0:return console.log("Online status detected. Fetching token..."),[4,p(w,d)];case 1:return T.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return co.fetchToken=g,co}var su;function iu(){if(su)return ao;su=1;var e=fe&&fe.__assign||function(){return e=Object.assign||function(g){for(var E,b=1,d=arguments.length;b<d;b++){E=arguments[b];for(var f in E)Object.prototype.hasOwnProperty.call(E,f)&&(g[f]=E[f])}return g},e.apply(this,arguments)},t=fe&&fe.__awaiter||function(g,E,b,d){function f(h){return h instanceof b?h:new b(function(y){y(h)})}return new(b||(b=Promise))(function(h,y){function m(w){try{I(d.next(w))}catch(A){y(A)}}function x(w){try{I(d.throw(w))}catch(A){y(A)}}function I(w){w.done?h(w.value):f(w.value).then(m,x)}I((d=d.apply(g,E||[])).next())})},n=fe&&fe.__generator||function(g,E){var b={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},d,f,h,y;return y={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function m(I){return function(w){return x([I,w])}}function x(I){if(d)throw new TypeError("Generator is already executing.");for(;y&&(y=0,I[0]&&(b=0)),b;)try{if(d=1,f&&(h=I[0]&2?f.return:I[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,I[1])).done)return h;switch(f=0,h&&(I=[I[0]&2,h.value]),I[0]){case 0:case 1:h=I;break;case 4:return b.label++,{value:I[1],done:!1};case 5:b.label++,f=I[1],I=[0];continue;case 7:I=b.ops.pop(),b.trys.pop();continue;default:if(h=b.trys,!(h=h.length>0&&h[h.length-1])&&(I[0]===6||I[0]===2)){b=0;continue}if(I[0]===3&&(!h||I[1]>h[0]&&I[1]<h[3])){b.label=I[1];break}if(I[0]===6&&b.label<h[1]){b.label=h[1],h=I;break}if(h&&b.label<h[2]){b.label=h[2],b.ops.push(I);break}h[2]&&b.ops.pop(),b.trys.pop();continue}I=E.call(g,b)}catch(w){I=[6,w],f=0}finally{d=h=0}if(I[0]&5)throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}};Object.defineProperty(ao,"__esModule",{value:!0}),ao.makeAxiosCall=void 0;var r=Xl,o=De,s=ou(),i,c=2,l=function(g,E){var b=E.fetchCsrfToken();g.formData?g.formData.append("_csrf_token",b):(g.data=g.data||{},g.data._csrf_token=b)},a=function(g){var E=!g.method||g.method.toLowerCase()==="get"?{params:g.data}:{data:g.data},b=e(e({method:g.method,url:"".concat(g.root_url).concat(g.url),headers:g.headers},E),{withCredentials:g.withCredentials,responseType:(g==null?void 0:g.responseType)||""});return b};function u(g){return t(this,void 0,void 0,function(){var E;return n(this,function(b){return E=a(g),[2,(0,r.default)(E).then(function(d){return d}).catch(function(d){throw d})]})})}function p(g,E,b,d){var f,h;return d===void 0&&(d=0),t(this,void 0,void 0,function(){var y,m,x,I,w,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(E.getToken&&!(0,o.hasValidToken)(g)))return[3,2];if(y=g.app_env,m=g.tier,!y||!m)throw Error("app_env or tier missing : ".concat(y,"/").concat(m));return"userId"in g&&"usergroupId"in g?(x={userId:g.userId,usergroupId:g.usergroupId},typeof E.isHiverApiDomain!="boolean"&&(E.isHiverApiDomain=!0),[4,(0,s.fetchToken)(y,m,x,E.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return g.csrfToken&&l(g,E),E.getToken&&(i=sessionStorage.getItem("hiverAuthToken")||"",g.headers=e(e({},g.headers),{Authorization:"Bearer ".concat(i)})),[4,u(g)];case 3:return I=S.sent(),g.onSuccess&&g.onSuccess(I),[2,I];case 4:if(w=S.sent(),A=((f=w.response)===null||f===void 0?void 0:f.status)===403||((h=w.request)===null||h===void 0?void 0:h.status)===403,d<c&&A)return(0,o.expireToken)(),[2,p(g,E,b,d+1)];if(d>=c&&A||!A)throw g.onFail&&g.onFail(w),console.log("ERROR: Reached make Axios",w),w;return[3,5];case 5:return[2]}})})}return ao.makeAxiosCall=p,ao}(function(e){var t=fe&&fe.__awaiter||function(E,b,d,f){function h(y){return y instanceof d?y:new d(function(m){m(y)})}return new(d||(d=Promise))(function(y,m){function x(A){try{w(f.next(A))}catch(S){m(S)}}function I(A){try{w(f.throw(A))}catch(S){m(S)}}function w(A){A.done?y(A.value):h(A.value).then(x,I)}w((f=f.apply(E,b||[])).next())})},n=fe&&fe.__generator||function(E,b){var d={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},f,h,y,m;return m={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function x(w){return function(A){return I([w,A])}}function I(w){if(f)throw new TypeError("Generator is already executing.");for(;m&&(m=0,w[0]&&(d=0)),d;)try{if(f=1,h&&(y=w[0]&2?h.return:w[0]?h.throw||((y=h.return)&&y.call(h),0):h.next)&&!(y=y.call(h,w[1])).done)return y;switch(h=0,y&&(w=[w[0]&2,y.value]),w[0]){case 0:case 1:y=w;break;case 4:return d.label++,{value:w[1],done:!1};case 5:d.label++,h=w[1],w=[0];continue;case 7:w=d.ops.pop(),d.trys.pop();continue;default:if(y=d.trys,!(y=y.length>0&&y[y.length-1])&&(w[0]===6||w[0]===2)){d=0;continue}if(w[0]===3&&(!y||w[1]>y[0]&&w[1]<y[3])){d.label=w[1];break}if(w[0]===6&&d.label<y[1]){d.label=y[1],y=w;break}if(y&&d.label<y[2]){d.label=y[2],d.ops.push(w);break}y[2]&&d.ops.pop(),d.trys.pop();continue}w=b.call(E,d)}catch(A){w=[6,A],h=0}finally{f=y=0}if(w[0]&5)throw w[1];return{value:w[0]?w[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=Kl(),o=ql(),s=bn;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 i=Jl(),c=Ce,l=Xt,a=iu();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return a.makeAxiosCall}});var u=ou();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return u.fetchToken}});var p=zt,g=function(){function E(b,d,f,h,y,m){f===void 0&&(f=s.TENANT_PLATFORM.GMAIL),h===void 0&&(h=null),y===void 0&&(y=!0),m===void 0&&(m=!1),this.setEnvironment(),this.appEnv=b,this.tier=d,this.tenantPlatform=f,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=h,this.withCredentials=y,this.csrfToken=m}return E.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,p.setValue)("PLATFORM",s.PLATFORM.WEB):(0,p.setValue)("PLATFORM",s.PLATFORM.MOBILE)},E.prototype.hiverAxios=function(b,d,f,h){return d===void 0&&(d=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var y,m;return n(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),h&&h<2?(y={userId:b.userId,usergroupId:b.usergroupId,apiRetry:h},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,y,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:x.sent(),x.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,b,d,f)];case 3:return[2,x.sent()];case 4:throw m=x.sent(),console.log("ERROR: Axios call failed",m),m;case 5:return[2]}})})},E.prototype.fetchAuthToken=function(b,d,f){return t(this,void 0,void 0,function(){var h;return n(this,function(y){switch(y.label){case 0:return y.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,d,f)]);case 1:return y.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),y.label=3;case 3:return[3,8];case 4:return h=y.sent(),console.log("ERROR: Fetching token failed",h),this.authTokenFetchingInProgress=!1,[4,new Promise(function(m){return setTimeout(m,100)})];case 5:return y.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,d,f)];case 6:return y.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},E.prototype.logout=function(){return t(this,void 0,void 0,function(){var b,d;return n(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),b=(0,c.getConfig)(this.appEnv,this.tier),[4,(0,i.logoutFromHeimdall)(b,this.tenantPlatform)];case 1:return f.sent(),(0,l.removeItemFromStorage)("hiverAuthToken"),(0,l.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,l.removeItemFromStorage)("hiverAuthUserId"),(0,l.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw d=f.sent(),console.error("Heimdall: Logout failed",d),d;case 3:return[2]}})})},E.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},E}();e.Bifrost=g})(Ni);const Bt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Yt=()=>{if(!Bt.isInitiated)return null;if(!Bt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Bt},qg=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=Ni.TENANT_PLATFORM.GMAIL,withCredentials:i=!0,getTokenForLogin:c})=>{Bt.baseUrl=e,Bt.appEnv=t,Bt.tier=n,Bt.userGroupId=o,Bt.userId=r,Bt.tenantPlatform=s,Bt.bifrost=new Ni.Bifrost(t,n,s,c,i),Bt.isInitiated=!0},qe=(({configHiver:e})=>async n=>{const r=Yt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:i}=r,{url:c,method:l,root_url:a}=n,p={root_url:(a||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:c,method:l,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(i),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(p,{...e,isHiverApiDomain:!0}))}catch(g){throw console.error("API call failed with error: ",g),g}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Ug=e=>k.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1180_840)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1180_840"},k.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Kg=e=>k.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),k.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"}),k.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),k.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),k.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),e1=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_825_73646)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_825_73646"},k.createElement("rect",{width:24,height:24,fill:"white"})))),t1="Rate your experience with Hiver Apps",n1="Share feedback on Apps",r1="Got any feedback?",au="https://txeep2wshyx.typeform.com/to/RuOwF9SG",o1="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",s1="https://txeep2wshyx.typeform.com/to/bqhVSfDk",i1="https://cdn.hiverhq.com/chat-support/hiver-chat.html",a1="enable_connectors_clicked",c1="learn_more_clicked",l1="connector_card_expand_clicked",u1="connector_card_collapsed_clicked",d1="connector_card_refresh_clicked",f1="connector_cards_loaded",p1="connector_whats_new_card_viewed",h1="connector_whats_new_explore_now_clicked",g1="connector_whats_new_learn_more_clicked",m1="connector_whats_new_dismissed",b1="connector_create_new_object_clicked",y1="connector_link_new_object_clicked",v1="connector_new_object_created_by_form",C1="connector_new_object_linked_by_form",I1="connector_object_unlinked_by_form",E1="connector_link_preview_clicked",x1="connector_create_panel_cancel_clicked",w1="connector_create_panel_back_clicked",A1="card_loaded_on_click",S1="card_loaded",_1="schedule_call_clicked",T1="schedule_call_cross_clicked",cu="CONNECTOR_EDIT_CLICKED",O1="CONNECTOR_EDIT_REQUEST_SEND",L1="CONNECTOR_EDIT_CANCELLED",F1="CONNECTOR_EDIT_BACK_CLICKED",D1="CONNECTOR_EDIT_SUCCESS",R1="connector_video_clicked",k1="connector_card_error",sa="got_any_feedback_clicked",N1="connector_deeplink_clicked",P1="search_bar_tapped",M1="search_suggestions_selected",B1="search_initiated",j1="no_results_found",V1="search_results_found",G1="search_result_selected",H1="search_result_linked",W1="feedback_closed_clicked",Z1="help_btn_clicked",X1="connector_chat_support_clicked",z1="missing_field_clicked",Y1={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Ve=_.createContext(Y1),ls="hiver_connectors",ia={NOT_FOUND:404},J1="ftr-connector-blue-dot",lu="ftr-connectors-write-flow",Q1="ftr-connectors-enhancements",$1="ftr-connector-schedule-call-agent",q1="ftr-connectors-edit",U1="enableAllConnectorFtr",K1="ftr-cards-open-state",em="ftr-connectors-global-search",tm="ftr-connectors-smart-suggestions",nm="ftr-connectors-email-selection",rm="ftr-connector-agent-feedback",us="ftr-connector-unified-view",om="ftr-connectors-expanded-form",uu="Please refresh and try again",sm="No data available",ds="-",du="Refresh",fu="Minimize",aa="Expand",pu="Connectors",ca="Apps",im="Collapse",am="Close",hu="Link",cm="Create",lm="Update",gu="Unlink",mu="Edit",la="Cancel",bu="Create new object",yu="Link existing object",um="Are you sure you want to unlink this object?",dm="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.",fm="Edit card",pm="bullet_list",hm="Expanded",gm="Collapsed",vu="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Cu="UNKNOWN_ERROR",mm="https://help.hiverhq.com/custom-connectors/common-connector-errors",Iu={MAIN_BUTTON:"main_button",ICON:"create_icon"},bm="Missing any fields? Inform us.",ua=e=>{let t=localStorage.getItem(ls);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},ym=e=>!!ua(e),Eu=()=>{const{userId:e=""}=Yt()||{};return String(e)},vm=(e,t=Eu())=>{const n=ua(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},da=(e,t=!1,n=!1)=>{const r=Eu(),o=ua(e);if(t||!o){localStorage.removeItem(ls);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(ls,JSON.stringify(s));return}else{const s=(o==null?void 0:o.isExtensionNew)??[],i=(o==null?void 0:o.extensionExpand)??[],c={[e]:{...o,...!n&&{isExtensionNew:[...new Set([...s,r])]},...n&&{extensionExpand:[...new Set([...i,r])]}}};localStorage.setItem(ls,JSON.stringify(c));return}},tt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[U1])===!0:(e==null?void 0:e[t])===!0,br=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),xu=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?hm:gm,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},wu=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==ia.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)!==ia.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},Cm=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)},fs=({url:e,params:t})=>{const n=Object.entries(t).reduce((o,[s,i])=>(i!==void 0&&i!==""&&i!==null&&(o[s]=i),o),{}),r=new URL(e);return Object.entries(n).forEach(([o,s])=>{r.searchParams.set(o,s)}),r.toString()},Im=e=>k.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1187_180)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1187_180"},k.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),Em=e=>k.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_847_49587)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_847_49587"},k.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),xm=v.keyframes`
|
|
30
|
+
<%s key={someKey} {...props} />`,Oc,cr,sA,cr),Vp[cr+Oc]=!0}}return T===r?pn(ze):Dt(ze),ze}}function tA(T,G,Q){return Gp(T,G,Q,!0)}function nA(T,G,Q){return Gp(T,G,Q,!1)}var rA=nA,oA=tA;Kr.Fragment=r,Kr.jsx=rA,Kr.jsxs=oA}()),Kr}process.env.NODE_ENV==="production"?Ci.exports=Zp():Ci.exports=Xp();var C=Ci.exports;function Hc(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=Hc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hc(e))&&(r&&(r+=" "),r+=t);return r}const eo=e=>typeof e=="number"&&!isNaN(e),Nn=e=>typeof e=="string",It=e=>typeof e=="function",Vo=e=>Nn(e)||It(e)?e:null,Ii=e=>_.isValidElement(e)||Nn(e)||It(e)||eo(e);function zp(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 Go(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(i){let{children:c,position:l,preventExitTransition:a,done:u,nodeRef:p,isIn:g,playToast:E}=i;const b=r?`${t}--${l}`:t,d=r?`${n}--${l}`:n,f=_.useRef(0);return _.useLayoutEffect(()=>{const h=p.current,y=b.split(" "),m=x=>{x.target===p.current&&(E(),h.removeEventListener("animationend",m),h.removeEventListener("animationcancel",m),f.current===0&&x.type!=="animationcancel"&&h.classList.remove(...y))};h.classList.add(...y),h.addEventListener("animationend",m),h.addEventListener("animationcancel",m)},[]),_.useEffect(()=>{const h=p.current,y=()=>{h.removeEventListener("animationend",y),o?zp(h,u,s):u()};g||(a?y():(f.current=1,h.className+=` ${d}`,h.addEventListener("animationend",y)))},[g]),_.createElement(_.Fragment,null,c)}}function Wc(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 st=new Map;let to=[];const Ei=new Set,Yp=e=>Ei.forEach(t=>t(e)),Zc=()=>st.size>0;function Xc(e,t){var n;if(t)return!((n=st.get(t))==null||!n.isToastActive(e));let r=!1;return st.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function zc(e,t){Ii(e)&&(Zc()||to.push({content:e,options:t}),st.forEach(n=>{n.buildToast(e,t)}))}function Yc(e,t){st.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 Jp(e){const{subscribe:t,getSnapshot:n,setProps:r}=_.useRef(function(s){const i=s.containerId||1;return{subscribe(c){const l=function(u,p,g){let E=1,b=0,d=[],f=[],h=[],y=p;const m=new Map,x=new Set,I=()=>{h=Array.from(m.values()),x.forEach(S=>S())},w=S=>{f=S==null?[]:f.filter(O=>O!==S),I()},A=S=>{const{toastId:O,onOpen:R,updateId:D,children:F}=S.props,P=D==null;S.staleId&&m.delete(S.staleId),m.set(O,S),f=[...f,S.props.toastId].filter(j=>j!==S.staleId),I(),g(Wc(S,P?"added":"updated")),P&&It(R)&&R(_.isValidElement(F)&&F.props)};return{id:u,props:y,observe:S=>(x.add(S),()=>x.delete(S)),toggle:(S,O)=>{m.forEach(R=>{O!=null&&O!==R.props.toastId||It(R.toggle)&&R.toggle(S)})},removeToast:w,toasts:m,clearQueue:()=>{b-=d.length,d=[]},buildToast:(S,O)=>{if((B=>{let{containerId:H,toastId:V,updateId:W}=B;const J=H?H!==u:u!==1,re=m.has(V)&&W==null;return J||re})(O))return;const{toastId:R,updateId:D,data:F,staleId:P,delay:j}=O,X=()=>{w(R)},z=D==null;z&&b++;const q={...y,style:y.toastStyle,key:E++,...Object.fromEntries(Object.entries(O).filter(B=>{let[H,V]=B;return V!=null})),toastId:R,updateId:D,data:F,closeToast:X,isIn:!1,className:Vo(O.className||y.toastClassName),bodyClassName:Vo(O.bodyClassName||y.bodyClassName),progressClassName:Vo(O.progressClassName||y.progressClassName),autoClose:!O.isLoading&&(Y=O.autoClose,K=y.autoClose,Y===!1||eo(Y)&&Y>0?Y:K),deleteToast(){const B=m.get(R),{onClose:H,children:V}=B.props;It(H)&&H(_.isValidElement(V)&&V.props),g(Wc(B,"removed")),m.delete(R),b--,b<0&&(b=0),d.length>0?A(d.shift()):I()}};var Y,K;q.closeButton=y.closeButton,O.closeButton===!1||Ii(O.closeButton)?q.closeButton=O.closeButton:O.closeButton===!0&&(q.closeButton=!Ii(y.closeButton)||y.closeButton);let ce=S;_.isValidElement(S)&&!Nn(S.type)?ce=_.cloneElement(S,{closeToast:X,toastProps:q,data:F}):It(S)&&(ce=S({closeToast:X,toastProps:q,data:F}));const ee={content:ce,props:q,staleId:P};y.limit&&y.limit>0&&b>y.limit&&z?d.push(ee):eo(j)?setTimeout(()=>{A(ee)},j):A(ee)},setProps(S){y=S},setToggle:(S,O)=>{m.get(S).toggle=O},isToastActive:S=>f.some(O=>O===S),getSnapshot:()=>y.newestOnTop?h.reverse():h}}(i,s,Yp);st.set(i,l);const a=l.observe(c);return to.forEach(u=>zc(u.content,u.options)),to=[],()=>{a(),st.delete(i)}},setProps(c){var l;(l=st.get(i))==null||l.setProps(c)},getSnapshot(){var c;return(c=st.get(i))==null?void 0:c.getSnapshot()}}}(e)).current;r(e);const o=_.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const i=new Map;return o.forEach(c=>{const{position:l}=c.props;i.has(l)||i.set(l,[]),i.get(l).push(c)}),Array.from(i,c=>s(c[0],c[1]))},isToastActive:Xc,count:o==null?void 0:o.length}}function Qp(e){const[t,n]=_.useState(!1),[r,o]=_.useState(!1),s=_.useRef(null),i=_.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:l,closeToast:a,onClick:u,closeOnClick:p}=e;var g,E;function b(){n(!0)}function d(){n(!1)}function f(m){const x=s.current;i.canDrag&&x&&(i.didMove=!0,t&&d(),i.delta=e.draggableDirection==="x"?m.clientX-i.start:m.clientY-i.start,i.start!==m.clientX&&(i.canCloseOnClick=!1),x.style.transform=`translate3d(${e.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`},0)`,x.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function h(){document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",h);const m=s.current;if(i.canDrag&&i.didMove&&m){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();m.style.transition="transform 0.2s, opacity 0.2s",m.style.removeProperty("transform"),m.style.removeProperty("opacity")}}(E=st.get((g={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||E.setToggle(g.id,g.fn),_.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||d(),window.addEventListener("focus",b),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",b),window.removeEventListener("blur",d)}},[e.pauseOnFocusLoss]);const y={onPointerDown:function(m){if(e.draggable===!0||e.draggable===m.pointerType){i.didMove=!1,document.addEventListener("pointermove",f),document.addEventListener("pointerup",h);const x=s.current;i.canCloseOnClick=!0,i.canDrag=!0,x.style.transition="none",e.draggableDirection==="x"?(i.start=m.clientX,i.removalDistance=x.offsetWidth*(e.draggablePercent/100)):(i.start=m.clientY,i.removalDistance=x.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(m){const{top:x,bottom:I,left:w,right:A}=s.current.getBoundingClientRect();m.nativeEvent.type!=="touchend"&&e.pauseOnHover&&m.clientX>=w&&m.clientX<=A&&m.clientY>=x&&m.clientY<=I?d():b()}};return c&&l&&(y.onMouseEnter=d,e.stacked||(y.onMouseLeave=b)),p&&(y.onClick=m=>{u&&u(m),i.canCloseOnClick&&a()}),{playToast:b,pauseToast:d,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:y}}function $p(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:i,style:c,controlledProgress:l,progress:a,rtl:u,isIn:p,theme:g}=e;const E=s||l&&a===0,b={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(b.transform=`scaleX(${a})`);const d=gn("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),f=It(i)?i({rtl:u,type:o,defaultClassName:d}):gn(d,i),h={[l&&a>=1?"onTransitionEnd":"onAnimationEnd"]:l&&a<1?null:()=>{p&&r()}};return _.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":E},_.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${o}`}),_.createElement("div",{role:"progressbar","aria-hidden":E?"true":"false","aria-label":"notification timer",className:f,style:b,...h}))}let qp=1;const Jc=()=>""+qp++;function Up(e){return e&&(Nn(e.toastId)||eo(e.toastId))?e.toastId:Jc()}function no(e,t){return zc(e,t),t.toastId}function Ho(e,t){return{...t,type:t&&t.type||e,toastId:Up(t)}}function Wo(e){return(t,n)=>no(t,Ho(e,n))}function we(e,t){return no(e,Ho("default",t))}we.loading=(e,t)=>no(e,Ho("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),we.promise=function(e,t,n){let r,{pending:o,error:s,success:i}=t;o&&(r=Nn(o)?we.loading(o,n):we.loading(o.render,{...n,...o}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,p,g)=>{if(p==null)return void we.dismiss(r);const E={type:u,...c,...n,data:g},b=Nn(p)?{render:p}:p;return r?we.update(r,{...E,...b}):we(b.render,{...E,...b}),g},a=It(e)?e():e;return a.then(u=>l("success",i,u)).catch(u=>l("error",s,u)),a},we.success=Wo("success"),we.info=Wo("info"),we.error=Wo("error"),we.warning=Wo("warning"),we.warn=we.warning,we.dark=(e,t)=>no(e,Ho("default",{theme:"dark",...t})),we.dismiss=function(e){(function(t){var n;if(Zc()){if(t==null||Nn(n=t)||eo(n))st.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=st.get(t.containerId);r?r.removeToast(t.id):st.forEach(o=>{o.removeToast(t.id)})}}else to=to.filter(r=>t!=null&&r.options.toastId!==t)})(e)},we.clearWaitingQueue=function(e){e===void 0&&(e={}),st.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},we.isActive=Xc,we.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:i}=o;return(s=st.get(i||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:Jc()};s.toastId!==e&&(s.staleId=e);const i=s.render||o;delete s.render,no(i,s)}},we.done=e=>{we.update(e,{progress:1})},we.onChange=function(e){return Ei.add(e),()=>{Ei.delete(e)}},we.play=e=>Yc(!0,e),we.pause=e=>Yc(!1,e);const Kp=typeof window<"u"?_.useLayoutEffect:_.useEffect,Zo=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return _.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},xi={info:function(e){return _.createElement(Zo,{...e},_.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 _.createElement(Zo,{...e},_.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 _.createElement(Zo,{...e},_.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 _.createElement(Zo,{...e},_.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 _.createElement("div",{className:"Toastify__spinner"})}},eh=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=Qp(e),{closeButton:i,children:c,autoClose:l,onClick:a,type:u,hideProgressBar:p,closeToast:g,transition:E,position:b,className:d,style:f,bodyClassName:h,bodyStyle:y,progressClassName:m,progressStyle:x,updateId:I,role:w,progress:A,rtl:S,toastId:O,deleteToast:R,isIn:D,isLoading:F,closeOnClick:P,theme:j}=e,X=gn("Toastify__toast",`Toastify__toast-theme--${j}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":P}),z=It(d)?d({rtl:S,position:b,type:u,defaultClassName:X}):gn(X,d),q=function(ee){let{theme:B,type:H,isLoading:V,icon:W}=ee,J=null;const re={theme:B,type:H};return W===!1||(It(W)?J=W({...re,isLoading:V}):_.isValidElement(W)?J=_.cloneElement(W,re):V?J=xi.spinner():(oe=>oe in xi)(H)&&(J=xi[H](re))),J}(e),Y=!!A||!l,K={closeToast:g,type:u,theme:j};let ce=null;return i===!1||(ce=It(i)?i(K):_.isValidElement(i)?_.cloneElement(i,K):function(ee){let{closeToast:B,theme:H,ariaLabel:V="close"}=ee;return _.createElement("button",{className:`Toastify__close-button Toastify__close-button--${H}`,type:"button",onClick:W=>{W.stopPropagation(),B(W)},"aria-label":V},_.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},_.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"})))}(K)),_.createElement(E,{isIn:D,done:R,position:b,preventExitTransition:n,nodeRef:r,playToast:s},_.createElement("div",{id:O,onClick:a,"data-in":D,className:z,...o,style:f,ref:r},_.createElement("div",{...D&&{role:w},className:It(h)?h({type:u}):gn("Toastify__toast-body",h),style:y},q!=null&&_.createElement("div",{className:gn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!F})},q),_.createElement("div",null,c)),ce,_.createElement($p,{...I&&!Y?{key:`pb-${I}`}:{},rtl:S,theme:j,delay:l,isRunning:t,isIn:D,closeToast:g,hide:p,type:u,style:x,className:m,controlledProgress:Y,progress:A||0})))},Xo=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},th=Go(Xo("bounce",!0));Go(Xo("slide",!0)),Go(Xo("zoom")),Go(Xo("flip"));const nh={position:"top-right",transition:th,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function rh(e){let t={...nh,...e};const n=e.stacked,[r,o]=_.useState(!0),s=_.useRef(null),{getToastToRender:i,isToastActive:c,count:l}=Jp(t),{className:a,style:u,rtl:p,containerId:g}=t;function E(d){const f=gn("Toastify__toast-container",`Toastify__toast-container--${d}`,{"Toastify__toast-container--rtl":p});return It(a)?a({position:d,rtl:p,defaultClassName:f}):gn(f,Vo(a))}function b(){n&&(o(!0),we.play())}return Kp(()=>{if(n){var d;const f=s.current.querySelectorAll('[data-in="true"]'),h=12,y=(d=t.position)==null?void 0:d.includes("top");let m=0,x=0;Array.from(f).reverse().forEach((I,w)=>{const A=I;A.classList.add("Toastify__toast--stacked"),w>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=y?"top":"bot");const S=m*(r?.2:1)+(r?0:h*w);A.style.setProperty("--y",`${y?S:-1*S}px`),A.style.setProperty("--g",`${h}`),A.style.setProperty("--s",""+(1-(r?x:0))),m+=A.offsetHeight,x+=.025})}},[r,l,n]),_.createElement("div",{ref:s,className:"Toastify",id:g,onMouseEnter:()=>{n&&(o(!1),we.pause())},onMouseLeave:b},i((d,f)=>{const h=f.length?{...u}:{...u,pointerEvents:"none"};return _.createElement("div",{className:E(d),style:h,key:`container-${d}`},f.map(y=>{let{content:m,props:x}=y;return _.createElement(eh,{...x,stacked:n,collapseAll:b,isIn:c(x.toastId,x.containerId),style:x.style,key:`toast-${x.key}`},m)}))}))}const wi=(e,t)=>t.some(n=>e instanceof n);let Qc,$c;function oh(){return Qc||(Qc=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function sh(){return $c||($c=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Ai=new WeakMap,Si=new WeakMap,zo=new WeakMap;function ih(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Pn(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return zo.set(t,e),t}function ah(e){if(Ai.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),o()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});Ai.set(e,t)}let _i={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ai.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Pn(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 qc(e){_i=e(_i)}function ch(e){return sh().includes(e)?function(...t){return e.apply(Ti(this),t),Pn(this.request)}:function(...t){return Pn(e.apply(Ti(this),t))}}function lh(e){return typeof e=="function"?ch(e):(e instanceof IDBTransaction&&ah(e),wi(e,oh())?new Proxy(e,_i):e)}function Pn(e){if(e instanceof IDBRequest)return ih(e);if(Si.has(e))return Si.get(e);const t=lh(e);return t!==e&&(Si.set(e,t),zo.set(t,e)),t}const Ti=e=>zo.get(e);function uh(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),c=Pn(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Pn(i.result),l.oldVersion,l.newVersion,Pn(i.transaction),l)}),n&&i.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),c.then(l=>{s&&l.addEventListener("close",()=>s()),o&&l.addEventListener("versionchange",a=>o(a.oldVersion,a.newVersion,a))}).catch(()=>{}),c}const dh=["get","getKey","getAll","getAllKeys","count"],fh=["put","add","delete","clear"],Oi=new Map;function Uc(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Oi.get(t))return Oi.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=fh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||dh.includes(n)))return;const s=async function(i,...c){const l=this.transaction(i,o?"readwrite":"readonly");let a=l.store;return r&&(a=a.index(c.shift())),(await Promise.all([a[n](...c),o&&l.done]))[0]};return Oi.set(t,s),s}qc(e=>({...e,get:(t,n,r)=>Uc(t,n)||e.get(t,n,r),has:(t,n)=>!!Uc(t,n)||e.has(t,n)}));const ph=["continue","continuePrimaryKey","advance"],Kc={},Li=new WeakMap,el=new WeakMap,hh={get(e,t){if(!ph.includes(t))return e[t];let n=Kc[t];return n||(n=Kc[t]=function(...r){Li.set(this,el.get(this)[t](...r))}),n}};async function*gh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,hh);for(el.set(n,t),zo.set(n,Ti(t));t;)yield n,t=await(Li.get(n)||t.continue()),Li.delete(n)}function tl(e,t){return t===Symbol.asyncIterator&&wi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&wi(e,[IDBIndex,IDBObjectStore])}qc(e=>({...e,get(t,n,r){return tl(t,n)?gh:e.get(t,n,r)},has(t,n){return tl(t,n)||e.has(t,n)}}));const mh="connector-db",bh=1,Yo={FEEDBACK:"feedback"},ro=`${Yo.FEEDBACK}:data`,Jo=`${Yo.FEEDBACK}:last_submitted`,oo=`${Yo.FEEDBACK}:capture_on_demand`,so=`${Yo.FEEDBACK}:show_notification`,yh=12*60*60*1e3,Fi=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=yh:!0,nl=(e,t=!1)=>e.captureFeedback&&(Fi(e.firstViewed)&&(!e.lastSubmittedFeedback||Fi(e.lastSubmittedFeedback))||!!t);let Mn=null;const mn=async()=>{try{Mn||(Mn=await uh(mh,bh,{upgrade(e){e.objectStoreNames.contains(ro)||e.createObjectStore(ro),e.objectStoreNames.contains(Jo)||e.createObjectStore(Jo),e.objectStoreNames.contains(oo)||e.createObjectStore(oo),e.objectStoreNames.contains(so)||e.createObjectStore(so)},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."),Mn&&(Mn.close(),Mn=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Mn=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Mn},Di=async e=>{if(!e)return[];const t=await mn();if(!t)return[];try{return await t.get(ro,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},vh=async e=>{if(!e)return null;const t=await mn();if(!t)return null;try{return await t.get(Jo,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Qo=async e=>{if(!e)return;const t=await mn();if(t)try{return await t.get(oo,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},Ch=async e=>{if(!e)return!1;const t=await mn();if(!t)return!1;try{return await t.get(so,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},Ih=async(e,t)=>{if(!e||!t||!t.length)return;const n=await mn();if(n)try{const r=await Di(e),o=new Set(r.map(i=>i.connectorId)),s=t.filter(i=>!o.has(i.connector_id)).map(i=>({connectorId:i.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const i=[...r,...s];await n.put(ro,i,e),await n.put(so,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},Eh=async e=>{if(!e)return;const t=await mn();if(t)try{const n=await Di(e),r=await Qo(e),o=new Date,s=n.map(i=>{const c=nl(i,r);return{...i,lastSubmittedFeedback:c?o:i.lastSubmittedFeedback,captureFeedback:i.captureFeedback!==c}});await t.put(ro,s,e),await t.put(Jo,o,e),r&&await t.put(oo,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},rl=async(e,t)=>{if(!e)return;const n=await mn();if(n)try{await n.put(oo,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},xh=async e=>{if(!e)return;const t=await mn();if(t)try{await t.put(so,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},wh=async e=>{const t=await Di(e),n=await Qo(e);return t.filter(o=>nl(o,n))},Ri=async e=>{const t=await vh(e);return t&&!Fi(t)?!1:await Qo(e)&&!t?!0:!!(await wh(e)).length},Ah=async(e,t)=>{await Ih(e,t)},$o=async e=>{e&&await Eh(e)},Sh=async(e,t)=>{const n=await Qo(e);t?n!==!1&&await rl(e,t):await rl(e,void 0)},ol=async e=>await Ch(e)&&await Ri(e),sl=async e=>{await xh(e)};var ki={},Bn={};function il(e,t){return function(){return e.apply(t,arguments)}}const{toString:_h}=Object.prototype,{getPrototypeOf:Ni}=Object,qo=(e=>t=>{const n=_h.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kt=e=>(e=e.toLowerCase(),t=>qo(t)===e),Uo=e=>t=>typeof t===e,{isArray:lr}=Array,io=Uo("undefined");function Th(e){return e!==null&&!io(e)&&e.constructor!==null&&!io(e.constructor)&&Et(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const al=kt("ArrayBuffer");function Oh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&al(e.buffer),t}const Lh=Uo("string"),Et=Uo("function"),cl=Uo("number"),Ko=e=>e!==null&&typeof e=="object",Fh=e=>e===!0||e===!1,es=e=>{if(qo(e)!=="object")return!1;const t=Ni(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Dh=kt("Date"),Rh=kt("File"),kh=kt("Blob"),Nh=kt("FileList"),Ph=e=>Ko(e)&&Et(e.pipe),Mh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Et(e.append)&&((t=qo(e))==="formdata"||t==="object"&&Et(e.toString)&&e.toString()==="[object FormData]"))},Bh=kt("URLSearchParams"),[jh,Vh,Gh,Hh]=["ReadableStream","Request","Response","Headers"].map(kt),Wh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ao(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),lr(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),i=s.length;let c;for(r=0;r<i;r++)c=s[r],t.call(null,e[c],c,e)}}function ll(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 jn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:fe,ul=e=>!io(e)&&e!==jn;function Pi(){const{caseless:e}=ul(this)&&this||{},t={},n=(r,o)=>{const s=e&&ll(t,o)||o;es(t[s])&&es(r)?t[s]=Pi(t[s],r):es(r)?t[s]=Pi({},r):lr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ao(arguments[r],n);return t}const Zh=(e,t,n,{allOwnKeys:r}={})=>(ao(t,(o,s)=>{n&&Et(o)?e[s]=il(o,n):e[s]=o},{allOwnKeys:r}),e),Xh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zh=(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)},Yh=(e,t,n,r)=>{let o,s,i;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&Ni(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jh=(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},Qh=e=>{if(!e)return null;if(lr(e))return e;let t=e.length;if(!cl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$h=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ni(Uint8Array)),qh=(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])}},Uh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Kh=kt("HTMLFormElement"),e2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),dl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),t2=kt("RegExp"),fl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ao(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},n2=e=>{fl(e,(t,n)=>{if(Et(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Et(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+"'")})}})},r2=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return lr(e)?r(e):r(String(e).split(t)),n},o2=()=>{},s2=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Mi="abcdefghijklmnopqrstuvwxyz",pl="0123456789",hl={DIGIT:pl,ALPHA:Mi,ALPHA_DIGIT:Mi+Mi.toUpperCase()+pl},i2=(e=16,t=hl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function a2(e){return!!(e&&Et(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const c2=e=>{const t=new Array(10),n=(r,o)=>{if(Ko(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=lr(r)?[]:{};return ao(r,(i,c)=>{const l=n(i,o+1);!io(l)&&(s[c]=l)}),t[o]=void 0,s}}return r};return n(e,0)},l2=kt("AsyncFunction"),u2=e=>e&&(Ko(e)||Et(e))&&Et(e.then)&&Et(e.catch),gl=((e,t)=>e?setImmediate:t?((n,r)=>(jn.addEventListener("message",({source:o,data:s})=>{o===jn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),jn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Et(jn.postMessage)),d2=typeof queueMicrotask<"u"?queueMicrotask.bind(jn):typeof process<"u"&&process.nextTick||gl;var N={isArray:lr,isArrayBuffer:al,isBuffer:Th,isFormData:Mh,isArrayBufferView:Oh,isString:Lh,isNumber:cl,isBoolean:Fh,isObject:Ko,isPlainObject:es,isReadableStream:jh,isRequest:Vh,isResponse:Gh,isHeaders:Hh,isUndefined:io,isDate:Dh,isFile:Rh,isBlob:kh,isRegExp:t2,isFunction:Et,isStream:Ph,isURLSearchParams:Bh,isTypedArray:$h,isFileList:Nh,forEach:ao,merge:Pi,extend:Zh,trim:Wh,stripBOM:Xh,inherits:zh,toFlatObject:Yh,kindOf:qo,kindOfTest:kt,endsWith:Jh,toArray:Qh,forEachEntry:qh,matchAll:Uh,isHTMLForm:Kh,hasOwnProperty:dl,hasOwnProp:dl,reduceDescriptors:fl,freezeMethods:n2,toObjectSet:r2,toCamelCase:e2,noop:o2,toFiniteNumber:s2,findKey:ll,global:jn,isContextDefined:ul,ALPHABET:hl,generateString:i2,isSpecCompliantForm:a2,toJSONObject:c2,isAsyncFn:l2,isThenable:u2,setImmediate:gl,asap:d2};function pe(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)}N.inherits(pe,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:N.toJSONObject(this.config),code:this.code,status:this.status}}});const ml=pe.prototype,bl={};["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=>{bl[e]={value:e}}),Object.defineProperties(pe,bl),Object.defineProperty(ml,"isAxiosError",{value:!0}),pe.from=(e,t,n,r,o,s)=>{const i=Object.create(ml);return N.toFlatObject(e,i,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),pe.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};var f2=null;function Bi(e){return N.isPlainObject(e)||N.isArray(e)}function yl(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function vl(e,t,n){return e?e.concat(t).map(function(o,s){return o=yl(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function p2(e){return N.isArray(e)&&!e.some(Bi)}const h2=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function ts(e,t,n){if(!N.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,f){return!N.isUndefined(f[d])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(t);if(!N.isFunction(o))throw new TypeError("visitor must be a function");function a(b){if(b===null)return"";if(N.isDate(b))return b.toISOString();if(!l&&N.isBlob(b))throw new pe("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(b)||N.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function u(b,d,f){let h=b;if(b&&!f&&typeof b=="object"){if(N.endsWith(d,"{}"))d=r?d:d.slice(0,-2),b=JSON.stringify(b);else if(N.isArray(b)&&p2(b)||(N.isFileList(b)||N.endsWith(d,"[]"))&&(h=N.toArray(b)))return d=yl(d),h.forEach(function(m,x){!(N.isUndefined(m)||m===null)&&t.append(i===!0?vl([d],x,s):i===null?d:d+"[]",a(m))}),!1}return Bi(b)?!0:(t.append(vl(f,d,s),a(b)),!1)}const p=[],g=Object.assign(h2,{defaultVisitor:u,convertValue:a,isVisitable:Bi});function E(b,d){if(!N.isUndefined(b)){if(p.indexOf(b)!==-1)throw Error("Circular reference detected in "+d.join("."));p.push(b),N.forEach(b,function(h,y){(!(N.isUndefined(h)||h===null)&&o.call(t,h,N.isString(y)?y.trim():y,d,g))===!0&&E(h,d?d.concat(y):[y])}),p.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Cl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ji(e,t){this._pairs=[],e&&ts(e,this,t)}const Il=ji.prototype;Il.append=function(t,n){this._pairs.push([t,n])},Il.toString=function(t){const n=t?function(r){return t.call(this,r,Cl)}:Cl;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function g2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function El(e,t,n){if(!t)return e;const r=n&&n.encode||g2,o=n&&n.serialize;let s;if(o?s=o(t,n):s=N.isURLSearchParams(t)?t.toString():new ji(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class m2{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){N.forEach(this.handlers,function(r){r!==null&&t(r)})}}var xl=m2,wl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},b2=typeof URLSearchParams<"u"?URLSearchParams:ji,y2=typeof FormData<"u"?FormData:null,v2=typeof Blob<"u"?Blob:null,C2={isBrowser:!0,classes:{URLSearchParams:b2,FormData:y2,Blob:v2},protocols:["http","https","file","blob","url","data"]};const Vi=typeof window<"u"&&typeof document<"u",Gi=typeof navigator=="object"&&navigator||void 0,I2=Vi&&(!Gi||["ReactNative","NativeScript","NS"].indexOf(Gi.product)<0),E2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",x2=Vi&&window.location.href||"http://localhost";var w2=Object.freeze({__proto__:null,hasBrowserEnv:Vi,hasStandardBrowserWebWorkerEnv:E2,hasStandardBrowserEnv:I2,navigator:Gi,origin:x2}),dt={...w2,...C2};function A2(e,t){return ts(e,new dt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return dt.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function S2(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _2(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 Al(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),l=s>=n.length;return i=!i&&N.isArray(o)?o.length:i,l?(N.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!c):((!o[i]||!N.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&N.isArray(o[i])&&(o[i]=_2(o[i])),!c)}if(N.isFormData(e)&&N.isFunction(e.entries)){const n={};return N.forEachEntry(e,(r,o)=>{t(S2(r),o,n,0)}),n}return null}function T2(e,t,n){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Hi={transitional:wl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=N.isObject(t);if(s&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return o?JSON.stringify(Al(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)||N.isReadableStream(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return A2(t,this.formSerializer).toString();if((c=N.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ts(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),T2(t)):t}],transformResponse:[function(t){const n=this.transitional||Hi.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(N.isResponse(t)||N.isReadableStream(t))return t;if(t&&N.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?pe.from(c,pe.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dt.classes.FormData,Blob:dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],e=>{Hi.headers[e]={}});var Wi=Hi;const O2=N.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 L2=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
31
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&O2[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Sl=Symbol("internals");function co(e){return e&&String(e).trim().toLowerCase()}function ns(e){return e===!1||e==null?e:N.isArray(e)?e.map(ns):String(e)}function F2(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 D2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Zi(e,t,n,r,o){if(N.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!N.isString(t)){if(N.isString(r))return t.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(t)}}function R2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function k2(e,t){const n=N.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}class rs{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(c,l,a){const u=co(l);if(!u)throw new Error("header name must be a non-empty string");const p=N.findKey(o,u);(!p||o[p]===void 0||a===!0||a===void 0&&o[p]!==!1)&&(o[p||l]=ns(c))}const i=(c,l)=>N.forEach(c,(a,u)=>s(a,u,l));if(N.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(N.isString(t)&&(t=t.trim())&&!D2(t))i(L2(t),n);else if(N.isHeaders(t))for(const[c,l]of t.entries())s(l,c,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=co(t),t){const r=N.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return F2(o);if(N.isFunction(n))return n.call(this,o,r);if(N.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=co(t),t){const r=N.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Zi(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=co(i),i){const c=N.findKey(r,i);c&&(!n||Zi(r,r[c],c,n))&&(delete r[c],o=!0)}}return N.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||Zi(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return N.forEach(this,(o,s)=>{const i=N.findKey(r,s);if(i){n[i]=ns(o),delete n[s];return}const c=t?R2(s):String(s).trim();c!==s&&delete n[s],n[c]=ns(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return N.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&N.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[Sl]=this[Sl]={accessors:{}}).accessors,o=this.prototype;function s(i){const c=co(i);r[c]||(k2(o,i),r[c]=!0)}return N.isArray(t)?t.forEach(s):s(t),this}}rs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(rs.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),N.freezeMethods(rs);var Nt=rs;function Xi(e,t){const n=this||Wi,r=t||n,o=Nt.from(r.headers);let s=r.data;return N.forEach(e,function(c){s=c.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function _l(e){return!!(e&&e.__CANCEL__)}function ur(e,t,n){pe.call(this,e??"canceled",pe.ERR_CANCELED,t,n),this.name="CanceledError"}N.inherits(ur,pe,{__CANCEL__:!0});function Tl(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pe("Request failed with status code "+n.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function N2(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function P2(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const a=Date.now(),u=r[s];i||(i=a),n[o]=l,r[o]=a;let p=s,g=0;for(;p!==o;)g+=n[p++],p=p%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),a-i<t)return;const E=u&&a-u;return E?Math.round(g*1e3/E):void 0}}function M2(e,t){let n=0,r=1e3/t,o,s;const i=(a,u=Date.now())=>{n=u,o=null,s&&(clearTimeout(s),s=null),e.apply(null,a)};return[(...a)=>{const u=Date.now(),p=u-n;p>=r?i(a,u):(o=a,s||(s=setTimeout(()=>{s=null,i(o)},r-p)))},()=>o&&i(o)]}const os=(e,t,n=3)=>{let r=0;const o=P2(50,250);return M2(s=>{const i=s.loaded,c=s.lengthComputable?s.total:void 0,l=i-r,a=o(l),u=i<=c;r=i;const p={loaded:i,total:c,progress:c?i/c:void 0,bytes:l,rate:a||void 0,estimated:a&&c&&u?(c-i)/a:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},Ol=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ll=e=>(...t)=>N.asap(()=>e(...t));var B2=dt.hasStandardBrowserEnv?function(){const t=dt.navigator&&/(msie|trident)/i.test(dt.navigator.userAgent),n=document.createElement("a");let r;function o(s){let i=s;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{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(i){const c=N.isString(i)?o(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),j2=dt.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];N.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),N.isString(r)&&i.push("path="+r),N.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.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 V2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function G2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Fl(e,t){return e&&!V2(t)?G2(e,t):t}const Dl=e=>e instanceof Nt?{...e}:e;function Vn(e,t){t=t||{};const n={};function r(a,u,p){return N.isPlainObject(a)&&N.isPlainObject(u)?N.merge.call({caseless:p},a,u):N.isPlainObject(u)?N.merge({},u):N.isArray(u)?u.slice():u}function o(a,u,p){if(N.isUndefined(u)){if(!N.isUndefined(a))return r(void 0,a,p)}else return r(a,u,p)}function s(a,u){if(!N.isUndefined(u))return r(void 0,u)}function i(a,u){if(N.isUndefined(u)){if(!N.isUndefined(a))return r(void 0,a)}else return r(void 0,u)}function c(a,u,p){if(p in t)return r(a,u);if(p in e)return r(void 0,a)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(a,u)=>o(Dl(a),Dl(u),!0)};return N.forEach(Object.keys(Object.assign({},e,t)),function(u){const p=l[u]||o,g=p(e[u],t[u],u);N.isUndefined(g)&&p!==c||(n[u]=g)}),n}var Rl=e=>{const t=Vn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;t.headers=i=Nt.from(i),t.url=El(Fl(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(N.isFormData(n)){if(dt.hasStandardBrowserEnv||dt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[a,...u]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];i.setContentType([a||"multipart/form-data",...u].join("; "))}}if(dt.hasStandardBrowserEnv&&(r&&N.isFunction(r)&&(r=r(t)),r||r!==!1&&B2(t.url))){const a=o&&s&&j2.read(s);a&&i.set(o,a)}return t},H2=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Rl(e);let s=o.data;const i=Nt.from(o.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:a}=o,u,p,g,E,b;function d(){E&&E(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function h(){if(!f)return;const m=Nt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),I={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:m,config:e,request:f};Tl(function(A){n(A),d()},function(A){r(A),d()},I),f=null}"onloadend"in f?f.onloadend=h:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(h)},f.onabort=function(){f&&(r(new pe("Request aborted",pe.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new pe("Network Error",pe.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const I=o.transitional||wl;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new pe(x,I.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&N.forEach(i.toJSON(),function(x,I){f.setRequestHeader(I,x)}),N.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),c&&c!=="json"&&(f.responseType=o.responseType),a&&([g,b]=os(a,!0),f.addEventListener("progress",g)),l&&f.upload&&([p,E]=os(l),f.upload.addEventListener("progress",p),f.upload.addEventListener("loadend",E)),(o.cancelToken||o.signal)&&(u=m=>{f&&(r(!m||m.type?new ur(null,e,f):m),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const y=N2(o.url);if(y&&dt.protocols.indexOf(y)===-1){r(new pe("Unsupported protocol "+y+":",pe.ERR_BAD_REQUEST,e));return}f.send(s||null)})},W2=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(a){if(!o){o=!0,c();const u=a instanceof Error?a:this.reason;r.abort(u instanceof pe?u:new ur(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,s(new pe(`timeout ${t} of ms exceeded`,pe.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(s):a.removeEventListener("abort",s)}),e=null)};e.forEach(a=>a.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>N.asap(c),l}};const Z2=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},X2=async function*(e,t){for await(const n of z2(e))yield*Z2(n,t)},z2=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()}},kl=(e,t,n,r)=>{const o=X2(e,t);let s=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:a,value:u}=await o.next();if(a){c(),l.close();return}let p=u.byteLength;if(n){let g=s+=p;n(g)}l.enqueue(new Uint8Array(u))}catch(a){throw c(a),a}},cancel(l){return c(l),o.return()}},{highWaterMark:2})},ss=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nl=ss&&typeof ReadableStream=="function",Y2=ss&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},J2=Nl&&Pl(()=>{let e=!1;const t=new Request(dt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ml=64*1024,zi=Nl&&Pl(()=>N.isReadableStream(new Response("").body)),is={stream:zi&&(e=>e.body)};ss&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!is[t]&&(is[t]=N.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new pe(`Response type '${t}' is not supported`,pe.ERR_NOT_SUPPORT,r)})})})(new Response);const Q2=async e=>{if(e==null)return 0;if(N.isBlob(e))return e.size;if(N.isSpecCompliantForm(e))return(await new Request(dt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(N.isArrayBufferView(e)||N.isArrayBuffer(e))return e.byteLength;if(N.isURLSearchParams(e)&&(e=e+""),N.isString(e))return(await Y2(e)).byteLength},$2=async(e,t)=>{const n=N.toFiniteNumber(e.getContentLength());return n??Q2(t)};var q2=ss&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:l,responseType:a,headers:u,withCredentials:p="same-origin",fetchOptions:g}=Rl(e);a=a?(a+"").toLowerCase():"text";let E=W2([o,s&&s.toAbortSignal()],i),b;const d=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let f;try{if(l&&J2&&n!=="get"&&n!=="head"&&(f=await $2(u,r))!==0){let I=new Request(t,{method:"POST",body:r,duplex:"half"}),w;if(N.isFormData(r)&&(w=I.headers.get("content-type"))&&u.setContentType(w),I.body){const[A,S]=Ol(f,os(Ll(l)));r=kl(I.body,Ml,A,S)}}N.isString(p)||(p=p?"include":"omit");const h="credentials"in Request.prototype;b=new Request(t,{...g,signal:E,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:h?p:void 0});let y=await fetch(b);const m=zi&&(a==="stream"||a==="response");if(zi&&(c||m&&d)){const I={};["status","statusText","headers"].forEach(O=>{I[O]=y[O]});const w=N.toFiniteNumber(y.headers.get("content-length")),[A,S]=c&&Ol(w,os(Ll(c),!0))||[];y=new Response(kl(y.body,Ml,A,()=>{S&&S(),d&&d()}),I)}a=a||"text";let x=await is[N.findKey(is,a)||"text"](y,e);return!m&&d&&d(),await new Promise((I,w)=>{Tl(I,w,{data:x,headers:Nt.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:b})})}catch(h){throw d&&d(),h&&h.name==="TypeError"&&/fetch/i.test(h.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,e,b),{cause:h.cause||h}):pe.from(h,h&&h.code,e,b)}});const Yi={http:f2,xhr:H2,fetch:q2};N.forEach(Yi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Bl=e=>`- ${e}`,U2=e=>N.isFunction(e)||e===null||e===!1;var jl={getAdapter:e=>{e=N.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!U2(n)&&(r=Yi[(i=String(n)).toLowerCase()],r===void 0))throw new pe(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
33
|
+
`+s.map(Bl).join(`
|
|
34
|
+
`):" "+Bl(s[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Yi};function Ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ur(null,e)}function Vl(e){return Ji(e),e.headers=Nt.from(e.headers),e.data=Xi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jl.getAdapter(e.adapter||Wi.adapter)(e).then(function(r){return Ji(e),r.data=Xi.call(e,e.transformResponse,r),r.headers=Nt.from(r.headers),r},function(r){return _l(r)||(Ji(e),r&&r.response&&(r.response.data=Xi.call(e,e.transformResponse,r.response),r.response.headers=Nt.from(r.response.headers))),Promise.reject(r)})}const Gl="1.7.7",Qi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Hl={};Qi.transitional=function(t,n,r){function o(s,i){return"[Axios v"+Gl+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,c)=>{if(t===!1)throw new pe(o(i," has been removed"+(n?" in "+n:"")),pe.ERR_DEPRECATED);return n&&!Hl[i]&&(Hl[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,c):!0}};function K2(e,t,n){if(typeof e!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const c=e[s],l=c===void 0||i(c,s,e);if(l!==!0)throw new pe("option "+s+" must be "+l,pe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pe("Unknown option "+s,pe.ERR_BAD_OPTION)}}var $i={assertOptions:K2,validators:Qi};const bn=$i.validators;let as=class{constructor(t){this.defaults=t,this.interceptors={request:new xl,response:new xl}}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=Vn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&$i.assertOptions(r,{silentJSONParsing:bn.transitional(bn.boolean),forcedJSONParsing:bn.transitional(bn.boolean),clarifyTimeoutError:bn.transitional(bn.boolean)},!1),o!=null&&(N.isFunction(o)?n.paramsSerializer={serialize:o}:$i.assertOptions(o,{encode:bn.function,serialize:bn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&N.merge(s.common,s[n.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=Nt.concat(i,s);const c=[];let l=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(n)===!1||(l=l&&d.synchronous,c.unshift(d.fulfilled,d.rejected))});const a=[];this.interceptors.response.forEach(function(d){a.push(d.fulfilled,d.rejected)});let u,p=0,g;if(!l){const b=[Vl.bind(this),void 0];for(b.unshift.apply(b,c),b.push.apply(b,a),g=b.length,u=Promise.resolve(n);p<g;)u=u.then(b[p++],b[p++]);return u}g=c.length;let E=n;for(p=0;p<g;){const b=c[p++],d=c[p++];try{E=b(E)}catch(f){d.call(this,f);break}}try{u=Vl.call(this,E)}catch(b){return Promise.reject(b)}for(p=0,g=a.length;p<g;)u=u.then(a[p++],a[p++]);return u}getUri(t){t=Vn(this.defaults,t);const n=Fl(t.baseURL,t.url);return El(n,t.params,t.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(t){as.prototype[t]=function(n,r){return this.request(Vn(r||{},{method:t,url:n,data:(r||{}).data}))}}),N.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,c){return this.request(Vn(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}as.prototype[t]=n(),as.prototype[t+"Form"]=n(!0)});var cs=as;class qi{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 i=new Promise(c=>{r.subscribe(c),s=c}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,c){r.reason||(r.reason=new ur(s,i,c),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 qi(function(o){t=o}),cancel:t}}}var eg=qi;function tg(e){return function(n){return e.apply(null,n)}}function ng(e){return N.isObject(e)&&e.isAxiosError===!0}const Ui={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(Ui).forEach(([e,t])=>{Ui[t]=e});var rg=Ui;function Wl(e){const t=new cs(e),n=il(cs.prototype.request,t);return N.extend(n,cs.prototype,t,{allOwnKeys:!0}),N.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Wl(Vn(e,o))},n}const Ze=Wl(Wi);Ze.Axios=cs,Ze.CanceledError=ur,Ze.CancelToken=eg,Ze.isCancel=_l,Ze.VERSION=Gl,Ze.toFormData=ts,Ze.AxiosError=pe,Ze.Cancel=Ze.CanceledError,Ze.all=function(t){return Promise.all(t)},Ze.spread=tg,Ze.isAxiosError=ng,Ze.mergeConfig=Vn,Ze.AxiosHeaders=Nt,Ze.formToJSON=e=>Al(N.isHTMLForm(e)?new FormData(e):e),Ze.getAdapter=jl.getAdapter,Ze.HttpStatusCode=rg,Ze.default=Ze;var Zl=Ze,Ie={},yn={};(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={}))})(yn);var ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.getProdHqConfig=ft.getProdApiConfig=ft.getSitHqConfig=ft.getSitApiConfig=ft.getDevHqConfig=ft.getDevApiConfig=void 0;var dr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},og=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:dr}};ft.getDevApiConfig=og;var sg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:dr}};ft.getDevHqConfig=sg;var ig=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:dr}};ft.getSitApiConfig=ig;var ag=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:dr}};ft.getSitHqConfig=ag;var cg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:dr}};ft.getProdApiConfig=cg;var lg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:dr}};ft.getProdHqConfig=lg;var Zt={},Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.removeValue=Xt.getValue=Xt.setValue=void 0;var Ki={};function ug(e,t){Ki[e]=t}Xt.setValue=ug;function dg(e){return Ki[e]}Xt.getValue=dg;function fg(e){delete Ki[e]}Xt.removeValue=fg,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.removeItemFromStorage=Zt.setItemInStorage=Zt.getItemFromStorage=void 0;var fr=yn,pr=Xt,pg=function(e,t){switch(t===void 0&&(t=(0,pr.getValue)("PLATFORM")),t){case fr.PLATFORM.WEB:return sessionStorage.getItem(e);case fr.PLATFORM.MOBILE:return(0,pr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};Zt.getItemFromStorage=pg;var hg=function(e,t,n){switch(n===void 0&&(n=(0,pr.getValue)("PLATFORM")),n){case fr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case fr.PLATFORM.MOBILE:return(0,pr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};Zt.setItemInStorage=hg;var gg=function(e,t){switch(t===void 0&&(t=(0,pr.getValue)("PLATFORM")),t){case fr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case fr.PLATFORM.MOBILE:(0,pr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};Zt.removeItemFromStorage=gg;var mg=fe&&fe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(u){try{a(r.next(u))}catch(p){i(p)}}function l(u){try{a(r.throw(u))}catch(p){i(p)}}function a(u){u.done?s(u.value):o(u.value).then(c,l)}a((r=r.apply(e,t||[])).next())})},bg=fe&&fe.__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,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(a){return function(u){return l([a,u])}}function l(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(n=0)),n;)try{if(r=1,o&&(s=a[0]&2?o.return:a[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;switch(o=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,o=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(u){a=[6,u],o=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.expireToken=Ie.invalidateToken=Ie.validateToken=Ie.validateAccount=Ie.getConfig=Ie.introduceDelay=Ie.isTokenInExpiryWindow=Ie.getStoredAuthData=Ie.setUserDetails=Ie.getRefreshInterval=Ie.setTokenAndExpiry=Ie.getRandomDelay=Ie.hasValidToken=void 0;var rn=yn,hr=ft,xt=Zt,ea=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},ta=function(e){var t=parseInt((0,xt.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,xt.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Ie.validateAccount=ta;var yg=function(e){var t=ta(e);return!Xl()&&t};Ie.validateToken=yg;var vg=function(e){return e.apiRetry?e.apiRetry>0:!1};Ie.invalidateToken=vg;var Cg=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ie.expireToken=Cg;var Ig=function(e){var t=(0,xt.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=ea(),o=ta(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Ie.hasValidToken=Ig;var Eg=function(){return Math.floor(Math.random()*6e4)+6e4};Ie.getRandomDelay=Eg;var xg=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,xt.setItemInStorage)("hiverAuthUserId",e),(0,xt.setItemInStorage)("hiverAuthUserGroupId",t)};Ie.setUserDetails=xg;var wg=function(e,t){if(!e)throw new Error("Token not found in the response");(0,xt.setItemInStorage)("hiverAuthToken",e),(0,xt.setItemInStorage)("hiverAuthTokenExpiry",t)};Ie.setTokenAndExpiry=wg;var Ag=function(){var e=(0,xt.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,xt.getItemFromStorage)("hiverAuthToken"),n=(0,xt.getItemFromStorage)("hiverAuthUserId"),r=(0,xt.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Ie.getStoredAuthData=Ag;var Xl=function(){var e=(0,xt.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=ea(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Ie.isTokenInExpiryWindow=Xl;var Sg=function(e){return mg(void 0,void 0,void 0,function(){return bg(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Ie.introduceDelay=Sg;var _g=function(e,t,n){switch(n===void 0&&(n=!0),t){case rn.TIERS.SIT:case rn.TIERS.QA:return n?(0,hr.getSitApiConfig)(e):(0,hr.getSitHqConfig)(e);case rn.TIERS.PRODUCTION:case rn.TIERS.PROD:return n?(0,hr.getProdApiConfig)():(0,hr.getProdHqConfig)();case rn.TIERS.DEV:default:return n?(0,hr.getDevApiConfig)():(0,hr.getDevHqConfig)()}};Ie.getConfig=_g;var Tg=function(){try{var e=(0,xt.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return rn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=ea();return t.getTime()-n.getTime()>rn.TWO_MINUTES_IN_MS?t.getTime()-rn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),rn.REFETCH_CHECK_DELAY}};Ie.getRefreshInterval=Tg;var lo={},Pt={},zl;function Yl(){if(zl)return Pt;zl=1;var e=fe&&fe.__awaiter||function(b,d,f,h){function y(m){return m instanceof f?m:new f(function(x){x(m)})}return new(f||(f=Promise))(function(m,x){function I(S){try{A(h.next(S))}catch(O){x(O)}}function w(S){try{A(h.throw(S))}catch(O){x(O)}}function A(S){S.done?m(S.value):y(S.value).then(I,w)}A((h=h.apply(b,d||[])).next())})},t=fe&&fe.__generator||function(b,d){var f={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},h,y,m,x;return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(A){return function(S){return w([A,S])}}function w(A){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,A[0]&&(f=0)),f;)try{if(h=1,y&&(m=A[0]&2?y.return:A[0]?y.throw||((m=y.return)&&m.call(y),0):y.next)&&!(m=m.call(y,A[1])).done)return m;switch(y=0,m&&(A=[A[0]&2,m.value]),A[0]){case 0:case 1:m=A;break;case 4:return f.label++,{value:A[1],done:!1};case 5:f.label++,y=A[1],A=[0];continue;case 7:A=f.ops.pop(),f.trys.pop();continue;default:if(m=f.trys,!(m=m.length>0&&m[m.length-1])&&(A[0]===6||A[0]===2)){f=0;continue}if(A[0]===3&&(!m||A[1]>m[0]&&A[1]<m[3])){f.label=A[1];break}if(A[0]===6&&f.label<m[1]){f.label=m[1],m=A;break}if(m&&f.label<m[2]){f.label=m[2],f.ops.push(A);break}m[2]&&f.ops.pop(),f.trys.pop();continue}A=d.call(b,f)}catch(S){A=[6,S],y=0}finally{h=m=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.logoutFromHeimdall=Pt.getTenantLoginCode=Pt.getLoginToken=Pt.getAccessToken=void 0;var n=yn,r=Ul(),o=Ie,s=function(b,d,f,h){var y=(0,o.getStoredAuthData)(),m=f===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":m},data:{user_id:d.userId,usergroup_id:d.usergroupId,access_token:(y==null?void 0:y.token)||"",source:h}}},i=function(b,d,f,h,y){var m=f===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:d.heimdallUrl,url:d.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},headers:{"x-hiver-tenant":m,"x-hiver-userid":h,"x-hiver-usergroupid":y}}},c=function(b,d){var f=d===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":f}}},l=function(b){return parseInt(b,10)},a=function(b,d,f,h){return{root_url:f===n.TENANT_PLATFORM.HIVERWEB?b.hotUrl:b.v2Url,url:f===n.TENANT_PLATFORM.HIVERWEB?b.apiEndpoints.hotLogin:b.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:l(d.userId),app:h||n.APP_UI.DEFAULT}}},u=function(b,d,f,h,y){return e(void 0,void 0,void 0,function(){var m,x,I,w,A,S,O;return t(this,function(R){switch(R.label){case 0:console.log("GETTOKEN tenantPlatform -> ",h),R.label=1;case 1:return R.trys.push([1,5,,6]),!(0,o.validateToken)(f)||(0,o.invalidateToken)(f)?(console.log("HEIMDALL: No valid token, fetching token"),m=s(d,f,h,y),[4,(0,r.performAxiosCall)(m)]):[3,3];case 2:return x=R.sent(),[2,{atToken:(w=x==null?void 0:x.data.at)===null||w===void 0?void 0:w.token,expiryTime:(A=x==null?void 0:x.data.at)===null||A===void 0?void 0:A.expires_at,userId:(S=x==null?void 0:x.data)===null||S===void 0?void 0:S.user_id,userGroupId:(O=x==null?void 0:x.data)===null||O===void 0?void 0:O.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw I=R.sent(),I;case 6:return[2]}})})};Pt.getAccessToken=u;var p=function(b,d,f,h,y,m){return e(void 0,void 0,void 0,function(){var x,I,w,A,S,O,R;return t(this,function(D){switch(D.label){case 0:x=i(b,f,h,y,m),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(x)];case 2:return I=D.sent(),[2,{userId:(A=I==null?void 0:I.data)===null||A===void 0?void 0:A.user_id,userGroupId:(S=I==null?void 0:I.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(O=I==null?void 0:I.data.at)===null||O===void 0?void 0:O.token,expiryTime:(R=I==null?void 0:I.data.at)===null||R===void 0?void 0:R.expires_at}];case 3:throw w=D.sent(),w;case 4:return[2]}})})};Pt.getLoginToken=p;var g=function(b,d,f,h,y){return e(void 0,void 0,void 0,function(){var m,x,I;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",y),m=a(d,f,h,y),[4,(0,r.performAxiosCall)(m)];case 1:return x=w.sent(),[2,x==null?void 0:x.data.code];case 2:throw I=w.sent(),I;case 3:return[2]}})})};Pt.getTenantLoginCode=g;var E=function(b,d,f){return f===void 0&&(f=0),e(void 0,void 0,void 0,function(){var h,y,m;return t(this,function(x){switch(x.label){case 0:return x.trys.push([0,2,,5]),h=c(b,d),[4,(0,r.performAxiosCall)(h)];case 1:return y=x.sent(),[2,y==null?void 0:y.status];case 2:return m=x.sent(),f<2?[4,E(b,d,f+1)]:[3,4];case 3:x.sent(),x.label=4;case 4:throw m;case 5:return[2]}})})};return Pt.logoutFromHeimdall=E,Pt}var ls={},Og=fe&&fe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(u){try{a(r.next(u))}catch(p){i(p)}}function l(u){try{a(r.throw(u))}catch(p){i(p)}}function a(u){u.done?s(u.value):o(u.value).then(c,l)}a((r=r.apply(e,t||[])).next())})},Lg=fe&&fe.__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,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(a){return function(u){return l([a,u])}}function l(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(n=0)),n;)try{if(r=1,o&&(s=a[0]&2?o.return:a[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;switch(o=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,o=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(u){a=[6,u],o=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(ls,"__esModule",{value:!0}),ls.subscribeToOnlineEvent=void 0;var Jl=yn,Fg=Xt,Dg=function(e,t){switch(t===void 0&&(t=(0,Fg.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Jl.PLATFORM.WEB:return window.addEventListener("online",function(){return Og(void 0,void 0,void 0,function(){return Lg(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 Jl.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};ls.subscribeToOnlineEvent=Dg;var Ql;function $l(){if(Ql)return lo;Ql=1;var e=fe&&fe.__awaiter||function(b,d,f,h){function y(m){return m instanceof f?m:new f(function(x){x(m)})}return new(f||(f=Promise))(function(m,x){function I(S){try{A(h.next(S))}catch(O){x(O)}}function w(S){try{A(h.throw(S))}catch(O){x(O)}}function A(S){S.done?m(S.value):y(S.value).then(I,w)}A((h=h.apply(b,d||[])).next())})},t=fe&&fe.__generator||function(b,d){var f={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},h,y,m,x;return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(A){return function(S){return w([A,S])}}function w(A){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,A[0]&&(f=0)),f;)try{if(h=1,y&&(m=A[0]&2?y.return:A[0]?y.throw||((m=y.return)&&m.call(y),0):y.next)&&!(m=m.call(y,A[1])).done)return m;switch(y=0,m&&(A=[A[0]&2,m.value]),A[0]){case 0:case 1:m=A;break;case 4:return f.label++,{value:A[1],done:!1};case 5:f.label++,y=A[1],A=[0];continue;case 7:A=f.ops.pop(),f.trys.pop();continue;default:if(m=f.trys,!(m=m.length>0&&m[m.length-1])&&(A[0]===6||A[0]===2)){f=0;continue}if(A[0]===3&&(!m||A[1]>m[0]&&A[1]<m[3])){f.label=A[1];break}if(A[0]===6&&f.label<m[1]){f.label=m[1],m=A;break}if(m&&f.label<m[2]){f.label=m[2],f.ops.push(A);break}m[2]&&f.ops.pop(),f.trys.pop();continue}A=d.call(b,f)}catch(S){A=[6,S],y=0}finally{h=m=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(lo,"__esModule",{value:!0}),lo.fetchAccessToken=void 0;var n=Yl(),r=yn,o=Ie,s=ls,i,c,l,a=function(b,d,f,h,y,m){return m===void 0&&(m=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var x,I,w,A,S,O,R,D,F;return t(this,function(P){switch(P.label){case 0:x=2,P.label=1;case 1:return P.trys.push([1,7,,12]),console.log("ERROR debug: in login:",m,h),I=void 0,y?[4,y()]:[3,3];case 2:return I=P.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,d,h,m)];case 4:I=P.sent(),P.label=5;case 5:return[4,(0,n.getLoginToken)(I,r.CONFIG_HIVER,b,h,d.userId,d.usergroupId)];case 6:return w=P.sent(),A=w.userId,S=w.userGroupId,O=w.atToken,R=w.expiryTime,(0,o.setTokenAndExpiry)(O,R),(0,o.setUserDetails)(A,S),[3,12];case 7:D=P.sent(),console.log("ERROR debug: in error login:",D,m),F=f,P.label=8;case 8:return F<x?[4,a(b,d,F+1,h,y,m)]:[3,11];case 9:P.sent(),P.label=10;case 10:return F++,[3,8];case 11:throw D;case 12:return[2]}})})},u=function(b,d,f,h,y){return e(void 0,void 0,void 0,function(){var m,x,I,w;return t(this,function(A){switch(A.label){case 0:return d<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,b)})]:[3,3];case 1:return A.sent(),d+=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),m=f.retryDelay,x=f.configs,I=f.apiParams,w=f.appUI,[4,p(m,b,d,x,I,h,y,w)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},p=function(b,d,f,h,y,m,x,I,w){return I===void 0&&(I="default"),e(void 0,void 0,void 0,function(){var A,S,O,R,D,F,P,j,X,z,q,Y,K,ce;return t(this,function(ee){switch(ee.label){case 0:return ee.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",l),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,y,m,I)];case 1:return A=ee.sent(),S=A.atToken,O=A.expiryTime,R=A.userId,D=A.userGroupId,S&&O&&(0,o.setTokenAndExpiry)(S,O),R&&D&&(0,o.setUserDetails)(R,D),b=r.INITIAL_RETRY_DELAY,d=r.INITIAL_RETRY_DELAY,f=0,[3,12];case 2:return F=ee.sent(),console.log("ERROR: Heimdall fetch token",F),((X=F.response)===null||X===void 0?void 0:X.status)===401||((z=F.request)===null||z===void 0?void 0:z.status)===401?(P=1,[4,a(h,y,P,m,x,w)]):[3,4];case 3:return ee.sent(),[3,11];case 4:return((q=F.response)===null||q===void 0?void 0:q.status)===409||((Y=F.request)===null||Y===void 0?void 0:Y.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),j={retryDelay:b,configs:h,apiParams:y,appUI:w},[4,u(d,f,j,m,x)]):[3,6];case 5:if(ee.sent(),f>=r.MAX_CONFLICT_RETRY_DELAY)throw F;return[3,11];case 6:if(!(((K=F.response)===null||K===void 0?void 0:K.status)===422||((ce=F.request)===null||ce===void 0?void 0:ce.status)===422))return[3,7];throw console.log("ERROR: Throwing error",F.response.status),F;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(B){return setTimeout(B,b)})]:[3,10];case 8:return ee.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,p(b,d,f,h,y,m,x,w)];case 9:return ee.sent(),[3,11];case 10:throw F;case 11:return[3,12];case 12:return[2]}})})},g=function(b,d,f,h,y,m,x,I){return f===void 0&&(f=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var w,A,S;return t(this,function(O){switch(O.label){case 0:return O.trys.push([0,4,,5]),w=(0,o.isTokenInExpiryWindow)(),w?(A=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(A)]):[3,3];case 1:return O.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,p(f,h,y,b,d,m,x,I)];case 2:O.sent(),O.label=3;case 3:return[3,5];case 4:throw S=O.sent(),S;case 5:return[2]}})})},E=function(b,d,f,h,y,m,x){return e(void 0,void 0,void 0,function(){var I,w,A,S,O,R;return t(this,function(D){switch(D.label){case 0:i=b,c=d,I=r.INITIAL_RETRY_DELAY,w=r.INITIAL_RETRY_DELAY,A=0,S=(0,o.getConfig)(i,c),console.log("Instance: Fetch Call"),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,p(I,w,A,S,f,h,y,m,x)];case 2:return D.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",l),clearInterval(l),l=setInterval(function(){return g(S,f,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,h,y,x)},r.REFETCH_CHECK_DELAY),O=function(){return e(void 0,void 0,void 0,function(){return t(this,function(F){switch(F.label){case 0:return[4,g(S,f,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,h,y,x)];case 1:return F.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",l),(0,s.subscribeToOnlineEvent)(O),[3,4];case 3:return R=D.sent(),console.log("ERROR: Fetching token failed",R),[3,4];case 4:return[2]}})})};return lo.fetchAccessToken=E,lo}var ql;function Ul(){if(ql)return Bn;ql=1;var e=fe&&fe.__assign||function(){return e=Object.assign||function(d){for(var f,h=1,y=arguments.length;h<y;h++){f=arguments[h];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(d[m]=f[m])}return d},e.apply(this,arguments)},t=fe&&fe.__awaiter||function(d,f,h,y){function m(x){return x instanceof h?x:new h(function(I){I(x)})}return new(h||(h=Promise))(function(x,I){function w(O){try{S(y.next(O))}catch(R){I(R)}}function A(O){try{S(y.throw(O))}catch(R){I(R)}}function S(O){O.done?x(O.value):m(O.value).then(w,A)}S((y=y.apply(d,f||[])).next())})},n=fe&&fe.__generator||function(d,f){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},y,m,x,I;return I={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function w(S){return function(O){return A([S,O])}}function A(S){if(y)throw new TypeError("Generator is already executing.");for(;I&&(I=0,S[0]&&(h=0)),h;)try{if(y=1,m&&(x=S[0]&2?m.return:S[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,S[1])).done)return x;switch(m=0,x&&(S=[S[0]&2,x.value]),S[0]){case 0:case 1:x=S;break;case 4:return h.label++,{value:S[1],done:!1};case 5:h.label++,m=S[1],S=[0];continue;case 7:S=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(S[0]===6||S[0]===2)){h=0;continue}if(S[0]===3&&(!x||S[1]>x[0]&&S[1]<x[3])){h.label=S[1];break}if(S[0]===6&&h.label<x[1]){h.label=x[1],x=S;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(S);break}x[2]&&h.ops.pop(),h.trys.pop();continue}S=f.call(d,h)}catch(O){S=[6,O],m=0}finally{y=x=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.hiverAxiosCall=Bn.performAxiosCall=void 0;var r=Zl,o=Ie,s=$l(),i=Zt,c=yn,l,a=2,u=function(d,f){var h=f.fetchCsrfToken();d.formData?d.formData.append("_csrf_token",h):(d.data=d.data||{},d.data._csrf_token=h)},p=function(d,f){var h={};!d.method||d.method.toLowerCase()==="get"?h={params:d.params?d.params:d.data}:h=d.params?{params:d,data:d.data}:{data:d.data};var y=e(e({method:d.method,url:"".concat(d.root_url).concat(d.url),headers:d.headers},h),{withCredentials:f,responseType:(d==null?void 0:d.responseType)||""});return y};function g(d,f){return f===void 0&&(f=!0),t(this,void 0,void 0,function(){var h;return n(this,function(y){return h=p(d,f),[2,(0,r.default)(h).then(function(m){return m}).catch(function(m){throw m})]})})}Bn.performAxiosCall=g;function E(d,f,h){return t(this,void 0,void 0,function(){var y,m,x;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,6,,8]),d.authTokenFetchingInProgress?[3,2]:(d.authTokenFetchingInProgress=!0,y=d.appEnv,m=d.tier,[4,(0,s.fetchAccessToken)(y,m,f,d.tenantPlatform,d.getTokenForLogin,h)]);case 1:return I.sent(),d.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(w){return setTimeout(w,100)})];case 3:return I.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,E(d,f,h)];case 4:I.sent(),I.label=5;case 5:return[3,8];case 6:return x=I.sent(),console.log("Error while fetching Auth Token :",x),d.authTokenFetchingInProgress=!1,[4,E(d,f,h)];case 7:return I.sent(),[3,8];case 8:return[2]}})})}function b(d,f,h,y,m){var x,I;return m===void 0&&(m=0),t(this,void 0,void 0,function(){var w,A,S,O,R,D,F;return n(this,function(P){switch(P.label){case 0:if(P.trys.push([0,4,,5]),!(h.getToken&&!(0,o.hasValidToken)(f)))return[3,2];if(w=d.appEnv,A=d.tier,!w||!A)throw Error("appEnv or tier missing : ".concat(w,"/").concat(A));return"userId"in f&&"usergroupId"in f?(S={userId:f.userId,usergroupId:f.usergroupId},[4,E(d,S,y)]):[3,2];case 1:P.sent(),P.label=2;case 2:return d.csrfToken&&u(f,h),O=d.tenantPlatform===c.TENANT_PLATFORM.HIVERWEB?c.TENANT_PLATFORM.HIVERWEB:c.TENANT_PLATFORM.GMAIL,f.headers=e(e({},f.headers),{"x-hiver-tenant":O,"x-hiver-userid":(0,i.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,i.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),h.getToken&&(l=(0,i.getItemFromStorage)("hiverAuthToken")||"",f.headers=e(e({},f.headers),{Authorization:"Bearer ".concat(l)})),console.log("Performing axios call for:",f),[4,g(f,d.withCredentials)];case 3:return R=P.sent(),f.onSuccess&&f.onSuccess(R),[2,R];case 4:if(D=P.sent(),F=((x=D.response)===null||x===void 0?void 0:x.status)===403||((I=D.request)===null||I===void 0?void 0:I.status)===403,m<a&&F)return(0,o.expireToken)(),[2,b(d,f,h,y,m+1)];if(m>=a&&F||!F)throw f.onFail&&f.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return Bn.hiverAxiosCall=b,Bn}var uo={},Re={},Me={};Object.defineProperty(Me,"__esModule",{value:!0}),Me.TIERS=Me.APP_UI=Me.CONFIG_HIVER=Me.REFETCH_CHECK_DELAY=Me.INITIAL_RETRY_DELAY=Me.MAX_BACKOFF_LIMIT=Me.MAX_CONFLICT_RETRY_DELAY=Me.MAX_RETRY_DELAY=Me.GET_METHOD=void 0,Me.GET_METHOD="GET",Me.MAX_RETRY_DELAY=18e4,Me.MAX_CONFLICT_RETRY_DELAY=63e3,Me.MAX_BACKOFF_LIMIT=8e3,Me.INITIAL_RETRY_DELAY=1e3,Me.REFETCH_CHECK_DELAY=168e4,Me.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Me.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Me.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.getProdHqConfig=pt.getProdApiConfig=pt.getSitHqConfig=pt.getSitApiConfig=pt.getDevHqConfig=pt.getDevApiConfig=void 0;var gr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},Rg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:gr}};pt.getDevApiConfig=Rg;var kg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:gr}};pt.getDevHqConfig=kg;var Ng=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:gr}};pt.getSitApiConfig=Ng;var Pg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:gr}};pt.getSitHqConfig=Pg;var Mg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:gr}};pt.getProdApiConfig=Mg;var Bg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:gr}};pt.getProdHqConfig=Bg;var jg=fe&&fe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(u){try{a(r.next(u))}catch(p){i(p)}}function l(u){try{a(r.throw(u))}catch(p){i(p)}}function a(u){u.done?s(u.value):o(u.value).then(c,l)}a((r=r.apply(e,t||[])).next())})},Vg=fe&&fe.__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,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(a){return function(u){return l([a,u])}}function l(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(n=0)),n;)try{if(r=1,o&&(s=a[0]&2?o.return:a[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;switch(o=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,o=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(u){a=[6,u],o=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.expireToken=Re.validateToken=Re.validateAccount=Re.getConfig=Re.introduceDelay=Re.isTokenInExpiryWindow=Re.getStoredAuthData=Re.setUserDetails=Re.setTokenAndExpiry=Re.getRandomDelay=Re.hasValidToken=void 0;var na=Me,Gn=pt,Kl=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},ra=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};Re.validateAccount=ra;var Gg=function(e){var t=ra(e);return!eu()&&t};Re.validateToken=Gg;var Hg=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Re.expireToken=Hg;var Wg=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=Kl(),o=ra(e);return r<n&&o};Re.hasValidToken=Wg;var Zg=function(){return Math.floor(Math.random()*6e4)+6e4};Re.getRandomDelay=Zg;var Xg=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)};Re.setUserDetails=Xg;var zg=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Re.setTokenAndExpiry=zg;var Yg=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}};Re.getStoredAuthData=Yg;var eu=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Kl(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Re.isTokenInExpiryWindow=eu;var Jg=function(e){return jg(void 0,void 0,void 0,function(){return Vg(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Re.introduceDelay=Jg;var Qg=function(e,t,n){switch(t){case na.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,Gn.getSitHqConfig)(e)),n?(0,Gn.getSitApiConfig)(e):(0,Gn.getSitHqConfig)(e);case na.TIERS.PROD:return n?(0,Gn.getProdApiConfig)():(0,Gn.getProdHqConfig)();case na.TIERS.DEV:default:return n?(0,Gn.getDevApiConfig)():(0,Gn.getDevHqConfig)()}};Re.getConfig=Qg;var fo={},on={},tu;function $g(){if(tu)return on;tu=1;var e=fe&&fe.__awaiter||function(g,E,b,d){function f(h){return h instanceof b?h:new b(function(y){y(h)})}return new(b||(b=Promise))(function(h,y){function m(w){try{I(d.next(w))}catch(A){y(A)}}function x(w){try{I(d.throw(w))}catch(A){y(A)}}function I(w){w.done?h(w.value):f(w.value).then(m,x)}I((d=d.apply(g,E||[])).next())})},t=fe&&fe.__generator||function(g,E){var b={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},d,f,h,y;return y={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function m(I){return function(w){return x([I,w])}}function x(I){if(d)throw new TypeError("Generator is already executing.");for(;y&&(y=0,I[0]&&(b=0)),b;)try{if(d=1,f&&(h=I[0]&2?f.return:I[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,I[1])).done)return h;switch(f=0,h&&(I=[I[0]&2,h.value]),I[0]){case 0:case 1:h=I;break;case 4:return b.label++,{value:I[1],done:!1};case 5:b.label++,f=I[1],I=[0];continue;case 7:I=b.ops.pop(),b.trys.pop();continue;default:if(h=b.trys,!(h=h.length>0&&h[h.length-1])&&(I[0]===6||I[0]===2)){b=0;continue}if(I[0]===3&&(!h||I[1]>h[0]&&I[1]<h[3])){b.label=I[1];break}if(I[0]===6&&b.label<h[1]){b.label=h[1],h=I;break}if(h&&b.label<h[2]){b.label=h[2],b.ops.push(I);break}h[2]&&b.ops.pop(),b.trys.pop();continue}I=E.call(g,b)}catch(w){I=[6,w],f=0}finally{d=h=0}if(I[0]&5)throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}};Object.defineProperty(on,"__esModule",{value:!0}),on.getV2LoginCode=on.getLoginToken=on.getAccessToken=void 0;var n=Me,r=su(),o=Re,s=function(g,E,b){var d=(0,o.getStoredAuthData)();return{root_url:g.heimdallUrl,url:g.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:E.userId,usergroup_id:E.usergroupId,access_token:(d==null?void 0:d.token)||"",source:b},withCredentials:!0}},i=function(g,E){return{root_url:E.heimdallUrl,url:E.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:g},withCredentials:!0}},c=function(g){return parseInt(g,10)},l=function(g,E){return{root_url:g.v2Url,url:g.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:c(localStorage.getItem("hiver-config.usersession")),app:E||n.APP_UI.DEFAULT}}},a=function(g,E,b,d){return e(void 0,void 0,void 0,function(){var f,h,y,m,x,I,w;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"),f=s(E,b,d),[4,(0,r.makeAxiosCall)(f,g)]);case 1:return h=A.sent(),[2,{atToken:(m=h==null?void 0:h.data.at)===null||m===void 0?void 0:m.token,expiryTime:(x=h==null?void 0:h.data.at)===null||x===void 0?void 0:x.expires_at,userId:(I=h==null?void 0:h.data)===null||I===void 0?void 0:I.user_id,userGroupId:(w=h==null?void 0:h.data)===null||w===void 0?void 0:w.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw y=A.sent(),y;case 5:return[2]}})})};on.getAccessToken=a;var u=function(g,E,b){return e(void 0,void 0,void 0,function(){var d,f,h,y,m,x,I;return t(this,function(w){switch(w.label){case 0:d=i(g,b),w.label=1;case 1:return w.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(d,E)];case 2:return f=w.sent(),[2,{userId:(y=f==null?void 0:f.data)===null||y===void 0?void 0:y.user_id,userGroupId:(m=f==null?void 0:f.data)===null||m===void 0?void 0:m.usergroup_id,atToken:(x=f==null?void 0:f.data.at)===null||x===void 0?void 0:x.token,expiryTime:(I=f==null?void 0:f.data.at)===null||I===void 0?void 0:I.expires_at}];case 3:throw h=w.sent(),h;case 4:return[2]}})})};on.getLoginToken=u;var p=function(g,E,b){return e(void 0,void 0,void 0,function(){var d,f,h;return t(this,function(y){switch(y.label){case 0:return y.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),d=l(E,b),[4,(0,r.makeAxiosCall)(d,g)];case 1:return f=y.sent(),console.log("DEBUG HEIMDALL: local storage:",f==null?void 0:f.data),[2,f==null?void 0:f.data.code];case 2:throw h=y.sent(),h;case 3:return[2]}})})};return on.getV2LoginCode=p,on}var nu;function ru(){if(nu)return fo;nu=1;var e=fe&&fe.__awaiter||function(E,b,d,f){function h(y){return y instanceof d?y:new d(function(m){m(y)})}return new(d||(d=Promise))(function(y,m){function x(A){try{w(f.next(A))}catch(S){m(S)}}function I(A){try{w(f.throw(A))}catch(S){m(S)}}function w(A){A.done?y(A.value):h(A.value).then(x,I)}w((f=f.apply(E,b||[])).next())})},t=fe&&fe.__generator||function(E,b){var d={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},f,h,y,m;return m={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function x(w){return function(A){return I([w,A])}}function I(w){if(f)throw new TypeError("Generator is already executing.");for(;m&&(m=0,w[0]&&(d=0)),d;)try{if(f=1,h&&(y=w[0]&2?h.return:w[0]?h.throw||((y=h.return)&&y.call(h),0):h.next)&&!(y=y.call(h,w[1])).done)return y;switch(h=0,y&&(w=[w[0]&2,y.value]),w[0]){case 0:case 1:y=w;break;case 4:return d.label++,{value:w[1],done:!1};case 5:d.label++,h=w[1],w=[0];continue;case 7:w=d.ops.pop(),d.trys.pop();continue;default:if(y=d.trys,!(y=y.length>0&&y[y.length-1])&&(w[0]===6||w[0]===2)){d=0;continue}if(w[0]===3&&(!y||w[1]>y[0]&&w[1]<y[3])){d.label=w[1];break}if(w[0]===6&&d.label<y[1]){d.label=y[1],y=w;break}if(y&&d.label<y[2]){d.label=y[2],d.ops.push(w);break}y[2]&&d.ops.pop(),d.trys.pop();continue}w=b.call(E,d)}catch(A){w=[6,A],h=0}finally{f=y=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}};Object.defineProperty(fo,"__esModule",{value:!0}),fo.fetchToken=void 0;var n=$g(),r=Me,o=Re,s,i,c,l=function(E,b,d){return d===void 0&&(d=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var f,h,y,m,x,I,w,A,S;return t(this,function(O){switch(O.label){case 0:f=2,O.label=1;case 1:return O.trys.push([1,4,,9]),console.log("ERROR debug: in login:",d),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,E,d)];case 2:return h=O.sent(),[4,(0,n.getLoginToken)(h,r.CONFIG_HIVER,E)];case 3:return y=O.sent(),m=y.userId,x=y.userGroupId,I=y.atToken,w=y.expiryTime,(0,o.setTokenAndExpiry)(I,w),(0,o.setUserDetails)(m,x),[3,9];case 4:A=O.sent(),console.log("ERROR debug: in error login:",A,d),S=b,O.label=5;case 5:return S<f?[4,l(E,S+1,d)]:[3,8];case 6:O.sent(),O.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},a=function(E,b,d){return e(void 0,void 0,void 0,function(){var f,h,y,m;return t(this,function(x){switch(x.label){case 0:return b<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(I){return setTimeout(I,E)})]:[3,3];case 1:return x.sent(),b+=E,E*2<=r.MAX_BACKOFF_LIMIT?E*=2:E=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",E),f=d.retryDelay,h=d.configs,y=d.api_params,m=d.appUI,[4,u(f,E,b,h,y,m)];case 2:x.sent(),x.label=3;case 3:return[2]}})})},u=function(E,b,d,f,h,y,m){return y===void 0&&(y="default"),e(void 0,void 0,void 0,function(){var x,I,w,A,S,O,R,D,F,P,j,X,z,q;return t(this,function(Y){switch(Y.label){case 0:return Y.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,f,h,y)];case 1:return x=Y.sent(),I=x.atToken,w=x.expiryTime,A=x.userId,S=x.userGroupId,I&&w&&(0,o.setTokenAndExpiry)(I,w),A&&S&&(0,o.setUserDetails)(A,S),E=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,d=0,[3,12];case 2:return O=Y.sent(),console.log("ERROR: Heimdall fetch token",O),((F=O.response)===null||F===void 0?void 0:F.status)===401||((P=O.request)===null||P===void 0?void 0:P.status)===401?(R=1,[4,l(f,R,m)]):[3,4];case 3:return Y.sent(),[3,11];case 4:return((j=O.response)===null||j===void 0?void 0:j.status)===409||((X=O.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:E,configs:f,api_params:h,appUI:m},[4,a(b,d,D)]):[3,6];case 5:if(Y.sent(),d>=r.MAX_CONFLICT_RETRY_DELAY)throw O;return[3,11];case 6:if(!(((z=O.response)===null||z===void 0?void 0:z.status)===422||((q=O.request)===null||q===void 0?void 0:q.status)===422))return[3,7];throw console.log("ERROR: Throwing error",O.response.status),O;case 7:return E<=r.MAX_RETRY_DELAY?[4,new Promise(function(K){return setTimeout(K,E)})]:[3,10];case 8:return Y.sent(),E*=2,console.log("Heimdall: Fetch token post doubling retry delay",E),[4,u(E,b,d,f,h,m)];case 9:return Y.sent(),[3,11];case 10:throw O;case 11:return[3,12];case 12:return[2]}})})},p=function(E,b,d,f,h,y){return d===void 0&&(d=r.INITIAL_RETRY_DELAY),f===void 0&&(f=r.INITIAL_RETRY_DELAY),h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var m,x,I;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),m=(0,o.isTokenInExpiryWindow)(),m?(x=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(x)]):[3,3];case 1:return w.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,u(d,f,h,E,b,y)];case 2:w.sent(),w.label=3;case 3:return[3,5];case 4:throw I=w.sent(),I;case 5:return[2]}})})},g=function(E,b,d,f,h,y){return e(void 0,void 0,void 0,function(){var m,x,I,w,A;return t(this,function(S){switch(S.label){case 0:s=E,i=b,m=r.INITIAL_RETRY_DELAY,x=r.INITIAL_RETRY_DELAY,I=0,w=(0,o.getConfig)(s,i,f),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,u(m,x,I,w,d,h,y)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return p(w,d)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",c),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(O){switch(O.label){case 0:return console.log("Online status detected. Fetching token..."),[4,p(w,d)];case 1:return O.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return fo.fetchToken=g,fo}var ou;function su(){if(ou)return uo;ou=1;var e=fe&&fe.__assign||function(){return e=Object.assign||function(g){for(var E,b=1,d=arguments.length;b<d;b++){E=arguments[b];for(var f in E)Object.prototype.hasOwnProperty.call(E,f)&&(g[f]=E[f])}return g},e.apply(this,arguments)},t=fe&&fe.__awaiter||function(g,E,b,d){function f(h){return h instanceof b?h:new b(function(y){y(h)})}return new(b||(b=Promise))(function(h,y){function m(w){try{I(d.next(w))}catch(A){y(A)}}function x(w){try{I(d.throw(w))}catch(A){y(A)}}function I(w){w.done?h(w.value):f(w.value).then(m,x)}I((d=d.apply(g,E||[])).next())})},n=fe&&fe.__generator||function(g,E){var b={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},d,f,h,y;return y={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function m(I){return function(w){return x([I,w])}}function x(I){if(d)throw new TypeError("Generator is already executing.");for(;y&&(y=0,I[0]&&(b=0)),b;)try{if(d=1,f&&(h=I[0]&2?f.return:I[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,I[1])).done)return h;switch(f=0,h&&(I=[I[0]&2,h.value]),I[0]){case 0:case 1:h=I;break;case 4:return b.label++,{value:I[1],done:!1};case 5:b.label++,f=I[1],I=[0];continue;case 7:I=b.ops.pop(),b.trys.pop();continue;default:if(h=b.trys,!(h=h.length>0&&h[h.length-1])&&(I[0]===6||I[0]===2)){b=0;continue}if(I[0]===3&&(!h||I[1]>h[0]&&I[1]<h[3])){b.label=I[1];break}if(I[0]===6&&b.label<h[1]){b.label=h[1],h=I;break}if(h&&b.label<h[2]){b.label=h[2],b.ops.push(I);break}h[2]&&b.ops.pop(),b.trys.pop();continue}I=E.call(g,b)}catch(w){I=[6,w],f=0}finally{d=h=0}if(I[0]&5)throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}};Object.defineProperty(uo,"__esModule",{value:!0}),uo.makeAxiosCall=void 0;var r=Zl,o=Re,s=ru(),i,c=2,l=function(g,E){var b=E.fetchCsrfToken();g.formData?g.formData.append("_csrf_token",b):(g.data=g.data||{},g.data._csrf_token=b)},a=function(g){var E=!g.method||g.method.toLowerCase()==="get"?{params:g.data}:{data:g.data},b=e(e({method:g.method,url:"".concat(g.root_url).concat(g.url),headers:g.headers},E),{withCredentials:g.withCredentials,responseType:(g==null?void 0:g.responseType)||""});return b};function u(g){return t(this,void 0,void 0,function(){var E;return n(this,function(b){return E=a(g),[2,(0,r.default)(E).then(function(d){return d}).catch(function(d){throw d})]})})}function p(g,E,b,d){var f,h;return d===void 0&&(d=0),t(this,void 0,void 0,function(){var y,m,x,I,w,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(E.getToken&&!(0,o.hasValidToken)(g)))return[3,2];if(y=g.app_env,m=g.tier,!y||!m)throw Error("app_env or tier missing : ".concat(y,"/").concat(m));return"userId"in g&&"usergroupId"in g?(x={userId:g.userId,usergroupId:g.usergroupId},typeof E.isHiverApiDomain!="boolean"&&(E.isHiverApiDomain=!0),[4,(0,s.fetchToken)(y,m,x,E.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return g.csrfToken&&l(g,E),E.getToken&&(i=sessionStorage.getItem("hiverAuthToken")||"",g.headers=e(e({},g.headers),{Authorization:"Bearer ".concat(i)})),[4,u(g)];case 3:return I=S.sent(),g.onSuccess&&g.onSuccess(I),[2,I];case 4:if(w=S.sent(),A=((f=w.response)===null||f===void 0?void 0:f.status)===403||((h=w.request)===null||h===void 0?void 0:h.status)===403,d<c&&A)return(0,o.expireToken)(),[2,p(g,E,b,d+1)];if(d>=c&&A||!A)throw g.onFail&&g.onFail(w),console.log("ERROR: Reached make Axios",w),w;return[3,5];case 5:return[2]}})})}return uo.makeAxiosCall=p,uo}(function(e){var t=fe&&fe.__awaiter||function(E,b,d,f){function h(y){return y instanceof d?y:new d(function(m){m(y)})}return new(d||(d=Promise))(function(y,m){function x(A){try{w(f.next(A))}catch(S){m(S)}}function I(A){try{w(f.throw(A))}catch(S){m(S)}}function w(A){A.done?y(A.value):h(A.value).then(x,I)}w((f=f.apply(E,b||[])).next())})},n=fe&&fe.__generator||function(E,b){var d={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},f,h,y,m;return m={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function x(w){return function(A){return I([w,A])}}function I(w){if(f)throw new TypeError("Generator is already executing.");for(;m&&(m=0,w[0]&&(d=0)),d;)try{if(f=1,h&&(y=w[0]&2?h.return:w[0]?h.throw||((y=h.return)&&y.call(h),0):h.next)&&!(y=y.call(h,w[1])).done)return y;switch(h=0,y&&(w=[w[0]&2,y.value]),w[0]){case 0:case 1:y=w;break;case 4:return d.label++,{value:w[1],done:!1};case 5:d.label++,h=w[1],w=[0];continue;case 7:w=d.ops.pop(),d.trys.pop();continue;default:if(y=d.trys,!(y=y.length>0&&y[y.length-1])&&(w[0]===6||w[0]===2)){d=0;continue}if(w[0]===3&&(!y||w[1]>y[0]&&w[1]<y[3])){d.label=w[1];break}if(w[0]===6&&d.label<y[1]){d.label=y[1],y=w;break}if(y&&d.label<y[2]){d.label=y[2],d.ops.push(w);break}y[2]&&d.ops.pop(),d.trys.pop();continue}w=b.call(E,d)}catch(A){w=[6,A],h=0}finally{f=y=0}if(w[0]&5)throw w[1];return{value:w[0]?w[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=Ul(),o=$l(),s=yn;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 i=Yl(),c=Ie,l=Zt,a=su();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return a.makeAxiosCall}});var u=ru();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return u.fetchToken}});var p=Xt,g=function(){function E(b,d,f,h,y,m){f===void 0&&(f=s.TENANT_PLATFORM.GMAIL),h===void 0&&(h=null),y===void 0&&(y=!0),m===void 0&&(m=!1),this.setEnvironment(),this.appEnv=b,this.tier=d,this.tenantPlatform=f,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=h,this.withCredentials=y,this.csrfToken=m}return E.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,p.setValue)("PLATFORM",s.PLATFORM.WEB):(0,p.setValue)("PLATFORM",s.PLATFORM.MOBILE)},E.prototype.hiverAxios=function(b,d,f,h){return d===void 0&&(d=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var y,m;return n(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),h&&h<2?(y={userId:b.userId,usergroupId:b.usergroupId,apiRetry:h},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,y,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:x.sent(),x.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,b,d,f)];case 3:return[2,x.sent()];case 4:throw m=x.sent(),console.log("ERROR: Axios call failed",m),m;case 5:return[2]}})})},E.prototype.fetchAuthToken=function(b,d,f){return t(this,void 0,void 0,function(){var h;return n(this,function(y){switch(y.label){case 0:return y.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,d,f)]);case 1:return y.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),y.label=3;case 3:return[3,8];case 4:return h=y.sent(),console.log("ERROR: Fetching token failed",h),this.authTokenFetchingInProgress=!1,[4,new Promise(function(m){return setTimeout(m,100)})];case 5:return y.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,d,f)];case 6:return y.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},E.prototype.logout=function(){return t(this,void 0,void 0,function(){var b,d;return n(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),b=(0,c.getConfig)(this.appEnv,this.tier),[4,(0,i.logoutFromHeimdall)(b,this.tenantPlatform)];case 1:return f.sent(),(0,l.removeItemFromStorage)("hiverAuthToken"),(0,l.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,l.removeItemFromStorage)("hiverAuthUserId"),(0,l.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw d=f.sent(),console.error("Heimdall: Logout failed",d),d;case 3:return[2]}})})},E.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},E}();e.Bifrost=g})(ki);const Mt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},zt=()=>{if(!Mt.isInitiated)return null;if(!Mt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Mt},qg=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=ki.TENANT_PLATFORM.GMAIL,withCredentials:i=!0,getTokenForLogin:c})=>{Mt.baseUrl=e,Mt.appEnv=t,Mt.tier=n,Mt.userGroupId=o,Mt.userId=r,Mt.tenantPlatform=s,Mt.bifrost=new ki.Bifrost(t,n,s,c,i),Mt.isInitiated=!0},qe=(({configHiver:e})=>async n=>{const r=zt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:i}=r,{url:c,method:l,root_url:a}=n,p={root_url:(a||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:c,method:l,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(i),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(p,{...e,isHiverApiDomain:!0}))}catch(g){throw console.error("API call failed with error: ",g),g}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Ug=e=>k.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1180_840)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1180_840"},k.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Kg=e=>k.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),k.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"}),k.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),k.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),k.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),e1=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_825_73646)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_825_73646"},k.createElement("rect",{width:24,height:24,fill:"white"})))),t1="Rate your experience with Hiver Apps",n1="Share feedback on Apps",r1="Got any feedback?",iu="https://txeep2wshyx.typeform.com/to/RuOwF9SG",o1="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",s1="https://txeep2wshyx.typeform.com/to/bqhVSfDk",i1="https://cdn.hiverhq.com/chat-support/hiver-chat.html",a1="enable_connectors_clicked",c1="learn_more_clicked",l1="connector_card_expand_clicked",u1="connector_card_collapsed_clicked",d1="connector_card_refresh_clicked",f1="connector_cards_loaded",p1="connector_whats_new_card_viewed",h1="connector_whats_new_explore_now_clicked",g1="connector_whats_new_learn_more_clicked",m1="connector_whats_new_dismissed",b1="connector_create_new_object_clicked",y1="connector_link_new_object_clicked",v1="connector_new_object_created_by_form",C1="connector_new_object_linked_by_form",I1="connector_object_unlinked_by_form",E1="connector_link_preview_clicked",x1="connector_create_panel_cancel_clicked",w1="connector_create_panel_back_clicked",A1="card_loaded_on_click",S1="card_loaded",_1="schedule_call_clicked",T1="schedule_call_cross_clicked",au="CONNECTOR_EDIT_CLICKED",O1="CONNECTOR_EDIT_REQUEST_SEND",L1="CONNECTOR_EDIT_CANCELLED",F1="CONNECTOR_EDIT_BACK_CLICKED",D1="CONNECTOR_EDIT_SUCCESS",R1="connector_video_clicked",k1="connector_card_error",oa="got_any_feedback_clicked",N1="connector_deeplink_clicked",P1="search_bar_tapped",M1="search_suggestions_selected",B1="search_initiated",j1="no_results_found",V1="search_results_found",G1="search_result_selected",H1="search_result_linked",W1="feedback_closed_clicked",Z1="help_btn_clicked",X1="connector_chat_support_clicked",z1="missing_field_clicked",Y1={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Ge=_.createContext(Y1),us="hiver_connectors",sa={NOT_FOUND:404},J1="ftr-connector-blue-dot",cu="ftr-connectors-write-flow",Q1="ftr-connectors-enhancements",$1="ftr-connector-schedule-call-agent",q1="ftr-connectors-edit",U1="enableAllConnectorFtr",K1="ftr-cards-open-state",em="ftr-connectors-global-search",tm="ftr-connectors-smart-suggestions",nm="ftr-connectors-email-selection",rm="ftr-connector-agent-feedback",ds="ftr-connector-unified-view",om="ftr-connectors-expanded-form",lu="Please refresh and try again",sm="No data available",fs="-",uu="Refresh",du="Minimize",ia="Expand",fu="Connectors",aa="Apps",im="Collapse",am="Close",pu="Link",cm="Create",lm="Update",hu="Unlink",gu="Edit",ca="Cancel",mu="Create new object",bu="Link existing object",um="Are you sure you want to unlink this object?",dm="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.",fm="Edit card",pm="bullet_list",hm="Expanded",gm="Collapsed",yu="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",vu="UNKNOWN_ERROR",mm="https://help.hiverhq.com/custom-connectors/common-connector-errors",Cu={MAIN_BUTTON:"main_button",ICON:"create_icon"},bm="Missing any fields? Inform us.",la=e=>{let t=localStorage.getItem(us);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},ym=e=>!!la(e),Iu=()=>{const{userId:e=""}=zt()||{};return String(e)},vm=(e,t=Iu())=>{const n=la(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},ua=(e,t=!1,n=!1)=>{const r=Iu(),o=la(e);if(t||!o){localStorage.removeItem(us);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(us,JSON.stringify(s));return}else{const s=(o==null?void 0:o.isExtensionNew)??[],i=(o==null?void 0:o.extensionExpand)??[],c={[e]:{...o,...!n&&{isExtensionNew:[...new Set([...s,r])]},...n&&{extensionExpand:[...new Set([...i,r])]}}};localStorage.setItem(us,JSON.stringify(c));return}},et=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[U1])===!0:(e==null?void 0:e[t])===!0,mr=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Eu=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?hm:gm,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},xu=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==sa.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)!==sa.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},Cm=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)},ps=({url:e,params:t})=>{const n=Object.entries(t).reduce((o,[s,i])=>(i!==void 0&&i!==""&&i!==null&&(o[s]=i),o),{}),r=new URL(e);return Object.entries(n).forEach(([o,s])=>{r.searchParams.set(o,s)}),r.toString()},Im=e=>k.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1187_180)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1187_180"},k.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),Em=e=>k.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_847_49587)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_847_49587"},k.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),xm=v.keyframes`
|
|
36
36
|
from {
|
|
37
37
|
transform: translateY(-100%);
|
|
38
38
|
opacity: 0;
|
|
@@ -149,7 +149,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
149
149
|
}
|
|
150
150
|
`,Lm=v.styled(v.Typography)`
|
|
151
151
|
letter-spacing: 0.042px;
|
|
152
|
-
`,Fm=({rating:e,setRating:t,count:n=5})=>{const[r,o]=_.useState(e),s=r??e,i=a=>{t(a)},c=a=>{o(a)},l=()=>{o(0)};return C.jsx(Tm,{onMouseLeave:l,children:Array.from({length:n},(a,u)=>{const p=u<s;return C.jsx(Om,{onClick:()=>i(u+1),onMouseEnter:()=>c(u+1),children:C.jsxs("div",{children:[C.jsx(Em,{width:"20px",height:"20px",style:{opacity:p?1:0,zIndex:p?2:1}}),C.jsx(Im,{width:"20px",height:"20px",style:{opacity:p?0:1,zIndex:p?1:2}})]})},u)})})},Dm=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=_.useContext(
|
|
152
|
+
`,Fm=({rating:e,setRating:t,count:n=5})=>{const[r,o]=_.useState(e),s=r??e,i=a=>{t(a)},c=a=>{o(a)},l=()=>{o(0)};return C.jsx(Tm,{onMouseLeave:l,children:Array.from({length:n},(a,u)=>{const p=u<s;return C.jsx(Om,{onClick:()=>i(u+1),onMouseEnter:()=>c(u+1),children:C.jsxs("div",{children:[C.jsx(Em,{width:"20px",height:"20px",style:{opacity:p?1:0,zIndex:p?2:1}}),C.jsx(Im,{width:"20px",height:"20px",style:{opacity:p?0:1,zIndex:p?1:2}})]})},u)})})},Dm=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=_.useContext(Ge),{userGroupId:s,userId:i}=zt()||{},c=ps({url:iu,params:{email:o,user_id:i,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[l,a]=_.useState(t),[u,p]=_.useState(!1),[g,E]=_.useState(0),b=()=>{r(oa,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),$o(i)},d=y=>{r(oa,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:y});const m=ps({url:o1,params:{email:o,user_id:i,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(y)}});E(y),window.open(m,"_blank"),a(!1),$o(i)},f=()=>{r(W1,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),p(!0),$o(i)},h=()=>{u&&(a(!1),p(!1))};return C.jsxs(C.Fragment,{children:[C.jsxs(Sm,{className:u||!l?"slide-down-out":"",onAnimationEnd:h,children:[C.jsxs(v.Stack,{width:"100%",direction:"row",gap:"8px",children:[C.jsx(Kg,{}),C.jsxs(v.Box,{width:"175px",children:[C.jsx(Lm,{variant:"h3",children:t1}),C.jsx(Fm,{rating:g,setRating:d})]})]}),C.jsx(v.Box,{position:"relative",children:C.jsx(v.Tooltip,{title:"Close",children:C.jsx(_m,{onClick:f,children:C.jsx(e1,{width:"16px",height:"16px"})})})})]}),C.jsx(Am,{className:u||!l?"fade-in":"",children:C.jsxs(v.Button,{size:"small",variant:"outlined",color:"tertiary",href:c,target:"_blank",onClick:b,children:[C.jsx(Ug,{}),n1]})})]})},Rm="Need setup help?",km="Expert setup assistance available! Book a 15 min call with our integration specialist.",Nm="Schedule call",Pm="https://calendly.com/aditya-s-grexit/15-min-connector-setup",wu="agent_panel",da="hiver_schedule_call_close_button_click",Mm=v.styled(v.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: ${v.theme.palette.gray.black};
|
|
187
187
|
`,Wm=v.styled(v.Typography)`
|
|
188
188
|
color: ${v.theme.palette.gray.gray2};
|
|
189
|
-
`,Zm=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=_.useContext(Ve),[r,o]=_.useState(()=>!(localStorage.getItem(fa)==="true")&&tt(e,$1));_.useEffect(()=>{localStorage.getItem(fa)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(fa,"true"),o(!1),t(T1,{source:Au})},i=()=>{window.open(Pm,"_blank"),t(_1,{source:Au})};return!r||!n?null:C.jsxs(Mm,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[C.jsxs(Bm,{gap:"4px",children:[C.jsxs(v.Stack,{direction:"row",justifyContent:"space-between",children:[C.jsx(Hm,{variant:"body1_medium",children:Rm}),C.jsx(v.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:C.jsx(v.Tooltip,{title:"Close",placement:"bottom",children:C.jsx(v.IconButton,{children:C.jsx(Vm,{})})})})]}),C.jsx(Wm,{variant:"body2",children:km})]}),C.jsx(v.Stack,{onClick:i,direction:"row",alignItems:"center",children:C.jsxs(jm,{variant:"outlined",size:"small",children:[C.jsx(Gm,{}),Nm]})})]})},Xm="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",Su=e=>k.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.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"}),k.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"}),k.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"})),zm="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",Ym=e=>k.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1329_1727)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1329_1727"},k.createElement("rect",{width:18,height:18,fill:"white"})))),Jm=e=>k.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1329_1720)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1329_1720"},k.createElement("rect",{width:18,height:18,fill:"white"})))),Qm="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",$m=({options:e,anchor:t,open:n,onClose:r})=>C.jsx(v.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>C.jsxs(v.MenuItem,{onClick:o.onClick,children:[C.jsx(v.ListItemIcon,{children:o.icon}),o.label]},o.id))}),_u="connector-header-stuck",qm=v.styled(v.Stack)`
|
|
189
|
+
`,Zm=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=_.useContext(Ge),[r,o]=_.useState(()=>!(localStorage.getItem(da)==="true")&&et(e,$1));_.useEffect(()=>{localStorage.getItem(da)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(da,"true"),o(!1),t(T1,{source:wu})},i=()=>{window.open(Pm,"_blank"),t(_1,{source:wu})};return!r||!n?null:C.jsxs(Mm,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[C.jsxs(Bm,{gap:"4px",children:[C.jsxs(v.Stack,{direction:"row",justifyContent:"space-between",children:[C.jsx(Hm,{variant:"body1_medium",children:Rm}),C.jsx(v.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:C.jsx(v.Tooltip,{title:"Close",placement:"bottom",children:C.jsx(v.IconButton,{children:C.jsx(Vm,{})})})})]}),C.jsx(Wm,{variant:"body2",children:km})]}),C.jsx(v.Stack,{onClick:i,direction:"row",alignItems:"center",children:C.jsxs(jm,{variant:"outlined",size:"small",children:[C.jsx(Gm,{}),Nm]})})]})},Xm="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",Au=e=>k.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.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"}),k.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"}),k.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"})),zm="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",Ym=e=>k.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1329_1727)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1329_1727"},k.createElement("rect",{width:18,height:18,fill:"white"})))),Jm=e=>k.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1329_1720)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1329_1720"},k.createElement("rect",{width:18,height:18,fill:"white"})))),Qm="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",$m=({options:e,anchor:t,open:n,onClose:r})=>C.jsx(v.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>C.jsxs(v.MenuItem,{onClick:o.onClick,children:[C.jsx(v.ListItemIcon,{children:o.icon}),o.label]},o.id))}),Su="connector-header-stuck",qm=v.styled(v.Stack)`
|
|
190
190
|
position: sticky;
|
|
191
191
|
top: 0;
|
|
192
192
|
box-sizing: content-box;
|
|
@@ -200,23 +200,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
200
200
|
container-name: scroller;
|
|
201
201
|
transition: box-shadow 500ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
202
202
|
|
|
203
|
-
&.${
|
|
203
|
+
&.${Su} {
|
|
204
204
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
205
205
|
}
|
|
206
206
|
`,Um=v.styled(v.Stack)`
|
|
207
207
|
width: 0;
|
|
208
208
|
height: 0;
|
|
209
|
-
`,
|
|
209
|
+
`,_u=v.styled(v.brandIcons.Connector)`
|
|
210
210
|
width: 20px;
|
|
211
211
|
height: 20px;
|
|
212
|
-
`,
|
|
212
|
+
`,Tu=v.styled(v.Typography)`
|
|
213
213
|
font-size: 14px;
|
|
214
214
|
font-weight: 400;
|
|
215
215
|
line-height: 20px;
|
|
216
216
|
letter-spacing: 0.1px;
|
|
217
217
|
text-align: left;
|
|
218
218
|
color: #323c3d;
|
|
219
|
-
`,
|
|
219
|
+
`,Ou=v.styled(v.Grid)`
|
|
220
220
|
position: relative;
|
|
221
221
|
width: 100%;
|
|
222
222
|
box-sizing: border-box;
|
|
@@ -256,7 +256,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
256
256
|
&.hiver-card-expanded {
|
|
257
257
|
background: ${v.theme.palette.gray.gray6};
|
|
258
258
|
}
|
|
259
|
-
`,
|
|
259
|
+
`,Lu=v.styled(v.Stack)`
|
|
260
260
|
flex-direction: row;
|
|
261
261
|
align-items: stretch;
|
|
262
262
|
`,nb=v.styled(v.Stack)`
|
|
@@ -289,7 +289,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
289
289
|
`,sb=v.styled(v.Typography)`
|
|
290
290
|
text-transform: uppercase;
|
|
291
291
|
color: ${v.theme.palette.gray.gray3};
|
|
292
|
-
`,
|
|
292
|
+
`,Fu=v.styled(v.Typography)`
|
|
293
293
|
color: ${v.theme.palette.gray.gray4};
|
|
294
294
|
overflow: hidden;
|
|
295
295
|
word-break: break-word;
|
|
@@ -305,7 +305,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
305
305
|
white-space: nowrap;
|
|
306
306
|
overflow: hidden;
|
|
307
307
|
}
|
|
308
|
-
`,
|
|
308
|
+
`,Du=v.styled(v.Link)`
|
|
309
309
|
display: -webkit-box;
|
|
310
310
|
-webkit-box-orient: vertical;
|
|
311
311
|
overflow: hidden;
|
|
@@ -321,7 +321,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
321
321
|
text-overflow: ellipsis;
|
|
322
322
|
-webkit-line-clamp: 3;
|
|
323
323
|
color: ${v.theme.palette.gray.gray1};
|
|
324
|
-
`,
|
|
324
|
+
`,fa=v.styled(v.Box)`
|
|
325
325
|
position: relative;
|
|
326
326
|
top: 1px;
|
|
327
327
|
content: '';
|
|
@@ -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
|
-
`,
|
|
363
|
+
`,vn=v.styled(v.Skeleton)`
|
|
364
364
|
display: block;
|
|
365
365
|
margin: ${e=>e.margin?e.margin:0};
|
|
366
|
-
`,
|
|
366
|
+
`,br=v.styled(v.IconButton)`
|
|
367
367
|
${e=>e.disabled?"opacity: 0.5;":""}
|
|
368
368
|
width: 32px;
|
|
369
369
|
height: 32px;
|
|
@@ -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: ${v.theme.palette.gray.gray2};
|
|
546
|
-
`,Fb=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:i})=>{const c=_.useRef(null),l=_.useRef(null),[a,u]=_.useState(null),p=!!a,{availableFeatures:g,sendTrackingEvent:E,currentSmIds:b,userEmail:d}=_.useContext(
|
|
546
|
+
`,Fb=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:i})=>{const c=_.useRef(null),l=_.useRef(null),[a,u]=_.useState(null),p=!!a,{availableFeatures:g,sendTrackingEvent:E,currentSmIds:b,userEmail:d}=_.useContext(Ge),{userGroupId:f,userId:h}=zt()||{},y=et(g,ds),m=[{id:"rate-experience",label:"Rate your experience",icon:C.jsx(Jm,{}),onClick:()=>{u(null);const w=ps({url:iu,params:{email:d,user_id:h,ug_id:f,sm_ids:b.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(w,"_blank"),E(oa,{sm_ids:b,ug_id:f,connector_names:e,source:"help_drop_down"}),$o(h)}},{id:"instant-chat",label:"Instant chat with support",icon:C.jsx(Ym,{}),onClick:()=>{u(null),window.open(i1,"_blank"),E(X1,{sm_ids:b,ug_id:f,connector_names:e,source:"help_drop_down"})}}],x=_.useCallback(w=>{const A=document.getElementById("connector-agent-container");if(!w||!A)return;l.current&&l.current.disconnect();const S=new IntersectionObserver(O=>{const R=c.current;for(const D of O)R==null||R.classList.toggle(Su,D.intersectionRatio===0)},{root:A});S.observe(w),l.current=S},[]),I=w=>{E(Z1,{sm_ids:b,ug_id:f,connector_names:e}),u(w.currentTarget)};return C.jsxs(C.Fragment,{children:[C.jsx(Um,{ref:x}),C.jsx($m,{options:m,anchor:a,open:p,onClose:()=>u(null)}),C.jsxs(qm,{ref:c,children:[C.jsxs(v.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[y?C.jsx(Au,{width:"20px",height:"20px"}):C.jsx(_u,{}),C.jsx(Tu,{variant:"h2",children:y?aa:fu})]}),C.jsxs(v.Stack,{direction:"row",children:[C.jsx(v.Tooltip,{title:r1,placement:"bottom",children:C.jsx(v.IconButton,{onClick:I,id:"help-button",sx:{height:"36px",width:"36px"},children:C.jsx("img",{src:zm,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?C.jsxs(C.Fragment,{children:[r?C.jsx(v.Tooltip,{title:bu,placement:"bottom",children:C.jsx(v.IconButton,{onClick:i,sx:{height:"36px",width:"36px"},children:C.jsx("img",{src:Qm,alt:"Link Task",height:"20px"})})}):null,n?C.jsx(v.Tooltip,{title:mu,placement:"bottom",children:C.jsx(v.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:C.jsx("img",{src:Xm,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var pa={exports:{}},ha={};/**
|
|
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
|
|
554
|
+
*/var Ru;function Db(){if(Ru)return ha;Ru=1;var e=_;function t(l,a){return l===a&&(l!==0||1/l===1/a)||l!==l&&a!==a}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,c=e.useDebugValue;return ha.useSyncExternalStoreWithSelector=function(l,a,u,p,g){var E=o(null);if(E.current===null){var b={hasValue:!1,value:null};E.current=b}else b=E.current;E=i(function(){function f(I){if(!h){if(h=!0,y=I,I=p(I),g!==void 0&&b.hasValue){var w=b.value;if(g(w,I))return m=w}return m=I}if(w=m,n(y,I))return w;var A=p(I);return g!==void 0&&g(w,A)?w:(y=I,m=A)}var h=!1,y,m,x=u===void 0?null:u;return[function(){return f(a())},x===null?void 0:function(){return f(x())}]},[a,u,p,g]);var d=r(l,E[0],E[1]);return s(function(){b.hasValue=!0,b.value=d},[d]),c(d),d},ha}var ga={};/**
|
|
555
555
|
* @license React
|
|
556
556
|
* use-sync-external-store-with-selector.development.js
|
|
557
557
|
*
|
|
@@ -559,23 +559,23 @@ 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
|
|
562
|
+
*/var ku;function Rb(){return ku||(ku=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=_;function t(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,c=e.useDebugValue;function l(a,u,p,g,E){var b=o(null),d;b.current===null?(d={hasValue:!1,value:null},b.current=d):d=b.current;var f=i(function(){var x=!1,I,w,A=function(D){if(!x){x=!0,I=D;var F=g(D);if(E!==void 0&&d.hasValue){var P=d.value;if(E(P,F))return w=P,P}return w=F,F}var j=I,X=w;if(n(j,D))return X;var z=g(D);return E!==void 0&&E(X,z)?X:(I=D,w=z,z)},S=p===void 0?null:p,O=function(){return A(u())},R=S===null?void 0:function(){return A(S())};return[O,R]},[u,p,g,E]),h=f[0],y=f[1],m=r(a,h,y);return s(function(){d.hasValue=!0,d.value=m},[m]),c(m),m}ga.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ga}process.env.NODE_ENV==="production"?pa.exports=Db():pa.exports=Rb();var kb=pa.exports,wt="default"in k?k.default:k,Nu=Symbol.for("react-redux-context"),Pu=typeof globalThis<"u"?globalThis:{};function Nb(){if(!wt.createContext)return{};const e=Pu[Nu]??(Pu[Nu]=new Map);let t=e.get(wt.createContext);return t||(t=wt.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(wt.createContext,t)),t}var Cn=Nb(),Pb=()=>{throw new Error("uSES not initialized!")};function ma(e=Cn){return function(){const n=wt.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 Mu=ma(),Bu=Pb,Mb=e=>{Bu=e},Bb=(e,t)=>e===t;function jb(e=Cn){const t=e===Cn?Mu:ma(e),n=(r,o={})=>{const{equalityFn:s=Bb,devModeChecks:i={}}=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:c,subscription:l,getServerState:a,stabilityCheck:u,identityFunctionCheck:p}=t(),g=wt.useRef(!0),E=wt.useCallback({[r.name](d){const f=r(d);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:h,stabilityCheck:y}={stabilityCheck:u,identityFunctionCheck:p,...i};if(y==="always"||y==="once"&&g.current){const m=r(d);if(!s(f,m)){let x;try{throw new Error}catch(I){({stack:x}=I)}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:d,selected:f,selected2:m,stack:x})}}if((h==="always"||h==="once"&&g.current)&&f===d){let m;try{throw new Error}catch(x){({stack:m}=x)}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:m})}g.current&&(g.current=!1)}return f}}[r.name],[r,u,i.stabilityCheck]),b=ju(l.addNestedSub,c.getState,a||c.getState,E,s);return At.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var Vb=jb();function Gb(e){e()}function Hb(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Gb(()=>{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 Vu={notify(){},get:()=>[]};function Wb(e,t){let n,r=Vu,o=0,s=!1;function i(d){u();const f=r.subscribe(d);let h=!1;return()=>{h||(h=!0,f(),p())}}function c(){r.notify()}function l(){b.onStateChange&&b.onStateChange()}function a(){return s}function u(){o++,n||(n=e.subscribe(l),r=Hb())}function p(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Vu)}function g(){s||(s=!0,u())}function E(){s&&(s=!1,p())}const b={addNestedSub:i,notifyNestedSubs:c,handleChangeWrapper:l,isSubscribed:a,trySubscribe:g,tryUnsubscribe:E,getListeners:()=>r};return b}var Zb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Xb=typeof navigator<"u"&&navigator.product==="ReactNative",zb=Zb||Xb?At.useLayoutEffect:At.useEffect;function Yb({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=At.useMemo(()=>{const a=Wb(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),c=At.useMemo(()=>e.getState(),[e]);zb(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),c!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,c]);const l=t||vn;return At.createElement(l.Provider,{value:i},n)}var Jb=Yb;function Gu(e=vn){const t=e===vn?Bu:ba(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Qb=Gu();function $b(e=vn){const t=e===vn?Qb:Gu(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var qb=$b();Mb(kb.useSyncExternalStoreWithSelector);const jt=qb.withTypes(),be=Vb.withTypes(),it={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},K={IDLE:"idle",LOADING:"loading",FAILED:"failed"},Ub="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",Hu="Show more",Kb="Show less",ey="Show preview",ty="Hide preview",ny="Select email";function Ue(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 ry=typeof Symbol=="function"&&Symbol.observable||"@@observable",Wu=ry,ya=()=>Math.random().toString(36).substring(7).split("").join("."),oy={INIT:`@@redux/INIT${ya()}`,REPLACE:`@@redux/REPLACE${ya()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ya()}`},Gn=oy;function lo(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 sy(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(cy(e))return"date";if(ay(e))return"error";const n=iy(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 iy(e){return typeof e.constructor=="function"?e.constructor.name:null}function ay(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function cy(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Cn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=sy(e)),t}function Zu(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(2):`Expected the root reducer to be a function. Instead, received: '${Cn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ue(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"?Ue(1):`Expected the enhancer to be a function. Instead, received: '${Cn(n)}'`);return n(Zu)(e,t)}let r=e,o=t,s=new Map,i=s,c=0,l=!1;function a(){i===s&&(i=new Map,s.forEach((f,h)=>{i.set(h,f)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?Ue(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 p(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(4):`Expected the listener to be a function. Instead, received: '${Cn(f)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ue(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 h=!0;a();const y=c++;return i.set(y,f),function(){if(h){if(l)throw new Error(process.env.NODE_ENV==="production"?Ue(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.");h=!1,a(),i.delete(y),s=null}}}function g(f){if(!lo(f))throw new Error(process.env.NODE_ENV==="production"?Ue(7):`Actions must be plain objects. Instead, the actual type was: '${Cn(f)}'. 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 f.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ue(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof f.type!="string")throw new Error(process.env.NODE_ENV==="production"?Ue(17):`Action "type" property must be a string. Instead, the actual type was: '${Cn(f.type)}'. Value was: '${f.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ue(9):"Reducers may not dispatch actions.");try{l=!0,o=r(o,f)}finally{l=!1}return(s=i).forEach(y=>{y()}),f}function E(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(10):`Expected the nextReducer to be a function. Instead, received: '${Cn(f)}`);r=f,g({type:Gn.REPLACE})}function b(){const f=p;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(process.env.NODE_ENV==="production"?Ue(11):`Expected the observer to be an object. Instead, received: '${Cn(h)}'`);function y(){const x=h;x.next&&x.next(u())}return y(),{unsubscribe:f(y)}},[Wu](){return this}}}return g({type:Gn.INIT}),{dispatch:g,subscribe:p,getState:u,replaceReducer:E,[Wu]:b}}function Xu(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function ly(e,t,n,r){const o=Object.keys(t),s=n&&n.type===Gn.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(!lo(e))return`The ${s} has unexpected type of "${Cn(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const i=Object.keys(e).filter(c=>!t.hasOwnProperty(c)&&!r[c]);if(i.forEach(c=>{r[c]=!0}),!(n&&n.type===Gn.REPLACE)&&i.length>0)return`Unexpected ${i.length>1?"keys":"key"} "${i.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function uy(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Gn.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Ue(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:Gn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ue(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Gn.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 zu(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const c=t[i];process.env.NODE_ENV!=="production"&&typeof e[c]>"u"&&Xu(`No reducer provided for key "${c}"`),typeof e[c]=="function"&&(n[c]=e[c])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let s;try{uy(n)}catch(i){s=i}return function(c={},l){if(s)throw s;if(process.env.NODE_ENV!=="production"){const p=ly(c,n,l,o);p&&Xu(p)}let a=!1;const u={};for(let p=0;p<r.length;p++){const g=r[p],E=n[g],b=c[g],d=E(b,l);if(typeof d>"u"){const f=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Ue(14):`When called with an action of type ${f?`"${String(f)}"`:"(unknown type)"}, the slice reducer for key "${g}" 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.`)}u[g]=d,a=a||d!==b}return a=a||r.length!==Object.keys(c).length,a?u:c}}function ps(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function dy(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?Ue(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const i={getState:o.getState,dispatch:(l,...a)=>s(l,...a)},c=e.map(l=>l(i));return s=ps(...c)(o.dispatch),{...o,dispatch:s}}}function Yu(e){return lo(e)&&"type"in e&&typeof e.type=="string"}var Ju=Symbol.for("immer-nothing"),Qu=Symbol.for("immer-draftable"),St=Symbol.for("immer-state"),fy=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 pt(e,...t){if(process.env.NODE_ENV!=="production"){const n=fy[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 vr=Object.getPrototypeOf;function Hn(e){return!!e&&!!e[St]}function on(e){var t;return e?$u(e)||Array.isArray(e)||!!e[Qu]||!!((t=e.constructor)!=null&&t[Qu])||ms(e)||bs(e):!1}var py=Object.prototype.constructor.toString();function $u(e){if(!e||typeof e!="object")return!1;const t=vr(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)===py}function hs(e,t){gs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function gs(e){const t=e[St];return t?t.type_:Array.isArray(e)?1:ms(e)?2:bs(e)?3:0}function va(e,t){return gs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qu(e,t,n){const r=gs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function hy(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ms(e){return e instanceof Map}function bs(e){return e instanceof Set}function Wn(e){return e.copy_||e.base_}function Ca(e,t){if(ms(e))return new Map(e);if(bs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=$u(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[St];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const i=o[s],c=r[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(vr(e),r)}else{const r=vr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function Ia(e,t=!1){return ys(e)||Hn(e)||!on(e)||(gs(e)>1&&(e.set=e.add=e.clear=e.delete=gy),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Ia(r,!0))),e}function gy(){pt(2)}function ys(e){return Object.isFrozen(e)}var my={};function Zn(e){const t=my[e];return t||pt(0,e),t}var uo;function Uu(){return uo}function by(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ku(e,t){t&&(Zn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ea(e){xa(e),e.drafts_.forEach(yy),e.drafts_=null}function xa(e){e===uo&&(uo=e.parent_)}function ed(e){return uo=by(uo,e)}function yy(e){const t=e[St];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function td(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[St].modified_&&(Ea(t),pt(4)),on(e)&&(e=vs(t,e),t.parent_||Cs(t,e)),t.patches_&&Zn("Patches").generateReplacementPatches_(n[St].base_,e,t.patches_,t.inversePatches_)):e=vs(t,n,[]),Ea(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ju?e:void 0}function vs(e,t,n){if(ys(t))return t;const r=t[St];if(!r)return hs(t,(o,s)=>nd(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Cs(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),hs(s,(c,l)=>nd(e,r,o,c,l,n,i)),Cs(e,o,!1),n&&e.patches_&&Zn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function nd(e,t,n,r,o,s,i){if(process.env.NODE_ENV!=="production"&&o===n&&pt(5),Hn(o)){const c=s&&t&&t.type_!==3&&!va(t.assigned_,r)?s.concat(r):void 0,l=vs(e,o,c);if(qu(n,r,l),Hn(l))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(on(o)&&!ys(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;vs(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Cs(e,o)}}function Cs(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ia(t,n)}function vy(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Uu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=wa;n&&(o=[r],s=fo);const{revoke:i,proxy:c}=Proxy.revocable(o,s);return r.draft_=c,r.revoke_=i,c}var wa={get(e,t){if(t===St)return e;const n=Wn(e);if(!va(n,t))return Cy(e,n,t);const r=n[t];return e.finalized_||!on(r)?r:r===Aa(e.base_,t)?(_a(e),e.copy_[t]=Ta(r,e)):r},has(e,t){return t in Wn(e)},ownKeys(e){return Reflect.ownKeys(Wn(e))},set(e,t,n){const r=rd(Wn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Aa(Wn(e),t),s=o==null?void 0:o[St];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(hy(n,o)&&(n!==void 0||va(e.base_,t)))return!0;_a(e),Sa(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 Aa(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,_a(e),Sa(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){pt(11)},getPrototypeOf(e){return vr(e.base_)},setPrototypeOf(){pt(12)}},fo={};hs(wa,(e,t)=>{fo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),fo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&pt(13),fo.set.call(this,e,t,void 0)},fo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&pt(14),wa.set.call(this,e[0],t,n,e[0])};function Aa(e,t){const n=e[St];return(n?Wn(n):e)[t]}function Cy(e,t,n){var o;const r=rd(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function rd(e,t){if(!(t in e))return;let n=vr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=vr(n)}}function Sa(e){e.modified_||(e.modified_=!0,e.parent_&&Sa(e.parent_))}function _a(e){e.copy_||(e.copy_=Ca(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Iy=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 i=this;return function(l=s,...a){return i.produce(l,u=>n.call(this,u,...a))}}typeof n!="function"&&pt(6),r!==void 0&&typeof r!="function"&&pt(7);let o;if(on(t)){const s=ed(this),i=Ta(t,void 0);let c=!0;try{o=n(i),c=!1}finally{c?Ea(s):xa(s)}return Ku(s,r),td(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Ju&&(o=void 0),this.autoFreeze_&&Ia(o,!0),r){const s=[],i=[];Zn("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else pt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,l=>t(l,...c));let r,o;return[this.produce(t,n,(i,c)=>{r=i,o=c}),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){on(e)||pt(8),Hn(e)&&(e=Ey(e));const t=ed(this),n=Ta(e,void 0);return n[St].isManual_=!0,xa(t),n}finishDraft(e,t){const n=e&&e[St];(!n||!n.isManual_)&&pt(9);const{scope_:r}=n;return Ku(r,t),td(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=Zn("Patches").applyPatches_;return Hn(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ta(e,t){const n=ms(e)?Zn("MapSet").proxyMap_(e,t):bs(e)?Zn("MapSet").proxySet_(e,t):vy(e,t);return(t?t.scope_:Uu()).drafts_.push(n),n}function Ey(e){return Hn(e)||pt(10,e),od(e)}function od(e){if(!on(e)||ys(e))return e;const t=e[St];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ca(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ca(e,!0);return hs(n,(r,o)=>{qu(n,r,od(o))}),t&&(t.finalized_=!1),n}var _t=new Iy,sd=_t.produce;_t.produceWithPatches.bind(_t),_t.setAutoFreeze.bind(_t),_t.setUseStrictShallowCopy.bind(_t),_t.applyPatches.bind(_t),_t.createDraft.bind(_t),_t.finishDraft.bind(_t);var xy=(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:m})}g.current&&(g.current=!1)}return f}}[r.name],[r,u,i.stabilityCheck]),b=Bu(l.addNestedSub,c.getState,a||c.getState,E,s);return wt.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var Vb=jb();function Gb(e){e()}function Hb(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Gb(()=>{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 ju={notify(){},get:()=>[]};function Wb(e,t){let n,r=ju,o=0,s=!1;function i(d){u();const f=r.subscribe(d);let h=!1;return()=>{h||(h=!0,f(),p())}}function c(){r.notify()}function l(){b.onStateChange&&b.onStateChange()}function a(){return s}function u(){o++,n||(n=e.subscribe(l),r=Hb())}function p(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=ju)}function g(){s||(s=!0,u())}function E(){s&&(s=!1,p())}const b={addNestedSub:i,notifyNestedSubs:c,handleChangeWrapper:l,isSubscribed:a,trySubscribe:g,tryUnsubscribe:E,getListeners:()=>r};return b}var Zb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Xb=typeof navigator<"u"&&navigator.product==="ReactNative",zb=Zb||Xb?wt.useLayoutEffect:wt.useEffect;function Yb({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=wt.useMemo(()=>{const a=Wb(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),c=wt.useMemo(()=>e.getState(),[e]);zb(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),c!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,c]);const l=t||Cn;return wt.createElement(l.Provider,{value:i},n)}var Jb=Yb;function Vu(e=Cn){const t=e===Cn?Mu:ma(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Qb=Vu();function $b(e=Cn){const t=e===Cn?Qb:Vu(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var qb=$b();Mb(kb.useSyncExternalStoreWithSelector);const Bt=qb.withTypes(),ye=Vb.withTypes(),it={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},U={IDLE:"idle",LOADING:"loading",FAILED:"failed"},Ub="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",Gu="Show more",Kb="Show less",ey="Show preview",ty="Hide preview",ny="Select email";function Ue(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 ry=typeof Symbol=="function"&&Symbol.observable||"@@observable",Hu=ry,ba=()=>Math.random().toString(36).substring(7).split("").join("."),oy={INIT:`@@redux/INIT${ba()}`,REPLACE:`@@redux/REPLACE${ba()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ba()}`},Hn=oy;function po(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 sy(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(cy(e))return"date";if(ay(e))return"error";const n=iy(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 iy(e){return typeof e.constructor=="function"?e.constructor.name:null}function ay(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function cy(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function In(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=sy(e)),t}function Wu(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(2):`Expected the root reducer to be a function. Instead, received: '${In(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ue(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"?Ue(1):`Expected the enhancer to be a function. Instead, received: '${In(n)}'`);return n(Wu)(e,t)}let r=e,o=t,s=new Map,i=s,c=0,l=!1;function a(){i===s&&(i=new Map,s.forEach((f,h)=>{i.set(h,f)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?Ue(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 p(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(4):`Expected the listener to be a function. Instead, received: '${In(f)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ue(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 h=!0;a();const y=c++;return i.set(y,f),function(){if(h){if(l)throw new Error(process.env.NODE_ENV==="production"?Ue(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.");h=!1,a(),i.delete(y),s=null}}}function g(f){if(!po(f))throw new Error(process.env.NODE_ENV==="production"?Ue(7):`Actions must be plain objects. Instead, the actual type was: '${In(f)}'. 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 f.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ue(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof f.type!="string")throw new Error(process.env.NODE_ENV==="production"?Ue(17):`Action "type" property must be a string. Instead, the actual type was: '${In(f.type)}'. Value was: '${f.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ue(9):"Reducers may not dispatch actions.");try{l=!0,o=r(o,f)}finally{l=!1}return(s=i).forEach(y=>{y()}),f}function E(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?Ue(10):`Expected the nextReducer to be a function. Instead, received: '${In(f)}`);r=f,g({type:Hn.REPLACE})}function b(){const f=p;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(process.env.NODE_ENV==="production"?Ue(11):`Expected the observer to be an object. Instead, received: '${In(h)}'`);function y(){const x=h;x.next&&x.next(u())}return y(),{unsubscribe:f(y)}},[Hu](){return this}}}return g({type:Hn.INIT}),{dispatch:g,subscribe:p,getState:u,replaceReducer:E,[Hu]:b}}function Zu(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function ly(e,t,n,r){const o=Object.keys(t),s=n&&n.type===Hn.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(!po(e))return`The ${s} has unexpected type of "${In(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const i=Object.keys(e).filter(c=>!t.hasOwnProperty(c)&&!r[c]);if(i.forEach(c=>{r[c]=!0}),!(n&&n.type===Hn.REPLACE)&&i.length>0)return`Unexpected ${i.length>1?"keys":"key"} "${i.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function uy(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Hn.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Ue(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:Hn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ue(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Hn.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 Xu(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const c=t[i];process.env.NODE_ENV!=="production"&&typeof e[c]>"u"&&Zu(`No reducer provided for key "${c}"`),typeof e[c]=="function"&&(n[c]=e[c])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let s;try{uy(n)}catch(i){s=i}return function(c={},l){if(s)throw s;if(process.env.NODE_ENV!=="production"){const p=ly(c,n,l,o);p&&Zu(p)}let a=!1;const u={};for(let p=0;p<r.length;p++){const g=r[p],E=n[g],b=c[g],d=E(b,l);if(typeof d>"u"){const f=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Ue(14):`When called with an action of type ${f?`"${String(f)}"`:"(unknown type)"}, the slice reducer for key "${g}" 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.`)}u[g]=d,a=a||d!==b}return a=a||r.length!==Object.keys(c).length,a?u:c}}function hs(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function dy(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?Ue(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const i={getState:o.getState,dispatch:(l,...a)=>s(l,...a)},c=e.map(l=>l(i));return s=hs(...c)(o.dispatch),{...o,dispatch:s}}}function zu(e){return po(e)&&"type"in e&&typeof e.type=="string"}var Yu=Symbol.for("immer-nothing"),Ju=Symbol.for("immer-draftable"),At=Symbol.for("immer-state"),fy=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 ht(e,...t){if(process.env.NODE_ENV!=="production"){const n=fy[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 Wn(e){return!!e&&!!e[At]}function sn(e){var t;return e?Qu(e)||Array.isArray(e)||!!e[Ju]||!!((t=e.constructor)!=null&&t[Ju])||bs(e)||ys(e):!1}var py=Object.prototype.constructor.toString();function Qu(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)===py}function gs(e,t){ms(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ms(e){const t=e[At];return t?t.type_:Array.isArray(e)?1:bs(e)?2:ys(e)?3:0}function ya(e,t){return ms(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $u(e,t,n){const r=ms(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function hy(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bs(e){return e instanceof Map}function ys(e){return e instanceof Set}function Zn(e){return e.copy_||e.base_}function va(e,t){if(bs(e))return new Map(e);if(ys(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Qu(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[At];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const i=o[s],c=r[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}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 Ca(e,t=!1){return vs(e)||Wn(e)||!sn(e)||(ms(e)>1&&(e.set=e.add=e.clear=e.delete=gy),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Ca(r,!0))),e}function gy(){ht(2)}function vs(e){return Object.isFrozen(e)}var my={};function Xn(e){const t=my[e];return t||ht(0,e),t}var ho;function qu(){return ho}function by(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Uu(e,t){t&&(Xn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ia(e){Ea(e),e.drafts_.forEach(yy),e.drafts_=null}function Ea(e){e===ho&&(ho=e.parent_)}function Ku(e){return ho=by(ho,e)}function yy(e){const t=e[At];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ed(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[At].modified_&&(Ia(t),ht(4)),sn(e)&&(e=Cs(t,e),t.parent_||Is(t,e)),t.patches_&&Xn("Patches").generateReplacementPatches_(n[At].base_,e,t.patches_,t.inversePatches_)):e=Cs(t,n,[]),Ia(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Yu?e:void 0}function Cs(e,t,n){if(vs(t))return t;const r=t[At];if(!r)return gs(t,(o,s)=>td(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Is(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),gs(s,(c,l)=>td(e,r,o,c,l,n,i)),Is(e,o,!1),n&&e.patches_&&Xn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function td(e,t,n,r,o,s,i){if(process.env.NODE_ENV!=="production"&&o===n&&ht(5),Wn(o)){const c=s&&t&&t.type_!==3&&!ya(t.assigned_,r)?s.concat(r):void 0,l=Cs(e,o,c);if($u(n,r,l),Wn(l))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(sn(o)&&!vs(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Cs(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Is(e,o)}}function Is(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ca(t,n)}function vy(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:qu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=xa;n&&(o=[r],s=go);const{revoke:i,proxy:c}=Proxy.revocable(o,s);return r.draft_=c,r.revoke_=i,c}var xa={get(e,t){if(t===At)return e;const n=Zn(e);if(!ya(n,t))return Cy(e,n,t);const r=n[t];return e.finalized_||!sn(r)?r:r===wa(e.base_,t)?(Sa(e),e.copy_[t]=_a(r,e)):r},has(e,t){return t in Zn(e)},ownKeys(e){return Reflect.ownKeys(Zn(e))},set(e,t,n){const r=nd(Zn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=wa(Zn(e),t),s=o==null?void 0:o[At];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(hy(n,o)&&(n!==void 0||ya(e.base_,t)))return!0;Sa(e),Aa(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 wa(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Sa(e),Aa(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Zn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ht(11)},getPrototypeOf(e){return yr(e.base_)},setPrototypeOf(){ht(12)}},go={};gs(xa,(e,t)=>{go[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),go.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ht(13),go.set.call(this,e,t,void 0)},go.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ht(14),xa.set.call(this,e[0],t,n,e[0])};function wa(e,t){const n=e[At];return(n?Zn(n):e)[t]}function Cy(e,t,n){var o;const r=nd(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function nd(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 Aa(e){e.modified_||(e.modified_=!0,e.parent_&&Aa(e.parent_))}function Sa(e){e.copy_||(e.copy_=va(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Iy=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 i=this;return function(l=s,...a){return i.produce(l,u=>n.call(this,u,...a))}}typeof n!="function"&&ht(6),r!==void 0&&typeof r!="function"&&ht(7);let o;if(sn(t)){const s=Ku(this),i=_a(t,void 0);let c=!0;try{o=n(i),c=!1}finally{c?Ia(s):Ea(s)}return Uu(s,r),ed(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Yu&&(o=void 0),this.autoFreeze_&&Ca(o,!0),r){const s=[],i=[];Xn("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else ht(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,l=>t(l,...c));let r,o;return[this.produce(t,n,(i,c)=>{r=i,o=c}),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){sn(e)||ht(8),Wn(e)&&(e=Ey(e));const t=Ku(this),n=_a(e,void 0);return n[At].isManual_=!0,Ea(t),n}finishDraft(e,t){const n=e&&e[At];(!n||!n.isManual_)&&ht(9);const{scope_:r}=n;return Uu(r,t),ed(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=Xn("Patches").applyPatches_;return Wn(e)?r(e,t):this.produce(e,o=>r(o,t))}};function _a(e,t){const n=bs(e)?Xn("MapSet").proxyMap_(e,t):ys(e)?Xn("MapSet").proxySet_(e,t):vy(e,t);return(t?t.scope_:qu()).drafts_.push(n),n}function Ey(e){return Wn(e)||ht(10,e),rd(e)}function rd(e){if(!sn(e)||vs(e))return e;const t=e[At];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=va(e,t.scope_.immer_.useStrictShallowCopy_)}else n=va(e,!0);return gs(n,(r,o)=>{$u(n,r,rd(o))}),t&&(t.finalized_=!1),n}var St=new Iy,od=St.produce;St.produceWithPatches.bind(St),St.setAutoFreeze.bind(St),St.setUseStrictShallowCopy.bind(St),St.applyPatches.bind(St),St.createDraft.bind(St),St.finishDraft.bind(St);var xy=(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
567
|
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},wy=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:i}=e,c=r(()=>({}),...o);if(!(c.apply(null,s)===c.apply(null,i))){let a;try{throw new Error}catch(u){({stack:a}=u)}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:i,stack:a})}},Ay={inputStabilityCheck:"once",identityFunctionCheck:"once"};function Sy(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _y(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Ty(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
|
|
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 Hy(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Vy}=e;return()=>n=>r=>(t(r)&&console.warn(Gy(r.type)),n(r))}function
|
|
570
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:i,stack:a})}},Ay={inputStabilityCheck:"once",identityFunctionCheck:"once"};function Sy(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _y(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Ty(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 sd=e=>Array.isArray(e)?e:[e];function Oy(e){const t=Array.isArray(e[0])?e[0]:e;return Ty(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function id(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Ly=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Ay,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:xy},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:wy}}},Fy=class{constructor(e){this.value=e}deref(){return this.value}},Dy=typeof WeakRef<"u"?WeakRef:Fy,Ry=0,ad=1;function Es(){return{s:Ry,v:void 0,o:null,p:null}}function cd(e,t={}){let n=Es();const{resultEqualityCheck:r}=t;let o,s=0;function i(){var p;let c=n;const{length:l}=arguments;for(let g=0,E=l;g<E;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let d=c.o;d===null&&(c.o=d=new WeakMap);const f=d.get(b);f===void 0?(c=Es(),d.set(b,c)):c=f}else{let d=c.p;d===null&&(c.p=d=new Map);const f=d.get(b);f===void 0?(c=Es(),d.set(b,c)):c=f}}const a=c;let u;if(c.s===ad)u=c.v;else if(u=e.apply(null,arguments),s++,r){const g=((p=o==null?void 0:o.deref)==null?void 0:p.call(o))??o;g!=null&&r(g,u)&&(u=g,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new Dy(u):u}return a.s=ad,a.v=u,u}return i.clearCache=()=>{n=Es(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function ky(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,c,l={},a=o.pop();typeof a=="object"&&(l=a,a=o.pop()),Sy(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const u={...n,...l},{memoize:p,memoizeOptions:g=[],argsMemoize:E=cd,argsMemoizeOptions:b=[],devModeChecks:d={}}=u,f=sd(g),h=sd(b),y=Oy(o),m=p(function(){return s++,a.apply(null,arguments)},...f);let x=!0;const I=E(function(){i++;const A=id(y,arguments);if(c=m.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:O}=Ly(x,d);if(S.shouldRun&&S.run(a,A,c),O.shouldRun){const R=id(y,arguments);O.run({inputSelectorResults:A,inputSelectorResultsCopy:R},{memoize:p,memoizeOptions:f},arguments)}x&&(x=!1)}return c},...h);return Object.assign(I,{resultFunc:a,memoizedResultFunc:m,dependencies:y,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:E})};return Object.assign(r,{withTypes:()=>r}),r}var Ny=ky(cd),Py=Object.assign((e,t=Ny)=>{_y(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((i,c,l)=>(i[n[l]]=c,i),{}))},{withTypes:()=>Py});function ld(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var My=ld(),By=ld,jy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?hs:hs.apply(null,arguments)},ud=e=>e&&typeof e.match=="function";function mo(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?Fe(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=>zu(r)&&r.type===e,n}function Vy(e){return typeof e=="function"&&"type"in e&&ud(e)}function Gy(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
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 Hy(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Vy}=e;return()=>n=>r=>(t(r)&&console.warn(Gy(r.type)),n(r))}function dd(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
|
|
573
|
+
It is disabled in production builds, so you don't need to worry about that.`)}}}var fd=class Bo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Bo.prototype)}static get[Symbol.species](){return Bo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Bo(...t[0].concat(this)):new Bo(...t.concat(this))}};function pd(e){return sn(e)?od(e,()=>{}):e}function hd(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"?Fe(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function Wy(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Zy(e,t,n){const r=gd(e,t,n);return{detectMutations(){return md(e,t,r,n)}}}function gd(e,t=[],n,r="",o=new Set){const s={value:n};if(!e(n)&&!o.has(n)){o.add(n),s.children={};for(const i in n){const c=r?r+"."+i:i;t.length&&t.indexOf(c)!==-1||(s.children[i]=gd(e,t,n[i],c))}}return s}function md(e,t=[],n,r,o=!1,s=""){const i=n?n.value:void 0,c=i===r;if(o&&!c&&!Number.isNaN(r))return{wasMutated:!0,path:s};if(e(i)||e(r))return{wasMutated:!1};const l={};for(let u in n.children)l[u]=!0;for(let u in r)l[u]=!0;const a=t.length>0;for(let u in l){const p=s?s+"."+u:u;if(a&&t.some(b=>b instanceof RegExp?b.test(p):p===b))continue;const g=md(e,t,n.children[u],r[u],c,p);if(g.wasMutated)return g}return{wasMutated:!1}}function Xy(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(c,l,a,u){return JSON.stringify(c,n(l,u),a)},n=function(c,l){let a=[],u=[];return l||(l=function(p,g){return a[0]===g?"[Circular ~]":"[Circular ~."+u.slice(0,a.indexOf(g)).join(".")+"]"}),function(p,g){if(a.length>0){var E=a.indexOf(this);~E?a.splice(E+1):a.push(this),~E?u.splice(E,1/0,p):u.push(p),~a.indexOf(g)&&(g=l.call(this,p,g))}else a.push(g);return c==null?g:c.call(this,p,g)}},{isImmutable:r=Wy,ignoredPaths:o,warnAfter:s=32}=e;const i=Zy.bind(null,r,o);return({getState:c})=>{let l=c(),a=i(l),u;return p=>g=>{const E=dd(s,"ImmutableStateInvariantMiddleware");E.measureTime(()=>{if(l=c(),u=a.detectMutations(),a=i(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Fe(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const b=p(g);return E.measureTime(()=>{if(l=c(),u=a.detectMutations(),a=i(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Fe(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(g)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),E.warnIfExceeded(),b}}}}function bd(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||po(e)}function Ta(e,t="",n=bd,r,o=[],s){let i;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const c=r!=null?r(e):Object.entries(e),l=o.length>0;for(const[a,u]of c){const p=t?t+"."+a:a;if(!(l&&o.some(E=>E instanceof RegExp?E.test(p):p===E))){if(!n(u))return{keyPath:p,value:u};if(typeof u=="object"&&(i=Ta(u,p,n,r,o,s),i))return i}}return s&&yd(e)&&s.add(e),!1}function yd(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!yd(t))return!1;return!0}function zy(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=bd,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:i=32,ignoreState:c=!1,ignoreActions:l=!1,disableCache:a=!1}=e,u=!a&&WeakSet?new WeakSet:void 0;return p=>g=>E=>{if(!zu(E))return g(E);const b=g(E),d=dd(i,"SerializableStateInvariantMiddleware");return!l&&!(r.length&&r.indexOf(E.type)!==-1)&&d.measureTime(()=>{const f=Ta(E,"",t,n,o,u);if(f){const{keyPath:h,value:y}=f;console.error(`A non-serializable value was detected in an action, in the path: \`${h}\`. Value:`,y,`
|
|
574
574
|
Take a look at the logic that dispatched this action: `,E,`
|
|
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
|
-
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),c||(d.measureTime(()=>{const f=p.getState(),h=
|
|
576
|
+
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),c||(d.measureTime(()=>{const f=p.getState(),h=Ta(f,"",t,n,s,u);if(h){const{keyPath:y,value:m}=h;console.error(`A non-serializable value was detected in the state, in the path: \`${y}\`. Value:`,m,`
|
|
577
577
|
Take a look at the reducer(s) handling this action type: ${E.type}.
|
|
578
|
-
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),d.warnIfExceeded()),b}}}function Es(e){return typeof e=="boolean"}var Yy=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new pd;if(n&&(Es(n)?i.push(My):i.push(By(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let c={};Es(r)||(c=r),i.unshift(Xy(c))}if(o){let c={};Es(o)||(c=o),i.push(zy(c))}if(s){let c={};Es(s)||(c=s),i.unshift(Hy(c))}}return i},Jy="RTK_autoBatch",Cd=e=>t=>{setTimeout(t,e)},Qy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Cd(10),$y=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,i=!1;const c=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Qy:e.type==="callback"?e.queueNotification:Cd(e.timeout),a=()=>{i=!1,s&&(s=!1,c.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const p=()=>o&&u(),g=r.subscribe(p);return c.add(u),()=>{g(),c.delete(u)}},dispatch(u){var p;try{return o=!((p=u==null?void 0:u.meta)!=null&&p[Jy]),s=!o,s&&(i||(i=!0,l(a))),r.dispatch(u)}finally{o=!0}}})},qy=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new pd(e);return r&&o.push($y(typeof r=="object"?r:void 0)),o};function Uy(e){const t=Yy(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(lo(n))c=zu(n);else throw new Error(process.env.NODE_ENV==="production"?Le(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"?Le(2):"`middleware` field must be a callback");let l;if(typeof r=="function"){if(l=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(l))throw new Error(process.env.NODE_ENV==="production"?Le(3):"when using a middleware builder function, an array of middleware must be returned")}else l=t();if(process.env.NODE_ENV!=="production"&&l.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Le(4):"each middleware provided to configureStore must be a function");let a=ps;o&&(a=jy({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const u=dy(...l),p=qy(u);if(process.env.NODE_ENV!=="production"&&i&&typeof i!="function")throw new Error(process.env.NODE_ENV==="production"?Le(5):"`enhancers` field must be a callback");let g=typeof i=="function"?i(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(g))throw new Error(process.env.NODE_ENV==="production"?Le(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&g.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Le(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&l.length&&!g.includes(u)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const E=a(...g);return Zu(c,s,E)}function Id(e){const t={},n=[];let r;const o={addCase(s,i){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Le(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Le(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const c=typeof s=="string"?s:s.type;if(!c)throw new Error(process.env.NODE_ENV==="production"?Le(28):"`builder.addCase` cannot be called with an empty action type");if(c in t)throw new Error(process.env.NODE_ENV==="production"?Le(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${c}'`);return t[c]=i,o},addMatcher(s,i){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Le(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Le(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function Ky(e){return typeof e=="function"}function ev(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Le(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]=Id(t),s;if(Ky(e))s=()=>hd(e());else{const c=hd(e);s=()=>c}function i(c=s(),l){let a=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return a.filter(u=>!!u).length===0&&(a=[o]),a.reduce((u,p)=>{if(p)if(Hn(u)){const E=p(u,l);return E===void 0?u:E}else{if(on(u))return sd(u,g=>p(g,l));{const g=p(u,l);if(g===void 0){if(u===null)return u;throw new Error(process.env.NODE_ENV==="production"?Le(9):"A case reducer on a non-draftable value must not return undefined")}return g}}return u},c)}return i.getInitialState=s,i}var tv=(e,t)=>dd(e)?e.match(t):e(t);function nv(...e){return t=>e.some(n=>tv(n,t))}var rv="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ov=(e=21)=>{let t="",n=e;for(;n--;)t+=rv[Math.random()*64|0];return t},sv=["name","message","stack","code"],La=class{constructor(e,t){Fc(this,"_type");this.payload=e,this.meta=t}},Ed=class{constructor(e,t){Fc(this,"_type");this.payload=e,this.meta=t}},iv=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of sv)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Vt=(()=>{function e(t,n,r){const o=po(t+"/fulfilled",(l,a,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:a,requestStatus:"fulfilled"}})),s=po(t+"/pending",(l,a,u)=>({payload:void 0,meta:{...u||{},arg:a,requestId:l,requestStatus:"pending"}})),i=po(t+"/rejected",(l,a,u,p,g)=>({payload:p,error:(r&&r.serializeError||iv)(l||"Rejected"),meta:{...g||{},arg:u,requestId:a,rejectedWithValue:!!p,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function c(l){return(a,u,p)=>{const g=r!=null&&r.idGenerator?r.idGenerator(l):ov(),E=new AbortController;let b,d;function f(y){d=y,E.abort()}const h=async function(){var x,I;let y;try{let w=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,l,{getState:u,extra:p});if(cv(w)&&(w=await w),w===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,T)=>{b=()=>{T({name:"AbortError",message:d||"Aborted"})},E.signal.addEventListener("abort",b)});a(s(g,l,(I=r==null?void 0:r.getPendingMeta)==null?void 0:I.call(r,{requestId:g,arg:l},{getState:u,extra:p}))),y=await Promise.race([A,Promise.resolve(n(l,{dispatch:a,getState:u,extra:p,requestId:g,signal:E.signal,abort:f,rejectWithValue:(S,T)=>new La(S,T),fulfillWithValue:(S,T)=>new Ed(S,T)})).then(S=>{if(S instanceof La)throw S;return S instanceof Ed?o(S.payload,g,l,S.meta):o(S,g,l)})])}catch(w){y=w instanceof La?i(null,g,l,w.payload,w.meta):i(w,g,l)}finally{b&&E.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&i.match(y)&&y.meta.condition||a(y),y}();return Object.assign(h,{abort:f,requestId:g,arg:l,unwrap(){return h.then(av)}})}}return Object.assign(c,{pending:s,rejected:i,fulfilled:o,settled:nv(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function av(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cv(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var lv=Symbol.for("rtk-slice-createasyncthunk");function uv(e,t){return`${e}/${t}`}function dv({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[lv];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Le(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 c=(typeof o.reducers=="function"?o.reducers(pv()):o.reducers)||{},l=Object.keys(c),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(m,x){const I=typeof m=="string"?m:m.type;if(!I)throw new Error(process.env.NODE_ENV==="production"?Le(12):"`context.addCase` cannot be called with an empty action type");if(I in a.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Le(13):"`context.addCase` cannot be called with two reducers for the same action type: "+I);return a.sliceCaseReducersByType[I]=x,u},addMatcher(m,x){return a.sliceMatchers.push({matcher:m,reducer:x}),u},exposeAction(m,x){return a.actionCreators[m]=x,u},exposeCaseReducer(m,x){return a.sliceCaseReducersByName[m]=x,u}};l.forEach(m=>{const x=c[m],I={reducerName:m,type:uv(s,m),createNotation:typeof o.reducers=="function"};gv(x)?bv(I,x,u,t):hv(I,x,u)});function p(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Le(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[m={},x=[],I=void 0]=typeof o.extraReducers=="function"?Id(o.extraReducers):[o.extraReducers],w={...m,...a.sliceCaseReducersByType};return ev(o.initialState,A=>{for(let S in w)A.addCase(S,w[S]);for(let S of a.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of x)A.addMatcher(S.matcher,S.reducer);I&&A.addDefaultCase(I)})}const g=m=>m,E=new Map;let b;function d(m,x){return b||(b=p()),b(m,x)}function f(){return b||(b=p()),b.getInitialState()}function h(m,x=!1){function I(A){let S=A[m];if(typeof S>"u"){if(x)S=f();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Le(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function w(A=g){const S=gd(E,x,{insert:()=>new WeakMap});return gd(S,A,{insert:()=>{const T={};for(const[R,D]of Object.entries(o.selectors??{}))T[R]=fv(D,A,f,x);return T}})}return{reducerPath:m,getSelectors:w,get selectors(){return w(I)},selectSlice:I}}const y={name:s,reducer:d,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:f,...h(i),injectInto(m,{reducerPath:x,...I}={}){const w=x??i;return m.inject({reducerPath:w,reducer:d},I),{...y,...h(w,!0)}}};return y}}function fv(e,t,n,r){function o(s,...i){let c=t(s);if(typeof c>"u"){if(r)c=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Le(16):"selectState returned undefined for an uninjected slice reducer")}return e(c,...i)}return o.unwrapped=e,o}var Fa=dv();function pv(){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 hv({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!mv(r))throw new Error(process.env.NODE_ENV==="production"?Le(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?po(e,i):po(e))}function gv(e){return e._reducerDefinitionType==="asyncThunk"}function mv(e){return e._reducerDefinitionType==="reducerWithPrepare"}function bv({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Le(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:i,pending:c,rejected:l,settled:a,options:u}=n,p=o(e,s,u);r.exposeAction(t,p),i&&r.addCase(p.fulfilled,i),c&&r.addCase(p.pending,c),l&&r.addCase(p.rejected,l),a&&r.addMatcher(p.settled,a),r.exposeCaseReducer(t,{fulfilled:i||xs,pending:c||xs,rejected:l||xs,settled:a||xs})}function xs(){}function Le(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 In="success",ht="error",xd="Some error occured. Please contact support@hiverhq.com",wd="Card refreshed successfully",yv="Card linked successfully",vv="Error in linking the card",Cv="Card unlinked successfully",Iv="Failed to unlink the card",ws="Something went wrong",Ev="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",xv=v.styled(v.Box)`
|
|
578
|
+
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),d.warnIfExceeded()),b}}}function xs(e){return typeof e=="boolean"}var Yy=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new fd;if(n&&(xs(n)?i.push(My):i.push(By(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let c={};xs(r)||(c=r),i.unshift(Xy(c))}if(o){let c={};xs(o)||(c=o),i.push(zy(c))}if(s){let c={};xs(s)||(c=s),i.unshift(Hy(c))}}return i},Jy="RTK_autoBatch",vd=e=>t=>{setTimeout(t,e)},Qy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vd(10),$y=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,i=!1;const c=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Qy:e.type==="callback"?e.queueNotification:vd(e.timeout),a=()=>{i=!1,s&&(s=!1,c.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const p=()=>o&&u(),g=r.subscribe(p);return c.add(u),()=>{g(),c.delete(u)}},dispatch(u){var p;try{return o=!((p=u==null?void 0:u.meta)!=null&&p[Jy]),s=!o,s&&(i||(i=!0,l(a))),r.dispatch(u)}finally{o=!0}}})},qy=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new fd(e);return r&&o.push($y(typeof r=="object"?r:void 0)),o};function Uy(e){const t=Yy(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(po(n))c=Xu(n);else throw new Error(process.env.NODE_ENV==="production"?Fe(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"?Fe(2):"`middleware` field must be a callback");let l;if(typeof r=="function"){if(l=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(l))throw new Error(process.env.NODE_ENV==="production"?Fe(3):"when using a middleware builder function, an array of middleware must be returned")}else l=t();if(process.env.NODE_ENV!=="production"&&l.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Fe(4):"each middleware provided to configureStore must be a function");let a=hs;o&&(a=jy({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const u=dy(...l),p=qy(u);if(process.env.NODE_ENV!=="production"&&i&&typeof i!="function")throw new Error(process.env.NODE_ENV==="production"?Fe(5):"`enhancers` field must be a callback");let g=typeof i=="function"?i(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(g))throw new Error(process.env.NODE_ENV==="production"?Fe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&g.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Fe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&l.length&&!g.includes(u)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const E=a(...g);return Wu(c,s,E)}function Cd(e){const t={},n=[];let r;const o={addCase(s,i){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Fe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Fe(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const c=typeof s=="string"?s:s.type;if(!c)throw new Error(process.env.NODE_ENV==="production"?Fe(28):"`builder.addCase` cannot be called with an empty action type");if(c in t)throw new Error(process.env.NODE_ENV==="production"?Fe(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${c}'`);return t[c]=i,o},addMatcher(s,i){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Fe(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Fe(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function Ky(e){return typeof e=="function"}function ev(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Fe(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]=Cd(t),s;if(Ky(e))s=()=>pd(e());else{const c=pd(e);s=()=>c}function i(c=s(),l){let a=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return a.filter(u=>!!u).length===0&&(a=[o]),a.reduce((u,p)=>{if(p)if(Wn(u)){const E=p(u,l);return E===void 0?u:E}else{if(sn(u))return od(u,g=>p(g,l));{const g=p(u,l);if(g===void 0){if(u===null)return u;throw new Error(process.env.NODE_ENV==="production"?Fe(9):"A case reducer on a non-draftable value must not return undefined")}return g}}return u},c)}return i.getInitialState=s,i}var tv=(e,t)=>ud(e)?e.match(t):e(t);function nv(...e){return t=>e.some(n=>tv(n,t))}var rv="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ov=(e=21)=>{let t="",n=e;for(;n--;)t+=rv[Math.random()*64|0];return t},sv=["name","message","stack","code"],Oa=class{constructor(e,t){Lc(this,"_type");this.payload=e,this.meta=t}},Id=class{constructor(e,t){Lc(this,"_type");this.payload=e,this.meta=t}},iv=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of sv)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},jt=(()=>{function e(t,n,r){const o=mo(t+"/fulfilled",(l,a,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:a,requestStatus:"fulfilled"}})),s=mo(t+"/pending",(l,a,u)=>({payload:void 0,meta:{...u||{},arg:a,requestId:l,requestStatus:"pending"}})),i=mo(t+"/rejected",(l,a,u,p,g)=>({payload:p,error:(r&&r.serializeError||iv)(l||"Rejected"),meta:{...g||{},arg:u,requestId:a,rejectedWithValue:!!p,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function c(l){return(a,u,p)=>{const g=r!=null&&r.idGenerator?r.idGenerator(l):ov(),E=new AbortController;let b,d;function f(y){d=y,E.abort()}const h=async function(){var x,I;let y;try{let w=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,l,{getState:u,extra:p});if(cv(w)&&(w=await w),w===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,O)=>{b=()=>{O({name:"AbortError",message:d||"Aborted"})},E.signal.addEventListener("abort",b)});a(s(g,l,(I=r==null?void 0:r.getPendingMeta)==null?void 0:I.call(r,{requestId:g,arg:l},{getState:u,extra:p}))),y=await Promise.race([A,Promise.resolve(n(l,{dispatch:a,getState:u,extra:p,requestId:g,signal:E.signal,abort:f,rejectWithValue:(S,O)=>new Oa(S,O),fulfillWithValue:(S,O)=>new Id(S,O)})).then(S=>{if(S instanceof Oa)throw S;return S instanceof Id?o(S.payload,g,l,S.meta):o(S,g,l)})])}catch(w){y=w instanceof Oa?i(null,g,l,w.payload,w.meta):i(w,g,l)}finally{b&&E.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&i.match(y)&&y.meta.condition||a(y),y}();return Object.assign(h,{abort:f,requestId:g,arg:l,unwrap(){return h.then(av)}})}}return Object.assign(c,{pending:s,rejected:i,fulfilled:o,settled:nv(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function av(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cv(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var lv=Symbol.for("rtk-slice-createasyncthunk");function uv(e,t){return`${e}/${t}`}function dv({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[lv];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Fe(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 c=(typeof o.reducers=="function"?o.reducers(pv()):o.reducers)||{},l=Object.keys(c),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(m,x){const I=typeof m=="string"?m:m.type;if(!I)throw new Error(process.env.NODE_ENV==="production"?Fe(12):"`context.addCase` cannot be called with an empty action type");if(I in a.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Fe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+I);return a.sliceCaseReducersByType[I]=x,u},addMatcher(m,x){return a.sliceMatchers.push({matcher:m,reducer:x}),u},exposeAction(m,x){return a.actionCreators[m]=x,u},exposeCaseReducer(m,x){return a.sliceCaseReducersByName[m]=x,u}};l.forEach(m=>{const x=c[m],I={reducerName:m,type:uv(s,m),createNotation:typeof o.reducers=="function"};gv(x)?bv(I,x,u,t):hv(I,x,u)});function p(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Fe(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[m={},x=[],I=void 0]=typeof o.extraReducers=="function"?Cd(o.extraReducers):[o.extraReducers],w={...m,...a.sliceCaseReducersByType};return ev(o.initialState,A=>{for(let S in w)A.addCase(S,w[S]);for(let S of a.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of x)A.addMatcher(S.matcher,S.reducer);I&&A.addDefaultCase(I)})}const g=m=>m,E=new Map;let b;function d(m,x){return b||(b=p()),b(m,x)}function f(){return b||(b=p()),b.getInitialState()}function h(m,x=!1){function I(A){let S=A[m];if(typeof S>"u"){if(x)S=f();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Fe(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function w(A=g){const S=hd(E,x,{insert:()=>new WeakMap});return hd(S,A,{insert:()=>{const O={};for(const[R,D]of Object.entries(o.selectors??{}))O[R]=fv(D,A,f,x);return O}})}return{reducerPath:m,getSelectors:w,get selectors(){return w(I)},selectSlice:I}}const y={name:s,reducer:d,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:f,...h(i),injectInto(m,{reducerPath:x,...I}={}){const w=x??i;return m.inject({reducerPath:w,reducer:d},I),{...y,...h(w,!0)}}};return y}}function fv(e,t,n,r){function o(s,...i){let c=t(s);if(typeof c>"u"){if(r)c=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Fe(16):"selectState returned undefined for an uninjected slice reducer")}return e(c,...i)}return o.unwrapped=e,o}var La=dv();function pv(){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 hv({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!mv(r))throw new Error(process.env.NODE_ENV==="production"?Fe(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?mo(e,i):mo(e))}function gv(e){return e._reducerDefinitionType==="asyncThunk"}function mv(e){return e._reducerDefinitionType==="reducerWithPrepare"}function bv({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Fe(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:i,pending:c,rejected:l,settled:a,options:u}=n,p=o(e,s,u);r.exposeAction(t,p),i&&r.addCase(p.fulfilled,i),c&&r.addCase(p.pending,c),l&&r.addCase(p.rejected,l),a&&r.addMatcher(p.settled,a),r.exposeCaseReducer(t,{fulfilled:i||ws,pending:c||ws,rejected:l||ws,settled:a||ws})}function ws(){}function Fe(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 En="success",gt="error",Ed="Some error occured. Please contact support@hiverhq.com",xd="Card refreshed successfully",yv="Card linked successfully",vv="Error in linking the card",Cv="Card unlinked successfully",Iv="Failed to unlink the card",As="Something went wrong",Ev="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",xv=v.styled(v.Box)`
|
|
579
579
|
display: flex;
|
|
580
580
|
flex-direction: row;
|
|
581
581
|
align-items: center;
|
|
@@ -592,26 +592,26 @@ Take a look at the reducer(s) handling this action type: ${E.type}.
|
|
|
592
592
|
fill: #ffffff;
|
|
593
593
|
width: 10px;
|
|
594
594
|
}
|
|
595
|
-
`,_v=(e,{closeToast:t})=>C.jsx(Sv,{children:C.jsx("img",{src:Ev,onClick:t})}),
|
|
596
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
597
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Er(e){return b3(e)||y3(e)||kd(e)||v3()}var C3=!1;function I3(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 E3(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 x3=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?!C3: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(E3(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=I3(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}(),nt="-ms-",_s="-moz-",Ie="-webkit-",Md="comm",Pa="rule",Ma="decl",w3="@import",Bd="@keyframes",A3="@layer",S3=Math.abs,Ts=String.fromCharCode,_3=Object.assign;function T3(e,t){return Ke(e,0)^45?(((t<<2^Ke(e,0))<<2^Ke(e,1))<<2^Ke(e,2))<<2^Ke(e,3):0}function jd(e){return e.trim()}function O3(e,t){return(e=t.exec(e))?e[0]:e}function Ee(e,t,n){return e.replace(t,n)}function Ba(e,t){return e.indexOf(t)}function Ke(e,t){return e.charCodeAt(t)|0}function ho(e,t,n){return e.slice(t,n)}function Jt(e){return e.length}function ja(e){return e.length}function Os(e,t){return t.push(e),e}function L3(e,t){return e.map(t).join("")}var Ls=1,xr=1,Vd=0,gt=0,We=0,wr="";function Fs(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Ls,column:xr,length:i,return:""}}function go(e,t){return _3(Fs("",null,null,"",null,null,0),e,{length:-e.length},t)}function F3(){return We}function D3(){return We=gt>0?Ke(wr,--gt):0,xr--,We===10&&(xr=1,Ls--),We}function Tt(){return We=gt<Vd?Ke(wr,gt++):0,xr++,We===10&&(xr=1,Ls++),We}function Qt(){return Ke(wr,gt)}function Ds(){return gt}function mo(e,t){return ho(wr,e,t)}function bo(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 Gd(e){return Ls=xr=1,Vd=Jt(wr=e),gt=0,[]}function Hd(e){return wr="",e}function Rs(e){return jd(mo(gt-1,Va(e===91?e+2:e===40?e+1:e)))}function R3(e){for(;(We=Qt())&&We<33;)Tt();return bo(e)>2||bo(We)>3?"":" "}function k3(e,t){for(;--t&&Tt()&&!(We<48||We>102||We>57&&We<65||We>70&&We<97););return mo(e,Ds()+(t<6&&Qt()==32&&Tt()==32))}function Va(e){for(;Tt();)switch(We){case e:return gt;case 34:case 39:e!==34&&e!==39&&Va(We);break;case 40:e===41&&Va(e);break;case 92:Tt();break}return gt}function N3(e,t){for(;Tt()&&e+We!==57;)if(e+We===84&&Qt()===47)break;return"/*"+mo(t,gt-1)+"*"+Ts(e===47?e:Tt())}function P3(e){for(;!bo(Qt());)Tt();return mo(e,gt)}function M3(e){return Hd(ks("",null,null,null,[""],e=Gd(e),0,[0],e))}function ks(e,t,n,r,o,s,i,c,l){for(var a=0,u=0,p=i,g=0,E=0,b=0,d=1,f=1,h=1,y=0,m="",x=o,I=s,w=r,A=m;f;)switch(b=y,y=Tt()){case 40:if(b!=108&&Ke(A,p-1)==58){Ba(A+=Ee(Rs(y),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:A+=Rs(y);break;case 9:case 10:case 13:case 32:A+=R3(b);break;case 92:A+=k3(Ds()-1,7);continue;case 47:switch(Qt()){case 42:case 47:Os(B3(N3(Tt(),Ds()),t,n),l);break;default:A+="/"}break;case 123*d:c[a++]=Jt(A)*h;case 125*d:case 59:case 0:switch(y){case 0:case 125:f=0;case 59+u:h==-1&&(A=Ee(A,/\f/g,"")),E>0&&Jt(A)-p&&Os(E>32?Zd(A+";",r,n,p-1):Zd(Ee(A," ","")+";",r,n,p-2),l);break;case 59:A+=";";default:if(Os(w=Wd(A,t,n,a,u,o,c,m,x=[],I=[],p),s),y===123)if(u===0)ks(A,t,w,w,x,s,p,c,I);else switch(g===99&&Ke(A,3)===110?100:g){case 100:case 108:case 109:case 115:ks(e,w,w,r&&Os(Wd(e,w,w,0,0,o,c,m,o,x=[],p),I),o,I,p,c,r?x:I);break;default:ks(A,w,w,w,[""],I,0,c,I)}}a=u=E=0,d=h=1,m=A="",p=i;break;case 58:p=1+Jt(A),E=b;default:if(d<1){if(y==123)--d;else if(y==125&&d++==0&&D3()==125)continue}switch(A+=Ts(y),y*d){case 38:h=u>0?1:(A+="\f",-1);break;case 44:c[a++]=(Jt(A)-1)*h,h=1;break;case 64:Qt()===45&&(A+=Rs(Tt())),g=Qt(),u=p=Jt(m=A+=P3(Ds())),y++;break;case 45:b===45&&Jt(A)==2&&(d=0)}}return s}function Wd(e,t,n,r,o,s,i,c,l,a,u){for(var p=o-1,g=o===0?s:[""],E=ja(g),b=0,d=0,f=0;b<r;++b)for(var h=0,y=ho(e,p+1,p=S3(d=i[b])),m=e;h<E;++h)(m=jd(d>0?g[h]+" "+y:Ee(y,/&\f/g,g[h])))&&(l[f++]=m);return Fs(e,t,n,o===0?Pa:c,l,a,u)}function B3(e,t,n){return Fs(e,t,n,Md,Ts(F3()),ho(e,2,-2),0)}function Zd(e,t,n,r){return Fs(e,t,n,Ma,ho(e,0,r),ho(e,r+1,-1),r)}function Ar(e,t){for(var n="",r=ja(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function j3(e,t,n,r){switch(e.type){case A3:if(e.children.length)break;case w3:case Ma:return e.return=e.return||e.value;case Md:return"";case Bd:return e.return=e.value+"{"+Ar(e.children,r)+"}";case Pa:e.value=e.props.join(",")}return Jt(n=Ar(e.children,r))?e.return=e.value+"{"+n+"}":""}function V3(e){var t=ja(e);return function(n,r,o,s){for(var i="",c=0;c<t;c++)i+=e[c](n,r,o,s)||"";return i}}function G3(e){return function(t){t.root||(t=t.return)&&e(t)}}function H3(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var W3=function(t,n,r){for(var o=0,s=0;o=s,s=Qt(),o===38&&s===12&&(n[r]=1),!bo(s);)Tt();return mo(t,gt)},Z3=function(t,n){var r=-1,o=44;do switch(bo(o)){case 0:o===38&&Qt()===12&&(n[r]=1),t[r]+=W3(gt-1,n,r);break;case 2:t[r]+=Rs(o);break;case 4:if(o===44){t[++r]=Qt()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ts(o)}while(o=Tt());return t},X3=function(t,n){return Hd(Z3(Gd(t),n))},Xd=new WeakMap,z3=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&&!Xd.get(r))&&!o){Xd.set(t,!0);for(var s=[],i=X3(n,s),c=r.props,l=0,a=0;l<i.length;l++)for(var u=0;u<c.length;u++,a++)t.props[a]=s[l]?i[l].replace(/&\f/g,c[u]):c[u]+" "+i[l]}}},Y3=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function zd(e,t){switch(T3(e,t)){case 5103:return Ie+"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 Ie+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ie+e+_s+e+nt+e+e;case 6828:case 4268:return Ie+e+nt+e+e;case 6165:return Ie+e+nt+"flex-"+e+e;case 5187:return Ie+e+Ee(e,/(\w+).+(:[^]+)/,Ie+"box-$1$2"+nt+"flex-$1$2")+e;case 5443:return Ie+e+nt+"flex-item-"+Ee(e,/flex-|-self/,"")+e;case 4675:return Ie+e+nt+"flex-line-pack"+Ee(e,/align-content|flex-|-self/,"")+e;case 5548:return Ie+e+nt+Ee(e,"shrink","negative")+e;case 5292:return Ie+e+nt+Ee(e,"basis","preferred-size")+e;case 6060:return Ie+"box-"+Ee(e,"-grow","")+Ie+e+nt+Ee(e,"grow","positive")+e;case 4554:return Ie+Ee(e,/([^-])(transform)/g,"$1"+Ie+"$2")+e;case 6187:return Ee(Ee(Ee(e,/(zoom-|grab)/,Ie+"$1"),/(image-set)/,Ie+"$1"),e,"")+e;case 5495:case 3959:return Ee(e,/(image-set\([^]*)/,Ie+"$1$`$1");case 4968:return Ee(Ee(e,/(.+:)(flex-)?(.*)/,Ie+"box-pack:$3"+nt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ie+e+e;case 4095:case 3583:case 4068:case 2532:return Ee(e,/(.+)-inline(.+)/,Ie+"$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(Jt(e)-1-t>6)switch(Ke(e,t+1)){case 109:if(Ke(e,t+4)!==45)break;case 102:return Ee(e,/(.+:)(.+)-([^]+)/,"$1"+Ie+"$2-$3$1"+_s+(Ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ba(e,"stretch")?zd(Ee(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ke(e,t+1)!==115)break;case 6444:switch(Ke(e,Jt(e)-3-(~Ba(e,"!important")&&10))){case 107:return Ee(e,":",":"+Ie)+e;case 101:return Ee(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ie+(Ke(e,14)===45?"inline-":"")+"box$3$1"+Ie+"$2$3$1"+nt+"$2box$3")+e}break;case 5936:switch(Ke(e,t+11)){case 114:return Ie+e+nt+Ee(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ie+e+nt+Ee(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ie+e+nt+Ee(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ie+e+nt+e+e}return e}var J3=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Ma:t.return=zd(t.value,t.length);break;case Bd:return Ar([go(t,{value:Ee(t.value,"@","@"+Ie)})],o);case Pa:if(t.length)return L3(t.props,function(s){switch(O3(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ar([go(t,{props:[Ee(s,/:(read-\w+)/,":"+_s+"$1")]})],o);case"::placeholder":return Ar([go(t,{props:[Ee(s,/:(plac\w+)/,":"+Ie+"input-$1")]}),go(t,{props:[Ee(s,/:(plac\w+)/,":"+_s+"$1")]}),go(t,{props:[Ee(s,/:(plac\w+)/,nt+"input-$1")]})],o)}return""})}},Q3=[J3],$3=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(d){var f=d.getAttribute("data-emotion");f.indexOf(" ")!==-1&&(document.head.appendChild(d),d.setAttribute("data-s",""))})}var o=t.stylisPlugins||Q3,s={},i,c=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(d){for(var f=d.getAttribute("data-emotion").split(" "),h=1;h<f.length;h++)s[f[h]]=!0;c.push(d)});var l,a=[z3,Y3];{var u,p=[j3,G3(function(d){u.insert(d)})],g=V3(a.concat(o,p)),E=function(f){return Ar(M3(f),g)};l=function(f,h,y,m){u=y,E(f?f+"{"+h.styles+"}":h.styles),m&&(b.inserted[h.name]=!0)}}var b={key:n,sheet:new x3({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:l};return b.sheet.hydrate(c),b},Ga={exports:{}},we={};/** @license React v16.13.1
|
|
595
|
+
`,_v=(e,{closeToast:t})=>C.jsx(Sv,{children:C.jsx("img",{src:Ev,onClick:t})}),Ss=({message:e})=>C.jsxs(xv,{children:[C.jsx(Av,{}),C.jsx(wv,{children:e})]});function Be(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:C.jsx(_v,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=we.success(C.jsx(Ss,{message:t}),{...o,icon:!1});break}case"error":{s=we.error(C.jsx(Ss,{message:t}),{...o,icon:!1});break}case"info-dark":{s=we.info(C.jsx(Ss,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=we.info(C.jsx(Ss,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Tv(s)},r&&!isNaN(r)?Number(r):5e3),s}function Tv(e){we.dismiss(e)}const wd={updateFormApiStatus:U.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:U.IDLE,unlinkCardApiStatus:U.IDLE,linkCardApiStatus:U.IDLE,optionsMap:null,dropdownOptionsApis:U.IDLE,dependentFieldsMap:{},createFormApiStatus:U.IDLE,currentResourceDetailsApiStatus:U.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},Ov="/v1/api"+"/templates/metadata",Lv={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},Fv=async e=>{const t=new URLSearchParams,{inboxIds:n,channelType:r,conversationId:o,fetchAuthenticatedConnectors:s}=e||{};return n==null||n.forEach(c=>{t.append("inbox_ids",c)}),[["channel_type",r],["conversation_id",o],["fetch_authenticated_connectors",s==null?void 0:s.toString()]].forEach(([c,l])=>{l!==void 0&&t.append(c,l)}),qe({url:`${Ov}?${t.toString()}`,method:Lv.GET})};let vr={};const Dv={get length(){return Object.keys(vr).length},getItem(e){return vr[e]??null},setItem(e,t){vr[e]=t},removeItem(e){delete vr[e]},clear(){vr={}},key(e){return Object.keys(vr)[e]}},Rv={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},kv=(e="LOCAL")=>Rv[e]??Dv,Nv=(e="LOCAL")=>{const t=kv(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 Fa=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(Fa||{});const Pv={[Fa.ADD]:(e,t)=>e+t,[Fa.MULTIPLY]:(e,t)=>e*t},Mv=e=>e,Ad=()=>{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}`},Sd=(e,t)=>{let n;const r=Pv[t]??Mv;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},_d=(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},Bv="Required Field",jv="Invalid date",Td=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Vv=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Gv="https://avatars.githubusercontent.com/u/62397590",Od="Please enter a valid URL",Hv="Please enter valid ID",Wv="Please enter valid input",Zv="URL must start with https://",Xv="URL should not end with a slash",zv="Invalid email address",Yv="Email must be a string",Ld="Invalid date",Jv="Date cannot be in the past",Qv="Date cannot be in the future",$v="Invalid number",qv="Invalid text",Uv=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?Xv:Td.test(n)?!0:e||Od:Zv}return!1},Kv=e=>t=>t&&typeof t=="string"?Vv.test(t)?!0:e||zv:Yv,e3=e=>t=>t==null||t===""?e||Bv:!0,t3=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===jv)return Ld;if(typeof t=="object"){const o=t,s=new Date;s.setHours(0,0,0,0);const i=n.disablePast,c=n.disableFuture;return i&&o<s?e||Jv:c&&o>s?e||Qv:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:Ld},n3=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||$v},r3=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||qv},o3=e=>t=>typeof t=="string"?t.startsWith("https:")?Td.test(t)?!0:e||Od:t.trim().length>0?!0:e||Hv:e||Wv;function zn(e){"@babel/helpers - typeof";return zn=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},zn(e)}function s3(e,t){if(zn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fd(e){var t=s3(e,"string");return zn(t)=="symbol"?t:t+""}function Cr(e,t,n){return(t=Fd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dd(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 ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dd(Object(n),!0).forEach(function(r){Cr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i3(e){if(Array.isArray(e))return e}function a3(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,i,c=[],l=!0,a=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(u){a=!0,o=u}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(a)throw o}}return c}}function Da(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 Rd(e,t){if(e){if(typeof e=="string")return Da(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)?Da(e,t):void 0}}function c3(){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 Qe(e,t){return i3(e)||a3(e,t)||Rd(e,t)||c3()}function l3(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 Vt(e,t){if(e==null)return{};var n,r,o=l3(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 u3=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ra(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,i=s===void 0?null:s,c=e.inputValue,l=e.menuIsOpen,a=e.onChange,u=e.onInputChange,p=e.onMenuClose,g=e.onMenuOpen,E=e.value,b=Vt(e,u3),d=_.useState(c!==void 0?c:n),f=Qe(d,2),h=f[0],y=f[1],m=_.useState(l!==void 0?l:o),x=Qe(m,2),I=x[0],w=x[1],A=_.useState(E!==void 0?E:i),S=Qe(A,2),O=S[0],R=S[1],D=_.useCallback(function(Y,K){typeof a=="function"&&a(Y,K),R(Y)},[a]),F=_.useCallback(function(Y,K){var ce;typeof u=="function"&&(ce=u(Y,K)),y(ce!==void 0?ce:Y)},[u]),P=_.useCallback(function(){typeof g=="function"&&g(),w(!0)},[g]),j=_.useCallback(function(){typeof p=="function"&&p(),w(!1)},[p]),X=c!==void 0?c:h,z=l!==void 0?l:I,q=E!==void 0?E:O;return ne(ne({},b),{},{inputValue:X,menuIsOpen:z,onChange:D,onInputChange:F,onMenuClose:j,onMenuOpen:P,value:q})}function ae(){return ae=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},ae.apply(null,arguments)}function d3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kd(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,Fd(r.key),r)}}function f3(e,t,n){return t&&kd(e.prototype,t),n&&kd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ka(e,t)}function p3(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&&ka(e,t)}function _s(e){return _s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_s(e)}function Nd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nd=function(){return!!e})()}function h3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g3(e,t){if(t&&(zn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h3(e)}function m3(e){var t=Nd();return function(){var n,r=_s(e);if(t){var o=_s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g3(this,n)}}function b3(e){if(Array.isArray(e))return Da(e)}function y3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function v3(){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 Ir(e){return b3(e)||y3(e)||Rd(e)||v3()}var C3=!1;function I3(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 E3(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 x3=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?!C3: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(E3(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=I3(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}(),tt="-ms-",Ts="-moz-",Ee="-webkit-",Pd="comm",Na="rule",Pa="decl",w3="@import",Md="@keyframes",A3="@layer",S3=Math.abs,Os=String.fromCharCode,_3=Object.assign;function T3(e,t){return Ke(e,0)^45?(((t<<2^Ke(e,0))<<2^Ke(e,1))<<2^Ke(e,2))<<2^Ke(e,3):0}function Bd(e){return e.trim()}function O3(e,t){return(e=t.exec(e))?e[0]:e}function xe(e,t,n){return e.replace(t,n)}function Ma(e,t){return e.indexOf(t)}function Ke(e,t){return e.charCodeAt(t)|0}function bo(e,t,n){return e.slice(t,n)}function Yt(e){return e.length}function Ba(e){return e.length}function Ls(e,t){return t.push(e),e}function L3(e,t){return e.map(t).join("")}var Fs=1,Er=1,jd=0,mt=0,Xe=0,xr="";function Ds(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Fs,column:Er,length:i,return:""}}function yo(e,t){return _3(Ds("",null,null,"",null,null,0),e,{length:-e.length},t)}function F3(){return Xe}function D3(){return Xe=mt>0?Ke(xr,--mt):0,Er--,Xe===10&&(Er=1,Fs--),Xe}function _t(){return Xe=mt<jd?Ke(xr,mt++):0,Er++,Xe===10&&(Er=1,Fs++),Xe}function Jt(){return Ke(xr,mt)}function Rs(){return mt}function vo(e,t){return bo(xr,e,t)}function Co(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 Vd(e){return Fs=Er=1,jd=Yt(xr=e),mt=0,[]}function Gd(e){return xr="",e}function ks(e){return Bd(vo(mt-1,ja(e===91?e+2:e===40?e+1:e)))}function R3(e){for(;(Xe=Jt())&&Xe<33;)_t();return Co(e)>2||Co(Xe)>3?"":" "}function k3(e,t){for(;--t&&_t()&&!(Xe<48||Xe>102||Xe>57&&Xe<65||Xe>70&&Xe<97););return vo(e,Rs()+(t<6&&Jt()==32&&_t()==32))}function ja(e){for(;_t();)switch(Xe){case e:return mt;case 34:case 39:e!==34&&e!==39&&ja(Xe);break;case 40:e===41&&ja(e);break;case 92:_t();break}return mt}function N3(e,t){for(;_t()&&e+Xe!==57;)if(e+Xe===84&&Jt()===47)break;return"/*"+vo(t,mt-1)+"*"+Os(e===47?e:_t())}function P3(e){for(;!Co(Jt());)_t();return vo(e,mt)}function M3(e){return Gd(Ns("",null,null,null,[""],e=Vd(e),0,[0],e))}function Ns(e,t,n,r,o,s,i,c,l){for(var a=0,u=0,p=i,g=0,E=0,b=0,d=1,f=1,h=1,y=0,m="",x=o,I=s,w=r,A=m;f;)switch(b=y,y=_t()){case 40:if(b!=108&&Ke(A,p-1)==58){Ma(A+=xe(ks(y),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:A+=ks(y);break;case 9:case 10:case 13:case 32:A+=R3(b);break;case 92:A+=k3(Rs()-1,7);continue;case 47:switch(Jt()){case 42:case 47:Ls(B3(N3(_t(),Rs()),t,n),l);break;default:A+="/"}break;case 123*d:c[a++]=Yt(A)*h;case 125*d:case 59:case 0:switch(y){case 0:case 125:f=0;case 59+u:h==-1&&(A=xe(A,/\f/g,"")),E>0&&Yt(A)-p&&Ls(E>32?Wd(A+";",r,n,p-1):Wd(xe(A," ","")+";",r,n,p-2),l);break;case 59:A+=";";default:if(Ls(w=Hd(A,t,n,a,u,o,c,m,x=[],I=[],p),s),y===123)if(u===0)Ns(A,t,w,w,x,s,p,c,I);else switch(g===99&&Ke(A,3)===110?100:g){case 100:case 108:case 109:case 115:Ns(e,w,w,r&&Ls(Hd(e,w,w,0,0,o,c,m,o,x=[],p),I),o,I,p,c,r?x:I);break;default:Ns(A,w,w,w,[""],I,0,c,I)}}a=u=E=0,d=h=1,m=A="",p=i;break;case 58:p=1+Yt(A),E=b;default:if(d<1){if(y==123)--d;else if(y==125&&d++==0&&D3()==125)continue}switch(A+=Os(y),y*d){case 38:h=u>0?1:(A+="\f",-1);break;case 44:c[a++]=(Yt(A)-1)*h,h=1;break;case 64:Jt()===45&&(A+=ks(_t())),g=Jt(),u=p=Yt(m=A+=P3(Rs())),y++;break;case 45:b===45&&Yt(A)==2&&(d=0)}}return s}function Hd(e,t,n,r,o,s,i,c,l,a,u){for(var p=o-1,g=o===0?s:[""],E=Ba(g),b=0,d=0,f=0;b<r;++b)for(var h=0,y=bo(e,p+1,p=S3(d=i[b])),m=e;h<E;++h)(m=Bd(d>0?g[h]+" "+y:xe(y,/&\f/g,g[h])))&&(l[f++]=m);return Ds(e,t,n,o===0?Na:c,l,a,u)}function B3(e,t,n){return Ds(e,t,n,Pd,Os(F3()),bo(e,2,-2),0)}function Wd(e,t,n,r){return Ds(e,t,n,Pa,bo(e,0,r),bo(e,r+1,-1),r)}function wr(e,t){for(var n="",r=Ba(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function j3(e,t,n,r){switch(e.type){case A3:if(e.children.length)break;case w3:case Pa:return e.return=e.return||e.value;case Pd:return"";case Md:return e.return=e.value+"{"+wr(e.children,r)+"}";case Na:e.value=e.props.join(",")}return Yt(n=wr(e.children,r))?e.return=e.value+"{"+n+"}":""}function V3(e){var t=Ba(e);return function(n,r,o,s){for(var i="",c=0;c<t;c++)i+=e[c](n,r,o,s)||"";return i}}function G3(e){return function(t){t.root||(t=t.return)&&e(t)}}function H3(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var W3=function(t,n,r){for(var o=0,s=0;o=s,s=Jt(),o===38&&s===12&&(n[r]=1),!Co(s);)_t();return vo(t,mt)},Z3=function(t,n){var r=-1,o=44;do switch(Co(o)){case 0:o===38&&Jt()===12&&(n[r]=1),t[r]+=W3(mt-1,n,r);break;case 2:t[r]+=ks(o);break;case 4:if(o===44){t[++r]=Jt()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Os(o)}while(o=_t());return t},X3=function(t,n){return Gd(Z3(Vd(t),n))},Zd=new WeakMap,z3=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&&!Zd.get(r))&&!o){Zd.set(t,!0);for(var s=[],i=X3(n,s),c=r.props,l=0,a=0;l<i.length;l++)for(var u=0;u<c.length;u++,a++)t.props[a]=s[l]?i[l].replace(/&\f/g,c[u]):c[u]+" "+i[l]}}},Y3=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Xd(e,t){switch(T3(e,t)){case 5103:return Ee+"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 Ee+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ee+e+Ts+e+tt+e+e;case 6828:case 4268:return Ee+e+tt+e+e;case 6165:return Ee+e+tt+"flex-"+e+e;case 5187:return Ee+e+xe(e,/(\w+).+(:[^]+)/,Ee+"box-$1$2"+tt+"flex-$1$2")+e;case 5443:return Ee+e+tt+"flex-item-"+xe(e,/flex-|-self/,"")+e;case 4675:return Ee+e+tt+"flex-line-pack"+xe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ee+e+tt+xe(e,"shrink","negative")+e;case 5292:return Ee+e+tt+xe(e,"basis","preferred-size")+e;case 6060:return Ee+"box-"+xe(e,"-grow","")+Ee+e+tt+xe(e,"grow","positive")+e;case 4554:return Ee+xe(e,/([^-])(transform)/g,"$1"+Ee+"$2")+e;case 6187:return xe(xe(xe(e,/(zoom-|grab)/,Ee+"$1"),/(image-set)/,Ee+"$1"),e,"")+e;case 5495:case 3959:return xe(e,/(image-set\([^]*)/,Ee+"$1$`$1");case 4968:return xe(xe(e,/(.+:)(flex-)?(.*)/,Ee+"box-pack:$3"+tt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ee+e+e;case 4095:case 3583:case 4068:case 2532:return xe(e,/(.+)-inline(.+)/,Ee+"$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(Yt(e)-1-t>6)switch(Ke(e,t+1)){case 109:if(Ke(e,t+4)!==45)break;case 102:return xe(e,/(.+:)(.+)-([^]+)/,"$1"+Ee+"$2-$3$1"+Ts+(Ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ma(e,"stretch")?Xd(xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ke(e,t+1)!==115)break;case 6444:switch(Ke(e,Yt(e)-3-(~Ma(e,"!important")&&10))){case 107:return xe(e,":",":"+Ee)+e;case 101:return xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ee+(Ke(e,14)===45?"inline-":"")+"box$3$1"+Ee+"$2$3$1"+tt+"$2box$3")+e}break;case 5936:switch(Ke(e,t+11)){case 114:return Ee+e+tt+xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ee+e+tt+xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ee+e+tt+xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ee+e+tt+e+e}return e}var J3=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Pa:t.return=Xd(t.value,t.length);break;case Md:return wr([yo(t,{value:xe(t.value,"@","@"+Ee)})],o);case Na:if(t.length)return L3(t.props,function(s){switch(O3(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return wr([yo(t,{props:[xe(s,/:(read-\w+)/,":"+Ts+"$1")]})],o);case"::placeholder":return wr([yo(t,{props:[xe(s,/:(plac\w+)/,":"+Ee+"input-$1")]}),yo(t,{props:[xe(s,/:(plac\w+)/,":"+Ts+"$1")]}),yo(t,{props:[xe(s,/:(plac\w+)/,tt+"input-$1")]})],o)}return""})}},Q3=[J3],$3=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(d){var f=d.getAttribute("data-emotion");f.indexOf(" ")!==-1&&(document.head.appendChild(d),d.setAttribute("data-s",""))})}var o=t.stylisPlugins||Q3,s={},i,c=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(d){for(var f=d.getAttribute("data-emotion").split(" "),h=1;h<f.length;h++)s[f[h]]=!0;c.push(d)});var l,a=[z3,Y3];{var u,p=[j3,G3(function(d){u.insert(d)})],g=V3(a.concat(o,p)),E=function(f){return wr(M3(f),g)};l=function(f,h,y,m){u=y,E(f?f+"{"+h.styles+"}":h.styles),m&&(b.inserted[h.name]=!0)}}var b={key:n,sheet:new x3({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:l};return b.sheet.hydrate(c),b},Va={exports:{}},Ae={};/** @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
|
|
604
|
+
*/var zd;function q3(){if(zd)return Ae;zd=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,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,a=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function m(I){if(typeof I=="object"&&I!==null){var w=I.$$typeof;switch(w){case t:switch(I=I.type,I){case l:case a:case r:case s:case o:case p:return I;default:switch(I=I&&I.$$typeof,I){case c:case u:case b:case E:case i:return I;default:return w}}case n:return w}}}function x(I){return m(I)===a}return Ae.AsyncMode=l,Ae.ConcurrentMode=a,Ae.ContextConsumer=c,Ae.ContextProvider=i,Ae.Element=t,Ae.ForwardRef=u,Ae.Fragment=r,Ae.Lazy=b,Ae.Memo=E,Ae.Portal=n,Ae.Profiler=s,Ae.StrictMode=o,Ae.Suspense=p,Ae.isAsyncMode=function(I){return x(I)||m(I)===l},Ae.isConcurrentMode=x,Ae.isContextConsumer=function(I){return m(I)===c},Ae.isContextProvider=function(I){return m(I)===i},Ae.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},Ae.isForwardRef=function(I){return m(I)===u},Ae.isFragment=function(I){return m(I)===r},Ae.isLazy=function(I){return m(I)===b},Ae.isMemo=function(I){return m(I)===E},Ae.isPortal=function(I){return m(I)===n},Ae.isProfiler=function(I){return m(I)===s},Ae.isStrictMode=function(I){return m(I)===o},Ae.isSuspense=function(I){return m(I)===p},Ae.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===r||I===a||I===s||I===o||I===p||I===g||typeof I=="object"&&I!==null&&(I.$$typeof===b||I.$$typeof===E||I.$$typeof===i||I.$$typeof===c||I.$$typeof===u||I.$$typeof===f||I.$$typeof===h||I.$$typeof===y||I.$$typeof===d)},Ae.typeOf=m,Ae}var Se={};/** @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 Jd;function U3(){return Jd||(Jd=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,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,a=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function m(W){return typeof W=="string"||typeof W=="function"||W===r||W===a||W===s||W===o||W===p||W===g||typeof W=="object"&&W!==null&&(W.$$typeof===b||W.$$typeof===E||W.$$typeof===i||W.$$typeof===c||W.$$typeof===u||W.$$typeof===f||W.$$typeof===h||W.$$typeof===y||W.$$typeof===d)}function x(W){if(typeof W=="object"&&W!==null){var Ne=W.$$typeof;switch(Ne){case t:var Re=W.type;switch(Re){case l:case a:case r:case s:case o:case p:return Re;default:var Ye=Re&&Re.$$typeof;switch(Ye){case c:case u:case b:case E:case i:return Ye;default:return Ne}}case n:return Ne}}}var I=l,w=a,A=c,S=i,T=t,R=u,D=r,F=b,P=E,j=n,X=s,Y=o,q=p,J=!1;function z(W){return J||(J=!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.")),ae(W)||x(W)===l}function ae(W){return x(W)===a}function le(W){return x(W)===c}function B(W){return x(W)===i}function H(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function V(W){return x(W)===u}function Z(W){return x(W)===r}function U(W){return x(W)===b}function ee(W){return x(W)===E}function re(W){return x(W)===n}function M(W){return x(W)===s}function te(W){return x(W)===o}function ye(W){return x(W)===p}Ae.AsyncMode=I,Ae.ConcurrentMode=w,Ae.ContextConsumer=A,Ae.ContextProvider=S,Ae.Element=T,Ae.ForwardRef=R,Ae.Fragment=D,Ae.Lazy=F,Ae.Memo=P,Ae.Portal=j,Ae.Profiler=X,Ae.StrictMode=Y,Ae.Suspense=q,Ae.isAsyncMode=z,Ae.isConcurrentMode=ae,Ae.isContextConsumer=le,Ae.isContextProvider=B,Ae.isElement=H,Ae.isForwardRef=V,Ae.isFragment=Z,Ae.isLazy=U,Ae.isMemo=ee,Ae.isPortal=re,Ae.isProfiler=M,Ae.isStrictMode=te,Ae.isSuspense=ye,Ae.isValidElementType=m,Ae.typeOf=x}()),Ae}process.env.NODE_ENV==="production"?Ga.exports=q3():Ga.exports=U3();var K3=Ga.exports,Qd=K3,eC={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},tC={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$d={};$d[Qd.ForwardRef]=eC,$d[Qd.Memo]=tC;var nC=!0;function rC(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var qd=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||nC===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},oC=function(t,n,r){qd(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 sC(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 iC={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},aC=!1,cC=/[A-Z]|^ms/g,lC=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ud=function(t){return t.charCodeAt(1)===45},Kd=function(t){return t!=null&&typeof t!="boolean"},Ha=H3(function(e){return Ud(e)?e:e.replace(cC,"-$&").toLowerCase()}),ef=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(lC,function(r,o,s){return $t={name:o,styles:s,next:$t},o})}return iC[t]!==1&&!Ud(t)&&typeof n=="number"&&n!==0?n+"px":n},uC="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function yo(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 $t={name:o.name,styles:o.styles,next:$t},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)$t={name:i.name,styles:i.styles,next:$t},i=i.next;var c=s.styles+";";return c}return dC(e,t,n)}case"function":{if(e!==void 0){var l=$t,a=n(e);return $t=l,yo(e,t,a)}break}}var u=n;return u}function dC(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=yo(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object"){var c=i;Kd(c)&&(r+=Ha(s)+":"+ef(s,c)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&aC)throw new Error(uC);if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var l=0;l<i.length;l++)Kd(i[l])&&(r+=Ha(s)+":"+ef(s,i[l])+";");else{var a=yo(e,t,i);switch(s){case"animation":case"animationName":{r+=Ha(s)+":"+a+";";break}default:r+=s+"{"+a+"}"}}}}return r}var tf=/label:\s*([^\s;{]+)\s*(;|$)/g,$t;function nf(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="";$t=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=yo(n,t,s);else{var i=s;o+=i[0]}for(var c=1;c<e.length;c++)if(o+=yo(n,t,e[c]),r){var l=s;o+=l[c]}tf.lastIndex=0;for(var a="",u;(u=tf.exec(o))!==null;)a+="-"+u[1];var p=sC(o)+a;return{name:p,styles:o,next:$t}}var fC=function(t){return t()},pC=k.useInsertionEffect?k.useInsertionEffect:!1,hC=pC||fC,gC=!1,rf=k.createContext(typeof HTMLElement<"u"?$3({key:"css"}):null);rf.Provider;var mC=function(t){return _.forwardRef(function(n,r){var o=_.useContext(rf);return t(n,o,r)})},bC=k.createContext({}),Wa={}.hasOwnProperty,Za="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yC=function(t,n){var r={};for(var o in n)Wa.call(n,o)&&(r[o]=n[o]);return r[Za]=t,r},vC=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return qd(n,r,o),hC(function(){return oC(n,r,o)}),null},CC=mC(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Za],s=[r],i="";typeof e.className=="string"?i=rC(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var c=nf(s,void 0,k.useContext(bC));i+=t.key+"-"+c.name;var l={};for(var a in e)Wa.call(e,a)&&a!=="css"&&a!==Za&&!gC&&(l[a]=e[a]);return l.className=i,n&&(l.ref=n),k.createElement(k.Fragment,null,k.createElement(vC,{cache:t,serialized:c,isStringTag:typeof o=="string"}),k.createElement(o,l))}),IC=CC,oe=function(t,n){var r=arguments;if(n==null||!Wa.call(n,"css"))return k.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=IC,s[1]=yC(t,n);for(var i=2;i<o;i++)s[i]=r[i];return k.createElement.apply(null,s)};function Xa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return nf(t)}var EC=function(){var t=Xa.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 xC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const wC=Math.min,AC=Math.max,Ns=Math.round,Ps=Math.floor,Ms=e=>({x:e,y:e});function SC(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 Bs(){return typeof window<"u"}function of(e){return af(e)?(e.nodeName||"").toLowerCase():"#document"}function sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sf(e){var t;return(t=(af(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function af(e){return Bs()?e instanceof Node||e instanceof sn(e).Node:!1}function _C(e){return Bs()?e instanceof Element||e instanceof sn(e).Element:!1}function za(e){return Bs()?e instanceof HTMLElement||e instanceof sn(e).HTMLElement:!1}function cf(e){return!Bs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sn(e).ShadowRoot}function lf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ya(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function TC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function OC(e){return["html","body","#document"].includes(of(e))}function Ya(e){return sn(e).getComputedStyle(e)}function LC(e){if(of(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cf(e)&&e.host||sf(e);return cf(t)?t.host:t}function uf(e){const t=LC(e);return OC(t)?e.ownerDocument?e.ownerDocument.body:e.body:za(t)&&lf(t)?t:uf(t)}function js(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=uf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=sn(o);if(s){const c=Ja(i);return t.concat(i,i.visualViewport||[],lf(o)?o:[],c&&n?js(c):[])}return t.concat(o,js(o,[],n))}function Ja(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FC(e){const t=Ya(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=za(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Ns(n)!==s||Ns(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function Qa(e){return _C(e)?e:e.contextElement}function df(e){const t=Qa(e);if(!za(t))return Ms(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=FC(t);let i=(s?Ns(n.width):n.width)/r,c=(s?Ns(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const DC=Ms(0);function RC(e){const t=sn(e);return!TC()||!t.visualViewport?DC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kC(e,t,n){return!1}function ff(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Qa(e);let i=Ms(1);t&&(i=df(e));const c=kC()?RC(s):Ms(0);let l=(o.left+c.x)/i.x,a=(o.top+c.y)/i.y,u=o.width/i.x,p=o.height/i.y;if(s){const g=sn(s),E=r;let b=g,d=Ja(b);for(;d&&r&&E!==b;){const f=df(d),h=d.getBoundingClientRect(),y=Ya(d),m=h.left+(d.clientLeft+parseFloat(y.paddingLeft))*f.x,x=h.top+(d.clientTop+parseFloat(y.paddingTop))*f.y;l*=f.x,a*=f.y,u*=f.x,p*=f.y,l+=m,a+=x,b=sn(d),d=Ja(b)}}return SC({width:u,height:p,x:l,y:a})}function NC(e,t){let n=null,r;const o=sf(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:a,top:u,width:p,height:g}=e.getBoundingClientRect();if(c||t(),!p||!g)return;const E=Ps(u),b=Ps(o.clientWidth-(a+p)),d=Ps(o.clientHeight-(u+g)),f=Ps(a),y={rootMargin:-E+"px "+-b+"px "+-d+"px "+-f+"px",threshold:AC(0,wC(1,l))||1};let m=!0;function x(I){const w=I[0].intersectionRatio;if(w!==l){if(!m)return i();w?i(!1,w):r=setTimeout(()=>{i(!1,1e-7)},1e3)}m=!1}try{n=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return i(!0),s}function PC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,a=Qa(e),u=o||s?[...a?js(a):[],...js(t)]:[];u.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const p=a&&c?NC(a,n):null;let g=-1,E=null;i&&(E=new ResizeObserver(h=>{let[y]=h;y&&y.target===a&&E&&(E.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var m;(m=E)==null||m.observe(t)})),n()}),a&&!l&&E.observe(a),E.observe(t));let b,d=l?ff(e):null;l&&f();function f(){const h=ff(e);d&&(h.x!==d.x||h.y!==d.y||h.width!==d.width||h.height!==d.height)&&n(),d=h,b=requestAnimationFrame(f)}return n(),()=>{var h;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),p==null||p(),(h=E)==null||h.disconnect(),E=null,l&&cancelAnimationFrame(b)}}var $a=_.useLayoutEffect,MC=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Vs=function(){};function BC(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function jC(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 i in t)t.hasOwnProperty(i)&&t[i]&&s.push("".concat(BC(e,i)));return s.filter(function(c){return c}).map(function(c){return String(c).trim()}).join(" ")}var Gs=function(t){return QC(t)?t.filter(Boolean):Xn(t)==="object"&&t!==null?[t]:[]},pf=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=Gt(t,MC);return ne({},n)},Be=function(t,n,r){var o=t.cx,s=t.getStyles,i=t.getClassNames,c=t.className;return{css:s(n,t),className:o(r??{},i(n,t),c)}};function VC(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function Hs(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function GC(e){return Hs(e)?window.innerHeight:e.clientHeight}function hf(e){return Hs(e)?window.pageYOffset:e.scrollTop}function Ws(e,t){if(Hs(e)){window.scrollTo(0,t);return}e.scrollTop=t}function HC(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 WC(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Zs(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Vs,o=hf(e),s=t-o,i=10,c=0;function l(){c+=i;var a=WC(c,o,s,n);Ws(e,a),c<n?window.requestAnimationFrame(l):r(e)}l()}function gf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Ws(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Ws(e,Math.max(t.offsetTop-o,0))}function ZC(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 mf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function XC(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var bf=!1,zC={get passive(){return bf=!0}},Xs=typeof window<"u"?window:{};Xs.addEventListener&&Xs.removeEventListener&&(Xs.addEventListener("p",Vs,zC),Xs.removeEventListener("p",Vs,!1));var YC=bf;function JC(e){return e!=null}function QC(e){return Array.isArray(e)}function vo(e,t,n){return e?t:n}function pA(e){return e}function hA(e){return e}var $C=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(i){var c=$e(i,1),l=c[0];return!r.includes(l)});return s.reduce(function(i,c){var l=$e(c,2),a=l[0],u=l[1];return i[a]=u,i},{})},qC=["children","innerProps"],UC=["children","innerProps"];function KC(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,c=e.controlHeight,l=HC(n),a={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return a;var u=l.getBoundingClientRect(),p=u.height,g=n.getBoundingClientRect(),E=g.bottom,b=g.height,d=g.top,f=n.offsetParent.getBoundingClientRect(),h=f.top,y=i?window.innerHeight:GC(l),m=hf(l),x=parseInt(getComputedStyle(n).marginBottom,10),I=parseInt(getComputedStyle(n).marginTop,10),w=h-I,A=y-d,S=w+m,T=p-m-d,R=E-y+m+x,D=m+d-I,F=160;switch(o){case"auto":case"bottom":if(A>=b)return{placement:"bottom",maxHeight:t};if(T>=b&&!i)return s&&Zs(l,R,F),{placement:"bottom",maxHeight:t};if(!i&&T>=r||i&&A>=r){s&&Zs(l,R,F);var P=i?A-x:T-x;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var j=t,X=i?w:S;return X>=r&&(j=Math.min(X-x-c,t)),{placement:"top",maxHeight:j}}if(o==="bottom")return s&&Ws(l,R),{placement:"bottom",maxHeight:t};break;case"top":if(w>=b)return{placement:"top",maxHeight:t};if(S>=b&&!i)return s&&Zs(l,D,F),{placement:"top",maxHeight:t};if(!i&&S>=r||i&&w>=r){var Y=t;return(!i&&S>=r||i&&w>=r)&&(Y=i?w-I:S-I),s&&Zs(l,D,F),{placement:"top",maxHeight:Y}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return a}function eI(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var yf=function(t){return t==="auto"?"bottom":t},tI=function(t,n){var r,o=t.placement,s=t.theme,i=s.borderRadius,c=s.spacing,l=s.colors;return ne((r={label:"menu"},Ir(r,eI(o),"100%"),Ir(r,"position","absolute"),Ir(r,"width","100%"),Ir(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:c.menuGutter,marginTop:c.menuGutter})},vf=_.createContext(null),nI=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,i=t.menuPosition,c=t.menuShouldScrollIntoView,l=t.theme,a=_.useContext(vf)||{},u=a.setPortalPlacement,p=_.useRef(null),g=_.useState(o),E=$e(g,2),b=E[0],d=E[1],f=_.useState(null),h=$e(f,2),y=h[0],m=h[1],x=l.spacing.controlHeight;return $a(function(){var I=p.current;if(I){var w=i==="fixed",A=c&&!w,S=KC({maxHeight:o,menuEl:I,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:w,controlHeight:x});d(S.maxHeight),m(S.placement),u==null||u(S.placement)}},[o,s,i,c,r,u,x]),n({ref:p,placerProps:ne(ne({},t),{},{placement:y||yf(s),maxHeight:b})})},rI=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return oe("div",ie({},Be(t,"menu",{menu:!0}),{ref:r},o),n)},oI=rI,sI=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ne({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},iI=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return oe("div",ie({},Be(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Cf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ne({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},aI=Cf,cI=Cf,lI=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Gt(t,qC);return oe("div",ie({},Be(ne(ne({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},uI=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Gt(t,UC);return oe("div",ie({},Be(ne(ne({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},dI=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}},fI=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,i=t.menuPlacement,c=t.menuPosition,l=_.useRef(null),a=_.useRef(null),u=_.useState(yf(i)),p=$e(u,2),g=p[0],E=p[1],b=_.useMemo(function(){return{setPortalPlacement:E}},[]),d=_.useState(null),f=$e(d,2),h=f[0],y=f[1],m=_.useCallback(function(){if(o){var A=ZC(o),S=c==="fixed"?0:window.pageYOffset,T=A[g]+S;(T!==(h==null?void 0:h.offset)||A.left!==(h==null?void 0:h.rect.left)||A.width!==(h==null?void 0:h.rect.width))&&y({offset:T,rect:A})}},[o,c,g,h==null?void 0:h.offset,h==null?void 0:h.rect.left,h==null?void 0:h.rect.width]);$a(function(){m()},[m]);var x=_.useCallback(function(){typeof a.current=="function"&&(a.current(),a.current=null),o&&l.current&&(a.current=PC(o,l.current,m,{elementResize:"ResizeObserver"in window}))},[o,m]);$a(function(){x()},[x]);var I=_.useCallback(function(A){l.current=A,x()},[x]);if(!n&&c!=="fixed"||!h)return null;var w=oe("div",ie({ref:I},Be(ne(ne({},t),{},{offset:h.offset,position:c,rect:h.rect}),"menuPortal",{"menu-portal":!0}),s),r);return oe(vf.Provider,{value:b},n?ke.createPortal(w,n):w)},pI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},hI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return oe("div",ie({},Be(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},gI=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return ne({alignItems:"center",display:o&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},mI=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return oe("div",ie({},Be(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},bI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},yI=function(t){var n=t.children,r=t.innerProps;return oe("div",ie({},Be(t,"indicatorsContainer",{indicators:!0}),r),n)},If,vI=["size"],CI=["innerProps","isRtl","size"];function II(){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 EI=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:II},Ef=function(t){var n=t.size,r=Gt(t,vI);return oe("svg",ie({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:EI},r))},qa=function(t){return oe(Ef,ie({size:20},t),oe("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"}))},xf=function(t){return oe(Ef,ie({size:20},t),oe("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"}))},wf=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return ne({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},xI=wf,wI=function(t){var n=t.children,r=t.innerProps;return oe("div",ie({},Be(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||oe(xf,null))},AI=wf,SI=function(t){var n=t.children,r=t.innerProps;return oe("div",ie({},Be(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||oe(qa,null))},_I=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return ne({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},TI=function(t){var n=t.innerProps;return oe("span",ie({},n,Be(t,"indicatorSeparator",{"indicator-separator":!0})))},OI=EC(If||(If=xC([`
|
|
611
|
+
*/var Yd;function U3(){return Yd||(Yd=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,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,a=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function m(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===a||Z===s||Z===o||Z===p||Z===g||typeof Z=="object"&&Z!==null&&(Z.$$typeof===b||Z.$$typeof===E||Z.$$typeof===i||Z.$$typeof===c||Z.$$typeof===u||Z.$$typeof===f||Z.$$typeof===h||Z.$$typeof===y||Z.$$typeof===d)}function x(Z){if(typeof Z=="object"&&Z!==null){var Ne=Z.$$typeof;switch(Ne){case t:var Le=Z.type;switch(Le){case l:case a:case r:case s:case o:case p:return Le;default:var Je=Le&&Le.$$typeof;switch(Je){case c:case u:case b:case E:case i:return Je;default:return Ne}}case n:return Ne}}}var I=l,w=a,A=c,S=i,O=t,R=u,D=r,F=b,P=E,j=n,X=s,z=o,q=p,Y=!1;function K(Z){return Y||(Y=!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.")),ce(Z)||x(Z)===l}function ce(Z){return x(Z)===a}function ee(Z){return x(Z)===c}function B(Z){return x(Z)===i}function H(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function V(Z){return x(Z)===u}function W(Z){return x(Z)===r}function J(Z){return x(Z)===b}function re(Z){return x(Z)===E}function oe(Z){return x(Z)===n}function M(Z){return x(Z)===s}function te(Z){return x(Z)===o}function be(Z){return x(Z)===p}Se.AsyncMode=I,Se.ConcurrentMode=w,Se.ContextConsumer=A,Se.ContextProvider=S,Se.Element=O,Se.ForwardRef=R,Se.Fragment=D,Se.Lazy=F,Se.Memo=P,Se.Portal=j,Se.Profiler=X,Se.StrictMode=z,Se.Suspense=q,Se.isAsyncMode=K,Se.isConcurrentMode=ce,Se.isContextConsumer=ee,Se.isContextProvider=B,Se.isElement=H,Se.isForwardRef=V,Se.isFragment=W,Se.isLazy=J,Se.isMemo=re,Se.isPortal=oe,Se.isProfiler=M,Se.isStrictMode=te,Se.isSuspense=be,Se.isValidElementType=m,Se.typeOf=x}()),Se}process.env.NODE_ENV==="production"?Va.exports=q3():Va.exports=U3();var K3=Va.exports,Jd=K3,eC={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},tC={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Qd={};Qd[Jd.ForwardRef]=eC,Qd[Jd.Memo]=tC;var nC=!0;function rC(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var $d=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||nC===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},oC=function(t,n,r){$d(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 sC(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 iC={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},aC=!1,cC=/[A-Z]|^ms/g,lC=/_EMO_([^_]+?)_([^]*?)_EMO_/g,qd=function(t){return t.charCodeAt(1)===45},Ud=function(t){return t!=null&&typeof t!="boolean"},Ga=H3(function(e){return qd(e)?e:e.replace(cC,"-$&").toLowerCase()}),Kd=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(lC,function(r,o,s){return Qt={name:o,styles:s,next:Qt},o})}return iC[t]!==1&&!qd(t)&&typeof n=="number"&&n!==0?n+"px":n},uC="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Io(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 Qt={name:o.name,styles:o.styles,next:Qt},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Qt={name:i.name,styles:i.styles,next:Qt},i=i.next;var c=s.styles+";";return c}return dC(e,t,n)}case"function":{if(e!==void 0){var l=Qt,a=n(e);return Qt=l,Io(e,t,a)}break}}var u=n;return u}function dC(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Io(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object"){var c=i;Ud(c)&&(r+=Ga(s)+":"+Kd(s,c)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&aC)throw new Error(uC);if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var l=0;l<i.length;l++)Ud(i[l])&&(r+=Ga(s)+":"+Kd(s,i[l])+";");else{var a=Io(e,t,i);switch(s){case"animation":case"animationName":{r+=Ga(s)+":"+a+";";break}default:r+=s+"{"+a+"}"}}}}return r}var ef=/label:\s*([^\s;{]+)\s*(;|$)/g,Qt;function tf(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="";Qt=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Io(n,t,s);else{var i=s;o+=i[0]}for(var c=1;c<e.length;c++)if(o+=Io(n,t,e[c]),r){var l=s;o+=l[c]}ef.lastIndex=0;for(var a="",u;(u=ef.exec(o))!==null;)a+="-"+u[1];var p=sC(o)+a;return{name:p,styles:o,next:Qt}}var fC=function(t){return t()},pC=k.useInsertionEffect?k.useInsertionEffect:!1,hC=pC||fC,gC=!1,nf=k.createContext(typeof HTMLElement<"u"?$3({key:"css"}):null);nf.Provider;var mC=function(t){return _.forwardRef(function(n,r){var o=_.useContext(nf);return t(n,o,r)})},bC=k.createContext({}),Ha={}.hasOwnProperty,Wa="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yC=function(t,n){var r={};for(var o in n)Ha.call(n,o)&&(r[o]=n[o]);return r[Wa]=t,r},vC=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return $d(n,r,o),hC(function(){return oC(n,r,o)}),null},CC=mC(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Wa],s=[r],i="";typeof e.className=="string"?i=rC(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var c=tf(s,void 0,k.useContext(bC));i+=t.key+"-"+c.name;var l={};for(var a in e)Ha.call(e,a)&&a!=="css"&&a!==Wa&&!gC&&(l[a]=e[a]);return l.className=i,n&&(l.ref=n),k.createElement(k.Fragment,null,k.createElement(vC,{cache:t,serialized:c,isStringTag:typeof o=="string"}),k.createElement(o,l))}),IC=CC,se=function(t,n){var r=arguments;if(n==null||!Ha.call(n,"css"))return k.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=IC,s[1]=yC(t,n);for(var i=2;i<o;i++)s[i]=r[i];return k.createElement.apply(null,s)};function Za(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return tf(t)}var EC=function(){var t=Za.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 xC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const wC=Math.min,AC=Math.max,Ps=Math.round,Ms=Math.floor,Bs=e=>({x:e,y:e});function SC(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 js(){return typeof window<"u"}function rf(e){return sf(e)?(e.nodeName||"").toLowerCase():"#document"}function an(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function of(e){var t;return(t=(sf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sf(e){return js()?e instanceof Node||e instanceof an(e).Node:!1}function _C(e){return js()?e instanceof Element||e instanceof an(e).Element:!1}function Xa(e){return js()?e instanceof HTMLElement||e instanceof an(e).HTMLElement:!1}function af(e){return!js()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof an(e).ShadowRoot}function cf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=za(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function TC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function OC(e){return["html","body","#document"].includes(rf(e))}function za(e){return an(e).getComputedStyle(e)}function LC(e){if(rf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||af(e)&&e.host||of(e);return af(t)?t.host:t}function lf(e){const t=LC(e);return OC(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xa(t)&&cf(t)?t:lf(t)}function Vs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=an(o);if(s){const c=Ya(i);return t.concat(i,i.visualViewport||[],cf(o)?o:[],c&&n?Vs(c):[])}return t.concat(o,Vs(o,[],n))}function Ya(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FC(e){const t=za(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xa(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Ps(n)!==s||Ps(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function Ja(e){return _C(e)?e:e.contextElement}function uf(e){const t=Ja(e);if(!Xa(t))return Bs(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=FC(t);let i=(s?Ps(n.width):n.width)/r,c=(s?Ps(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const DC=Bs(0);function RC(e){const t=an(e);return!TC()||!t.visualViewport?DC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kC(e,t,n){return!1}function df(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Ja(e);let i=Bs(1);t&&(i=uf(e));const c=kC()?RC(s):Bs(0);let l=(o.left+c.x)/i.x,a=(o.top+c.y)/i.y,u=o.width/i.x,p=o.height/i.y;if(s){const g=an(s),E=r;let b=g,d=Ya(b);for(;d&&r&&E!==b;){const f=uf(d),h=d.getBoundingClientRect(),y=za(d),m=h.left+(d.clientLeft+parseFloat(y.paddingLeft))*f.x,x=h.top+(d.clientTop+parseFloat(y.paddingTop))*f.y;l*=f.x,a*=f.y,u*=f.x,p*=f.y,l+=m,a+=x,b=an(d),d=Ya(b)}}return SC({width:u,height:p,x:l,y:a})}function NC(e,t){let n=null,r;const o=of(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:a,top:u,width:p,height:g}=e.getBoundingClientRect();if(c||t(),!p||!g)return;const E=Ms(u),b=Ms(o.clientWidth-(a+p)),d=Ms(o.clientHeight-(u+g)),f=Ms(a),y={rootMargin:-E+"px "+-b+"px "+-d+"px "+-f+"px",threshold:AC(0,wC(1,l))||1};let m=!0;function x(I){const w=I[0].intersectionRatio;if(w!==l){if(!m)return i();w?i(!1,w):r=setTimeout(()=>{i(!1,1e-7)},1e3)}m=!1}try{n=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return i(!0),s}function PC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,a=Ja(e),u=o||s?[...a?Vs(a):[],...Vs(t)]:[];u.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const p=a&&c?NC(a,n):null;let g=-1,E=null;i&&(E=new ResizeObserver(h=>{let[y]=h;y&&y.target===a&&E&&(E.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var m;(m=E)==null||m.observe(t)})),n()}),a&&!l&&E.observe(a),E.observe(t));let b,d=l?df(e):null;l&&f();function f(){const h=df(e);d&&(h.x!==d.x||h.y!==d.y||h.width!==d.width||h.height!==d.height)&&n(),d=h,b=requestAnimationFrame(f)}return n(),()=>{var h;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),p==null||p(),(h=E)==null||h.disconnect(),E=null,l&&cancelAnimationFrame(b)}}var Qa=_.useLayoutEffect,MC=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Gs=function(){};function BC(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function jC(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 i in t)t.hasOwnProperty(i)&&t[i]&&s.push("".concat(BC(e,i)));return s.filter(function(c){return c}).map(function(c){return String(c).trim()}).join(" ")}var Hs=function(t){return QC(t)?t.filter(Boolean):zn(t)==="object"&&t!==null?[t]:[]},ff=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=Vt(t,MC);return ne({},n)},je=function(t,n,r){var o=t.cx,s=t.getStyles,i=t.getClassNames,c=t.className;return{css:s(n,t),className:o(r??{},i(n,t),c)}};function VC(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function Ws(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function GC(e){return Ws(e)?window.innerHeight:e.clientHeight}function pf(e){return Ws(e)?window.pageYOffset:e.scrollTop}function Zs(e,t){if(Ws(e)){window.scrollTo(0,t);return}e.scrollTop=t}function HC(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 WC(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Xs(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Gs,o=pf(e),s=t-o,i=10,c=0;function l(){c+=i;var a=WC(c,o,s,n);Zs(e,a),c<n?window.requestAnimationFrame(l):r(e)}l()}function hf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Zs(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Zs(e,Math.max(t.offsetTop-o,0))}function ZC(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 gf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function XC(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var mf=!1,zC={get passive(){return mf=!0}},zs=typeof window<"u"?window:{};zs.addEventListener&&zs.removeEventListener&&(zs.addEventListener("p",Gs,zC),zs.removeEventListener("p",Gs,!1));var YC=mf;function JC(e){return e!=null}function QC(e){return Array.isArray(e)}function Eo(e,t,n){return e?t:n}function pA(e){return e}function hA(e){return e}var $C=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(i){var c=Qe(i,1),l=c[0];return!r.includes(l)});return s.reduce(function(i,c){var l=Qe(c,2),a=l[0],u=l[1];return i[a]=u,i},{})},qC=["children","innerProps"],UC=["children","innerProps"];function KC(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,c=e.controlHeight,l=HC(n),a={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return a;var u=l.getBoundingClientRect(),p=u.height,g=n.getBoundingClientRect(),E=g.bottom,b=g.height,d=g.top,f=n.offsetParent.getBoundingClientRect(),h=f.top,y=i?window.innerHeight:GC(l),m=pf(l),x=parseInt(getComputedStyle(n).marginBottom,10),I=parseInt(getComputedStyle(n).marginTop,10),w=h-I,A=y-d,S=w+m,O=p-m-d,R=E-y+m+x,D=m+d-I,F=160;switch(o){case"auto":case"bottom":if(A>=b)return{placement:"bottom",maxHeight:t};if(O>=b&&!i)return s&&Xs(l,R,F),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&A>=r){s&&Xs(l,R,F);var P=i?A-x:O-x;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var j=t,X=i?w:S;return X>=r&&(j=Math.min(X-x-c,t)),{placement:"top",maxHeight:j}}if(o==="bottom")return s&&Zs(l,R),{placement:"bottom",maxHeight:t};break;case"top":if(w>=b)return{placement:"top",maxHeight:t};if(S>=b&&!i)return s&&Xs(l,D,F),{placement:"top",maxHeight:t};if(!i&&S>=r||i&&w>=r){var z=t;return(!i&&S>=r||i&&w>=r)&&(z=i?w-I:S-I),s&&Xs(l,D,F),{placement:"top",maxHeight:z}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return a}function eI(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var bf=function(t){return t==="auto"?"bottom":t},tI=function(t,n){var r,o=t.placement,s=t.theme,i=s.borderRadius,c=s.spacing,l=s.colors;return ne((r={label:"menu"},Cr(r,eI(o),"100%"),Cr(r,"position","absolute"),Cr(r,"width","100%"),Cr(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:c.menuGutter,marginTop:c.menuGutter})},yf=_.createContext(null),nI=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,i=t.menuPosition,c=t.menuShouldScrollIntoView,l=t.theme,a=_.useContext(yf)||{},u=a.setPortalPlacement,p=_.useRef(null),g=_.useState(o),E=Qe(g,2),b=E[0],d=E[1],f=_.useState(null),h=Qe(f,2),y=h[0],m=h[1],x=l.spacing.controlHeight;return Qa(function(){var I=p.current;if(I){var w=i==="fixed",A=c&&!w,S=KC({maxHeight:o,menuEl:I,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:w,controlHeight:x});d(S.maxHeight),m(S.placement),u==null||u(S.placement)}},[o,s,i,c,r,u,x]),n({ref:p,placerProps:ne(ne({},t),{},{placement:y||bf(s),maxHeight:b})})},rI=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return se("div",ae({},je(t,"menu",{menu:!0}),{ref:r},o),n)},oI=rI,sI=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ne({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},iI=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return se("div",ae({},je(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},vf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ne({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},aI=vf,cI=vf,lI=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Vt(t,qC);return se("div",ae({},je(ne(ne({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},uI=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Vt(t,UC);return se("div",ae({},je(ne(ne({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},dI=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}},fI=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,i=t.menuPlacement,c=t.menuPosition,l=_.useRef(null),a=_.useRef(null),u=_.useState(bf(i)),p=Qe(u,2),g=p[0],E=p[1],b=_.useMemo(function(){return{setPortalPlacement:E}},[]),d=_.useState(null),f=Qe(d,2),h=f[0],y=f[1],m=_.useCallback(function(){if(o){var A=ZC(o),S=c==="fixed"?0:window.pageYOffset,O=A[g]+S;(O!==(h==null?void 0:h.offset)||A.left!==(h==null?void 0:h.rect.left)||A.width!==(h==null?void 0:h.rect.width))&&y({offset:O,rect:A})}},[o,c,g,h==null?void 0:h.offset,h==null?void 0:h.rect.left,h==null?void 0:h.rect.width]);Qa(function(){m()},[m]);var x=_.useCallback(function(){typeof a.current=="function"&&(a.current(),a.current=null),o&&l.current&&(a.current=PC(o,l.current,m,{elementResize:"ResizeObserver"in window}))},[o,m]);Qa(function(){x()},[x]);var I=_.useCallback(function(A){l.current=A,x()},[x]);if(!n&&c!=="fixed"||!h)return null;var w=se("div",ae({ref:I},je(ne(ne({},t),{},{offset:h.offset,position:c,rect:h.rect}),"menuPortal",{"menu-portal":!0}),s),r);return se(yf.Provider,{value:b},n?ke.createPortal(w,n):w)},pI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},hI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return se("div",ae({},je(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},gI=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return ne({alignItems:"center",display:o&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},mI=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return se("div",ae({},je(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},bI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},yI=function(t){var n=t.children,r=t.innerProps;return se("div",ae({},je(t,"indicatorsContainer",{indicators:!0}),r),n)},Cf,vI=["size"],CI=["innerProps","isRtl","size"];function II(){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 EI=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:II},If=function(t){var n=t.size,r=Vt(t,vI);return se("svg",ae({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:EI},r))},$a=function(t){return se(If,ae({size:20},t),se("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"}))},Ef=function(t){return se(If,ae({size:20},t),se("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"}))},xf=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return ne({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},xI=xf,wI=function(t){var n=t.children,r=t.innerProps;return se("div",ae({},je(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||se(Ef,null))},AI=xf,SI=function(t){var n=t.children,r=t.innerProps;return se("div",ae({},je(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||se($a,null))},_I=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return ne({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},TI=function(t){var n=t.innerProps;return se("span",ae({},n,je(t,"indicatorSeparator",{"indicator-separator":!0})))},OI=EC(Cf||(Cf=xC([`
|
|
612
612
|
0%, 80%, 100% { opacity: 0; }
|
|
613
613
|
40% { opacity: 1; }
|
|
614
|
-
`]))),LI=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,i=s.colors,c=s.spacing.baseUnit;return ne({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:c*2})},Ua=function(t){var n=t.delay,r=t.offset;return oe("span",{css:Xa({animation:"".concat(OI," 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 */")})},FI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=Gt(t,CI);return oe("div",ie({},Be(ne(ne({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),oe(Ua,{delay:0,offset:r}),oe(Ua,{delay:160,offset:!0}),oe(Ua,{delay:320,offset:!r}))},DI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,i=s.colors,c=s.borderRadius,l=s.spacing;return ne({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:o?i.primary:i.neutral20,borderRadius:c,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},RI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,i=t.innerProps,c=t.menuIsOpen;return oe("div",ie({ref:s},Be(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":c}),i,{"aria-disabled":r||void 0}),n)},kI=RI,NI=["data"],PI=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},MI=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,i=t.Heading,c=t.headingProps,l=t.innerProps,a=t.label,u=t.theme,p=t.selectProps;return oe("div",ie({},Be(t,"group",{group:!0}),l),oe(i,ie({},c,{selectProps:p,theme:u,getStyles:o,getClassNames:s,cx:r}),a),oe("div",null,n))},BI=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ne({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"})},jI=function(t){var n=pf(t);n.data;var r=Gt(n,NI);return oe("div",ie({},Be(t,"groupHeading",{"group-heading":!0}),r))},VI=MI,GI=["innerRef","isDisabled","isHidden","inputClassName"],HI=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,i=s.spacing,c=s.colors;return ne(ne({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},WI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:c.neutral80})},Af={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},WI={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ne({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Af)},ZI=function(t){return ne({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Af)},XI=function(t){var n=t.cx,r=t.value,o=pf(t),s=o.innerRef,i=o.isDisabled,c=o.isHidden,l=o.inputClassName,a=Gt(o,GI);return oe("div",ie({},Be(t,"input",{"input-container":!0}),{"data-value":r||""}),oe("input",ie({className:n({input:!0},l),ref:s,style:ZI(c),disabled:i},a)))},zI=XI,YI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors;return ne({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},JI=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return ne({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},QI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors,c=t.isFocused;return ne({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:c?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},Sf=function(t){var n=t.children,r=t.innerProps;return oe("div",r,n)},$I=Sf,qI=Sf;function UI(e){var t=e.children,n=e.innerProps;return oe("div",ie({role:"button"},n),t||oe(qa,{size:14}))}var KI=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,i=t.isDisabled,c=t.removeProps,l=t.selectProps,a=r.Container,u=r.Label,p=r.Remove;return oe(a,{data:o,innerProps:ne(ne({},Be(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:l},oe(u,{data:o,innerProps:ne({},Be(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),oe(p,{data:o,innerProps:ne(ne({},Be(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},c),selectProps:l}))},eE=KI,tE=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.theme,c=i.spacing,l=i.colors;return ne({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?l.primary:o?l.primary25:"transparent",color:r?l.neutral20:s?l.neutral0:"inherit",padding:"".concat(c.baseUnit*2,"px ").concat(c.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?l.primary:l.primary50}})},nE=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.innerRef,c=t.innerProps;return oe("div",ie({},Be(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},c),n)},rE=nE,oE=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ne({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},sE=function(t){var n=t.children,r=t.innerProps;return oe("div",ie({},Be(t,"placeholder",{placeholder:!0}),r),n)},iE=sE,aE=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,i=o.colors;return ne({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?i.neutral40:i.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},cE=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return oe("div",ie({},Be(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},lE=cE,an={ClearIndicator:SI,Control:kI,DropdownIndicator:wI,DownChevron:xf,CrossIcon:qa,Group:VI,GroupHeading:jI,IndicatorsContainer:yI,IndicatorSeparator:TI,Input:zI,LoadingIndicator:FI,Menu:oI,MenuList:iI,MenuPortal:fI,LoadingMessage:uI,NoOptionsMessage:lI,MultiValue:eE,MultiValueContainer:$I,MultiValueLabel:qI,MultiValueRemove:UI,Option:rE,Placeholder:iE,SelectContainer:hI,SingleValue:lE,ValueContainer:mI},uE=function(t){return ne(ne({},an),t.components)},_f=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function dE(e,t){return!!(e===t||_f(e)&&_f(t))}function fE(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!dE(e[n],t[n]))return!1;return!0}function pE(e,t){t===void 0&&(t=fE);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 i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}function hE(){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 gE=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:hE},mE=function(t){return oe("span",ie({css:gE},t))},Tf=mE,bE={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,i=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 i?"".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,i=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 i?"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,i=s===void 0?"":s,c=t.selectValue,l=t.isDisabled,a=t.isSelected,u=t.isAppleDevice,p=function(d,f){return d&&d.length?"".concat(d.indexOf(f)+1," of ").concat(d.length):""};if(n==="value"&&c)return"value ".concat(i," focused, ").concat(p(c,r),".");if(n==="menu"&&u){var g=l?" disabled":"",E="".concat(a?" selected":"").concat(g);return"".concat(i).concat(E,", ").concat(p(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},yE=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,i=t.isFocused,c=t.selectValue,l=t.selectProps,a=t.id,u=t.isAppleDevice,p=l.ariaLiveMessages,g=l.getOptionLabel,E=l.inputValue,b=l.isMulti,d=l.isOptionDisabled,f=l.isSearchable,h=l.menuIsOpen,y=l.options,m=l.screenReaderStatus,x=l.tabSelectsValue,I=l.isLoading,w=l["aria-label"],A=l["aria-live"],S=_.useMemo(function(){return ne(ne({},bE),p||{})},[p]),T=_.useMemo(function(){var X="";if(n&&S.onChange){var Y=n.option,q=n.options,J=n.removedValue,z=n.removedValues,ae=n.value,le=function(re){return Array.isArray(re)?null:re},B=J||Y||le(ae),H=B?g(B):"",V=q||z||void 0,Z=V?V.map(g):[],U=ne({isDisabled:B&&d(B,c),label:H,labels:Z},n);X=S.onChange(U)}return X},[n,S,d,c,g]),R=_.useMemo(function(){var X="",Y=r||o,q=!!(r&&c&&c.includes(r));if(Y&&S.onFocus){var J={focused:Y,label:g(Y),isDisabled:d(Y,c),isSelected:q,options:s,context:Y===r?"menu":"value",selectValue:c,isAppleDevice:u};X=S.onFocus(J)}return X},[r,o,g,d,S,s,c,u]),D=_.useMemo(function(){var X="";if(h&&y.length&&!I&&S.onFilter){var Y=m({count:s.length});X=S.onFilter({inputValue:E,resultsMessage:Y})}return X},[s,E,h,S,y,m,I]),F=(n==null?void 0:n.action)==="initial-input-focus",P=_.useMemo(function(){var X="";if(S.guidance){var Y=o?"value":h?"menu":"input";X=S.guidance({"aria-label":w,context:Y,isDisabled:r&&d(r,c),isMulti:b,isSearchable:f,tabSelectsValue:x,isInitialFocus:F})}return X},[w,r,o,b,d,f,h,S,c,x,F]),j=oe(_.Fragment,null,oe("span",{id:"aria-selection"},T),oe("span",{id:"aria-focused"},R),oe("span",{id:"aria-results"},D),oe("span",{id:"aria-guidance"},P));return oe(_.Fragment,null,oe(Tf,{id:a},F&&j),oe(Tf,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!F&&j))},vE=yE,Ka=[{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źẑżžẓẕƶȥɀⱬꝣ"}],CE=new RegExp("["+Ka.map(function(e){return e.letters}).join("")+"]","g"),Of={},ec=0;ec<Ka.length;ec++)for(var tc=Ka[ec],nc=0;nc<tc.letters.length;nc++)Of[tc.letters[nc]]=tc.base;var Lf=function(t){return t.replace(CE,function(n){return Of[n]})},IE=pE(Lf),Ff=function(t){return t.replace(/^\s+|\s+$/g,"")},EE=function(t){return"".concat(t.label," ").concat(t.value)},xE=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ne({ignoreCase:!0,ignoreAccents:!0,stringify:EE,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,c=o.stringify,l=o.trim,a=o.matchFrom,u=l?Ff(r):r,p=l?Ff(c(n)):c(n);return s&&(u=u.toLowerCase(),p=p.toLowerCase()),i&&(u=IE(u),p=Lf(p)),a==="start"?p.substr(0,u.length)===u:p.indexOf(u)>-1}},wE=["innerRef"];function AE(e){var t=e.innerRef,n=Gt(e,wE),r=$C(n,"onExited","in","enter","exit","appear");return oe("input",ie({ref:t},r,{css:Xa({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 SE=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function _E(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,i=_.useRef(!1),c=_.useRef(!1),l=_.useRef(0),a=_.useRef(null),u=_.useCallback(function(f,h){if(a.current!==null){var y=a.current,m=y.scrollTop,x=y.scrollHeight,I=y.clientHeight,w=a.current,A=h>0,S=x-I-m,T=!1;S>h&&i.current&&(r&&r(f),i.current=!1),A&&c.current&&(s&&s(f),c.current=!1),A&&h>S?(n&&!i.current&&n(f),w.scrollTop=x,T=!0,i.current=!0):!A&&-h>m&&(o&&!c.current&&o(f),w.scrollTop=0,T=!0,c.current=!0),T&&SE(f)}},[n,r,o,s]),p=_.useCallback(function(f){u(f,f.deltaY)},[u]),g=_.useCallback(function(f){l.current=f.changedTouches[0].clientY},[]),E=_.useCallback(function(f){var h=l.current-f.changedTouches[0].clientY;u(f,h)},[u]),b=_.useCallback(function(f){if(f){var h=YC?{passive:!1}:!1;f.addEventListener("wheel",p,h),f.addEventListener("touchstart",g,h),f.addEventListener("touchmove",E,h)}},[E,g,p]),d=_.useCallback(function(f){f&&(f.removeEventListener("wheel",p,!1),f.removeEventListener("touchstart",g,!1),f.removeEventListener("touchmove",E,!1))},[E,g,p]);return _.useEffect(function(){if(t){var f=a.current;return b(f),function(){d(f)}}},[t,b,d]),function(f){a.current=f}}var Df=["boxSizing","height","overflow","paddingRight","position"],Rf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function kf(e){e.preventDefault()}function Nf(e){e.stopPropagation()}function Pf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Mf(){return"ontouchstart"in window||navigator.maxTouchPoints}var Bf=!!(typeof window<"u"&&window.document&&window.document.createElement),Co=0,Sr={capture:!1,passive:!1};function TE(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=_.useRef({}),s=_.useRef(null),i=_.useCallback(function(l){if(Bf){var a=document.body,u=a&&a.style;if(r&&Df.forEach(function(b){var d=u&&u[b];o.current[b]=d}),r&&Co<1){var p=parseInt(o.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,E=window.innerWidth-g+p||0;Object.keys(Rf).forEach(function(b){var d=Rf[b];u&&(u[b]=d)}),u&&(u.paddingRight="".concat(E,"px"))}a&&Mf()&&(a.addEventListener("touchmove",kf,Sr),l&&(l.addEventListener("touchstart",Pf,Sr),l.addEventListener("touchmove",Nf,Sr))),Co+=1}},[r]),c=_.useCallback(function(l){if(Bf){var a=document.body,u=a&&a.style;Co=Math.max(Co-1,0),r&&Co<1&&Df.forEach(function(p){var g=o.current[p];u&&(u[p]=g)}),a&&Mf()&&(a.removeEventListener("touchmove",kf,Sr),l&&(l.removeEventListener("touchstart",Pf,Sr),l.removeEventListener("touchmove",Nf,Sr)))}},[r]);return _.useEffect(function(){if(t){var l=s.current;return i(l),function(){c(l)}}},[t,i,c]),function(l){s.current=l}}function OE(){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 LE=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},FE=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:OE};function DE(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,i=e.onBottomLeave,c=e.onTopArrive,l=e.onTopLeave,a=_E({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:c,onTopLeave:l}),u=TE({isEnabled:n}),p=function(E){a(E),u(E)};return oe(_.Fragment,null,n&&oe("div",{onClick:LE,css:FE}),t(p))}function RE(){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 kE=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:RE},NE=function(t){var n=t.name,r=t.onFocus;return oe("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:kE,value:"",onChange:function(){}})},PE=NE;function rc(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 ME(){return rc(/^iPhone/i)}function jf(){return rc(/^Mac/i)}function BE(){return rc(/^iPad/i)||jf()&&navigator.maxTouchPoints>1}function jE(){return ME()||BE()}function VE(){return jf()||jE()}var GE=function(t){return t.label},Vf=function(t){return t.label},Gf=function(t){return t.value},HE=function(t){return!!t.isDisabled},WE={clearIndicator:AI,container:pI,control:DI,dropdownIndicator:xI,group:PI,groupHeading:BI,indicatorsContainer:bI,indicatorSeparator:_I,input:HI,loadingIndicator:LI,loadingMessage:cI,menu:tI,menuList:sI,menuPortal:dI,multiValue:YI,multiValueLabel:JI,multiValueRemove:QI,noOptionsMessage:aI,option:tE,placeholder:oE,singleValue:aE,valueContainer:gI},ZE={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%)"},XE=4,Hf=4,zE=38,YE=Hf*2,JE={baseUnit:Hf,controlHeight:zE,menuGutter:YE},oc={borderRadius:XE,colors:ZE,spacing:JE},QE={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:mf(),captureMenuScroll:!mf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:xE(),formatGroupLabel:GE,getOptionLabel:Vf,getOptionValue:Gf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:HE,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!XC(),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 Wf(e,t,n,r){var o=Jf(e,t,n),s=Qf(e,t,n),i=Yf(e,t),c=Ys(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:i,value:c,index:r}}function zs(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,c){return Wf(e,i,t,c)}).filter(function(i){return zf(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Wf(e,n,t,r);return zf(e,s)?s:void 0}).filter(JC)}function Zf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Er(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Xf(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Er(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 $E(e,t){return Zf(zs(e,t))}function zf(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,c=t.value;return(!qf(e)||!s)&&$f(e,{label:i,value:c,data:o},r)}function qE(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 UE(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var sc=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},Yf=function(t,n){return t.getOptionLabel(n)},Ys=function(t,n){return t.getOptionValue(n)};function Jf(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Qf(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Ys(e,t);return n.some(function(o){return Ys(e,o)===r})}function $f(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var qf=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},KE=1,Js=function(e){p3(n,e);var t=m3(n);function n(r){var o;if(d3(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=VE(),o.controlRef=null,o.getControlRef=function(l){o.controlRef=l},o.focusedOptionRef=null,o.getFocusedOptionRef=function(l){o.focusedOptionRef=l},o.menuListRef=null,o.getMenuListRef=function(l){o.menuListRef=l},o.inputRef=null,o.getInputRef=function(l){o.inputRef=l},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(l,a){var u=o.props,p=u.onChange,g=u.name;a.name=g,o.ariaOnChange(l,a),p(l,a)},o.setValue=function(l,a,u){var p=o.props,g=p.closeMenuOnSelect,E=p.isMulti,b=p.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),g&&(o.setState({inputIsHiddenAfterUpdate:!E}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(l,{action:a,option:u})},o.selectOption=function(l){var a=o.props,u=a.blurInputOnSelect,p=a.isMulti,g=a.name,E=o.state.selectValue,b=p&&o.isOptionSelected(l,E),d=o.isOptionDisabled(l,E);if(b){var f=o.getOptionValue(l);o.setValue(E.filter(function(h){return o.getOptionValue(h)!==f}),"deselect-option",l)}else if(!d)p?o.setValue([].concat(Er(E),[l]),"select-option",l):o.setValue(l,"select-option");else{o.ariaOnChange(l,{action:"select-option",option:l,name:g});return}u&&o.blurInput()},o.removeValue=function(l){var a=o.props.isMulti,u=o.state.selectValue,p=o.getOptionValue(l),g=u.filter(function(b){return o.getOptionValue(b)!==p}),E=vo(a,g,g[0]||null);o.onChange(E,{action:"remove-value",removedValue:l}),o.focusInput()},o.clearValue=function(){var l=o.state.selectValue;o.onChange(vo(o.props.isMulti,[],null),{action:"clear",removedValues:l})},o.popValue=function(){var l=o.props.isMulti,a=o.state.selectValue,u=a[a.length-1],p=a.slice(0,a.length-1),g=vo(l,p,p[0]||null);u&&o.onChange(g,{action:"pop-value",removedValue:u})},o.getFocusedOptionId=function(l){return sc(o.state.focusableOptionsWithIds,l)},o.getFocusableOptionsWithIds=function(){return Xf(zs(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];return jC.apply(void 0,[o.props.classNamePrefix].concat(a))},o.getOptionLabel=function(l){return Yf(o.props,l)},o.getOptionValue=function(l){return Ys(o.props,l)},o.getStyles=function(l,a){var u=o.props.unstyled,p=WE[l](a,u);p.boxSizing="border-box";var g=o.props.styles[l];return g?g(p,a):p},o.getClassNames=function(l,a){var u,p;return(u=(p=o.props.classNames)[l])===null||u===void 0?void 0:u.call(p,a)},o.getElementId=function(l){return"".concat(o.state.instancePrefix,"-").concat(l)},o.getComponents=function(){return uE(o.props)},o.buildCategorizedOptions=function(){return zs(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Zf(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(l,a){o.setState({ariaSelection:ne({value:l},a)})},o.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(l){o.blockOptionHover=!1},o.onControlMouseDown=function(l){if(!l.defaultPrevented){var a=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&o.onMenuClose():a&&o.openMenu("first"):(a&&(o.openAfterFocus=!0),o.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},o.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!o.props.isDisabled){var a=o.props,u=a.isMulti,p=a.menuIsOpen;o.focusInput(),p?(o.setState({inputIsHiddenAfterUpdate:!u}),o.onMenuClose()):o.openMenu("first"),l.preventDefault()}},o.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(o.clearValue(),l.preventDefault(),o.openAfterFocus=!1,l.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(l){typeof o.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Hs(l.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(l)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(l){var a=l.touches,u=a&&a.item(0);u&&(o.initialTouchX=u.clientX,o.initialTouchY=u.clientY,o.userIsDragging=!1)},o.onTouchMove=function(l){var a=l.touches,u=a&&a.item(0);if(u){var p=Math.abs(u.clientX-o.initialTouchX),g=Math.abs(u.clientY-o.initialTouchY),E=5;o.userIsDragging=p>E||g>E}},o.onTouchEnd=function(l){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(l.target)&&o.menuListRef&&!o.menuListRef.contains(l.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(l){o.userIsDragging||o.onControlMouseDown(l)},o.onClearIndicatorTouchEnd=function(l){o.userIsDragging||o.onClearIndicatorMouseDown(l)},o.onDropdownIndicatorTouchEnd=function(l){o.userIsDragging||o.onDropdownIndicatorMouseDown(l)},o.handleInputChange=function(l){var a=o.props.inputValue,u=l.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(u,{action:"input-change",prevInputValue:a}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(l){o.props.onFocus&&o.props.onFocus(l),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(l){var a=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(l),o.onInputChange("",{action:"input-blur",prevInputValue:a}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(l){if(!(o.blockOptionHover||o.state.focusedOption===l)){var a=o.getFocusableOptions(),u=a.indexOf(l);o.setState({focusedOption:l,focusedOptionId:u>-1?o.getFocusedOptionId(l):null})}},o.shouldHideSelectedOptions=function(){return qf(o.props)},o.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),o.focus()},o.onKeyDown=function(l){var a=o.props,u=a.isMulti,p=a.backspaceRemovesValue,g=a.escapeClearsValue,E=a.inputValue,b=a.isClearable,d=a.isDisabled,f=a.menuIsOpen,h=a.onKeyDown,y=a.tabSelectsValue,m=a.openMenuOnFocus,x=o.state,I=x.focusedOption,w=x.focusedValue,A=x.selectValue;if(!d&&!(typeof h=="function"&&(h(l),l.defaultPrevented))){switch(o.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||E)return;o.focusValue("previous");break;case"ArrowRight":if(!u||E)return;o.focusValue("next");break;case"Delete":case"Backspace":if(E)return;if(w)o.removeValue(w);else{if(!p)return;u?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||l.shiftKey||!f||!y||!I||m&&o.isOptionSelected(I,A))return;o.selectOption(I);break;case"Enter":if(l.keyCode===229)break;if(f){if(!I||o.isComposing)return;o.selectOption(I);break}return;case"Escape":f?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:E}),o.onMenuClose()):b&&g&&o.clearValue();break;case" ":if(E)return;if(!f){o.openMenu("first");break}if(!I)return;o.selectOption(I);break;case"ArrowUp":f?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":f?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!f)return;o.focusOption("pageup");break;case"PageDown":if(!f)return;o.focusOption("pagedown");break;case"Home":if(!f)return;o.focusOption("first");break;case"End":if(!f)return;o.focusOption("last");break;default:return}l.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++KE),o.state.selectValue=Gs(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),c=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=i[c],o.state.focusedOptionId=sc(s,i[c])}return o}return f3(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&&gf(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,i=s.isDisabled,c=s.menuIsOpen,l=this.state.isFocused;(l&&!i&&o.isDisabled||l&&c&&!o.menuIsOpen)&&this.focusInput(),l&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(gf(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,i=this.state,c=i.selectValue,l=i.isFocused,a=this.buildFocusableOptions(),u=o==="first"?0:a.length-1;if(!this.props.isMulti){var p=a.indexOf(c[0]);p>-1&&(u=p)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[u],focusedOptionId:this.getFocusedOptionId(a[u])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,i=s.selectValue,c=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=i.indexOf(c);c||(l=-1);var a=i.length-1,u=-1;if(i.length){switch(o){case"previous":l===0?u=0:l===-1?u=a:u=l-1;break;case"next":l>-1&&l<a&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:i[u]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,i=this.state.focusedOption,c=this.getFocusableOptions();if(c.length){var l=0,a=c.indexOf(i);i||(a=-1),o==="up"?l=a>0?a-1:c.length-1:o==="down"?l=(a+1)%c.length:o==="pageup"?(l=a-s,l<0&&(l=0)):o==="pagedown"?(l=a+s,l>c.length-1&&(l=c.length-1)):o==="last"&&(l=c.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:c[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(c[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(oc):ne(ne({},oc),this.props.theme):oc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,i=this.getStyles,c=this.getClassNames,l=this.getValue,a=this.selectOption,u=this.setValue,p=this.props,g=p.isMulti,E=p.isRtl,b=p.options,d=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:c,getValue:l,hasValue:d,isMulti:g,isRtl:E,options:b,selectOption:a,selectProps:p,setValue:u,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,i=o.isMulti;return s===void 0?i:s}},{key:"isOptionDisabled",value:function(o,s){return Jf(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return Qf(this.props,o,s)}},{key:"filterOption",value:function(o,s){return $f(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,c=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:i,selectValue:c})}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,i=o.isSearchable,c=o.inputId,l=o.inputValue,a=o.tabIndex,u=o.form,p=o.menuIsOpen,g=o.required,E=this.getComponents(),b=E.Input,d=this.state,f=d.inputIsHidden,h=d.ariaSelection,y=this.commonProps,m=c||this.getElementId("input"),x=ne(ne(ne({"aria-autocomplete":"list","aria-expanded":p,"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":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},p&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(h==null?void 0:h.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?k.createElement(b,ie({},y,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:s,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:u,type:"text",value:l},x)):k.createElement(AE,ie({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Vs,onFocus:this.onInputFocus,disabled:s,tabIndex:a,inputMode:"none",form:u,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),i=s.MultiValue,c=s.MultiValueContainer,l=s.MultiValueLabel,a=s.MultiValueRemove,u=s.SingleValue,p=s.Placeholder,g=this.commonProps,E=this.props,b=E.controlShouldRenderValue,d=E.isDisabled,f=E.isMulti,h=E.inputValue,y=E.placeholder,m=this.state,x=m.selectValue,I=m.focusedValue,w=m.isFocused;if(!this.hasValue()||!b)return h?null:k.createElement(p,ie({},g,{key:"placeholder",isDisabled:d,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),y);if(f)return x.map(function(S,T){var R=S===I,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return k.createElement(i,ie({},g,{components:{Container:c,Label:l,Remove:a},isFocused:R,isDisabled:d,key:D,index:T,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(P){P.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(h)return null;var A=x[0];return k.createElement(u,ie({},g,{data:A,isDisabled:d}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,i=this.commonProps,c=this.props,l=c.isDisabled,a=c.isLoading,u=this.state.isFocused;if(!this.isClearable()||!s||l||!this.hasValue()||a)return null;var p={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return k.createElement(s,ie({},i,{innerProps:p,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,i=this.commonProps,c=this.props,l=c.isDisabled,a=c.isLoading,u=this.state.isFocused;if(!s||!a)return null;var p={"aria-hidden":"true"};return k.createElement(s,ie({},i,{innerProps:p,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,i=o.IndicatorSeparator;if(!s||!i)return null;var c=this.commonProps,l=this.props.isDisabled,a=this.state.isFocused;return k.createElement(i,ie({},c,{isDisabled:l,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return k.createElement(s,ie({},i,{innerProps:a,isDisabled:c,isFocused:l}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),i=s.Group,c=s.GroupHeading,l=s.Menu,a=s.MenuList,u=s.MenuPortal,p=s.LoadingMessage,g=s.NoOptionsMessage,E=s.Option,b=this.commonProps,d=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,y=f.inputValue,m=f.isLoading,x=f.loadingMessage,I=f.minMenuHeight,w=f.maxMenuHeight,A=f.menuIsOpen,S=f.menuPlacement,T=f.menuPosition,R=f.menuPortalTarget,D=f.menuShouldBlockScroll,F=f.menuShouldScrollIntoView,P=f.noOptionsMessage,j=f.onMenuScrollToTop,X=f.onMenuScrollToBottom;if(!A)return null;var Y=function(H,V){var Z=H.type,U=H.data,ee=H.isDisabled,re=H.isSelected,M=H.label,te=H.value,ye=d===U,W=ee?void 0:function(){return o.onOptionHover(U)},Ne=ee?void 0:function(){return o.selectOption(U)},Re="".concat(o.getElementId("option"),"-").concat(V),Ye={id:Re,onClick:Ne,onMouseMove:W,onMouseOver:W,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:re};return k.createElement(E,ie({},b,{innerProps:Ye,data:U,isDisabled:ee,isSelected:re,key:Re,label:M,type:Z,value:te,isFocused:ye,innerRef:ye?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(H.data,"menu"))},q;if(this.hasOptions())q=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var H=B.data,V=B.options,Z=B.index,U="".concat(o.getElementId("group"),"-").concat(Z),ee="".concat(U,"-heading");return k.createElement(i,ie({},b,{key:U,data:H,options:V,Heading:c,headingProps:{id:ee,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(re){return Y(re,"".concat(Z,"-").concat(re.index))}))}else if(B.type==="option")return Y(B,"".concat(B.index))});else if(m){var J=x({inputValue:y});if(J===null)return null;q=k.createElement(p,b,J)}else{var z=P({inputValue:y});if(z===null)return null;q=k.createElement(g,b,z)}var ae={minMenuHeight:I,maxMenuHeight:w,menuPlacement:S,menuPosition:T,menuShouldScrollIntoView:F},le=k.createElement(nI,ie({},b,ae),function(B){var H=B.ref,V=B.placerProps,Z=V.placement,U=V.maxHeight;return k.createElement(l,ie({},b,ae,{innerRef:H,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:m,placement:Z}),k.createElement(DE,{captureEnabled:h,onTopArrive:j,onBottomArrive:X,lockEnabled:D},function(ee){return k.createElement(a,ie({},b,{innerRef:function(M){o.getMenuListRef(M),ee(M)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:m,maxHeight:U,focusedOption:d}),q)}))});return R||T==="fixed"?k.createElement(u,ie({},b,{appendTo:R,controlElement:this.controlRef,menuPlacement:S,menuPosition:T}),le):le}},{key:"renderFormField",value:function(){var o=this,s=this.props,i=s.delimiter,c=s.isDisabled,l=s.isMulti,a=s.name,u=s.required,p=this.state.selectValue;if(u&&!this.hasValue()&&!c)return k.createElement(PE,{name:a,onFocus:this.onValueInputFocus});if(!(!a||c))if(l)if(i){var g=p.map(function(d){return o.getOptionValue(d)}).join(i);return k.createElement("input",{name:a,type:"hidden",value:g})}else{var E=p.length>0?p.map(function(d,f){return k.createElement("input",{key:"i-".concat(f),name:a,type:"hidden",value:o.getOptionValue(d)})}):k.createElement("input",{name:a,type:"hidden",value:""});return k.createElement("div",null,E)}else{var b=p[0]?this.getOptionValue(p[0]):"";return k.createElement("input",{name:a,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,i=s.ariaSelection,c=s.focusedOption,l=s.focusedValue,a=s.isFocused,u=s.selectValue,p=this.getFocusableOptions();return k.createElement(vE,ie({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:c,focusedValue:l,isFocused:a,selectValue:u,focusableOptions:p,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,i=o.IndicatorsContainer,c=o.SelectContainer,l=o.ValueContainer,a=this.props,u=a.className,p=a.id,g=a.isDisabled,E=a.menuIsOpen,b=this.state.isFocused,d=this.commonProps=this.getCommonProps();return k.createElement(c,ie({},d,{className:u,innerProps:{id:p,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:b}),this.renderLiveRegion(),k.createElement(s,ie({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:b,menuIsOpen:E}),k.createElement(l,ie({},d,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),k.createElement(i,ie({},d,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var i=s.prevProps,c=s.clearFocusValueOnUpdate,l=s.inputIsHiddenAfterUpdate,a=s.ariaSelection,u=s.isFocused,p=s.prevWasFocused,g=s.instancePrefix,E=o.options,b=o.value,d=o.menuIsOpen,f=o.inputValue,h=o.isMulti,y=Gs(b),m={};if(i&&(b!==i.value||E!==i.options||d!==i.menuIsOpen||f!==i.inputValue)){var x=d?$E(o,y):[],I=d?Xf(zs(o,y),"".concat(g,"-option")):[],w=c?qE(s,y):null,A=UE(s,x),S=sc(I,A);m={selectValue:y,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:I,focusedValue:w,clearFocusValueOnUpdate:!1}}var T=l!=null&&o!==i?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},R=a,D=u&&p;return u&&!D&&(R={value:vo(h,y,y[0]||null),options:y,action:"initial-input-focus"},D=!p),(a==null?void 0:a.action)==="initial-input-focus"&&(R=null),ne(ne(ne({},m),T),{},{prevProps:o,ariaSelection:R,prevWasFocused:D})}}]),n}(_.Component);Js.defaultProps=QE;var ex=_.forwardRef(function(e,t){var n=ka(e);return k.createElement(Js,ie({ref:t},n))}),tx=ex;const nx=v.styled(v.Box)`
|
|
614
|
+
`]))),LI=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,i=s.colors,c=s.spacing.baseUnit;return ne({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:c*2})},qa=function(t){var n=t.delay,r=t.offset;return se("span",{css:Za({animation:"".concat(OI," 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 */")})},FI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=Vt(t,CI);return se("div",ae({},je(ne(ne({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),se(qa,{delay:0,offset:r}),se(qa,{delay:160,offset:!0}),se(qa,{delay:320,offset:!r}))},DI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,i=s.colors,c=s.borderRadius,l=s.spacing;return ne({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:o?i.primary:i.neutral20,borderRadius:c,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},RI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,i=t.innerProps,c=t.menuIsOpen;return se("div",ae({ref:s},je(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":c}),i,{"aria-disabled":r||void 0}),n)},kI=RI,NI=["data"],PI=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},MI=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,i=t.Heading,c=t.headingProps,l=t.innerProps,a=t.label,u=t.theme,p=t.selectProps;return se("div",ae({},je(t,"group",{group:!0}),l),se(i,ae({},c,{selectProps:p,theme:u,getStyles:o,getClassNames:s,cx:r}),a),se("div",null,n))},BI=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ne({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"})},jI=function(t){var n=ff(t);n.data;var r=Vt(n,NI);return se("div",ae({},je(t,"groupHeading",{"group-heading":!0}),r))},VI=MI,GI=["innerRef","isDisabled","isHidden","inputClassName"],HI=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,i=s.spacing,c=s.colors;return ne(ne({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},WI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:c.neutral80})},wf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},WI={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ne({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},wf)},ZI=function(t){return ne({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},wf)},XI=function(t){var n=t.cx,r=t.value,o=ff(t),s=o.innerRef,i=o.isDisabled,c=o.isHidden,l=o.inputClassName,a=Vt(o,GI);return se("div",ae({},je(t,"input",{"input-container":!0}),{"data-value":r||""}),se("input",ae({className:n({input:!0},l),ref:s,style:ZI(c),disabled:i},a)))},zI=XI,YI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors;return ne({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},JI=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return ne({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},QI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors,c=t.isFocused;return ne({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:c?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},Af=function(t){var n=t.children,r=t.innerProps;return se("div",r,n)},$I=Af,qI=Af;function UI(e){var t=e.children,n=e.innerProps;return se("div",ae({role:"button"},n),t||se($a,{size:14}))}var KI=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,i=t.isDisabled,c=t.removeProps,l=t.selectProps,a=r.Container,u=r.Label,p=r.Remove;return se(a,{data:o,innerProps:ne(ne({},je(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:l},se(u,{data:o,innerProps:ne({},je(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),se(p,{data:o,innerProps:ne(ne({},je(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},c),selectProps:l}))},eE=KI,tE=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.theme,c=i.spacing,l=i.colors;return ne({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?l.primary:o?l.primary25:"transparent",color:r?l.neutral20:s?l.neutral0:"inherit",padding:"".concat(c.baseUnit*2,"px ").concat(c.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?l.primary:l.primary50}})},nE=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.innerRef,c=t.innerProps;return se("div",ae({},je(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},c),n)},rE=nE,oE=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ne({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},sE=function(t){var n=t.children,r=t.innerProps;return se("div",ae({},je(t,"placeholder",{placeholder:!0}),r),n)},iE=sE,aE=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,i=o.colors;return ne({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?i.neutral40:i.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},cE=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return se("div",ae({},je(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},lE=cE,cn={ClearIndicator:SI,Control:kI,DropdownIndicator:wI,DownChevron:Ef,CrossIcon:$a,Group:VI,GroupHeading:jI,IndicatorsContainer:yI,IndicatorSeparator:TI,Input:zI,LoadingIndicator:FI,Menu:oI,MenuList:iI,MenuPortal:fI,LoadingMessage:uI,NoOptionsMessage:lI,MultiValue:eE,MultiValueContainer:$I,MultiValueLabel:qI,MultiValueRemove:UI,Option:rE,Placeholder:iE,SelectContainer:hI,SingleValue:lE,ValueContainer:mI},uE=function(t){return ne(ne({},cn),t.components)},Sf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function dE(e,t){return!!(e===t||Sf(e)&&Sf(t))}function fE(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!dE(e[n],t[n]))return!1;return!0}function pE(e,t){t===void 0&&(t=fE);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 i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}function hE(){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 gE=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:hE},mE=function(t){return se("span",ae({css:gE},t))},_f=mE,bE={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,i=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 i?"".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,i=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 i?"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,i=s===void 0?"":s,c=t.selectValue,l=t.isDisabled,a=t.isSelected,u=t.isAppleDevice,p=function(d,f){return d&&d.length?"".concat(d.indexOf(f)+1," of ").concat(d.length):""};if(n==="value"&&c)return"value ".concat(i," focused, ").concat(p(c,r),".");if(n==="menu"&&u){var g=l?" disabled":"",E="".concat(a?" selected":"").concat(g);return"".concat(i).concat(E,", ").concat(p(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},yE=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,i=t.isFocused,c=t.selectValue,l=t.selectProps,a=t.id,u=t.isAppleDevice,p=l.ariaLiveMessages,g=l.getOptionLabel,E=l.inputValue,b=l.isMulti,d=l.isOptionDisabled,f=l.isSearchable,h=l.menuIsOpen,y=l.options,m=l.screenReaderStatus,x=l.tabSelectsValue,I=l.isLoading,w=l["aria-label"],A=l["aria-live"],S=_.useMemo(function(){return ne(ne({},bE),p||{})},[p]),O=_.useMemo(function(){var X="";if(n&&S.onChange){var z=n.option,q=n.options,Y=n.removedValue,K=n.removedValues,ce=n.value,ee=function(oe){return Array.isArray(oe)?null:oe},B=Y||z||ee(ce),H=B?g(B):"",V=q||K||void 0,W=V?V.map(g):[],J=ne({isDisabled:B&&d(B,c),label:H,labels:W},n);X=S.onChange(J)}return X},[n,S,d,c,g]),R=_.useMemo(function(){var X="",z=r||o,q=!!(r&&c&&c.includes(r));if(z&&S.onFocus){var Y={focused:z,label:g(z),isDisabled:d(z,c),isSelected:q,options:s,context:z===r?"menu":"value",selectValue:c,isAppleDevice:u};X=S.onFocus(Y)}return X},[r,o,g,d,S,s,c,u]),D=_.useMemo(function(){var X="";if(h&&y.length&&!I&&S.onFilter){var z=m({count:s.length});X=S.onFilter({inputValue:E,resultsMessage:z})}return X},[s,E,h,S,y,m,I]),F=(n==null?void 0:n.action)==="initial-input-focus",P=_.useMemo(function(){var X="";if(S.guidance){var z=o?"value":h?"menu":"input";X=S.guidance({"aria-label":w,context:z,isDisabled:r&&d(r,c),isMulti:b,isSearchable:f,tabSelectsValue:x,isInitialFocus:F})}return X},[w,r,o,b,d,f,h,S,c,x,F]),j=se(_.Fragment,null,se("span",{id:"aria-selection"},O),se("span",{id:"aria-focused"},R),se("span",{id:"aria-results"},D),se("span",{id:"aria-guidance"},P));return se(_.Fragment,null,se(_f,{id:a},F&&j),se(_f,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!F&&j))},vE=yE,Ua=[{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źẑżžẓẕƶȥɀⱬꝣ"}],CE=new RegExp("["+Ua.map(function(e){return e.letters}).join("")+"]","g"),Tf={},Ka=0;Ka<Ua.length;Ka++)for(var ec=Ua[Ka],tc=0;tc<ec.letters.length;tc++)Tf[ec.letters[tc]]=ec.base;var Of=function(t){return t.replace(CE,function(n){return Tf[n]})},IE=pE(Of),Lf=function(t){return t.replace(/^\s+|\s+$/g,"")},EE=function(t){return"".concat(t.label," ").concat(t.value)},xE=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ne({ignoreCase:!0,ignoreAccents:!0,stringify:EE,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,c=o.stringify,l=o.trim,a=o.matchFrom,u=l?Lf(r):r,p=l?Lf(c(n)):c(n);return s&&(u=u.toLowerCase(),p=p.toLowerCase()),i&&(u=IE(u),p=Of(p)),a==="start"?p.substr(0,u.length)===u:p.indexOf(u)>-1}},wE=["innerRef"];function AE(e){var t=e.innerRef,n=Vt(e,wE),r=$C(n,"onExited","in","enter","exit","appear");return se("input",ae({ref:t},r,{css:Za({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 SE=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function _E(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,i=_.useRef(!1),c=_.useRef(!1),l=_.useRef(0),a=_.useRef(null),u=_.useCallback(function(f,h){if(a.current!==null){var y=a.current,m=y.scrollTop,x=y.scrollHeight,I=y.clientHeight,w=a.current,A=h>0,S=x-I-m,O=!1;S>h&&i.current&&(r&&r(f),i.current=!1),A&&c.current&&(s&&s(f),c.current=!1),A&&h>S?(n&&!i.current&&n(f),w.scrollTop=x,O=!0,i.current=!0):!A&&-h>m&&(o&&!c.current&&o(f),w.scrollTop=0,O=!0,c.current=!0),O&&SE(f)}},[n,r,o,s]),p=_.useCallback(function(f){u(f,f.deltaY)},[u]),g=_.useCallback(function(f){l.current=f.changedTouches[0].clientY},[]),E=_.useCallback(function(f){var h=l.current-f.changedTouches[0].clientY;u(f,h)},[u]),b=_.useCallback(function(f){if(f){var h=YC?{passive:!1}:!1;f.addEventListener("wheel",p,h),f.addEventListener("touchstart",g,h),f.addEventListener("touchmove",E,h)}},[E,g,p]),d=_.useCallback(function(f){f&&(f.removeEventListener("wheel",p,!1),f.removeEventListener("touchstart",g,!1),f.removeEventListener("touchmove",E,!1))},[E,g,p]);return _.useEffect(function(){if(t){var f=a.current;return b(f),function(){d(f)}}},[t,b,d]),function(f){a.current=f}}var Ff=["boxSizing","height","overflow","paddingRight","position"],Df={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Rf(e){e.preventDefault()}function kf(e){e.stopPropagation()}function Nf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Pf(){return"ontouchstart"in window||navigator.maxTouchPoints}var Mf=!!(typeof window<"u"&&window.document&&window.document.createElement),xo=0,Ar={capture:!1,passive:!1};function TE(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=_.useRef({}),s=_.useRef(null),i=_.useCallback(function(l){if(Mf){var a=document.body,u=a&&a.style;if(r&&Ff.forEach(function(b){var d=u&&u[b];o.current[b]=d}),r&&xo<1){var p=parseInt(o.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,E=window.innerWidth-g+p||0;Object.keys(Df).forEach(function(b){var d=Df[b];u&&(u[b]=d)}),u&&(u.paddingRight="".concat(E,"px"))}a&&Pf()&&(a.addEventListener("touchmove",Rf,Ar),l&&(l.addEventListener("touchstart",Nf,Ar),l.addEventListener("touchmove",kf,Ar))),xo+=1}},[r]),c=_.useCallback(function(l){if(Mf){var a=document.body,u=a&&a.style;xo=Math.max(xo-1,0),r&&xo<1&&Ff.forEach(function(p){var g=o.current[p];u&&(u[p]=g)}),a&&Pf()&&(a.removeEventListener("touchmove",Rf,Ar),l&&(l.removeEventListener("touchstart",Nf,Ar),l.removeEventListener("touchmove",kf,Ar)))}},[r]);return _.useEffect(function(){if(t){var l=s.current;return i(l),function(){c(l)}}},[t,i,c]),function(l){s.current=l}}function OE(){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 LE=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},FE=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:OE};function DE(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,i=e.onBottomLeave,c=e.onTopArrive,l=e.onTopLeave,a=_E({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:c,onTopLeave:l}),u=TE({isEnabled:n}),p=function(E){a(E),u(E)};return se(_.Fragment,null,n&&se("div",{onClick:LE,css:FE}),t(p))}function RE(){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 kE=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:RE},NE=function(t){var n=t.name,r=t.onFocus;return se("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:kE,value:"",onChange:function(){}})},PE=NE;function nc(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 ME(){return nc(/^iPhone/i)}function Bf(){return nc(/^Mac/i)}function BE(){return nc(/^iPad/i)||Bf()&&navigator.maxTouchPoints>1}function jE(){return ME()||BE()}function VE(){return Bf()||jE()}var GE=function(t){return t.label},jf=function(t){return t.label},Vf=function(t){return t.value},HE=function(t){return!!t.isDisabled},WE={clearIndicator:AI,container:pI,control:DI,dropdownIndicator:xI,group:PI,groupHeading:BI,indicatorsContainer:bI,indicatorSeparator:_I,input:HI,loadingIndicator:LI,loadingMessage:cI,menu:tI,menuList:sI,menuPortal:dI,multiValue:YI,multiValueLabel:JI,multiValueRemove:QI,noOptionsMessage:aI,option:tE,placeholder:oE,singleValue:aE,valueContainer:gI},ZE={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%)"},XE=4,Gf=4,zE=38,YE=Gf*2,JE={baseUnit:Gf,controlHeight:zE,menuGutter:YE},rc={borderRadius:XE,colors:ZE,spacing:JE},QE={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:gf(),captureMenuScroll:!gf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:xE(),formatGroupLabel:GE,getOptionLabel:jf,getOptionValue:Vf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:HE,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!XC(),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 Hf(e,t,n,r){var o=Yf(e,t,n),s=Jf(e,t,n),i=zf(e,t),c=Js(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:i,value:c,index:r}}function Ys(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,c){return Hf(e,i,t,c)}).filter(function(i){return Xf(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Hf(e,n,t,r);return Xf(e,s)?s:void 0}).filter(JC)}function Wf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Ir(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Zf(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Ir(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 $E(e,t){return Wf(Ys(e,t))}function Xf(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,c=t.value;return(!$f(e)||!s)&&Qf(e,{label:i,value:c,data:o},r)}function qE(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 UE(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var oc=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},zf=function(t,n){return t.getOptionLabel(n)},Js=function(t,n){return t.getOptionValue(n)};function Yf(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Jf(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Js(e,t);return n.some(function(o){return Js(e,o)===r})}function Qf(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var $f=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},KE=1,Qs=function(e){p3(n,e);var t=m3(n);function n(r){var o;if(d3(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=VE(),o.controlRef=null,o.getControlRef=function(l){o.controlRef=l},o.focusedOptionRef=null,o.getFocusedOptionRef=function(l){o.focusedOptionRef=l},o.menuListRef=null,o.getMenuListRef=function(l){o.menuListRef=l},o.inputRef=null,o.getInputRef=function(l){o.inputRef=l},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(l,a){var u=o.props,p=u.onChange,g=u.name;a.name=g,o.ariaOnChange(l,a),p(l,a)},o.setValue=function(l,a,u){var p=o.props,g=p.closeMenuOnSelect,E=p.isMulti,b=p.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),g&&(o.setState({inputIsHiddenAfterUpdate:!E}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(l,{action:a,option:u})},o.selectOption=function(l){var a=o.props,u=a.blurInputOnSelect,p=a.isMulti,g=a.name,E=o.state.selectValue,b=p&&o.isOptionSelected(l,E),d=o.isOptionDisabled(l,E);if(b){var f=o.getOptionValue(l);o.setValue(E.filter(function(h){return o.getOptionValue(h)!==f}),"deselect-option",l)}else if(!d)p?o.setValue([].concat(Ir(E),[l]),"select-option",l):o.setValue(l,"select-option");else{o.ariaOnChange(l,{action:"select-option",option:l,name:g});return}u&&o.blurInput()},o.removeValue=function(l){var a=o.props.isMulti,u=o.state.selectValue,p=o.getOptionValue(l),g=u.filter(function(b){return o.getOptionValue(b)!==p}),E=Eo(a,g,g[0]||null);o.onChange(E,{action:"remove-value",removedValue:l}),o.focusInput()},o.clearValue=function(){var l=o.state.selectValue;o.onChange(Eo(o.props.isMulti,[],null),{action:"clear",removedValues:l})},o.popValue=function(){var l=o.props.isMulti,a=o.state.selectValue,u=a[a.length-1],p=a.slice(0,a.length-1),g=Eo(l,p,p[0]||null);u&&o.onChange(g,{action:"pop-value",removedValue:u})},o.getFocusedOptionId=function(l){return oc(o.state.focusableOptionsWithIds,l)},o.getFocusableOptionsWithIds=function(){return Zf(Ys(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];return jC.apply(void 0,[o.props.classNamePrefix].concat(a))},o.getOptionLabel=function(l){return zf(o.props,l)},o.getOptionValue=function(l){return Js(o.props,l)},o.getStyles=function(l,a){var u=o.props.unstyled,p=WE[l](a,u);p.boxSizing="border-box";var g=o.props.styles[l];return g?g(p,a):p},o.getClassNames=function(l,a){var u,p;return(u=(p=o.props.classNames)[l])===null||u===void 0?void 0:u.call(p,a)},o.getElementId=function(l){return"".concat(o.state.instancePrefix,"-").concat(l)},o.getComponents=function(){return uE(o.props)},o.buildCategorizedOptions=function(){return Ys(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Wf(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(l,a){o.setState({ariaSelection:ne({value:l},a)})},o.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(l){o.blockOptionHover=!1},o.onControlMouseDown=function(l){if(!l.defaultPrevented){var a=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&o.onMenuClose():a&&o.openMenu("first"):(a&&(o.openAfterFocus=!0),o.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},o.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!o.props.isDisabled){var a=o.props,u=a.isMulti,p=a.menuIsOpen;o.focusInput(),p?(o.setState({inputIsHiddenAfterUpdate:!u}),o.onMenuClose()):o.openMenu("first"),l.preventDefault()}},o.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(o.clearValue(),l.preventDefault(),o.openAfterFocus=!1,l.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(l){typeof o.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Ws(l.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(l)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(l){var a=l.touches,u=a&&a.item(0);u&&(o.initialTouchX=u.clientX,o.initialTouchY=u.clientY,o.userIsDragging=!1)},o.onTouchMove=function(l){var a=l.touches,u=a&&a.item(0);if(u){var p=Math.abs(u.clientX-o.initialTouchX),g=Math.abs(u.clientY-o.initialTouchY),E=5;o.userIsDragging=p>E||g>E}},o.onTouchEnd=function(l){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(l.target)&&o.menuListRef&&!o.menuListRef.contains(l.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(l){o.userIsDragging||o.onControlMouseDown(l)},o.onClearIndicatorTouchEnd=function(l){o.userIsDragging||o.onClearIndicatorMouseDown(l)},o.onDropdownIndicatorTouchEnd=function(l){o.userIsDragging||o.onDropdownIndicatorMouseDown(l)},o.handleInputChange=function(l){var a=o.props.inputValue,u=l.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(u,{action:"input-change",prevInputValue:a}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(l){o.props.onFocus&&o.props.onFocus(l),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(l){var a=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(l),o.onInputChange("",{action:"input-blur",prevInputValue:a}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(l){if(!(o.blockOptionHover||o.state.focusedOption===l)){var a=o.getFocusableOptions(),u=a.indexOf(l);o.setState({focusedOption:l,focusedOptionId:u>-1?o.getFocusedOptionId(l):null})}},o.shouldHideSelectedOptions=function(){return $f(o.props)},o.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),o.focus()},o.onKeyDown=function(l){var a=o.props,u=a.isMulti,p=a.backspaceRemovesValue,g=a.escapeClearsValue,E=a.inputValue,b=a.isClearable,d=a.isDisabled,f=a.menuIsOpen,h=a.onKeyDown,y=a.tabSelectsValue,m=a.openMenuOnFocus,x=o.state,I=x.focusedOption,w=x.focusedValue,A=x.selectValue;if(!d&&!(typeof h=="function"&&(h(l),l.defaultPrevented))){switch(o.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||E)return;o.focusValue("previous");break;case"ArrowRight":if(!u||E)return;o.focusValue("next");break;case"Delete":case"Backspace":if(E)return;if(w)o.removeValue(w);else{if(!p)return;u?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||l.shiftKey||!f||!y||!I||m&&o.isOptionSelected(I,A))return;o.selectOption(I);break;case"Enter":if(l.keyCode===229)break;if(f){if(!I||o.isComposing)return;o.selectOption(I);break}return;case"Escape":f?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:E}),o.onMenuClose()):b&&g&&o.clearValue();break;case" ":if(E)return;if(!f){o.openMenu("first");break}if(!I)return;o.selectOption(I);break;case"ArrowUp":f?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":f?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!f)return;o.focusOption("pageup");break;case"PageDown":if(!f)return;o.focusOption("pagedown");break;case"Home":if(!f)return;o.focusOption("first");break;case"End":if(!f)return;o.focusOption("last");break;default:return}l.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++KE),o.state.selectValue=Hs(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),c=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=i[c],o.state.focusedOptionId=oc(s,i[c])}return o}return f3(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&&hf(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,i=s.isDisabled,c=s.menuIsOpen,l=this.state.isFocused;(l&&!i&&o.isDisabled||l&&c&&!o.menuIsOpen)&&this.focusInput(),l&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(hf(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,i=this.state,c=i.selectValue,l=i.isFocused,a=this.buildFocusableOptions(),u=o==="first"?0:a.length-1;if(!this.props.isMulti){var p=a.indexOf(c[0]);p>-1&&(u=p)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[u],focusedOptionId:this.getFocusedOptionId(a[u])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,i=s.selectValue,c=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=i.indexOf(c);c||(l=-1);var a=i.length-1,u=-1;if(i.length){switch(o){case"previous":l===0?u=0:l===-1?u=a:u=l-1;break;case"next":l>-1&&l<a&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:i[u]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,i=this.state.focusedOption,c=this.getFocusableOptions();if(c.length){var l=0,a=c.indexOf(i);i||(a=-1),o==="up"?l=a>0?a-1:c.length-1:o==="down"?l=(a+1)%c.length:o==="pageup"?(l=a-s,l<0&&(l=0)):o==="pagedown"?(l=a+s,l>c.length-1&&(l=c.length-1)):o==="last"&&(l=c.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:c[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(c[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(rc):ne(ne({},rc),this.props.theme):rc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,i=this.getStyles,c=this.getClassNames,l=this.getValue,a=this.selectOption,u=this.setValue,p=this.props,g=p.isMulti,E=p.isRtl,b=p.options,d=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:c,getValue:l,hasValue:d,isMulti:g,isRtl:E,options:b,selectOption:a,selectProps:p,setValue:u,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,i=o.isMulti;return s===void 0?i:s}},{key:"isOptionDisabled",value:function(o,s){return Yf(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return Jf(this.props,o,s)}},{key:"filterOption",value:function(o,s){return Qf(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,c=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:i,selectValue:c})}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,i=o.isSearchable,c=o.inputId,l=o.inputValue,a=o.tabIndex,u=o.form,p=o.menuIsOpen,g=o.required,E=this.getComponents(),b=E.Input,d=this.state,f=d.inputIsHidden,h=d.ariaSelection,y=this.commonProps,m=c||this.getElementId("input"),x=ne(ne(ne({"aria-autocomplete":"list","aria-expanded":p,"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":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},p&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(h==null?void 0:h.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?k.createElement(b,ae({},y,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:s,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:u,type:"text",value:l},x)):k.createElement(AE,ae({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Gs,onFocus:this.onInputFocus,disabled:s,tabIndex:a,inputMode:"none",form:u,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),i=s.MultiValue,c=s.MultiValueContainer,l=s.MultiValueLabel,a=s.MultiValueRemove,u=s.SingleValue,p=s.Placeholder,g=this.commonProps,E=this.props,b=E.controlShouldRenderValue,d=E.isDisabled,f=E.isMulti,h=E.inputValue,y=E.placeholder,m=this.state,x=m.selectValue,I=m.focusedValue,w=m.isFocused;if(!this.hasValue()||!b)return h?null:k.createElement(p,ae({},g,{key:"placeholder",isDisabled:d,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),y);if(f)return x.map(function(S,O){var R=S===I,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return k.createElement(i,ae({},g,{components:{Container:c,Label:l,Remove:a},isFocused:R,isDisabled:d,key:D,index:O,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(P){P.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(h)return null;var A=x[0];return k.createElement(u,ae({},g,{data:A,isDisabled:d}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,i=this.commonProps,c=this.props,l=c.isDisabled,a=c.isLoading,u=this.state.isFocused;if(!this.isClearable()||!s||l||!this.hasValue()||a)return null;var p={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return k.createElement(s,ae({},i,{innerProps:p,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,i=this.commonProps,c=this.props,l=c.isDisabled,a=c.isLoading,u=this.state.isFocused;if(!s||!a)return null;var p={"aria-hidden":"true"};return k.createElement(s,ae({},i,{innerProps:p,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,i=o.IndicatorSeparator;if(!s||!i)return null;var c=this.commonProps,l=this.props.isDisabled,a=this.state.isFocused;return k.createElement(i,ae({},c,{isDisabled:l,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return k.createElement(s,ae({},i,{innerProps:a,isDisabled:c,isFocused:l}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),i=s.Group,c=s.GroupHeading,l=s.Menu,a=s.MenuList,u=s.MenuPortal,p=s.LoadingMessage,g=s.NoOptionsMessage,E=s.Option,b=this.commonProps,d=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,y=f.inputValue,m=f.isLoading,x=f.loadingMessage,I=f.minMenuHeight,w=f.maxMenuHeight,A=f.menuIsOpen,S=f.menuPlacement,O=f.menuPosition,R=f.menuPortalTarget,D=f.menuShouldBlockScroll,F=f.menuShouldScrollIntoView,P=f.noOptionsMessage,j=f.onMenuScrollToTop,X=f.onMenuScrollToBottom;if(!A)return null;var z=function(H,V){var W=H.type,J=H.data,re=H.isDisabled,oe=H.isSelected,M=H.label,te=H.value,be=d===J,Z=re?void 0:function(){return o.onOptionHover(J)},Ne=re?void 0:function(){return o.selectOption(J)},Le="".concat(o.getElementId("option"),"-").concat(V),Je={id:Le,onClick:Ne,onMouseMove:Z,onMouseOver:Z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:oe};return k.createElement(E,ae({},b,{innerProps:Je,data:J,isDisabled:re,isSelected:oe,key:Le,label:M,type:W,value:te,isFocused:be,innerRef:be?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(H.data,"menu"))},q;if(this.hasOptions())q=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var H=B.data,V=B.options,W=B.index,J="".concat(o.getElementId("group"),"-").concat(W),re="".concat(J,"-heading");return k.createElement(i,ae({},b,{key:J,data:H,options:V,Heading:c,headingProps:{id:re,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(oe){return z(oe,"".concat(W,"-").concat(oe.index))}))}else if(B.type==="option")return z(B,"".concat(B.index))});else if(m){var Y=x({inputValue:y});if(Y===null)return null;q=k.createElement(p,b,Y)}else{var K=P({inputValue:y});if(K===null)return null;q=k.createElement(g,b,K)}var ce={minMenuHeight:I,maxMenuHeight:w,menuPlacement:S,menuPosition:O,menuShouldScrollIntoView:F},ee=k.createElement(nI,ae({},b,ce),function(B){var H=B.ref,V=B.placerProps,W=V.placement,J=V.maxHeight;return k.createElement(l,ae({},b,ce,{innerRef:H,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:m,placement:W}),k.createElement(DE,{captureEnabled:h,onTopArrive:j,onBottomArrive:X,lockEnabled:D},function(re){return k.createElement(a,ae({},b,{innerRef:function(M){o.getMenuListRef(M),re(M)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:m,maxHeight:J,focusedOption:d}),q)}))});return R||O==="fixed"?k.createElement(u,ae({},b,{appendTo:R,controlElement:this.controlRef,menuPlacement:S,menuPosition:O}),ee):ee}},{key:"renderFormField",value:function(){var o=this,s=this.props,i=s.delimiter,c=s.isDisabled,l=s.isMulti,a=s.name,u=s.required,p=this.state.selectValue;if(u&&!this.hasValue()&&!c)return k.createElement(PE,{name:a,onFocus:this.onValueInputFocus});if(!(!a||c))if(l)if(i){var g=p.map(function(d){return o.getOptionValue(d)}).join(i);return k.createElement("input",{name:a,type:"hidden",value:g})}else{var E=p.length>0?p.map(function(d,f){return k.createElement("input",{key:"i-".concat(f),name:a,type:"hidden",value:o.getOptionValue(d)})}):k.createElement("input",{name:a,type:"hidden",value:""});return k.createElement("div",null,E)}else{var b=p[0]?this.getOptionValue(p[0]):"";return k.createElement("input",{name:a,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,i=s.ariaSelection,c=s.focusedOption,l=s.focusedValue,a=s.isFocused,u=s.selectValue,p=this.getFocusableOptions();return k.createElement(vE,ae({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:c,focusedValue:l,isFocused:a,selectValue:u,focusableOptions:p,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,i=o.IndicatorsContainer,c=o.SelectContainer,l=o.ValueContainer,a=this.props,u=a.className,p=a.id,g=a.isDisabled,E=a.menuIsOpen,b=this.state.isFocused,d=this.commonProps=this.getCommonProps();return k.createElement(c,ae({},d,{className:u,innerProps:{id:p,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:b}),this.renderLiveRegion(),k.createElement(s,ae({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:b,menuIsOpen:E}),k.createElement(l,ae({},d,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),k.createElement(i,ae({},d,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var i=s.prevProps,c=s.clearFocusValueOnUpdate,l=s.inputIsHiddenAfterUpdate,a=s.ariaSelection,u=s.isFocused,p=s.prevWasFocused,g=s.instancePrefix,E=o.options,b=o.value,d=o.menuIsOpen,f=o.inputValue,h=o.isMulti,y=Hs(b),m={};if(i&&(b!==i.value||E!==i.options||d!==i.menuIsOpen||f!==i.inputValue)){var x=d?$E(o,y):[],I=d?Zf(Ys(o,y),"".concat(g,"-option")):[],w=c?qE(s,y):null,A=UE(s,x),S=oc(I,A);m={selectValue:y,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:I,focusedValue:w,clearFocusValueOnUpdate:!1}}var O=l!=null&&o!==i?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},R=a,D=u&&p;return u&&!D&&(R={value:Eo(h,y,y[0]||null),options:y,action:"initial-input-focus"},D=!p),(a==null?void 0:a.action)==="initial-input-focus"&&(R=null),ne(ne(ne({},m),O),{},{prevProps:o,ariaSelection:R,prevWasFocused:D})}}]),n}(_.Component);Qs.defaultProps=QE;var ex=_.forwardRef(function(e,t){var n=Ra(e);return k.createElement(Qs,ae({ref:t},n))}),tx=ex;const nx=v.styled(v.Box)`
|
|
615
615
|
display: flex;
|
|
616
616
|
align-items: center;
|
|
617
617
|
gap: 2px;
|
|
@@ -627,7 +627,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
627
627
|
height: 24px;
|
|
628
628
|
border-radius: 50%;
|
|
629
629
|
margin-right: 12px;
|
|
630
|
-
`;function
|
|
630
|
+
`;function qf(e){const{data:t}=e;return C.jsx(cn.Option,{...e,children:C.jsxs(nx,{children:[t.avatarUrl?C.jsx(rx,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,C.jsx("span",{children:e.children})]})})}const ox=v.styled(v.Box)`
|
|
631
631
|
height: 24px;
|
|
632
632
|
width: 24px;
|
|
633
633
|
border-radius: 50%;
|
|
@@ -652,15 +652,15 @@ 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
|
-
`,
|
|
655
|
+
`,Uf=e=>C.jsx(cn.ClearIndicator,{...e,children:C.jsx(ox,{})}),Kf=(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:v.theme.typography.fontFamily,fontSize:"13px"}}}:null}),sx=v.styled(v.Stack)`
|
|
656
656
|
width: 0;
|
|
657
657
|
height: 0;
|
|
658
|
-
`,ix=({root:e,rootMargin:t,callback:n})=>{const r=_.useRef(null),o=_.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const i=new IntersectionObserver(c=>{const l=c[0];n(l)},{root:e,rootMargin:t});i.observe(s),r.current=i},[e,t,n]);return C.jsx(sx,{ref:o})},
|
|
658
|
+
`,ix=({root:e,rootMargin:t,callback:n})=>{const r=_.useRef(null),o=_.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const i=new IntersectionObserver(c=>{const l=c[0];n(l)},{root:e,rootMargin:t});i.observe(s),r.current=i},[e,t,n]);return C.jsx(sx,{ref:o})},e0=({options:e,isMulti:t,isScrollTarget:n})=>{const r=_.useRef(),o=_.useMemo(()=>e?Object.fromEntries(e.map(c=>[c.value,c])):{},[e]);return{optionsMap:o,getValue:c=>{var u;if(t||typeof c=="object")return c;const l=o[c];return l&&(r.current=l),c===((u=r.current)==null?void 0:u.value)?r.current:c},closeMenuOnScroll:n?c=>{const l=c.target;return!n||!l?!1:n(l)}:void 0}},ax=e=>C.jsx(cn.DropdownIndicator,{...e,children:C.jsx(v.Icon,{children:e.selectProps.menuIsOpen?C.jsx(v.icons.ArrowDropUp,{}):C.jsx(v.icons.ArrowDropDown,{})})}),t0=()=>({ClearIndicator:Uf,DropdownIndicator:ax,IndicatorSeparator:()=>null,Option:qf}),wo=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[i,c]=_.useState(!1),l=_.useCallback(p=>{c(!p.isIntersecting)},[]),{getValue:a,closeMenuOnScroll:u}=e0({options:o,isMulti:s,isScrollTarget:t});return C.jsxs(C.Fragment,{children:[n.menuPortalTarget&&n.root?C.jsx(ix,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:l}):null,C.jsx(tx,{...n,isDisabled:n.disabled,value:r?a(r):void 0,styles:Kf(n.styles,e),components:n.components?n.components:t0(),closeMenuOnScroll:u,...i&&{menuIsOpen:!1}})]})};wo.getDefaultComponents=t0;const n0="Required Field",cx="Validation Failed";var r0=(e=>(e.DATE="DD/MM/YYYY",e))(r0||{}),lx=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function o0(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 i=e.isLoading,c=i===void 0?!1:i,l=e.onInputChange,a=e.filterOption,u=a===void 0?null:a,p=Vt(e,lx),g=p.inputValue,E=_.useRef(void 0),b=_.useRef(!1),d=_.useState(Array.isArray(n)?n:void 0),f=Qe(d,2),h=f[0],y=f[1],m=_.useState(typeof g<"u"?g:""),x=Qe(m,2),I=x[0],w=x[1],A=_.useState(n===!0),S=Qe(A,2),O=S[0],R=S[1],D=_.useState(void 0),F=Qe(D,2),P=F[0],j=F[1],X=_.useState([]),z=Qe(X,2),q=z[0],Y=z[1],K=_.useState(!1),ce=Qe(K,2),ee=ce[0],B=ce[1],H=_.useState({}),V=Qe(H,2),W=V[0],J=V[1],re=_.useState(void 0),oe=Qe(re,2),M=oe[0],te=oe[1],be=_.useState(void 0),Z=Qe(be,2),Ne=Z[0],Le=Z[1];o!==Ne&&(J({}),Le(o)),n!==M&&(y(Array.isArray(n)?n:void 0),te(n)),_.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var Je=_.useCallback(function(lt,ot){if(!s)return ot();var He=s(lt,ot);He&&typeof He.then=="function"&&He.then(ot,function(){return ot()})},[s]);_.useEffect(function(){n===!0&&Je(I,function(lt){b.current&&(y(lt||[]),R(!!E.current))})},[]);var rt=_.useCallback(function(lt,ot){var He=VC(lt,ot,l);if(!He){E.current=void 0,w(""),j(""),Y([]),R(!1),B(!1);return}if(o&&W[He])w(He),j(He),Y(W[He]),R(!1),B(!1);else{var sr=E.current={};w(He),R(!0),B(!P),Je(He,function(Ft){b&&sr===E.current&&(E.current=void 0,R(!1),j(He),Y(Ft||[]),B(!1),J(Ft?ne(ne({},W),{},Cr({},He,Ft)):W))})}},[o,Je,P,W,l]),tn=ee?[]:I&&P?q:h||[];return ne(ne({},p),{},{options:tn,isLoading:O||c,onInputChange:rt,filterOption:u})}var ux=_.forwardRef(function(e,t){var n=o0(e),r=Ra(n);return k.createElement(Qs,ae({ref:t},r))}),dx=ux,fx=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],s0=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(),i=String(r.getOptionLabel(n)).toLowerCase();return s===o||i===o},sc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return s0(t,s,o)})||r.some(function(s){return s0(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function px(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,s=e.formatCreateLabel,i=s===void 0?sc.formatCreateLabel:s,c=e.isValidNewOption,l=c===void 0?sc.isValidNewOption:c,a=e.getNewOptionData,u=a===void 0?sc.getNewOptionData:a,p=e.onCreateOption,g=e.options,E=g===void 0?[]:g,b=e.onChange,d=Vt(e,fx),f=d.getOptionValue,h=f===void 0?Vf:f,y=d.getOptionLabel,m=y===void 0?jf:y,x=d.inputValue,I=d.isLoading,w=d.isMulti,A=d.value,S=d.name,O=_.useMemo(function(){return l(x,Hs(A),E,{getOptionValue:h,getOptionLabel:m})?u(x,i(x)):void 0},[i,u,m,h,x,l,E,A]),R=_.useMemo(function(){return(n||!I)&&O?o==="first"?[O].concat(Ir(E)):[].concat(Ir(E),[O]):E},[n,o,I,O,E]),D=_.useCallback(function(F,P){if(P.action!=="select-option")return b(F,P);var j=Array.isArray(F)?F:[F];if(j[j.length-1]===O){if(p)p(x);else{var X=u(x,x),z={action:"create-option",name:S,option:X};b(Eo(w,[].concat(Ir(Hs(A)),[X]),X),z)}return}b(F,P)},[u,x,w,S,O,p,b,A]);return ne(ne({},d),{},{options:R,onChange:D})}var hx=_.forwardRef(function(e,t){var n=o0(e),r=Ra(n),o=px(r);return k.createElement(Qs,ae({ref:t},o))}),gx=hx;const mx=v.styled(v.Typography)`
|
|
659
659
|
display: block;
|
|
660
660
|
white-space: nowrap;
|
|
661
661
|
overflow: hidden;
|
|
662
662
|
text-overflow: ellipsis;
|
|
663
|
-
`,bx=(e,t)=>{const n=_.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},
|
|
663
|
+
`,bx=(e,t)=>{const n=_.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},i0=e=>k.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function yx(e){return C.jsx(cn.DropdownIndicator,{...e,children:C.jsx(v.Icon,{children:e.selectProps.menuIsOpen?C.jsx(v.icons.ArrowDropUp,{}):C.jsx(v.icons.ArrowDropDown,{})})})}const vx=e=>C.jsxs(v.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[C.jsx(v.Stack,{flexShrink:0,children:C.jsx(i0,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),C.jsxs(mx,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function Cx({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=_.useState([]),[s,i]=_.useState(""),[c,l]=_.useState(!1),a=_.useRef(),{isMulti:u,createOption:p,loadOptions:g,isApiSearchEnabled:E=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:d=!1}=n,{getValue:f,closeMenuOnScroll:h}=e0({options:r,isMulti:u,isScrollTarget:t}),y=(P,j,X)=>(a.current&&a.current.abort("stale data"),a.current=new AbortController,g==null?void 0:g(P,j,X,a.current)),m=bx((P,j)=>{if(i(P),r.length>0&&!E){const z=r.filter(q=>q&&typeof q=="object"&&"label"in q&&typeof q.label=="string"?q.label.toLowerCase().includes(P.toLowerCase()):!1);j(z);return}const X=z=>{j(z),o(z)};y==null||y(P,X,!1)},300),x=(P,j)=>{l(!1),!(j&&"isError"in j&&j.isError)&&o(P)},I=P=>{var j;(j=n.onMenuScrollToBottom)==null||j.call(n,P),b&&g&&!c&&(l(!0),y(s,x,!0))},w=(P,j)=>{var X;(X=n.onInputChange)==null||X.call(n,P,j),j.action==="input-change"&&E&&(i(P),o([]),P||(l(!0),m(P,x)))},A=P=>{var j;i(""),(j=n.onBlur)==null||j.call(n,P)},S=P=>{var j;(j=n.onFocus)==null||j.call(n,P),!c&&d&&(o([]),l(!0),y==null||y(s,x,!1))},O=P=>j=>{var z;const X=j.find(q=>q.label===P);!n.isMulti&&X&&((z=n.onChange)==null||z.call(n,X,{action:"select-option",name:n.name,option:X})),o(j),l(!1)},R=P=>{l(!0),p==null||p(P,O(P))},D=()=>{l(!0),y==null||y(s,x,!1)},F=p?gx:dx;return C.jsx(F,{...n,menuShouldScrollIntoView:!1,value:n.value?f(n.value):null,isDisabled:n.disabled,loadOptions:m,onMenuScrollToBottom:I,onInputChange:w,onBlur:A,onFocus:S,onMenuOpen:D,isLoading:c,defaultOptions:r.length?r:n.defaultOptions||!1,styles:Kf(n.styles,e),components:{ClearIndicator:Uf,DropdownIndicator:yx,IndicatorSeparator:()=>null,Option:qf},closeMenuOnScroll:h,...p?{formatCreateLabel:vx,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:R,options:r}:null})}const Sr="table-cell-form-field",$s="60px",qs="24px",Ix=v.styled(v.Box)`
|
|
664
664
|
width: 100%;
|
|
665
665
|
`,Ex=v.styled(v.Box)`
|
|
666
666
|
width: 100%;
|
|
@@ -679,7 +679,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
679
679
|
&:empty {
|
|
680
680
|
margin-top: 0;
|
|
681
681
|
}
|
|
682
|
-
`,
|
|
682
|
+
`,a0=v.styled(v.Box)`
|
|
683
683
|
--cell-padding: 0;
|
|
684
684
|
display: grid;
|
|
685
685
|
grid-template-columns: subgrid;
|
|
@@ -688,10 +688,10 @@ 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
|
-
`,Ax=v.styled(
|
|
692
|
-
--cell-padding: 10px ${
|
|
691
|
+
`,Ax=v.styled(a0)`
|
|
692
|
+
--cell-padding: 10px ${qs};
|
|
693
693
|
border-bottom: 1px solid var(--border-color);
|
|
694
|
-
`,
|
|
694
|
+
`,ic=v.styled(v.Box)`
|
|
695
695
|
border: var(--border-size) solid transparent;
|
|
696
696
|
border-right: var(--border-size) solid var(--border-color);
|
|
697
697
|
padding: var(--cell-padding, 0);
|
|
@@ -699,7 +699,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
699
699
|
border-right: var(--border-size) solid transparent;
|
|
700
700
|
}
|
|
701
701
|
${({hasError:e})=>e?"border: var(--border-size) solid #CD3746;":""}
|
|
702
|
-
`,
|
|
702
|
+
`,c0=v.styled(v.Button)`
|
|
703
703
|
padding: 0;
|
|
704
704
|
margin: 0;
|
|
705
705
|
outline: 0;
|
|
@@ -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
|
-
`,Sx=v.styled(
|
|
721
|
+
`,Sx=v.styled(c0)`
|
|
722
722
|
box-sizing: content-box;
|
|
723
723
|
padding: 4px 12px;
|
|
724
724
|
color: rgb(80, 109, 255);
|
|
@@ -753,30 +753,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
753
753
|
color: ${v.theme.palette.gray.gray1};
|
|
754
754
|
font-weight: bold;
|
|
755
755
|
`,Ox=v.styled(v.DatePicker)`
|
|
756
|
-
&.${
|
|
757
|
-
height: ${
|
|
756
|
+
&.${Sr} .MuiInputBase-root {
|
|
757
|
+
height: ${$s};
|
|
758
758
|
border: 0;
|
|
759
|
-
padding-left: ${
|
|
759
|
+
padding-left: ${qs};
|
|
760
760
|
}
|
|
761
|
-
`;function Lx(e){const[t,n]=_.useState(!1),r=_.useRef(null);_.useEffect(()=>{t&&r.current&&r.current.focus()},[t]);const o=(s,i)=>{s===null&&e.onChange(s,i),s&&typeof s.getTime=="function"&&!isNaN(s.getTime())&&e.onChange(s,i),e.onChange(s,i)};return C.jsx(Ox,{inputFormat:e.inputFormat?e.inputFormat:
|
|
762
|
-
&.${
|
|
763
|
-
--v-margin: calc((${
|
|
761
|
+
`;function Lx(e){const[t,n]=_.useState(!1),r=_.useRef(null);_.useEffect(()=>{t&&r.current&&r.current.focus()},[t]);const o=(s,i)=>{s===null&&e.onChange(s,i),s&&typeof s.getTime=="function"&&!isNaN(s.getTime())&&e.onChange(s,i),e.onChange(s,i)};return C.jsx(Ox,{inputFormat:e.inputFormat?e.inputFormat:r0.DATE,...e,value:e.value||null,open:t,onOpen:()=>n(!0),onClose:()=>n(!1),onChange:o,PopperProps:{anchorEl:r.current},renderInput:s=>C.jsx(v.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:C.jsx(v.InputAdornment,{position:"end",sx:{cursor:"pointer"},children:C.jsx(v.icons.CalendarTodayOutlinedIcon,{})})},onClick:()=>{t||n(!0)}})})}const Fx=v.styled(v.Checkbox)`
|
|
762
|
+
&.${Sr} {
|
|
763
|
+
--v-margin: calc((${$s} - 36px) / 2);
|
|
764
764
|
--h-margin: calc((100% - 36px) / 2);
|
|
765
765
|
margin: var(--v-margin) var(--h-margin);
|
|
766
766
|
}
|
|
767
|
-
`,Dx=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,i)=>{e==null||e(s,i)};return C.jsx(Fx,{onChange:o,onFocus:t,onBlur:n,...r})},
|
|
767
|
+
`,Dx=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,i)=>{e==null||e(s,i)};return C.jsx(Fx,{onChange:o,onFocus:t,onBlur:n,...r})},l0=({label:e,isRequired:t,prefixNode:n,...r})=>e?C.jsxs(v.Typography,{variant:"h4",component:"label",color:v.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?C.jsx("span",{className:"required__star",children:"*"}):null]}):null,Rx=e=>k.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},k.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"})),u0=250,Yn="__id",Ao={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:u0,arithmeticOperation:[]},Us=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=Ao.defaultNumberOfRows,fixedRows:i=Ao.fixedRows,cellWidth:c=Ao.cellWidth,arithmeticOperation:l=Ao.arithmeticOperation}=Ao,fetchConfig:a={},createConfig:u={},stackIndex:p,onChange:g=()=>{},onFocus:E,onValidationError:b})=>{const d=t??[],f=(o==null?void 0:o.validations)??{},h=_.useRef(),y=_.useRef({}),[m,x]=_.useState({}),{colsLength:I,colsTemplate:w,colWidth:A}=_.useMemo(()=>{let B=0,H="";for(const V of r){let W=V.cols?Number(V.cols):1;isNaN(W)&&(W=1),B+=W,H+=`${V.cols??W}fr `}return i||(B+=.5,H+="0.5fr"),{colsLength:B,colsTemplate:H.trim(),colWidth:`${isNaN(c)?u0:c}px`}},[r,c,i]),{fieldDependency:S,fieldConfigs:O}=_.useMemo(()=>{const B={},H={};for(const V of r){if(!V.valueConfig)continue;H[V.name]=V.valueConfig;const W=V.valueConfig.columnNames;for(const J of W)B[J]||(B[J]=[]),B[J].push(V.name)}return{fieldDependency:B,fieldConfigs:H}},[r]);_.useEffect(()=>{if(t)return;const B=[];for(let H=0;H<s;H++){const V=Ad();B.push({[Yn]:V})}g(B)},[t,g,s]);const R=()=>{const B=Object.entries(y.current).filter(H=>!!H[1])[0];return(B==null?void 0:B[1])??""},D=()=>{const B={[Yn]:Ad()};g([...d,B])},F=B=>{const H=d.filter(V=>V[Yn]!==B);g(H),x(V=>({...V,[B]:{}}));for(const V in y.current)V.startsWith(`${B}.`)&&delete y.current[V];b==null||b(e,R())},P=(B,{columnNames:H=[],operationType:V})=>{const W=H.map(J=>B[J]);return""+Sd(W,V)},j=(B,H)=>{const V=d.map(W=>B!==W[Yn]?W:{...W,...H});g(V)},X=(B,H)=>{const V=d.map(W=>{if(B!==W[Yn])return W;const J={...W};for(const re of H)delete J[re];return J});g(V)},z=(B,H,V,W)=>{var oe;const J=((oe=W==null?void 0:W.target)==null?void 0:oe.value)??"",re={...V,[H]:J};if(S[H])for(const M of S[H]){const te=P(re,O[M]);re[M]=te}j(B,re)},q=(B,H,V)=>{j(B,{[H]:V})},Y=(B,H,V,W)=>{if(V&&typeof V=="object"&&"value"in V&&typeof V.value=="string"&&typeof W.name<"u"){const J="prefillValues"in V&&V.prefillValues,re={...H,[W.name]:V.value,...J};for(const oe in re)if(S[oe])for(const M of S[oe]){const te=P(re,O[M]);re[M]=te}j(B,re)}(W==null?void 0:W.action)==="clear"&&W.name&&X(B,[W.name])},K=(B,H,V)=>{j(B,{[H]:(V==null?void 0:V.toISOString())??""})},ce=(B,H,V,W)=>{W&&x(J=>{const re=J[B]??{};return{...J,[B]:{...re,[H]:V}}}),y.current={...y.current,[`${B}.${H}`]:typeof V=="string"?V:""},b==null||b(e,R())},ee=B=>h.current===B;return C.jsxs(Ix,{children:[C.jsx(Ex,{ref:h,children:C.jsxs(xx,{gridColumns:w,minWidth:`calc( ${I} * ${A} )`,children:[C.jsx(Ax,{children:r.map(({name:B,label:H,isRequired:V})=>C.jsx(ic,{children:C.jsx(l0,{label:H,isRequired:V})},B))}),d.map(({[Yn]:B,...H})=>C.jsxs(a0,{children:[r.map(({name:V,key:W,...J})=>{var re;return C.jsx(ic,{hasError:!!((re=m==null?void 0:m[B])!=null&&re[V]),children:C.jsx(So,{name:V,value:H[V],...J,className:Sr,label:"",hideHelperText:!0,validation:f==null?void 0:f[V],onFocus:E,inputChangeHandler:oe=>z(B,V,H,oe),checkboxChangeHandler:(...oe)=>q(B,V,oe[1]),selectChangeHandler:(...oe)=>Y(B,H,...oe),dateChangeHandler:(oe,M)=>K(B,oe,M),onValidationError:(...oe)=>ce(B,...oe),fetchConfig:a==null?void 0:a[V],createConfig:u==null?void 0:u[V],isScrollTarget:ee,...p?{menuPortalTarget:document.body,stackIndex:p}:null})},V??W)}),i?null:C.jsx(ic,{children:C.jsx(v.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:C.jsx(c0,{onClick:()=>F(B),children:C.jsx(Rx,{})})})})]},B))]})}),C.jsxs(wx,{children:[i?null:C.jsxs(Sx,{onClick:D,children:[C.jsx(i0,{}),C.jsx(v.Typography,{children:"Add Line"})]}),l.length?C.jsx(_x,{children:l.map(({label:B,columnName:H,operationType:V,prefix:W="",prefixKey:J,suffix:re="",suffixKey:oe})=>C.jsxs(Tx,{children:[C.jsx(v.Typography,{fontWeight:500,children:B}),C.jsxs(v.Typography,{children:[C.jsxs("span",{children:[n[J]??W," "]}),C.jsx("span",{children:Sd(d.map(M=>M[H]),V)}),C.jsx("span",{children:n[oe]??re})]})]},B))}):null]})]})};Us.ROW_ID=Yn;const kx=v.styled(v.Box)`
|
|
768
768
|
box-sizing: border-box;
|
|
769
|
-
&:not(:has(.${
|
|
769
|
+
&:not(:has(.${Sr})) {
|
|
770
770
|
transform: translate(0, 5px);
|
|
771
771
|
padding-bottom: 5px;
|
|
772
772
|
}
|
|
773
773
|
`,Nx=v.styled(v.TextField)`
|
|
774
|
-
&.${
|
|
775
|
-
height: ${
|
|
774
|
+
&.${Sr} {
|
|
775
|
+
height: ${$s};
|
|
776
776
|
position: relative;
|
|
777
777
|
& > div {
|
|
778
778
|
height: 100%;
|
|
779
|
-
padding-left: ${
|
|
779
|
+
padding-left: ${qs};
|
|
780
780
|
}
|
|
781
781
|
|
|
782
782
|
fieldset.MuiOutlinedInput-notchedOutline {
|
|
@@ -809,7 +809,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
809
809
|
&.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
|
|
810
810
|
border-width: 1px;
|
|
811
811
|
}
|
|
812
|
-
`,
|
|
812
|
+
`,d0=v.styled(v.Box)`
|
|
813
813
|
& .hiverFormField__placeholder {
|
|
814
814
|
color: #97a3b7;
|
|
815
815
|
}
|
|
@@ -904,20 +904,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
904
904
|
border-radius: 4px;
|
|
905
905
|
}
|
|
906
906
|
|
|
907
|
-
& .${
|
|
908
|
-
height: ${
|
|
907
|
+
& .${Sr} {
|
|
908
|
+
height: ${$s};
|
|
909
909
|
.hiverFormField__control {
|
|
910
910
|
height: 100%;
|
|
911
911
|
border: 0;
|
|
912
912
|
.hiverFormField__value-container {
|
|
913
|
-
padding-left: ${
|
|
913
|
+
padding-left: ${qs};
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
.hiverFormField__indicators {
|
|
917
917
|
height: 100%;
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
|
-
`,
|
|
920
|
+
`,f0=v.styled(v.Box)`
|
|
921
921
|
font-size: 12px;
|
|
922
922
|
font-weight: 400;
|
|
923
923
|
font-family: ${v.theme.typography.fontFamily};
|
|
@@ -993,7 +993,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
993
993
|
transform: translate(5px, 0);
|
|
994
994
|
height: 34px;
|
|
995
995
|
width: 34px;
|
|
996
|
-
`,Hx=e=>k.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),
|
|
996
|
+
`,Hx=e=>k.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),So=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:i,inputChangeHandler:c,selectChangeHandler:l,dateChangeHandler:a,tableChangeHandler:u,checkboxChangeHandler:p,...g})=>{const{validation:E,helperText:b,id:d,label:f,name:h,type:y,validateOnBlur:m=!0,validateOnChange:x=!0,isRequired:I,labelSpacing:w=1,showGlobalLoader:A=!1,hideHelperText:S=!1,meta:{isExpandable:O=y==="table",isExpanded:R=!0}={}}=g,[D,F]=_.useState(!1),[P,j]=_.useState(""),[X,z]=_.useState(R);_.useEffect(()=>{D||Y(g.value,!1)},[D,g.value]);const q=M=>{var te;M&&!D&&F(!0),(te=g.onFocus)==null||te.call(g,M)};function Y(M,te=!0,be){let Z="";if((E!=null&&E.isRequired||I)&&(Z=M?"":n0,!M&&typeof(E==null?void 0:E.isRequired)=="function")){const Le=E.isRequired(M);Le&&typeof Le=="boolean"?Z=n0:Le&&(Z=Le)}let Ne={id:d,name:h,label:f};if(g.type==="date"?Ne={...Ne,disableFuture:g.disableFuture,disablePast:g.disablePast}:g.type==="number"?Ne={...Ne,min:g.min,max:g.max}:g.type==="text"&&g.multiline&&(Ne={...Ne,maxCharacters:g.maxCharacters}),M&&!Z&&(E!=null&&E.validate)){const Le=E.validate(M,{...Ne,...be});typeof Le=="boolean"&&Le===!1?Z=cx:typeof Le=="string"&&(Z=Le)}te&&j(Z),i==null||i(h,Z,te)}const K=M=>{var te;D||F(!0),(te=g.onBlur)==null||te.call(g,M),D&&m&&Y(g.value)},ce=()=>S?null:g.helperText?C.jsx(f0,{children:b}):D&&P?C.jsx(f0,{className:"helper--error",children:P}):null,ee=M=>{M&&!D&&F(!0),c==null||c(M),D&&x&&Y(M.target.value)},B=(M,te)=>{M&&!D&&F(!0),p==null||p(M,te),D&&x&&Y(te)},H=(M,te)=>{l==null||l(M,te),M&&!D&&F(!0),M&&typeof M=="object"&&"value"in M&&D&&x&&Y(M.value)},V=(M,te)=>{a==null||a(h,M,te),M&&!D&&F(!0),D&&x&&Y(M)},W=M=>{u==null||u(h,M)},J=(M,te)=>{D&&(i==null||i(M,te),j(typeof te=="string"?te:""))},re=M=>{z(te=>!te)},oe=M=>{if(A)return C.jsx(v.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(M.type){case"select":return C.jsx(d0,{children:C.jsx(wo,{...M,stackIndex:o,isScrollTarget:s,className:`formField__select ${P&&D?"formField__select--error":""} ${M.className||""}`,classNamePrefix:"hiverFormField",onBlur:K,onChange:H,onFocus:q,menuPortalTarget:n})});case"async-select":return C.jsx(d0,{children:C.jsx(Cx,{...M,stackIndex:o,isScrollTarget:s,className:`formField__select ${P&&D?"formField__select--error":""} ${M.className||""}`,classNamePrefix:"hiverFormField",onBlur:K,onChange:H,onFocus:q,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return C.jsx(Lx,{...M,label:void 0,onBlur:K,onFocus:q,onChange:V,error:!!(P&&D)});case"table":return C.jsx(Us,{...M,value:M.value,onChange:W,onFocus:q,onValidationError:J,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return C.jsx(Dx,{...M,onChange:B,onFocus:q,onBlur:K});default:return C.jsx(Mx,{variant:"outlined",fullWidth:!0,id:d,...M,value:M.value,label:void 0,onBlur:K,onChange:ee,onFocus:q,error:!!(P&&D),inputProps:{type:M.type,min:M.min,max:M.max,...M.inputProps}})}};return C.jsxs(Vx,{spacing:w,useFlexGap:!0,...O&&{className:`expandable ${X?"open":"close"}`},children:[C.jsx(l0,{label:f,htmlFor:d,isRequired:!!(E!=null&&E.isRequired)||I,prefixNode:O?C.jsx(jx,{children:C.jsx(Hx,{className:"arrow-icon"})}):null,...O&&{onClick:()=>re()}}),C.jsxs(Bx,{className:"input-wrapper",children:[C.jsx(v.Tooltip,{title:g.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:oe(g)}),r!=null&&r.icon?C.jsx(v.Tooltip,{title:r.toolTipText,placement:"bottom",children:C.jsx(Gx,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),ce()]})},Wx=v.styled(v.Stack)`
|
|
997
997
|
& .authform__section-title {
|
|
998
998
|
margin-top: 32px;
|
|
999
999
|
margin-bottom: -12px;
|
|
@@ -1012,7 +1012,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
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
|
-
`,
|
|
1015
|
+
`,p0=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:i,predicates:c,values:l,validations:a,onValidationError:u,stackIndex:p,sectionSpacing:g=3,fieldsSpacing:E=3,labelSpacing:b=1,fetchConfig:d,createConfig:f,showGlobalLoader:h=!1,cols:y=1})=>{const m=x=>(I,w)=>{n==null||n(I,w,x)};return C.jsx(Wx,{spacing:g,children:e.map(({id:x,title:I,formFields:w})=>w.every(S=>S.hideInUI)?null:C.jsxs(_.Fragment,{children:[I&&w.length?C.jsx(v.Typography,{variant:"h3",className:"authform__section-title",children:I}):null,C.jsx(Zx,{useFlexGap:!0,spacing:E,cols:y,children:w.map(S=>{var O;return c&&typeof c=="object"&&S.name in c&&c[S.name]===!1||S.hideInUI?null:C.jsx(Xx,{cols:S.cols??1,children:C.jsx(So,{value:l==null?void 0:l[S.name],data:l,...S,stackIndex:p,selectChangeHandler:m(S),inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:i,validation:a==null?void 0:a[S.name],onValidationError:u,iconData:t==null?void 0:t[S.name],labelSpacing:b,fetchConfig:d==null?void 0:d[S.name],createConfig:f==null?void 0:f[S.name],showGlobalLoader:h})},((O=d==null?void 0:d[S.name])==null?void 0:O.key)||S.name)})})]},x))})},zx=v.styled(v.Box)`
|
|
1016
1016
|
width: 100%;
|
|
1017
1017
|
aspect-ratio: ${({aspectRatio:e})=>e};
|
|
1018
1018
|
border-radius: 8px;
|
|
@@ -1036,8 +1036,8 @@ 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
|
-
`,Yx=e=>k.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),k.createElement("g",{clipPath:"url(#clip0_7787_114457)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_7787_114457"},k.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),Jx=({aspectRatio:e="auto",...t})=>{const[n,r]=_.useState(!1);return n?null:C.jsxs(zx,{aspectRatio:e,children:[C.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),C.jsx(Yx,{className:"play-icon"})]})},cc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},Qx=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],wo=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const i=t[o];return e.values&&e.values[i]&&typeof e.values[i]=="object"&&"value"in e.values[i]?s=e.values[i].value:e.values&&e.values[i]&&typeof e.values[i]!="object"?s=e.values[i]:s=null,{...r,[o]:s}},{}):{},lc=({formFields:e})=>{const t={};return e.forEach(n=>{var r,o,s,i,c,l;if(t[n.name]={},(r=n.validations)!=null&&r.isRequired&&(typeof n.validations.isRequired=="object"?t[n.name].isRequired=e3(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let a=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";a=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:a,t[n.name].validate=t3(a);return}if(n.type==="number"&&((i=n.validations)!=null&&i.range)){t[n.name].validate=n3();return}if(n.type==="text"&&n.limit){t[n.name].validate=r3();return}if(n.type==="table"){const a=lc({formFields:n.columns??[]});t[n.name].validations=a}if((c=n.validations)!=null&&c.isUrl){const a=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=Uv(a)}else if((l=n.validations)!=null&&l.isEmail){const a=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=Kv(a)}}),t},Us={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[qs.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},Ks=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return Us.isMultiSelect(o)?s=o.map(i=>i.value):Us.isTable(o)?s=o.map(({...c})=>(delete c[qs.ROW_ID],c)).filter(c=>Object.keys(c).length>0):Us.isSelect(o)?s=o.value:Us.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),$x=(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]}))},g0=(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 i of o){const c=g0(r.columns,i);s+=c}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},Tr="/v1/api",qx=`${Tr}/connectors/conversation/:conversationId/metadata`,Ux=`${Tr}/connectors/forms/:formId/field/:fieldName/data`,Kx=`${Tr}/connectors/form/:formId`,e5=`${Tr}/connectors/forms/:id/link`,t5=`${Tr}/connectors/forms/:id/preview`,n5=`${Tr}/connectors/conversation/:conversationId/selected-email`,r5=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),qe({url:br(`${Ux}?${r.toString()}`,e),method:it.POST,data:t})},o5=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),qe({url:br(`${Kx}?${r.toString()}`,e),method:it.POST,data:t})},s5=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),qe({url:`${t5.replace(":id",e)}?${r.toString()}`,method:it.POST,data:{args:t}})},m0={optionsMap:null,createOptionApi:K.IDLE,dropdownOptionsApis:K.IDLE,previewCardData:null,previewCardApiStatus:K.IDLE,selectedSuggestionType:"basic"},b0=Fa({name:"commonSlice",initialState:m0,reducers:{resetState:()=>m0,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=K.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(ei.pending,t=>{t.createOptionApi=K.LOADING}).addCase(ei.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=K.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(ei.rejected,t=>{t.createOptionApi=K.FAILED}).addCase(Yn.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(Yn.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:i,searchTerm:c,key:l}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[l]:{options:o,hasMore:s,currentPage:i,searchTerm:c}}}).addCase(Yn.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(Or.pending,t=>{t.previewCardApiStatus=K.LOADING}).addCase(Or.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=K.IDLE}).addCase(Or.rejected,t=>{t.previewCardApiStatus=K.FAILED})}}),ei=Vt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var d,f,h;const{fieldName:r,label:o,formId:s,interfaceId:i,conversationId:c=null,args:l={},createArgs:a={},callback:u}=e,p=cc(l||{},s,r),{common:g}=t(),{options:E=[],...b}=((d=g.optionsMap)==null?void 0:d[p])||{};try{const y=await o5({fieldName:r,formId:i},{args:a,conversation_id:c});if(!y||!("data"in y)||!("output_variables"in y.data)||!("external_resource_id"in y.data.output_variables))throw y;const m=y.data.output_variables,{external_resource_id:x,...I}=m,A=[{label:o,value:x,prefillValues:I},...E],S=Td(A,T=>T.value);return u==null||u(S),{optionsList:S,key:p,...b}}catch(y){u==null||u(E);const m=y,x=(f=m==null?void 0:m.response)==null?void 0:f.data,I=typeof x=="string"?x:(x==null?void 0:x.message)||ws;return Me({message:I,type:ht}),n((h=m==null?void 0:m.response)==null?void 0:h.status)}}),Yn=Vt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,T;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:i,callback:c,args:l={},interfaceId:a="",pagination:u={enabled:!1},controller:p}=e,g=cc(l||{},o,r),{common:E}=t();let b=!1;i.meta&&"showAvatar"in i.meta&&typeof i.meta.showAvatar=="boolean"&&(b=i.meta.showAvatar);const d=((A=E.optionsMap)==null?void 0:A[g])||{},f=!e.isScrollToBottomEvent&&(!d||s!==d.searchTerm),h=f?[]:d.options||[],y=f?!0:d.hasMore??!0,m=f?0:d.currentPage??0,{enabled:x,limit:I}=u,w=I||10;try{let R;const D=p==null?void 0:p.signal,F=x?{pageNumber:m+1,searchTerm:s,limit:w,enabled:x}:null;if(y&&(R=await r5({fieldName:r,formId:o},{pagination:F||{},args:l,interfaceId:a})),D!=null&&D.aborted)throw D.reason;if(!R||!R.data||!("data"in R.data)||!Array.isArray(R.data.data)||!R.data.data.length){const{common:J}=t(),z=(S=J.optionsMap)==null?void 0:S[g];return c==null||c(z.options??[]),{...z,optionsList:z.options??[],key:g,hasMore:!1}}const j=R.data.data.map(J=>b?{...J,avatarUrl:J.avatarUrl||Gv}:(delete J.avatarUrl,J)),X=[...h,...j],Y=x?j.length>=w:!1,q=Td(X,J=>J.value);return c==null||c(q),{optionsList:q,fieldName:r,formId:o,searchTerm:s,currentPage:m+1,hasMore:Y,key:g}}catch(R){const{common:D}=t(),F=((T=D.optionsMap)==null?void 0:T[g])||{};return c==null||c(F.options??[]),n(R)}},{condition:(e,{getState:t})=>{var p;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:i}=e,c=cc(i||{},r,n),{common:l}=t(),a=(p=l.optionsMap)==null?void 0:p[c];if((a==null?void 0:a.searchTerm)!==o)return!0;const u=(a==null?void 0:a.options)||[];return u&&u.length?(s==null||s(u),!1):!0}}),Or=Vt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const i=await s5(e,t,n),c=i==null?void 0:i.data;return c?(r&&Me({message:wd,type:In}),{data:wu(c)}):(r&&Me({message:xd,type:ht}),{data:null})}catch(i){return o({status:(s=i.response)==null?void 0:s.status})}}),{resetState:gA,resetPreviewCardData:i5,setSelectedSuggestionType:a5}=b0.actions,c5=b0.reducer,Ao="/v1/api",l5=`${Ao}/connectors/forms/list`,u5=`${Ao}/connectors/cards/:id/unlink`,d5=`${Ao}/connectors/forms/:id/link`,f5=`${Ao}/connectors/form/:formId`,p5=`${Ao}/connectors/forms/:formId/data`,h5=({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)),qe({url:`${l5}?${r.toString()}`,method:it.GET})},y0=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),qe({url:br(`${f5}?${r.toString()}`,e),method:it.POST,data:t})},g5=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),qe({url:`${u5.replace(":id",e)}?${o.toString()}`,method:it.POST,data:{externalResourceId:n,conversationId:r}})},m5=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),qe({url:`${d5.replace(":id",e)}?${s.toString()}`,method:it.POST,data:{externalResourceId:t,conversationId:r}})},b5=(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),qe({url:`${p5.replace(":formId",e)}?${s.toString()}`,method:it.GET})},y5="Error in previewing the card",v0="Link format isn't recognized. Please check that you've entered a valid URL",v5="Item already linked",C5="Card linked successfully",I5="Error in linking the card",E5="New card created",x5="Card creation failed",w5="Create and link objects from different apps to this conversation",A5="Are you sure you want to change the primary object?",S5="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",_5="Are you sure you want to leave?",T5=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
|
|
1040
|
-
Do you want to continue?`,O5="Select an object to create",L5="Select an object to link",C0="Select object",F5="Paste URL or ID",D5="Object ID/Link",R5="Card updated",k5="Card updation failed",I0=3,E0=(e,t)=>{var r,o,s,i,c,l,a,u,p,g,E,b,d;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:((i=e.meta)==null?void 0:i.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((c=e.validations)!=null&&c.disablePast)||!1,disableFuture:!!((l=e.validations)!=null&&l.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((u=(a=e.validations)==null?void 0:a.range)==null?void 0:u.min)||Number.MIN_SAFE_INTEGER,max:((g=(p=e.validations)==null?void 0:p.range)==null?void 0:g.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((E=e.validations)==null?void 0:E.maxRows)||5,limit:(b=e.validations)==null?void 0:b.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(d=e.validations)==null?void 0:d.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},x0=Fa({name:"writeCapability",initialState:Ad,reducers:{resetState:()=>Ad,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=K.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ti.pending,t=>{t.objectListApiStatus=K.LOADING}).addCase(ti.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:i,searchObjectList:c,formFields:l,objectDict:a,dependentFieldsMap:u}=n.payload;t.objectListApiStatus=K.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=i,t.searchObjectList=c,t.formFields=l,t.objectDict=a,t.dependentFieldsMap=u}).addCase(ti.rejected,t=>{t.objectListApiStatus=K.FAILED}).addCase(Yn.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(Yn.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:i,key:c}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:i}}}).addCase(Yn.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(ni.pending,t=>{t.createFormApiStatus=K.LOADING}).addCase(ni.fulfilled,t=>{t.createFormApiStatus=K.IDLE}).addCase(ni.rejected,t=>{t.createFormApiStatus=K.FAILED}).addCase(si.pending,t=>{t.linkCardApiStatus=K.LOADING}).addCase(si.fulfilled,t=>{t.linkCardApiStatus=K.IDLE}).addCase(si.rejected,t=>{t.linkCardApiStatus=K.FAILED}).addCase(oi.pending,t=>{t.unlinkCardApiStatus=K.LOADING}).addCase(oi.fulfilled,t=>{t.unlinkCardApiStatus=K.IDLE}).addCase(oi.rejected,t=>{t.unlinkCardApiStatus=K.FAILED}).addCase(ri.pending,t=>{t.updateFormApiStatus=K.LOADING}).addCase(ri.fulfilled,t=>{t.updateFormApiStatus=K.IDLE}).addCase(ri.rejected,t=>{t.updateFormApiStatus=K.FAILED}).addCase(ii.pending,t=>{t.currentResourceDetailsApiStatus=K.LOADING}).addCase(ii.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=K.IDLE}).addCase(ii.rejected,t=>{t.currentResourceDetailsApiStatus=K.FAILED})}}),ti=Vt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await h5({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 i=s.data.formsList,c={},l=[],a=[],u=[],p=[],g=[],E={},b={};return i==null||i.forEach(d=>{var h,y;if(d.expandedView&&!o)return;const f={...d};"fieldList"in f&&delete f.fieldList,b[d.id]=f,c[d.id]||(c[d.id]={}),E[d.id]||(E[d.id]=[]),d.type==="create"&&d.authenticated?(l.push({value:d.id,label:d.name,avatarUrl:d.logoUrl,connectorKey:d.connectorName}),d.connectorName&&!a.includes(d.connectorName)&&a.push(d.connectorName)):d.type==="link"&&d.authenticated?u.push({value:d.id,label:d.name,avatarUrl:d.logoUrl}):d.type==="edit"&&d.authenticated?p.push({value:d.id,label:d.name,avatarUrl:d.logoUrl}):d.type==="search_and_link"&&d.authenticated&&g.push({value:d.id,label:d.name,avatarUrl:d.logoUrl}),(h=d.fieldList)==null||h.sort((m,x)=>m.priority-x.priority),(y=d.fieldList)==null||y.forEach(m=>{const x=E0(m);if(x.columns&&(x.columns=x.columns.map(I=>E0(I,{loadOptionsOnFocus:!0,defaultOptions:!1}))),E[d.id]=[...E[d.id],x],m.interfaceDetails&&(m.interfaceDetails.args||m.interfaceDetails.optionalArgs)){const I={...m.interfaceDetails.args,...m.interfaceDetails.optionalArgs};Object.values(I).forEach(w=>{c[d.id][w]?c[d.id][w]=[...c[d.id][w],m.name]:c[d.id][w]=[m.name]})}})}),{createObjectList:l,createObjectConnectorNamesList:a,linkObjectList:u,editObjectList:p,searchObjectList:g,formFields:E,objectDict:b,dependentFieldsMap:c}}),ni=Vt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var l;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:i,conversationId:c}=e;try{await y0({formId:n},{args:s,interfaceId:i,conversationId:c}),r==null||r(),Me({message:E5,type:In})}catch(a){const u=a,p=(l=u==null?void 0:u.response)==null?void 0:l.data,g=(p==null?void 0:p.message)??x5;return o==null||o(a),Me({message:g,type:ht}),t(a)}}),ri=Vt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:i,conversationId:c,externalResourceId:l,previousArgs:a={}}=e;try{await y0({formId:n},{args:s,interfaceId:i,conversationId:c,externalResourceId:l,previousArgs:a}),r==null||r(),Me({message:R5,type:In})}catch(u){return o==null||o(u),Me({message:k5,type:ht}),t(u)}}),oi=Vt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await g5(e,t,n,r)}),si=Vt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var i;try{await m5(e,t,n,r,o)}catch(c){return s({status:(i=c.response)==null?void 0:i.status})}}),ii=Vt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:i}=e;try{const c=await b5(n,r,o,s,i),l=c==null?void 0:c.data,a=c==null?void 0:c.status,u={values:{},errors:{}};return Object.entries(l.formData).forEach(([p,g])=>{"label"in g&&(g.type&&g.type==="date"?u.values[p]=g.label?new Date(parseInt(g.label)).toISOString():"":g.type&&g.type==="multi-select"&&"value"in g&&"label"in g&&g.value&&g.label?u.values[p]=[{value:g.value,label:g.label}]:g.value?u.values[p]={value:g.value,label:g.label}:u.values[p]=g.label)}),{data:u,status:a}}catch(c){return Me({message:ws,type:ht}),t(c)}}),{resetState:mA,setCurrentCardInEdit:Lr,resetCurrentResourceDetails:N5,setHasUnsavedChanges:w0}=x0.actions,P5=x0.reducer,M5=()=>{const[e,t]=_.useState(null),[n,r]=_.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=_.useCallback(s=>{t(s)},[]);return _.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const i=100;let c=null;const l=150,a=u=>{s||(s=window.setTimeout(()=>{const p=u.target,g=Number(e.dataset.prevScrollLeft)||0,E=Number(e.dataset.prevScrollTop)||0,b=p.scrollLeft,d=p.scrollTop,f=b-g,h=d-E,y=Math.abs(h)>Math.abs(f),m=Math.abs(f)>Math.abs(h);r({isVertical:y,isHorizontal:m,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(d),s=null},i),c&&window.clearTimeout(c),c=window.setTimeout(()=>{r(p=>({...p,isScrolling:!1})),c=null},l))};return e.addEventListener("scroll",a),()=>{e.removeEventListener("scroll",a),s&&window.clearTimeout(s),c&&window.clearTimeout(c)}},[e]),[n,o]},B5="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",j5=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=jt(),{sendTrackingEvent:s,currentSmIds:i}=_.useContext(Ve),{userGroupId:c}=Yt()||{},[l,a]=M5(),{isScrolling:u,isVertical:p}=l,g=u&&p,E=_.useMemo(()=>(e==null?void 0:e[0].data.map(h=>h.label))||[],[e]),b=_.useMemo(()=>e.map(h=>{const y={cells:{},externalResourceId:h.externalResourceId};return h.data.forEach((m,x)=>{if(E[x]){let I=m.value?m.value:ds;I&&m.type==="date"&&(I=new Date(parseInt(I)).toLocaleDateString(navigator.language)),y.cells[E[x]]={label:I,deepLink:m==null?void 0:m.deepLink}}}),y}),[e,E]),d=(h,y)=>C.jsx(pb,{align:"left",children:h.deepLink?C.jsx(v.Link,{target:"_blank",underline:"none",href:h.deepLink,children:h.label}):C.jsx(v.Typography,{variant:"body2",color:"gray.black",children:h.label})},`${y}_${h.label}`),f=h=>{!h||!n||(r(!1),s(cu,{card_title:n.title,connector_name:n.connectorName,ug_id:c,sm_ids:i}),o(Lr({...n,externalResourceId:h})))};return C.jsxs(v.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[C.jsx(v.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),C.jsx(v.TableContainer,{ref:a,children:C.jsxs(v.Table,{stickyHeader:!0,children:[C.jsx(ub,{children:C.jsxs(v.TableRow,{children:[E.map(h=>C.jsx(db,{sx:{whiteSpace:"nowrap"},children:C.jsx(v.Typography,{variant:"overline",color:"gray.gray3",children:h})},h)),C.jsx(gb,{})]})}),C.jsx(v.TableBody,{children:b.map((h,y)=>C.jsxs(fb,{children:[Object.values(h.cells).map((m,x)=>d(m,x)),C.jsx(hb,{children:!g&&h.externalResourceId&&C.jsx(v.Tooltip,{title:mu,placement:"bottom",children:C.jsx(v.IconButton,{className:"row-edit",onClick:()=>f(h.externalResourceId),children:C.jsx("img",{src:B5})})})})]},`id_${y}`))})]})})]})},V5=e=>e.cardList.connectorCards,G5=e=>e.cardList.connectorsEnabled,H5=e=>e.cardList.connectorApiStatus,W5=e=>e.cardList.cardSpecificData,Z5=e=>e.cardList.specificConnectorApiStatus,X5=e=>e.cardList.specificConnectorErrorCode,z5="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",A0=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}},Y5=(e,t)=>`${vu} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),S0=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:i,redirectToAdminTab:c,isFailed:l,connectorNames:a,cardTitle:u,currentCard:p,cardId:g,isCardLevelError:E,fieldName:b,showErrorIcon:d}=e,f=_.useRef(null),h=_.useRef(null),{email:y,currentSmIds:m,conversationId:x,sendTrackingEvent:I,connectorFunctions:w}=_.useContext(Ve),A=be(X5),S=A==null?void 0:A[g],[T,R]=_.useState(!1),D=_.useMemo(()=>{if(n&&E){const{error_message:z}=A0(n);return z}return l?vu.replace(/{{connector_name}}/g,(a==null?void 0:a[0])||""):uu},[n,l,a,E]),F=_.useCallback(()=>{const z=n||Y5(S,a),{error_code:ae,error_message:le}=A0(z);I==null||I(k1,{sm_ids:m,frontend_req_params:{email:y,conversationId:x,externalResourceId:p==null?void 0:p.externalResourceId},card_title:u,connector_name:a!=null&&a.length?a:"",error_code:ae,error_message:le})},[n,S,I,m,y,x,u,a,p==null?void 0:p.externalResourceId]);_.useEffect(()=>{(n&&E||l&&S)&&F()},[F,S,l,n,E]),_.useEffect(()=>{const z=r?h.current:f.current;if(z){const ae=z.scrollHeight>z.clientHeight||z.scrollWidth>z.clientWidth;R(ae)}},[t,r]);const P=o==ia.NOT_FOUND;let j=P?ds:t;i==="date"&&j&&!P&&(j=new Date(parseInt(j)).toLocaleDateString(navigator.language));const X=!!n||l,Y=()=>{c?w==null||w.redirectToAdmin():window.open(mm,"_blank")},q=()=>{I==null||I(N1,{sm_ids:m,card_title:u,field_name:b})},J=z=>{const ae=/<>(.*?)<>/g,le=z.split(ae);return C.jsx(_.Fragment,{children:le.map((B,H)=>H%2===1?C.jsx(ib,{variant:"body2",onClick:Y,children:B},H):B)})};return s?C.jsx(yn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):X?C.jsxs(Fu,{gap:"7px",children:[d?C.jsx(v.Stack,{marginTop:"3px",flexShrink:"0",children:C.jsx("img",{src:z5,width:"18px",height:"18px"})}):null,C.jsx(Du,{variant:"body2",children:D?J(D):uu})]}):C.jsx(v.Tooltip,{title:T?j:null,placement:"bottom",children:r?C.jsx(Ru,{ref:h,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:q,children:j||ds}):C.jsx(cb,{ref:f,variant:"body2",children:j||ds})})},_0="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",uc=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4})=>C.jsx(v.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},children:C.jsxs(v.Stack,{direction:"row",children:[r&&C.jsx(v.Box,{position:"absolute",right:10,top:10,children:C.jsx(v.Tooltip,{title:"Close",placement:"bottom",children:C.jsx(v.IconButton,{onClick:()=>t(!1),children:C.jsx("img",{src:_0})})})}),n]})}),T0=e=>{var B,H,V;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:i}=e,c=24,l=(o==null?void 0:o[t])===K.IDLE,a=(o==null?void 0:o[t])===K.LOADING,u=(o==null?void 0:o[t])===K.FAILED,{cardType:p,data:g,cardErrorMessage:E,redirectToAdminTab:b,connectorNames:d}=(r==null?void 0:r[t])||{},f=p==="flat",[h,y]=_.useState(!1),[m,x]=_.useState(!1),[I,w]=_.useState(!1),[A,S]=_.useState(!1),T=((B=g==null?void 0:g.listItems)==null?void 0:B.statusCode)!==401,R=_.useMemo(()=>{var Z,U,ee,re;return f&&((Z=g==null?void 0:g.flatDisplay)!=null&&Z.data)?g.flatDisplay.data:!f&&((re=(ee=(U=g==null?void 0:g.listItems)==null?void 0:U.fields)==null?void 0:ee[0])!=null&&re.data)?g.listItems.fields[0].data:[]},[f,g]),D=_.useMemo(()=>R==null?void 0:R.slice(0,5),[R]),[F,P]=_.useState([]),j=_.useRef(null),[X,Y]=_.useState(0),q=h?-180:0,J=f?!1:!!((H=g==null?void 0:g.listItems)!=null&&H.errorMessage),z=J||u||E,ae=l&&!J&&s&&(I||m);_.useLayoutEffect(()=>{var Z;(Z=j.current)!=null&&Z.scrollHeight&&Y(j.current.scrollHeight+c)},[o==null?void 0:o[t],F,j]),_.useEffect(()=>{var re,M;const Z=((R==null?void 0:R.length)||0)>5,U=!f&&(((M=(re=g==null?void 0:g.listItems)==null?void 0:re.fields)==null?void 0:M.length)||0)>1;w(Z&&!U),x(U)},[g,f,R==null?void 0:R.length]),_.useEffect(()=>{P(h?R:D)},[g,h,D,R]);const le=()=>{I?y(Z=>!Z):S(Z=>!Z)};return C.jsxs(C.Fragment,{children:[C.jsx(uc,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:C.jsx(j5,{data:((V=g==null?void 0:g.listItems)==null?void 0:V.fields)||[],title:n,currentCard:i,setShowModal:S})}),C.jsx(ob,{className:s?"":"slideUp",height:X,children:C.jsx(v.Stack,{ref:j,gap:1,margin:"12px",children:a&&!(F!=null&&F.length)?C.jsxs(C.Fragment,{children:[C.jsx(yn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),C.jsx(yn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):C.jsx(C.Fragment,{children:z?C.jsx(v.Box,{margin:"8px 0",children:C.jsx(S0,{error:E,isLoading:a,redirectToAdminTab:b,isFailed:u,showErrorIcon:!T,connectorNames:d,cardId:t,cardTitle:n,currentCard:i,isCardLevelError:!0})}):F!=null&&F.length?F==null?void 0:F.map(Z=>{const{value:U,label:ee,deepLink:re,type:M}=Z,te="errorMessage"in Z?Z.errorMessage:null,ye="statusCode"in Z?Z.statusCode:null;return C.jsxs("div",{children:[C.jsx(sb,{variant:"overline",children:ee}),C.jsx(S0,{value:U,error:te,deepLink:re,statusCode:ye,isLoading:a,type:M,cardTitle:n,currentCard:i,cardId:t,fieldName:ee})]},ee)}):C.jsx(v.Box,{margin:"8px 0",children:C.jsx(Du,{children:sm})})})})}),!E&&ae&&C.jsx(bb,{variant:"body2_medium",onClick:le,children:I?C.jsxs(C.Fragment,{children:[h?Kb:Hu,C.jsx(mb,{src:Ub,transformAngle:q})]}):Hu})]})},J5={connectorCards:null,cardSpecificData:null,connectorApiStatus:K.IDLE,conversationMetaDataApiStatus:K.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},O0="/v1/api",Q5=`${O0}/connectors/cards`,$5=`${O0}/connectors/cards/:id/data`,q5=({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||"")),qe({url:`${Q5}?${r.toString()}`,method:it.GET})},U5=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),qe({url:`${$5.replace(":id",e)}?${o.toString()}`,method:it.GET})},L0=Fa({name:"connectorCardLibrary",initialState:J5,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(ai.pending,t=>{t.connectorApiStatus=K.LOADING}).addCase(ai.fulfilled,(t,n)=>{t.connectorApiStatus=K.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(ai.rejected,t=>{t.connectorApiStatus=K.FAILED}).addCase(So.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.LOADING}}).addCase(So.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:i}=n.payload||{};i&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:i}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.IDLE}}).addCase(So.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.FAILED};const i=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Cu;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:i}})}}),ai=Vt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var c;const r=await q5({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((c=r==null?void 0:r.data)==null?void 0:c.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((l,a)=>(l==null?void 0:l.priority)-(a==null?void 0:a.priority)),connectorsEnabled:s}}),So=Vt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const i=await U5(e,t,n,o),c=i==null?void 0:i.data,l=i==null?void 0:i.status;return c?(r&&Me({message:wd,type:In}),{data:wu(c),status:l}):(r&&Me({message:xd,type:ht}),{data:{},status:l})}catch(i){const c=i;return s.rejectWithValue({...c,code:c.code||Cu})}}),K5=L0.reducer,F0=L0.actions,D0="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",e4="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",t4="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",R0=e=>e.write.createObjectList,n4=e=>e.write.createObjectConnectorNamesList,k0=e=>e.write.linkObjectList,r4=e=>e.write.editObjectList,o4=e=>e.write.objectDict,s4=e=>e.write.formFields,i4=e=>e.write.linkCardApiStatus,a4=e=>e.write.unlinkCardApiStatus,c4=e=>e.write.dependentFieldsMap,l4=e=>e.write.createFormApiStatus,u4=e=>e.write.updateFormApiStatus,d4=e=>e.write.currentResourceDetails,f4=e=>e.write.currentResourceDetailsApiStatus,N0=e=>e.write.currentCardInEdit,P0=e=>e.write.hasUnsavedChanges,p4=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,M0=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)&&p4(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),h4=e=>dm.replace("{{connectorName}}",e),g4=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:i})=>{const c=jt(),{sendTrackingEvent:l}=_.useContext(Ve),u=be(a4)===K.LOADING,p=()=>{s&&o&&c(oi({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{l(I1,{connector_name:i,conversation_id:s}),t(!1),r(),Me({message:Cv,type:In})}).catch(()=>{Me({message:Iv,type:In})})};return C.jsx(uc,{shown:e,setShown:t,showCloseButton:!0,children:C.jsxs(v.Stack,{width:"400px",padding:"20px",gap:"8px",children:[C.jsx(v.Typography,{variant:"h2",children:um}),C.jsx(v.Typography,{variant:"body2",children:h4(i)}),C.jsxs(v.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[C.jsx(v.Button,{variant:"text",onClick:()=>t(!1),children:la}),C.jsx(v.Button,{disabled:u,color:"error",onClick:p,children:gu})]})]})})},m4=({actions:e,isHovered:t=!1})=>{const r=e.filter(c=>c.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),i=t?(s.length+1)*32:32;return C.jsxs(lb,{width:i,isHovered:t,children:[C.jsx("div",{className:"hidden-actions",children:s.map(({id:c,disabled:l,label:a,iconSrc:u,action:p})=>C.jsx(v.Tooltip,{title:a,placement:"bottom",children:C.jsx(yr,{onClick:p,disabled:l,children:C.jsx("img",{src:u})})},c))}),o&&C.jsx(v.Tooltip,{title:o.label,placement:"bottom",children:C.jsx(yr,{onClick:o.action,disabled:o.disabled,children:C.jsx("img",{src:o.iconSrc})})},o.id)]})},b4=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:i}=e,c=jt(),{availableFeatures:l,sendTrackingEvent:a,conversationId:u,currentSmIds:p}=_.useContext(Ve),{userGroupId:g}=Yt()||{},[E,b]=_.useState(!!s),[d,f]=_.useState(!1),[h,y]=_.useState(!1),[m,x]=_.useState(!1),{id:I,title:w,externalResourceId:A="",forms:S=[],logoUrl:T}=t;let R=I;A&&(R=`${R}_${A}`);const{data:D,cardType:F,cardErrorMessage:P,connectorNames:j}=(n==null?void 0:n[R])??{},X=(j==null?void 0:j[0])||"",Y=(o==null?void 0:o[R])===K.LOADING,q=(o==null?void 0:o[R])===K.FAILED,J=!!(tt(l,lu)&&A),z=_.useMemo(()=>{var M,te;if(P||q||!(tt(l,q1)&&S.some(ye=>ye.type==="edit")))return!1;switch(F){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((M=D==null?void 0:D.listItems)==null?void 0:M.fields.length)===1?(te=D==null?void 0:D.listItems)==null?void 0:te.fields.some(ye=>ye.externalResourceId):!1;default:return!1}},[D,F,l,S,t,P,q]),ae=_.useCallback((M=!1)=>{const te=M?S1:A1;r&&I&&u&&c(So({id:I,email:r,conversationId:u,externalResourceId:A})).unwrap().then(ye=>{const W={...xu(ye,w,M,!0),sm_ids:p};a(te,W)}).catch(ye=>{const W={...xu(ye,w,M,!1),sm_ids:p};a(te,W)})},[c,r,I,w,a,u,A,p]);_.useEffect(()=>{E&&ae(!0)},[E,ae]);const le=(M,te)=>{var W;M==null||M.stopPropagation(),c(So({id:te,email:r,conversationId:u,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{a(d1,{id:te})});const ye=M.target.tagName==="BUTTON"?(W=M.target)==null?void 0:W.firstChild:M.target;ye.className&&(ye.className=""),setTimeout(()=>ye.className="selected",1)},B=(M,te)=>{M.stopPropagation(),!(n!=null&&n[te])&&!Y&&ae(),a(E?u1:l1,{id:te}),b(ye=>!ye)},H=M=>{M.stopPropagation();const te=M.currentTarget.offsetWidth<M.currentTarget.scrollWidth;f(!!te)},V=M=>{var ye,W;M.stopPropagation(),a(cu,{card_title:w,connector_name:X,ug_id:g,sm_ids:p});let te;F==="flat"?te=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:F==="flat_with_list"&&(te=(W=(ye=D==null?void 0:D.listItems)==null?void 0:ye.fields[0])==null?void 0:W.externalResourceId),te?c(Lr({...t,externalResourceId:te})):Me({message:ws,type:ht})},Z=M=>{M.stopPropagation(),y(!0)},U=()=>{x(!0)},ee=()=>{x(!1)},re=[{id:"unlink",label:gu,disabled:Y,shown:J,iconSrc:e4,action:M=>Z(M)},{id:"refresh",label:du,disabled:Y,shown:!0,iconSrc:D0,action:M=>le(M,I)},{id:"edit",label:mu,disabled:Y,shown:z,iconSrc:t4,action:M=>V(M)}];return C.jsxs(eb,{"data-testid":`test_${I}`,onMouseEnter:U,onMouseLeave:ee,children:[C.jsxs(tb,{className:E?"hiver-card-expanded":"",onClick:M=>B(M,R),children:[C.jsxs(nb,{children:[T&&C.jsx("img",{src:T,alt:w}),C.jsx(v.Tooltip,{title:d?w:"",placement:"bottom",children:C.jsx(rb,{variant:"h4",onMouseOver:M=>H(M),onMouseLeave:M=>H(M),children:w})})]}),C.jsxs(Fu,{children:[C.jsx(m4,{actions:re,isHovered:m}),C.jsx(v.Tooltip,{title:E?fu:aa,placement:"bottom",children:C.jsx(yr,{onClick:M=>B(M,R),children:C.jsx(pa,{className:E?"":"hiver-up"})})})]})]}),C.jsx(T0,{id:R,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:E}),C.jsx(g4,{showUnlinkModal:h,setShowUnlinkModal:y,cardId:I,onCardUnlinking:i,conversationId:u,externalResourceId:A,connectorName:X})]})},y4=Number.MAX_SAFE_INTEGER,v4=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=_.useContext(Ve),c=tt(s,K1)?y4:1;return C.jsx(v.Box,{flexGrow:1,children:e.map((l,a)=>{const{id:u,externalResourceId:p}=l;let g=u;return p&&(g=`${g}_${p}`),C.jsx("div",{children:C.jsx(b4,{card:l,specificCardData:n,email:t??"",defaultOpenState:a<c,specificConnectorApiStatus:r,onCardUnlinking:o})},g)})})},dc=({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 Fr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}dc.CaseView=Fr;const C4="Bring your favourite tools into Hiver",I4="Plugin image",E4="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",x4="Enable Connectors",w4="Enable Apps",A4="Learn more",S4="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",_4="Contact your admin to enable this",T4="https://youtu.be/ODcJnzZLb50",O4="connectors-module/assets/connectors-images/connector-mainpage.png",L4="connectors-module/assets/connectors-images/connector-mainpage-apps.png",F4="Explore connectors",D4="Connectors",R4=v.styled(v.Box)`
|
|
1039
|
+
`,Yx=e=>k.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),k.createElement("g",{clipPath:"url(#clip0_7787_114457)"},k.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"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_7787_114457"},k.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),Jx=({aspectRatio:e="auto",...t})=>{const[n,r]=_.useState(!1);return n?null:C.jsxs(zx,{aspectRatio:e,children:[C.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),C.jsx(Yx,{className:"play-icon"})]})},ac=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},Qx=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],_o=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const i=t[o];return e.values&&e.values[i]&&typeof e.values[i]=="object"&&"value"in e.values[i]?s=e.values[i].value:e.values&&e.values[i]&&typeof e.values[i]!="object"?s=e.values[i]:s=null,{...r,[o]:s}},{}):{},cc=({formFields:e})=>{const t={};return e.forEach(n=>{var r,o,s,i,c,l;if(t[n.name]={},(r=n.validations)!=null&&r.isRequired&&(typeof n.validations.isRequired=="object"?t[n.name].isRequired=e3(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let a=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";a=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:a,t[n.name].validate=t3(a);return}if(n.type==="number"&&((i=n.validations)!=null&&i.range)){t[n.name].validate=n3();return}if(n.type==="text"&&n.limit){t[n.name].validate=r3();return}if(n.type==="table"){const a=cc({formFields:n.columns??[]});t[n.name].validations=a}if((c=n.validations)!=null&&c.isUrl){const a=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=Uv(a)}else if((l=n.validations)!=null&&l.isEmail){const a=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=Kv(a)}}),t},Ks={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[Us.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},ei=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return Ks.isMultiSelect(o)?s=o.map(i=>i.value):Ks.isTable(o)?s=o.map(({...c})=>(delete c[Us.ROW_ID],c)).filter(c=>Object.keys(c).length>0):Ks.isSelect(o)?s=o.value:Ks.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),$x=(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]}))},h0=(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 i of o){const c=h0(r.columns,i);s+=c}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},_r="/v1/api",qx=`${_r}/connectors/conversation/:conversationId/metadata`,Ux=`${_r}/connectors/forms/:formId/field/:fieldName/data`,Kx=`${_r}/connectors/form/:formId`,e5=`${_r}/connectors/forms/:id/link`,t5=`${_r}/connectors/forms/:id/preview`,n5=`${_r}/connectors/conversation/:conversationId/selected-email`,r5=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),qe({url:mr(`${Ux}?${r.toString()}`,e),method:it.POST,data:t})},o5=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),qe({url:mr(`${Kx}?${r.toString()}`,e),method:it.POST,data:t})},s5=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),qe({url:`${t5.replace(":id",e)}?${r.toString()}`,method:it.POST,data:{args:t}})},g0={optionsMap:null,createOptionApi:U.IDLE,dropdownOptionsApis:U.IDLE,previewCardData:null,previewCardApiStatus:U.IDLE,selectedSuggestionType:"basic"},m0=La({name:"commonSlice",initialState:g0,reducers:{resetState:()=>g0,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=U.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(ti.pending,t=>{t.createOptionApi=U.LOADING}).addCase(ti.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=U.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(ti.rejected,t=>{t.createOptionApi=U.FAILED}).addCase(Jn.pending,t=>{t.dropdownOptionsApis=U.LOADING}).addCase(Jn.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:i,searchTerm:c,key:l}=n.payload;t.dropdownOptionsApis=U.IDLE,t.optionsMap={...r,[l]:{options:o,hasMore:s,currentPage:i,searchTerm:c}}}).addCase(Jn.rejected,t=>{t.dropdownOptionsApis=U.FAILED}).addCase(Tr.pending,t=>{t.previewCardApiStatus=U.LOADING}).addCase(Tr.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=U.IDLE}).addCase(Tr.rejected,t=>{t.previewCardApiStatus=U.FAILED})}}),ti=jt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var d,f,h;const{fieldName:r,label:o,formId:s,interfaceId:i,conversationId:c=null,args:l={},createArgs:a={},callback:u}=e,p=ac(l||{},s,r),{common:g}=t(),{options:E=[],...b}=((d=g.optionsMap)==null?void 0:d[p])||{};try{const y=await o5({fieldName:r,formId:i},{args:a,conversation_id:c});if(!y||!("data"in y)||!("output_variables"in y.data)||!("external_resource_id"in y.data.output_variables))throw y;const m=y.data.output_variables,{external_resource_id:x,...I}=m,A=[{label:o,value:x,prefillValues:I},...E],S=_d(A,O=>O.value);return u==null||u(S),{optionsList:S,key:p,...b}}catch(y){u==null||u(E);const m=y,x=(f=m==null?void 0:m.response)==null?void 0:f.data,I=typeof x=="string"?x:(x==null?void 0:x.message)||As;return Be({message:I,type:gt}),n((h=m==null?void 0:m.response)==null?void 0:h.status)}}),Jn=jt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,O;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:i,callback:c,args:l={},interfaceId:a="",pagination:u={enabled:!1},controller:p}=e,g=ac(l||{},o,r),{common:E}=t();let b=!1;i.meta&&"showAvatar"in i.meta&&typeof i.meta.showAvatar=="boolean"&&(b=i.meta.showAvatar);const d=((A=E.optionsMap)==null?void 0:A[g])||{},f=!e.isScrollToBottomEvent&&(!d||s!==d.searchTerm),h=f?[]:d.options||[],y=f?!0:d.hasMore??!0,m=f?0:d.currentPage??0,{enabled:x,limit:I}=u,w=I||10;try{let R;const D=p==null?void 0:p.signal,F=x?{pageNumber:m+1,searchTerm:s,limit:w,enabled:x}:null;if(y&&(R=await r5({fieldName:r,formId:o},{pagination:F||{},args:l,interfaceId:a})),D!=null&&D.aborted)throw D.reason;if(!R||!R.data||!("data"in R.data)||!Array.isArray(R.data.data)||!R.data.data.length){const{common:Y}=t(),K=(S=Y.optionsMap)==null?void 0:S[g];return c==null||c(K.options??[]),{...K,optionsList:K.options??[],key:g,hasMore:!1}}const j=R.data.data.map(Y=>b?{...Y,avatarUrl:Y.avatarUrl||Gv}:(delete Y.avatarUrl,Y)),X=[...h,...j],z=x?j.length>=w:!1,q=_d(X,Y=>Y.value);return c==null||c(q),{optionsList:q,fieldName:r,formId:o,searchTerm:s,currentPage:m+1,hasMore:z,key:g}}catch(R){const{common:D}=t(),F=((O=D.optionsMap)==null?void 0:O[g])||{};return c==null||c(F.options??[]),n(R)}},{condition:(e,{getState:t})=>{var p;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:i}=e,c=ac(i||{},r,n),{common:l}=t(),a=(p=l.optionsMap)==null?void 0:p[c];if((a==null?void 0:a.searchTerm)!==o)return!0;const u=(a==null?void 0:a.options)||[];return u&&u.length?(s==null||s(u),!1):!0}}),Tr=jt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const i=await s5(e,t,n),c=i==null?void 0:i.data;return c?(r&&Be({message:xd,type:En}),{data:xu(c)}):(r&&Be({message:Ed,type:gt}),{data:null})}catch(i){return o({status:(s=i.response)==null?void 0:s.status})}}),{resetState:gA,resetPreviewCardData:i5,setSelectedSuggestionType:a5}=m0.actions,c5=m0.reducer,To="/v1/api",l5=`${To}/connectors/forms/list`,u5=`${To}/connectors/cards/:id/unlink`,d5=`${To}/connectors/forms/:id/link`,f5=`${To}/connectors/form/:formId`,p5=`${To}/connectors/forms/:formId/data`,h5=({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)),qe({url:`${l5}?${r.toString()}`,method:it.GET})},b0=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),qe({url:mr(`${f5}?${r.toString()}`,e),method:it.POST,data:t})},g5=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),qe({url:`${u5.replace(":id",e)}?${o.toString()}`,method:it.POST,data:{externalResourceId:n,conversationId:r}})},m5=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),qe({url:`${d5.replace(":id",e)}?${s.toString()}`,method:it.POST,data:{externalResourceId:t,conversationId:r}})},b5=(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),qe({url:`${p5.replace(":formId",e)}?${s.toString()}`,method:it.GET})},y5="Error in previewing the card",y0="Link format isn't recognized. Please check that you've entered a valid URL",v5="Item already linked",C5="Card linked successfully",I5="Error in linking the card",E5="New card created",x5="Card creation failed",w5="Create and link objects from different apps to this conversation",A5="Are you sure you want to change the primary object?",S5="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",_5="Are you sure you want to leave?",T5=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
|
|
1040
|
+
Do you want to continue?`,O5="Select an object to create",L5="Select an object to link",v0="Select object",F5="Paste URL or ID",D5="Object ID/Link",R5="Card updated",k5="Card updation failed",C0=3,I0=(e,t)=>{var r,o,s,i,c,l,a,u,p,g,E,b,d;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:((i=e.meta)==null?void 0:i.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((c=e.validations)!=null&&c.disablePast)||!1,disableFuture:!!((l=e.validations)!=null&&l.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((u=(a=e.validations)==null?void 0:a.range)==null?void 0:u.min)||Number.MIN_SAFE_INTEGER,max:((g=(p=e.validations)==null?void 0:p.range)==null?void 0:g.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((E=e.validations)==null?void 0:E.maxRows)||5,limit:(b=e.validations)==null?void 0:b.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(d=e.validations)==null?void 0:d.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},E0=La({name:"writeCapability",initialState:wd,reducers:{resetState:()=>wd,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=U.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ni.pending,t=>{t.objectListApiStatus=U.LOADING}).addCase(ni.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:i,searchObjectList:c,formFields:l,objectDict:a,dependentFieldsMap:u}=n.payload;t.objectListApiStatus=U.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=i,t.searchObjectList=c,t.formFields=l,t.objectDict=a,t.dependentFieldsMap=u}).addCase(ni.rejected,t=>{t.objectListApiStatus=U.FAILED}).addCase(Jn.pending,t=>{t.dropdownOptionsApis=U.LOADING}).addCase(Jn.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:i,key:c}=n.payload;t.dropdownOptionsApis=U.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:i}}}).addCase(Jn.rejected,t=>{t.dropdownOptionsApis=U.FAILED}).addCase(ri.pending,t=>{t.createFormApiStatus=U.LOADING}).addCase(ri.fulfilled,t=>{t.createFormApiStatus=U.IDLE}).addCase(ri.rejected,t=>{t.createFormApiStatus=U.FAILED}).addCase(ii.pending,t=>{t.linkCardApiStatus=U.LOADING}).addCase(ii.fulfilled,t=>{t.linkCardApiStatus=U.IDLE}).addCase(ii.rejected,t=>{t.linkCardApiStatus=U.FAILED}).addCase(si.pending,t=>{t.unlinkCardApiStatus=U.LOADING}).addCase(si.fulfilled,t=>{t.unlinkCardApiStatus=U.IDLE}).addCase(si.rejected,t=>{t.unlinkCardApiStatus=U.FAILED}).addCase(oi.pending,t=>{t.updateFormApiStatus=U.LOADING}).addCase(oi.fulfilled,t=>{t.updateFormApiStatus=U.IDLE}).addCase(oi.rejected,t=>{t.updateFormApiStatus=U.FAILED}).addCase(ai.pending,t=>{t.currentResourceDetailsApiStatus=U.LOADING}).addCase(ai.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=U.IDLE}).addCase(ai.rejected,t=>{t.currentResourceDetailsApiStatus=U.FAILED})}}),ni=jt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await h5({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 i=s.data.formsList,c={},l=[],a=[],u=[],p=[],g=[],E={},b={};return i==null||i.forEach(d=>{var h,y;if(d.expandedView&&!o)return;const f={...d};"fieldList"in f&&delete f.fieldList,b[d.id]=f,c[d.id]||(c[d.id]={}),E[d.id]||(E[d.id]=[]),d.type==="create"&&d.authenticated?(l.push({value:d.id,label:d.name,avatarUrl:d.logoUrl,connectorKey:d.connectorName}),d.connectorName&&!a.includes(d.connectorName)&&a.push(d.connectorName)):d.type==="link"&&d.authenticated?u.push({value:d.id,label:d.name,avatarUrl:d.logoUrl}):d.type==="edit"&&d.authenticated?p.push({value:d.id,label:d.name,avatarUrl:d.logoUrl}):d.type==="search_and_link"&&d.authenticated&&g.push({value:d.id,label:d.name,avatarUrl:d.logoUrl}),(h=d.fieldList)==null||h.sort((m,x)=>m.priority-x.priority),(y=d.fieldList)==null||y.forEach(m=>{const x=I0(m);if(x.columns&&(x.columns=x.columns.map(I=>I0(I,{loadOptionsOnFocus:!0,defaultOptions:!1}))),E[d.id]=[...E[d.id],x],m.interfaceDetails&&(m.interfaceDetails.args||m.interfaceDetails.optionalArgs)){const I={...m.interfaceDetails.args,...m.interfaceDetails.optionalArgs};Object.values(I).forEach(w=>{c[d.id][w]?c[d.id][w]=[...c[d.id][w],m.name]:c[d.id][w]=[m.name]})}})}),{createObjectList:l,createObjectConnectorNamesList:a,linkObjectList:u,editObjectList:p,searchObjectList:g,formFields:E,objectDict:b,dependentFieldsMap:c}}),ri=jt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var l;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:i,conversationId:c}=e;try{await b0({formId:n},{args:s,interfaceId:i,conversationId:c}),r==null||r(),Be({message:E5,type:En})}catch(a){const u=a,p=(l=u==null?void 0:u.response)==null?void 0:l.data,g=(p==null?void 0:p.message)??x5;return o==null||o(a),Be({message:g,type:gt}),t(a)}}),oi=jt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:i,conversationId:c,externalResourceId:l,previousArgs:a={}}=e;try{await b0({formId:n},{args:s,interfaceId:i,conversationId:c,externalResourceId:l,previousArgs:a}),r==null||r(),Be({message:R5,type:En})}catch(u){return o==null||o(u),Be({message:k5,type:gt}),t(u)}}),si=jt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await g5(e,t,n,r)}),ii=jt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var i;try{await m5(e,t,n,r,o)}catch(c){return s({status:(i=c.response)==null?void 0:i.status})}}),ai=jt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:i}=e;try{const c=await b5(n,r,o,s,i),l=c==null?void 0:c.data,a=c==null?void 0:c.status,u={values:{},errors:{}};return Object.entries(l.formData).forEach(([p,g])=>{"label"in g&&(g.type&&g.type==="date"?u.values[p]=g.label?new Date(parseInt(g.label)).toISOString():"":g.type&&g.type==="multi-select"&&"value"in g&&"label"in g&&g.value&&g.label?u.values[p]=[{value:g.value,label:g.label}]:g.value?u.values[p]={value:g.value,label:g.label}:u.values[p]=g.label)}),{data:u,status:a}}catch(c){return Be({message:As,type:gt}),t(c)}}),{resetState:mA,setCurrentCardInEdit:Or,resetCurrentResourceDetails:N5,setHasUnsavedChanges:x0}=E0.actions,P5=E0.reducer,M5=()=>{const[e,t]=_.useState(null),[n,r]=_.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=_.useCallback(s=>{t(s)},[]);return _.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const i=100;let c=null;const l=150,a=u=>{s||(s=window.setTimeout(()=>{const p=u.target,g=Number(e.dataset.prevScrollLeft)||0,E=Number(e.dataset.prevScrollTop)||0,b=p.scrollLeft,d=p.scrollTop,f=b-g,h=d-E,y=Math.abs(h)>Math.abs(f),m=Math.abs(f)>Math.abs(h);r({isVertical:y,isHorizontal:m,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(d),s=null},i),c&&window.clearTimeout(c),c=window.setTimeout(()=>{r(p=>({...p,isScrolling:!1})),c=null},l))};return e.addEventListener("scroll",a),()=>{e.removeEventListener("scroll",a),s&&window.clearTimeout(s),c&&window.clearTimeout(c)}},[e]),[n,o]},B5="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",j5=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=Bt(),{sendTrackingEvent:s,currentSmIds:i}=_.useContext(Ge),{userGroupId:c}=zt()||{},[l,a]=M5(),{isScrolling:u,isVertical:p}=l,g=u&&p,E=_.useMemo(()=>(e==null?void 0:e[0].data.map(h=>h.label))||[],[e]),b=_.useMemo(()=>e.map(h=>{const y={cells:{},externalResourceId:h.externalResourceId};return h.data.forEach((m,x)=>{if(E[x]){let I=m.value?m.value:fs;I&&m.type==="date"&&(I=new Date(parseInt(I)).toLocaleDateString(navigator.language)),y.cells[E[x]]={label:I,deepLink:m==null?void 0:m.deepLink}}}),y}),[e,E]),d=(h,y)=>C.jsx(pb,{align:"left",children:h.deepLink?C.jsx(v.Link,{target:"_blank",underline:"none",href:h.deepLink,children:h.label}):C.jsx(v.Typography,{variant:"body2",color:"gray.black",children:h.label})},`${y}_${h.label}`),f=h=>{!h||!n||(r(!1),s(au,{card_title:n.title,connector_name:n.connectorName,ug_id:c,sm_ids:i}),o(Or({...n,externalResourceId:h})))};return C.jsxs(v.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[C.jsx(v.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),C.jsx(v.TableContainer,{ref:a,children:C.jsxs(v.Table,{stickyHeader:!0,children:[C.jsx(ub,{children:C.jsxs(v.TableRow,{children:[E.map(h=>C.jsx(db,{sx:{whiteSpace:"nowrap"},children:C.jsx(v.Typography,{variant:"overline",color:"gray.gray3",children:h})},h)),C.jsx(gb,{})]})}),C.jsx(v.TableBody,{children:b.map((h,y)=>C.jsxs(fb,{children:[Object.values(h.cells).map((m,x)=>d(m,x)),C.jsx(hb,{children:!g&&h.externalResourceId&&C.jsx(v.Tooltip,{title:gu,placement:"bottom",children:C.jsx(v.IconButton,{className:"row-edit",onClick:()=>f(h.externalResourceId),children:C.jsx("img",{src:B5})})})})]},`id_${y}`))})]})})]})},V5=e=>e.cardList.connectorCards,G5=e=>e.cardList.connectorsEnabled,H5=e=>e.cardList.connectorApiStatus,W5=e=>e.cardList.cardSpecificData,Z5=e=>e.cardList.specificConnectorApiStatus,X5=e=>e.cardList.specificConnectorErrorCode,z5="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",w0=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}},Y5=(e,t)=>`${yu} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),A0=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:i,redirectToAdminTab:c,isFailed:l,connectorNames:a,cardTitle:u,currentCard:p,cardId:g,isCardLevelError:E,fieldName:b,showErrorIcon:d}=e,f=_.useRef(null),h=_.useRef(null),{email:y,currentSmIds:m,conversationId:x,sendTrackingEvent:I,connectorFunctions:w}=_.useContext(Ge),A=ye(X5),S=A==null?void 0:A[g],[O,R]=_.useState(!1),D=_.useMemo(()=>{if(n&&E){const{error_message:K}=w0(n);return K}return l?yu.replace(/{{connector_name}}/g,(a==null?void 0:a[0])||""):lu},[n,l,a,E]),F=_.useCallback(()=>{const K=n||Y5(S,a),{error_code:ce,error_message:ee}=w0(K);I==null||I(k1,{sm_ids:m,frontend_req_params:{email:y,conversationId:x,externalResourceId:p==null?void 0:p.externalResourceId},card_title:u,connector_name:a!=null&&a.length?a:"",error_code:ce,error_message:ee})},[n,S,I,m,y,x,u,a,p==null?void 0:p.externalResourceId]);_.useEffect(()=>{(n&&E||l&&S)&&F()},[F,S,l,n,E]),_.useEffect(()=>{const K=r?h.current:f.current;if(K){const ce=K.scrollHeight>K.clientHeight||K.scrollWidth>K.clientWidth;R(ce)}},[t,r]);const P=o==sa.NOT_FOUND;let j=P?fs:t;i==="date"&&j&&!P&&(j=new Date(parseInt(j)).toLocaleDateString(navigator.language));const X=!!n||l,z=()=>{c?w==null||w.redirectToAdmin():window.open(mm,"_blank")},q=()=>{I==null||I(N1,{sm_ids:m,card_title:u,field_name:b})},Y=K=>{const ce=/<>(.*?)<>/g,ee=K.split(ce);return C.jsx(_.Fragment,{children:ee.map((B,H)=>H%2===1?C.jsx(ib,{variant:"body2",onClick:z,children:B},H):B)})};return s?C.jsx(vn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):X?C.jsxs(Lu,{gap:"7px",children:[d?C.jsx(v.Stack,{marginTop:"3px",flexShrink:"0",children:C.jsx("img",{src:z5,width:"18px",height:"18px"})}):null,C.jsx(Fu,{variant:"body2",children:D?Y(D):lu})]}):C.jsx(v.Tooltip,{title:O?j:null,placement:"bottom",children:r?C.jsx(Du,{ref:h,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:q,children:j||fs}):C.jsx(cb,{ref:f,variant:"body2",children:j||fs})})},S0="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",lc=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4})=>C.jsx(v.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},children:C.jsxs(v.Stack,{direction:"row",children:[r&&C.jsx(v.Box,{position:"absolute",right:10,top:10,children:C.jsx(v.Tooltip,{title:"Close",placement:"bottom",children:C.jsx(v.IconButton,{onClick:()=>t(!1),children:C.jsx("img",{src:S0})})})}),n]})}),_0=e=>{var B,H,V;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:i}=e,c=24,l=(o==null?void 0:o[t])===U.IDLE,a=(o==null?void 0:o[t])===U.LOADING,u=(o==null?void 0:o[t])===U.FAILED,{cardType:p,data:g,cardErrorMessage:E,redirectToAdminTab:b,connectorNames:d}=(r==null?void 0:r[t])||{},f=p==="flat",[h,y]=_.useState(!1),[m,x]=_.useState(!1),[I,w]=_.useState(!1),[A,S]=_.useState(!1),O=((B=g==null?void 0:g.listItems)==null?void 0:B.statusCode)!==401,R=_.useMemo(()=>{var W,J,re,oe;return f&&((W=g==null?void 0:g.flatDisplay)!=null&&W.data)?g.flatDisplay.data:!f&&((oe=(re=(J=g==null?void 0:g.listItems)==null?void 0:J.fields)==null?void 0:re[0])!=null&&oe.data)?g.listItems.fields[0].data:[]},[f,g]),D=_.useMemo(()=>R==null?void 0:R.slice(0,5),[R]),[F,P]=_.useState([]),j=_.useRef(null),[X,z]=_.useState(0),q=h?-180:0,Y=f?!1:!!((H=g==null?void 0:g.listItems)!=null&&H.errorMessage),K=Y||u||E,ce=l&&!Y&&s&&(I||m);_.useLayoutEffect(()=>{var W;(W=j.current)!=null&&W.scrollHeight&&z(j.current.scrollHeight+c)},[o==null?void 0:o[t],F,j]),_.useEffect(()=>{var oe,M;const W=((R==null?void 0:R.length)||0)>5,J=!f&&(((M=(oe=g==null?void 0:g.listItems)==null?void 0:oe.fields)==null?void 0:M.length)||0)>1;w(W&&!J),x(J)},[g,f,R==null?void 0:R.length]),_.useEffect(()=>{P(h?R:D)},[g,h,D,R]);const ee=()=>{I?y(W=>!W):S(W=>!W)};return C.jsxs(C.Fragment,{children:[C.jsx(lc,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:C.jsx(j5,{data:((V=g==null?void 0:g.listItems)==null?void 0:V.fields)||[],title:n,currentCard:i,setShowModal:S})}),C.jsx(ob,{className:s?"":"slideUp",height:X,children:C.jsx(v.Stack,{ref:j,gap:1,margin:"12px",children:a&&!(F!=null&&F.length)?C.jsxs(C.Fragment,{children:[C.jsx(vn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),C.jsx(vn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):C.jsx(C.Fragment,{children:K?C.jsx(v.Box,{margin:"8px 0",children:C.jsx(A0,{error:E,isLoading:a,redirectToAdminTab:b,isFailed:u,showErrorIcon:!O,connectorNames:d,cardId:t,cardTitle:n,currentCard:i,isCardLevelError:!0})}):F!=null&&F.length?F==null?void 0:F.map(W=>{const{value:J,label:re,deepLink:oe,type:M}=W,te="errorMessage"in W?W.errorMessage:null,be="statusCode"in W?W.statusCode:null;return C.jsxs("div",{children:[C.jsx(sb,{variant:"overline",children:re}),C.jsx(A0,{value:J,error:te,deepLink:oe,statusCode:be,isLoading:a,type:M,cardTitle:n,currentCard:i,cardId:t,fieldName:re})]},re)}):C.jsx(v.Box,{margin:"8px 0",children:C.jsx(Fu,{children:sm})})})})}),!E&&ce&&C.jsx(bb,{variant:"body2_medium",onClick:ee,children:I?C.jsxs(C.Fragment,{children:[h?Kb:Gu,C.jsx(mb,{src:Ub,transformAngle:q})]}):Gu})]})},J5={connectorCards:null,cardSpecificData:null,connectorApiStatus:U.IDLE,conversationMetaDataApiStatus:U.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},T0="/v1/api",Q5=`${T0}/connectors/cards`,$5=`${T0}/connectors/cards/:id/data`,q5=({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||"")),qe({url:`${Q5}?${r.toString()}`,method:it.GET})},U5=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),qe({url:`${$5.replace(":id",e)}?${o.toString()}`,method:it.GET})},O0=La({name:"connectorCardLibrary",initialState:J5,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(ci.pending,t=>{t.connectorApiStatus=U.LOADING}).addCase(ci.fulfilled,(t,n)=>{t.connectorApiStatus=U.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(ci.rejected,t=>{t.connectorApiStatus=U.FAILED}).addCase(Oo.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:U.LOADING}}).addCase(Oo.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:i}=n.payload||{};i&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:i}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:U.IDLE}}).addCase(Oo.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:U.FAILED};const i=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):vu;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:i}})}}),ci=jt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var c;const r=await q5({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((c=r==null?void 0:r.data)==null?void 0:c.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((l,a)=>(l==null?void 0:l.priority)-(a==null?void 0:a.priority)),connectorsEnabled:s}}),Oo=jt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const i=await U5(e,t,n,o),c=i==null?void 0:i.data,l=i==null?void 0:i.status;return c?(r&&Be({message:xd,type:En}),{data:xu(c),status:l}):(r&&Be({message:Ed,type:gt}),{data:{},status:l})}catch(i){const c=i;return s.rejectWithValue({...c,code:c.code||vu})}}),K5=O0.reducer,L0=O0.actions,F0="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",e4="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",t4="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",D0=e=>e.write.createObjectList,n4=e=>e.write.createObjectConnectorNamesList,R0=e=>e.write.linkObjectList,r4=e=>e.write.editObjectList,o4=e=>e.write.objectDict,s4=e=>e.write.formFields,i4=e=>e.write.linkCardApiStatus,a4=e=>e.write.unlinkCardApiStatus,c4=e=>e.write.dependentFieldsMap,l4=e=>e.write.createFormApiStatus,u4=e=>e.write.updateFormApiStatus,d4=e=>e.write.currentResourceDetails,f4=e=>e.write.currentResourceDetailsApiStatus,k0=e=>e.write.currentCardInEdit,N0=e=>e.write.hasUnsavedChanges,p4=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,P0=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)&&p4(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),h4=e=>dm.replace("{{connectorName}}",e),g4=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:i})=>{const c=Bt(),{sendTrackingEvent:l}=_.useContext(Ge),u=ye(a4)===U.LOADING,p=()=>{s&&o&&c(si({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{l(I1,{connector_name:i,conversation_id:s}),t(!1),r(),Be({message:Cv,type:En})}).catch(()=>{Be({message:Iv,type:En})})};return C.jsx(lc,{shown:e,setShown:t,showCloseButton:!0,children:C.jsxs(v.Stack,{width:"400px",padding:"20px",gap:"8px",children:[C.jsx(v.Typography,{variant:"h2",children:um}),C.jsx(v.Typography,{variant:"body2",children:h4(i)}),C.jsxs(v.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[C.jsx(v.Button,{variant:"text",onClick:()=>t(!1),children:ca}),C.jsx(v.Button,{disabled:u,color:"error",onClick:p,children:hu})]})]})})},m4=({actions:e,isHovered:t=!1})=>{const r=e.filter(c=>c.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),i=t?(s.length+1)*32:32;return C.jsxs(lb,{width:i,isHovered:t,children:[C.jsx("div",{className:"hidden-actions",children:s.map(({id:c,disabled:l,label:a,iconSrc:u,action:p})=>C.jsx(v.Tooltip,{title:a,placement:"bottom",children:C.jsx(br,{onClick:p,disabled:l,children:C.jsx("img",{src:u})})},c))}),o&&C.jsx(v.Tooltip,{title:o.label,placement:"bottom",children:C.jsx(br,{onClick:o.action,disabled:o.disabled,children:C.jsx("img",{src:o.iconSrc})})},o.id)]})},b4=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:i}=e,c=Bt(),{availableFeatures:l,sendTrackingEvent:a,conversationId:u,currentSmIds:p}=_.useContext(Ge),{userGroupId:g}=zt()||{},[E,b]=_.useState(!!s),[d,f]=_.useState(!1),[h,y]=_.useState(!1),[m,x]=_.useState(!1),{id:I,title:w,externalResourceId:A="",forms:S=[],logoUrl:O}=t;let R=I;A&&(R=`${R}_${A}`);const{data:D,cardType:F,cardErrorMessage:P,connectorNames:j}=(n==null?void 0:n[R])??{},X=(j==null?void 0:j[0])||"",z=(o==null?void 0:o[R])===U.LOADING,q=(o==null?void 0:o[R])===U.FAILED,Y=!!(et(l,cu)&&A),K=_.useMemo(()=>{var M,te;if(P||q||!(et(l,q1)&&S.some(be=>be.type==="edit")))return!1;switch(F){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((M=D==null?void 0:D.listItems)==null?void 0:M.fields.length)===1?(te=D==null?void 0:D.listItems)==null?void 0:te.fields.some(be=>be.externalResourceId):!1;default:return!1}},[D,F,l,S,t,P,q]),ce=_.useCallback((M=!1)=>{const te=M?S1:A1;r&&I&&u&&c(Oo({id:I,email:r,conversationId:u,externalResourceId:A})).unwrap().then(be=>{const Z={...Eu(be,w,M,!0),sm_ids:p};a(te,Z)}).catch(be=>{const Z={...Eu(be,w,M,!1),sm_ids:p};a(te,Z)})},[c,r,I,w,a,u,A,p]);_.useEffect(()=>{E&&ce(!0)},[E,ce]);const ee=(M,te)=>{var Z;M==null||M.stopPropagation(),c(Oo({id:te,email:r,conversationId:u,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{a(d1,{id:te})});const be=M.target.tagName==="BUTTON"?(Z=M.target)==null?void 0:Z.firstChild:M.target;be.className&&(be.className=""),setTimeout(()=>be.className="selected",1)},B=(M,te)=>{M.stopPropagation(),!(n!=null&&n[te])&&!z&&ce(),a(E?u1:l1,{id:te}),b(be=>!be)},H=M=>{M.stopPropagation();const te=M.currentTarget.offsetWidth<M.currentTarget.scrollWidth;f(!!te)},V=M=>{var be,Z;M.stopPropagation(),a(au,{card_title:w,connector_name:X,ug_id:g,sm_ids:p});let te;F==="flat"?te=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:F==="flat_with_list"&&(te=(Z=(be=D==null?void 0:D.listItems)==null?void 0:be.fields[0])==null?void 0:Z.externalResourceId),te?c(Or({...t,externalResourceId:te})):Be({message:As,type:gt})},W=M=>{M.stopPropagation(),y(!0)},J=()=>{x(!0)},re=()=>{x(!1)},oe=[{id:"unlink",label:hu,disabled:z,shown:Y,iconSrc:e4,action:M=>W(M)},{id:"refresh",label:uu,disabled:z,shown:!0,iconSrc:F0,action:M=>ee(M,I)},{id:"edit",label:gu,disabled:z,shown:K,iconSrc:t4,action:M=>V(M)}];return C.jsxs(eb,{"data-testid":`test_${I}`,onMouseEnter:J,onMouseLeave:re,children:[C.jsxs(tb,{className:E?"hiver-card-expanded":"",onClick:M=>B(M,R),children:[C.jsxs(nb,{children:[O&&C.jsx("img",{src:O,alt:w}),C.jsx(v.Tooltip,{title:d?w:"",placement:"bottom",children:C.jsx(rb,{variant:"h4",onMouseOver:M=>H(M),onMouseLeave:M=>H(M),children:w})})]}),C.jsxs(Lu,{children:[C.jsx(m4,{actions:oe,isHovered:m}),C.jsx(v.Tooltip,{title:E?du:ia,placement:"bottom",children:C.jsx(br,{onClick:M=>B(M,R),children:C.jsx(fa,{className:E?"":"hiver-up"})})})]})]}),C.jsx(_0,{id:R,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:E}),C.jsx(g4,{showUnlinkModal:h,setShowUnlinkModal:y,cardId:I,onCardUnlinking:i,conversationId:u,externalResourceId:A,connectorName:X})]})},y4=Number.MAX_SAFE_INTEGER,v4=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=_.useContext(Ge),c=et(s,K1)?y4:1;return C.jsx(v.Box,{flexGrow:1,children:e.map((l,a)=>{const{id:u,externalResourceId:p}=l;let g=u;return p&&(g=`${g}_${p}`),C.jsx("div",{children:C.jsx(b4,{card:l,specificCardData:n,email:t??"",defaultOpenState:a<c,specificConnectorApiStatus:r,onCardUnlinking:o})},g)})})},uc=({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 Lr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}uc.CaseView=Lr;const C4="Bring your favourite tools into Hiver",I4="Plugin image",E4="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",x4="Enable Connectors",w4="Enable Apps",A4="Learn more",S4="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",_4="Contact your admin to enable this",T4="https://youtu.be/ODcJnzZLb50",O4="connectors-module/assets/connectors-images/connector-mainpage.png",L4="connectors-module/assets/connectors-images/connector-mainpage-apps.png",F4="Explore connectors",D4="Connectors",R4=v.styled(v.Box)`
|
|
1041
1041
|
padding-top: 20px;
|
|
1042
1042
|
`,k4=v.styled(v.Stack)`
|
|
1043
1043
|
width: 100%;
|
|
@@ -1069,7 +1069,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1069
1069
|
color: ${v.theme.palette.gray.gray1};
|
|
1070
1070
|
font-size: 13px;
|
|
1071
1071
|
margin-bottom: 24px;
|
|
1072
|
-
`,
|
|
1072
|
+
`,M0=v.styled(v.Button)`
|
|
1073
1073
|
width: 100%;
|
|
1074
1074
|
color: ${v.theme.palette.gray.black};
|
|
1075
1075
|
background-color: white;
|
|
@@ -1089,7 +1089,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1089
1089
|
color: ${v.theme.palette.gray.gray3};
|
|
1090
1090
|
`,V4=v.styled(v.Typography)`
|
|
1091
1091
|
color: ${v.theme.palette.gray.gray3};
|
|
1092
|
-
`,G4="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",H4={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:W4}=H4,
|
|
1092
|
+
`,G4="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",H4={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:W4}=H4,B0=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=_.useContext(Ge),s=et(r,Q1),i=et(r,ds),c=p=>{p.stopPropagation(),n(a1),o==null||o.redirectToAdmin()},l=p=>{p.stopPropagation(),n(c1),window.open(S4,"_blank")},a=()=>{n(R1,{source:"main_tab"})},u=i?L4:O4;return C.jsxs(R4,{"data-testid":"noConnectors",children:[s?C.jsxs(C.Fragment,{children:[t?null:C.jsx(v.Typography,{variant:"h2",children:i?aa:D4}),C.jsx(P4,{onClick:a,href:T4,target:"_blank",children:C.jsx(Jx,{src:W4+u,alt:F4,aspectRatio:"1000/783"})})]}):C.jsxs(k4,{children:[C.jsx(N4,{variant:"body1_medium",children:C4}),C.jsx("img",{src:G4,alt:I4})]}),C.jsx(M4,{variant:"body2",children:E4}),e?C.jsx(M0,{endIcon:C.jsx(v.icons.ArrowForward,{}),onClick:c,...s&&{size:"medium"},children:i?w4:x4}):C.jsxs(C.Fragment,{children:[C.jsx(M0,{onClick:l,children:A4}),C.jsxs(B4,{direction:"row",children:[C.jsx(j4,{}),C.jsx(V4,{variant:"caption",children:_4})]})]})]})},Z4=()=>{const{availableFeatures:e}=_.useContext(Ge),t=et(e,ds);return C.jsxs(Ou,{children:[C.jsxs(v.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?C.jsx(Au,{width:"20px",height:"20px"}):C.jsx(_u,{}),C.jsx(Tu,{variant:"h2",children:t?aa:fu})]}),C.jsxs(v.Stack,{gap:"12px",children:[C.jsx(vn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),C.jsx(vn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),C.jsx(vn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},X4=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=_.useContext(Ge),[o,s]=_.useState(!1),i=_.useRef(null),[c,l]=_.useState(0),{templateUpdates:a}=e||{},{sections:u=[],actionButtons:p=[],title:g}=a||{},{version:E=""}=a||{},b=vm(E),d=_.useMemo(()=>ym(E),[E]),f=_.useMemo(()=>(p==null?void 0:p.filter(({isAdminPanelLink:x})=>!(!n&&x)))??[],[p,n]);if(_.useEffect(()=>{!d&&a&&ua(E,!0)},[d,E,a]),_.useLayoutEffect(()=>{var x;(x=i.current)!=null&&x.scrollHeight&&l(i.current.scrollHeight)},[i]),_.useEffect(()=>{a&&!b&&t(p1,{update_version_id:E})},[]),!a||b)return null;const h=x=>{var I;x.stopPropagation(),s(w=>!w),(I=i.current)!=null&&I.scrollHeight&&l(i.current.scrollHeight),ua(E,!1,!0)},y=(x,I="",w=!1,A=!1)=>{var S;if(x.stopPropagation(),w&&A?t(h1,{update_version_id:E}):A&&t(g1,{update_version_id:E}),!w&&I){(S=window.open(I,"_blank"))==null||S.focus();return}m(x,!1),r==null||r.redirectToAdmin()},m=(x,I=!0)=>{x.stopPropagation(),ua(E,!1),s(!1),I&&t(m1,{update_version_id:E})};return C.jsxs(vb,{children:[C.jsxs(Cb,{children:[C.jsx(yb,{variant:"h3",children:g}),C.jsxs(v.Box,{children:[o?C.jsx(v.Tooltip,{title:am,placement:"bottom",children:C.jsx(v.IconButton,{onClick:m,children:C.jsx(v.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,C.jsx(v.Tooltip,{title:o?im:ia,placement:"bottom",children:C.jsx(br,{onClick:h,children:C.jsx(fa,{className:o?"":"hiver-up"})})})]})]}),C.jsx(Ib,{className:o?"slideDown":"slideUp",ref:i,height:c,children:C.jsxs(Eb,{children:[u.map(({title:x,items:I,type:w})=>C.jsxs(_b,{children:[C.jsx(v.Typography,{variant:"body2_medium",children:x}),I.map(A=>{const S=w===pm,{deeplink:O,textHtml:R,imageUrl:D}=A,F=()=>C.jsx(ab,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:R}});return C.jsx(xb,{component:"ul",children:C.jsxs(wb,{component:S?"li":"div",marginLeft:D?"0":"14px",children:[D?C.jsx("img",{src:D}):null,O?C.jsx(Du,{target:"_blank",underline:"none",onClick:P=>y(P,O),fontSize:"13px",children:F()}):F()]})},R)})]},x)),C.jsx(v.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:f.map(({text:x,link:I,isAdminPanelLink:w})=>C.jsx(Ab,{variant:w?"contained":"text",children:C.jsx(Sb,{variant:"caption",onClick:A=>y(A,I,w,!0),children:x})},x))})]})})]})},z4=({selectedEmail:e,conversationId:t})=>qe({url:n5.replace(":conversationId",""+t),method:it.PATCH,data:{selectedEmail:e}}),Y4="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",j0=e=>{const t=_.useRef(null),[n,r]=_.useState(!1);return _.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},J4=e=>{const{textRef:t,isOverflow:n}=j0(e.data.label);return C.jsx(v.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:C.jsx(Tb,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},Q4=e=>C.jsxs(cn.MenuList,{...e,children:[C.jsx(Ob,{children:C.jsx(v.Typography,{variant:"body2_medium",children:ny})}),e.children]}),$4=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=j0(e.data.label);return C.jsx(cn.Option,{...e,children:C.jsxs(v.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[C.jsx(v.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:C.jsx(Lb,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?C.jsx("img",{src:Y4,width:"14px",height:"14px"}):null]})})},q4=e=>C.jsx(cn.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?C.jsx(v.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:v.theme.palette.gray.gray3}}):C.jsx(v.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:v.theme.palette.gray.gray3}})}),U4={control:e=>({...e,border:"none",boxShadow:"none",marginTop:"12px","&:hover":{border:"none",cursor:"pointer",backgroundColor:v.theme.palette.gray.gray7},"& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:v.theme.palette.gray.white,color:v.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?v.theme.palette.gray.gray7:v.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"})},K4=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=_.useContext(Ge),i=t?Object.entries(t).map(([l])=>({value:l,label:l})):e?[{value:e,label:e}]:[];_.useEffect(()=>{if(!e&&!r&&t&&Object.keys(t).length>0){const l=Object.keys(t)[0];l&&o(l)}},[t,o,e,r]);const c=l=>{const a=String((l==null?void 0:l.value)||"");a&&s&&z4({selectedEmail:a,conversationId:s}),o(a)};return C.jsx(wo,{options:i,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:c,components:{...wo.getDefaultComponents(),MenuList:Q4,Option:$4,SingleValue:J4,DropdownIndicator:q4},root:n,styles:U4,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})},ew=v.styled(v.Paper)`
|
|
1093
1093
|
width: stretch;
|
|
1094
1094
|
height: 100%;
|
|
1095
1095
|
position: absolute;
|
|
@@ -1105,7 +1105,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1105
1105
|
`,nw=v.styled(v.Box)`
|
|
1106
1106
|
margin-top: 12px;
|
|
1107
1107
|
height: 100%;
|
|
1108
|
-
`,rw="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",
|
|
1108
|
+
`,rw="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",dc=({children:e,isOpen:t,setIsOpen:n,onClose:r,title:o="Back",backButtonTooltip:s,portalId:i})=>{const c=_.useRef(null),[l,a]=_.useState(!1);return _.useEffect(()=>{i&&(c.current=document.querySelector(`[data-connectorid=${i}]`),a(!0))},[i,a]),_.useEffect(()=>()=>{n(!1)},[n]),t&&l&&c.current&&ke.createPortal(C.jsxs(ew,{className:"layover-paper",elevation:0,children:[C.jsxs(v.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[C.jsx(v.Tooltip,{title:s,placement:"bottom",children:C.jsx(v.IconButton,{onClick:r,children:C.jsx(tw,{src:rw})})}),C.jsx(v.Typography,{children:o})]}),C.jsx(nw,{children:e})]}),c.current)},V0=e=>e.common.previewCardData,G0=e=>e.common.previewCardApiStatus,ow=e=>e.common.selectedSuggestionType,sw=v.styled(v.Stack)`
|
|
1109
1109
|
width: 100%;
|
|
1110
1110
|
border-radius: 8px;
|
|
1111
1111
|
border: 1px solid ${v.theme.palette.gray.gray5};
|
|
@@ -1138,8 +1138,8 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1138
1138
|
height: 20px;
|
|
1139
1139
|
flex-shrink: 0;
|
|
1140
1140
|
}
|
|
1141
|
-
`,
|
|
1142
|
-
`).map((s,i)=>C.jsx(v.Typography,{variant:"body2",children:s},i))}),C.jsx(v.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>C.jsx(v.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})})
|
|
1141
|
+
`,H0=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=Bt(),[s,i]=_.useState(!1),[c,l]=_.useState(!0),{id:a="",cardTitle:u="",logoUrl:p}=e||{},g=t===U.LOADING,E=d=>{d.stopPropagation();const f=d.currentTarget.offsetWidth<d.currentTarget.scrollWidth;i(!!f)},b=d=>{var h;o(Tr({id:n,args:r,isRefresh:!0}));const f=d.target.tagName==="BUTTON"?(h=d.target)==null?void 0:h.firstChild:d.target;f.className&&(f.className=""),setTimeout(()=>f.className="selected",1)};return C.jsxs(sw,{children:[C.jsxs(iw,{direction:"row",justifyContent:"space-between",children:[g?C.jsxs(v.Stack,{gap:"6px",direction:"row",children:[C.jsx(vn,{width:"16px",height:"24px"}),C.jsx(vn,{width:"100px",height:"24px"})]}):C.jsxs(cw,{children:[p&&C.jsx("img",{src:p,alt:u}),C.jsx(v.Tooltip,{title:s?u:"",children:C.jsx(v.Typography,{variant:"h4",onMouseOver:d=>E(d),onMouseLeave:d=>E(d),children:u})})]}),C.jsxs(v.Stack,{direction:"row",alignItems:"center",children:[c?C.jsx(v.Tooltip,{title:uu,placement:"bottom",children:C.jsx(br,{onClick:d=>b(d),children:C.jsx("img",{src:F0})})}):null,C.jsx(v.Tooltip,{title:c?du:ia,placement:"bottom",children:C.jsx(br,{onClick:()=>l(d=>!d),children:C.jsx(fa,{className:c?"":"hiver-up"})})})]})]}),C.jsx(_0,{id:a,cardTitle:u,specificCardData:{[a]:e},specificConnectorApiStatus:{[a]:t},isOpen:c})]})},W0={values:{},errors:{}},$t={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},lw=(e,t)=>{const{type:n,payload:r}=t;switch(n){case $t.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 $t.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 $t.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case $t.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case $t.RESET_STATE:return W0}return e},Z0=()=>_.useReducer(lw,W0),X0=({state:e,dispatch:t,validations:n})=>{const r=e.errors,o=(p,g)=>{t({type:$t.SET_FIELD_VALUE,payload:{value:{value:g,name:p}}})},s=_.useCallback(()=>Object.keys(r).filter(g=>!!r[g]).length>0,[r]),i=p=>{p.stopPropagation();const{name:g,value:E}=(p==null?void 0:p.target)||{};o(g,E)},c=(p,g)=>{p.stopPropagation();const{name:E}=(p==null?void 0:p.target)||{};o(E,g)},l=(p,g)=>{o(p,g||"")},a=(p,g)=>{e.errors[p]!==g&&t({type:$t.SET_FIELD_ERROR,payload:{value:{name:p,value:g}}})},u=(p,g)=>{if(g){const E=g[p];E==null||E.forEach(b=>{var d;o(b,""),g[b]&&u(b,g),(d=n[b])!=null&&d.isRequired&&a(b,!0)})}};return{setValue:o,isErrorInValidations:s,inputChangeHandler:i,checkboxChangeHandler:c,dateChangeHandler:l,handleValidationError:a,clearDependentFields:u}},z0=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const i=s.interfaceDetails,c={loadOptions:(l,a,u,p)=>{let g=i;s.searchInterfaceDetails&&typeof l=="string"&&l.trim().length>0&&!u&&(g=s.searchInterfaceDetails);const E=Qx(n,g==null?void 0:g.args),b=Object.values((g==null?void 0:g.args)||{});if(E.length===b.length){r(Jn({fieldName:s.name,formId:String(t),searchTerm:l,fieldConfig:s,interfaceId:g==null?void 0:g.id,pagination:g==null?void 0:g.pagination,callback:a,args:{..._o(n,g==null?void 0:g.args),..._o(n,g==null?void 0:g.optionalArgs)},isScrollToBottomEvent:u,controller:p}));return}return a([])}};return{...o,[s.name]:c}},{}),Y0=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,i)=>{if(!i.createOptionInterfaceDetails)return s;const c=i.createOptionInterfaceDetails;return{...s,[i.name]:{createOption:(l,a)=>{var p,g;if(!l)return;const u={values:{name:i.name,value:l},errors:{}};o(ti({fieldName:i.name,formId:String(t),interfaceId:c.id,conversationId:r,label:l,callback:a,args:{..._o(n,(p=i==null?void 0:i.interfaceDetails)==null?void 0:p.args),..._o(n,(g=i==null?void 0:i.interfaceDetails)==null?void 0:g.optionalArgs)},createArgs:{..._o(u,c.args)}}))}}}},{}),J0=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=Bt(),s=_.useMemo(()=>{if(e&&e.length){const c=z0({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((a,u)=>{const p=u.columns;if(!p)return a;const g=z0({formFields:p,formId:n,formState:t,appDispatch:o});return{...a,[u.name]:{loadOptionsList:g}}},c)}return null},[e,t,n,o]),i=_.useMemo(()=>{const c=Y0({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((a,u)=>{const p=u.columns;if(!p)return a;const g=Y0({formFields:p,formId:n,formState:t,conversationId:r,appDispatch:o});return{...a,[u.name]:{createOptionList:g}}},c)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:i}},Q0=({setShown:e,shown:t,title:n,description:r,buttons:o})=>C.jsx(lc,{shown:t,setShown:e,showCloseButton:!0,children:C.jsxs(v.Stack,{width:"400px",padding:"20px",children:[C.jsx(v.Typography,{variant:"h2",marginBottom:"8px",children:n}),C.jsx(v.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
|
|
1142
|
+
`).map((s,i)=>C.jsx(v.Typography,{variant:"body2",children:s},i))}),C.jsx(v.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>C.jsx(v.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),$0="connector-agent-expanded-write-form",q0=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s,connectors:i})=>{var ir;const{userGroupId:c,userId:l}=zt()||{},[a,u]=_.useState(null),[p,g]=_.useState(!1),E=_.useRef(null),[b,d]=Z0(),f=ye(k0),h=ye(t?r4:D0),y=ye(s4),m=ye(o4),x=ye(c4),I=ye(l4),w=ye(u4),A=ye(d4),S=ye(f4),O=ye(N0),R=m==null?void 0:m[(a==null?void 0:a.value)??""],D=R==null?void 0:R.expandedView,{formConfigs:F,formViewConfigs:P}=_.useMemo(()=>{if(a&&"value"in a&&y&&y[a.value]&&Array.isArray(y[a.value])){const Te=y[a.value],$e=[{id:a.value,formFields:Te}];return{formConfigs:$e,formViewConfigs:D?$x(Te,C0):$e}}const le=[{id:"emptyFormId",formFields:[]}];return{formConfigs:le,formViewConfigs:le}},[y,a,D]),j=_.useMemo(()=>{var Te;const le=((Te=F==null?void 0:F[0])==null?void 0:Te.formFields)||[];return cc({formFields:le})},[F]),{setValue:X,inputChangeHandler:z,checkboxChangeHandler:q,dateChangeHandler:Y,clearDependentFields:K,handleValidationError:ce,isErrorInValidations:ee}=X0({state:b,dispatch:d,validations:j}),{conversationId:B,sendTrackingEvent:H,currentSmIds:V,connectorFunctions:{getFormElement:W,toggleFormElement:J},stackingContext:re,userEmail:oe}=_.useContext(Ge),{userGroupId:M}=zt()||{},{fetchConfig:te,createConfig:be}=J0({formFields:F[0].formFields,formId:F[0].id,formState:b,conversationId:B}),Z=(ir=f==null?void 0:f.forms.find(le=>le.type==="edit"))==null?void 0:ir.id,{externalResourceId:Ne}=f??{},Le=[I,w,S].includes(U.LOADING),Je=_.useMemo(()=>!D||!W?null:W(),[D,W]),rt=Bt();_.useEffect(()=>(D&&J&&J(!0),()=>{D&&J&&J(!1)}),[D,J]),_.useEffect(()=>{rt(x0(t?!(A&&"values"in A&&"values"in b&&JSON.stringify(P0(b.values))===JSON.stringify(P0(A.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,A,b,rt]),_.useEffect(()=>(t&&A&&d({type:$t.SET_FIELDS,payload:A}),()=>{d({type:$t.SET_FIELDS,payload:{values:{}}})}),[t,d,A]),_.useEffect(()=>{a!==null&&s(le=>({...le,object_type:a.label}))},[a,s]),_.useEffect(()=>{if(b.values){const le=h0(F[0].formFields,b.values);s(Te=>({...Te,fields_filled:le}))}},[b,F,s]),_.useEffect(()=>{if(n&&!t)return u(n);h&&h.length&&u(t&&Z?h.find(le=>le.value===Z)??null:le=>le||!m?le:h.length===1?h[0]:h.find($e=>!m[$e.value].expandedView)??null)},[h,m,t,Z,n]);const tn=()=>{u(E.current),g(!1),d({type:$t.RESET_STATE})},lt=(le,Te)=>{X(le,Te)},ot=(le,Te,$e)=>{if(Te.action==="clear"&&Te.name&&(X(Te.name,""),a!=null&&a.value&&K(Te.name,x==null?void 0:x[a.value]),j[Te.name].isRequired&&ce(Te.name,!0)),le&&typeof le=="object"&&"label"in le&&typeof le.label=="string"&&"value"in le&&(typeof le.value=="string"||typeof le.value=="number")&&typeof Te.name<"u")if(Te.name==="form-object")E.current={value:le.value,label:le.label},b.values&&le.value!==(a==null?void 0:a.value)&&(Object.values(b.values).filter(Tt=>Tt!=="").length>0?g(!0):tn());else{let vt=!1;$e&&(vt=$e.isMultiSelect||!1);const Tt=!vt&&"prefillValues"in le&&le.prefillValues,ar=vt?[{value:le.value,label:le.label}]:{value:le.value,label:le.label};if(X(Te.name,ar),Tt)for(const fn in Tt)X(fn,Tt[fn]);a!=null&&a.value&&K(Te.name,x==null?void 0:x[a.value])}},He=()=>{if(!ee()&&Z&&(m!=null&&m[Z])&&B&&Ne){const{connectorName:le,title:Te}=f;H(O1,{connector_name:le,card_title:Te,sm_ids:V,ug_id:M});const $e=m[Z].interfaceDetails;if(!$e||!A)return;const{id:vt,args:Tt={},previousArgs:ar={}}=$e,fn=ei(A,ar),nn=ei(b,Tt);rt(oi({formId:String(Z),conversationId:B,args:nn,previousArgs:fn,externalResourceId:Ne,interfaceId:vt,successCallback:()=>{o()}})).unwrap().then(()=>{H(D1,{connector_name:le,card_title:Te,sm_ids:V,ug_id:M})}).finally(()=>{rt(Or(null))})}},sr=()=>{if(!ee()&&a&&(m!=null&&m[a.value])&&B){const le=m==null?void 0:m[a.value].interfaceDetails;if(!le)return;const{id:Te,args:$e={}}=le,vt=ei(b,$e);rt(ri({formId:String(a.value),conversationId:B,args:vt,interfaceId:Te,successCallback:()=>{o()}})).unwrap().then(()=>{H(v1,{object_type:a})})}},Ft=[{label:"Cancel",action:()=>g(!1),variant:"text"},{label:"Continue",action:tn}],zr=ps({url:s1,params:{email:oe,user_id:l,ug_id:c,sm_ids:V.join(","),connector_names:i.join(","),form_object:R==null?void 0:R.name}}),Yr=()=>{window.open(zr,"_blank"),H(z1,{sm_ids:V,ug_id:c,connector_name:R==null?void 0:R.connectorName,form_object:R==null?void 0:R.name})},Dn=C.jsxs(ep,{className:D?$0:"",children:[C.jsx(Q0,{shown:p,setShown:g,title:A5,description:S5,buttons:Ft}),D?C.jsxs(uw,{children:[C.jsxs(v.Typography,{children:[t?"Edit":"Add"," to ",R.connectorName]}),C.jsx(v.Tooltip,{title:"Close Popup",placement:"bottom",children:C.jsx(v.IconButton,{onClick:r,children:C.jsx(dw,{src:S0})})})]}):null,C.jsxs(K0,{spacing:3,children:[!t&&!D?C.jsx(So,{type:"select",placeholder:v0,options:h,value:a,name:"form-object",selectChangeHandler:ot,label:O5,labelSpacing:.5,validation:{isRequired:!0}}):null,C.jsx(p0,{showGlobalLoader:S===U.LOADING,formConfig:P,selectChangeHandler:ot,inputChangeHandler:z,checkboxChangeHandler:q,dateChangeHandler:Y,tableChangeHandler:lt,onValidationError:ce,fieldsSpacing:3,labelSpacing:.5,fetchConfig:te,createConfig:be,values:b.values,validations:j,...D?{cols:C0,stackIndex:re.expandedForm}:null}),C.jsx(v.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:C.jsx(fw,{variant:"text",onClick:Yr,size:"small",children:bm})})]}),C.jsxs(U0,{children:[C.jsx(v.Button,{disabled:ee()||Le||!O,onClick:t?He:sr,size:"small",...D?{style:{order:2}}:null,children:t?lm:cm}),C.jsx(tp,{variant:"outlined",color:"tertiary",size:"small",onClick:r,disabled:Le,children:ca})]})]});return D&&Je?ke.createPortal(Dn,Je):Dn},U0=v.styled(v.Box)`
|
|
1143
1143
|
box-sizing: border-box;
|
|
1144
1144
|
height: 52px;
|
|
1145
1145
|
background-color: var(--form-background-color, inherit);
|
|
@@ -1151,7 +1151,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1151
1151
|
display: flex;
|
|
1152
1152
|
justify-content: flex-end;
|
|
1153
1153
|
column-gap: 12px;
|
|
1154
|
-
`,
|
|
1154
|
+
`,K0=v.styled(v.Stack)`
|
|
1155
1155
|
margin-bottom: 25px;
|
|
1156
1156
|
padding-right: 12px;
|
|
1157
1157
|
flex-grow: 1;
|
|
@@ -1160,7 +1160,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1160
1160
|
position: relative;
|
|
1161
1161
|
top: -5px;
|
|
1162
1162
|
}
|
|
1163
|
-
`,
|
|
1163
|
+
`,ep=v.styled(v.Stack)`
|
|
1164
1164
|
height: calc(100% - 44px);
|
|
1165
1165
|
position: relative;
|
|
1166
1166
|
overflow: auto;
|
|
@@ -1175,12 +1175,12 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1175
1175
|
border-radius: 4px;
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
-
&.${
|
|
1178
|
+
&.${$0} {
|
|
1179
1179
|
padding: 0 40px;
|
|
1180
1180
|
background-color: inherit;
|
|
1181
1181
|
--form-background-color: inherit;
|
|
1182
1182
|
}
|
|
1183
|
-
`,
|
|
1183
|
+
`,tp=v.styled(v.Button)`
|
|
1184
1184
|
&:hover {
|
|
1185
1185
|
background-color: #e3e9ff !important;
|
|
1186
1186
|
color: ${v.theme.palette.purple.primary} !important;
|
|
@@ -1206,7 +1206,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1206
1206
|
&:hover {
|
|
1207
1207
|
color: ${v.theme.palette.purple.primary};
|
|
1208
1208
|
}
|
|
1209
|
-
`,pw=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=
|
|
1209
|
+
`,pw=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=Bt(),r=ye(V0),o=ye(G0),s=ye(i4),i=ye(R0),[c,l]=_.useState(!1),[a,u]=_.useState(null),[p,g]=_.useState(""),[E,b]=_.useState({}),{conversationId:d,sendTrackingEvent:f,email:h}=_.useContext(Ge);_.useEffect(()=>{i&&i.length&&u(i[0])},[i]);const y={externalResourceId:p},m=o===U.LOADING,x=s===U.LOADING,I=()=>{!c&&a&&"value"in a&&(f(E1,{object_type:a.label}),n(Tr({id:String(a==null?void 0:a.value),args:y})).unwrap().catch(F=>{(F==null?void 0:F.status)===400?Be({message:y0,type:gt}):Be({message:y5,type:gt})})),l(F=>!F)},w=()=>{a&&"value"in a&&d&&n(ii({id:String(a.value),externalResourceId:p,conversationId:d,email:h})).unwrap().then(()=>{f(C1,{object_type:a.label,input_type:p}),Be({message:C5,type:En}),e(!1),t()}).catch(F=>{(F==null?void 0:F.status)===400?Be({message:y0,type:gt}):(F==null?void 0:F.status)===409?Be({message:v5,type:gt}):Be({message:I5,type:gt})})},A=()=>{e(!1),l(!1)},S=(F,P)=>{F&&typeof F=="object"&&"label"in F&&typeof F.label=="string"&&"value"in F&&(typeof F.value=="string"||typeof F.value=="number")&&typeof P.name<"u"&&(u({value:F.value,label:F.label}),g(""))},O=F=>{F.stopPropagation();const{value:P}=(F==null?void 0:F.target)||{};g(P),l(!1)},R=(F,P)=>{b(j=>({...j,[F]:!!P}))},D=()=>Object.keys(E).filter(P=>E[P]).length>0;return C.jsxs(ep,{children:[C.jsxs(K0,{spacing:3,children:[C.jsx(So,{type:"select",placeholder:v0,options:i,value:a,name:"form-object",selectChangeHandler:S,label:L5,labelSpacing:.5,validation:{isRequired:!0},onValidationError:R}),C.jsx(So,{type:"text",placeholder:F5,value:p,name:"resourceId",inputChangeHandler:O,label:D5,labelSpacing:.5,validation:{isRequired:!0,validate:o3()},onValidationError:R}),c?C.jsx(H0,{cardData:r,cardDataApiStatus:o,objectToLink:String((a==null?void 0:a.value)||""),args:y}):null,C.jsx(aw,{fullWidth:!0,disabled:D()||m,color:"tertiary",variant:"outlined",size:"small",onClick:I,children:c?ty:ey})]}),C.jsxs(U0,{children:[C.jsx(v.Button,{onClick:w,disabled:D()||x,size:"small",children:pu}),C.jsx(tp,{color:"tertiary",variant:"outlined",onClick:A,disabled:x,size:"small",children:ca})]})]})},hw=v.styled(v.Button)`
|
|
1210
1210
|
&:hover {
|
|
1211
1211
|
background-color: #e3e9ff !important;
|
|
1212
1212
|
color: ${v.theme.palette.purple.primary} !important;
|
|
@@ -1227,7 +1227,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1227
1227
|
& .content__btn {
|
|
1228
1228
|
margin-left: 8px;
|
|
1229
1229
|
}
|
|
1230
|
-
`,mw=e=>k.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},k.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),k.createElement("g",{mask:"url(#mask0_4649_80352)"},k.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"}))),bw=e=>k.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.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"}),k.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"})),yw=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>C.jsxs(v.Stack,{gap:2,marginTop:"12px",children:[C.jsx(v.Typography,{variant:"body2",color:v.theme.palette.gray.gray1,children:w5}),C.jsxs(v.Stack,{gap:"12px",children:[n?C.jsxs(gw,{fullWidth:!0,onClick:e,size:"medium",children:[C.jsx(mw,{}),C.jsx("span",{className:"content__btn",children:
|
|
1230
|
+
`,mw=e=>k.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},k.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),k.createElement("g",{mask:"url(#mask0_4649_80352)"},k.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"}))),bw=e=>k.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.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"}),k.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"})),yw=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>C.jsxs(v.Stack,{gap:2,marginTop:"12px",children:[C.jsx(v.Typography,{variant:"body2",color:v.theme.palette.gray.gray1,children:w5}),C.jsxs(v.Stack,{gap:"12px",children:[n?C.jsxs(gw,{fullWidth:!0,onClick:e,size:"medium",children:[C.jsx(mw,{}),C.jsx("span",{className:"content__btn",children:mu})]}):null,r?C.jsxs(hw,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[C.jsx(bw,{}),C.jsx("span",{className:"content__btn",children:bu})]}):null]})]}),vw=e=>e.write.searchObjectList,np=e=>e.write.objectDict,Cw=e=>e.write.formFields,Iw=e=>e.write.dependentFieldsMap,Ew="Search in Connectors",xw="Search in Apps",ww="Start typing to search..",Aw="Smart search suggestions",Sw=":count result:countSuffix found for :searchObject in :connectorName",_w="Back to search results",Tw="No search results found",Ow=e=>k.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{id:"icons/Actions/Search"},k.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",fill:"#97A3B7"}))),Lw=v.styled(v.Stack)`
|
|
1231
1231
|
flex-flow: row nowrap;
|
|
1232
1232
|
align-items: center;
|
|
1233
1233
|
column-gap: 12px;
|
|
@@ -1243,11 +1243,11 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1243
1243
|
width: 24px;
|
|
1244
1244
|
height: 24px;
|
|
1245
1245
|
border-radius: 50%;
|
|
1246
|
-
`,
|
|
1246
|
+
`,rp=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=Bt(),{sendTrackingEvent:s,currentSmIds:i}=_.useContext(Ge),{label:c,description:l,avatarUrl:a,connectorName:u}=e,p=()=>{s(M1,{suggestion_type:t,search_keyword:c,sm_ids:i,connector_name:u}),r(e,t),o(a5(t))};return C.jsxs(Lw,{isSelected:n,onClick:p,children:[C.jsx(Fw,{src:a,alt:"option"}),C.jsxs(v.Stack,{children:[C.jsx(v.Typography,{color:v.theme.palette.gray.gray1,children:c}),C.jsx(v.Typography,{color:v.theme.palette.gray.gray3,fontSize:"12px",children:l})]})]})},Dw=v.styled(v.Stack)`
|
|
1247
1247
|
padding: 10px 0 10px 10px;
|
|
1248
|
-
`,{Control:Rw}=
|
|
1248
|
+
`,{Control:Rw}=cn,kw=({children:e,...t})=>C.jsxs(Rw,{...t,children:[C.jsx(Dw,{children:C.jsx(Ow,{})}),e]}),Nw=e=>{const{data:t,isSelected:n,selectOption:r}=e;return C.jsx(rp,{data:t,isSelected:n,onSelect:r})},Pw={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})},Mw=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:i,NoOptionsMessage:c,menuOpen:l})=>{const{availableFeatures:a,sendTrackingEvent:u,currentSmIds:p}=_.useContext(Ge),g=et(a,ds),E=(f,{action:h})=>{h==="input-change"&&(s(f),f||i())},b=f=>{o(f),f||(s(""),i())},d=()=>{const f=[...new Set(e.map(h=>h.connectorName))];u(P1,{connector_names:f,sm_ids:p})};return C.jsx(wo,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:g?xw:Ew,isSearchable:!0,filterOption:null,styles:Pw,onInputChange:E,onChange:b,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:d,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:Nw,Control:kw,...c&&{NoOptionsMessage:c}},root:r,...typeof l=="boolean"&&{menuIsOpen:l}})},Bw=v.styled(v.Stack)`
|
|
1249
1249
|
margin: ${({isEmpty:e})=>e?"0":"12px 0"};
|
|
1250
|
-
`,jw=({objectId:e,searchString:t,fetchSearchResults:n})=>{var x;const[r,o]=
|
|
1250
|
+
`,jw=({objectId:e,searchString:t,fetchSearchResults:n})=>{var x;const[r,o]=Z0(),s=_.useRef(null),i=ye(np),c=ye(Cw),l=ye(Iw),a=_.useMemo(()=>e&&c&&c[e]&&Array.isArray(c[e])?{id:e,formFields:c[e]}:{id:"emptyFormId",formFields:[]},[c,e]),u=_.useMemo(()=>{const I=(a==null?void 0:a.formFields)||[];return cc({formFields:I})},[a]),{setValue:p,inputChangeHandler:g,dateChangeHandler:E,clearDependentFields:b,handleValidationError:d,isErrorInValidations:f}=X0({state:r,dispatch:o,validations:u}),{fetchConfig:h}=J0({formState:r,formFields:a.formFields,formId:a.id}),y=_.useCallback(I=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(I)},500)},[n]);_.useEffect(()=>{const I=r.values,w=a.id,A=a.formFields;if(Object.values(I).filter(j=>!!j).length<A.length||!i||f()){s.current&&clearTimeout(s.current);return}const S=i[e].searchInterfaceDetails;if(!S)return;const O=i[e].connectorName,{id:R,args:D={}}=S,F=ei(r,D);y({id:w,interfaceId:R,searchString:t,connectorName:O,args:F})},[r,a,i,e,t,f,y]),_.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const m=(I,w,A)=>{if(w.action==="clear"&&w.name&&(p(w.name,""),b(w.name,l[e]),u[w.name].isRequired&&d(w.name,!0)),I&&typeof I=="object"&&"label"in I&&typeof I.label=="string"&&"value"in I&&(typeof I.value=="string"||typeof I.value=="number")&&typeof w.name<"u"){let S=!1;A&&(S=A.isMultiSelect||!1);const O=S?[{value:I.value,label:I.label}]:{value:I.value,label:I.label};p(w.name,O),b(w.name,l[e])}};return C.jsx(Bw,{isEmpty:((x=a.formFields)==null?void 0:x.length)===0,children:C.jsx(p0,{showGlobalLoader:!1,formConfig:[a],selectChangeHandler:m,inputChangeHandler:g,dateChangeHandler:E,onValidationError:d,labelSpacing:.5,fetchConfig:h,values:r.values,validations:u})})},fc="@connector-agent-global-search-priority",pc=Nv(),Vw=({objectList:e})=>({sortedObjectList:_.useMemo(()=>{const r=pc.getItem(fc);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=pc.getItem(fc)??{};o[r]||(o[r]=0),o[r]++,pc.setItem(fc,o)}}),Gw=v.styled(v.Stack)`
|
|
1251
1251
|
padding: 8px 0;
|
|
1252
1252
|
`,Hw=v.styled(v.Typography)`
|
|
1253
1253
|
padding: 6px 16px;
|
|
@@ -1258,7 +1258,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1258
1258
|
color: ${v.theme.palette.gray.gray3};
|
|
1259
1259
|
font-size: 11px;
|
|
1260
1260
|
text-transform: uppercase;
|
|
1261
|
-
`,Zw=({onSelect:e,selectedOption:t,options:n})=>n.length?C.jsxs(Gw,{children:[C.jsx(Hw,{children:ww}),C.jsx(Ww,{children:Aw}),n.map(r=>C.jsx(op,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null;var Dr=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(){}},Jn=typeof window>"u"||"Deno"in globalThis;function Lt(){}function Xw(e,t){return typeof e=="function"?e(t):e}function gc(e){return typeof e=="number"&&e>=0&&e!==1/0}function sp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Rr(e,t){return typeof e=="function"?e(t):e}function Ht(e,t){return typeof e=="function"?e(t):e}function ip(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:c}=e;if(i){if(r){if(t.queryHash!==mc(i,t.options))return!1}else if(!_o(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function ap(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Qn(t.options.mutationKey)!==Qn(s))return!1}else if(!_o(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function mc(e,t){return((t==null?void 0:t.queryKeyHashFn)||Qn)(e)}function Qn(e){return JSON.stringify(e,(t,n)=>yc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function _o(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!_o(e[n],t[n])):!1}function bc(e,t){if(e===t)return e;const n=cp(e)&&cp(t);if(n||yc(e)&&yc(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,c=n?[]:{};let l=0;for(let a=0;a<i;a++){const u=n?a:s[a];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(c[u]=void 0,l++):(c[u]=bc(e[u],t[u]),c[u]===e[u]&&e[u]!==void 0&&l++)}return o===i&&l===o?e:c}return t}function ci(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 cp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yc(e){if(!lp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!lp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function lp(e){return Object.prototype.toString.call(e)==="[object Object]"}function zw(e){return new Promise(t=>{setTimeout(t,e)})}function vc(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 bc(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 bc(e,t)}return t}function Yw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Jw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var li=Symbol();function up(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===li&&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===li?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Qw=(Fp=class extends Dr{constructor(){super();se(this,$n);se(this,En);se(this,kr);$(this,kr,t=>{if(!Jn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){L(this,En)||this.setEventListener(L(this,kr))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,En))==null||t.call(this),$(this,En,void 0))}setEventListener(t){var n;$(this,kr,t),(n=L(this,En))==null||n.call(this),$(this,En,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){L(this,$n)!==t&&($(this,$n,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof L(this,$n)=="boolean"?L(this,$n):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},$n=new WeakMap,En=new WeakMap,kr=new WeakMap,Fp),Cc=new Qw,$w=(Dp=class extends Dr{constructor(){super();se(this,Nr,!0);se(this,xn);se(this,Pr);$(this,Pr,t=>{if(!Jn&&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(){L(this,xn)||this.setEventListener(L(this,Pr))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,xn))==null||t.call(this),$(this,xn,void 0))}setEventListener(t){var n;$(this,Pr,t),(n=L(this,xn))==null||n.call(this),$(this,xn,t(this.setOnline.bind(this)))}setOnline(t){L(this,Nr)!==t&&($(this,Nr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,Nr)}},Nr=new WeakMap,xn=new WeakMap,Pr=new WeakMap,Dp),ui=new $w;function Ic(){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 qw(e){return Math.min(1e3*2**e,3e4)}function dp(e){return(e??"online")==="online"?ui.isOnline():!0}var fp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ec(e){return e instanceof fp}function pp(e){let t=!1,n=0,r=!1,o;const s=Ic(),i=d=>{var f;r||(g(new fp(d)),(f=e.abort)==null||f.call(e))},c=()=>{t=!0},l=()=>{t=!1},a=()=>Cc.isFocused()&&(e.networkMode==="always"||ui.isOnline())&&e.canRun(),u=()=>dp(e.networkMode)&&e.canRun(),p=d=>{var f;r||(r=!0,(f=e.onSuccess)==null||f.call(e,d),o==null||o(),s.resolve(d))},g=d=>{var f;r||(r=!0,(f=e.onError)==null||f.call(e,d),o==null||o(),s.reject(d))},E=()=>new Promise(d=>{var f;o=h=>{(r||a())&&d(h)},(f=e.onPause)==null||f.call(e)}).then(()=>{var d;o=void 0,r||(d=e.onContinue)==null||d.call(e)}),b=()=>{if(r)return;let d;const f=n===0?e.initialPromise:void 0;try{d=f??e.fn()}catch(h){d=Promise.reject(h)}Promise.resolve(d).then(p).catch(h=>{var w;if(r)return;const y=e.retry??(Jn?0:3),m=e.retryDelay??qw,x=typeof m=="function"?m(n,h):m,I=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,h);if(t||!I){g(h);return}n++,(w=e.onFail)==null||w.call(e,n,h),zw(x).then(()=>a()?void 0:E()).then(()=>{t?g(h):b()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:c,continueRetry:l,canStart:u,start:()=>(u()?b():E().then(b),s)}}function Uw(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=c=>setTimeout(c,0);const s=c=>{t?e.push(c):o(()=>{n(c)})},i=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(l=>{n(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{s(()=>{c(...l)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var ze=Uw(),hp=(Rp=class{constructor(){se(this,qn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gc(this.gcTime)&&$(this,qn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Jn?1/0:5*60*1e3))}clearGcTimeout(){L(this,qn)&&(clearTimeout(L(this,qn)),$(this,qn,void 0))}},qn=new WeakMap,Rp),Kw=(kp=class extends hp{constructor(t){super();se(this,Wt);se(this,Mr);se(this,Br);se(this,Ft);se(this,Un);se(this,rt);se(this,To);se(this,Kn);$(this,Kn,!1),$(this,To,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,Un,t.client),$(this,Ft,L(this,Un).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,Mr,e9(this.options)),this.state=t.state??L(this,Mr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=L(this,rt))==null?void 0:t.promise}setOptions(t){this.options={...L(this,To),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Ft).remove(this)}setData(t,n){const r=vc(this.state.data,t,this.options);return he(this,Wt,pn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){he(this,Wt,pn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=L(this,rt))==null?void 0:r.promise;return(o=L(this,rt))==null||o.cancel(t),n?n.then(Lt).catch(Lt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(L(this,Mr))}isActive(){return this.observers.some(t=>Ht(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===li||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||!sp(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,rt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,rt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Ft).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(L(this,rt)&&(L(this,Kn)?L(this,rt).cancel({revert:!0}):L(this,rt).cancelRetry()),this.scheduleGc()),L(this,Ft).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,Wt,pn).call(this,{type:"invalidate"})}fetch(t,n){var l,a,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(L(this,rt))return L(this,rt).continueRetry(),L(this,rt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.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=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>($(this,Kn,!0),r.signal)})},s=()=>{const p=up(this.options,n),g={client:L(this,Un),queryKey:this.queryKey,meta:this.meta};return o(g),$(this,Kn,!1),this.options.persister?this.options.persister(p,g,this):p(g)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:L(this,Un),state:this.state,fetchFn:s};o(i),(l=this.options.behavior)==null||l.onFetch(i,this),$(this,Br,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=i.fetchOptions)==null?void 0:a.meta))&&he(this,Wt,pn).call(this,{type:"fetch",meta:(u=i.fetchOptions)==null?void 0:u.meta});const c=p=>{var g,E,b,d;Ec(p)&&p.silent||he(this,Wt,pn).call(this,{type:"error",error:p}),Ec(p)||((E=(g=L(this,Ft).config).onError)==null||E.call(g,p,this),(d=(b=L(this,Ft).config).onSettled)==null||d.call(b,this.state.data,p,this)),this.scheduleGc()};return $(this,rt,pp({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var g,E,b,d;if(p===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}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(f){c(f);return}(E=(g=L(this,Ft).config).onSuccess)==null||E.call(g,p,this),(d=(b=L(this,Ft).config).onSettled)==null||d.call(b,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,g)=>{he(this,Wt,pn).call(this,{type:"failed",failureCount:p,error:g})},onPause:()=>{he(this,Wt,pn).call(this,{type:"pause"})},onContinue:()=>{he(this,Wt,pn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),L(this,rt).start()}},Mr=new WeakMap,Br=new WeakMap,Ft=new WeakMap,Un=new WeakMap,rt=new WeakMap,To=new WeakMap,Kn=new WeakMap,Wt=new WeakSet,pn=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,...gp(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 Ec(o)&&o.revert&&L(this,Br)?{...L(this,Br),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),ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),L(this,Ft).notify({query:this,type:"updated",action:t})})},kp);function gp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function e9(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 t9=(Np=class extends Dr{constructor(t={}){super();se(this,Ut);this.config=t,$(this,Ut,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??mc(o,n);let i=this.get(s);return i||(i=new Kw({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){L(this,Ut).has(t.queryHash)||(L(this,Ut).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=L(this,Ut).get(t.queryHash);n&&(t.destroy(),n===t&&L(this,Ut).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Ut).get(t)}getAll(){return[...L(this,Ut).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ip(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ip(t,r)):n}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ut=new WeakMap,Np),n9=(Pp=class extends hp{constructor(t){super();se(this,en);se(this,Kt);se(this,at);se(this,er);this.mutationId=t.mutationId,$(this,at,t.mutationCache),$(this,Kt,[]),this.state=t.state||mp(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Kt).includes(t)||(L(this,Kt).push(t),this.clearGcTimeout(),L(this,at).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Kt,L(this,Kt).filter(n=>n!==t)),this.scheduleGc(),L(this,at).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Kt).length||(this.state.status==="pending"?this.scheduleGc():L(this,at).remove(this))}continue(){var t;return((t=L(this,er))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,i,c,l,a,u,p,g,E,b,d,f,h,y,m,x,I,w,A;$(this,er,pp({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,T)=>{he(this,en,Rn).call(this,{type:"failed",failureCount:S,error:T})},onPause:()=>{he(this,en,Rn).call(this,{type:"pause"})},onContinue:()=>{he(this,en,Rn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,at).canRun(this)}));const n=this.state.status==="pending",r=!L(this,er).canStart();try{if(!n){he(this,en,Rn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=L(this,at).config).onMutate)==null?void 0:s.call(o,t,this));const T=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,t));T!==this.state.context&&he(this,en,Rn).call(this,{type:"pending",context:T,variables:t,isPaused:r})}const S=await L(this,er).start();return await((a=(l=L(this,at).config).onSuccess)==null?void 0:a.call(l,S,t,this.state.context,this)),await((p=(u=this.options).onSuccess)==null?void 0:p.call(u,S,t,this.state.context)),await((E=(g=L(this,at).config).onSettled)==null?void 0:E.call(g,S,null,this.state.variables,this.state.context,this)),await((d=(b=this.options).onSettled)==null?void 0:d.call(b,S,null,t,this.state.context)),he(this,en,Rn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((h=(f=L(this,at).config).onError)==null?void 0:h.call(f,S,t,this.state.context,this)),await((m=(y=this.options).onError)==null?void 0:m.call(y,S,t,this.state.context)),await((I=(x=L(this,at).config).onSettled)==null?void 0:I.call(x,void 0,S,this.state.variables,this.state.context,this)),await((A=(w=this.options).onSettled)==null?void 0:A.call(w,void 0,S,t,this.state.context)),S}finally{he(this,en,Rn).call(this,{type:"error",error:S})}}finally{L(this,at).runNext(this)}}},Kt=new WeakMap,at=new WeakMap,er=new WeakMap,en=new WeakSet,Rn=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),ze.batch(()=>{L(this,Kt).forEach(r=>{r.onMutationUpdate(t)}),L(this,at).notify({mutation:this,type:"updated",action:t})})},Pp);function mp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var r9=(Mp=class extends Dr{constructor(t={}){super();se(this,cn);se(this,Zt);se(this,Oo);this.config=t,$(this,cn,new Set),$(this,Zt,new Map),$(this,Oo,0)}build(t,n,r){const o=new n9({mutationCache:this,mutationId:++yi(this,Oo)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){L(this,cn).add(t);const n=di(t);if(typeof n=="string"){const r=L(this,Zt).get(n);r?r.push(t):L(this,Zt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,cn).delete(t)){const n=di(t);if(typeof n=="string"){const r=L(this,Zt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&L(this,Zt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=di(t);if(typeof n=="string"){const r=L(this,Zt).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=di(t);if(typeof n=="string"){const o=(r=L(this,Zt).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(){ze.batch(()=>{L(this,cn).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,cn).clear(),L(this,Zt).clear()})}getAll(){return Array.from(L(this,cn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ap(n,r))}findAll(t={}){return this.getAll().filter(n=>ap(t,n))}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(Lt))))}},cn=new WeakMap,Zt=new WeakMap,Oo=new WeakMap,Mp);function di(e){var t;return(t=e.options.scope)==null?void 0:t.id}function bp(e){return{onFetch:(t,n)=>{var u,p,g,E,b;const r=t.options,o=(g=(p=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,s=((E=t.state.data)==null?void 0:E.pages)||[],i=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const a=async()=>{let d=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},h=up(t.options,t.fetchOptions),y=async(m,x,I)=>{if(d)return Promise.reject();if(x==null&&m.pages.length)return Promise.resolve(m);const w={client:t.client,queryKey:t.queryKey,pageParam:x,direction:I?"backward":"forward",meta:t.options.meta};f(w);const A=await h(w),{maxPages:S}=t.options,T=I?Jw:Yw;return{pages:T(m.pages,A,S),pageParams:T(m.pageParams,x,S)}};if(o&&s.length){const m=o==="backward",x=m?o9:yp,I={pages:s,pageParams:i},w=x(r,I);c=await y(I,w,m)}else{const m=e??s.length;do{const x=l===0?i[0]??r.initialPageParam:yp(r,c);if(l>0&&x==null)break;c=await y(c,x),l++}while(l<m)}return c};t.options.persister?t.fetchFn=()=>{var d,f;return(f=(d=t.options).persister)==null?void 0:f.call(d,a,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=a}}}function yp(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 o9(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}var s9=(Bp=class{constructor(e={}){se(this,je);se(this,wn);se(this,An);se(this,jr);se(this,Vr);se(this,Sn);se(this,Gr);se(this,Hr);$(this,je,e.queryCache||new t9),$(this,wn,e.mutationCache||new r9),$(this,An,e.defaultOptions||{}),$(this,jr,new Map),$(this,Vr,new Map),$(this,Sn,0)}mount(){yi(this,Sn)._++,L(this,Sn)===1&&($(this,Gr,Cc.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,je).onFocus())})),$(this,Hr,ui.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,je).onOnline())})))}unmount(){var e,t;yi(this,Sn)._--,L(this,Sn)===0&&((e=L(this,Gr))==null||e.call(this),$(this,Gr,void 0),(t=L(this,Hr))==null||t.call(this),$(this,Hr,void 0))}isFetching(e){return L(this,je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,wn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=L(this,je).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Rr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return L(this,je).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=L(this,je).get(r.queryHash),s=o==null?void 0:o.state.data,i=Xw(t,s);if(i!==void 0)return L(this,je).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return ze.batch(()=>L(this,je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=L(this,je);ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=L(this,je);return ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ze.batch(()=>L(this,je).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Lt).catch(Lt)}invalidateQueries(e,t={}){return ze.batch(()=>(L(this,je).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=ze.batch(()=>L(this,je).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Lt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Lt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=L(this,je).build(this,t);return n.isStaleByTime(Rr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lt).catch(Lt)}fetchInfiniteQuery(e){return e.behavior=bp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lt).catch(Lt)}ensureInfiniteQueryData(e){return e.behavior=bp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ui.isOnline()?L(this,wn).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,je)}getMutationCache(){return L(this,wn)}getDefaultOptions(){return L(this,An)}setDefaultOptions(e){$(this,An,e)}setQueryDefaults(e,t){L(this,jr).set(Qn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,jr).values()],n={};return t.forEach(r=>{_o(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){L(this,Vr).set(Qn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Vr).values()],n={};return t.forEach(r=>{_o(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,An).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=mc(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===li&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,An).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,je).clear(),L(this,wn).clear()}},je=new WeakMap,wn=new WeakMap,An=new WeakMap,jr=new WeakMap,Vr=new WeakMap,Sn=new WeakMap,Gr=new WeakMap,Hr=new WeakMap,Bp),i9=(jp=class extends Dr{constructor(t,n){super();se(this,Se);se(this,mt);se(this,me);se(this,Lo);se(this,ct);se(this,tr);se(this,Wr);se(this,_n);se(this,tn);se(this,Fo);se(this,Zr);se(this,Xr);se(this,nr);se(this,rr);se(this,Tn);se(this,zr,new Set);this.options=n,$(this,mt,t),$(this,tn,null),$(this,_n,Ic()),this.options.experimental_prefetchInRender||L(this,_n).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&&(L(this,me).addObserver(this),vp(L(this,me),this.options)?he(this,Se,Bo).call(this):this.updateResult(),he(this,Se,Pc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xc(L(this,me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xc(L(this,me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,Se,Mc).call(this),he(this,Se,Bc).call(this),L(this,me).removeObserver(this)}setOptions(t,n){const r=this.options,o=L(this,me);if(this.options=L(this,mt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ht(this.options.enabled,L(this,me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,Se,jc).call(this),L(this,me).setOptions(this.options),r._defaulted&&!ci(this.options,r)&&L(this,mt).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,me),observer:this});const s=this.hasListeners();s&&Cp(L(this,me),o,this.options,r)&&he(this,Se,Bo).call(this),this.updateResult(n),s&&(L(this,me)!==o||Ht(this.options.enabled,L(this,me))!==Ht(r.enabled,L(this,me))||Rr(this.options.staleTime,L(this,me))!==Rr(r.staleTime,L(this,me)))&&he(this,Se,Rc).call(this);const i=he(this,Se,kc).call(this);s&&(L(this,me)!==o||Ht(this.options.enabled,L(this,me))!==Ht(r.enabled,L(this,me))||i!==L(this,Tn))&&he(this,Se,Nc).call(this,i)}getOptimisticResult(t){const n=L(this,mt).getQueryCache().build(L(this,mt),t),r=this.createResult(n,t);return c9(this,r)&&($(this,ct,r),$(this,Wr,this.options),$(this,tr,L(this,me).state)),r}getCurrentResult(){return L(this,ct)}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){L(this,zr).add(t)}getCurrentQuery(){return L(this,me)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=L(this,mt).defaultQueryOptions(t),r=L(this,mt).getQueryCache().build(L(this,mt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return he(this,Se,Bo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,ct)))}createResult(t,n){var S;const r=L(this,me),o=this.options,s=L(this,ct),i=L(this,tr),c=L(this,Wr),a=t!==r?t.state:L(this,Lo),{state:u}=t;let p={...u},g=!1,E;if(n._optimisticResults){const T=this.hasListeners(),R=!T&&vp(t,n),D=T&&Cp(t,r,n,o);(R||D)&&(p={...p,...gp(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:d,status:f}=p;if(n.select&&p.data!==void 0)if(s&&p.data===(i==null?void 0:i.data)&&n.select===L(this,Fo))E=L(this,Zr);else try{$(this,Fo,n.select),E=n.select(p.data),E=vc(s==null?void 0:s.data,E,n),$(this,Zr,E),$(this,tn,null)}catch(T){$(this,tn,T)}else E=p.data;if(n.placeholderData!==void 0&&E===void 0&&f==="pending"){let T;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData))T=s.data;else if(T=typeof n.placeholderData=="function"?n.placeholderData((S=L(this,Xr))==null?void 0:S.state.data,L(this,Xr)):n.placeholderData,n.select&&T!==void 0)try{T=n.select(T),$(this,tn,null)}catch(R){$(this,tn,R)}T!==void 0&&(f="success",E=vc(s==null?void 0:s.data,T,n),g=!0)}L(this,tn)&&(b=L(this,tn),E=L(this,Zr),d=Date.now(),f="error");const h=p.fetchStatus==="fetching",y=f==="pending",m=f==="error",x=y&&h,I=E!==void 0,A={status:f,fetchStatus:p.fetchStatus,isPending:y,isSuccess:f==="success",isError:m,isInitialLoading:x,isLoading:x,data:E,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:d,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>a.dataUpdateCount||p.errorUpdateCount>a.errorUpdateCount,isFetching:h,isRefetching:h&&!y,isLoadingError:m&&!I,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:m&&I,isStale:wc(t,n),refetch:this.refetch,promise:L(this,_n)};if(this.options.experimental_prefetchInRender){const T=F=>{A.status==="error"?F.reject(A.error):A.data!==void 0&&F.resolve(A.data)},R=()=>{const F=$(this,_n,A.promise=Ic());T(F)},D=L(this,_n);switch(D.status){case"pending":t.queryHash===r.queryHash&&T(D);break;case"fulfilled":(A.status==="error"||A.data!==D.value)&&R();break;case"rejected":(A.status!=="error"||A.error!==D.reason)&&R();break}}return A}updateResult(t){const n=L(this,ct),r=this.createResult(L(this,me),this.options);if($(this,tr,L(this,me).state),$(this,Wr,this.options),L(this,tr).data!==void 0&&$(this,Xr,L(this,me)),ci(r,n))return;$(this,ct,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,c=typeof i=="function"?i():i;if(c==="all"||!c&&!L(this,zr).size)return!0;const l=new Set(c??L(this,zr));return this.options.throwOnError&&l.add("error"),Object.keys(L(this,ct)).some(a=>{const u=a;return L(this,ct)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),he(this,Se,Wp).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,Se,Pc).call(this)}},mt=new WeakMap,me=new WeakMap,Lo=new WeakMap,ct=new WeakMap,tr=new WeakMap,Wr=new WeakMap,_n=new WeakMap,tn=new WeakMap,Fo=new WeakMap,Zr=new WeakMap,Xr=new WeakMap,nr=new WeakMap,rr=new WeakMap,Tn=new WeakMap,zr=new WeakMap,Se=new WeakSet,Bo=function(t){he(this,Se,jc).call(this);let n=L(this,me).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Lt)),n},Rc=function(){he(this,Se,Mc).call(this);const t=Rr(this.options.staleTime,L(this,me));if(Jn||L(this,ct).isStale||!gc(t))return;const r=sp(L(this,ct).dataUpdatedAt,t)+1;$(this,nr,setTimeout(()=>{L(this,ct).isStale||this.updateResult()},r))},kc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,me)):this.options.refetchInterval)??!1},Nc=function(t){he(this,Se,Bc).call(this),$(this,Tn,t),!(Jn||Ht(this.options.enabled,L(this,me))===!1||!gc(L(this,Tn))||L(this,Tn)===0)&&$(this,rr,setInterval(()=>{(this.options.refetchIntervalInBackground||Cc.isFocused())&&he(this,Se,Bo).call(this)},L(this,Tn)))},Pc=function(){he(this,Se,Rc).call(this),he(this,Se,Nc).call(this,he(this,Se,kc).call(this))},Mc=function(){L(this,nr)&&(clearTimeout(L(this,nr)),$(this,nr,void 0))},Bc=function(){L(this,rr)&&(clearInterval(L(this,rr)),$(this,rr,void 0))},jc=function(){const t=L(this,mt).getQueryCache().build(L(this,mt),this.options);if(t===L(this,me))return;const n=L(this,me);$(this,me,t),$(this,Lo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Wp=function(t){ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(L(this,ct))}),L(this,mt).getQueryCache().notify({query:L(this,me),type:"observerResultsUpdated"})})},jp);function a9(e,t){return Ht(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function vp(e,t){return a9(e,t)||e.state.data!==void 0&&xc(e,t,t.refetchOnMount)}function xc(e,t,n){if(Ht(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&wc(e,t)}return!1}function Cp(e,t,n,r){return(e!==t||Ht(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&wc(e,n)}function wc(e,t){return Ht(t.enabled,e)!==!1&&e.isStaleByTime(Rr(t.staleTime,e))}function c9(e,t){return!ci(e.getCurrentResult(),t)}var l9=(Vp=class extends Dr{constructor(t,n){super();se(this,un);se(this,On);se(this,Ln);se(this,bt);se(this,ln);$(this,On,t),this.setOptions(n),this.bindMethods(),he(this,un,vi).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=L(this,On).defaultMutationOptions(t),ci(this.options,n)||L(this,On).getMutationCache().notify({type:"observerOptionsUpdated",mutation:L(this,bt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Qn(n.mutationKey)!==Qn(this.options.mutationKey)?this.reset():((r=L(this,bt))==null?void 0:r.state.status)==="pending"&&L(this,bt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=L(this,bt))==null||t.removeObserver(this)}onMutationUpdate(t){he(this,un,vi).call(this),he(this,un,Vc).call(this,t)}getCurrentResult(){return L(this,Ln)}reset(){var t;(t=L(this,bt))==null||t.removeObserver(this),$(this,bt,void 0),he(this,un,vi).call(this),he(this,un,Vc).call(this)}mutate(t,n){var r;return $(this,ln,n),(r=L(this,bt))==null||r.removeObserver(this),$(this,bt,L(this,On).getMutationCache().build(L(this,On),this.options)),L(this,bt).addObserver(this),L(this,bt).execute(t)}},On=new WeakMap,Ln=new WeakMap,bt=new WeakMap,ln=new WeakMap,un=new WeakSet,vi=function(){var n;const t=((n=L(this,bt))==null?void 0:n.state)??mp();$(this,Ln,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Vc=function(t){ze.batch(()=>{var n,r,o,s,i,c,l,a;if(L(this,ln)&&this.hasListeners()){const u=L(this,Ln).variables,p=L(this,Ln).context;(t==null?void 0:t.type)==="success"?((r=(n=L(this,ln)).onSuccess)==null||r.call(n,t.data,u,p),(s=(o=L(this,ln)).onSettled)==null||s.call(o,t.data,null,u,p)):(t==null?void 0:t.type)==="error"&&((c=(i=L(this,ln)).onError)==null||c.call(i,t.error,u,p),(a=(l=L(this,ln)).onSettled)==null||a.call(l,void 0,t.error,u,p))}this.listeners.forEach(u=>{u(L(this,Ln))})})},Vp),Ip=k.createContext(void 0),Ep=e=>{const t=k.useContext(Ip);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},u9=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(Ip.Provider,{value:e,children:t})),xp=k.createContext(!1),d9=()=>k.useContext(xp);xp.Provider;function f9(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var p9=k.createContext(f9()),h9=()=>k.useContext(p9);function wp(e,t){return typeof e=="function"?e(...t):!!e}function Ac(){}var g9=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},m9=e=>{k.useEffect(()=>{e.clearReset()},[e])},b9=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||wp(n,[e.error,r])),y9=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)))},v9=(e,t)=>e.isLoading&&e.isFetching&&!t,C9=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ap=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function I9(e,t,n){var p,g,E,b,d;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=Ep(),o=d9(),s=h9(),i=r.defaultQueryOptions(e);(g=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||g.call(p,i),process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.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`)),i._optimisticResults=o?"isRestoring":"optimistic",y9(i),g9(i,s),m9(s);const c=!r.getQueryCache().get(i.queryHash),[l]=k.useState(()=>new t(r,i)),a=l.getOptimisticResult(i),u=!o&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(f=>{const h=u?l.subscribe(ze.batchCalls(f)):Ac;return l.updateResult(),h},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),k.useEffect(()=>{l.setOptions(i,{listeners:!1})},[i,l]),C9(i,a))throw Ap(i,l,s);if(b9({result:a,errorResetBoundary:s,throwOnError:i.throwOnError,query:r.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw a.error;if((b=(E=r.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||b.call(E,i,a),i.experimental_prefetchInRender&&!Jn&&v9(a,o)){const f=c?Ap(i,l,s):(d=r.getQueryCache().get(i.queryHash))==null?void 0:d.promise;f==null||f.catch(Ac).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?a:l.trackResult(a)}function Sp(e,t){return I9(e,i9)}function _p(e,t){const n=Ep(),[r]=k.useState(()=>new l9(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const o=k.useSyncExternalStore(k.useCallback(i=>r.subscribe(ze.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=k.useCallback((i,c)=>{r.mutate(i,c).catch(Ac)},[r]);if(o.error&&wp(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const E9=e=>new Promise(t=>setTimeout(t,e)),x9=({apiFn:e,intervalMillis:t,maxRetries:n,isSatisfied:r})=>(...s)=>{const i=async(c=0)=>{const l=await e(...s);if(r(l))return l;if(c>=n)throw l;return c++,E9(t).then(()=>i(c))};return i()},w9=async({conversationId:e,senderEmail:t})=>{try{const n=await qe({url:br(qx,{conversationId:e}),params:{senderEmail:t},method:it.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},Tp=({conversationId:e,senderEmail:t,enabled:n})=>Sp({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>w9({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),Op="/v1/api",A9=`${Op}/connectors/forms/:formId/search`,S9=`${Op}/connectors/conversation/:conversationId/smart-suggestions`,_9=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}},T9=x9({apiFn:async({conversationId:e})=>{try{const t=await qe({url:br(S9,{conversationId:e}),method:it.GET}),n=t==null?void 0:t.data;return _9(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),O9=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=Tp({conversationId:e,senderEmail:t,enabled:n});return Sp({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>T9({conversationId:e}),enabled:n&&r})},L9=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,i]=_.useState(""),{conversationId:c,email:l,availableFeatures:a}=_.useContext(Ve),u=be(vw),p=be(rp),g=tt(a,tm),{sortedObjectList:E,updatePriority:b}=Vw({objectList:u}),{data:d}=O9({enabled:g&&!!c,conversationId:String(c),senderEmail:l}),f=(d==null?void 0:d.suggestedOptions)??[],h=_.useMemo(()=>!p||!E.length?[]:E.map(({value:m})=>{const x=p[m];return x?{description:`${x.connectorName??""} - ${x.searchObject}`,avatarUrl:x.logoUrl,label:"",value:m,connectorName:x.connectorName,objectName:x.searchObject}:null}).filter(m=>!!m),[E,p]),y=m=>{n(m),m&&b(""+m.value)};return h.length?C.jsxs(v.Stack,{children:[C.jsx(Mw,{value:e,options:h.map(m=>({...m,label:s})),inputValue:s,root:t,onInputChange:i,onChange:y,onReset:o,NoOptionsMessage:({selectOption:m})=>C.jsx(Zw,{selectedOption:e,onSelect:m,options:f}),menuOpen:!s&&!f.length?!1:void 0}),e?C.jsx(jw,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},F9="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%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'%20fill='%236C7B94'/%3e%3c/svg%3e",D9=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 qe({url:`${e5.replace(":id",e)}?${s.toString()}`,method:it.POST,data:{externalResourceId:t,conversationId:n}})},R9=({onSuccess:e})=>_p({mutationFn:D9,onSuccess:()=>{Me({message:yv,type:In}),e==null||e()},onError:()=>{Me({message:vv,type:ht})}}),k9="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",N9=v.styled(v.Stack)`
|
|
1261
|
+
`,Zw=({onSelect:e,selectedOption:t,options:n})=>n.length?C.jsxs(Gw,{children:[C.jsx(Hw,{children:ww}),C.jsx(Ww,{children:Aw}),n.map(r=>C.jsx(rp,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null;var Fr=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(){}},Qn=typeof window>"u"||"Deno"in globalThis;function Ot(){}function Xw(e,t){return typeof e=="function"?e(t):e}function hc(e){return typeof e=="number"&&e>=0&&e!==1/0}function op(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dr(e,t){return typeof e=="function"?e(t):e}function Gt(e,t){return typeof e=="function"?e(t):e}function sp(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:c}=e;if(i){if(r){if(t.queryHash!==gc(i,t.options))return!1}else if(!Lo(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function ip(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if($n(t.options.mutationKey)!==$n(s))return!1}else if(!Lo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function gc(e,t){return((t==null?void 0:t.queryKeyHashFn)||$n)(e)}function $n(e){return JSON.stringify(e,(t,n)=>bc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Lo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Lo(e[n],t[n])):!1}function mc(e,t){if(e===t)return e;const n=ap(e)&&ap(t);if(n||bc(e)&&bc(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,c=n?[]:{};let l=0;for(let a=0;a<i;a++){const u=n?a:s[a];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(c[u]=void 0,l++):(c[u]=mc(e[u],t[u]),c[u]===e[u]&&e[u]!==void 0&&l++)}return o===i&&l===o?e:c}return t}function li(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 ap(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bc(e){if(!cp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!cp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cp(e){return Object.prototype.toString.call(e)==="[object Object]"}function zw(e){return new Promise(t=>{setTimeout(t,e)})}function yc(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 mc(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 mc(e,t)}return t}function Yw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Jw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ui=Symbol();function lp(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ui&&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===ui?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Qw=(Lp=class extends Fr{constructor(){super();ie(this,qn);ie(this,xn);ie(this,Rr);$(this,Rr,t=>{if(!Qn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){L(this,xn)||this.setEventListener(L(this,Rr))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,xn))==null||t.call(this),$(this,xn,void 0))}setEventListener(t){var n;$(this,Rr,t),(n=L(this,xn))==null||n.call(this),$(this,xn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){L(this,qn)!==t&&($(this,qn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof L(this,qn)=="boolean"?L(this,qn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qn=new WeakMap,xn=new WeakMap,Rr=new WeakMap,Lp),vc=new Qw,$w=(Fp=class extends Fr{constructor(){super();ie(this,kr,!0);ie(this,wn);ie(this,Nr);$(this,Nr,t=>{if(!Qn&&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(){L(this,wn)||this.setEventListener(L(this,Nr))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,wn))==null||t.call(this),$(this,wn,void 0))}setEventListener(t){var n;$(this,Nr,t),(n=L(this,wn))==null||n.call(this),$(this,wn,t(this.setOnline.bind(this)))}setOnline(t){L(this,kr)!==t&&($(this,kr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,kr)}},kr=new WeakMap,wn=new WeakMap,Nr=new WeakMap,Fp),di=new $w;function Cc(){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 qw(e){return Math.min(1e3*2**e,3e4)}function up(e){return(e??"online")==="online"?di.isOnline():!0}var dp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ic(e){return e instanceof dp}function fp(e){let t=!1,n=0,r=!1,o;const s=Cc(),i=d=>{var f;r||(g(new dp(d)),(f=e.abort)==null||f.call(e))},c=()=>{t=!0},l=()=>{t=!1},a=()=>vc.isFocused()&&(e.networkMode==="always"||di.isOnline())&&e.canRun(),u=()=>up(e.networkMode)&&e.canRun(),p=d=>{var f;r||(r=!0,(f=e.onSuccess)==null||f.call(e,d),o==null||o(),s.resolve(d))},g=d=>{var f;r||(r=!0,(f=e.onError)==null||f.call(e,d),o==null||o(),s.reject(d))},E=()=>new Promise(d=>{var f;o=h=>{(r||a())&&d(h)},(f=e.onPause)==null||f.call(e)}).then(()=>{var d;o=void 0,r||(d=e.onContinue)==null||d.call(e)}),b=()=>{if(r)return;let d;const f=n===0?e.initialPromise:void 0;try{d=f??e.fn()}catch(h){d=Promise.reject(h)}Promise.resolve(d).then(p).catch(h=>{var w;if(r)return;const y=e.retry??(Qn?0:3),m=e.retryDelay??qw,x=typeof m=="function"?m(n,h):m,I=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,h);if(t||!I){g(h);return}n++,(w=e.onFail)==null||w.call(e,n,h),zw(x).then(()=>a()?void 0:E()).then(()=>{t?g(h):b()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:c,continueRetry:l,canStart:u,start:()=>(u()?b():E().then(b),s)}}function Uw(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=c=>setTimeout(c,0);const s=c=>{t?e.push(c):o(()=>{n(c)})},i=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(l=>{n(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{s(()=>{c(...l)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Ye=Uw(),pp=(Dp=class{constructor(){ie(this,Un)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hc(this.gcTime)&&$(this,Un,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qn?1/0:5*60*1e3))}clearGcTimeout(){L(this,Un)&&(clearTimeout(L(this,Un)),$(this,Un,void 0))}},Un=new WeakMap,Dp),Kw=(Rp=class extends pp{constructor(t){super();ie(this,Ht);ie(this,Pr);ie(this,Mr);ie(this,Lt);ie(this,Kn);ie(this,nt);ie(this,Fo);ie(this,er);$(this,er,!1),$(this,Fo,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,Kn,t.client),$(this,Lt,L(this,Kn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,Pr,e9(this.options)),this.state=t.state??L(this,Pr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=L(this,nt))==null?void 0:t.promise}setOptions(t){this.options={...L(this,Fo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Lt).remove(this)}setData(t,n){const r=yc(this.state.data,t,this.options);return he(this,Ht,hn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){he(this,Ht,hn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=L(this,nt))==null?void 0:r.promise;return(o=L(this,nt))==null||o.cancel(t),n?n.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(L(this,Pr))}isActive(){return this.observers.some(t=>Gt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ui||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||!op(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,nt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,nt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Lt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(L(this,nt)&&(L(this,er)?L(this,nt).cancel({revert:!0}):L(this,nt).cancelRetry()),this.scheduleGc()),L(this,Lt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,Ht,hn).call(this,{type:"invalidate"})}fetch(t,n){var l,a,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(L(this,nt))return L(this,nt).continueRetry(),L(this,nt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.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=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>($(this,er,!0),r.signal)})},s=()=>{const p=lp(this.options,n),g={client:L(this,Kn),queryKey:this.queryKey,meta:this.meta};return o(g),$(this,er,!1),this.options.persister?this.options.persister(p,g,this):p(g)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:L(this,Kn),state:this.state,fetchFn:s};o(i),(l=this.options.behavior)==null||l.onFetch(i,this),$(this,Mr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=i.fetchOptions)==null?void 0:a.meta))&&he(this,Ht,hn).call(this,{type:"fetch",meta:(u=i.fetchOptions)==null?void 0:u.meta});const c=p=>{var g,E,b,d;Ic(p)&&p.silent||he(this,Ht,hn).call(this,{type:"error",error:p}),Ic(p)||((E=(g=L(this,Lt).config).onError)==null||E.call(g,p,this),(d=(b=L(this,Lt).config).onSettled)==null||d.call(b,this.state.data,p,this)),this.scheduleGc()};return $(this,nt,fp({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var g,E,b,d;if(p===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}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(f){c(f);return}(E=(g=L(this,Lt).config).onSuccess)==null||E.call(g,p,this),(d=(b=L(this,Lt).config).onSettled)==null||d.call(b,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,g)=>{he(this,Ht,hn).call(this,{type:"failed",failureCount:p,error:g})},onPause:()=>{he(this,Ht,hn).call(this,{type:"pause"})},onContinue:()=>{he(this,Ht,hn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),L(this,nt).start()}},Pr=new WeakMap,Mr=new WeakMap,Lt=new WeakMap,Kn=new WeakMap,nt=new WeakMap,Fo=new WeakMap,er=new WeakMap,Ht=new WeakSet,hn=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,...hp(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 Ic(o)&&o.revert&&L(this,Mr)?{...L(this,Mr),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),Ye.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),L(this,Lt).notify({query:this,type:"updated",action:t})})},Rp);function hp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:up(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function e9(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 t9=(kp=class extends Fr{constructor(t={}){super();ie(this,qt);this.config=t,$(this,qt,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??gc(o,n);let i=this.get(s);return i||(i=new Kw({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){L(this,qt).has(t.queryHash)||(L(this,qt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=L(this,qt).get(t.queryHash);n&&(t.destroy(),n===t&&L(this,qt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ye.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,qt).get(t)}getAll(){return[...L(this,qt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>sp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>sp(t,r)):n}notify(t){Ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ye.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ye.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},qt=new WeakMap,kp),n9=(Np=class extends pp{constructor(t){super();ie(this,Kt);ie(this,Ut);ie(this,at);ie(this,tr);this.mutationId=t.mutationId,$(this,at,t.mutationCache),$(this,Ut,[]),this.state=t.state||gp(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Ut).includes(t)||(L(this,Ut).push(t),this.clearGcTimeout(),L(this,at).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Ut,L(this,Ut).filter(n=>n!==t)),this.scheduleGc(),L(this,at).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Ut).length||(this.state.status==="pending"?this.scheduleGc():L(this,at).remove(this))}continue(){var t;return((t=L(this,tr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,i,c,l,a,u,p,g,E,b,d,f,h,y,m,x,I,w,A;$(this,tr,fp({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,O)=>{he(this,Kt,kn).call(this,{type:"failed",failureCount:S,error:O})},onPause:()=>{he(this,Kt,kn).call(this,{type:"pause"})},onContinue:()=>{he(this,Kt,kn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,at).canRun(this)}));const n=this.state.status==="pending",r=!L(this,tr).canStart();try{if(!n){he(this,Kt,kn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=L(this,at).config).onMutate)==null?void 0:s.call(o,t,this));const O=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,t));O!==this.state.context&&he(this,Kt,kn).call(this,{type:"pending",context:O,variables:t,isPaused:r})}const S=await L(this,tr).start();return await((a=(l=L(this,at).config).onSuccess)==null?void 0:a.call(l,S,t,this.state.context,this)),await((p=(u=this.options).onSuccess)==null?void 0:p.call(u,S,t,this.state.context)),await((E=(g=L(this,at).config).onSettled)==null?void 0:E.call(g,S,null,this.state.variables,this.state.context,this)),await((d=(b=this.options).onSettled)==null?void 0:d.call(b,S,null,t,this.state.context)),he(this,Kt,kn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((h=(f=L(this,at).config).onError)==null?void 0:h.call(f,S,t,this.state.context,this)),await((m=(y=this.options).onError)==null?void 0:m.call(y,S,t,this.state.context)),await((I=(x=L(this,at).config).onSettled)==null?void 0:I.call(x,void 0,S,this.state.variables,this.state.context,this)),await((A=(w=this.options).onSettled)==null?void 0:A.call(w,void 0,S,t,this.state.context)),S}finally{he(this,Kt,kn).call(this,{type:"error",error:S})}}finally{L(this,at).runNext(this)}}},Ut=new WeakMap,at=new WeakMap,tr=new WeakMap,Kt=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),Ye.batch(()=>{L(this,Ut).forEach(r=>{r.onMutationUpdate(t)}),L(this,at).notify({mutation:this,type:"updated",action:t})})},Np);function gp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var r9=(Pp=class extends Fr{constructor(t={}){super();ie(this,ln);ie(this,Wt);ie(this,Do);this.config=t,$(this,ln,new Set),$(this,Wt,new Map),$(this,Do,0)}build(t,n,r){const o=new n9({mutationCache:this,mutationId:++bi(this,Do)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){L(this,ln).add(t);const n=fi(t);if(typeof n=="string"){const r=L(this,Wt).get(n);r?r.push(t):L(this,Wt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,ln).delete(t)){const n=fi(t);if(typeof n=="string"){const r=L(this,Wt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&L(this,Wt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=fi(t);if(typeof n=="string"){const r=L(this,Wt).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=fi(t);if(typeof n=="string"){const o=(r=L(this,Wt).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(){Ye.batch(()=>{L(this,ln).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,ln).clear(),L(this,Wt).clear()})}getAll(){return Array.from(L(this,ln))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ip(n,r))}findAll(t={}){return this.getAll().filter(n=>ip(t,n))}notify(t){Ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ye.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ot))))}},ln=new WeakMap,Wt=new WeakMap,Do=new WeakMap,Pp);function fi(e){var t;return(t=e.options.scope)==null?void 0:t.id}function mp(e){return{onFetch:(t,n)=>{var u,p,g,E,b;const r=t.options,o=(g=(p=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,s=((E=t.state.data)==null?void 0:E.pages)||[],i=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const a=async()=>{let d=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},h=lp(t.options,t.fetchOptions),y=async(m,x,I)=>{if(d)return Promise.reject();if(x==null&&m.pages.length)return Promise.resolve(m);const w={client:t.client,queryKey:t.queryKey,pageParam:x,direction:I?"backward":"forward",meta:t.options.meta};f(w);const A=await h(w),{maxPages:S}=t.options,O=I?Jw:Yw;return{pages:O(m.pages,A,S),pageParams:O(m.pageParams,x,S)}};if(o&&s.length){const m=o==="backward",x=m?o9:bp,I={pages:s,pageParams:i},w=x(r,I);c=await y(I,w,m)}else{const m=e??s.length;do{const x=l===0?i[0]??r.initialPageParam:bp(r,c);if(l>0&&x==null)break;c=await y(c,x),l++}while(l<m)}return c};t.options.persister?t.fetchFn=()=>{var d,f;return(f=(d=t.options).persister)==null?void 0:f.call(d,a,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=a}}}function bp(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 o9(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}var s9=(Mp=class{constructor(e={}){ie(this,Ve);ie(this,An);ie(this,Sn);ie(this,Br);ie(this,jr);ie(this,_n);ie(this,Vr);ie(this,Gr);$(this,Ve,e.queryCache||new t9),$(this,An,e.mutationCache||new r9),$(this,Sn,e.defaultOptions||{}),$(this,Br,new Map),$(this,jr,new Map),$(this,_n,0)}mount(){bi(this,_n)._++,L(this,_n)===1&&($(this,Vr,vc.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,Ve).onFocus())})),$(this,Gr,di.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,Ve).onOnline())})))}unmount(){var e,t;bi(this,_n)._--,L(this,_n)===0&&((e=L(this,Vr))==null||e.call(this),$(this,Vr,void 0),(t=L(this,Gr))==null||t.call(this),$(this,Gr,void 0))}isFetching(e){return L(this,Ve).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,An).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,Ve).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=L(this,Ve).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Dr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return L(this,Ve).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=L(this,Ve).get(r.queryHash),s=o==null?void 0:o.state.data,i=Xw(t,s);if(i!==void 0)return L(this,Ve).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ye.batch(()=>L(this,Ve).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,Ve).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=L(this,Ve);Ye.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=L(this,Ve);return Ye.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ye.batch(()=>L(this,Ve).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ot).catch(Ot)}invalidateQueries(e,t={}){return Ye.batch(()=>(L(this,Ve).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=Ye.batch(()=>L(this,Ve).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ot)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=L(this,Ve).build(this,t);return n.isStaleByTime(Dr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ot).catch(Ot)}fetchInfiniteQuery(e){return e.behavior=mp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ot).catch(Ot)}ensureInfiniteQueryData(e){return e.behavior=mp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return di.isOnline()?L(this,An).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,Ve)}getMutationCache(){return L(this,An)}getDefaultOptions(){return L(this,Sn)}setDefaultOptions(e){$(this,Sn,e)}setQueryDefaults(e,t){L(this,Br).set($n(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Br).values()],n={};return t.forEach(r=>{Lo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){L(this,jr).set($n(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,jr).values()],n={};return t.forEach(r=>{Lo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,Sn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=gc(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===ui&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,Sn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,Ve).clear(),L(this,An).clear()}},Ve=new WeakMap,An=new WeakMap,Sn=new WeakMap,Br=new WeakMap,jr=new WeakMap,_n=new WeakMap,Vr=new WeakMap,Gr=new WeakMap,Mp),i9=(Bp=class extends Fr{constructor(t,n){super();ie(this,_e);ie(this,bt);ie(this,me);ie(this,Ro);ie(this,ct);ie(this,nr);ie(this,Hr);ie(this,Tn);ie(this,en);ie(this,ko);ie(this,Wr);ie(this,Zr);ie(this,rr);ie(this,or);ie(this,On);ie(this,Xr,new Set);this.options=n,$(this,bt,t),$(this,en,null),$(this,Tn,Cc()),this.options.experimental_prefetchInRender||L(this,Tn).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&&(L(this,me).addObserver(this),yp(L(this,me),this.options)?he(this,_e,jo).call(this):this.updateResult(),he(this,_e,Nc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ec(L(this,me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ec(L(this,me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,_e,Pc).call(this),he(this,_e,Mc).call(this),L(this,me).removeObserver(this)}setOptions(t,n){const r=this.options,o=L(this,me);if(this.options=L(this,bt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gt(this.options.enabled,L(this,me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,_e,Bc).call(this),L(this,me).setOptions(this.options),r._defaulted&&!li(this.options,r)&&L(this,bt).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,me),observer:this});const s=this.hasListeners();s&&vp(L(this,me),o,this.options,r)&&he(this,_e,jo).call(this),this.updateResult(n),s&&(L(this,me)!==o||Gt(this.options.enabled,L(this,me))!==Gt(r.enabled,L(this,me))||Dr(this.options.staleTime,L(this,me))!==Dr(r.staleTime,L(this,me)))&&he(this,_e,Dc).call(this);const i=he(this,_e,Rc).call(this);s&&(L(this,me)!==o||Gt(this.options.enabled,L(this,me))!==Gt(r.enabled,L(this,me))||i!==L(this,On))&&he(this,_e,kc).call(this,i)}getOptimisticResult(t){const n=L(this,bt).getQueryCache().build(L(this,bt),t),r=this.createResult(n,t);return c9(this,r)&&($(this,ct,r),$(this,Hr,this.options),$(this,nr,L(this,me).state)),r}getCurrentResult(){return L(this,ct)}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){L(this,Xr).add(t)}getCurrentQuery(){return L(this,me)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=L(this,bt).defaultQueryOptions(t),r=L(this,bt).getQueryCache().build(L(this,bt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return he(this,_e,jo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,ct)))}createResult(t,n){var S;const r=L(this,me),o=this.options,s=L(this,ct),i=L(this,nr),c=L(this,Hr),a=t!==r?t.state:L(this,Ro),{state:u}=t;let p={...u},g=!1,E;if(n._optimisticResults){const O=this.hasListeners(),R=!O&&yp(t,n),D=O&&vp(t,r,n,o);(R||D)&&(p={...p,...hp(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:d,status:f}=p;if(n.select&&p.data!==void 0)if(s&&p.data===(i==null?void 0:i.data)&&n.select===L(this,ko))E=L(this,Wr);else try{$(this,ko,n.select),E=n.select(p.data),E=yc(s==null?void 0:s.data,E,n),$(this,Wr,E),$(this,en,null)}catch(O){$(this,en,O)}else E=p.data;if(n.placeholderData!==void 0&&E===void 0&&f==="pending"){let O;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData))O=s.data;else if(O=typeof n.placeholderData=="function"?n.placeholderData((S=L(this,Zr))==null?void 0:S.state.data,L(this,Zr)):n.placeholderData,n.select&&O!==void 0)try{O=n.select(O),$(this,en,null)}catch(R){$(this,en,R)}O!==void 0&&(f="success",E=yc(s==null?void 0:s.data,O,n),g=!0)}L(this,en)&&(b=L(this,en),E=L(this,Wr),d=Date.now(),f="error");const h=p.fetchStatus==="fetching",y=f==="pending",m=f==="error",x=y&&h,I=E!==void 0,A={status:f,fetchStatus:p.fetchStatus,isPending:y,isSuccess:f==="success",isError:m,isInitialLoading:x,isLoading:x,data:E,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:d,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>a.dataUpdateCount||p.errorUpdateCount>a.errorUpdateCount,isFetching:h,isRefetching:h&&!y,isLoadingError:m&&!I,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:m&&I,isStale:xc(t,n),refetch:this.refetch,promise:L(this,Tn)};if(this.options.experimental_prefetchInRender){const O=F=>{A.status==="error"?F.reject(A.error):A.data!==void 0&&F.resolve(A.data)},R=()=>{const F=$(this,Tn,A.promise=Cc());O(F)},D=L(this,Tn);switch(D.status){case"pending":t.queryHash===r.queryHash&&O(D);break;case"fulfilled":(A.status==="error"||A.data!==D.value)&&R();break;case"rejected":(A.status!=="error"||A.error!==D.reason)&&R();break}}return A}updateResult(t){const n=L(this,ct),r=this.createResult(L(this,me),this.options);if($(this,nr,L(this,me).state),$(this,Hr,this.options),L(this,nr).data!==void 0&&$(this,Zr,L(this,me)),li(r,n))return;$(this,ct,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,c=typeof i=="function"?i():i;if(c==="all"||!c&&!L(this,Xr).size)return!0;const l=new Set(c??L(this,Xr));return this.options.throwOnError&&l.add("error"),Object.keys(L(this,ct)).some(a=>{const u=a;return L(this,ct)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),he(this,_e,Wp).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,_e,Nc).call(this)}},bt=new WeakMap,me=new WeakMap,Ro=new WeakMap,ct=new WeakMap,nr=new WeakMap,Hr=new WeakMap,Tn=new WeakMap,en=new WeakMap,ko=new WeakMap,Wr=new WeakMap,Zr=new WeakMap,rr=new WeakMap,or=new WeakMap,On=new WeakMap,Xr=new WeakMap,_e=new WeakSet,jo=function(t){he(this,_e,Bc).call(this);let n=L(this,me).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ot)),n},Dc=function(){he(this,_e,Pc).call(this);const t=Dr(this.options.staleTime,L(this,me));if(Qn||L(this,ct).isStale||!hc(t))return;const r=op(L(this,ct).dataUpdatedAt,t)+1;$(this,rr,setTimeout(()=>{L(this,ct).isStale||this.updateResult()},r))},Rc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,me)):this.options.refetchInterval)??!1},kc=function(t){he(this,_e,Mc).call(this),$(this,On,t),!(Qn||Gt(this.options.enabled,L(this,me))===!1||!hc(L(this,On))||L(this,On)===0)&&$(this,or,setInterval(()=>{(this.options.refetchIntervalInBackground||vc.isFocused())&&he(this,_e,jo).call(this)},L(this,On)))},Nc=function(){he(this,_e,Dc).call(this),he(this,_e,kc).call(this,he(this,_e,Rc).call(this))},Pc=function(){L(this,rr)&&(clearTimeout(L(this,rr)),$(this,rr,void 0))},Mc=function(){L(this,or)&&(clearInterval(L(this,or)),$(this,or,void 0))},Bc=function(){const t=L(this,bt).getQueryCache().build(L(this,bt),this.options);if(t===L(this,me))return;const n=L(this,me);$(this,me,t),$(this,Ro,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Wp=function(t){Ye.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(L(this,ct))}),L(this,bt).getQueryCache().notify({query:L(this,me),type:"observerResultsUpdated"})})},Bp);function a9(e,t){return Gt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function yp(e,t){return a9(e,t)||e.state.data!==void 0&&Ec(e,t,t.refetchOnMount)}function Ec(e,t,n){if(Gt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&xc(e,t)}return!1}function vp(e,t,n,r){return(e!==t||Gt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&xc(e,n)}function xc(e,t){return Gt(t.enabled,e)!==!1&&e.isStaleByTime(Dr(t.staleTime,e))}function c9(e,t){return!li(e.getCurrentResult(),t)}var l9=(jp=class extends Fr{constructor(t,n){super();ie(this,dn);ie(this,Ln);ie(this,Fn);ie(this,yt);ie(this,un);$(this,Ln,t),this.setOptions(n),this.bindMethods(),he(this,dn,yi).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=L(this,Ln).defaultMutationOptions(t),li(this.options,n)||L(this,Ln).getMutationCache().notify({type:"observerOptionsUpdated",mutation:L(this,yt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&$n(n.mutationKey)!==$n(this.options.mutationKey)?this.reset():((r=L(this,yt))==null?void 0:r.state.status)==="pending"&&L(this,yt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=L(this,yt))==null||t.removeObserver(this)}onMutationUpdate(t){he(this,dn,yi).call(this),he(this,dn,jc).call(this,t)}getCurrentResult(){return L(this,Fn)}reset(){var t;(t=L(this,yt))==null||t.removeObserver(this),$(this,yt,void 0),he(this,dn,yi).call(this),he(this,dn,jc).call(this)}mutate(t,n){var r;return $(this,un,n),(r=L(this,yt))==null||r.removeObserver(this),$(this,yt,L(this,Ln).getMutationCache().build(L(this,Ln),this.options)),L(this,yt).addObserver(this),L(this,yt).execute(t)}},Ln=new WeakMap,Fn=new WeakMap,yt=new WeakMap,un=new WeakMap,dn=new WeakSet,yi=function(){var n;const t=((n=L(this,yt))==null?void 0:n.state)??gp();$(this,Fn,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},jc=function(t){Ye.batch(()=>{var n,r,o,s,i,c,l,a;if(L(this,un)&&this.hasListeners()){const u=L(this,Fn).variables,p=L(this,Fn).context;(t==null?void 0:t.type)==="success"?((r=(n=L(this,un)).onSuccess)==null||r.call(n,t.data,u,p),(s=(o=L(this,un)).onSettled)==null||s.call(o,t.data,null,u,p)):(t==null?void 0:t.type)==="error"&&((c=(i=L(this,un)).onError)==null||c.call(i,t.error,u,p),(a=(l=L(this,un)).onSettled)==null||a.call(l,void 0,t.error,u,p))}this.listeners.forEach(u=>{u(L(this,Fn))})})},jp),Cp=k.createContext(void 0),Ip=e=>{const t=k.useContext(Cp);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},u9=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(Cp.Provider,{value:e,children:t})),Ep=k.createContext(!1),d9=()=>k.useContext(Ep);Ep.Provider;function f9(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var p9=k.createContext(f9()),h9=()=>k.useContext(p9);function xp(e,t){return typeof e=="function"?e(...t):!!e}function wc(){}var g9=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},m9=e=>{k.useEffect(()=>{e.clearReset()},[e])},b9=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||xp(n,[e.error,r])),y9=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)))},v9=(e,t)=>e.isLoading&&e.isFetching&&!t,C9=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,wp=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function I9(e,t,n){var p,g,E,b,d;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=Ip(),o=d9(),s=h9(),i=r.defaultQueryOptions(e);(g=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||g.call(p,i),process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.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`)),i._optimisticResults=o?"isRestoring":"optimistic",y9(i),g9(i,s),m9(s);const c=!r.getQueryCache().get(i.queryHash),[l]=k.useState(()=>new t(r,i)),a=l.getOptimisticResult(i),u=!o&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(f=>{const h=u?l.subscribe(Ye.batchCalls(f)):wc;return l.updateResult(),h},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),k.useEffect(()=>{l.setOptions(i,{listeners:!1})},[i,l]),C9(i,a))throw wp(i,l,s);if(b9({result:a,errorResetBoundary:s,throwOnError:i.throwOnError,query:r.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw a.error;if((b=(E=r.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||b.call(E,i,a),i.experimental_prefetchInRender&&!Qn&&v9(a,o)){const f=c?wp(i,l,s):(d=r.getQueryCache().get(i.queryHash))==null?void 0:d.promise;f==null||f.catch(wc).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?a:l.trackResult(a)}function Ap(e,t){return I9(e,i9)}function Sp(e,t){const n=Ip(),[r]=k.useState(()=>new l9(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const o=k.useSyncExternalStore(k.useCallback(i=>r.subscribe(Ye.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=k.useCallback((i,c)=>{r.mutate(i,c).catch(wc)},[r]);if(o.error&&xp(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const E9=e=>new Promise(t=>setTimeout(t,e)),x9=({apiFn:e,intervalMillis:t,maxRetries:n,isSatisfied:r})=>(...s)=>{const i=async(c=0)=>{const l=await e(...s);if(r(l))return l;if(c>=n)throw l;return c++,E9(t).then(()=>i(c))};return i()},w9=async({conversationId:e,senderEmail:t})=>{try{const n=await qe({url:mr(qx,{conversationId:e}),params:{senderEmail:t},method:it.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},_p=({conversationId:e,senderEmail:t,enabled:n})=>Ap({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>w9({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),Tp="/v1/api",A9=`${Tp}/connectors/forms/:formId/search`,S9=`${Tp}/connectors/conversation/:conversationId/smart-suggestions`,_9=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}},T9=x9({apiFn:async({conversationId:e})=>{try{const t=await qe({url:mr(S9,{conversationId:e}),method:it.GET}),n=t==null?void 0:t.data;return _9(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),O9=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=_p({conversationId:e,senderEmail:t,enabled:n});return Ap({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>T9({conversationId:e}),enabled:n&&r})},L9=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,i]=_.useState(""),{conversationId:c,email:l,availableFeatures:a}=_.useContext(Ge),u=ye(vw),p=ye(np),g=et(a,tm),{sortedObjectList:E,updatePriority:b}=Vw({objectList:u}),{data:d}=O9({enabled:g&&!!c,conversationId:String(c),senderEmail:l}),f=(d==null?void 0:d.suggestedOptions)??[],h=_.useMemo(()=>!p||!E.length?[]:E.map(({value:m})=>{const x=p[m];return x?{description:`${x.connectorName??""} - ${x.searchObject}`,avatarUrl:x.logoUrl,label:"",value:m,connectorName:x.connectorName,objectName:x.searchObject}:null}).filter(m=>!!m),[E,p]),y=m=>{n(m),m&&b(""+m.value)};return h.length?C.jsxs(v.Stack,{children:[C.jsx(Mw,{value:e,options:h.map(m=>({...m,label:s})),inputValue:s,root:t,onInputChange:i,onChange:y,onReset:o,NoOptionsMessage:({selectOption:m})=>C.jsx(Zw,{selectedOption:e,onSelect:m,options:f}),menuOpen:!s&&!f.length?!1:void 0}),e?C.jsx(jw,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},F9="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%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'%20fill='%236C7B94'/%3e%3c/svg%3e",D9=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 qe({url:`${e5.replace(":id",e)}?${s.toString()}`,method:it.POST,data:{externalResourceId:t,conversationId:n}})},R9=({onSuccess:e})=>Sp({mutationFn:D9,onSuccess:()=>{Be({message:yv,type:En}),e==null||e()},onError:()=>{Be({message:vv,type:gt})}}),k9="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",N9=v.styled(v.Stack)`
|
|
1262
1262
|
width: fit-content;
|
|
1263
1263
|
cursor: pointer;
|
|
1264
1264
|
gap: 8px;
|
|
@@ -1270,7 +1270,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1270
1270
|
letter-spacing: 0.4px;
|
|
1271
1271
|
text-align: center;
|
|
1272
1272
|
vertical-align: middle;
|
|
1273
|
-
`,P9=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const i=
|
|
1273
|
+
`,P9=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const i=Bt(),{conversationId:c,currentSmIds:l,sendTrackingEvent:a,email:u}=_.useContext(Ge),p=ye(V0),g=ye(G0),{mutate:E,isPending:b}=R9({onSuccess:s}),d=g===U.LOADING,f={externalResourceId:e};_.useEffect(()=>{i(Tr({id:t,args:{externalResourceId:e}}))},[e,t,i]);const h=()=>{a(H1,{search_keyword:n,search_result_label:r,sm_ids:l,card_title:p==null?void 0:p.cardTitle,connector_names:p==null?void 0:p.connectorNames}),E({id:t,externalResourceId:e,conversationId:c,email:u})};return C.jsxs(v.Stack,{gap:"12px",marginTop:"12px",children:[C.jsxs(N9,{onClick:o,children:[C.jsx("img",{src:k9,width:"16px",height:"16px"}),C.jsx(v.Typography,{children:_w})]}),C.jsxs(v.Stack,{gap:"24px",children:[C.jsx(H0,{cardData:p,cardDataApiStatus:g,objectToLink:t,args:f}),C.jsx(v.Stack,{alignItems:"flex-end",children:C.jsx(v.Button,{size:"small",disabled:d||b,onClick:h,children:pu})})]})]})},Op=v.styled(v.Stack)`
|
|
1274
1274
|
padding: 12px 12px 12px 11px;
|
|
1275
1275
|
border: 1px solid ${v.theme.palette.gray.gray5};
|
|
1276
1276
|
border-radius: 8px;
|
|
@@ -1286,10 +1286,10 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
1286
1286
|
}
|
|
1287
1287
|
}
|
|
1288
1288
|
`};
|
|
1289
|
-
`,M9="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",B9=()=>C.jsxs(v.Box,{justifyItems:"center",marginTop:"40px",children:[C.jsx("img",{src:M9,width:124,height:107}),C.jsx(v.Typography,{variant:"body2",color:v.theme.palette.gray.gray3,children:Tw})]}),j9=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=jt(),{sendTrackingEvent:s,currentSmIds:i}=_.useContext(Ve),[c,l]=_.useState(null),a=br(Sw,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),u=(E,b)=>{s(G1,{search_keyword:t.label,search_result_label:b,sm_ids:i,connector_name:t.connectorName}),l({externalResourceId:E,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},p=()=>{l(null),o(i5())},g=()=>{n(),r(),p()};return e.length?c?C.jsx(P9,{meta:c,onBack:p,onLink:g}):C.jsxs(v.Stack,{gap:"14px",marginTop:"12px",children:[C.jsx(v.Typography,{variant:"body2",children:a}),C.jsx(v.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:E,name:b,description:d})=>C.jsxs(Lp,{onClick:()=>u(E,b),direction:"row",children:[C.jsxs(v.Stack,{flexGrow:1,children:[C.jsx(v.Typography,{variant:"body2",color:v.theme.palette.gray.gray1,children:b}),C.jsx(v.Typography,{variant:"caption",color:v.theme.palette.gray.gray3,children:d})]}),C.jsx(v.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:C.jsx("img",{src:F9})})]},E))})]}):C.jsx(B9,{})},Sc=v.styled(v.Skeleton)`
|
|
1289
|
+
`,M9="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",B9=()=>C.jsxs(v.Box,{justifyItems:"center",marginTop:"40px",children:[C.jsx("img",{src:M9,width:124,height:107}),C.jsx(v.Typography,{variant:"body2",color:v.theme.palette.gray.gray3,children:Tw})]}),j9=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=Bt(),{sendTrackingEvent:s,currentSmIds:i}=_.useContext(Ge),[c,l]=_.useState(null),a=mr(Sw,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),u=(E,b)=>{s(G1,{search_keyword:t.label,search_result_label:b,sm_ids:i,connector_name:t.connectorName}),l({externalResourceId:E,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},p=()=>{l(null),o(i5())},g=()=>{n(),r(),p()};return e.length?c?C.jsx(P9,{meta:c,onBack:p,onLink:g}):C.jsxs(v.Stack,{gap:"14px",marginTop:"12px",children:[C.jsx(v.Typography,{variant:"body2",children:a}),C.jsx(v.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:E,name:b,description:d})=>C.jsxs(Op,{onClick:()=>u(E,b),direction:"row",children:[C.jsxs(v.Stack,{flexGrow:1,children:[C.jsx(v.Typography,{variant:"body2",color:v.theme.palette.gray.gray1,children:b}),C.jsx(v.Typography,{variant:"caption",color:v.theme.palette.gray.gray3,children:d})]}),C.jsx(v.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:C.jsx("img",{src:F9})})]},E))})]}):C.jsx(B9,{})},Ac=v.styled(v.Skeleton)`
|
|
1290
1290
|
display: block;
|
|
1291
1291
|
margin: ${e=>e.margin?e.margin:0};
|
|
1292
|
-
`,V9=()=>C.jsxs(v.Stack,{marginTop:"12px",children:[C.jsx(
|
|
1292
|
+
`,V9=()=>C.jsxs(v.Stack,{marginTop:"12px",children:[C.jsx(Ac,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),C.jsx(v.Stack,{gap:"17px",children:C.jsxs(Op,{gap:"8px",disableHover:!0,children:[C.jsx(Ac,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),C.jsx(Ac,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]}),G9=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await qe({url:A9.replace(":formId",e.toString()),method:it.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){Be({message:As,type:gt}),console.error(r)}},H9=(e,t)=>Sp({mutationFn:G9,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),Sc={OPEN_FORM_VIEW:"connector-agent-open-form-view"},W9=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=_.useRef(!1),o=_.useRef(void 0),s=_.useCallback((l="auto")=>{const a=e.current;a&&a.scrollIntoView({behavior:l})},[e]),i=_.useCallback((l,a="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),l&&(o.current=setTimeout(()=>{s(a),r.current=!0},n)))},[s,n]),c=_.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return _.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:i,resetScrollState:c,hasScrolledOnce:r.current}},Z9=({isAdmin:e=!1})=>{var mi;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s}=_.useContext(Ge),i=Bt(),{userGroupId:c,userId:l}=zt()||{},a=_.useRef(!1),u=_.useRef(null),p=_.useRef(null),g=_.useRef(null),[E,b]=_.useState({}),[d,f]=_.useState(!1),[h,y]=_.useState(!1),[m,x]=_.useState(!1),[I,w]=_.useState(!1),[A,S]=_.useState(),[O,R]=_.useState(!1),[D,F]=_.useState(null),[P,j]=_.useState(),[X,z]=_.useState(null),[q,Y]=_.useState(!1),[K,ce]=_.useState(!1),ee=ye(V5),B=ye(G5),H=ye(W5),V=ye(Z5),W=ye(H5),J=ye(D0),re=ye(n4),oe=ye(R0),M=ye(k0),te=ye(N0),be=ye(ow),Z=et(o,J1),Ne=et(o,cu),Le=et(o,em),Je=et(o,nm),rt=et(o,rm),tn=et(o,om),lt=Cm(H),{data:ot,isLoading:He}=_p({senderEmail:t,conversationId:String(s),enabled:Je&&!!t}),{emailHeaders:sr,selectedEmail:Ft}=ot??{},{scrollOnceAfterLoad:zr,resetScrollState:Yr}=W9(p),Dn=W!==U.LOADING&&(!V||!Object.values(V).some(ve=>ve===U.LOADING))&&ee&&ee.length>0;_.useLayoutEffect(()=>{var ve;q&&!d&&K&&((ve=g==null?void 0:g.current)!=null&&ve.scrollHeight)&&zr(!!Dn,"smooth")},[q,d,K,Dn,zr,(mi=g==null?void 0:g.current)==null?void 0:mi.scrollHeight,l]);const ir=(ve,Pe)=>{r(B1,{search_keyword:ve,sm_ids:n,connector_name:Pe,suggestion_type:be})},le=(ve,Pe,Dt)=>{!Array.isArray(Pe)||!Pe.length?r(j1,{search_keyword:ve,sm_ids:n,connector_name:Dt,suggestion_type:be}):Pe.length&&r(V1,{num_of_results:Pe.length,search_keyword:ve,sm_ids:n,connector_name:Dt,suggestion_type:be})},{mutate:Te,reset:$e,data:vt,isPending:Tt,isIdle:ar}=H9(ir,le),fn=_.useCallback(()=>{$e(),F(null)},[$e,F]),nn=_.useCallback(()=>{t&&n.length&&s&&i(ci({inboxIds:n,conversationId:s}))},[i,t,n,s]),pi=_.useCallback((ve,Pe)=>{ve&&s&&Pe&&i(ai({id:ve,channelType:"email",conversationId:s,externalResourceId:Pe,contactEmail:t})).unwrap().catch(()=>{i(Or(null))})},[i,s,t]);if(_.useEffect(()=>{(async()=>{l&&(Y(await Ri(l)),ce(await ol(l)))})()},[l]),_.useEffect(()=>{He||j(Ft||t)},[t,Ft,He]),_.useEffect(()=>{K&&l&&sl(l)},[K,l]),_.useEffect(()=>{var ve;if(M){y(!0);const{externalResourceId:Pe}=M,Dt=(ve=M.forms.find(pn=>pn.type==="edit"))==null?void 0:ve.id;pi(Dt,Pe)}else y(!1),i(N5())},[M,pi,i]),_.useEffect(()=>(nn(),Yr(),()=>{i(L0.clearConnectorList())}),[i,nn,Yr]),_.useEffect(()=>(ee&&ee.length&&!a.current&&(r(f1,{numOfCards:ee.length,sm_ids:n}),a.current=!0),()=>{(!ee||!n||a.current)&&(a.current=!1)}),[ee,r,n]),_.useEffect(()=>{s&&n&&n.length&&i(ni({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:tn}))},[i,n,s,tn]),_.useEffect(()=>{const ve=Pe=>{var pn;if(!(Pe instanceof CustomEvent))return;const Dt=(pn=Pe.detail)==null?void 0:pn.connectorKey;b({connectorKey:Dt})};return window.addEventListener(Sc.OPEN_FORM_VIEW,ve),()=>{window.removeEventListener(Sc.OPEN_FORM_VIEW,ve)}},[]),_.useEffect(()=>{if(!(J!=null&&J.length)||!E.connectorKey)return;const ve=E.connectorKey;b({});const Pe=J.find(Dt=>{var pn;return((pn=Dt.connectorKey)==null?void 0:pn.toLowerCase())===(ve==null?void 0:ve.toLowerCase())});Pe&&(z(Pe),x(!0))},[J,E]),!t.length||W===U.LOADING)return C.jsx(Z4,{});const _c=ve=>{r(b1,{connector_name:re,source:ve,sm_ids:n})},hi=ve=>{x(!0),_c(ve)},Tc=()=>{w(!0),r(y1)},Jr=ve=>{r(ve,A),te?R(!0):(x(!1),z(null))},No=ve=>{if(M){const{connectorName:Pe,title:Dt}=M;r(ve,{connector_name:Pe,card_title:Dt,sm_ids:n,ug_id:c})}te?R(!0):i(Or(null))},Rn=()=>{x(!1),i(Or(null)),S(void 0),R(!1)},Qr=()=>{nn(),i(L0.clearConnectorList())},Po=[{label:"Go back",variant:"text",action:Rn},{label:"Stay",variant:"contained",action:()=>R(!1)}],$r=J.length>0,Mo=oe.length>0,gi=()=>$r||Mo?C.jsx(yw,{haveCreateObjects:$r,haveLinkObjects:Mo,onCreateClick:()=>hi(Cu.MAIN_BUTTON),onLinkClick:()=>w(!0)}):C.jsx(B0,{isAdmin:e,hideHeading:!0});return C.jsxs(Ou,{ref:u,"data-testid":Array.isArray(ee)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:m||I,children:[C.jsx(Q0,{shown:O,setShown:R,title:_5,description:T5,buttons:Po}),C.jsx(Km,{onWheel:()=>f(!0),ref:g,children:B?C.jsxs(C.Fragment,{children:[C.jsx(Fb,{connectors:lt,isWriteFlowEnabled:Ne,haveCreateObjects:$r,haveLinkObjects:Mo,cards:ee,handleCreateNewObject:()=>hi(Cu.ICON),handleLinkNewObject:Tc}),Le?C.jsx(L9,{selectedObject:D,setSelectedObject:F,fetchSearchResults:Te,onReset:fn,root:u.current}):null,C.jsxs(uc,{children:[C.jsx(Lr,{condition:Le&&Tt,children:C.jsx(V9,{})},"search"),C.jsx(Lr,{condition:Le&&!!D&&!ar,children:C.jsx(j9,{searchResults:vt??[],selectedObject:D,onReset:fn,fetchCards:nn})},"results"),C.jsxs(Lr,{fallback:!0,children:[Je&&(ee!=null&&ee.length)?C.jsx(K4,{emailHeaders:sr,selectedEmail:P,root:u.current,isLoading:He,setSelectedEmail:j}):null,Z?C.jsx(X4,{}):null,C.jsxs(uc,{children:[C.jsxs(Lr,{condition:!!ee&&ee.length>0,children:[C.jsx(v4,{cards:ee,specificCardData:H,email:P??"",specificConnectorApiStatus:V,onCardUnlinking:nn}),C.jsx("div",{ref:p,children:rt?C.jsx(Dm,{connectors:lt,expanded:q}):null})]},"cards-list"),C.jsx(Lr,{condition:!(ee!=null&&ee.length)&&Ne,children:gi()},"create-banner")]})]},"cards")]})]}):C.jsx(B0,{isAdmin:e})}),C.jsx(dc,{onClose:()=>No(F1),isOpen:h,setIsOpen:y,title:fm,portalId:"connector-layover-portal",backButtonTooltip:"Back",children:C.jsx(q0,{isEdit:!0,onClose:()=>No(L1),onCreateSuccess:Qr,metaData:A,setMetaData:S,connectors:lt})}),C.jsx(dc,{onClose:()=>Jr(w1),portalId:"connector-layover-portal",isOpen:m,setIsOpen:x,children:C.jsx(q0,{onClose:()=>Jr(x1),onCreateSuccess:Qr,metaData:A,setMetaData:S,defaultOption:X,connectors:lt})}),C.jsx(dc,{onClose:()=>w(!1),portalId:"connector-layover-portal",isOpen:I,setIsOpen:w,children:C.jsx(pw,{setOpenTaskLinking:w,onLinkingSuccess:nn})}),!B&&C.jsx(Zm,{})]})},X9=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:i,availableFeatures:c,conversationId:l,connectorFunctions:a,stackingContext:u,isAdmin:p=!1})=>{const g=_.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:i,conversationId:l,sendTrackingEvent:t||(()=>{}),availableFeatures:c,isAdmin:p,connectorFunctions:a,stackingContext:u}),[s,n,r,t,o,i,c,l,p,a,u]);return C.jsx(Ge.Provider,{value:g,children:e})},z9=new s9,Y9=({children:e})=>C.jsx(u9,{client:z9,children:e}),J9=Xu({cardList:K5,write:P5,common:c5}),Q9=Uy({reducer:J9,devTools:!0}),$9=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:i,stackingContext:c})=>C.jsx(Jb,{store:Q9,children:C.jsx(v.HiverProvider,{custom:!0,children:C.jsx(Y9,{children:C.jsx(X9,{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:i,stackingContext:c,isAdmin:n==null?void 0:n.isAdmin,children:C.jsx(_.Suspense,{fallback:C.jsx(C.Fragment,{}),children:e})})})})}),q9=v.styled(v.Box)`
|
|
1293
1293
|
height: inherit;
|
|
1294
1294
|
.MuiScopedCssBaseline-root {
|
|
1295
1295
|
height: inherit;
|
|
@@ -2177,4 +2177,4 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
|
|
|
2177
2177
|
align-self: auto !important;
|
|
2178
2178
|
margin-left: 12px;
|
|
2179
2179
|
}
|
|
2180
|
-
`,eA=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:i={}})=>C.jsx(q9,{children:C.jsxs($9,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:i,baseUrls:n,children:[C.jsx(Z9,{isAdmin:r==null?void 0:r.isAdmin}),ke.createPortal(C.jsx(K9,{id:"toast-message",children:C.jsx(rh,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!i.toastMessage&&{style:{zIndex:i.toastMessage}}})}),document.body),C.jsx("div",{"data-connectorid":"connector-layover-portal"})]})});ue.CONNECTORS_AGENT_EVENTS=
|
|
2180
|
+
`,eA=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:i={}})=>C.jsx(q9,{children:C.jsxs($9,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:i,baseUrls:n,children:[C.jsx(Z9,{isAdmin:r==null?void 0:r.isAdmin}),ke.createPortal(C.jsx(K9,{id:"toast-message",children:C.jsx(rh,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!i.toastMessage&&{style:{zIndex:i.toastMessage}}})}),document.body),C.jsx("div",{"data-connectorid":"connector-layover-portal"})]})});ue.CONNECTORS_AGENT_EVENTS=Sc,ue.ConnectorCardList=eA,ue.HiverConnectorBifrostAuth=qe,ue.addNewConnectors=Ah,ue.dismissNotification=sl,ue.getConnectorsBifrostConfigs=zt,ue.getMetaData=Fv,ue.initConnectorsBifrost=qg,ue.setCaptureFeedbackOnDemand=Sh,ue.shouldCaptureFeedback=Ri,ue.shouldShowNotification=ol,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});
|