@hiver/connector-agent 4.1.0 → 4.1.1-feedbackFix-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.es.js CHANGED
@@ -1126,7 +1126,7 @@ Sd((e) => ({
1126
1126
  }));
1127
1127
  const c1 = "connector-db", l1 = 1, gc = {
1128
1128
  FEEDBACK: "feedback"
1129
- }, Lo = `${gc.FEEDBACK}:data`, Di = `${gc.FEEDBACK}:last_submitted`, Fo = `${gc.FEEDBACK}:capture_on_demand`, u1 = 12 * 60 * 60 * 1e3, xa = (e, t = /* @__PURE__ */ new Date()) => e ? Math.abs(t.getTime() - e.getTime()) >= u1 : !0, Rd = (e, t = !1) => e.captureFeedback && (xa(e.firstViewed) && (!e.lastSubmittedFeedback || xa(e.lastSubmittedFeedback)) || !!t);
1129
+ }, Lo = `${gc.FEEDBACK}:data`, Di = `${gc.FEEDBACK}:last_submitted`, Fo = `${gc.FEEDBACK}:capture_on_demand`, u1 = 0 * 60 * 60 * 1e3, xa = (e, t = /* @__PURE__ */ new Date()) => e ? Math.abs(t.getTime() - e.getTime()) >= u1 : !0, Rd = (e, t = !1) => e.captureFeedback && (xa(e.firstViewed) && (!e.lastSubmittedFeedback || xa(e.lastSubmittedFeedback)) || !!t);
1130
1130
  let Yn = null;
