@opencx/widget 3.0.89 → 3.0.90

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.
@@ -1,85 +0,0 @@
1
- "use strict";const st=require("./widget.ctx-RfaE5VPy.cjs");function Bn(t,n){for(var r=0;r<n.length;r++){const o=n[r];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in t)){const c=Object.getOwnPropertyDescriptor(o,i);c&&Object.defineProperty(t,i,c.get?c:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var mt={exports:{}},qe={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Jt;function zn(){if(Jt)return qe;Jt=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(o,i,c){var l=null;if(c!==void 0&&(l=""+c),i.key!==void 0&&(l=""+i.key),"key"in i){c={};for(var g in i)g!=="key"&&(c[g]=i[g])}else c=i;return i=c.ref,{$$typeof:t,type:o,key:l,ref:i!==void 0?i:null,props:c}}return qe.Fragment=n,qe.jsx=r,qe.jsxs=r,qe}var Fe={},wt={exports:{}},I={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Zt;function Gn(){if(Zt)return I;Zt=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.iterator;function m(a){return a===null||typeof a!="object"?null:(a=v&&a[v]||a["@@iterator"],typeof a=="function"?a:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,x={};function V(a,d,C){this.props=a,this.context=d,this.refs=x,this.updater=C||y}V.prototype.isReactComponent={},V.prototype.setState=function(a,d){if(typeof a!="object"&&typeof a!="function"&&a!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,d,"setState")},V.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function R(){}R.prototype=V.prototype;function fe(a,d,C){this.props=a,this.context=d,this.refs=x,this.updater=C||y}var B=fe.prototype=new R;B.constructor=fe,D(B,V.prototype),B.isPureReactComponent=!0;var W=Array.isArray,T={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function ie(a,d,C,A,M,H){return C=H.ref,{$$typeof:t,type:a,key:d,ref:C!==void 0?C:null,props:H}}function Y(a,d){return ie(a.type,d,void 0,void 0,void 0,a.props)}function z(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function re(a){var d={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(C){return d[C]})}var le=/\/+/g;function de(a,d){return typeof a=="object"&&a!==null&&a.key!=null?re(""+a.key):d.toString(36)}function oe(){}function ge(a){switch(a.status){case"fulfilled":return a.value;case"rejected":throw a.reason;default:switch(typeof a.status=="string"?a.then(oe,oe):(a.status="pending",a.then(function(d){a.status==="pending"&&(a.status="fulfilled",a.value=d)},function(d){a.status==="pending"&&(a.status="rejected",a.reason=d)})),a.status){case"fulfilled":return a.value;case"rejected":throw a.reason}}throw a}function ye(a,d,C,A,M){var H=typeof a;(H==="undefined"||H==="boolean")&&(a=null);var k=!1;if(a===null)k=!0;else switch(H){case"bigint":case"string":case"number":k=!0;break;case"object":switch(a.$$typeof){case t:case n:k=!0;break;case p:return k=a._init,ye(k(a._payload),d,C,A,M)}}if(k)return M=M(a),k=A===""?"."+de(a,0):A,W(M)?(C="",k!=null&&(C=k.replace(le,"$&/")+"/"),ye(M,d,C,"",function(je){return je})):M!=null&&(z(M)&&(M=Y(M,C+(M.key==null||a&&a.key===M.key?"":(""+M.key).replace(le,"$&/")+"/")+k)),d.push(M)),1;k=0;var pe=A===""?".":A+":";if(W(a))for(var te=0;te<a.length;te++)A=a[te],H=pe+de(A,te),k+=ye(A,d,C,H,M);else if(te=m(a),typeof te=="function")for(a=te.call(a),te=0;!(A=a.next()).done;)A=A.value,H=pe+de(A,te++),k+=ye(A,d,C,H,M);else if(H==="object"){if(typeof a.then=="function")return ye(ge(a),d,C,A,M);throw d=String(a),Error("Objects are not valid as a React child (found: "+(d==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":d)+"). If you meant to render a collection of children, use an array instead.")}return k}function Ee(a,d,C){if(a==null)return a;var A=[],M=0;return ye(a,A,"","",function(H){return d.call(C,H,M++)}),A}function Oe(a){if(a._status===-1){var d=a._result;d=d(),d.then(function(C){(a._status===0||a._status===-1)&&(a._status=1,a._result=C)},function(C){(a._status===0||a._status===-1)&&(a._status=2,a._result=C)}),a._status===-1&&(a._status=0,a._result=d)}if(a._status===1)return a._result.default;throw a._result}var be=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)};function G(){}return I.Children={map:Ee,forEach:function(a,d,C){Ee(a,function(){d.apply(this,arguments)},C)},count:function(a){var d=0;return Ee(a,function(){d++}),d},toArray:function(a){return Ee(a,function(d){return d})||[]},only:function(a){if(!z(a))throw Error("React.Children.only expected to receive a single React element child.");return a}},I.Component=V,I.Fragment=r,I.Profiler=i,I.PureComponent=fe,I.StrictMode=o,I.Suspense=S,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,I.act=function(){throw Error("act(...) is not supported in production builds of React.")},I.cache=function(a){return function(){return a.apply(null,arguments)}},I.cloneElement=function(a,d,C){if(a==null)throw Error("The argument must be a React element, but you passed "+a+".");var A=D({},a.props),M=a.key,H=void 0;if(d!=null)for(k in d.ref!==void 0&&(H=void 0),d.key!==void 0&&(M=""+d.key),d)!$.call(d,k)||k==="key"||k==="__self"||k==="__source"||k==="ref"&&d.ref===void 0||(A[k]=d[k]);var k=arguments.length-2;if(k===1)A.children=C;else if(1<k){for(var pe=Array(k),te=0;te<k;te++)pe[te]=arguments[te+2];A.children=pe}return ie(a.type,M,void 0,void 0,H,A)},I.createContext=function(a){return a={$$typeof:l,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null},a.Provider=a,a.Consumer={$$typeof:c,_context:a},a},I.createElement=function(a,d,C){var A,M={},H=null;if(d!=null)for(A in d.key!==void 0&&(H=""+d.key),d)$.call(d,A)&&A!=="key"&&A!=="__self"&&A!=="__source"&&(M[A]=d[A]);var k=arguments.length-2;if(k===1)M.children=C;else if(1<k){for(var pe=Array(k),te=0;te<k;te++)pe[te]=arguments[te+2];M.children=pe}if(a&&a.defaultProps)for(A in k=a.defaultProps,k)M[A]===void 0&&(M[A]=k[A]);return ie(a,H,void 0,void 0,null,M)},I.createRef=function(){return{current:null}},I.forwardRef=function(a){return{$$typeof:g,render:a}},I.isValidElement=z,I.lazy=function(a){return{$$typeof:p,_payload:{_status:-1,_result:a},_init:Oe}},I.memo=function(a,d){return{$$typeof:h,type:a,compare:d===void 0?null:d}},I.startTransition=function(a){var d=T.T,C={};T.T=C;try{var A=a(),M=T.S;M!==null&&M(C,A),typeof A=="object"&&A!==null&&typeof A.then=="function"&&A.then(G,be)}catch(H){be(H)}finally{T.T=d}},I.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},I.use=function(a){return T.H.use(a)},I.useActionState=function(a,d,C){return T.H.useActionState(a,d,C)},I.useCallback=function(a,d){return T.H.useCallback(a,d)},I.useContext=function(a){return T.H.useContext(a)},I.useDebugValue=function(){},I.useDeferredValue=function(a,d){return T.H.useDeferredValue(a,d)},I.useEffect=function(a,d){return T.H.useEffect(a,d)},I.useId=function(){return T.H.useId()},I.useImperativeHandle=function(a,d,C){return T.H.useImperativeHandle(a,d,C)},I.useInsertionEffect=function(a,d){return T.H.useInsertionEffect(a,d)},I.useLayoutEffect=function(a,d){return T.H.useLayoutEffect(a,d)},I.useMemo=function(a,d){return T.H.useMemo(a,d)},I.useOptimistic=function(a,d){return T.H.useOptimistic(a,d)},I.useReducer=function(a,d,C){return T.H.useReducer(a,d,C)},I.useRef=function(a){return T.H.useRef(a)},I.useState=function(a){return T.H.useState(a)},I.useSyncExternalStore=function(a,d,C){return T.H.useSyncExternalStore(a,d,C)},I.useTransition=function(){return T.H.useTransition()},I.version="19.0.0",I}var ze={exports:{}};/**
18
- * @license React
19
- * react.development.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */ze.exports;var en;function Kn(){return en||(en=1,function(t,n){process.env.NODE_ENV!=="production"&&function(){function r(e,u){Object.defineProperty(c.prototype,e,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",u[0],u[1])}})}function o(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}function i(e,u){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var f=e+"."+u;_e[f]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",u,e),_e[f]=!0)}function c(e,u,f){this.props=e,this.context=u,this.refs=w,this.updater=f||s}function l(){}function g(e,u,f){this.props=e,this.context=u,this.refs=w,this.updater=f||s}function S(e){return""+e}function h(e){try{S(e);var u=!1}catch{u=!0}if(u){u=console;var f=u.error,E=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return f.call(u,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",E),S(e)}}function p(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===L?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case te:return"Fragment";case pe:return"Portal";case Re:return"Profiler";case je:return"StrictMode";case ne:return"Suspense";case Z:return"SuspenseList"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case q:return(e.displayName||"Context")+".Provider";case Ne:return(e._context.displayName||"Context")+".Consumer";case F:var u=e.render;return e=e.displayName,e||(e=u.displayName||u.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ce:return u=e.displayName||null,u!==null?u:p(e.type)||"Memo";case he:u=e._payload,e=e._init;try{return p(e(u))}catch{}}return null}function v(e){return typeof e=="string"||typeof e=="function"||e===te||e===Re||e===je||e===ne||e===Z||e===se||typeof e=="object"&&e!==null&&(e.$$typeof===he||e.$$typeof===ce||e.$$typeof===q||e.$$typeof===Ne||e.$$typeof===F||e.$$typeof===ve||e.getModuleId!==void 0)}function m(){}function y(){if(Se===0){De=console.log,Ae=console.info,We=console.warn,Ce=console.error,$t=console.group,Wt=console.groupCollapsed,Yt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:m,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Se++}function D(){if(Se--,Se===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:De}),info:_({},e,{value:Ae}),warn:_({},e,{value:We}),error:_({},e,{value:Ce}),group:_({},e,{value:$t}),groupCollapsed:_({},e,{value:Wt}),groupEnd:_({},e,{value:Yt})})}0>Se&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function x(e){if(at===void 0)try{throw Error()}catch(f){var u=f.stack.trim().match(/\n( *(at )?)/);at=u&&u[1]||"",Vt=-1<f.stack.indexOf(`
26
- at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
27
- `+at+e+Vt}function V(e,u){if(!e||ct)return"";var f=ft.get(e);if(f!==void 0)return f;ct=!0,f=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var E=null;E=N.H,N.H=null,y();try{var b={DetermineComponentFrameRoot:function(){try{if(u){var Pe=function(){throw Error()};if(Object.defineProperty(Pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pe,[])}catch(ke){var et=ke}Reflect.construct(e,[],Pe)}else{try{Pe.call()}catch(ke){et=ke}e.call(Pe.prototype)}}else{try{throw Error()}catch(ke){et=ke}(Pe=e())&&typeof Pe.catch=="function"&&Pe.catch(function(){})}}catch(ke){if(ke&&et&&typeof ke.stack=="string")return[ke.stack,et.stack]}return[null,null]}};b.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var j=Object.getOwnPropertyDescriptor(b.DetermineComponentFrameRoot,"name");j&&j.configurable&&Object.defineProperty(b.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=b.DetermineComponentFrameRoot(),ee=O[0],J=O[1];if(ee&&J){var ue=ee.split(`
28
- `),me=J.split(`
29
- `);for(O=j=0;j<ue.length&&!ue[j].includes("DetermineComponentFrameRoot");)j++;for(;O<me.length&&!me[O].includes("DetermineComponentFrameRoot");)O++;if(j===ue.length||O===me.length)for(j=ue.length-1,O=me.length-1;1<=j&&0<=O&&ue[j]!==me[O];)O--;for(;1<=j&&0<=O;j--,O--)if(ue[j]!==me[O]){if(j!==1||O!==1)do if(j--,O--,0>O||ue[j]!==me[O]){var Ye=`
30
- `+ue[j].replace(" at new "," at ");return e.displayName&&Ye.includes("<anonymous>")&&(Ye=Ye.replace("<anonymous>",e.displayName)),typeof e=="function"&&ft.set(e,Ye),Ye}while(1<=j&&0<=O);break}}}finally{ct=!1,N.H=E,D(),Error.prepareStackTrace=f}return ue=(ue=e?e.displayName||e.name:"")?x(ue):"",typeof e=="function"&&ft.set(e,ue),ue}function R(e){if(e==null)return"";if(typeof e=="function"){var u=e.prototype;return V(e,!(!u||!u.isReactComponent))}if(typeof e=="string")return x(e);switch(e){case ne:return x("Suspense");case Z:return x("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case F:return e=V(e.render,!1),e;case ce:return R(e.type);case he:u=e._payload,e=e._init;try{return R(e(u))}catch{}}return""}function fe(){var e=N.A;return e===null?null:e.getOwner()}function B(e){if(Te.call(e,"key")){var u=Object.getOwnPropertyDescriptor(e,"key").get;if(u&&u.isReactWarning)return!1}return e.key!==void 0}function W(e,u){function f(){Ht||(Ht=!0,console.error("%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://react.dev/link/special-props)",u))}f.isReactWarning=!0,Object.defineProperty(e,"key",{get:f,configurable:!0})}function T(){var e=p(this.type);return Ft[e]||(Ft[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function $(e,u,f,E,b,j){return f=j.ref,e={$$typeof:k,type:e,key:u,props:j,_owner:b},(f!==void 0?f:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:T}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function ie(e,u){return u=$(e.type,u,void 0,void 0,e._owner,e.props),u._store.validated=e._store.validated,u}function Y(e,u){if(typeof e=="object"&&e&&e.$$typeof!==Fn){if(K(e))for(var f=0;f<e.length;f++){var E=e[f];z(E)&&re(E,u)}else if(z(e))e._store&&(e._store.validated=1);else if(f=o(e),typeof f=="function"&&f!==e.entries&&(f=f.call(e),f!==e))for(;!(e=f.next()).done;)z(e.value)&&re(e.value,u)}}function z(e){return typeof e=="object"&&e!==null&&e.$$typeof===k}function re(e,u){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,u=le(u),!Bt[u])){Bt[u]=!0;var f="";e&&e._owner!=null&&e._owner!==fe()&&(f=null,typeof e._owner.tag=="number"?f=p(e._owner.type):typeof e._owner.name=="string"&&(f=e._owner.name),f=" It was passed a child from "+f+".");var E=N.getCurrentStack;N.getCurrentStack=function(){var b=R(e.type);return E&&(b+=E()||""),b},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',u,f),N.getCurrentStack=E}}function le(e){var u="",f=fe();return f&&(f=p(f.type))&&(u=`
31
-
32
- Check the render method of \``+f+"`."),u||(e=p(e))&&(u=`
33
-
34
- Check the top-level render call using <`+e+">."),u}function de(e){var u={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(f){return u[f]})}function oe(e,u){return typeof e=="object"&&e!==null&&e.key!=null?(h(e.key),de(""+e.key)):u.toString(36)}function ge(){}function ye(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(ge,ge):(e.status="pending",e.then(function(u){e.status==="pending"&&(e.status="fulfilled",e.value=u)},function(u){e.status==="pending"&&(e.status="rejected",e.reason=u)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ee(e,u,f,E,b){var j=typeof e;(j==="undefined"||j==="boolean")&&(e=null);var O=!1;if(e===null)O=!0;else switch(j){case"bigint":case"string":case"number":O=!0;break;case"object":switch(e.$$typeof){case k:case pe:O=!0;break;case he:return O=e._init,Ee(O(e._payload),u,f,E,b)}}if(O){O=e,b=b(O);var ee=E===""?"."+oe(O,0):E;return K(b)?(f="",ee!=null&&(f=ee.replace(Gt,"$&/")+"/"),Ee(b,u,f,"",function(ue){return ue})):b!=null&&(z(b)&&(b.key!=null&&(O&&O.key===b.key||h(b.key)),f=ie(b,f+(b.key==null||O&&O.key===b.key?"":(""+b.key).replace(Gt,"$&/")+"/")+ee),E!==""&&O!=null&&z(O)&&O.key==null&&O._store&&!O._store.validated&&(f._store.validated=2),b=f),u.push(b)),1}if(O=0,ee=E===""?".":E+":",K(e))for(var J=0;J<e.length;J++)E=e[J],j=ee+oe(E,J),O+=Ee(E,u,f,j,b);else if(J=o(e),typeof J=="function")for(J===e.entries&&(zt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),zt=!0),e=J.call(e),J=0;!(E=e.next()).done;)E=E.value,j=ee+oe(E,J++),O+=Ee(E,u,f,j,b);else if(j==="object"){if(typeof e.then=="function")return Ee(ye(e),u,f,E,b);throw u=String(e),Error("Objects are not valid as a React child (found: "+(u==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":u)+"). If you meant to render a collection of children, use an array instead.")}return O}function Oe(e,u,f){if(e==null)return e;var E=[],b=0;return Ee(e,E,"","",function(j){return u.call(f,j,b++)}),E}function be(e){if(e._status===-1){var u=e._result;u=u(),u.then(function(f){(e._status===0||e._status===-1)&&(e._status=1,e._result=f)},function(f){(e._status===0||e._status===-1)&&(e._status=2,e._result=f)}),e._status===-1&&(e._status=0,e._result=u)}if(e._status===1)return u=e._result,u===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
35
-
36
- Your code should look like:
37
- const MyComponent = lazy(() => import('./MyComponent'))
38
-
39
- Did you accidentally put curly braces around the import?`,u),"default"in u||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
40
-
41
- Your code should look like:
42
- const MyComponent = lazy(() => import('./MyComponent'))`,u),u.default;throw e._result}function G(){var e=N.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
43
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
44
- 2. You might be breaking the Rules of Hooks
45
- 3. You might have more than one copy of React in the same app
46
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function a(){}function d(e){if(Qe===null)try{var u=("require"+Math.random()).slice(0,7);Qe=(t&&t[u]).call(t,"timers").setImmediate}catch{Qe=function(E){Xt===!1&&(Xt=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var b=new MessageChannel;b.port1.onmessage=E,b.port2.postMessage(void 0)}}return Qe(e)}function C(e){return 1<e.length&&typeof AggregateError=="function"?new AggregateError(e):e[0]}function A(e,u){u!==Je-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Je=u}function M(e,u,f){var E=N.actQueue;if(E!==null)if(E.length!==0)try{H(E),d(function(){return M(e,u,f)});return}catch(b){N.thrownErrors.push(b)}else N.actQueue=null;0<N.thrownErrors.length?(E=C(N.thrownErrors),N.thrownErrors.length=0,f(E)):u(e)}function H(e){if(!lt){lt=!0;var u=0;try{for(;u<e.length;u++){var f=e[u];do{N.didUsePromise=!1;var E=f(!1);if(E!==null){if(N.didUsePromise){e[u]=f,e.splice(0,u);return}f=E}else break}while(!0)}e.length=0}catch(b){e.splice(0,u+1),N.thrownErrors.push(b)}finally{lt=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var k=Symbol.for("react.transitional.element"),pe=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),je=Symbol.for("react.strict_mode"),Re=Symbol.for("react.profiler"),Ne=Symbol.for("react.consumer"),q=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),ae=Symbol.iterator,_e={},s={isMounted:function(){return!1},enqueueForceUpdate:function(e){i(e,"forceUpdate")},enqueueReplaceState:function(e){i(e,"replaceState")},enqueueSetState:function(e){i(e,"setState")}},_=Object.assign,w={};Object.freeze(w),c.prototype.isReactComponent={},c.prototype.setState=function(e,u){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,u,"setState")},c.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var P={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Q;for(Q in P)P.hasOwnProperty(Q)&&r(Q,P[Q]);l.prototype=c.prototype,P=g.prototype=new l,P.constructor=g,_(P,c.prototype),P.isPureReactComponent=!0;var K=Array.isArray,L=Symbol.for("react.client.reference"),N={H:null,A:null,T:null,S:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null},Te=Object.prototype.hasOwnProperty,ve=Symbol.for("react.client.reference"),Se=0,De,Ae,We,Ce,$t,Wt,Yt;m.__reactDisabledLog=!0;var at,Vt,ct=!1,ft=new(typeof WeakMap=="function"?WeakMap:Map),Fn=Symbol.for("react.client.reference"),Ht,qt,Ft={},Bt={},zt=!1,Gt=/\/+/g,Kt=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Xt=!1,Qe=null,Je=0,Ze=!1,lt=!1,Qt=typeof queueMicrotask=="function"?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:d;n.Children={map:Oe,forEach:function(e,u,f){Oe(e,function(){u.apply(this,arguments)},f)},count:function(e){var u=0;return Oe(e,function(){u++}),u},toArray:function(e){return Oe(e,function(u){return u})||[]},only:function(e){if(!z(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},n.Component=c,n.Fragment=te,n.Profiler=Re,n.PureComponent=g,n.StrictMode=je,n.Suspense=ne,n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,n.act=function(e){var u=N.actQueue,f=Je;Je++;var E=N.actQueue=u!==null?u:[],b=!1;try{var j=e()}catch(J){N.thrownErrors.push(J)}if(0<N.thrownErrors.length)throw A(u,f),e=C(N.thrownErrors),N.thrownErrors.length=0,e;if(j!==null&&typeof j=="object"&&typeof j.then=="function"){var O=j;return Qt(function(){b||Ze||(Ze=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(J,ue){b=!0,O.then(function(me){if(A(u,f),f===0){try{H(E),d(function(){return M(me,J,ue)})}catch(Pe){N.thrownErrors.push(Pe)}if(0<N.thrownErrors.length){var Ye=C(N.thrownErrors);N.thrownErrors.length=0,ue(Ye)}}else J(me)},function(me){A(u,f),0<N.thrownErrors.length&&(me=C(N.thrownErrors),N.thrownErrors.length=0),ue(me)})}}}var ee=j;if(A(u,f),f===0&&(H(E),E.length!==0&&Qt(function(){b||Ze||(Ze=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),N.actQueue=null),0<N.thrownErrors.length)throw e=C(N.thrownErrors),N.thrownErrors.length=0,e;return{then:function(J,ue){b=!0,f===0?(N.actQueue=E,d(function(){return M(ee,J,ue)})):J(ee)}}},n.cache=function(e){return function(){return e.apply(null,arguments)}},n.cloneElement=function(e,u,f){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var E=_({},e.props),b=e.key,j=e._owner;if(u!=null){var O;e:{if(Te.call(u,"ref")&&(O=Object.getOwnPropertyDescriptor(u,"ref").get)&&O.isReactWarning){O=!1;break e}O=u.ref!==void 0}O&&(j=fe()),B(u)&&(h(u.key),b=""+u.key);for(ee in u)!Te.call(u,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&u.ref===void 0||(E[ee]=u[ee])}var ee=arguments.length-2;if(ee===1)E.children=f;else if(1<ee){O=Array(ee);for(var J=0;J<ee;J++)O[J]=arguments[J+2];E.children=O}for(E=$(e.type,b,void 0,void 0,j,E),b=2;b<arguments.length;b++)Y(arguments[b],E.type);return E},n.createContext=function(e){return e={$$typeof:q,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Ne,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},n.createElement=function(e,u,f){if(v(e))for(var E=2;E<arguments.length;E++)Y(arguments[E],e);else{if(E="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null)var b="null";else K(e)?b="array":e!==void 0&&e.$$typeof===k?(b="<"+(p(e.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e;console.error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,E)}var j;if(E={},b=null,u!=null)for(j in qt||!("__self"in u)||"key"in u||(qt=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),B(u)&&(h(u.key),b=""+u.key),u)Te.call(u,j)&&j!=="key"&&j!=="__self"&&j!=="__source"&&(E[j]=u[j]);var O=arguments.length-2;if(O===1)E.children=f;else if(1<O){for(var ee=Array(O),J=0;J<O;J++)ee[J]=arguments[J+2];Object.freeze&&Object.freeze(ee),E.children=ee}if(e&&e.defaultProps)for(j in O=e.defaultProps,O)E[j]===void 0&&(E[j]=O[j]);return b&&W(E,typeof e=="function"?e.displayName||e.name||"Unknown":e),$(e,b,void 0,void 0,fe(),E)},n.createRef=function(){var e={current:null};return Object.seal(e),e},n.forwardRef=function(e){e!=null&&e.$$typeof===ce?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?console.error("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&e.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var u={$$typeof:F,render:e},f;return Object.defineProperty(u,"displayName",{enumerable:!1,configurable:!0,get:function(){return f},set:function(E){f=E,e.name||e.displayName||(Object.defineProperty(e,"name",{value:E}),e.displayName=E)}}),u},n.isValidElement=z,n.lazy=function(e){return{$$typeof:he,_payload:{_status:-1,_result:e},_init:be}},n.memo=function(e,u){v(e)||console.error("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e),u={$$typeof:ce,type:e,compare:u===void 0?null:u};var f;return Object.defineProperty(u,"displayName",{enumerable:!1,configurable:!0,get:function(){return f},set:function(E){f=E,e.name||e.displayName||(Object.defineProperty(e,"name",{value:E}),e.displayName=E)}}),u},n.startTransition=function(e){var u=N.T,f={};N.T=f,f._updatedFibers=new Set;try{var E=e(),b=N.S;b!==null&&b(f,E),typeof E=="object"&&E!==null&&typeof E.then=="function"&&E.then(a,Kt)}catch(j){Kt(j)}finally{u===null&&f._updatedFibers&&(e=f._updatedFibers.size,f._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),N.T=u}},n.unstable_useCacheRefresh=function(){return G().useCacheRefresh()},n.use=function(e){return G().use(e)},n.useActionState=function(e,u,f){return G().useActionState(e,u,f)},n.useCallback=function(e,u){return G().useCallback(e,u)},n.useContext=function(e){var u=G();return e.$$typeof===Ne&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),u.useContext(e)},n.useDebugValue=function(e,u){return G().useDebugValue(e,u)},n.useDeferredValue=function(e,u){return G().useDeferredValue(e,u)},n.useEffect=function(e,u){return G().useEffect(e,u)},n.useId=function(){return G().useId()},n.useImperativeHandle=function(e,u,f){return G().useImperativeHandle(e,u,f)},n.useInsertionEffect=function(e,u){return G().useInsertionEffect(e,u)},n.useLayoutEffect=function(e,u){return G().useLayoutEffect(e,u)},n.useMemo=function(e,u){return G().useMemo(e,u)},n.useOptimistic=function(e,u){return G().useOptimistic(e,u)},n.useReducer=function(e,u,f){return G().useReducer(e,u,f)},n.useRef=function(e){return G().useRef(e)},n.useState=function(e){return G().useState(e)},n.useSyncExternalStore=function(e,u,f){return G().useSyncExternalStore(e,u,f)},n.useTransition=function(){return G().useTransition()},n.version="19.0.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()}(ze,ze.exports)),ze.exports}process.env.NODE_ENV==="production"?wt.exports=Gn():wt.exports=Kn();var U=wt.exports;const Xe=st.getDefaultExportFromCjs(U),Xn=Bn({__proto__:null,default:Xe},[U]);/**
47
- * @license React
48
- * react-jsx-runtime.development.js
49
- *
50
- * Copyright (c) Meta Platforms, Inc. and affiliates.
51
- *
52
- * This source code is licensed under the MIT license found in the
53
- * LICENSE file in the root directory of this source tree.
54
- */var tn;function Qn(){return tn||(tn=1,process.env.NODE_ENV!=="production"&&function(){function t(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===be?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case $:return"Fragment";case T:return"Portal";case Y:return"Profiler";case ie:return"StrictMode";case de:return"Suspense";case oe:return"SuspenseList"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case re:return(s.displayName||"Context")+".Provider";case z:return(s._context.displayName||"Context")+".Consumer";case le:var _=s.render;return s=s.displayName,s||(s=_.displayName||_.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case ge:return _=s.displayName||null,_!==null?_:t(s.type)||"Memo";case ye:_=s._payload,s=s._init;try{return t(s(_))}catch{}}return null}function n(s){return""+s}function r(s){try{n(s);var _=!1}catch{_=!0}if(_){_=console;var w=_.error,P=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return w.call(_,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",P),n(s)}}function o(){}function i(){if(M===0){H=console.log,k=console.info,pe=console.warn,te=console.error,je=console.group,Re=console.groupCollapsed,Ne=console.groupEnd;var s={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}M++}function c(){if(M--,M===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:d({},s,{value:H}),info:d({},s,{value:k}),warn:d({},s,{value:pe}),error:d({},s,{value:te}),group:d({},s,{value:je}),groupCollapsed:d({},s,{value:Re}),groupEnd:d({},s,{value:Ne})})}0>M&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function l(s){if(q===void 0)try{throw Error()}catch(w){var _=w.stack.trim().match(/\n( *(at )?)/);q=_&&_[1]||"",F=-1<w.stack.indexOf(`
55
- at`)?" (<anonymous>)":-1<w.stack.indexOf("@")?"@unknown:0:0":""}return`
56
- `+q+s+F}function g(s,_){if(!s||ne)return"";var w=Z.get(s);if(w!==void 0)return w;ne=!0,w=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var P=null;P=G.H,G.H=null,i();try{var Q={DetermineComponentFrameRoot:function(){try{if(_){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(Ce){var We=Ce}Reflect.construct(s,[],Ae)}else{try{Ae.call()}catch(Ce){We=Ce}s.call(Ae.prototype)}}else{try{throw Error()}catch(Ce){We=Ce}(Ae=s())&&typeof Ae.catch=="function"&&Ae.catch(function(){})}}catch(Ce){if(Ce&&We&&typeof Ce.stack=="string")return[Ce.stack,We.stack]}return[null,null]}};Q.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var K=Object.getOwnPropertyDescriptor(Q.DetermineComponentFrameRoot,"name");K&&K.configurable&&Object.defineProperty(Q.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var L=Q.DetermineComponentFrameRoot(),N=L[0],Te=L[1];if(N&&Te){var ve=N.split(`
57
- `),Se=Te.split(`
58
- `);for(L=K=0;K<ve.length&&!ve[K].includes("DetermineComponentFrameRoot");)K++;for(;L<Se.length&&!Se[L].includes("DetermineComponentFrameRoot");)L++;if(K===ve.length||L===Se.length)for(K=ve.length-1,L=Se.length-1;1<=K&&0<=L&&ve[K]!==Se[L];)L--;for(;1<=K&&0<=L;K--,L--)if(ve[K]!==Se[L]){if(K!==1||L!==1)do if(K--,L--,0>L||ve[K]!==Se[L]){var De=`
59
- `+ve[K].replace(" at new "," at ");return s.displayName&&De.includes("<anonymous>")&&(De=De.replace("<anonymous>",s.displayName)),typeof s=="function"&&Z.set(s,De),De}while(1<=K&&0<=L);break}}}finally{ne=!1,G.H=P,c(),Error.prepareStackTrace=w}return ve=(ve=s?s.displayName||s.name:"")?l(ve):"",typeof s=="function"&&Z.set(s,ve),ve}function S(s){if(s==null)return"";if(typeof s=="function"){var _=s.prototype;return g(s,!(!_||!_.isReactComponent))}if(typeof s=="string")return l(s);switch(s){case de:return l("Suspense");case oe:return l("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case le:return s=g(s.render,!1),s;case ge:return S(s.type);case ye:_=s._payload,s=s._init;try{return S(s(_))}catch{}}return""}function h(){var s=G.A;return s===null?null:s.getOwner()}function p(s){if(a.call(s,"key")){var _=Object.getOwnPropertyDescriptor(s,"key").get;if(_&&_.isReactWarning)return!1}return s.key!==void 0}function v(s,_){function w(){he||(he=!0,console.error("%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://react.dev/link/special-props)",_))}w.isReactWarning=!0,Object.defineProperty(s,"key",{get:w,configurable:!0})}function m(){var s=t(this.type);return se[s]||(se[s]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),s=this.props.ref,s!==void 0?s:null}function y(s,_,w,P,Q,K){return w=K.ref,s={$$typeof:W,type:s,key:_,props:K,_owner:Q},(w!==void 0?w:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:m}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function D(s,_,w,P,Q,K){if(typeof s=="string"||typeof s=="function"||s===$||s===Y||s===ie||s===de||s===oe||s===Ee||typeof s=="object"&&s!==null&&(s.$$typeof===ye||s.$$typeof===ge||s.$$typeof===re||s.$$typeof===z||s.$$typeof===le||s.$$typeof===C||s.getModuleId!==void 0)){var L=_.children;if(L!==void 0)if(P)if(A(L)){for(P=0;P<L.length;P++)x(L[P],s);Object.freeze&&Object.freeze(L)}else console.error("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 x(L,s)}else L="",(s===void 0||typeof s=="object"&&s!==null&&Object.keys(s).length===0)&&(L+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),s===null?P="null":A(s)?P="array":s!==void 0&&s.$$typeof===W?(P="<"+(t(s.type)||"Unknown")+" />",L=" Did you accidentally export a JSX literal instead of a component?"):P=typeof s,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",P,L);if(a.call(_,"key")){L=t(s);var N=Object.keys(_).filter(function(ve){return ve!=="key"});P=0<N.length?"{key: someKey, "+N.join(": ..., ")+": ...}":"{key: someKey}",ae[L+P]||(N=0<N.length?"{"+N.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
60
- let props = %s;
61
- <%s {...props} />
62
- React keys must be passed directly to JSX without using spread:
63
- let props = %s;
64
- <%s key={someKey} {...props} />`,P,L,N,L),ae[L+P]=!0)}if(L=null,w!==void 0&&(r(w),L=""+w),p(_)&&(r(_.key),L=""+_.key),"key"in _){w={};for(var Te in _)Te!=="key"&&(w[Te]=_[Te])}else w=_;return L&&v(w,typeof s=="function"?s.displayName||s.name||"Unknown":s),y(s,L,K,Q,h(),w)}function x(s,_){if(typeof s=="object"&&s&&s.$$typeof!==ce){if(A(s))for(var w=0;w<s.length;w++){var P=s[w];V(P)&&R(P,_)}else if(V(s))s._store&&(s._store.validated=1);else if(s===null||typeof s!="object"?w=null:(w=Oe&&s[Oe]||s["@@iterator"],w=typeof w=="function"?w:null),typeof w=="function"&&w!==s.entries&&(w=w.call(s),w!==s))for(;!(s=w.next()).done;)V(s.value)&&R(s.value,_)}}function V(s){return typeof s=="object"&&s!==null&&s.$$typeof===W}function R(s,_){if(s._store&&!s._store.validated&&s.key==null&&(s._store.validated=1,_=fe(_),!_e[_])){_e[_]=!0;var w="";s&&s._owner!=null&&s._owner!==h()&&(w=null,typeof s._owner.tag=="number"?w=t(s._owner.type):typeof s._owner.name=="string"&&(w=s._owner.name),w=" It was passed a child from "+w+".");var P=G.getCurrentStack;G.getCurrentStack=function(){var Q=S(s.type);return P&&(Q+=P()||""),Q},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',_,w),G.getCurrentStack=P}}function fe(s){var _="",w=h();return w&&(w=t(w.type))&&(_=`
65
-
66
- Check the render method of \``+w+"`."),_||(s=t(s))&&(_=`
67
-
68
- Check the top-level render call using <`+s+">."),_}var B=U,W=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),re=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),ye=Symbol.for("react.lazy"),Ee=Symbol.for("react.offscreen"),Oe=Symbol.iterator,be=Symbol.for("react.client.reference"),G=B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,a=Object.prototype.hasOwnProperty,d=Object.assign,C=Symbol.for("react.client.reference"),A=Array.isArray,M=0,H,k,pe,te,je,Re,Ne;o.__reactDisabledLog=!0;var q,F,ne=!1,Z=new(typeof WeakMap=="function"?WeakMap:Map),ce=Symbol.for("react.client.reference"),he,se={},ae={},_e={};Fe.Fragment=$,Fe.jsx=function(s,_,w,P,Q){return D(s,_,w,!1,P,Q)},Fe.jsxs=function(s,_,w,P,Q){return D(s,_,w,!0,P,Q)}}()),Fe}process.env.NODE_ENV==="production"?mt.exports=zn():mt.exports=Qn();var Nt=mt.exports,bt=function(t,n){return bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},bt(t,n)};function fn(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");bt(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}exports.__assign=function(){return exports.__assign=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(n[c]=r[c])}return n},exports.__assign.apply(this,arguments)};function Pt(t,n){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(t);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(r[o[i]]=t[o[i]]);return r}function ln(t,n,r,o){var i=arguments.length,c=i<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,r):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,n,r,o);else for(var g=t.length-1;g>=0;g--)(l=t[g])&&(c=(i<3?l(c):i>3?l(n,r,c):l(n,r))||c);return i>3&&c&&Object.defineProperty(n,r,c),c}function dn(t,n){return function(r,o){n(r,o,t)}}function pn(t,n,r,o,i,c){function l(R){if(R!==void 0&&typeof R!="function")throw new TypeError("Function expected");return R}for(var g=o.kind,S=g==="getter"?"get":g==="setter"?"set":"value",h=!n&&t?o.static?t:t.prototype:null,p=n||(h?Object.getOwnPropertyDescriptor(h,o.name):{}),v,m=!1,y=r.length-1;y>=0;y--){var D={};for(var x in o)D[x]=x==="access"?{}:o[x];for(var x in o.access)D.access[x]=o.access[x];D.addInitializer=function(R){if(m)throw new TypeError("Cannot add initializers after decoration has completed");c.push(l(R||null))};var V=(0,r[y])(g==="accessor"?{get:p.get,set:p.set}:p[S],D);if(g==="accessor"){if(V===void 0)continue;if(V===null||typeof V!="object")throw new TypeError("Object expected");(v=l(V.get))&&(p.get=v),(v=l(V.set))&&(p.set=v),(v=l(V.init))&&i.unshift(v)}else(v=l(V))&&(g==="field"?i.unshift(v):p[S]=v)}h&&Object.defineProperty(h,o.name,p),m=!0}function vn(t,n,r){for(var o=arguments.length>2,i=0;i<n.length;i++)r=o?n[i].call(t,r):n[i].call(t);return o?r:void 0}function En(t){return typeof t=="symbol"?t:"".concat(t)}function gn(t,n,r){return typeof n=="symbol"&&(n=n.description?"[".concat(n.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",n):n})}function hn(t,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,n)}function xt(t,n,r,o){function i(c){return c instanceof r?c:new r(function(l){l(c)})}return new(r||(r=Promise))(function(c,l){function g(p){try{h(o.next(p))}catch(v){l(v)}}function S(p){try{h(o.throw(p))}catch(v){l(v)}}function h(p){p.done?c(p.value):i(p.value).then(g,S)}h((o=o.apply(t,n||[])).next())})}function _n(t,n){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,i,c,l=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return l.next=g(0),l.throw=g(1),l.return=g(2),typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function g(h){return function(p){return S([h,p])}}function S(h){if(o)throw new TypeError("Generator is already executing.");for(;l&&(l=0,h[0]&&(r=0)),r;)try{if(o=1,i&&(c=h[0]&2?i.return:h[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,h[1])).done)return c;switch(i=0,c&&(h=[h[0]&2,c.value]),h[0]){case 0:case 1:c=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,i=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!c||h[1]>c[0]&&h[1]<c[3])){r.label=h[1];break}if(h[0]===6&&r.label<c[1]){r.label=c[1],c=h;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(h);break}c[2]&&r.ops.pop(),r.trys.pop();continue}h=n.call(t,r)}catch(p){h=[6,p],i=0}finally{o=c=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}var ut=Object.create?function(t,n,r,o){o===void 0&&(o=r);var i=Object.getOwnPropertyDescriptor(n,r);(!i||("get"in i?!n.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,o,i)}:function(t,n,r,o){o===void 0&&(o=r),t[o]=n[r]};function yn(t,n){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&ut(n,t,r)}function ot(t){var n=typeof Symbol=="function"&&Symbol.iterator,r=n&&t[n],o=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function kt(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),i,c=[],l;try{for(;(n===void 0||n-- >0)&&!(i=o.next()).done;)c.push(i.value)}catch(g){l={error:g}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(l)throw l.error}}return c}function mn(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(kt(arguments[n]));return t}function wn(){for(var t=0,n=0,r=arguments.length;n<r;n++)t+=arguments[n].length;for(var o=Array(t),i=0,n=0;n<r;n++)for(var c=arguments[n],l=0,g=c.length;l<g;l++,i++)o[i]=c[l];return o}function Mt(t,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,c;o<i;o++)(c||!(o in n))&&(c||(c=Array.prototype.slice.call(n,0,o)),c[o]=n[o]);return t.concat(c||Array.prototype.slice.call(n))}function Ve(t){return this instanceof Ve?(this.v=t,this):new Ve(t)}function bn(t,n,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r.apply(t,n||[]),i,c=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),g("next"),g("throw"),g("return",l),i[Symbol.asyncIterator]=function(){return this},i;function l(y){return function(D){return Promise.resolve(D).then(y,v)}}function g(y,D){o[y]&&(i[y]=function(x){return new Promise(function(V,R){c.push([y,x,V,R])>1||S(y,x)})},D&&(i[y]=D(i[y])))}function S(y,D){try{h(o[y](D))}catch(x){m(c[0][3],x)}}function h(y){y.value instanceof Ve?Promise.resolve(y.value.v).then(p,v):m(c[0][2],y)}function p(y){S("next",y)}function v(y){S("throw",y)}function m(y,D){y(D),c.shift(),c.length&&S(c[0][0],c[0][1])}}function Sn(t){var n,r;return n={},o("next"),o("throw",function(i){throw i}),o("return"),n[Symbol.iterator]=function(){return this},n;function o(i,c){n[i]=t[i]?function(l){return(r=!r)?{value:Ve(t[i](l)),done:!1}:c?c(l):l}:c}}function On(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],r;return n?n.call(t):(t=typeof ot=="function"?ot(t):t[Symbol.iterator](),r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r);function o(c){r[c]=t[c]&&function(l){return new Promise(function(g,S){l=t[c](l),i(g,S,l.done,l.value)})}}function i(c,l,g,S){Promise.resolve(S).then(function(h){c({value:h,done:g})},l)}}function Rn(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}var Jn=Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n};function Cn(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ut(n,t,r);return Jn(n,t),n}function Tn(t){return t&&t.__esModule?t:{default:t}}function An(t,n,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?t!==n||!o:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(t):o?o.value:n.get(t)}function jn(t,n,r,o,i){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?t!==n||!i:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?i.call(t,r):i?i.value=r:n.set(t,r),r}function Nn(t,n){if(n===null||typeof n!="object"&&typeof n!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?n===t:t.has(n)}function Pn(t,n,r){if(n!=null){if(typeof n!="object"&&typeof n!="function")throw new TypeError("Object expected.");var o,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=n[Symbol.asyncDispose]}if(o===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=n[Symbol.dispose],r&&(i=o)}if(typeof o!="function")throw new TypeError("Object not disposable.");i&&(o=function(){try{i.call(this)}catch(c){return Promise.reject(c)}}),t.stack.push({value:n,dispose:o,async:r})}else r&&t.stack.push({async:!0});return n}var Zn=typeof SuppressedError=="function"?SuppressedError:function(t,n,r){var o=new Error(r);return o.name="SuppressedError",o.error=t,o.suppressed=n,o};function xn(t){function n(c){t.error=t.hasError?new Zn(c,t.error,"An error was suppressed during disposal."):c,t.hasError=!0}var r,o=0;function i(){for(;r=t.stack.pop();)try{if(!r.async&&o===1)return o=0,t.stack.push(r),Promise.resolve().then(i);if(r.dispose){var c=r.dispose.call(r.value);if(r.async)return o|=2,Promise.resolve(c).then(i,function(l){return n(l),i()})}else o|=1}catch(l){n(l)}if(o===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return i()}function kn(t,n){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,o,i,c,l){return o?n?".jsx":".js":i&&(!c||!l)?r:i+c+"."+l.toLowerCase()+"js"}):t}const er={__extends:fn,__assign:exports.__assign,__rest:Pt,__decorate:ln,__param:dn,__esDecorate:pn,__runInitializers:vn,__propKey:En,__setFunctionName:gn,__metadata:hn,__awaiter:xt,__generator:_n,__createBinding:ut,__exportStar:yn,__values:ot,__read:kt,__spread:mn,__spreadArrays:wn,__spreadArray:Mt,__await:Ve,__asyncGenerator:bn,__asyncDelegator:Sn,__asyncValues:On,__makeTemplateObject:Rn,__importStar:Cn,__importDefault:Tn,__classPrivateFieldGet:An,__classPrivateFieldSet:jn,__classPrivateFieldIn:Nn,__addDisposableResource:Pn,__disposeResources:xn,__rewriteRelativeImportExtension:kn},tr=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Pn,get __assign(){return exports.__assign},__asyncDelegator:Sn,__asyncGenerator:bn,__asyncValues:On,__await:Ve,__awaiter:xt,__classPrivateFieldGet:An,__classPrivateFieldIn:Nn,__classPrivateFieldSet:jn,__createBinding:ut,__decorate:ln,__disposeResources:xn,__esDecorate:pn,__exportStar:yn,__extends:fn,__generator:_n,__importDefault:Tn,__importStar:Cn,__makeTemplateObject:Rn,__metadata:hn,__param:dn,__propKey:En,__read:kt,__rest:Pt,__rewriteRelativeImportExtension:kn,__runInitializers:vn,__setFunctionName:gn,__spread:mn,__spreadArray:Mt,__spreadArrays:wn,__values:ot,default:er},Symbol.toStringTag,{value:"Module"})),nr="3.0.89";class rr{constructor(n){this.components=[];const{components:r}=n;if(r&&r.forEach(o=>this.register(o)),this.components.length===0)throw new Error("No components registered");if(!this.get("fallback"))throw new Error("No fallback component registered")}register(n){const r=this.components.findIndex(o=>o.key===n.key);return r!==-1?this.components[r]=n:this.components.push(n),this}get(n){const r=this.components.find(o=>o.key.toUpperCase()===n.toUpperCase());return r||null}getComponent(n){var r;return(r=this.get(n))==null?void 0:r.component}}const Mn=U.createContext(null);function or({options:t,children:n,components:r,modesComponents:o,storage:i,loadingComponent:c}){const l=U.useRef(null),g=U.useRef(!1),[S,h]=U.useState(null),p=U.useMemo(()=>new rr({components:r}),[r]);return U.useEffect(()=>{g.current||(g.current=!0,st.WidgetCtx.initialize({config:t,storage:i}).then(h))},[]),S?Nt.jsx(Mn.Provider,{value:{widgetCtx:S,config:t,components:r,componentStore:p,modesComponents:o,version:nr,contentIframeRef:l},children:n}):c||null}function Le(){const t=U.useContext(Mn);if(!t)throw new Error("useWidget must be used within a WidgetProvider");return t}function Lt(){const{config:t}=Le();return t}function He(t){return U.useSyncExternalStore(t.subscribe,t.get,t.get)}function sr(){const{widgetCtx:t}=Le();return{contactState:He(t.contactCtx.state),createUnverifiedContact:t.contactCtx.createUnverifiedContact}}function Ln(){const{widgetCtx:t}=Le();return{messagesState:He(t.messageCtx.state),sendMessage:t.messageCtx.sendMessage}}function Dt(){const{widgetCtx:t}=Le(),{oneOpenSessionAllowed:n}=Lt(),r=He(t.sessionCtx.sessionState),o=He(t.sessionCtx.sessionsState),{openSessions:i,closedSessions:c}=U.useMemo(()=>({openSessions:o.data.filter(g=>g.isOpened===!0),closedSessions:o.data.filter(g=>g.isOpened===!1)}),[o.data]),l=U.useMemo(()=>n?i.length===0:!0,[n,i.length]);return{sessionState:r,sessionsState:o,loadMoreSessions:t.sessionCtx.loadMoreSessions,resolveSession:t.sessionCtx.resolveSession,createStateCheckpoint:t.sessionCtx.createStateCheckpoint,openSessions:i,closedSessions:c,canCreateNewSession:l}}function ur(){var l;const{sessionState:t}=Dt(),{messagesState:n}=Ln(),r=((l=t.session)==null?void 0:l.assignee.kind)==="ai",o=n.messages.length>0?n.messages[n.messages.length-1]:null,i=(o==null?void 0:o.type)==="FROM_USER";return{isAwaitingBotReply:(r||t.isCreatingSession)&&(n.isSendingMessage||i)}}var St={exports:{}},dt={};/**
69
- * @license React
70
- * use-sync-external-store-shim.production.min.js
71
- *
72
- * Copyright (c) Facebook, Inc. and its affiliates.
73
- *
74
- * This source code is licensed under the MIT license found in the
75
- * LICENSE file in the root directory of this source tree.
76
- */var nn;function ir(){if(nn)return dt;nn=1;var t=U;function n(v,m){return v===m&&(v!==0||1/v===1/m)||v!==v&&m!==m}var r=typeof Object.is=="function"?Object.is:n,o=t.useState,i=t.useEffect,c=t.useLayoutEffect,l=t.useDebugValue;function g(v,m){var y=m(),D=o({inst:{value:y,getSnapshot:m}}),x=D[0].inst,V=D[1];return c(function(){x.value=y,x.getSnapshot=m,S(x)&&V({inst:x})},[v,y,m]),i(function(){return S(x)&&V({inst:x}),v(function(){S(x)&&V({inst:x})})},[v]),l(y),y}function S(v){var m=v.getSnapshot;v=v.value;try{var y=m();return!r(v,y)}catch{return!0}}function h(v,m){return m()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:g;return dt.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,dt}var pt={};/**
77
- * @license React
78
- * use-sync-external-store-shim.development.js
79
- *
80
- * Copyright (c) Facebook, Inc. and its affiliates.
81
- *
82
- * This source code is licensed under the MIT license found in the
83
- * LICENSE file in the root directory of this source tree.
84
- */var rn;function ar(){return rn||(rn=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 t=U,n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(B){{for(var W=arguments.length,T=new Array(W>1?W-1:0),$=1;$<W;$++)T[$-1]=arguments[$];o("error",B,T)}}function o(B,W,T){{var $=n.ReactDebugCurrentFrame,ie=$.getStackAddendum();ie!==""&&(W+="%s",T=T.concat([ie]));var Y=T.map(function(z){return String(z)});Y.unshift("Warning: "+W),Function.prototype.apply.call(console[B],console,Y)}}function i(B,W){return B===W&&(B!==0||1/B===1/W)||B!==B&&W!==W}var c=typeof Object.is=="function"?Object.is:i,l=t.useState,g=t.useEffect,S=t.useLayoutEffect,h=t.useDebugValue,p=!1,v=!1;function m(B,W,T){p||t.startTransition!==void 0&&(p=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var $=W();if(!v){var ie=W();c($,ie)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),v=!0)}var Y=l({inst:{value:$,getSnapshot:W}}),z=Y[0].inst,re=Y[1];return S(function(){z.value=$,z.getSnapshot=W,y(z)&&re({inst:z})},[B,$,W]),g(function(){y(z)&&re({inst:z});var le=function(){y(z)&&re({inst:z})};return B(le)},[B]),h($),$}function y(B){var W=B.getSnapshot,T=B.value;try{var $=W();return!c(T,$)}catch{return!0}}function D(B,W,T){return W()}var x=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",V=!x,R=V?D:m,fe=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:R;pt.useSyncExternalStore=fe,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),pt}process.env.NODE_ENV==="production"?St.exports=ir():St.exports=ar();var cr=St.exports;const Ie=()=>{},we=Ie(),vt=Object,X=t=>t===we,xe=t=>typeof t=="function",$e=(t,n)=>({...t,...n}),fr=t=>xe(t.then),tt=new WeakMap;let lr=0;const Ge=t=>{const n=typeof t,r=t&&t.constructor,o=r==Date;let i,c;if(vt(t)===t&&!o&&r!=RegExp){if(i=tt.get(t),i)return i;if(i=++lr+"~",tt.set(t,i),r==Array){for(i="@",c=0;c<t.length;c++)i+=Ge(t[c])+",";tt.set(t,i)}if(r==vt){i="#";const l=vt.keys(t).sort();for(;!X(c=l.pop());)X(t[c])||(i+=c+":"+Ge(t[c])+",");tt.set(t,i)}}else i=o?t.toJSON():n=="symbol"?t.toString():n=="string"?JSON.stringify(t):""+t;return i},Me=new WeakMap,Et={},nt={},Ut="undefined",it=typeof window!=Ut,Ot=typeof document!=Ut,dr=()=>it&&typeof window.requestAnimationFrame!=Ut,Dn=(t,n)=>{const r=Me.get(t);return[()=>!X(n)&&t.get(n)||Et,o=>{if(!X(n)){const i=t.get(n);n in nt||(nt[n]=i),r[5](n,$e(i,o),i||Et)}},r[6],()=>!X(n)&&n in nt?nt[n]:!X(n)&&t.get(n)||Et]};let Rt=!0;const pr=()=>Rt,[Ct,Tt]=it&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ie,Ie],vr=()=>{const t=Ot&&document.visibilityState;return X(t)||t!=="hidden"},Er=t=>(Ot&&document.addEventListener("visibilitychange",t),Ct("focus",t),()=>{Ot&&document.removeEventListener("visibilitychange",t),Tt("focus",t)}),gr=t=>{const n=()=>{Rt=!0,t()},r=()=>{Rt=!1};return Ct("online",n),Ct("offline",r),()=>{Tt("online",n),Tt("offline",r)}},hr={isOnline:pr,isVisible:vr},_r={initFocus:Er,initReconnect:gr},on=!Xe.useId,Ke=!it||"Deno"in window,yr=t=>dr()?window.requestAnimationFrame(t):setTimeout(t,1),gt=Ke?U.useEffect:U.useLayoutEffect,ht=typeof navigator<"u"&&navigator.connection,sn=!Ke&&ht&&(["slow-2g","2g"].includes(ht.effectiveType)||ht.saveData),It=t=>{if(xe(t))try{t=t()}catch{t=""}const n=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?Ge(t):"",[t,n]};let mr=0;const At=()=>++mr,Un=0,In=1,$n=2,wr=3;var Be={__proto__:null,ERROR_REVALIDATE_EVENT:wr,FOCUS_EVENT:Un,MUTATE_EVENT:$n,RECONNECT_EVENT:In};async function Wn(...t){const[n,r,o,i]=t,c=$e({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let l=c.populateCache;const g=c.rollbackOnError;let S=c.optimisticData;const h=m=>typeof g=="function"?g(m):g!==!1,p=c.throwOnError;if(xe(r)){const m=r,y=[],D=n.keys();for(const x of D)!/^\$(inf|sub)\$/.test(x)&&m(n.get(x)._k)&&y.push(x);return Promise.all(y.map(v))}return v(r);async function v(m){const[y]=It(m);if(!y)return;const[D,x]=Dn(n,y),[V,R,fe,B]=Me.get(n),W=()=>{const oe=V[y];return(xe(c.revalidate)?c.revalidate(D().data,m):c.revalidate!==!1)&&(delete fe[y],delete B[y],oe&&oe[0])?oe[0]($n).then(()=>D().data):D().data};if(t.length<3)return W();let T=o,$;const ie=At();R[y]=[ie,0];const Y=!X(S),z=D(),re=z.data,le=z._c,de=X(le)?re:le;if(Y&&(S=xe(S)?S(de,re):S,x({data:S,_c:de})),xe(T))try{T=T(de)}catch(oe){$=oe}if(T&&fr(T))if(T=await T.catch(oe=>{$=oe}),ie!==R[y][0]){if($)throw $;return T}else $&&Y&&h($)&&(l=!0,x({data:de,_c:we}));if(l&&!$)if(xe(l)){const oe=l(T,de);x({data:oe,error:we,_c:we})}else x({data:T,error:we,_c:we});if(R[y][1]=At(),Promise.resolve(W()).then(()=>{x({_c:we})}),$){if(p)throw $;return}return T}}const un=(t,n)=>{for(const r in t)t[r][0]&&t[r][0](n)},br=(t,n)=>{if(!Me.has(t)){const r=$e(_r,n),o={},i=Wn.bind(we,t);let c=Ie;const l={},g=(p,v)=>{const m=l[p]||[];return l[p]=m,m.push(v),()=>m.splice(m.indexOf(v),1)},S=(p,v,m)=>{t.set(p,v);const y=l[p];if(y)for(const D of y)D(v,m)},h=()=>{if(!Me.has(t)&&(Me.set(t,[o,{},{},{},i,S,g]),!Ke)){const p=r.initFocus(setTimeout.bind(we,un.bind(we,o,Un))),v=r.initReconnect(setTimeout.bind(we,un.bind(we,o,In)));c=()=>{p&&p(),v&&v(),Me.delete(t)}}};return h(),[t,i,h,c]}return[t,Me.get(t)[4]]},Sr=(t,n,r,o,i)=>{const c=r.errorRetryCount,l=i.retryCount,g=~~((Math.random()+.5)*(1<<(l<8?l:8)))*r.errorRetryInterval;!X(c)&&l>c||setTimeout(o,g,i)},Or=(t,n)=>Ge(t)==Ge(n),[Yn,Rr]=br(new Map),Cr=$e({onLoadingSlow:Ie,onSuccess:Ie,onError:Ie,onErrorRetry:Sr,onDiscarded:Ie,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:sn?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:sn?5e3:3e3,compare:Or,isPaused:()=>!1,cache:Yn,mutate:Rr,fallback:{}},hr),Tr=(t,n)=>{const r=$e(t,n);if(n){const{use:o,fallback:i}=t,{use:c,fallback:l}=n;o&&c&&(r.use=o.concat(c)),i&&l&&(r.fallback=$e(i,l))}return r},Ar=U.createContext({}),jr="$inf$",Vn=it&&window.__SWR_DEVTOOLS_USE__,Nr=Vn?window.__SWR_DEVTOOLS_USE__:[],Pr=()=>{Vn&&(window.__SWR_DEVTOOLS_REACT__=Xe)},xr=t=>xe(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],kr=()=>$e(Cr,U.useContext(Ar)),Mr=t=>(n,r,o)=>t(n,r&&((...c)=>{const[l]=It(n),[,,,g]=Me.get(Yn);if(l.startsWith(jr))return r(...c);const S=g[l];return X(S)?r(...c):(delete g[l],S)}),o),Lr=Nr.concat(Mr),Dr=t=>function(...r){const o=kr(),[i,c,l]=xr(r),g=Tr(o,l);let S=t;const{use:h}=g,p=(h||[]).concat(Lr);for(let v=p.length;v--;)S=p[v](S);return S(i,c||g.fetcher||null,g)},Ur=(t,n,r)=>{const o=n[t]||(n[t]=[]);return o.push(r),()=>{const i=o.indexOf(r);i>=0&&(o[i]=o[o.length-1],o.pop())}};Pr();const an=Xe.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(n=>{t.status="fulfilled",t.value=n},n=>{t.status="rejected",t.reason=n}),t)}),_t={dedupe:!0},Ir=(t,n,r)=>{const{cache:o,compare:i,suspense:c,fallbackData:l,revalidateOnMount:g,revalidateIfStale:S,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:v,keepPreviousData:m}=r,[y,D,x,V]=Me.get(o),[R,fe]=It(t),B=U.useRef(!1),W=U.useRef(!1),T=U.useRef(R),$=U.useRef(n),ie=U.useRef(r),Y=()=>ie.current,z=()=>Y().isVisible()&&Y().isOnline(),[re,le,de,oe]=Dn(o,R),ge=U.useRef({}).current,ye=X(l)?r.fallback[R]:l,Ee=(q,F)=>{for(const ne in ge){const Z=ne;if(Z==="data"){if(!i(q[Z],F[Z])&&(!X(q[Z])||!i(H,F[Z])))return!1}else if(F[Z]!==q[Z])return!1}return!0},Oe=U.useMemo(()=>{const q=!R||!n?!1:X(g)?Y().isPaused()||c?!1:X(S)?!0:S:g,F=ae=>{const _e=$e(ae);return delete _e._k,q?{isValidating:!0,isLoading:!0,..._e}:_e},ne=re(),Z=oe(),ce=F(ne),he=ne===Z?ce:F(Z);let se=ce;return[()=>{const ae=F(re());return Ee(ae,se)?(se.data=ae.data,se.isLoading=ae.isLoading,se.isValidating=ae.isValidating,se.error=ae.error,se):(se=ae,ae)},()=>he]},[o,R]),be=cr.useSyncExternalStore(U.useCallback(q=>de(R,(F,ne)=>{Ee(ne,F)||q()}),[o,R]),Oe[0],Oe[1]),G=!B.current,a=y[R]&&y[R].length>0,d=be.data,C=X(d)?ye:d,A=be.error,M=U.useRef(C),H=m?X(d)?M.current:d:C,k=a&&!X(A)?!1:G&&!X(g)?g:Y().isPaused()?!1:c?X(C)?!1:S:X(C)||S,pe=!!(R&&n&&G&&k),te=X(be.isValidating)?pe:be.isValidating,je=X(be.isLoading)?pe:be.isLoading,Re=U.useCallback(async q=>{const F=$.current;if(!R||!F||W.current||Y().isPaused())return!1;let ne,Z,ce=!0;const he=q||{},se=!x[R]||!he.dedupe,ae=()=>on?!W.current&&R===T.current&&B.current:R===T.current,_e={isValidating:!1,isLoading:!1},s=()=>{le(_e)},_=()=>{const P=x[R];P&&P[1]===Z&&delete x[R]},w={isValidating:!0};X(re().data)&&(w.isLoading=!0);try{if(se&&(le(w),r.loadingTimeout&&X(re().data)&&setTimeout(()=>{ce&&ae()&&Y().onLoadingSlow(R,r)},r.loadingTimeout),x[R]=[F(fe),At()]),[ne,Z]=x[R],ne=await ne,se&&setTimeout(_,r.dedupingInterval),!x[R]||x[R][1]!==Z)return se&&ae()&&Y().onDiscarded(R),!1;_e.error=we;const P=D[R];if(!X(P)&&(Z<=P[0]||Z<=P[1]||P[1]===0))return s(),se&&ae()&&Y().onDiscarded(R),!1;const Q=re().data;_e.data=i(Q,ne)?Q:ne,se&&ae()&&Y().onSuccess(ne,R,r)}catch(P){_();const Q=Y(),{shouldRetryOnError:K}=Q;Q.isPaused()||(_e.error=P,se&&ae()&&(Q.onError(P,R,Q),(K===!0||xe(K)&&K(P))&&(!Y().revalidateOnFocus||!Y().revalidateOnReconnect||z())&&Q.onErrorRetry(P,R,Q,L=>{const N=y[R];N&&N[0]&&N[0](Be.ERROR_REVALIDATE_EVENT,L)},{retryCount:(he.retryCount||0)+1,dedupe:!0})))}return ce=!1,s(),!0},[R,o]),Ne=U.useCallback((...q)=>Wn(o,T.current,...q),[]);if(gt(()=>{$.current=n,ie.current=r,X(d)||(M.current=d)}),gt(()=>{if(!R)return;const q=Re.bind(we,_t);let F=0;const Z=Ur(R,y,(ce,he={})=>{if(ce==Be.FOCUS_EVENT){const se=Date.now();Y().revalidateOnFocus&&se>F&&z()&&(F=se+Y().focusThrottleInterval,q())}else if(ce==Be.RECONNECT_EVENT)Y().revalidateOnReconnect&&z()&&q();else{if(ce==Be.MUTATE_EVENT)return Re();if(ce==Be.ERROR_REVALIDATE_EVENT)return Re(he)}});return W.current=!1,T.current=R,B.current=!0,le({_k:fe}),k&&(X(C)||Ke?q():yr(q)),()=>{W.current=!0,Z()}},[R]),gt(()=>{let q;function F(){const Z=xe(h)?h(re().data):h;Z&&q!==-1&&(q=setTimeout(ne,Z))}function ne(){!re().error&&(p||Y().isVisible())&&(v||Y().isOnline())?Re(_t).then(F):F()}return F(),()=>{q&&(clearTimeout(q),q=-1)}},[h,p,v,R]),U.useDebugValue(H),c&&X(C)&&R){if(!on&&Ke)throw new Error("Fallback data is required when using suspense in SSR.");$.current=n,ie.current=r,W.current=!1;const q=V[R];if(!X(q)){const F=Ne(q);an(F)}if(X(A)){const F=Re(_t);X(H)||(F.status="fulfilled",F.value=!0),an(F)}else throw A}return{mutate:Ne,get data(){return ge.data=!0,H},get error(){return ge.error=!0,A},get isValidating(){return ge.isValidating=!0,te},get isLoading(){return ge.isLoading=!0,je}}},$r=Dr(Ir);function Wr(){const{widgetCtx:t}=Le();return $r([t.config.token],t.api.widgetPrelude,{revalidateOnFocus:!1})}function Yr(){const{widgetCtx:t}=Le();return{routerState:He(t.routerCtx.state),toSessionsScreen:t.routerCtx.toSessionsScreen,toChatScreen:t.routerCtx.toChatScreen}}var Hn={};const Vr=st.getAugmentedNamespace(tr);var rt={},cn;function Hr(){if(cn)return rt;cn=1,Object.defineProperty(rt,"__esModule",{value:!0});var t=U;function n(){var r=t.useRef(!1),o=t.useCallback(function(){return r.current},[]);return t.useEffect(function(){return r.current=!0,function(){r.current=!1}},[]),o}return rt.default=n,rt}Object.defineProperty(Hn,"__esModule",{value:!0});var jt=Vr,yt=U,qr=jt.__importDefault(Hr());function Fr(t,n,r){n===void 0&&(n=[]),r===void 0&&(r={loading:!1});var o=yt.useRef(0),i=qr.default(),c=yt.useState(r),l=c[0],g=c[1],S=yt.useCallback(function(){for(var h=[],p=0;p<arguments.length;p++)h[p]=arguments[p];var v=++o.current;return l.loading||g(function(m){return jt.__assign(jt.__assign({},m),{loading:!0})}),t.apply(void 0,h).then(function(m){return i()&&v===o.current&&g({value:m,loading:!1}),m},function(m){return i()&&v===o.current&&g({error:m,loading:!1}),m})},n);return[l,S]}var Br=Hn.default=Fr;const Ue=new Map;function zr(){const[t,n]=U.useState([]),{widgetCtx:{api:r}}=Le();function o(p){const v=p.map(m=>({file:m,id:st.v4(),status:"pending",progress:0}));n(m=>[...m,...v]),v.forEach(l)}function i(p,v){n(m=>m.map(y=>y.id===p?{...y,...v}:y))}function c(p){n(v=>v.filter(m=>m.id!==p))}const l=async p=>{const v=new AbortController;Ue.set(p.id,v);try{n(y=>y.map(D=>D.id===p.id?{...D,status:"uploading",progress:0}:D));const m=await r.uploadFile({file:p.file,abortSignal:v.signal,onProgress:y=>{i(p.id,{progress:y})}});i(p.id,{status:"success",fileUrl:m.fileUrl,progress:100})}catch(m){v.signal.aborted||i(p.id,{status:"error",error:m instanceof Error?m.message:"Upload failed",progress:0})}finally{Ue.delete(p.id)}},g=p=>{const v=Ue.get(p);v&&(v.abort(),Ue.delete(p)),c(p)},S=U.useMemo(()=>t.filter(p=>p.status==="success"&&p.fileUrl),[t]);function h(){Ue.forEach(p=>p.abort()),Ue.clear(),n([])}return U.useEffect(()=>()=>{Ue.forEach(p=>p.abort()),Ue.clear()},[]),{allFiles:t,appendFiles:o,handleCancelUpload:g,successFiles:S,emptyTheFiles:h,getFileById:p=>t.find(v=>v.id===p),getUploadProgress:p=>{var v;return((v=t.find(m=>m.id===p))==null?void 0:v.progress)??0},getUploadStatus:p=>{var v;return(v=t.find(m=>m.id===p))==null?void 0:v.status},hasErrors:t.some(p=>p.status==="error"),isUploading:t.some(p=>p.status==="uploading")}}const qn=U.createContext(null);function Gr({children:t}){const n=Lt(),[r,o]=U.useState(n.isOpen??!1);return U.useEffect(()=>{o(i=>n.isOpen??i)},[n.isOpen]),U.useEffect(()=>{const i=n.openAfterNSeconds;if(typeof i!="number"||isNaN(i))return;const c=setTimeout(()=>o(!0),i*1e3);return()=>clearTimeout(c)},[n.openAfterNSeconds]),Nt.jsx(qn.Provider,{value:{isOpen:r,setIsOpen:o},children:t})}function Kr(){const t=U.useContext(qn);if(!t)throw new Error("useWidgetTrigger must be used within a WidgetTriggerProvider");return t}function Xr(){var g,S;const{widgetCtx:t,modesComponents:n}=Le(),{sessionState:r}=Dt(),o=t.modes,i=(g=r.session)==null?void 0:g.modeId,c=o.find(h=>h.id===i),l=(S=n==null?void 0:n.find(h=>{var p,v;return[(c==null?void 0:c.id)||"",((p=c==null?void 0:c.name)==null?void 0:p.toLowerCase())||"",((v=c==null?void 0:c.slug)==null?void 0:v.toLowerCase())||""].includes(h.key.toLowerCase())}))==null?void 0:S.component;return{modes:o,modesComponents:n,activeModeId:i,activeMode:c,Component:l}}exports.React=Xn;exports.React$1=Xe;exports.WidgetProvider=or;exports.WidgetTriggerProvider=Gr;exports.__awaiter=xt;exports.__rest=Pt;exports.__spreadArray=Mt;exports._default=Br;exports.jsxRuntimeExports=Nt;exports.reactExports=U;exports.useConfig=Lt;exports.useContact=sr;exports.useIsAwaitingBotReply=ur;exports.useMessages=Ln;exports.useModes=Xr;exports.usePreludeData=Wr;exports.usePrimitiveState=He;exports.useSessions=Dt;exports.useUploadFiles=zr;exports.useWidget=Le;exports.useWidgetRouter=Yr;exports.useWidgetTrigger=Kr;
85
- //# sourceMappingURL=useModes-C4Sdixy0.cjs.map