1131
1131
  const Kr = async () => {
1132
1132
  try {
package/index.umd.js CHANGED
@@ -27,7 +27,7 @@ Check the top-level render call using <`+Q+">.")}return G}}function ko(O,G){{if(
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} />`,wc,ir,Q9,ir),Pp[ir+wc]=!0}}return O===r?Z9(Xe):W9(Xe),Xe}}function X9(O,G,Q){return Mp(O,G,Q,!0)}function z9(O,G,Q){return Mp(O,G,Q,!1)}var Y9=z9,J9=X9;Qr.Fragment=r,Qr.jsx=Y9,Qr.jsxs=J9}()),Qr}process.env.NODE_ENV==="production"?hi.exports=Vp():hi.exports=Gp();var C=hi.exports;function Mc(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=Mc(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=Mc(e))&&(r&&(r+=" "),r+=t);return r}const Ur=e=>typeof e=="number"&&!isNaN(e),Fn=e=>typeof e=="string",It=e=>typeof e=="function",Mo=e=>Fn(e)||It(e)?e:null,gi=e=>T.isValidElement(e)||Fn(e)||It(e)||Ur(e);function Hp(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 Bo(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:h,isIn:b,playToast:x}=i;const m=r?`${t}--${l}`:t,d=r?`${n}--${l}`:n,f=T.useRef(0);return T.useLayoutEffect(()=>{const p=h.current,y=m.split(" "),g=E=>{E.target===h.current&&(x(),p.removeEventListener("animationend",g),p.removeEventListener("animationcancel",g),f.current===0&&E.type!=="animationcancel"&&p.classList.remove(...y))};p.classList.add(...y),p.addEventListener("animationend",g),p.addEventListener("animationcancel",g)},[]),T.useEffect(()=>{const p=h.current,y=()=>{p.removeEventListener("animationend",y),o?Hp(p,u,s):u()};b||(a?y():(f.current=1,p.className+=` ${d}`,p.addEventListener("animationend",y)))},[b]),T.createElement(T.Fragment,null,c)}}function Bc(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 ot=new Map;let $r=[];const mi=new Set,Wp=e=>mi.forEach(t=>t(e)),jc=()=>ot.size>0;function Vc(e,t){var n;if(t)return!((n=ot.get(t))==null||!n.isToastActive(e));let r=!1;return ot.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Gc(e,t){gi(e)&&(jc()||$r.push({content:e,options:t}),ot.forEach(n=>{n.buildToast(e,t)}))}function Hc(e,t){ot.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 Zp(e){const{subscribe:t,getSnapshot:n,setProps:r}=T.useRef(function(s){const i=s.containerId||1;return{subscribe(c){const l=function(u,h,b){let x=1,m=0,d=[],f=[],p=[],y=h;const g=new Map,E=new Set,I=()=>{p=Array.from(g.values()),E.forEach(S=>S())},w=S=>{f=S==null?[]:f.filter(_=>_!==S),I()},A=S=>{const{toastId:_,onOpen:R,updateId:F,children:D}=S.props,B=F==null;S.staleId&&g.delete(S.staleId),g.set(_,S),f=[...f,S.props.toastId].filter(W=>W!==S.staleId),I(),b(Bc(S,B?"added":"updated")),B&&It(R)&&R(T.isValidElement(D)&&D.props)};return{id:u,props:y,observe:S=>(E.add(S),()=>E.delete(S)),toggle:(S,_)=>{g.forEach(R=>{_!=null&&_!==R.props.toastId||It(R.toggle)&&R.toggle(S)})},removeToast:w,toasts:g,clearQueue:()=>{m-=d.length,d=[]},buildToast:(S,_)=>{if((M=>{let{containerId:H,toastId:j,updateId:V}=M;const $=H?H!==u:u!==1,ne=g.has(j)&&V==null;return $||ne})(_))return;const{toastId:R,updateId:F,data:D,staleId:B,delay:W}=_,X=()=>{w(R)},J=F==null;J&&m++;const z={...y,style:y.toastStyle,key:x++,...Object.fromEntries(Object.entries(_).filter(M=>{let[H,j]=M;return j!=null})),toastId:R,updateId:F,data:D,closeToast:X,isIn:!1,className:Mo(_.className||y.toastClassName),bodyClassName:Mo(_.bodyClassName||y.bodyClassName),progressClassName:Mo(_.progressClassName||y.progressClassName),autoClose:!_.isLoading&&(Y=_.autoClose,ee=y.autoClose,Y===!1||Ur(Y)&&Y>0?Y:ee),deleteToast(){const M=g.get(R),{onClose:H,children:j}=M.props;It(H)&&H(T.isValidElement(j)&&j.props),b(Bc(M,"removed")),g.delete(R),m--,m<0&&(m=0),d.length>0?A(d.shift()):I()}};var Y,ee;z.closeButton=y.closeButton,_.closeButton===!1||gi(_.closeButton)?z.closeButton=_.closeButton:_.closeButton===!0&&(z.closeButton=!gi(y.closeButton)||y.closeButton);let ae=S;T.isValidElement(S)&&!Fn(S.type)?ae=T.cloneElement(S,{closeToast:X,toastProps:z,data:D}):It(S)&&(ae=S({closeToast:X,toastProps:z,data:D}));const le={content:ae,props:z,staleId:B};y.limit&&y.limit>0&&m>y.limit&&J?d.push(le):Ur(W)?setTimeout(()=>{A(le)},W):A(le)},setProps(S){y=S},setToggle:(S,_)=>{g.get(S).toggle=_},isToastActive:S=>f.some(_=>_===S),getSnapshot:()=>y.newestOnTop?p.reverse():p}}(i,s,Wp);ot.set(i,l);const a=l.observe(c);return $r.forEach(u=>Gc(u.content,u.options)),$r=[],()=>{a(),ot.delete(i)}},setProps(c){var l;(l=ot.get(i))==null||l.setProps(c)},getSnapshot(){var c;return(c=ot.get(i))==null?void 0:c.getSnapshot()}}}(e)).current;r(e);const o=T.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:Vc,count:o==null?void 0:o.length}}function Xp(e){const[t,n]=T.useState(!1),[r,o]=T.useState(!1),s=T.useRef(null),i=T.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:l,closeToast:a,onClick:u,closeOnClick:h}=e;var b,x;function m(){n(!0)}function d(){n(!1)}function f(g){const E=s.current;i.canDrag&&E&&(i.didMove=!0,t&&d(),i.delta=e.draggableDirection==="x"?g.clientX-i.start:g.clientY-i.start,i.start!==g.clientX&&(i.canCloseOnClick=!1),E.style.transform=`translate3d(${e.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`},0)`,E.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function p(){document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",p);const g=s.current;if(i.canDrag&&i.didMove&&g){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();g.style.transition="transform 0.2s, opacity 0.2s",g.style.removeProperty("transform"),g.style.removeProperty("opacity")}}(x=ot.get((b={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||x.setToggle(b.id,b.fn),T.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||d(),window.addEventListener("focus",m),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",d)}},[e.pauseOnFocusLoss]);const y={onPointerDown:function(g){if(e.draggable===!0||e.draggable===g.pointerType){i.didMove=!1,document.addEventListener("pointermove",f),document.addEventListener("pointerup",p);const E=s.current;i.canCloseOnClick=!0,i.canDrag=!0,E.style.transition="none",e.draggableDirection==="x"?(i.start=g.clientX,i.removalDistance=E.offsetWidth*(e.draggablePercent/100)):(i.start=g.clientY,i.removalDistance=E.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(g){const{top:E,bottom:I,left:w,right:A}=s.current.getBoundingClientRect();g.nativeEvent.type!=="touchend"&&e.pauseOnHover&&g.clientX>=w&&g.clientX<=A&&g.clientY>=E&&g.clientY<=I?d():m()}};return c&&l&&(y.onMouseEnter=d,e.stacked||(y.onMouseLeave=m)),h&&(y.onClick=g=>{u&&u(g),i.canCloseOnClick&&a()}),{playToast:m,pauseToast:d,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:y}}function zp(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:i,style:c,controlledProgress:l,progress:a,rtl:u,isIn:h,theme:b}=e;const x=s||l&&a===0,m={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(m.transform=`scaleX(${a})`);const d=hn("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${b}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),f=It(i)?i({rtl:u,type:o,defaultClassName:d}):hn(d,i),p={[l&&a>=1?"onTransitionEnd":"onAnimationEnd"]:l&&a<1?null:()=>{h&&r()}};return T.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},T.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${b} Toastify__progress-bar--${o}`}),T.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer",className:f,style:m,...p}))}let Yp=1;const Wc=()=>""+Yp++;function Jp(e){return e&&(Fn(e.toastId)||Ur(e.toastId))?e.toastId:Wc()}function qr(e,t){return Gc(e,t),t.toastId}function jo(e,t){return{...t,type:t&&t.type||e,toastId:Jp(t)}}function Vo(e){return(t,n)=>qr(t,jo(e,n))}function Ae(e,t){return qr(e,jo("default",t))}Ae.loading=(e,t)=>qr(e,jo("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ae.promise=function(e,t,n){let r,{pending:o,error:s,success:i}=t;o&&(r=Fn(o)?Ae.loading(o,n):Ae.loading(o.render,{...n,...o}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,h,b)=>{if(h==null)return void Ae.dismiss(r);const x={type:u,...c,...n,data:b},m=Fn(h)?{render:h}:h;return r?Ae.update(r,{...x,...m}):Ae(m.render,{...x,...m}),b},a=It(e)?e():e;return a.then(u=>l("success",i,u)).catch(u=>l("error",s,u)),a},Ae.success=Vo("success"),Ae.info=Vo("info"),Ae.error=Vo("error"),Ae.warning=Vo("warning"),Ae.warn=Ae.warning,Ae.dark=(e,t)=>qr(e,jo("default",{theme:"dark",...t})),Ae.dismiss=function(e){(function(t){var n;if(jc()){if(t==null||Fn(n=t)||Ur(n))ot.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=ot.get(t.containerId);r?r.removeToast(t.id):ot.forEach(o=>{o.removeToast(t.id)})}}else $r=$r.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Ae.clearWaitingQueue=function(e){e===void 0&&(e={}),ot.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Ae.isActive=Vc,Ae.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:i}=o;return(s=ot.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:Wc()};s.toastId!==e&&(s.staleId=e);const i=s.render||o;delete s.render,qr(i,s)}},Ae.done=e=>{Ae.update(e,{progress:1})},Ae.onChange=function(e){return mi.add(e),()=>{mi.delete(e)}},Ae.play=e=>Hc(!0,e),Ae.pause=e=>Hc(!1,e);const Qp=typeof window<"u"?T.useLayoutEffect:T.useEffect,Go=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return T.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},bi={info:function(e){return T.createElement(Go,{...e},T.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 T.createElement(Go,{...e},T.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 T.createElement(Go,{...e},T.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 T.createElement(Go,{...e},T.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 T.createElement("div",{className:"Toastify__spinner"})}},Up=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=Xp(e),{closeButton:i,children:c,autoClose:l,onClick:a,type:u,hideProgressBar:h,closeToast:b,transition:x,position:m,className:d,style:f,bodyClassName:p,bodyStyle:y,progressClassName:g,progressStyle:E,updateId:I,role:w,progress:A,rtl:S,toastId:_,deleteToast:R,isIn:F,isLoading:D,closeOnClick:B,theme:W}=e,X=hn("Toastify__toast",`Toastify__toast-theme--${W}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":B}),J=It(d)?d({rtl:S,position:m,type:u,defaultClassName:X}):hn(X,d),z=function(le){let{theme:M,type:H,isLoading:j,icon:V}=le,$=null;const ne={theme:M,type:H};return V===!1||(It(V)?$=V({...ne,isLoading:j}):T.isValidElement(V)?$=T.cloneElement(V,ne):j?$=bi.spinner():(re=>re in bi)(H)&&($=bi[H](ne))),$}(e),Y=!!A||!l,ee={closeToast:b,type:u,theme:W};let ae=null;return i===!1||(ae=It(i)?i(ee):T.isValidElement(i)?T.cloneElement(i,ee):function(le){let{closeToast:M,theme:H,ariaLabel:j="close"}=le;return T.createElement("button",{className:`Toastify__close-button Toastify__close-button--${H}`,type:"button",onClick:V=>{V.stopPropagation(),M(V)},"aria-label":j},T.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},T.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"})))}(ee)),T.createElement(x,{isIn:F,done:R,position:m,preventExitTransition:n,nodeRef:r,playToast:s},T.createElement("div",{id:_,onClick:a,"data-in":F,className:J,...o,style:f,ref:r},T.createElement("div",{...F&&{role:w},className:It(p)?p({type:u}):hn("Toastify__toast-body",p),style:y},z!=null&&T.createElement("div",{className:hn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},z),T.createElement("div",null,c)),ae,T.createElement(zp,{...I&&!Y?{key:`pb-${I}`}:{},rtl:S,theme:W,delay:l,isRunning:t,isIn:F,closeToast:b,hide:h,type:u,style:E,className:g,controlledProgress:Y,progress:A||0})))},Ho=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},$p=Bo(Ho("bounce",!0));Bo(Ho("slide",!0)),Bo(Ho("zoom")),Bo(Ho("flip"));const qp={position:"top-right",transition:$p,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Kp(e){let t={...qp,...e};const n=e.stacked,[r,o]=T.useState(!0),s=T.useRef(null),{getToastToRender:i,isToastActive:c,count:l}=Zp(t),{className:a,style:u,rtl:h,containerId:b}=t;function x(d){const f=hn("Toastify__toast-container",`Toastify__toast-container--${d}`,{"Toastify__toast-container--rtl":h});return It(a)?a({position:d,rtl:h,defaultClassName:f}):hn(f,Mo(a))}function m(){n&&(o(!0),Ae.play())}return Qp(()=>{if(n){var d;const f=s.current.querySelectorAll('[data-in="true"]'),p=12,y=(d=t.position)==null?void 0:d.includes("top");let g=0,E=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=g*(r?.2:1)+(r?0:p*w);A.style.setProperty("--y",`${y?S:-1*S}px`),A.style.setProperty("--g",`${p}`),A.style.setProperty("--s",""+(1-(r?E:0))),g+=A.offsetHeight,E+=.025})}},[r,l,n]),T.createElement("div",{ref:s,className:"Toastify",id:b,onMouseEnter:()=>{n&&(o(!1),Ae.pause())},onMouseLeave:m},i((d,f)=>{const p=f.length?{...u}:{...u,pointerEvents:"none"};return T.createElement("div",{className:x(d),style:p,key:`container-${d}`},f.map(y=>{let{content:g,props:E}=y;return T.createElement(Up,{...E,stacked:n,collapseAll:m,isIn:c(E.toastId,E.containerId),style:E.style,key:`toast-${E.key}`},g)}))}))}const yi=(e,t)=>t.some(n=>e instanceof n);let Zc,Xc;function eh(){return Zc||(Zc=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function th(){return Xc||(Xc=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const vi=new WeakMap,Ci=new WeakMap,Wo=new WeakMap;function nh(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Dn(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return Wo.set(t,e),t}function rh(e){if(vi.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)});vi.set(e,t)}let Ii={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return vi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Dn(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 zc(e){Ii=e(Ii)}function oh(e){return th().includes(e)?function(...t){return e.apply(xi(this),t),Dn(this.request)}:function(...t){return Dn(e.apply(xi(this),t))}}function sh(e){return typeof e=="function"?oh(e):(e instanceof IDBTransaction&&rh(e),yi(e,eh())?new Proxy(e,Ii):e)}function Dn(e){if(e instanceof IDBRequest)return nh(e);if(Ci.has(e))return Ci.get(e);const t=sh(e);return t!==e&&(Ci.set(e,t),Wo.set(t,e)),t}const xi=e=>Wo.get(e);function ih(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),c=Dn(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Dn(i.result),l.oldVersion,l.newVersion,Dn(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 ah=["get","getKey","getAll","getAllKeys","count"],ch=["put","add","delete","clear"],Ei=new Map;function Yc(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Ei.get(t))return Ei.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=ch.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||ah.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 Ei.set(t,s),s}zc(e=>({...e,get:(t,n,r)=>Yc(t,n)||e.get(t,n,r),has:(t,n)=>!!Yc(t,n)||e.has(t,n)}));const lh=["continue","continuePrimaryKey","advance"],Jc={},wi=new WeakMap,Qc=new WeakMap,uh={get(e,t){if(!lh.includes(t))return e[t];let n=Jc[t];return n||(n=Jc[t]=function(...r){wi.set(this,Qc.get(this)[t](...r))}),n}};async function*dh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,uh);for(Qc.set(n,t),Wo.set(n,xi(t));t;)yield n,t=await(wi.get(n)||t.continue()),wi.delete(n)}function Uc(e,t){return t===Symbol.asyncIterator&&yi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&yi(e,[IDBIndex,IDBObjectStore])}zc(e=>({...e,get(t,n,r){return Uc(t,n)?dh:e.get(t,n,r)},has(t,n){return Uc(t,n)||e.has(t,n)}}));const fh="connector-db",ph=1,Ai={FEEDBACK:"feedback"},Kr=`${Ai.FEEDBACK}:data`,Zo=`${Ai.FEEDBACK}:last_submitted`,eo=`${Ai.FEEDBACK}:capture_on_demand`,hh=12*60*60*1e3,Si=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=hh:!0,$c=(e,t=!1)=>e.captureFeedback&&(Si(e.firstViewed)&&(!e.lastSubmittedFeedback||Si(e.lastSubmittedFeedback))||!!t);let Rn=null;const ar=async()=>{try{Rn||(Rn=await ih(fh,ph,{upgrade(e){e.objectStoreNames.contains(Kr)||e.createObjectStore(Kr),e.objectStoreNames.contains(Zo)||e.createObjectStore(Zo),e.objectStoreNames.contains(eo)||e.createObjectStore(eo)},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."),Rn&&(Rn.close(),Rn=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Rn=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Rn},Ti=async e=>{if(!e)return[];const t=await ar();if(!t)return[];try{return await t.get(Kr,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},gh=async e=>{if(!e)return null;const t=await ar();if(!t)return null;try{return await t.get(Zo,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Xo=async e=>{if(!e)return;const t=await ar();if(t)try{return await t.get(eo,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},mh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await ar();if(n)try{const r=await Ti(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(Kr,i,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},bh=async e=>{if(!e)return;const t=await ar();if(t)try{const n=await Ti(e),r=await Xo(e),o=new Date,s=n.map(i=>{const c=$c(i,r);return{...i,lastSubmittedFeedback:c?o:i.lastSubmittedFeedback,captureFeedback:i.captureFeedback!==c}});await t.put(Kr,s,e),await t.put(Zo,o,e),r&&await t.put(eo,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},qc=async(e,t)=>{if(!e)return;const n=await ar();if(n)try{await n.put(eo,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},yh=async e=>{const t=await Ti(e),n=await Xo(e);return t.filter(o=>$c(o,n))},Kc=async e=>{const t=await gh(e);return t&&!Si(t)?!1:await Xo(e)&&!t?!0:!!(await yh(e)).length},vh=async(e,t)=>{await mh(e,t)},zo=async e=>{e&&await bh(e)},Ch=async(e,t)=>{const n=await Xo(e);t?n!==!1&&await qc(e,t):await qc(e,void 0)};var _i={},kn={};function el(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ih}=Object.prototype,{getPrototypeOf:Oi}=Object,Yo=(e=>t=>{const n=Ih.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=e=>(e=e.toLowerCase(),t=>Yo(t)===e),Jo=e=>t=>typeof t===e,{isArray:cr}=Array,to=Jo("undefined");function xh(e){return e!==null&&!to(e)&&e.constructor!==null&&!to(e.constructor)&&xt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tl=Rt("ArrayBuffer");function Eh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tl(e.buffer),t}const wh=Jo("string"),xt=Jo("function"),nl=Jo("number"),Qo=e=>e!==null&&typeof e=="object",Ah=e=>e===!0||e===!1,Uo=e=>{if(Yo(e)!=="object")return!1;const t=Oi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Sh=Rt("Date"),Th=Rt("File"),_h=Rt("Blob"),Oh=Rt("FileList"),Lh=e=>Qo(e)&&xt(e.pipe),Fh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||xt(e.append)&&((t=Yo(e))==="formdata"||t==="object"&&xt(e.toString)&&e.toString()==="[object FormData]"))},Dh=Rt("URLSearchParams"),[Rh,kh,Nh,Ph]=["ReadableStream","Request","Response","Headers"].map(Rt),Mh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function no(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),cr(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 rl(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 Nn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:de,ol=e=>!to(e)&&e!==Nn;function Li(){const{caseless:e}=ol(this)&&this||{},t={},n=(r,o)=>{const s=e&&rl(t,o)||o;Uo(t[s])&&Uo(r)?t[s]=Li(t[s],r):Uo(r)?t[s]=Li({},r):cr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&no(arguments[r],n);return t}const Bh=(e,t,n,{allOwnKeys:r}={})=>(no(t,(o,s)=>{n&&xt(o)?e[s]=el(o,n):e[s]=o},{allOwnKeys:r}),e),jh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Vh=(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)},Gh=(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&&Oi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Hh=(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},Wh=e=>{if(!e)return null;if(cr(e))return e;let t=e.length;if(!nl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Zh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Oi(Uint8Array)),Xh=(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])}},zh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Yh=Rt("HTMLFormElement"),Jh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),sl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Qh=Rt("RegExp"),il=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};no(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Uh=e=>{il(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+"'")})}})},$h=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return cr(e)?r(e):r(String(e).split(t)),n},qh=()=>{},Kh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Fi="abcdefghijklmnopqrstuvwxyz",al="0123456789",cl={DIGIT:al,ALPHA:Fi,ALPHA_DIGIT:Fi+Fi.toUpperCase()+al},e2=(e=16,t=cl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function t2(e){return!!(e&&xt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const n2=e=>{const t=new Array(10),n=(r,o)=>{if(Qo(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=cr(r)?[]:{};return no(r,(i,c)=>{const l=n(i,o+1);!to(l)&&(s[c]=l)}),t[o]=void 0,s}}return r};return n(e,0)},r2=Rt("AsyncFunction"),o2=e=>e&&(Qo(e)||xt(e))&&xt(e.then)&&xt(e.catch),ll=((e,t)=>e?setImmediate:t?((n,r)=>(Nn.addEventListener("message",({source:o,data:s})=>{o===Nn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Nn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",xt(Nn.postMessage)),s2=typeof queueMicrotask<"u"?queueMicrotask.bind(Nn):typeof process<"u"&&process.nextTick||ll;var N={isArray:cr,isArrayBuffer:tl,isBuffer:xh,isFormData:Fh,isArrayBufferView:Eh,isString:wh,isNumber:nl,isBoolean:Ah,isObject:Qo,isPlainObject:Uo,isReadableStream:Rh,isRequest:kh,isResponse:Nh,isHeaders:Ph,isUndefined:to,isDate:Sh,isFile:Th,isBlob:_h,isRegExp:Qh,isFunction:xt,isStream:Lh,isURLSearchParams:Dh,isTypedArray:Zh,isFileList:Oh,forEach:no,merge:Li,extend:Bh,trim:Mh,stripBOM:jh,inherits:Vh,toFlatObject:Gh,kindOf:Yo,kindOfTest:Rt,endsWith:Hh,toArray:Wh,forEachEntry:Xh,matchAll:zh,isHTMLForm:Yh,hasOwnProperty:sl,hasOwnProp:sl,reduceDescriptors:il,freezeMethods:Uh,toObjectSet:$h,toCamelCase:Jh,noop:qh,toFiniteNumber:Kh,findKey:rl,global:Nn,isContextDefined:ol,ALPHABET:cl,generateString:e2,isSpecCompliantForm:t2,toJSONObject:n2,isAsyncFn:r2,isThenable:o2,setImmediate:ll,asap:s2};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 ul=pe.prototype,dl={};["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=>{dl[e]={value:e}}),Object.defineProperties(pe,dl),Object.defineProperty(ul,"isAxiosError",{value:!0}),pe.from=(e,t,n,r,o,s)=>{const i=Object.create(ul);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 i2=null;function Di(e){return N.isPlainObject(e)||N.isArray(e)}function fl(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function pl(e,t,n){return e?e.concat(t).map(function(o,s){return o=fl(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function a2(e){return N.isArray(e)&&!e.some(Di)}const c2=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function $o(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(m){if(m===null)return"";if(N.isDate(m))return m.toISOString();if(!l&&N.isBlob(m))throw new pe("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(m)||N.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,d,f){let p=m;if(m&&!f&&typeof m=="object"){if(N.endsWith(d,"{}"))d=r?d:d.slice(0,-2),m=JSON.stringify(m);else if(N.isArray(m)&&a2(m)||(N.isFileList(m)||N.endsWith(d,"[]"))&&(p=N.toArray(m)))return d=fl(d),p.forEach(function(g,E){!(N.isUndefined(g)||g===null)&&t.append(i===!0?pl([d],E,s):i===null?d:d+"[]",a(g))}),!1}return Di(m)?!0:(t.append(pl(f,d,s),a(m)),!1)}const h=[],b=Object.assign(c2,{defaultVisitor:u,convertValue:a,isVisitable:Di});function x(m,d){if(!N.isUndefined(m)){if(h.indexOf(m)!==-1)throw Error("Circular reference detected in "+d.join("."));h.push(m),N.forEach(m,function(p,y){(!(N.isUndefined(p)||p===null)&&o.call(t,p,N.isString(y)?y.trim():y,d,b))===!0&&x(p,d?d.concat(y):[y])}),h.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return x(e),t}function hl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ri(e,t){this._pairs=[],e&&$o(e,this,t)}const gl=Ri.prototype;gl.append=function(t,n){this._pairs.push([t,n])},gl.toString=function(t){const n=t?function(r){return t.call(this,r,hl)}:hl;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function l2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ml(e,t,n){if(!t)return e;const r=n&&n.encode||l2,o=n&&n.serialize;let s;if(o?s=o(t,n):s=N.isURLSearchParams(t)?t.toString():new Ri(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class u2{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 bl=u2,yl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},d2=typeof URLSearchParams<"u"?URLSearchParams:Ri,f2=typeof FormData<"u"?FormData:null,p2=typeof Blob<"u"?Blob:null,h2={isBrowser:!0,classes:{URLSearchParams:d2,FormData:f2,Blob:p2},protocols:["http","https","file","blob","url","data"]};const ki=typeof window<"u"&&typeof document<"u",Ni=typeof navigator=="object"&&navigator||void 0,g2=ki&&(!Ni||["ReactNative","NativeScript","NS"].indexOf(Ni.product)<0),m2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",b2=ki&&window.location.href||"http://localhost";var y2=Object.freeze({__proto__:null,hasBrowserEnv:ki,hasStandardBrowserWebWorkerEnv:m2,hasStandardBrowserEnv:g2,navigator:Ni,origin:b2}),lt={...y2,...h2};function v2(e,t){return $o(e,new lt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return lt.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function C2(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function I2(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 vl(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]=I2(o[i])),!c)}if(N.isFormData(e)&&N.isFunction(e.entries)){const n={};return N.forEachEntry(e,(r,o)=>{t(C2(r),o,n,0)}),n}return null}function x2(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 Pi={transitional:yl,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(vl(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 v2(t,this.formSerializer).toString();if((c=N.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return $o(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),x2(t)):t}],transformResponse:[function(t){const n=this.transitional||Pi.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:lt.classes.FormData,Blob:lt.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=>{Pi.headers[e]={}});var Mi=Pi;const E2=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 w2=e=>{const t={};let n,r,o;return e&&e.split(`
30
+ <%s key={someKey} {...props} />`,wc,ir,Q9,ir),Pp[ir+wc]=!0}}return O===r?Z9(Xe):W9(Xe),Xe}}function X9(O,G,Q){return Mp(O,G,Q,!0)}function z9(O,G,Q){return Mp(O,G,Q,!1)}var Y9=z9,J9=X9;Qr.Fragment=r,Qr.jsx=Y9,Qr.jsxs=J9}()),Qr}process.env.NODE_ENV==="production"?hi.exports=Vp():hi.exports=Gp();var C=hi.exports;function Mc(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=Mc(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=Mc(e))&&(r&&(r+=" "),r+=t);return r}const Ur=e=>typeof e=="number"&&!isNaN(e),Fn=e=>typeof e=="string",It=e=>typeof e=="function",Mo=e=>Fn(e)||It(e)?e:null,gi=e=>T.isValidElement(e)||Fn(e)||It(e)||Ur(e);function Hp(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 Bo(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:h,isIn:b,playToast:x}=i;const m=r?`${t}--${l}`:t,d=r?`${n}--${l}`:n,f=T.useRef(0);return T.useLayoutEffect(()=>{const p=h.current,y=m.split(" "),g=E=>{E.target===h.current&&(x(),p.removeEventListener("animationend",g),p.removeEventListener("animationcancel",g),f.current===0&&E.type!=="animationcancel"&&p.classList.remove(...y))};p.classList.add(...y),p.addEventListener("animationend",g),p.addEventListener("animationcancel",g)},[]),T.useEffect(()=>{const p=h.current,y=()=>{p.removeEventListener("animationend",y),o?Hp(p,u,s):u()};b||(a?y():(f.current=1,p.className+=` ${d}`,p.addEventListener("animationend",y)))},[b]),T.createElement(T.Fragment,null,c)}}function Bc(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 ot=new Map;let $r=[];const mi=new Set,Wp=e=>mi.forEach(t=>t(e)),jc=()=>ot.size>0;function Vc(e,t){var n;if(t)return!((n=ot.get(t))==null||!n.isToastActive(e));let r=!1;return ot.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Gc(e,t){gi(e)&&(jc()||$r.push({content:e,options:t}),ot.forEach(n=>{n.buildToast(e,t)}))}function Hc(e,t){ot.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 Zp(e){const{subscribe:t,getSnapshot:n,setProps:r}=T.useRef(function(s){const i=s.containerId||1;return{subscribe(c){const l=function(u,h,b){let x=1,m=0,d=[],f=[],p=[],y=h;const g=new Map,E=new Set,I=()=>{p=Array.from(g.values()),E.forEach(S=>S())},w=S=>{f=S==null?[]:f.filter(_=>_!==S),I()},A=S=>{const{toastId:_,onOpen:R,updateId:F,children:D}=S.props,B=F==null;S.staleId&&g.delete(S.staleId),g.set(_,S),f=[...f,S.props.toastId].filter(W=>W!==S.staleId),I(),b(Bc(S,B?"added":"updated")),B&&It(R)&&R(T.isValidElement(D)&&D.props)};return{id:u,props:y,observe:S=>(E.add(S),()=>E.delete(S)),toggle:(S,_)=>{g.forEach(R=>{_!=null&&_!==R.props.toastId||It(R.toggle)&&R.toggle(S)})},removeToast:w,toasts:g,clearQueue:()=>{m-=d.length,d=[]},buildToast:(S,_)=>{if((M=>{let{containerId:H,toastId:j,updateId:V}=M;const $=H?H!==u:u!==1,ne=g.has(j)&&V==null;return $||ne})(_))return;const{toastId:R,updateId:F,data:D,staleId:B,delay:W}=_,X=()=>{w(R)},J=F==null;J&&m++;const z={...y,style:y.toastStyle,key:x++,...Object.fromEntries(Object.entries(_).filter(M=>{let[H,j]=M;return j!=null})),toastId:R,updateId:F,data:D,closeToast:X,isIn:!1,className:Mo(_.className||y.toastClassName),bodyClassName:Mo(_.bodyClassName||y.bodyClassName),progressClassName:Mo(_.progressClassName||y.progressClassName),autoClose:!_.isLoading&&(Y=_.autoClose,ee=y.autoClose,Y===!1||Ur(Y)&&Y>0?Y:ee),deleteToast(){const M=g.get(R),{onClose:H,children:j}=M.props;It(H)&&H(T.isValidElement(j)&&j.props),b(Bc(M,"removed")),g.delete(R),m--,m<0&&(m=0),d.length>0?A(d.shift()):I()}};var Y,ee;z.closeButton=y.closeButton,_.closeButton===!1||gi(_.closeButton)?z.closeButton=_.closeButton:_.closeButton===!0&&(z.closeButton=!gi(y.closeButton)||y.closeButton);let ae=S;T.isValidElement(S)&&!Fn(S.type)?ae=T.cloneElement(S,{closeToast:X,toastProps:z,data:D}):It(S)&&(ae=S({closeToast:X,toastProps:z,data:D}));const le={content:ae,props:z,staleId:B};y.limit&&y.limit>0&&m>y.limit&&J?d.push(le):Ur(W)?setTimeout(()=>{A(le)},W):A(le)},setProps(S){y=S},setToggle:(S,_)=>{g.get(S).toggle=_},isToastActive:S=>f.some(_=>_===S),getSnapshot:()=>y.newestOnTop?p.reverse():p}}(i,s,Wp);ot.set(i,l);const a=l.observe(c);return $r.forEach(u=>Gc(u.content,u.options)),$r=[],()=>{a(),ot.delete(i)}},setProps(c){var l;(l=ot.get(i))==null||l.setProps(c)},getSnapshot(){var c;return(c=ot.get(i))==null?void 0:c.getSnapshot()}}}(e)).current;r(e);const o=T.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:Vc,count:o==null?void 0:o.length}}function Xp(e){const[t,n]=T.useState(!1),[r,o]=T.useState(!1),s=T.useRef(null),i=T.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:l,closeToast:a,onClick:u,closeOnClick:h}=e;var b,x;function m(){n(!0)}function d(){n(!1)}function f(g){const E=s.current;i.canDrag&&E&&(i.didMove=!0,t&&d(),i.delta=e.draggableDirection==="x"?g.clientX-i.start:g.clientY-i.start,i.start!==g.clientX&&(i.canCloseOnClick=!1),E.style.transform=`translate3d(${e.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`},0)`,E.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function p(){document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",p);const g=s.current;if(i.canDrag&&i.didMove&&g){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();g.style.transition="transform 0.2s, opacity 0.2s",g.style.removeProperty("transform"),g.style.removeProperty("opacity")}}(x=ot.get((b={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||x.setToggle(b.id,b.fn),T.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||d(),window.addEventListener("focus",m),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",d)}},[e.pauseOnFocusLoss]);const y={onPointerDown:function(g){if(e.draggable===!0||e.draggable===g.pointerType){i.didMove=!1,document.addEventListener("pointermove",f),document.addEventListener("pointerup",p);const E=s.current;i.canCloseOnClick=!0,i.canDrag=!0,E.style.transition="none",e.draggableDirection==="x"?(i.start=g.clientX,i.removalDistance=E.offsetWidth*(e.draggablePercent/100)):(i.start=g.clientY,i.removalDistance=E.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(g){const{top:E,bottom:I,left:w,right:A}=s.current.getBoundingClientRect();g.nativeEvent.type!=="touchend"&&e.pauseOnHover&&g.clientX>=w&&g.clientX<=A&&g.clientY>=E&&g.clientY<=I?d():m()}};return c&&l&&(y.onMouseEnter=d,e.stacked||(y.onMouseLeave=m)),h&&(y.onClick=g=>{u&&u(g),i.canCloseOnClick&&a()}),{playToast:m,pauseToast:d,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:y}}function zp(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:i,style:c,controlledProgress:l,progress:a,rtl:u,isIn:h,theme:b}=e;const x=s||l&&a===0,m={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(m.transform=`scaleX(${a})`);const d=hn("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${b}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),f=It(i)?i({rtl:u,type:o,defaultClassName:d}):hn(d,i),p={[l&&a>=1?"onTransitionEnd":"onAnimationEnd"]:l&&a<1?null:()=>{h&&r()}};return T.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},T.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${b} Toastify__progress-bar--${o}`}),T.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer",className:f,style:m,...p}))}let Yp=1;const Wc=()=>""+Yp++;function Jp(e){return e&&(Fn(e.toastId)||Ur(e.toastId))?e.toastId:Wc()}function qr(e,t){return Gc(e,t),t.toastId}function jo(e,t){return{...t,type:t&&t.type||e,toastId:Jp(t)}}function Vo(e){return(t,n)=>qr(t,jo(e,n))}function Ae(e,t){return qr(e,jo("default",t))}Ae.loading=(e,t)=>qr(e,jo("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ae.promise=function(e,t,n){let r,{pending:o,error:s,success:i}=t;o&&(r=Fn(o)?Ae.loading(o,n):Ae.loading(o.render,{...n,...o}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,h,b)=>{if(h==null)return void Ae.dismiss(r);const x={type:u,...c,...n,data:b},m=Fn(h)?{render:h}:h;return r?Ae.update(r,{...x,...m}):Ae(m.render,{...x,...m}),b},a=It(e)?e():e;return a.then(u=>l("success",i,u)).catch(u=>l("error",s,u)),a},Ae.success=Vo("success"),Ae.info=Vo("info"),Ae.error=Vo("error"),Ae.warning=Vo("warning"),Ae.warn=Ae.warning,Ae.dark=(e,t)=>qr(e,jo("default",{theme:"dark",...t})),Ae.dismiss=function(e){(function(t){var n;if(jc()){if(t==null||Fn(n=t)||Ur(n))ot.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=ot.get(t.containerId);r?r.removeToast(t.id):ot.forEach(o=>{o.removeToast(t.id)})}}else $r=$r.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Ae.clearWaitingQueue=function(e){e===void 0&&(e={}),ot.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Ae.isActive=Vc,Ae.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:i}=o;return(s=ot.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:Wc()};s.toastId!==e&&(s.staleId=e);const i=s.render||o;delete s.render,qr(i,s)}},Ae.done=e=>{Ae.update(e,{progress:1})},Ae.onChange=function(e){return mi.add(e),()=>{mi.delete(e)}},Ae.play=e=>Hc(!0,e),Ae.pause=e=>Hc(!1,e);const Qp=typeof window<"u"?T.useLayoutEffect:T.useEffect,Go=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return T.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},bi={info:function(e){return T.createElement(Go,{...e},T.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 T.createElement(Go,{...e},T.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 T.createElement(Go,{...e},T.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 T.createElement(Go,{...e},T.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 T.createElement("div",{className:"Toastify__spinner"})}},Up=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=Xp(e),{closeButton:i,children:c,autoClose:l,onClick:a,type:u,hideProgressBar:h,closeToast:b,transition:x,position:m,className:d,style:f,bodyClassName:p,bodyStyle:y,progressClassName:g,progressStyle:E,updateId:I,role:w,progress:A,rtl:S,toastId:_,deleteToast:R,isIn:F,isLoading:D,closeOnClick:B,theme:W}=e,X=hn("Toastify__toast",`Toastify__toast-theme--${W}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":B}),J=It(d)?d({rtl:S,position:m,type:u,defaultClassName:X}):hn(X,d),z=function(le){let{theme:M,type:H,isLoading:j,icon:V}=le,$=null;const ne={theme:M,type:H};return V===!1||(It(V)?$=V({...ne,isLoading:j}):T.isValidElement(V)?$=T.cloneElement(V,ne):j?$=bi.spinner():(re=>re in bi)(H)&&($=bi[H](ne))),$}(e),Y=!!A||!l,ee={closeToast:b,type:u,theme:W};let ae=null;return i===!1||(ae=It(i)?i(ee):T.isValidElement(i)?T.cloneElement(i,ee):function(le){let{closeToast:M,theme:H,ariaLabel:j="close"}=le;return T.createElement("button",{className:`Toastify__close-button Toastify__close-button--${H}`,type:"button",onClick:V=>{V.stopPropagation(),M(V)},"aria-label":j},T.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},T.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"})))}(ee)),T.createElement(x,{isIn:F,done:R,position:m,preventExitTransition:n,nodeRef:r,playToast:s},T.createElement("div",{id:_,onClick:a,"data-in":F,className:J,...o,style:f,ref:r},T.createElement("div",{...F&&{role:w},className:It(p)?p({type:u}):hn("Toastify__toast-body",p),style:y},z!=null&&T.createElement("div",{className:hn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},z),T.createElement("div",null,c)),ae,T.createElement(zp,{...I&&!Y?{key:`pb-${I}`}:{},rtl:S,theme:W,delay:l,isRunning:t,isIn:F,closeToast:b,hide:h,type:u,style:E,className:g,controlledProgress:Y,progress:A||0})))},Ho=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},$p=Bo(Ho("bounce",!0));Bo(Ho("slide",!0)),Bo(Ho("zoom")),Bo(Ho("flip"));const qp={position:"top-right",transition:$p,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Kp(e){let t={...qp,...e};const n=e.stacked,[r,o]=T.useState(!0),s=T.useRef(null),{getToastToRender:i,isToastActive:c,count:l}=Zp(t),{className:a,style:u,rtl:h,containerId:b}=t;function x(d){const f=hn("Toastify__toast-container",`Toastify__toast-container--${d}`,{"Toastify__toast-container--rtl":h});return It(a)?a({position:d,rtl:h,defaultClassName:f}):hn(f,Mo(a))}function m(){n&&(o(!0),Ae.play())}return Qp(()=>{if(n){var d;const f=s.current.querySelectorAll('[data-in="true"]'),p=12,y=(d=t.position)==null?void 0:d.includes("top");let g=0,E=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=g*(r?.2:1)+(r?0:p*w);A.style.setProperty("--y",`${y?S:-1*S}px`),A.style.setProperty("--g",`${p}`),A.style.setProperty("--s",""+(1-(r?E:0))),g+=A.offsetHeight,E+=.025})}},[r,l,n]),T.createElement("div",{ref:s,className:"Toastify",id:b,onMouseEnter:()=>{n&&(o(!1),Ae.pause())},onMouseLeave:m},i((d,f)=>{const p=f.length?{...u}:{...u,pointerEvents:"none"};return T.createElement("div",{className:x(d),style:p,key:`container-${d}`},f.map(y=>{let{content:g,props:E}=y;return T.createElement(Up,{...E,stacked:n,collapseAll:m,isIn:c(E.toastId,E.containerId),style:E.style,key:`toast-${E.key}`},g)}))}))}const yi=(e,t)=>t.some(n=>e instanceof n);let Zc,Xc;function eh(){return Zc||(Zc=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function th(){return Xc||(Xc=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const vi=new WeakMap,Ci=new WeakMap,Wo=new WeakMap;function nh(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Dn(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return Wo.set(t,e),t}function rh(e){if(vi.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)});vi.set(e,t)}let Ii={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return vi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Dn(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 zc(e){Ii=e(Ii)}function oh(e){return th().includes(e)?function(...t){return e.apply(xi(this),t),Dn(this.request)}:function(...t){return Dn(e.apply(xi(this),t))}}function sh(e){return typeof e=="function"?oh(e):(e instanceof IDBTransaction&&rh(e),yi(e,eh())?new Proxy(e,Ii):e)}function Dn(e){if(e instanceof IDBRequest)return nh(e);if(Ci.has(e))return Ci.get(e);const t=sh(e);return t!==e&&(Ci.set(e,t),Wo.set(t,e)),t}const xi=e=>Wo.get(e);function ih(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),c=Dn(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Dn(i.result),l.oldVersion,l.newVersion,Dn(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 ah=["get","getKey","getAll","getAllKeys","count"],ch=["put","add","delete","clear"],Ei=new Map;function Yc(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Ei.get(t))return Ei.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=ch.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||ah.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 Ei.set(t,s),s}zc(e=>({...e,get:(t,n,r)=>Yc(t,n)||e.get(t,n,r),has:(t,n)=>!!Yc(t,n)||e.has(t,n)}));const lh=["continue","continuePrimaryKey","advance"],Jc={},wi=new WeakMap,Qc=new WeakMap,uh={get(e,t){if(!lh.includes(t))return e[t];let n=Jc[t];return n||(n=Jc[t]=function(...r){wi.set(this,Qc.get(this)[t](...r))}),n}};async function*dh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,uh);for(Qc.set(n,t),Wo.set(n,xi(t));t;)yield n,t=await(wi.get(n)||t.continue()),wi.delete(n)}function Uc(e,t){return t===Symbol.asyncIterator&&yi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&yi(e,[IDBIndex,IDBObjectStore])}zc(e=>({...e,get(t,n,r){return Uc(t,n)?dh:e.get(t,n,r)},has(t,n){return Uc(t,n)||e.has(t,n)}}));const fh="connector-db",ph=1,Ai={FEEDBACK:"feedback"},Kr=`${Ai.FEEDBACK}:data`,Zo=`${Ai.FEEDBACK}:last_submitted`,eo=`${Ai.FEEDBACK}:capture_on_demand`,hh=0*60*60*1e3,Si=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=hh:!0,$c=(e,t=!1)=>e.captureFeedback&&(Si(e.firstViewed)&&(!e.lastSubmittedFeedback||Si(e.lastSubmittedFeedback))||!!t);let Rn=null;const ar=async()=>{try{Rn||(Rn=await ih(fh,ph,{upgrade(e){e.objectStoreNames.contains(Kr)||e.createObjectStore(Kr),e.objectStoreNames.contains(Zo)||e.createObjectStore(Zo),e.objectStoreNames.contains(eo)||e.createObjectStore(eo)},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."),Rn&&(Rn.close(),Rn=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Rn=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Rn},Ti=async e=>{if(!e)return[];const t=await ar();if(!t)return[];try{return await t.get(Kr,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},gh=async e=>{if(!e)return null;const t=await ar();if(!t)return null;try{return await t.get(Zo,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Xo=async e=>{if(!e)return;const t=await ar();if(t)try{return await t.get(eo,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},mh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await ar();if(n)try{const r=await Ti(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(Kr,i,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},bh=async e=>{if(!e)return;const t=await ar();if(t)try{const n=await Ti(e),r=await Xo(e),o=new Date,s=n.map(i=>{const c=$c(i,r);return{...i,lastSubmittedFeedback:c?o:i.lastSubmittedFeedback,captureFeedback:i.captureFeedback!==c}});await t.put(Kr,s,e),await t.put(Zo,o,e),r&&await t.put(eo,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},qc=async(e,t)=>{if(!e)return;const n=await ar();if(n)try{await n.put(eo,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},yh=async e=>{const t=await Ti(e),n=await Xo(e);return t.filter(o=>$c(o,n))},Kc=async e=>{const t=await gh(e);return t&&!Si(t)?!1:await Xo(e)&&!t?!0:!!(await yh(e)).length},vh=async(e,t)=>{await mh(e,t)},zo=async e=>{e&&await bh(e)},Ch=async(e,t)=>{const n=await Xo(e);t?n!==!1&&await qc(e,t):await qc(e,void 0)};var _i={},kn={};function el(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ih}=Object.prototype,{getPrototypeOf:Oi}=Object,Yo=(e=>t=>{const n=Ih.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=e=>(e=e.toLowerCase(),t=>Yo(t)===e),Jo=e=>t=>typeof t===e,{isArray:cr}=Array,to=Jo("undefined");function xh(e){return e!==null&&!to(e)&&e.constructor!==null&&!to(e.constructor)&&xt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tl=Rt("ArrayBuffer");function Eh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tl(e.buffer),t}const wh=Jo("string"),xt=Jo("function"),nl=Jo("number"),Qo=e=>e!==null&&typeof e=="object",Ah=e=>e===!0||e===!1,Uo=e=>{if(Yo(e)!=="object")return!1;const t=Oi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Sh=Rt("Date"),Th=Rt("File"),_h=Rt("Blob"),Oh=Rt("FileList"),Lh=e=>Qo(e)&&xt(e.pipe),Fh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||xt(e.append)&&((t=Yo(e))==="formdata"||t==="object"&&xt(e.toString)&&e.toString()==="[object FormData]"))},Dh=Rt("URLSearchParams"),[Rh,kh,Nh,Ph]=["ReadableStream","Request","Response","Headers"].map(Rt),Mh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function no(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),cr(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 rl(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 Nn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:de,ol=e=>!to(e)&&e!==Nn;function Li(){const{caseless:e}=ol(this)&&this||{},t={},n=(r,o)=>{const s=e&&rl(t,o)||o;Uo(t[s])&&Uo(r)?t[s]=Li(t[s],r):Uo(r)?t[s]=Li({},r):cr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&no(arguments[r],n);return t}const Bh=(e,t,n,{allOwnKeys:r}={})=>(no(t,(o,s)=>{n&&xt(o)?e[s]=el(o,n):e[s]=o},{allOwnKeys:r}),e),jh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Vh=(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)},Gh=(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&&Oi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Hh=(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},Wh=e=>{if(!e)return null;if(cr(e))return e;let t=e.length;if(!nl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Zh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Oi(Uint8Array)),Xh=(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])}},zh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Yh=Rt("HTMLFormElement"),Jh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),sl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Qh=Rt("RegExp"),il=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};no(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Uh=e=>{il(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+"'")})}})},$h=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return cr(e)?r(e):r(String(e).split(t)),n},qh=()=>{},Kh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Fi="abcdefghijklmnopqrstuvwxyz",al="0123456789",cl={DIGIT:al,ALPHA:Fi,ALPHA_DIGIT:Fi+Fi.toUpperCase()+al},e2=(e=16,t=cl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function t2(e){return!!(e&&xt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const n2=e=>{const t=new Array(10),n=(r,o)=>{if(Qo(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=cr(r)?[]:{};return no(r,(i,c)=>{const l=n(i,o+1);!to(l)&&(s[c]=l)}),t[o]=void 0,s}}return r};return n(e,0)},r2=Rt("AsyncFunction"),o2=e=>e&&(Qo(e)||xt(e))&&xt(e.then)&&xt(e.catch),ll=((e,t)=>e?setImmediate:t?((n,r)=>(Nn.addEventListener("message",({source:o,data:s})=>{o===Nn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Nn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",xt(Nn.postMessage)),s2=typeof queueMicrotask<"u"?queueMicrotask.bind(Nn):typeof process<"u"&&process.nextTick||ll;var N={isArray:cr,isArrayBuffer:tl,isBuffer:xh,isFormData:Fh,isArrayBufferView:Eh,isString:wh,isNumber:nl,isBoolean:Ah,isObject:Qo,isPlainObject:Uo,isReadableStream:Rh,isRequest:kh,isResponse:Nh,isHeaders:Ph,isUndefined:to,isDate:Sh,isFile:Th,isBlob:_h,isRegExp:Qh,isFunction:xt,isStream:Lh,isURLSearchParams:Dh,isTypedArray:Zh,isFileList:Oh,forEach:no,merge:Li,extend:Bh,trim:Mh,stripBOM:jh,inherits:Vh,toFlatObject:Gh,kindOf:Yo,kindOfTest:Rt,endsWith:Hh,toArray:Wh,forEachEntry:Xh,matchAll:zh,isHTMLForm:Yh,hasOwnProperty:sl,hasOwnProp:sl,reduceDescriptors:il,freezeMethods:Uh,toObjectSet:$h,toCamelCase:Jh,noop:qh,toFiniteNumber:Kh,findKey:rl,global:Nn,isContextDefined:ol,ALPHABET:cl,generateString:e2,isSpecCompliantForm:t2,toJSONObject:n2,isAsyncFn:r2,isThenable:o2,setImmediate:ll,asap:s2};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 ul=pe.prototype,dl={};["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=>{dl[e]={value:e}}),Object.defineProperties(pe,dl),Object.defineProperty(ul,"isAxiosError",{value:!0}),pe.from=(e,t,n,r,o,s)=>{const i=Object.create(ul);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 i2=null;function Di(e){return N.isPlainObject(e)||N.isArray(e)}function fl(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function pl(e,t,n){return e?e.concat(t).map(function(o,s){return o=fl(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function a2(e){return N.isArray(e)&&!e.some(Di)}const c2=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function $o(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(m){if(m===null)return"";if(N.isDate(m))return m.toISOString();if(!l&&N.isBlob(m))throw new pe("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(m)||N.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,d,f){let p=m;if(m&&!f&&typeof m=="object"){if(N.endsWith(d,"{}"))d=r?d:d.slice(0,-2),m=JSON.stringify(m);else if(N.isArray(m)&&a2(m)||(N.isFileList(m)||N.endsWith(d,"[]"))&&(p=N.toArray(m)))return d=fl(d),p.forEach(function(g,E){!(N.isUndefined(g)||g===null)&&t.append(i===!0?pl([d],E,s):i===null?d:d+"[]",a(g))}),!1}return Di(m)?!0:(t.append(pl(f,d,s),a(m)),!1)}const h=[],b=Object.assign(c2,{defaultVisitor:u,convertValue:a,isVisitable:Di});function x(m,d){if(!N.isUndefined(m)){if(h.indexOf(m)!==-1)throw Error("Circular reference detected in "+d.join("."));h.push(m),N.forEach(m,function(p,y){(!(N.isUndefined(p)||p===null)&&o.call(t,p,N.isString(y)?y.trim():y,d,b))===!0&&x(p,d?d.concat(y):[y])}),h.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return x(e),t}function hl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ri(e,t){this._pairs=[],e&&$o(e,this,t)}const gl=Ri.prototype;gl.append=function(t,n){this._pairs.push([t,n])},gl.toString=function(t){const n=t?function(r){return t.call(this,r,hl)}:hl;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function l2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ml(e,t,n){if(!t)return e;const r=n&&n.encode||l2,o=n&&n.serialize;let s;if(o?s=o(t,n):s=N.isURLSearchParams(t)?t.toString():new Ri(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class u2{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 bl=u2,yl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},d2=typeof URLSearchParams<"u"?URLSearchParams:Ri,f2=typeof FormData<"u"?FormData:null,p2=typeof Blob<"u"?Blob:null,h2={isBrowser:!0,classes:{URLSearchParams:d2,FormData:f2,Blob:p2},protocols:["http","https","file","blob","url","data"]};const ki=typeof window<"u"&&typeof document<"u",Ni=typeof navigator=="object"&&navigator||void 0,g2=ki&&(!Ni||["ReactNative","NativeScript","NS"].indexOf(Ni.product)<0),m2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",b2=ki&&window.location.href||"http://localhost";var y2=Object.freeze({__proto__:null,hasBrowserEnv:ki,hasStandardBrowserWebWorkerEnv:m2,hasStandardBrowserEnv:g2,navigator:Ni,origin:b2}),lt={...y2,...h2};function v2(e,t){return $o(e,new lt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return lt.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function C2(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function I2(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 vl(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]=I2(o[i])),!c)}if(N.isFormData(e)&&N.isFunction(e.entries)){const n={};return N.forEachEntry(e,(r,o)=>{t(C2(r),o,n,0)}),n}return null}function x2(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 Pi={transitional:yl,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(vl(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 v2(t,this.formSerializer).toString();if((c=N.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return $o(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),x2(t)):t}],transformResponse:[function(t){const n=this.transitional||Pi.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:lt.classes.FormData,Blob:lt.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=>{Pi.headers[e]={}});var Mi=Pi;const E2=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 w2=e=>{const t={};let n,r,o;return e&&e.split(`
31
31
  `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&E2[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Cl=Symbol("internals");function ro(e){return e&&String(e).trim().toLowerCase()}function qo(e){return e===!1||e==null?e:N.isArray(e)?e.map(qo):String(e)}function A2(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 S2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Bi(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 T2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function _2(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 Ko{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(c,l,a){const u=ro(l);if(!u)throw new Error("header name must be a non-empty string");const h=N.findKey(o,u);(!h||o[h]===void 0||a===!0||a===void 0&&o[h]!==!1)&&(o[h||l]=qo(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())&&!S2(t))i(w2(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=ro(t),t){const r=N.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return A2(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=ro(t),t){const r=N.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Bi(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=ro(i),i){const c=N.findKey(r,i);c&&(!n||Bi(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||Bi(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]=qo(o),delete n[s];return}const c=t?T2(s):String(s).trim();c!==s&&delete n[s],n[c]=qo(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
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[Cl]=this[Cl]={accessors:{}}).accessors,o=this.prototype;function s(i){const c=ro(i);r[c]||(_2(o,i),r[c]=!0)}return N.isArray(t)?t.forEach(s):s(t),this}}Ko.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(Ko.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),N.freezeMethods(Ko);var kt=Ko;function ji(e,t){const n=this||Mi,r=t||n,o=kt.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 Il(e){return!!(e&&e.__CANCEL__)}function lr(e,t,n){pe.call(this,e??"canceled",pe.ERR_CANCELED,t,n),this.name="CanceledError"}N.inherits(lr,pe,{__CANCEL__:!0});function xl(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 O2(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function L2(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 h=s,b=0;for(;h!==o;)b+=n[h++],h=h%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),a-i<t)return;const x=u&&a-u;return x?Math.round(b*1e3/x):void 0}}function F2(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(),h=u-n;h>=r?i(a,u):(o=a,s||(s=setTimeout(()=>{s=null,i(o)},r-h)))},()=>o&&i(o)]}const es=(e,t,n=3)=>{let r=0;const o=L2(50,250);return F2(s=>{const i=s.loaded,c=s.lengthComputable?s.total:void 0,l=i-r,a=o(l),u=i<=c;r=i;const h={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(h)},n)},El=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},wl=e=>(...t)=>N.asap(()=>e(...t));var D2=lt.hasStandardBrowserEnv?function(){const t=lt.navigator&&/(msie|trident)/i.test(lt.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}}(),R2=lt.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 k2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function N2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Al(e,t){return e&&!k2(t)?N2(e,t):t}const Sl=e=>e instanceof kt?{...e}:e;function Pn(e,t){t=t||{};const n={};function r(a,u,h){return N.isPlainObject(a)&&N.isPlainObject(u)?N.merge.call({caseless:h},a,u):N.isPlainObject(u)?N.merge({},u):N.isArray(u)?u.slice():u}function o(a,u,h){if(N.isUndefined(u)){if(!N.isUndefined(a))return r(void 0,a,h)}else return r(a,u,h)}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,h){if(h in t)return r(a,u);if(h 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(Sl(a),Sl(u),!0)};return N.forEach(Object.keys(Object.assign({},e,t)),function(u){const h=l[u]||o,b=h(e[u],t[u],u);N.isUndefined(b)&&h!==c||(n[u]=b)}),n}var Tl=e=>{const t=Pn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;t.headers=i=kt.from(i),t.url=ml(Al(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(lt.hasStandardBrowserEnv||lt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[a,...u]=l?l.split(";").map(h=>h.trim()).filter(Boolean):[];i.setContentType([a||"multipart/form-data",...u].join("; "))}}if(lt.hasStandardBrowserEnv&&(r&&N.isFunction(r)&&(r=r(t)),r||r!==!1&&D2(t.url))){const a=o&&s&&R2.read(s);a&&i.set(o,a)}return t},P2=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Tl(e);let s=o.data;const i=kt.from(o.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:a}=o,u,h,b,x,m;function d(){x&&x(),m&&m(),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 p(){if(!f)return;const g=kt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),I={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:g,config:e,request:f};xl(function(A){n(A),d()},function(A){r(A),d()},I),f=null}"onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},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 E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const I=o.transitional||yl;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new pe(E,I.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&N.forEach(i.toJSON(),function(E,I){f.setRequestHeader(I,E)}),N.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),c&&c!=="json"&&(f.responseType=o.responseType),a&&([b,m]=es(a,!0),f.addEventListener("progress",b)),l&&f.upload&&([h,x]=es(l),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(u=g=>{f&&(r(!g||g.type?new lr(null,e,f):g),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const y=O2(o.url);if(y&&lt.protocols.indexOf(y)===-1){r(new pe("Unsupported protocol "+y+":",pe.ERR_BAD_REQUEST,e));return}f.send(s||null)})},M2=(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 lr(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 B2=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},j2=async function*(e,t){for await(const n of V2(e))yield*B2(n,t)},V2=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()}},_l=(e,t,n,r)=>{const o=j2(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 h=u.byteLength;if(n){let b=s+=h;n(b)}l.enqueue(new Uint8Array(u))}catch(a){throw c(a),a}},cancel(l){return c(l),o.return()}},{highWaterMark:2})},ts=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ol=ts&&typeof ReadableStream=="function",G2=ts&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ll=(e,...t)=>{try{return!!e(...t)}catch{return!1}},H2=Ol&&Ll(()=>{let e=!1;const t=new Request(lt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Fl=64*1024,Vi=Ol&&Ll(()=>N.isReadableStream(new Response("").body)),ns={stream:Vi&&(e=>e.body)};ts&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ns[t]&&(ns[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 W2=async e=>{if(e==null)return 0;if(N.isBlob(e))return e.size;if(N.isSpecCompliantForm(e))return(await new Request(lt.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 G2(e)).byteLength},Z2=async(e,t)=>{const n=N.toFiniteNumber(e.getContentLength());return n??W2(t)};var X2=ts&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:l,responseType:a,headers:u,withCredentials:h="same-origin",fetchOptions:b}=Tl(e);a=a?(a+"").toLowerCase():"text";let x=M2([o,s&&s.toAbortSignal()],i),m;const d=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let f;try{if(l&&H2&&n!=="get"&&n!=="head"&&(f=await Z2(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]=El(f,es(wl(l)));r=_l(I.body,Fl,A,S)}}N.isString(h)||(h=h?"include":"omit");const p="credentials"in Request.prototype;m=new Request(t,{...b,signal:x,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:p?h:void 0});let y=await fetch(m);const g=Vi&&(a==="stream"||a==="response");if(Vi&&(c||g&&d)){const I={};["status","statusText","headers"].forEach(_=>{I[_]=y[_]});const w=N.toFiniteNumber(y.headers.get("content-length")),[A,S]=c&&El(w,es(wl(c),!0))||[];y=new Response(_l(y.body,Fl,A,()=>{S&&S(),d&&d()}),I)}a=a||"text";let E=await ns[N.findKey(ns,a)||"text"](y,e);return!g&&d&&d(),await new Promise((I,w)=>{xl(I,w,{data:E,headers:kt.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:m})})}catch(p){throw d&&d(),p&&p.name==="TypeError"&&/fetch/i.test(p.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,e,m),{cause:p.cause||p}):pe.from(p,p&&p.code,e,m)}});const Gi={http:i2,xhr:P2,fetch:X2};N.forEach(Gi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Dl=e=>`- ${e}`,z2=e=>N.isFunction(e)||e===null||e===!1;var Rl={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,!z2(n)&&(r=Gi[(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
33
  `+s.map(Dl).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.1.0",
3
+ "version": "4.1.1-feedbackFix-beta.1",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",