@deepdesk/deepdesk-sdk 10.4.1-beta.1 → 10.5.0
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/dialogs.css +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.d.mts +59 -50
- package/dist/index.d.ts +59 -50
- package/dist/index.esm.js +6 -6
- package/dist/index.iife.js +13 -13
- package/input.css +1 -1
- package/package.json +1 -1
- package/styles/index.js +1 -1
- package/styles.css +1 -1
- package/widget.css +1 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";var Deepdesk=(()=>{var oC=Object.create;var Va=Object.defineProperty;var iC=Object.getOwnPropertyDescriptor;var sC=Object.getOwnPropertyNames;var aC=Object.getPrototypeOf,lC=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pe=(e,t)=>{for(var n in t)Va(e,n,{get:t[n],enumerable:!0})},xh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of sC(t))!lC.call(e,o)&&o!==n&&Va(e,o,{get:()=>t[o],enumerable:!(r=iC(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?oC(aC(e)):{},xh(t||!e||!e.__esModule?Va(n,"default",{value:e,enumerable:!0}):n,e)),uC=e=>xh(Va({},"__esModule",{value:!0}),e);var X=pe((jL,Ka)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty,t="[native code]";function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}typeof Ka<"u"&&Ka.exports?(n.default=n,Ka.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Wa=pe((HL,wh)=>{"use strict";var _h=Object.getOwnPropertySymbols,cC=Object.prototype.hasOwnProperty,dC=Object.prototype.propertyIsEnumerable;function fC(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function pC(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}wh.exports=pC()?Object.assign:function(e,t){for(var n,r=fC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)cC.call(n,s)&&(r[s]=n[s]);if(_h){o=_h(n);for(var a=0;a<o.length;a++)dC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var jh=pe(K=>{"use strict";var kd=Wa(),mo=60103,bh=60106;K.Fragment=60107;K.StrictMode=60108;K.Profiler=60114;var Th=60109,kh=60110,Ph=60112;K.Suspense=60113;var Rh=60115,Ih=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,mo=ft("react.element"),bh=ft("react.portal"),K.Fragment=ft("react.fragment"),K.StrictMode=ft("react.strict_mode"),K.Profiler=ft("react.profiler"),Th=ft("react.provider"),kh=ft("react.context"),Ph=ft("react.forward_ref"),K.Suspense=ft("react.suspense"),Rh=ft("react.memo"),Ih=ft("react.lazy"));var ft,Eh=typeof Symbol=="function"&&Symbol.iterator;function mC(e){return e===null||typeof e!="object"?null:(e=Eh&&e[Eh]||e["@@iterator"],typeof e=="function"?e:null)}function Vi(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Lh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ah={};function go(e,t,n){this.props=e,this.context=t,this.refs=Ah,this.updater=n||Lh}go.prototype.isReactComponent={};go.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Vi(85));this.updater.enqueueSetState(this,e,t,"setState")};go.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Oh(){}Oh.prototype=go.prototype;function Pd(e,t,n){this.props=e,this.context=t,this.refs=Ah,this.updater=n||Lh}var Rd=Pd.prototype=new Oh;Rd.constructor=Pd;kd(Rd,go.prototype);Rd.isPureReactComponent=!0;var Id={current:null},Nh=Object.prototype.hasOwnProperty,Mh={key:!0,ref:!0,__self:!0,__source:!0};function Dh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Nh.call(t,r)&&!Mh.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:mo,type:e,key:i,ref:s,props:o,_owner:Id.current}}function gC(e,t){return{$$typeof:mo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ld(e){return typeof e=="object"&&e!==null&&e.$$typeof===mo}function hC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ch=/\/+/g;function Td(e,t){return typeof e=="object"&&e!==null&&e.key!=null?hC(""+e.key):t.toString(36)}function qa(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case mo:case bh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Td(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Ch,"$&/")+"/"),qa(o,t,n,"",function(u){return u})):o!=null&&(Ld(o)&&(o=gC(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ch,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Array.isArray(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Td(i,a);s+=qa(i,t,n,l,o)}else if(l=mC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Td(i,a++),s+=qa(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Vi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function $a(e,t,n){if(e==null)return e;var r=[],o=0;return qa(e,r,"","",function(i){return t.call(n,i,o++)}),r}function yC(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var Fh={current:null};function dn(){var e=Fh.current;if(e===null)throw Error(Vi(321));return e}var vC={ReactCurrentDispatcher:Fh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Id,IsSomeRendererActing:{current:!1},assign:kd};K.Children={map:$a,forEach:function(e,t,n){$a(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $a(e,function(){t++}),t},toArray:function(e){return $a(e,function(t){return t})||[]},only:function(e){if(!Ld(e))throw Error(Vi(143));return e}};K.Component=go;K.PureComponent=Pd;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vC;K.cloneElement=function(e,t,n){if(e==null)throw Error(Vi(267,e));var r=kd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Id.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Nh.call(t,l)&&!Mh.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:mo,type:e.type,key:o,ref:i,props:r,_owner:s}};K.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:kh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Th,_context:e},e.Consumer=e};K.createElement=Dh;K.createFactory=function(e){var t=Dh.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Ph,render:e}};K.isValidElement=Ld;K.lazy=function(e){return{$$typeof:Ih,_payload:{_status:-1,_result:e},_init:yC}};K.memo=function(e,t){return{$$typeof:Rh,type:e,compare:t===void 0?null:t}};K.useCallback=function(e,t){return dn().useCallback(e,t)};K.useContext=function(e,t){return dn().useContext(e,t)};K.useDebugValue=function(){};K.useEffect=function(e,t){return dn().useEffect(e,t)};K.useImperativeHandle=function(e,t,n){return dn().useImperativeHandle(e,t,n)};K.useLayoutEffect=function(e,t){return dn().useLayoutEffect(e,t)};K.useMemo=function(e,t){return dn().useMemo(e,t)};K.useReducer=function(e,t,n){return dn().useReducer(e,t,n)};K.useRef=function(e){return dn().useRef(e)};K.useState=function(e){return dn().useState(e)};K.version="17.0.2"});var O=pe((UL,Hh)=>{"use strict";Hh.exports=jh()});var Kh=pe(Wi=>{"use strict";Wa();var SC=O(),zh=60103;Wi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Ad=Symbol.for,zh=Ad("react.element"),Wi.Fragment=Ad("react.fragment"));var Ad,xC=SC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_C=Object.prototype.hasOwnProperty,wC={key:!0,ref:!0,__self:!0,__source:!0};function Vh(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)_C.call(t,r)&&!wC.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:zh,type:e,key:i,ref:s,props:o,_owner:xC.current}}Wi.jsx=Vh;Wi.jsxs=Vh});var w=pe((GL,Wh)=>{"use strict";Wh.exports=Kh()});var gy=pe($=>{"use strict";var _o,Xi,sl,zd;typeof performance=="object"&&typeof performance.now=="function"?(cy=performance,$.unstable_now=function(){return cy.now()}):(Dd=Date,dy=Dd.now(),$.unstable_now=function(){return Dd.now()-dy});var cy,Dd,dy;typeof window>"u"||typeof MessageChannel!="function"?(xo=null,Fd=null,jd=function(){if(xo!==null)try{var e=$.unstable_now();xo(!0,e),xo=null}catch(t){throw setTimeout(jd,0),t}},_o=function(e){xo!==null?setTimeout(_o,0,e):(xo=e,setTimeout(jd,0))},Xi=function(e,t){Fd=setTimeout(e,t)},sl=function(){clearTimeout(Fd)},$.unstable_shouldYield=function(){return!1},zd=$.unstable_forceFrameRate=function(){}):(fy=window.setTimeout,py=window.clearTimeout,typeof console<"u"&&(my=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof my!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),qi=!1,Gi=null,rl=-1,Hd=5,Bd=0,$.unstable_shouldYield=function(){return $.unstable_now()>=Bd},zd=function(){},$.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Hd=0<e?Math.floor(1e3/e):5},Ud=new MessageChannel,ol=Ud.port2,Ud.port1.onmessage=function(){if(Gi!==null){var e=$.unstable_now();Bd=e+Hd;try{Gi(!0,e)?ol.postMessage(null):(qi=!1,Gi=null)}catch(t){throw ol.postMessage(null),t}}else qi=!1},_o=function(e){Gi=e,qi||(qi=!0,ol.postMessage(null))},Xi=function(e,t){rl=fy(function(){e($.unstable_now())},t)},sl=function(){py(rl),rl=-1});var xo,Fd,jd,fy,py,my,qi,Gi,rl,Hd,Bd,Ud,ol;function Vd(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<il(o,t))e[r]=t,e[n]=o,n=r;else break e}}function At(e){return e=e[0],e===void 0?null:e}function al(e){var t=e[0];if(t!==void 0){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,s=e[i],a=i+1,l=e[a];if(s!==void 0&&0>il(s,n))l!==void 0&&0>il(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>il(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function il(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Gt=[],Vn=[],FC=1,yt=null,Re=3,ll=!1,Mr=!1,Qi=!1;function Kd(e){for(var t=At(Vn);t!==null;){if(t.callback===null)al(Vn);else if(t.startTime<=e)al(Vn),t.sortIndex=t.expirationTime,Vd(Gt,t);else break;t=At(Vn)}}function Wd(e){if(Qi=!1,Kd(e),!Mr)if(At(Gt)!==null)Mr=!0,_o($d);else{var t=At(Vn);t!==null&&Xi(Wd,t.startTime-e)}}function $d(e,t){Mr=!1,Qi&&(Qi=!1,sl()),ll=!0;var n=Re;try{for(Kd(t),yt=At(Gt);yt!==null&&(!(yt.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=yt.callback;if(typeof r=="function"){yt.callback=null,Re=yt.priorityLevel;var o=r(yt.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?yt.callback=o:yt===At(Gt)&&al(Gt),Kd(t)}else al(Gt);yt=At(Gt)}if(yt!==null)var i=!0;else{var s=At(Vn);s!==null&&Xi(Wd,s.startTime-t),i=!1}return i}finally{yt=null,Re=n,ll=!1}}var jC=zd;$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(e){e.callback=null};$.unstable_continueExecution=function(){Mr||ll||(Mr=!0,_o($d))};$.unstable_getCurrentPriorityLevel=function(){return Re};$.unstable_getFirstCallbackNode=function(){return At(Gt)};$.unstable_next=function(e){switch(Re){case 1:case 2:case 3:var t=3;break;default:t=Re}var n=Re;Re=t;try{return e()}finally{Re=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=jC;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Re;Re=e;try{return t()}finally{Re=n}};$.unstable_scheduleCallback=function(e,t,n){var r=$.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:FC++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Vd(Vn,e),At(Gt)===null&&e===At(Vn)&&(Qi?sl():Qi=!0,Xi(Wd,n-r))):(e.sortIndex=o,Vd(Gt,e),Mr||ll||(Mr=!0,_o($d))),e};$.unstable_wrapCallback=function(e){var t=Re;return function(){var n=Re;Re=t;try{return e.apply(this,arguments)}finally{Re=n}}}});var yy=pe((uO,hy)=>{"use strict";hy.exports=gy()});var r0=pe(Et=>{"use strict";var tu=O(),ae=Wa(),xe=yy();function T(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!tu)throw Error(T(227));var Iv=new Set,Ts={};function $r(e,t){zo(e,t),zo(e+"Capture",t)}function zo(e,t){for(Ts[e]=t,e=0;e<t.length;e++)Iv.add(t[e])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),HC=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vy=Object.prototype.hasOwnProperty,Sy={},xy={};function BC(e){return vy.call(xy,e)?!0:vy.call(Sy,e)?!1:HC.test(e)?xy[e]=!0:(Sy[e]=!0,!1)}function UC(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zC(e,t,n,r){if(t===null||typeof t>"u"||UC(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ue(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Te[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Te[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Te[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Te[e]=new Ue(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Te[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Te[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Te[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Te[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Te[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var np=/[\-:]([a-z])/g;function rp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(np,rp);Te[t]=new Ue(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(np,rp);Te[t]=new Ue(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(np,rp);Te[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Te[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});Te.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Te[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function op(e,t,n,r){var o=Te.hasOwnProperty(t)?Te[t]:null,i=o!==null?o.type===0:r?!1:!(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N");i||(zC(t,n,o,r)&&(n=null),r||o===null?BC(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var qr=tu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,us=60103,Fr=60106,Wn=60107,ip=60108,ms=60114,sp=60109,ap=60110,nu=60112,gs=60113,Al=60120,ru=60115,lp=60116,up=60121,cp=60128,Lv=60129,dp=60130,hf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,us=ye("react.element"),Fr=ye("react.portal"),Wn=ye("react.fragment"),ip=ye("react.strict_mode"),ms=ye("react.profiler"),sp=ye("react.provider"),ap=ye("react.context"),nu=ye("react.forward_ref"),gs=ye("react.suspense"),Al=ye("react.suspense_list"),ru=ye("react.memo"),lp=ye("react.lazy"),up=ye("react.block"),ye("react.scope"),cp=ye("react.opaque.id"),Lv=ye("react.debug_trace_mode"),dp=ye("react.offscreen"),hf=ye("react.legacy_hidden"));var ye,_y=typeof Symbol=="function"&&Symbol.iterator;function Yi(e){return e===null||typeof e!="object"?null:(e=_y&&e[_y]||e["@@iterator"],typeof e=="function"?e:null)}var qd;function cs(e){if(qd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qd=t&&t[1]||""}return`
|
|
2
|
-
`+
|
|
1
|
+
"use strict";var Deepdesk=(()=>{var hE=Object.create;var Ka=Object.defineProperty;var yE=Object.getOwnPropertyDescriptor;var vE=Object.getOwnPropertyNames;var SE=Object.getPrototypeOf,xE=Object.prototype.hasOwnProperty;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{for(var n in t)Ka(e,n,{get:t[n],enumerable:!0})},kh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of vE(t))!xE.call(e,o)&&o!==n&&Ka(e,o,{get:()=>t[o],enumerable:!(r=yE(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?hE(SE(e)):{},kh(t||!e||!e.__esModule?Ka(n,"default",{value:e,enumerable:!0}):n,e)),_E=e=>kh(Ka({},"__esModule",{value:!0}),e);var $=me((nL,Wa)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty,t="[native code]";function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}typeof Wa<"u"&&Wa.exports?(n.default=n,Wa.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var $a=me((rL,Rh)=>{"use strict";var Ph=Object.getOwnPropertySymbols,wE=Object.prototype.hasOwnProperty,bE=Object.prototype.propertyIsEnumerable;function EE(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function CE(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Rh.exports=CE()?Object.assign:function(e,t){for(var n,r=EE(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)wE.call(n,s)&&(r[s]=n[s]);if(Ph){o=Ph(n);for(var a=0;a<o.length;a++)bE.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Wh=me(W=>{"use strict";var Ad=$a(),vo=60103,Lh=60106;W.Fragment=60107;W.StrictMode=60108;W.Profiler=60114;var Oh=60109,Nh=60110,Mh=60112;W.Suspense=60113;var Dh=60115,Fh=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,vo=ft("react.element"),Lh=ft("react.portal"),W.Fragment=ft("react.fragment"),W.StrictMode=ft("react.strict_mode"),W.Profiler=ft("react.profiler"),Oh=ft("react.provider"),Nh=ft("react.context"),Mh=ft("react.forward_ref"),W.Suspense=ft("react.suspense"),Dh=ft("react.memo"),Fh=ft("react.lazy"));var ft,Ih=typeof Symbol=="function"&&Symbol.iterator;function TE(e){return e===null||typeof e!="object"?null:(e=Ih&&e[Ih]||e["@@iterator"],typeof e=="function"?e:null)}function Wi(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var jh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bh={};function So(e,t,n){this.props=e,this.context=t,this.refs=Bh,this.updater=n||jh}So.prototype.isReactComponent={};So.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Wi(85));this.updater.enqueueSetState(this,e,t,"setState")};So.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hh(){}Hh.prototype=So.prototype;function Ld(e,t,n){this.props=e,this.context=t,this.refs=Bh,this.updater=n||jh}var Od=Ld.prototype=new Hh;Od.constructor=Ld;Ad(Od,So.prototype);Od.isPureReactComponent=!0;var Nd={current:null},zh=Object.prototype.hasOwnProperty,Uh={key:!0,ref:!0,__self:!0,__source:!0};function Vh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)zh.call(t,r)&&!Uh.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:vo,type:e,key:i,ref:s,props:o,_owner:Nd.current}}function kE(e,t){return{$$typeof:vo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Md(e){return typeof e=="object"&&e!==null&&e.$$typeof===vo}function PE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ah=/\/+/g;function Id(e,t){return typeof e=="object"&&e!==null&&e.key!=null?PE(""+e.key):t.toString(36)}function Ga(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case vo:case Lh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Id(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Ah,"$&/")+"/"),Ga(o,t,n,"",function(u){return u})):o!=null&&(Md(o)&&(o=kE(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ah,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Array.isArray(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Id(i,a);s+=Ga(i,t,n,l,o)}else if(l=TE(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Id(i,a++),s+=Ga(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Wi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function qa(e,t,n){if(e==null)return e;var r=[],o=0;return Ga(e,r,"","",function(i){return t.call(n,i,o++)}),r}function RE(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var Kh={current:null};function dn(){var e=Kh.current;if(e===null)throw Error(Wi(321));return e}var IE={ReactCurrentDispatcher:Kh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Nd,IsSomeRendererActing:{current:!1},assign:Ad};W.Children={map:qa,forEach:function(e,t,n){qa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return qa(e,function(){t++}),t},toArray:function(e){return qa(e,function(t){return t})||[]},only:function(e){if(!Md(e))throw Error(Wi(143));return e}};W.Component=So;W.PureComponent=Ld;W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IE;W.cloneElement=function(e,t,n){if(e==null)throw Error(Wi(267,e));var r=Ad({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Nd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)zh.call(t,l)&&!Uh.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:vo,type:e.type,key:o,ref:i,props:r,_owner:s}};W.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Nh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Oh,_context:e},e.Consumer=e};W.createElement=Vh;W.createFactory=function(e){var t=Vh.bind(null,e);return t.type=e,t};W.createRef=function(){return{current:null}};W.forwardRef=function(e){return{$$typeof:Mh,render:e}};W.isValidElement=Md;W.lazy=function(e){return{$$typeof:Fh,_payload:{_status:-1,_result:e},_init:RE}};W.memo=function(e,t){return{$$typeof:Dh,type:e,compare:t===void 0?null:t}};W.useCallback=function(e,t){return dn().useCallback(e,t)};W.useContext=function(e,t){return dn().useContext(e,t)};W.useDebugValue=function(){};W.useEffect=function(e,t){return dn().useEffect(e,t)};W.useImperativeHandle=function(e,t,n){return dn().useImperativeHandle(e,t,n)};W.useLayoutEffect=function(e,t){return dn().useLayoutEffect(e,t)};W.useMemo=function(e,t){return dn().useMemo(e,t)};W.useReducer=function(e,t,n){return dn().useReducer(e,t,n)};W.useRef=function(e){return dn().useRef(e)};W.useState=function(e){return dn().useState(e)};W.version="17.0.2"});var O=me((iL,$h)=>{"use strict";$h.exports=Wh()});var Yh=me(qi=>{"use strict";$a();var AE=O(),Xh=60103;qi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Dd=Symbol.for,Xh=Dd("react.element"),qi.Fragment=Dd("react.fragment"));var Dd,LE=AE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,OE=Object.prototype.hasOwnProperty,NE={key:!0,ref:!0,__self:!0,__source:!0};function Qh(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)OE.call(t,r)&&!NE.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Xh,type:e,key:i,ref:s,props:o,_owner:LE.current}}qi.jsx=Qh;qi.jsxs=Qh});var w=me((pL,Zh)=>{"use strict";Zh.exports=Yh()});var wy=me(q=>{"use strict";var Co,Yi,al,$d;typeof performance=="object"&&typeof performance.now=="function"?(yy=performance,q.unstable_now=function(){return yy.now()}):(Hd=Date,vy=Hd.now(),q.unstable_now=function(){return Hd.now()-vy});var yy,Hd,vy;typeof window>"u"||typeof MessageChannel!="function"?(Eo=null,zd=null,Ud=function(){if(Eo!==null)try{var e=q.unstable_now();Eo(!0,e),Eo=null}catch(t){throw setTimeout(Ud,0),t}},Co=function(e){Eo!==null?setTimeout(Co,0,e):(Eo=e,setTimeout(Ud,0))},Yi=function(e,t){zd=setTimeout(e,t)},al=function(){clearTimeout(zd)},q.unstable_shouldYield=function(){return!1},$d=q.unstable_forceFrameRate=function(){}):(Sy=window.setTimeout,xy=window.clearTimeout,typeof console<"u"&&(_y=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof _y!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),Xi=!1,Qi=null,ol=-1,Vd=5,Kd=0,q.unstable_shouldYield=function(){return q.unstable_now()>=Kd},$d=function(){},q.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Vd=0<e?Math.floor(1e3/e):5},Wd=new MessageChannel,il=Wd.port2,Wd.port1.onmessage=function(){if(Qi!==null){var e=q.unstable_now();Kd=e+Vd;try{Qi(!0,e)?il.postMessage(null):(Xi=!1,Qi=null)}catch(t){throw il.postMessage(null),t}}else Xi=!1},Co=function(e){Qi=e,Xi||(Xi=!0,il.postMessage(null))},Yi=function(e,t){ol=Sy(function(){e(q.unstable_now())},t)},al=function(){xy(ol),ol=-1});var Eo,zd,Ud,Sy,xy,_y,Xi,Qi,ol,Vd,Kd,Wd,il;function qd(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<sl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Ot(e){return e=e[0],e===void 0?null:e}function ll(e){var t=e[0];if(t!==void 0){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,s=e[i],a=i+1,l=e[a];if(s!==void 0&&0>sl(s,n))l!==void 0&&0>sl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>sl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function sl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Qt=[],Vn=[],XE=1,vt=null,Ae=3,ul=!1,Dr=!1,Zi=!1;function Gd(e){for(var t=Ot(Vn);t!==null;){if(t.callback===null)ll(Vn);else if(t.startTime<=e)ll(Vn),t.sortIndex=t.expirationTime,qd(Qt,t);else break;t=Ot(Vn)}}function Xd(e){if(Zi=!1,Gd(e),!Dr)if(Ot(Qt)!==null)Dr=!0,Co(Qd);else{var t=Ot(Vn);t!==null&&Yi(Xd,t.startTime-e)}}function Qd(e,t){Dr=!1,Zi&&(Zi=!1,al()),ul=!0;var n=Ae;try{for(Gd(t),vt=Ot(Qt);vt!==null&&(!(vt.expirationTime>t)||e&&!q.unstable_shouldYield());){var r=vt.callback;if(typeof r=="function"){vt.callback=null,Ae=vt.priorityLevel;var o=r(vt.expirationTime<=t);t=q.unstable_now(),typeof o=="function"?vt.callback=o:vt===Ot(Qt)&&ll(Qt),Gd(t)}else ll(Qt);vt=Ot(Qt)}if(vt!==null)var i=!0;else{var s=Ot(Vn);s!==null&&Yi(Xd,s.startTime-t),i=!1}return i}finally{vt=null,Ae=n,ul=!1}}var QE=$d;q.unstable_IdlePriority=5;q.unstable_ImmediatePriority=1;q.unstable_LowPriority=4;q.unstable_NormalPriority=3;q.unstable_Profiling=null;q.unstable_UserBlockingPriority=2;q.unstable_cancelCallback=function(e){e.callback=null};q.unstable_continueExecution=function(){Dr||ul||(Dr=!0,Co(Qd))};q.unstable_getCurrentPriorityLevel=function(){return Ae};q.unstable_getFirstCallbackNode=function(){return Ot(Qt)};q.unstable_next=function(e){switch(Ae){case 1:case 2:case 3:var t=3;break;default:t=Ae}var n=Ae;Ae=t;try{return e()}finally{Ae=n}};q.unstable_pauseExecution=function(){};q.unstable_requestPaint=QE;q.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ae;Ae=e;try{return t()}finally{Ae=n}};q.unstable_scheduleCallback=function(e,t,n){var r=q.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:XE++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,qd(Vn,e),Ot(Qt)===null&&e===Ot(Vn)&&(Zi?al():Zi=!0,Yi(Xd,n-r))):(e.sortIndex=o,qd(Qt,e),Dr||ul||(Dr=!0,Co(Qd))),e};q.unstable_wrapCallback=function(e){var t=Ae;return function(){var n=Ae;Ae=t;try{return e.apply(this,arguments)}finally{Ae=n}}}});var Ey=me((kO,by)=>{"use strict";by.exports=wy()});var c0=me(Et=>{"use strict";var nu=O(),ae=$a(),_e=Ey();function T(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!nu)throw Error(T(227));var Fv=new Set,Ps={};function qr(e,t){$o(e,t),$o(e+"Capture",t)}function $o(e,t){for(Ps[e]=t,e=0;e<t.length;e++)Fv.add(t[e])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),YE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Cy=Object.prototype.hasOwnProperty,Ty={},ky={};function ZE(e){return Cy.call(ky,e)?!0:Cy.call(Ty,e)?!1:YE.test(e)?ky[e]=!0:(Ty[e]=!0,!1)}function JE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function eC(e,t,n,r){if(t===null||typeof t>"u"||JE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ke(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Ke(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Ke(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Ke(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Ke(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ke[e]=new Ke(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Ke(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Ke(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Ke(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Ke(e,5,!1,e.toLowerCase(),null,!1,!1)});var sf=/[\-:]([a-z])/g;function af(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(sf,af);ke[t]=new Ke(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(sf,af);ke[t]=new Ke(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(sf,af);ke[t]=new Ke(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Ke(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Ke("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Ke(e,1,!1,e.toLowerCase(),null,!0,!0)});function lf(e,t,n,r){var o=ke.hasOwnProperty(t)?ke[t]:null,i=o!==null?o.type===0:r?!1:!(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N");i||(eC(t,n,o,r)&&(n=null),r||o===null?ZE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Gr=nu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ds=60103,jr=60106,Wn=60107,uf=60108,hs=60114,cf=60109,df=60110,ru=60112,ys=60113,Ol=60120,ou=60115,pf=60116,ff=60121,mf=60128,jv=60129,gf=60130,Sp=60131;typeof Symbol=="function"&&Symbol.for&&(ve=Symbol.for,ds=ve("react.element"),jr=ve("react.portal"),Wn=ve("react.fragment"),uf=ve("react.strict_mode"),hs=ve("react.profiler"),cf=ve("react.provider"),df=ve("react.context"),ru=ve("react.forward_ref"),ys=ve("react.suspense"),Ol=ve("react.suspense_list"),ou=ve("react.memo"),pf=ve("react.lazy"),ff=ve("react.block"),ve("react.scope"),mf=ve("react.opaque.id"),jv=ve("react.debug_trace_mode"),gf=ve("react.offscreen"),Sp=ve("react.legacy_hidden"));var ve,Py=typeof Symbol=="function"&&Symbol.iterator;function Ji(e){return e===null||typeof e!="object"?null:(e=Py&&e[Py]||e["@@iterator"],typeof e=="function"?e:null)}var Yd;function ps(e){if(Yd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yd=t&&t[1]||""}return`
|
|
2
|
+
`+Yd+e}var Zd=!1;function cl(e,t){if(!e||Zd)return"";Zd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var o=l.stack.split(`
|
|
3
3
|
`),i=r.stack.split(`
|
|
4
4
|
`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a])return`
|
|
5
|
-
`+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{Gd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?cs(e):""}function VC(e){switch(e.tag){case 5:return cs(e.type);case 16:return cs("Lazy");case 13:return cs("Suspense");case 19:return cs("SuspenseList");case 0:case 2:case 15:return e=ul(e.type,!1),e;case 11:return e=ul(e.type.render,!1),e;case 22:return e=ul(e.type._render,!1),e;case 1:return e=ul(e.type,!0),e;default:return""}}function Ao(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wn:return"Fragment";case Fr:return"Portal";case ms:return"Profiler";case ip:return"StrictMode";case gs:return"Suspense";case Al:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ap:return(e.displayName||"Context")+".Consumer";case sp:return(e._context.displayName||"Context")+".Provider";case nu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case ru:return Ao(e.type);case up:return Ao(e._render);case lp:t=e._payload,e=e._init;try{return Ao(e(t))}catch{}}return null}function rr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Av(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function KC(e){var t=Av(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cl(e){e._valueTracker||(e._valueTracker=KC(e))}function Ov(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Av(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ol(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function yf(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Nv(e,t){t=t.checked,t!=null&&op(e,"checked",t,!1)}function vf(e,t){Nv(e,t);var n=rr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Sf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sf(e,t.type,rr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ey(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Sf(e,t,n){(t!=="number"||Ol(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function WC(e){var t="";return tu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function xf(e,t){return e=ae({children:void 0},t),(t=WC(t.children))&&(e.children=t),e}function Oo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+rr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function _f(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cy(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:rr(n)}}function Mv(e,t){var n=rr(t.value),r=rr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function by(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var wf={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Dv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ef(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Dv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var dl,Fv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==wf.svg||"innerHTML"in e)e.innerHTML=t;else{for(dl=dl||document.createElement("div"),dl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=dl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ks(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hs={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$C=["Webkit","ms","Moz","O"];Object.keys(hs).forEach(function(e){$C.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hs[t]=hs[e]})});function jv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hs.hasOwnProperty(e)&&hs[e]?(""+t).trim():t+"px"}function Hv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=jv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var qC=ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Cf(e,t){if(t){if(qC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function bf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function fp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tf=null,No=null,Mo=null;function Ty(e){if(e=Us(e)){if(typeof Tf!="function")throw Error(T(280));var t=e.stateNode;t&&(t=uu(t),Tf(e.stateNode,e.type,t))}}function Bv(e){No?Mo?Mo.push(e):Mo=[e]:No=e}function Uv(){if(No){var e=No,t=Mo;if(Mo=No=null,Ty(e),t)for(e=0;e<t.length;e++)Ty(t[e])}}function pp(e,t){return e(t)}function zv(e,t,n,r,o){return e(t,n,r,o)}function mp(){}var Vv=pp,jr=!1,Xd=!1;function gp(){(No!==null||Mo!==null)&&(mp(),Uv())}function GC(e,t,n){if(Xd)return e(t,n);Xd=!0;try{return Vv(e,t,n)}finally{Xd=!1,gp()}}function Ps(e,t){var n=e.stateNode;if(n===null)return null;var r=uu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(T(231,t,typeof n));return n}var kf=!1;if(yn)try{wo={},Object.defineProperty(wo,"passive",{get:function(){kf=!0}}),window.addEventListener("test",wo,wo),window.removeEventListener("test",wo,wo)}catch{kf=!1}var wo;function XC(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ys=!1,Nl=null,Ml=!1,Pf=null,QC={onError:function(e){ys=!0,Nl=e}};function YC(e,t,n,r,o,i,s,a,l){ys=!1,Nl=null,XC.apply(QC,arguments)}function ZC(e,t,n,r,o,i,s,a,l){if(YC.apply(this,arguments),ys){if(ys){var u=Nl;ys=!1,Nl=null}else throw Error(T(198));Ml||(Ml=!0,Pf=u)}}function Gr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Kv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ky(e){if(Gr(e)!==e)throw Error(T(188))}function JC(e){var t=e.alternate;if(!t){if(t=Gr(e),t===null)throw Error(T(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return ky(o),e;if(i===r)return ky(o),t;i=i.sibling}throw Error(T(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function Wv(e){if(e=JC(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Py(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var $v,hp,qv,Gv,Rf=!1,Xt=[],Xn=null,Qn=null,Yn=null,Rs=new Map,Is=new Map,Zi=[],Ry="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function If(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Iy(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Is.delete(t.pointerId)}}function Ji(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=If(t,n,r,o,i),t!==null&&(t=Us(t),t!==null&&hp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function eb(e,t,n,r,o){switch(t){case"focusin":return Xn=Ji(Xn,e,t,n,r,o),!0;case"dragenter":return Qn=Ji(Qn,e,t,n,r,o),!0;case"mouseover":return Yn=Ji(Yn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Rs.set(i,Ji(Rs.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Is.set(i,Ji(Is.get(i)||null,e,t,n,r,o)),!0}return!1}function tb(e){var t=Hr(e.target);if(t!==null){var n=Gr(t);if(n!==null){if(t=n.tag,t===13){if(t=Kv(n),t!==null){e.blockedOn=t,Gv(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){qv(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Us(n),t!==null&&hp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ly(e,t,n){wl(e)&&n.delete(t)}function nb(){for(Rf=!1;0<Xt.length;){var e=Xt[0];if(e.blockedOn!==null){e=Us(e.blockedOn),e!==null&&$v(e);break}for(var t=e.targetContainers;0<t.length;){var n=xp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Xt.shift()}Xn!==null&&wl(Xn)&&(Xn=null),Qn!==null&&wl(Qn)&&(Qn=null),Yn!==null&&wl(Yn)&&(Yn=null),Rs.forEach(Ly),Is.forEach(Ly)}function es(e,t){e.blockedOn===t&&(e.blockedOn=null,Rf||(Rf=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,nb)))}function Xv(e){function t(o){return es(o,e)}if(0<Xt.length){es(Xt[0],e);for(var n=1;n<Xt.length;n++){var r=Xt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Xn!==null&&es(Xn,e),Qn!==null&&es(Qn,e),Yn!==null&&es(Yn,e),Rs.forEach(t),Is.forEach(t),n=0;n<Zi.length;n++)r=Zi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Zi.length&&(n=Zi[0],n.blockedOn===null);)tb(n),n.blockedOn===null&&Zi.shift()}function fl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var To={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionend:fl("Transition","TransitionEnd")},Qd={},Qv={};yn&&(Qv=document.createElement("div").style,"AnimationEvent"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),"TransitionEvent"in window||delete To.transitionend.transition);function ou(e){if(Qd[e])return Qd[e];if(!To[e])return e;var t=To[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qv)return Qd[e]=t[n];return e}var Yv=ou("animationend"),Zv=ou("animationiteration"),Jv=ou("animationstart"),eS=ou("transitionend"),tS=new Map,yp=new Map,rb=["abort","abort",Yv,"animationEnd",Zv,"animationIteration",Jv,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",eS,"transitionEnd","waiting","waiting"];function vp(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),yp.set(r,t),tS.set(r,o),$r(o,[r])}}var ob=xe.unstable_now;ob();var ne=8;function Co(e){if(1&e)return ne=15,1;if(2&e)return ne=14,2;if(4&e)return ne=13,4;var t=24&e;return t!==0?(ne=12,t):e&32?(ne=11,32):(t=192&e,t!==0?(ne=10,t):e&256?(ne=9,256):(t=3584&e,t!==0?(ne=8,t):e&4096?(ne=7,4096):(t=4186112&e,t!==0?(ne=6,t):(t=62914560&e,t!==0?(ne=5,t):e&67108864?(ne=4,67108864):e&134217728?(ne=3,134217728):(t=805306368&e,t!==0?(ne=2,t):1073741824&e?(ne=1,1073741824):(ne=8,e))))))}function ib(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function sb(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(T(358,e))}}function Ls(e,t){var n=e.pendingLanes;if(n===0)return ne=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=ne=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=Co(l),o=ne):(a&=i,a!==0&&(r=Co(a),o=ne))}else i=n&~s,i!==0?(r=Co(i),o=ne):a!==0&&(r=Co(a),o=ne);if(r===0)return 0;if(r=31-or(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(Co(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-or(t),o=1<<n,r|=e[n],t&=~o;return r}function nS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Dl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=bo(24&~t),e===0?Dl(10,t):e;case 10:return e=bo(192&~t),e===0?Dl(8,t):e;case 8:return e=bo(3584&~t),e===0&&(e=bo(4186112&~t),e===0&&(e=512)),e;case 2:return t=bo(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function bo(e){return e&-e}function Yd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function iu(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-or(t),e[t]=n}var or=Math.clz32?Math.clz32:ub,ab=Math.log,lb=Math.LN2;function ub(e){return e===0?32:31-(ab(e)/lb|0)|0}var cb=xe.unstable_UserBlockingPriority,db=xe.unstable_runWithPriority,El=!0;function fb(e,t,n,r){jr||mp();var o=Sp,i=jr;jr=!0;try{zv(o,e,t,n,r)}finally{(jr=i)||gp()}}function pb(e,t,n,r){db(cb,Sp.bind(null,e,t,n,r))}function Sp(e,t,n,r){if(El){var o;if((o=(t&4)===0)&&0<Xt.length&&-1<Ry.indexOf(e))e=If(null,e,t,n,r),Xt.push(e);else{var i=xp(e,t,n,r);if(i===null)o&&Iy(e,r);else{if(o){if(-1<Ry.indexOf(e)){e=If(i,e,t,n,r),Xt.push(e);return}if(eb(i,e,t,n,r))return;Iy(e,r)}gS(e,t,r,null,n)}}}}function xp(e,t,n,r){var o=fp(r);if(o=Hr(o),o!==null){var i=Gr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=Kv(i),o!==null)return o;o=null}else if(s===3){if(i.stateNode.hydrate)return i.tag===3?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return gS(e,t,r,o,n),null}var $n=null,_p=null,Cl=null;function rS(){if(Cl)return Cl;var e,t=_p,n=t.length,r,o="value"in $n?$n.value:$n.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Cl=o.slice(e,1<r?1-r:void 0)}function bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function pl(){return!0}function Ay(){return!1}function nt(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?pl:Ay,this.isPropagationStopped=Ay,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=pl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pl)},persist:function(){},isPersistent:pl}),t}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wp=nt($o),Bs=ae({},$o,{view:0,detail:0}),mb=nt(Bs),Zd,Jd,ts,su=ae({},Bs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ep,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ts&&(ts&&e.type==="mousemove"?(Zd=e.screenX-ts.screenX,Jd=e.screenY-ts.screenY):Jd=Zd=0,ts=e),Zd)},movementY:function(e){return"movementY"in e?e.movementY:Jd}}),Oy=nt(su),gb=ae({},su,{dataTransfer:0}),hb=nt(gb),yb=ae({},Bs,{relatedTarget:0}),ef=nt(yb),vb=ae({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),Sb=nt(vb),xb=ae({},$o,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_b=nt(xb),wb=ae({},$o,{data:0}),Ny=nt(wb),Eb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bb[e])?!!t[e]:!1}function Ep(){return Tb}var kb=ae({},Bs,{key:function(e){if(e.key){var t=Eb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Cb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ep,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pb=nt(kb),Rb=ae({},su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),My=nt(Rb),Ib=ae({},Bs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ep}),Lb=nt(Ib),Ab=ae({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ob=nt(Ab),Nb=ae({},su,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Mb=nt(Nb),Db=[9,13,27,32],Cp=yn&&"CompositionEvent"in window,vs=null;yn&&"documentMode"in document&&(vs=document.documentMode);var Fb=yn&&"TextEvent"in window&&!vs,oS=yn&&(!Cp||vs&&8<vs&&11>=vs),Dy=String.fromCharCode(32),Fy=!1;function iS(e,t){switch(e){case"keyup":return Db.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ko=!1;function jb(e,t){switch(e){case"compositionend":return sS(t);case"keypress":return t.which!==32?null:(Fy=!0,Dy);case"textInput":return e=t.data,e===Dy&&Fy?null:e;default:return null}}function Hb(e,t){if(ko)return e==="compositionend"||!Cp&&iS(e,t)?(e=rS(),Cl=_p=$n=null,ko=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return oS&&t.locale!=="ko"?null:t.data;default:return null}}var Bb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bb[e.type]:t==="textarea"}function aS(e,t,n,r){Bv(r),t=Fl(t,"onChange"),0<t.length&&(n=new wp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ss=null,As=null;function Ub(e){fS(e,0)}function au(e){var t=Ro(e);if(Ov(t))return e}function zb(e,t){if(e==="change")return t}var lS=!1;yn&&(yn?(gl="oninput"in document,gl||(tf=document.createElement("div"),tf.setAttribute("oninput","return;"),gl=typeof tf.oninput=="function"),ml=gl):ml=!1,lS=ml&&(!document.documentMode||9<document.documentMode));var ml,gl,tf;function Hy(){Ss&&(Ss.detachEvent("onpropertychange",uS),As=Ss=null)}function uS(e){if(e.propertyName==="value"&&au(As)){var t=[];if(aS(t,As,e,fp(e)),e=Ub,jr)e(t);else{jr=!0;try{pp(e,t)}finally{jr=!1,gp()}}}}function Vb(e,t,n){e==="focusin"?(Hy(),Ss=t,As=n,Ss.attachEvent("onpropertychange",uS)):e==="focusout"&&Hy()}function Kb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return au(As)}function Wb(e,t){if(e==="click")return au(t)}function $b(e,t){if(e==="input"||e==="change")return au(t)}function qb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:qb,Gb=Object.prototype.hasOwnProperty;function Os(e,t){if(vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Gb.call(t,n[r])||!vt(e[n[r]],t[n[r]]))return!1;return!0}function By(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uy(e,t){var n=By(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=By(n)}}function cS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zy(){for(var e=window,t=Ol();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ol(e.document)}return t}function Lf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Xb=yn&&"documentMode"in document&&11>=document.documentMode,Po=null,Af=null,xs=null,Of=!1;function Vy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Of||Po==null||Po!==Ol(r)||(r=Po,"selectionStart"in r&&Lf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xs&&Os(xs,r)||(xs=r,r=Fl(Af,"onSelect"),0<r.length&&(t=new wp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Po)))}vp("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);vp("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);vp(rb,2);for(nf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),hl=0;hl<nf.length;hl++)yp.set(nf[hl],0);var nf,hl;zo("onMouseEnter",["mouseout","mouseover"]);zo("onMouseLeave",["mouseout","mouseover"]);zo("onPointerEnter",["pointerout","pointerover"]);zo("onPointerLeave",["pointerout","pointerover"]);$r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$r("onBeforeInput",["compositionend","keypress","textInput","paste"]);$r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ds="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),dS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ds));function Ky(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ZC(r,t,void 0,e),e.currentTarget=null}function fS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Ky(o,a,u),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Ky(o,a,u),i=l}}}if(Ml)throw e=Pf,Ml=!1,Pf=null,e}function ie(e,t){var n=yS(t),r=e+"__bubble";n.has(r)||(mS(t,e,2,!1),n.add(r))}var Wy="_reactListening"+Math.random().toString(36).slice(2);function pS(e){e[Wy]||(e[Wy]=!0,Iv.forEach(function(t){dS.has(t)||$y(t,!1,e,null),$y(t,!0,e,null)}))}function $y(e,t,n,r){var o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,i=n;if(e==="selectionchange"&&n.nodeType!==9&&(i=n.ownerDocument),r!==null&&!t&&dS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=yS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),mS(i,e,o,t),s.add(a))}function mS(e,t,n,r){var o=yp.get(t);switch(o===void 0?2:o){case 0:o=fb;break;case 1:o=pb;break;default:o=Sp}n=o.bind(null,t,n,e),o=void 0,!kf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function gS(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Hr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}GC(function(){var u=i,c=fp(n),f=[];e:{var d=tS.get(e);if(d!==void 0){var y=wp,v=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":y=Pb;break;case"focusin":v="focus",y=ef;break;case"focusout":v="blur",y=ef;break;case"beforeblur":case"afterblur":y=ef;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Oy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=hb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Lb;break;case Yv:case Zv:case Jv:y=Sb;break;case eS:y=Ob;break;case"scroll":y=mb;break;case"wheel":y=Mb;break;case"copy":case"cut":case"paste":y=_b;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=My}var h=(t&4)!==0,g=!h&&e==="scroll",m=h?d!==null?d+"Capture":null:d;h=[];for(var p=u,S;p!==null;){S=p;var _=S.stateNode;if(S.tag===5&&_!==null&&(S=_,m!==null&&(_=Ps(p,m),_!=null&&h.push(Ns(p,_,S)))),g)break;p=p.return}0<h.length&&(d=new y(d,v,null,n,c),f.push({event:d,listeners:h}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(Hr(v)||v[qo]))break e;if((y||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,y?(v=n.relatedTarget||n.toElement,y=u,v=v?Hr(v):null,v!==null&&(g=Gr(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(y=null,v=u),y!==v)){if(h=Oy,_="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(h=My,_="onPointerLeave",m="onPointerEnter",p="pointer"),g=y==null?d:Ro(y),S=v==null?d:Ro(v),d=new h(_,p+"leave",y,n,c),d.target=g,d.relatedTarget=S,_=null,Hr(c)===u&&(h=new h(m,p+"enter",v,n,c),h.target=S,h.relatedTarget=g,_=h),g=_,y&&v)t:{for(h=y,m=v,p=0,S=h;S;S=Eo(S))p++;for(S=0,_=m;_;_=Eo(_))S++;for(;0<p-S;)h=Eo(h),p--;for(;0<S-p;)m=Eo(m),S--;for(;p--;){if(h===m||m!==null&&h===m.alternate)break t;h=Eo(h),m=Eo(m)}h=null}else h=null;y!==null&&qy(f,d,y,h,!1),v!==null&&g!==null&&qy(f,g,v,h,!0)}}e:{if(d=u?Ro(u):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=zb;else if(jy(d))if(lS)C=$b;else{C=Kb;var E=Vb}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=Wb);if(C&&(C=C(e,u))){aS(f,C,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Sf(d,"number",d.value)}switch(E=u?Ro(u):window,e){case"focusin":(jy(E)||E.contentEditable==="true")&&(Po=E,Af=u,xs=null);break;case"focusout":xs=Af=Po=null;break;case"mousedown":Of=!0;break;case"contextmenu":case"mouseup":case"dragend":Of=!1,Vy(f,n,c);break;case"selectionchange":if(Xb)break;case"keydown":case"keyup":Vy(f,n,c)}var b;if(Cp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else ko?iS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(oS&&n.locale!=="ko"&&(ko||R!=="onCompositionStart"?R==="onCompositionEnd"&&ko&&(b=rS()):($n=c,_p="value"in $n?$n.value:$n.textContent,ko=!0)),E=Fl(u,R),0<E.length&&(R=new Ny(R,e,null,n,c),f.push({event:R,listeners:E}),b?R.data=b:(b=sS(n),b!==null&&(R.data=b)))),(b=Fb?jb(e,n):Hb(e,n))&&(u=Fl(u,"onBeforeInput"),0<u.length&&(c=new Ny("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=b))}fS(f,t)})}function Ns(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ps(e,n),i!=null&&r.unshift(Ns(e,i,o)),i=Ps(e,t),i!=null&&r.push(Ns(e,i,o))),e=e.return}return r}function Eo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function qy(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=Ps(n,i),l!=null&&s.unshift(Ns(n,l,a))):o||(l=Ps(n,i),l!=null&&s.push(Ns(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function jl(){}var rf=null,of=null;function hS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Nf(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gy=typeof setTimeout=="function"?setTimeout:void 0,Qb=typeof clearTimeout=="function"?clearTimeout:void 0;function bp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Do(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function Xy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var sf=0;function Yb(e){return{$$typeof:cp,toString:e,valueOf:e}}var lu=Math.random().toString(36).slice(2),qn="__reactFiber$"+lu,Hl="__reactProps$"+lu,qo="__reactContainer$"+lu,Qy="__reactEvents$"+lu;function Hr(e){var t=e[qn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qo]||n[qn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Xy(e);e!==null;){if(n=e[qn])return n;e=Xy(e)}return t}e=n,n=e.parentNode}return null}function Us(e){return e=e[qn]||e[qo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ro(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function uu(e){return e[Hl]||null}function yS(e){var t=e[Qy];return t===void 0&&(t=e[Qy]=new Set),t}var Mf=[],Io=-1;function lr(e){return{current:e}}function se(e){0>Io||(e.current=Mf[Io],Mf[Io]=null,Io--)}function de(e,t){Io++,Mf[Io]=e.current,e.current=t}var ir={},Oe=lr(ir),qe=lr(!1),Vr=ir;function Vo(e,t){var n=e.type.contextTypes;if(!n)return ir;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ge(e){return e=e.childContextTypes,e!=null}function Bl(){se(qe),se(Oe)}function Yy(e,t,n){if(Oe.current!==ir)throw Error(T(168));de(Oe,t),de(qe,n)}function vS(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(T(108,Ao(t)||"Unknown",o));return ae({},n,r)}function Tl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ir,Vr=Oe.current,de(Oe,e),de(qe,qe.current),!0}function Zy(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=vS(e,t,Vr),r.__reactInternalMemoizedMergedChildContext=e,se(qe),se(Oe),de(Oe,e)):se(qe),de(qe,n)}var Tp=null,zr=null,Zb=xe.unstable_runWithPriority,kp=xe.unstable_scheduleCallback,Df=xe.unstable_cancelCallback,Jb=xe.unstable_shouldYield,Jy=xe.unstable_requestPaint,Ff=xe.unstable_now,eT=xe.unstable_getCurrentPriorityLevel,cu=xe.unstable_ImmediatePriority,SS=xe.unstable_UserBlockingPriority,xS=xe.unstable_NormalPriority,_S=xe.unstable_LowPriority,wS=xe.unstable_IdlePriority,af={},tT=Jy!==void 0?Jy:function(){},fn=null,kl=null,lf=!1,ev=Ff(),Le=1e4>ev?Ff:function(){return Ff()-ev};function Ko(){switch(eT()){case cu:return 99;case SS:return 98;case xS:return 97;case _S:return 96;case wS:return 95;default:throw Error(T(332))}}function ES(e){switch(e){case 99:return cu;case 98:return SS;case 97:return xS;case 96:return _S;case 95:return wS;default:throw Error(T(332))}}function Kr(e,t){return e=ES(e),Zb(e,t)}function Ms(e,t,n){return e=ES(e),kp(e,t,n)}function en(){if(kl!==null){var e=kl;kl=null,Df(e)}CS()}function CS(){if(!lf&&fn!==null){lf=!0;var e=0;try{var t=fn;Kr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),fn=null}catch(n){throw fn!==null&&(fn=fn.slice(e+1)),kp(cu,en),n}finally{lf=!1}}}var nT=qr.ReactCurrentBatchConfig;function Ot(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ul=lr(null),zl=null,Lo=null,Vl=null;function Pp(){Vl=Lo=zl=null}function Rp(e){var t=Ul.current;se(Ul),e.type._context._currentValue=t}function bS(e,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)===t){if(n===null||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,n!==null&&(n.childLanes|=t);e=e.return}}function Fo(e,t){zl=e,Vl=Lo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Nt=!0),e.firstContext=null)}function _t(e,t){if(Vl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Vl=e,t=1073741823),t={context:e,observedBits:t,next:null},Lo===null){if(zl===null)throw Error(T(308));Lo=t,zl.dependencies={lanes:0,firstContext:t,responders:null}}else Lo=Lo.next=t;return e._currentValue}var Kn=!1;function Ip(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function TS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function tv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ds(e,t,n,r){var o=e.updateQueue;Kn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var f=c.lastBaseUpdate;f!==s&&(f===null?c.firstBaseUpdate=u:f.next=u,c.lastBaseUpdate=l)}}if(i!==null){f=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var y=e,v=i;switch(a=t,d=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(d,f,a);break e}f=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=v.payload,a=typeof y=="function"?y.call(d,f,a):y,a==null)break e;f=ae({},f,a);break e;case 2:Kn=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,Vs|=s,e.lanes=s,e.memoizedState=f}}function nv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(T(191,o));o.call(r)}}}var kS=new tu.Component().refs;function Kl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var du={isMounted:function(e){return(e=e._reactInternals)?Gr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tt(),o=er(e),i=Zn(r,o);i.payload=t,n!=null&&(i.callback=n),Jn(e,i),tr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tt(),o=er(e),i=Zn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Jn(e,i),tr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tt(),r=er(e),o=Zn(n,r);o.tag=2,t!=null&&(o.callback=t),Jn(e,o),tr(e,r,n)}};function rv(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Os(n,r)||!Os(o,i):!0}function PS(e,t,n){var r=!1,o=ir,i=t.contextType;return typeof i=="object"&&i!==null?i=_t(i):(o=Ge(t)?Vr:Oe.current,r=t.contextTypes,i=(r=r!=null)?Vo(e,o):ir),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=du,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ov(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&du.enqueueReplaceState(t,t.state,null)}function jf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=kS,Ip(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=_t(i):(i=Ge(t)?Vr:Oe.current,o.context=Vo(e,i)),Ds(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Kl(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&du.enqueueReplaceState(o,o.state,null),Ds(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var yl=Array.isArray;function ns(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(T(309));var r=n.stateNode}if(!r)throw Error(T(147,e));var o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=r.refs;s===kS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function vl(e,t){if(e.type!=="textarea")throw Error(T(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function RS(e){function t(g,m){if(e){var p=g.lastEffect;p!==null?(p.nextEffect=m,g.lastEffect=m):g.firstEffect=g.lastEffect=m,m.nextEffect=null,m.flags=8}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function o(g,m){return g=ar(g,m),g.index=0,g.sibling=null,g}function i(g,m,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<m?(g.flags=2,m):p):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,p,S){return m===null||m.tag!==6?(m=pf(p,g.mode,S),m.return=g,m):(m=o(m,p),m.return=g,m)}function l(g,m,p,S){return m!==null&&m.elementType===p.type?(S=o(m,p.props),S.ref=ns(g,m,p),S.return=g,S):(S=Ll(p.type,p.key,p.props,null,g.mode,S),S.ref=ns(g,m,p),S.return=g,S)}function u(g,m,p,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=mf(p,g.mode,S),m.return=g,m):(m=o(m,p.children||[]),m.return=g,m)}function c(g,m,p,S,_){return m===null||m.tag!==7?(m=Uo(p,g.mode,S,_),m.return=g,m):(m=o(m,p),m.return=g,m)}function f(g,m,p){if(typeof m=="string"||typeof m=="number")return m=pf(""+m,g.mode,p),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case us:return p=Ll(m.type,m.key,m.props,null,g.mode,p),p.ref=ns(g,null,m),p.return=g,p;case Fr:return m=mf(m,g.mode,p),m.return=g,m}if(yl(m)||Yi(m))return m=Uo(m,g.mode,p,null),m.return=g,m;vl(g,m)}return null}function d(g,m,p,S){var _=m!==null?m.key:null;if(typeof p=="string"||typeof p=="number")return _!==null?null:a(g,m,""+p,S);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case us:return p.key===_?p.type===Wn?c(g,m,p.props.children,S,_):l(g,m,p,S):null;case Fr:return p.key===_?u(g,m,p,S):null}if(yl(p)||Yi(p))return _!==null?null:c(g,m,p,S,null);vl(g,p)}return null}function y(g,m,p,S,_){if(typeof S=="string"||typeof S=="number")return g=g.get(p)||null,a(m,g,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case us:return g=g.get(S.key===null?p:S.key)||null,S.type===Wn?c(m,g,S.props.children,_,S.key):l(m,g,S,_);case Fr:return g=g.get(S.key===null?p:S.key)||null,u(m,g,S,_)}if(yl(S)||Yi(S))return g=g.get(p)||null,c(m,g,S,_,null);vl(m,S)}return null}function v(g,m,p,S){for(var _=null,C=null,E=m,b=m=0,R=null;E!==null&&b<p.length;b++){E.index>b?(R=E,E=null):R=E.sibling;var P=d(g,E,p[b],S);if(P===null){E===null&&(E=R);break}e&&E&&P.alternate===null&&t(g,E),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P,E=R}if(b===p.length)return n(g,E),_;if(E===null){for(;b<p.length;b++)E=f(g,p[b],S),E!==null&&(m=i(E,m,b),C===null?_=E:C.sibling=E,C=E);return _}for(E=r(g,E);b<p.length;b++)R=y(E,g,b,p[b],S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?b:R.key),m=i(R,m,b),C===null?_=R:C.sibling=R,C=R);return e&&E.forEach(function(N){return t(g,N)}),_}function h(g,m,p,S){var _=Yi(p);if(typeof _!="function")throw Error(T(150));if(p=_.call(p),p==null)throw Error(T(151));for(var C=_=null,E=m,b=m=0,R=null,P=p.next();E!==null&&!P.done;b++,P=p.next()){E.index>b?(R=E,E=null):R=E.sibling;var N=d(g,E,P.value,S);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(g,E),m=i(N,m,b),C===null?_=N:C.sibling=N,C=N,E=R}if(P.done)return n(g,E),_;if(E===null){for(;!P.done;b++,P=p.next())P=f(g,P.value,S),P!==null&&(m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return _}for(E=r(g,E);!P.done;b++,P=p.next())P=y(E,g,b,P.value,S),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?b:P.key),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return e&&E.forEach(function(G){return t(g,G)}),_}return function(g,m,p,S){var _=typeof p=="object"&&p!==null&&p.type===Wn&&p.key===null;_&&(p=p.props.children);var C=typeof p=="object"&&p!==null;if(C)switch(p.$$typeof){case us:e:{for(C=p.key,_=m;_!==null;){if(_.key===C){switch(_.tag){case 7:if(p.type===Wn){n(g,_.sibling),m=o(_,p.props.children),m.return=g,g=m;break e}break;default:if(_.elementType===p.type){n(g,_.sibling),m=o(_,p.props),m.ref=ns(g,_,p),m.return=g,g=m;break e}}n(g,_);break}else t(g,_);_=_.sibling}p.type===Wn?(m=Uo(p.props.children,g.mode,S,p.key),m.return=g,g=m):(S=Ll(p.type,p.key,p.props,null,g.mode,S),S.ref=ns(g,m,p),S.return=g,g=S)}return s(g);case Fr:e:{for(_=p.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){n(g,m.sibling),m=o(m,p.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=mf(p,g.mode,S),m.return=g,g=m}return s(g)}if(typeof p=="string"||typeof p=="number")return p=""+p,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,p),m.return=g,g=m):(n(g,m),m=pf(p,g.mode,S),m.return=g,g=m),s(g);if(yl(p))return v(g,m,p,S);if(Yi(p))return h(g,m,p,S);if(C&&vl(g,p),typeof p>"u"&&!_)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Ao(g.type)||"Component"))}return n(g,m)}}var Wl=RS(!0),IS=RS(!1),zs={},Zt=lr(zs),Fs=lr(zs),js=lr(zs);function Br(e){if(e===zs)throw Error(T(174));return e}function Hf(e,t){switch(de(js,t),de(Fs,e),de(Zt,zs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ef(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ef(t,e)}se(Zt),de(Zt,t)}function Wo(){se(Zt),se(Fs),se(js)}function iv(e){Br(js.current);var t=Br(Zt.current),n=Ef(t,e.type);t!==n&&(de(Fs,e),de(Zt,n))}function Lp(e){Fs.current===e&&(se(Zt),se(Fs))}var ce=lr(0);function $l(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=null,Gn=null,Jt=!1;function LS(e,t){var n=St(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function sv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Bf(e){if(Jt){var t=Gn;if(t){var n=t;if(!sv(e,t)){if(t=Do(n.nextSibling),!t||!sv(e,t)){e.flags=e.flags&-1025|2,Jt=!1,mn=e;return}LS(mn,n)}mn=e,Gn=Do(t.firstChild)}else e.flags=e.flags&-1025|2,Jt=!1,mn=e}}function av(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function Sl(e){if(e!==mn)return!1;if(!Jt)return av(e),Jt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Nf(t,e.memoizedProps))for(t=Gn;t;)LS(e,t),t=Do(t.nextSibling);if(av(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Gn=Do(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Gn=null}}else Gn=mn?Do(e.stateNode.nextSibling):null;return!0}function uf(){Gn=mn=null,Jt=!1}var jo=[];function Ap(){for(var e=0;e<jo.length;e++)jo[e]._workInProgressVersionPrimary=null;jo.length=0}var _s=qr.ReactCurrentDispatcher,xt=qr.ReactCurrentBatchConfig,Hs=0,ge=null,Ie=null,Ce=null,ql=!1,ws=!1;function We(){throw Error(T(321))}function Op(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0}function Np(e,t,n,r,o,i){if(Hs=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_s.current=e===null||e.memoizedState===null?oT:iT,e=n(r,o),ws){i=0;do{if(ws=!1,!(25>i))throw Error(T(301));i+=1,Ce=Ie=null,t.updateQueue=null,_s.current=sT,e=n(r,o)}while(ws)}if(_s.current=Yl,t=Ie!==null&&Ie.next!==null,Hs=0,Ce=Ie=ge=null,ql=!1,t)throw Error(T(300));return e}function Ur(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ce===null?ge.memoizedState=Ce=e:Ce=Ce.next=e,Ce}function Xr(){if(Ie===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=Ce===null?ge.memoizedState:Ce.next;if(t!==null)Ce=t,Ie=e;else{if(e===null)throw Error(T(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},Ce===null?ge.memoizedState=Ce=e:Ce=Ce.next=e}return Ce}function Qt(e,t){return typeof t=="function"?t(e):t}function rs(e){var t=Xr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Ie,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){o=o.next,r=r.baseState;var a=s=i=null,l=o;do{var u=l.lane;if((Hs&u)===u)a!==null&&(a=a.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var c={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,ge.lanes|=u,Vs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,vt(r,t.memoizedState)||(Nt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function os(e){var t=Xr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);vt(i,t.memoizedState)||(Nt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function lv(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(o!==null?e=o===r:(e=e.mutableReadLanes,(e=(Hs&e)===e)&&(t._workInProgressVersionPrimary=r,jo.push(t))),e)return n(t._source);throw jo.push(t),Error(T(350))}function AS(e,t,n,r){var o=Be;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=_s.current,l=a.useState(function(){return lv(o,t,n)}),u=l[1],c=l[0];l=Ce;var f=e.memoizedState,d=f.refs,y=d.getSnapshot,v=f.source;f=f.subscribe;var h=ge;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!vt(s,g)){g=n(t._source),vt(c,g)||(u(g),g=er(h),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,p=g;0<p;){var S=31-or(p),_=1<<S;m[S]|=g,p&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var p=er(h);o.mutableReadLanes|=p&o.pendingLanes}catch(S){m(function(){throw S})}})},[t,r]),vt(y,n)&&vt(v,t)&&vt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:c},e.dispatch=u=Fp.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=lv(o,t,n),l.memoizedState=l.baseState=c),c}function OS(e,t,n){var r=Xr();return AS(r,e,t,n)}function is(e){var t=Ur();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:e},e=e.dispatch=Fp.bind(null,ge,e),[t.memoizedState,e]}function Gl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null},ge.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function uv(e){var t=Ur();return e={current:e},t.memoizedState=e}function Xl(){return Xr().memoizedState}function Uf(e,t,n,r){var o=Ur();ge.flags|=e,o.memoizedState=Gl(1|t,n,void 0,r===void 0?null:r)}function Mp(e,t,n,r){var o=Xr();r=r===void 0?null:r;var i=void 0;if(Ie!==null){var s=Ie.memoizedState;if(i=s.destroy,r!==null&&Op(r,s.deps)){Gl(t,n,i,r);return}}ge.flags|=e,o.memoizedState=Gl(1|t,n,i,r)}function cv(e,t){return Uf(516,4,e,t)}function Ql(e,t){return Mp(516,4,e,t)}function NS(e,t){return Mp(4,2,e,t)}function MS(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function DS(e,t,n){return n=n!=null?n.concat([e]):null,Mp(4,2,MS.bind(null,t,e),n)}function Dp(){}function FS(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Op(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function jS(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Op(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rT(e,t){var n=Ko();Kr(98>n?98:n,function(){e(!0)}),Kr(97<n?97:n,function(){var r=xt.transition;xt.transition=1;try{e(!1),t()}finally{xt.transition=r}})}function Fp(e,t,n){var r=tt(),o=er(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i,s=e.alternate,e===ge||s!==null&&s===ge)ws=ql=!0;else{if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.eagerReducer=s,i.eagerState=l,vt(l,a))return}catch{}finally{}tr(e,o,r)}}var Yl={readContext:_t,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useOpaqueIdentifier:We,unstable_isNewReconciler:!1},oT={readContext:_t,useCallback:function(e,t){return Ur().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:cv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Uf(4,2,MS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Uf(4,2,e,t)},useMemo:function(e,t){var n=Ur();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ur();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=Fp.bind(null,ge,e),[r.memoizedState,e]},useRef:uv,useState:is,useDebugValue:Dp,useDeferredValue:function(e){var t=is(e),n=t[0],r=t[1];return cv(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=is(!1),t=e[0];return e=rT.bind(null,e[1]),uv(e),[e,t]},useMutableSource:function(e,t,n){var r=Ur();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},AS(r,e,t,n)},useOpaqueIdentifier:function(){if(Jt){var e=!1,t=Yb(function(){throw e||(e=!0,n("r:"+(sf++).toString(36))),Error(T(355))}),n=is(t)[1];return!(ge.mode&2)&&(ge.flags|=516,Gl(5,function(){n("r:"+(sf++).toString(36))},void 0,null)),t}return t="r:"+(sf++).toString(36),is(t),t},unstable_isNewReconciler:!1},iT={readContext:_t,useCallback:FS,useContext:_t,useEffect:Ql,useImperativeHandle:DS,useLayoutEffect:NS,useMemo:jS,useReducer:rs,useRef:Xl,useState:function(){return rs(Qt)},useDebugValue:Dp,useDeferredValue:function(e){var t=rs(Qt),n=t[0],r=t[1];return Ql(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=rs(Qt)[0];return[Xl().current,e]},useMutableSource:OS,useOpaqueIdentifier:function(){return rs(Qt)[0]},unstable_isNewReconciler:!1},sT={readContext:_t,useCallback:FS,useContext:_t,useEffect:Ql,useImperativeHandle:DS,useLayoutEffect:NS,useMemo:jS,useReducer:os,useRef:Xl,useState:function(){return os(Qt)},useDebugValue:Dp,useDeferredValue:function(e){var t=os(Qt),n=t[0],r=t[1];return Ql(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=os(Qt)[0];return[Xl().current,e]},useMutableSource:OS,useOpaqueIdentifier:function(){return os(Qt)[0]},unstable_isNewReconciler:!1},aT=qr.ReactCurrentOwner,Nt=!1;function $e(e,t,n,r){t.child=e===null?IS(t,null,n,r):Wl(t,e.child,n,r)}function dv(e,t,n,r,o){n=n.render;var i=t.ref;return Fo(t,o),r=Np(e,t,n,r,i,o),e!==null&&!Nt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,$e(e,t,r,o),t.child)}function fv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Vp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,HS(e,t,s,r,o,i)):(e=Ll(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}return s=e.child,!(o&i)&&(o=s.memoizedProps,n=n.compare,n=n!==null?n:Os,n(o,r)&&e.ref===t.ref)?gn(e,t,i):(t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e)}function HS(e,t,n,r,o,i){if(e!==null&&Os(e.memoizedProps,r)&&e.ref===t.ref)if(Nt=!1,(i&o)!==0)e.flags&16384&&(Nt=!0);else return t.lanes=e.lanes,gn(e,t,i);return zf(e,t,n,r,i)}function cf(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden"||r.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},_l(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},_l(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},_l(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,_l(t,r);return $e(e,t,o,n),t.child}function BS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function zf(e,t,n,r,o){var i=Ge(n)?Vr:Oe.current;return i=Vo(t,i),Fo(t,o),n=Np(e,t,n,r,i,o),e!==null&&!Nt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,$e(e,t,n,o),t.child)}function pv(e,t,n,r,o){if(Ge(n)){var i=!0;Tl(t)}else i=!1;if(Fo(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),PS(t,n,r),jf(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=_t(u):(u=Ge(n)?Vr:Oe.current,u=Vo(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&ov(t,s,r,u),Kn=!1;var d=t.memoizedState;s.state=d,Ds(t,r,s,o),l=t.memoizedState,a!==r||d!==l||qe.current||Kn?(typeof c=="function"&&(Kl(t,n,c,r),l=t.memoizedState),(a=Kn||rv(t,n,a,r,d,l,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,TS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Ot(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=_t(l):(l=Ge(n)?Vr:Oe.current,l=Vo(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&ov(t,s,r,l),Kn=!1,d=t.memoizedState,s.state=d,Ds(t,r,s,o);var v=t.memoizedState;a!==f||d!==v||qe.current||Kn?(typeof y=="function"&&(Kl(t,n,y,r),v=t.memoizedState),(u=Kn||rv(t,n,u,r,d,v,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Vf(e,t,n,r,i,o)}function Vf(e,t,n,r,o,i){BS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&Zy(t,n,!1),gn(e,t,i);r=t.stateNode,aT.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Wl(t,e.child,null,i),t.child=Wl(t,null,a,i)):$e(e,t,a,i),t.memoizedState=r.state,o&&Zy(t,n,!0),t.child}function mv(e){var t=e.stateNode;t.pendingContext?Yy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Yy(e,t.context,!1),Hf(e,t.containerInfo)}var xl={dehydrated:null,retryLane:0};function gv(e,t,n){var r=t.pendingProps,o=ce.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),de(ce,o&1),e===null?(r.fallback!==void 0&&Bf(t),e=r.children,o=r.fallback,i?(e=hv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=xl,e):typeof r.unstable_expectedLoadTime=="number"?(e=hv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=xl,t.lanes=33554432,e):(n=Kp({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=vv(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=xl,r):(n=yv(e,t,r.children,n),t.memoizedState=null,n):i?(r=vv(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=xl,r):(n=yv(e,t,r.children,n),t.memoizedState=null,n)}function hv(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},!(o&2)&&i!==null?(i.childLanes=0,i.pendingProps=t):i=Kp(t,o,0,null),n=Uo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function yv(e,t,n,r){var o=e.child;return e=o.sibling,n=ar(o,{mode:"visible",children:n}),!(t.mode&2)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function vv(e,t,n,r,o){var i=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return!(i&2)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=a,s=n.lastEffect,s!==null?(t.firstEffect=n.firstEffect,t.lastEffect=s,s.nextEffect=null):t.firstEffect=t.lastEffect=null):n=ar(s,a),e!==null?r=ar(e,r):(r=Uo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Sv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),bS(e.return,t)}function df(e,t,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o,s.lastEffect=i)}function xv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if($e(e,t,r.children,n),r=ce.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sv(e,n);else if(e.tag===19)Sv(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(ce,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&$l(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),df(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&$l(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}df(t,!0,n,null,i,t.lastEffect);break;case"together":df(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Vs|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=ar(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ar(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var US,Kf,zS,VS;US=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Kf=function(){};zS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Br(Zt.current);var i=null;switch(n){case"input":o=yf(e,o),r=yf(e,r),i=[];break;case"option":o=xf(e,o),r=xf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=_f(e,o),r=_f(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=jl)}Cf(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ts.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ts.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===cp?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};VS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ss(e,t){if(!Jt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function lT(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ge(t.type)&&Bl(),null;case 3:return Wo(),se(qe),se(Oe),Ap(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Kf(t),null;case 5:Lp(t);var o=Br(js.current);if(n=t.type,e!==null&&t.stateNode!=null)zS(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(T(166));return null}if(e=Br(Zt.current),Sl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[qn]=t,r[Hl]=i,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(e=0;e<ds.length;e++)ie(ds[e],r);break;case"source":ie("error",r);break;case"img":case"image":case"link":ie("error",r),ie("load",r);break;case"details":ie("toggle",r);break;case"input":wy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Cy(r,i),ie("invalid",r)}Cf(n,i),e=null;for(var s in i)i.hasOwnProperty(s)&&(o=i[s],s==="children"?typeof o=="string"?r.textContent!==o&&(e=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(e=["children",""+o]):Ts.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":cl(r),Ey(r,i,!0);break;case"textarea":cl(r),by(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=jl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===wf.html&&(e=Dv(n)),e===wf.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[qn]=t,e[Hl]=r,US(e,t,!1,!1),t.stateNode=e,s=bf(n,r),n){case"dialog":ie("cancel",e),ie("close",e),o=r;break;case"iframe":case"object":case"embed":ie("load",e),o=r;break;case"video":case"audio":for(o=0;o<ds.length;o++)ie(ds[o],e);o=r;break;case"source":ie("error",e),o=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),o=r;break;case"details":ie("toggle",e),o=r;break;case"input":wy(e,r),o=yf(e,r),ie("invalid",e);break;case"option":o=xf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Cy(e,r),o=_f(e,r),ie("invalid",e);break;default:o=r}Cf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Hv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Fv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ks(e,l):typeof l=="number"&&ks(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ts.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&op(e,i,l,s))}switch(n){case"input":cl(e),Ey(e,r,!1);break;case"textarea":cl(e),by(e);break;case"option":r.value!=null&&e.setAttribute("value",""+rr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Oo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Oo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=jl)}hS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)VS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Br(js.current),Br(Zt.current),Sl(t)?(r=t.stateNode,n=t.memoizedProps,r[qn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[qn]=t,t.stateNode=r)}return null;case 13:return se(ce),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&Sl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?be===0&&(be=3):((be===0||be===3)&&(be=4),Be===null||!(Vs&134217727)&&!(Xo&134217727)||Ho(Be,Ae))),(r||n)&&(t.flags|=4),null);case 4:return Wo(),Kf(t),e===null&&pS(t.stateNode.containerInfo),null;case 10:return Rp(t),null;case 17:return Ge(t.type)&&Bl(),null;case 19:if(se(ce),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)ss(r,!1);else{if(be!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=$l(e),s!==null){for(t.flags|=64,ss(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(ce,ce.current&1|2),t.child}e=e.sibling}r.tail!==null&&Le()>Qf&&(t.flags|=64,i=!0,ss(r,!1),t.lanes=33554432)}else{if(!i)if(e=$l(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ss(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Jt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Le()-r.renderingStartTime>Qf&&n!==1073741824&&(t.flags|=64,i=!0,ss(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Le(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return zp(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(T(156,t.tag))}function uT(e){switch(e.tag){case 1:Ge(e.type)&&Bl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Wo(),se(qe),se(Oe),Ap(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Lp(e),null;case 13:return se(ce),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(ce),null;case 4:return Wo(),null;case 10:return Rp(e),null;case 23:case 24:return zp(),null;default:return null}}function jp(e,t){try{var n="",r=t;do n+=VC(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
5
|
+
`+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{Zd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ps(e):""}function tC(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=cl(e.type,!1),e;case 11:return e=cl(e.type.render,!1),e;case 22:return e=cl(e.type._render,!1),e;case 1:return e=cl(e.type,!0),e;default:return""}}function Do(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wn:return"Fragment";case jr:return"Portal";case hs:return"Profiler";case uf:return"StrictMode";case ys:return"Suspense";case Ol:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case df:return(e.displayName||"Context")+".Consumer";case cf:return(e._context.displayName||"Context")+".Provider";case ru:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case ou:return Do(e.type);case ff:return Do(e._render);case pf:t=e._payload,e=e._init;try{return Do(e(t))}catch{}}return null}function rr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Bv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nC(e){var t=Bv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dl(e){e._valueTracker||(e._valueTracker=nC(e))}function Hv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Bv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xp(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ry(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zv(e,t){t=t.checked,t!=null&&lf(e,"checked",t,!1)}function _p(e,t){zv(e,t);var n=rr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?wp(e,t.type,n):t.hasOwnProperty("defaultValue")&&wp(e,t.type,rr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Iy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function wp(e,t,n){(t!=="number"||Nl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function rC(e){var t="";return nu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function bp(e,t){return e=ae({children:void 0},t),(t=rC(t.children))&&(e.children=t),e}function Fo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+rr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ep(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ay(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:rr(n)}}function Uv(e,t){var n=rr(t.value),r=rr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ly(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Cp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Vv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Tp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Vv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pl,Kv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==Cp.svg||"innerHTML"in e)e.innerHTML=t;else{for(pl=pl||document.createElement("div"),pl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vs={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oC=["Webkit","ms","Moz","O"];Object.keys(vs).forEach(function(e){oC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vs[t]=vs[e]})});function Wv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vs.hasOwnProperty(e)&&vs[e]?(""+t).trim():t+"px"}function $v(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Wv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var iC=ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kp(e,t){if(t){if(iC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function Pp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function hf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rp=null,jo=null,Bo=null;function Oy(e){if(e=Vs(e)){if(typeof Rp!="function")throw Error(T(280));var t=e.stateNode;t&&(t=cu(t),Rp(e.stateNode,e.type,t))}}function qv(e){jo?Bo?Bo.push(e):Bo=[e]:jo=e}function Gv(){if(jo){var e=jo,t=Bo;if(Bo=jo=null,Oy(e),t)for(e=0;e<t.length;e++)Oy(t[e])}}function yf(e,t){return e(t)}function Xv(e,t,n,r,o){return e(t,n,r,o)}function vf(){}var Qv=yf,Br=!1,Jd=!1;function Sf(){(jo!==null||Bo!==null)&&(vf(),Gv())}function sC(e,t,n){if(Jd)return e(t,n);Jd=!0;try{return Qv(e,t,n)}finally{Jd=!1,Sf()}}function Is(e,t){var n=e.stateNode;if(n===null)return null;var r=cu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(T(231,t,typeof n));return n}var Ip=!1;if(yn)try{To={},Object.defineProperty(To,"passive",{get:function(){Ip=!0}}),window.addEventListener("test",To,To),window.removeEventListener("test",To,To)}catch{Ip=!1}var To;function aC(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ss=!1,Ml=null,Dl=!1,Ap=null,lC={onError:function(e){Ss=!0,Ml=e}};function uC(e,t,n,r,o,i,s,a,l){Ss=!1,Ml=null,aC.apply(lC,arguments)}function cC(e,t,n,r,o,i,s,a,l){if(uC.apply(this,arguments),Ss){if(Ss){var u=Ml;Ss=!1,Ml=null}else throw Error(T(198));Dl||(Dl=!0,Ap=u)}}function Xr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Yv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ny(e){if(Xr(e)!==e)throw Error(T(188))}function dC(e){var t=e.alternate;if(!t){if(t=Xr(e),t===null)throw Error(T(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Ny(o),e;if(i===r)return Ny(o),t;i=i.sibling}throw Error(T(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function Zv(e){if(e=dC(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function My(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var Jv,xf,eS,tS,Lp=!1,Yt=[],Xn=null,Qn=null,Yn=null,As=new Map,Ls=new Map,es=[],Dy="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Op(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Fy(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":As.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ls.delete(t.pointerId)}}function ts(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Op(t,n,r,o,i),t!==null&&(t=Vs(t),t!==null&&xf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function pC(e,t,n,r,o){switch(t){case"focusin":return Xn=ts(Xn,e,t,n,r,o),!0;case"dragenter":return Qn=ts(Qn,e,t,n,r,o),!0;case"mouseover":return Yn=ts(Yn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return As.set(i,ts(As.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ls.set(i,ts(Ls.get(i)||null,e,t,n,r,o)),!0}return!1}function fC(e){var t=Hr(e.target);if(t!==null){var n=Xr(t);if(n!==null){if(t=n.tag,t===13){if(t=Yv(n),t!==null){e.blockedOn=t,tS(e.lanePriority,function(){_e.unstable_runWithPriority(e.priority,function(){eS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function bl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ef(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Vs(n),t!==null&&xf(t),e.blockedOn=n,!1;t.shift()}return!0}function jy(e,t,n){bl(e)&&n.delete(t)}function mC(){for(Lp=!1;0<Yt.length;){var e=Yt[0];if(e.blockedOn!==null){e=Vs(e.blockedOn),e!==null&&Jv(e);break}for(var t=e.targetContainers;0<t.length;){var n=Ef(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Yt.shift()}Xn!==null&&bl(Xn)&&(Xn=null),Qn!==null&&bl(Qn)&&(Qn=null),Yn!==null&&bl(Yn)&&(Yn=null),As.forEach(jy),Ls.forEach(jy)}function ns(e,t){e.blockedOn===t&&(e.blockedOn=null,Lp||(Lp=!0,_e.unstable_scheduleCallback(_e.unstable_NormalPriority,mC)))}function nS(e){function t(o){return ns(o,e)}if(0<Yt.length){ns(Yt[0],e);for(var n=1;n<Yt.length;n++){var r=Yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Xn!==null&&ns(Xn,e),Qn!==null&&ns(Qn,e),Yn!==null&&ns(Yn,e),As.forEach(t),Ls.forEach(t),n=0;n<es.length;n++)r=es[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<es.length&&(n=es[0],n.blockedOn===null);)fC(n),n.blockedOn===null&&es.shift()}function fl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Io={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionend:fl("Transition","TransitionEnd")},ep={},rS={};yn&&(rS=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function iu(e){if(ep[e])return ep[e];if(!Io[e])return e;var t=Io[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rS)return ep[e]=t[n];return e}var oS=iu("animationend"),iS=iu("animationiteration"),sS=iu("animationstart"),aS=iu("transitionend"),lS=new Map,_f=new Map,gC=["abort","abort",oS,"animationEnd",iS,"animationIteration",sS,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",aS,"transitionEnd","waiting","waiting"];function wf(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),_f.set(r,t),lS.set(r,o),qr(o,[r])}}var hC=_e.unstable_now;hC();var ne=8;function Po(e){if(1&e)return ne=15,1;if(2&e)return ne=14,2;if(4&e)return ne=13,4;var t=24&e;return t!==0?(ne=12,t):e&32?(ne=11,32):(t=192&e,t!==0?(ne=10,t):e&256?(ne=9,256):(t=3584&e,t!==0?(ne=8,t):e&4096?(ne=7,4096):(t=4186112&e,t!==0?(ne=6,t):(t=62914560&e,t!==0?(ne=5,t):e&67108864?(ne=4,67108864):e&134217728?(ne=3,134217728):(t=805306368&e,t!==0?(ne=2,t):1073741824&e?(ne=1,1073741824):(ne=8,e))))))}function yC(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function vC(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(T(358,e))}}function Os(e,t){var n=e.pendingLanes;if(n===0)return ne=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=ne=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=Po(l),o=ne):(a&=i,a!==0&&(r=Po(a),o=ne))}else i=n&~s,i!==0?(r=Po(i),o=ne):a!==0&&(r=Po(a),o=ne);if(r===0)return 0;if(r=31-or(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(Po(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-or(t),o=1<<n,r|=e[n],t&=~o;return r}function uS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Fl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Ro(24&~t),e===0?Fl(10,t):e;case 10:return e=Ro(192&~t),e===0?Fl(8,t):e;case 8:return e=Ro(3584&~t),e===0&&(e=Ro(4186112&~t),e===0&&(e=512)),e;case 2:return t=Ro(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function Ro(e){return e&-e}function tp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function su(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-or(t),e[t]=n}var or=Math.clz32?Math.clz32:_C,SC=Math.log,xC=Math.LN2;function _C(e){return e===0?32:31-(SC(e)/xC|0)|0}var wC=_e.unstable_UserBlockingPriority,bC=_e.unstable_runWithPriority,El=!0;function EC(e,t,n,r){Br||vf();var o=bf,i=Br;Br=!0;try{Xv(o,e,t,n,r)}finally{(Br=i)||Sf()}}function CC(e,t,n,r){bC(wC,bf.bind(null,e,t,n,r))}function bf(e,t,n,r){if(El){var o;if((o=(t&4)===0)&&0<Yt.length&&-1<Dy.indexOf(e))e=Op(null,e,t,n,r),Yt.push(e);else{var i=Ef(e,t,n,r);if(i===null)o&&Fy(e,r);else{if(o){if(-1<Dy.indexOf(e)){e=Op(i,e,t,n,r),Yt.push(e);return}if(pC(i,e,t,n,r))return;Fy(e,r)}wS(e,t,r,null,n)}}}}function Ef(e,t,n,r){var o=hf(r);if(o=Hr(o),o!==null){var i=Xr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=Yv(i),o!==null)return o;o=null}else if(s===3){if(i.stateNode.hydrate)return i.tag===3?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return wS(e,t,r,o,n),null}var $n=null,Cf=null,Cl=null;function cS(){if(Cl)return Cl;var e,t=Cf,n=t.length,r,o="value"in $n?$n.value:$n.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Cl=o.slice(e,1<r?1-r:void 0)}function Tl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ml(){return!0}function By(){return!1}function it(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ml:By,this.isPropagationStopped=By,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ml)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ml)},persist:function(){},isPersistent:ml}),t}var Qo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tf=it(Qo),Us=ae({},Qo,{view:0,detail:0}),TC=it(Us),np,rp,rs,au=ae({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kf,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rs&&(rs&&e.type==="mousemove"?(np=e.screenX-rs.screenX,rp=e.screenY-rs.screenY):rp=np=0,rs=e),np)},movementY:function(e){return"movementY"in e?e.movementY:rp}}),Hy=it(au),kC=ae({},au,{dataTransfer:0}),PC=it(kC),RC=ae({},Us,{relatedTarget:0}),op=it(RC),IC=ae({},Qo,{animationName:0,elapsedTime:0,pseudoElement:0}),AC=it(IC),LC=ae({},Qo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),OC=it(LC),NC=ae({},Qo,{data:0}),zy=it(NC),MC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},FC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=FC[e])?!!t[e]:!1}function kf(){return jC}var BC=ae({},Us,{key:function(e){if(e.key){var t=MC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?DC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kf,charCode:function(e){return e.type==="keypress"?Tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),HC=it(BC),zC=ae({},au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uy=it(zC),UC=ae({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kf}),VC=it(UC),KC=ae({},Qo,{propertyName:0,elapsedTime:0,pseudoElement:0}),WC=it(KC),$C=ae({},au,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),qC=it($C),GC=[9,13,27,32],Pf=yn&&"CompositionEvent"in window,xs=null;yn&&"documentMode"in document&&(xs=document.documentMode);var XC=yn&&"TextEvent"in window&&!xs,dS=yn&&(!Pf||xs&&8<xs&&11>=xs),Vy=String.fromCharCode(32),Ky=!1;function pS(e,t){switch(e){case"keyup":return GC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ao=!1;function QC(e,t){switch(e){case"compositionend":return fS(t);case"keypress":return t.which!==32?null:(Ky=!0,Vy);case"textInput":return e=t.data,e===Vy&&Ky?null:e;default:return null}}function YC(e,t){if(Ao)return e==="compositionend"||!Pf&&pS(e,t)?(e=cS(),Cl=Cf=$n=null,Ao=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return dS&&t.locale!=="ko"?null:t.data;default:return null}}var ZC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ZC[e.type]:t==="textarea"}function mS(e,t,n,r){qv(r),t=jl(t,"onChange"),0<t.length&&(n=new Tf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _s=null,Ns=null;function JC(e){SS(e,0)}function lu(e){var t=Oo(e);if(Hv(t))return e}function eT(e,t){if(e==="change")return t}var gS=!1;yn&&(yn?(hl="oninput"in document,hl||(ip=document.createElement("div"),ip.setAttribute("oninput","return;"),hl=typeof ip.oninput=="function"),gl=hl):gl=!1,gS=gl&&(!document.documentMode||9<document.documentMode));var gl,hl,ip;function $y(){_s&&(_s.detachEvent("onpropertychange",hS),Ns=_s=null)}function hS(e){if(e.propertyName==="value"&&lu(Ns)){var t=[];if(mS(t,Ns,e,hf(e)),e=JC,Br)e(t);else{Br=!0;try{yf(e,t)}finally{Br=!1,Sf()}}}}function tT(e,t,n){e==="focusin"?($y(),_s=t,Ns=n,_s.attachEvent("onpropertychange",hS)):e==="focusout"&&$y()}function nT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lu(Ns)}function rT(e,t){if(e==="click")return lu(t)}function oT(e,t){if(e==="input"||e==="change")return lu(t)}function iT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var St=typeof Object.is=="function"?Object.is:iT,sT=Object.prototype.hasOwnProperty;function Ms(e,t){if(St(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!sT.call(t,n[r])||!St(e[n[r]],t[n[r]]))return!1;return!0}function qy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gy(e,t){var n=qy(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qy(n)}}function yS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xy(){for(var e=window,t=Nl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nl(e.document)}return t}function Np(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var aT=yn&&"documentMode"in document&&11>=document.documentMode,Lo=null,Mp=null,ws=null,Dp=!1;function Qy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dp||Lo==null||Lo!==Nl(r)||(r=Lo,"selectionStart"in r&&Np(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ws&&Ms(ws,r)||(ws=r,r=jl(Mp,"onSelect"),0<r.length&&(t=new Tf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Lo)))}wf("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);wf("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);wf(gC,2);for(sp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),yl=0;yl<sp.length;yl++)_f.set(sp[yl],0);var sp,yl;$o("onMouseEnter",["mouseout","mouseover"]);$o("onMouseLeave",["mouseout","mouseover"]);$o("onPointerEnter",["pointerout","pointerover"]);$o("onPointerLeave",["pointerout","pointerover"]);qr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qr("onBeforeInput",["compositionend","keypress","textInput","paste"]);qr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),vS=new Set("cancel close invalid load scroll toggle".split(" ").concat(fs));function Yy(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,cC(r,t,void 0,e),e.currentTarget=null}function SS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Yy(o,a,u),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Yy(o,a,u),i=l}}}if(Dl)throw e=Ap,Dl=!1,Ap=null,e}function ie(e,t){var n=ES(t),r=e+"__bubble";n.has(r)||(_S(t,e,2,!1),n.add(r))}var Zy="_reactListening"+Math.random().toString(36).slice(2);function xS(e){e[Zy]||(e[Zy]=!0,Fv.forEach(function(t){vS.has(t)||Jy(t,!1,e,null),Jy(t,!0,e,null)}))}function Jy(e,t,n,r){var o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,i=n;if(e==="selectionchange"&&n.nodeType!==9&&(i=n.ownerDocument),r!==null&&!t&&vS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=ES(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),_S(i,e,o,t),s.add(a))}function _S(e,t,n,r){var o=_f.get(t);switch(o===void 0?2:o){case 0:o=EC;break;case 1:o=CC;break;default:o=bf}n=o.bind(null,t,n,e),o=void 0,!Ip||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function wS(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Hr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}sC(function(){var u=i,c=hf(n),p=[];e:{var d=lS.get(e);if(d!==void 0){var h=Tf,v=e;switch(e){case"keypress":if(Tl(n)===0)break e;case"keydown":case"keyup":h=HC;break;case"focusin":v="focus",h=op;break;case"focusout":v="blur",h=op;break;case"beforeblur":case"afterblur":h=op;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Hy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=PC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=VC;break;case oS:case iS:case sS:h=AC;break;case aS:h=WC;break;case"scroll":h=TC;break;case"wheel":h=qC;break;case"copy":case"cut":case"paste":h=OC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Uy}var y=(t&4)!==0,m=!y&&e==="scroll",g=y?d!==null?d+"Capture":null:d;y=[];for(var f=u,S;f!==null;){S=f;var _=S.stateNode;if(S.tag===5&&_!==null&&(S=_,g!==null&&(_=Is(f,g),_!=null&&y.push(Ds(f,_,S)))),m)break;f=f.return}0<y.length&&(d=new h(d,v,null,n,c),p.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(Hr(v)||v[Yo]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Hr(v):null,v!==null&&(m=Xr(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(y=Hy,_="onMouseLeave",g="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(y=Uy,_="onPointerLeave",g="onPointerEnter",f="pointer"),m=h==null?d:Oo(h),S=v==null?d:Oo(v),d=new y(_,f+"leave",h,n,c),d.target=m,d.relatedTarget=S,_=null,Hr(c)===u&&(y=new y(g,f+"enter",v,n,c),y.target=S,y.relatedTarget=m,_=y),m=_,h&&v)t:{for(y=h,g=v,f=0,S=y;S;S=ko(S))f++;for(S=0,_=g;_;_=ko(_))S++;for(;0<f-S;)y=ko(y),f--;for(;0<S-f;)g=ko(g),S--;for(;f--;){if(y===g||g!==null&&y===g.alternate)break t;y=ko(y),g=ko(g)}y=null}else y=null;h!==null&&ev(p,d,h,y,!1),v!==null&&m!==null&&ev(p,m,v,y,!0)}}e:{if(d=u?Oo(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var b=eT;else if(Wy(d))if(gS)b=oT;else{b=nT;var E=tT}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(b=rT);if(b&&(b=b(e,u))){mS(p,b,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&wp(d,"number",d.value)}switch(E=u?Oo(u):window,e){case"focusin":(Wy(E)||E.contentEditable==="true")&&(Lo=E,Mp=u,ws=null);break;case"focusout":ws=Mp=Lo=null;break;case"mousedown":Dp=!0;break;case"contextmenu":case"mouseup":case"dragend":Dp=!1,Qy(p,n,c);break;case"selectionchange":if(aT)break;case"keydown":case"keyup":Qy(p,n,c)}var C;if(Pf)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Ao?pS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(dS&&n.locale!=="ko"&&(Ao||R!=="onCompositionStart"?R==="onCompositionEnd"&&Ao&&(C=cS()):($n=c,Cf="value"in $n?$n.value:$n.textContent,Ao=!0)),E=jl(u,R),0<E.length&&(R=new zy(R,e,null,n,c),p.push({event:R,listeners:E}),C?R.data=C:(C=fS(n),C!==null&&(R.data=C)))),(C=XC?QC(e,n):YC(e,n))&&(u=jl(u,"onBeforeInput"),0<u.length&&(c=new zy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=C))}SS(p,t)})}function Ds(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Is(e,n),i!=null&&r.unshift(Ds(e,i,o)),i=Is(e,t),i!=null&&r.push(Ds(e,i,o))),e=e.return}return r}function ko(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ev(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=Is(n,i),l!=null&&s.unshift(Ds(n,l,a))):o||(l=Is(n,i),l!=null&&s.push(Ds(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Bl(){}var ap=null,lp=null;function bS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Fp(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tv=typeof setTimeout=="function"?setTimeout:void 0,lT=typeof clearTimeout=="function"?clearTimeout:void 0;function Rf(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Ho(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function nv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var up=0;function uT(e){return{$$typeof:mf,toString:e,valueOf:e}}var uu=Math.random().toString(36).slice(2),qn="__reactFiber$"+uu,Hl="__reactProps$"+uu,Yo="__reactContainer$"+uu,rv="__reactEvents$"+uu;function Hr(e){var t=e[qn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yo]||n[qn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nv(e);e!==null;){if(n=e[qn])return n;e=nv(e)}return t}e=n,n=e.parentNode}return null}function Vs(e){return e=e[qn]||e[Yo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Oo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function cu(e){return e[Hl]||null}function ES(e){var t=e[rv];return t===void 0&&(t=e[rv]=new Set),t}var jp=[],No=-1;function lr(e){return{current:e}}function se(e){0>No||(e.current=jp[No],jp[No]=null,No--)}function pe(e,t){No++,jp[No]=e.current,e.current=t}var ir={},Me=lr(ir),Ye=lr(!1),Kr=ir;function qo(e,t){var n=e.type.contextTypes;if(!n)return ir;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ze(e){return e=e.childContextTypes,e!=null}function zl(){se(Ye),se(Me)}function ov(e,t,n){if(Me.current!==ir)throw Error(T(168));pe(Me,t),pe(Ye,n)}function CS(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(T(108,Do(t)||"Unknown",o));return ae({},n,r)}function kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ir,Kr=Me.current,pe(Me,e),pe(Ye,Ye.current),!0}function iv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=CS(e,t,Kr),r.__reactInternalMemoizedMergedChildContext=e,se(Ye),se(Me),pe(Me,e)):se(Ye),pe(Ye,n)}var If=null,Vr=null,cT=_e.unstable_runWithPriority,Af=_e.unstable_scheduleCallback,Bp=_e.unstable_cancelCallback,dT=_e.unstable_shouldYield,sv=_e.unstable_requestPaint,Hp=_e.unstable_now,pT=_e.unstable_getCurrentPriorityLevel,du=_e.unstable_ImmediatePriority,TS=_e.unstable_UserBlockingPriority,kS=_e.unstable_NormalPriority,PS=_e.unstable_LowPriority,RS=_e.unstable_IdlePriority,cp={},fT=sv!==void 0?sv:function(){},pn=null,Pl=null,dp=!1,av=Hp(),Oe=1e4>av?Hp:function(){return Hp()-av};function Go(){switch(pT()){case du:return 99;case TS:return 98;case kS:return 97;case PS:return 96;case RS:return 95;default:throw Error(T(332))}}function IS(e){switch(e){case 99:return du;case 98:return TS;case 97:return kS;case 96:return PS;case 95:return RS;default:throw Error(T(332))}}function Wr(e,t){return e=IS(e),cT(e,t)}function Fs(e,t,n){return e=IS(e),Af(e,t,n)}function nn(){if(Pl!==null){var e=Pl;Pl=null,Bp(e)}AS()}function AS(){if(!dp&&pn!==null){dp=!0;var e=0;try{var t=pn;Wr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),pn=null}catch(n){throw pn!==null&&(pn=pn.slice(e+1)),Af(du,nn),n}finally{dp=!1}}}var mT=Gr.ReactCurrentBatchConfig;function Nt(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ul=lr(null),Vl=null,Mo=null,Kl=null;function Lf(){Kl=Mo=Vl=null}function Of(e){var t=Ul.current;se(Ul),e.type._context._currentValue=t}function LS(e,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)===t){if(n===null||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,n!==null&&(n.childLanes|=t);e=e.return}}function zo(e,t){Vl=e,Kl=Mo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function wt(e,t){if(Kl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Kl=e,t=1073741823),t={context:e,observedBits:t,next:null},Mo===null){if(Vl===null)throw Error(T(308));Mo=t,Vl.dependencies={lanes:0,firstContext:t,responders:null}}else Mo=Mo.next=t;return e._currentValue}var Kn=!1;function Nf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function OS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function lv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function js(e,t,n,r){var o=e.updateQueue;Kn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,v=i;switch(a=t,d=n,v.tag){case 1:if(h=v.payload,typeof h=="function"){p=h.call(d,p,a);break e}p=h;break e;case 3:h.flags=h.flags&-4097|64;case 0:if(h=v.payload,a=typeof h=="function"?h.call(d,p,a):h,a==null)break e;p=ae({},p,a);break e;case 2:Kn=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=p):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=p),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,Ws|=s,e.lanes=s,e.memoizedState=p}}function uv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(T(191,o));o.call(r)}}}var NS=new nu.Component().refs;function Wl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var pu={isMounted:function(e){return(e=e._reactInternals)?Xr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ot(),o=er(e),i=Zn(r,o);i.payload=t,n!=null&&(i.callback=n),Jn(e,i),tr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ot(),o=er(e),i=Zn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Jn(e,i),tr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ot(),r=er(e),o=Zn(n,r);o.tag=2,t!=null&&(o.callback=t),Jn(e,o),tr(e,r,n)}};function cv(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Ms(n,r)||!Ms(o,i):!0}function MS(e,t,n){var r=!1,o=ir,i=t.contextType;return typeof i=="object"&&i!==null?i=wt(i):(o=Ze(t)?Kr:Me.current,r=t.contextTypes,i=(r=r!=null)?qo(e,o):ir),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=pu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function dv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&pu.enqueueReplaceState(t,t.state,null)}function zp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=NS,Nf(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=wt(i):(i=Ze(t)?Kr:Me.current,o.context=qo(e,i)),js(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Wl(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&pu.enqueueReplaceState(o,o.state,null),js(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var vl=Array.isArray;function os(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(T(309));var r=n.stateNode}if(!r)throw Error(T(147,e));var o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=r.refs;s===NS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function Sl(e,t){if(e.type!=="textarea")throw Error(T(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function DS(e){function t(m,g){if(e){var f=m.lastEffect;f!==null?(f.nextEffect=g,m.lastEffect=g):m.firstEffect=m.lastEffect=g,g.nextEffect=null,g.flags=8}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function o(m,g){return m=ar(m,g),m.index=0,m.sibling=null,m}function i(m,g,f){return m.index=f,e?(f=m.alternate,f!==null?(f=f.index,f<g?(m.flags=2,g):f):(m.flags=2,g)):g}function s(m){return e&&m.alternate===null&&(m.flags=2),m}function a(m,g,f,S){return g===null||g.tag!==6?(g=hp(f,m.mode,S),g.return=m,g):(g=o(g,f),g.return=m,g)}function l(m,g,f,S){return g!==null&&g.elementType===f.type?(S=o(g,f.props),S.ref=os(m,g,f),S.return=m,S):(S=Ll(f.type,f.key,f.props,null,m.mode,S),S.ref=os(m,g,f),S.return=m,S)}function u(m,g,f,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==f.containerInfo||g.stateNode.implementation!==f.implementation?(g=yp(f,m.mode,S),g.return=m,g):(g=o(g,f.children||[]),g.return=m,g)}function c(m,g,f,S,_){return g===null||g.tag!==7?(g=Wo(f,m.mode,S,_),g.return=m,g):(g=o(g,f),g.return=m,g)}function p(m,g,f){if(typeof g=="string"||typeof g=="number")return g=hp(""+g,m.mode,f),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ds:return f=Ll(g.type,g.key,g.props,null,m.mode,f),f.ref=os(m,null,g),f.return=m,f;case jr:return g=yp(g,m.mode,f),g.return=m,g}if(vl(g)||Ji(g))return g=Wo(g,m.mode,f,null),g.return=m,g;Sl(m,g)}return null}function d(m,g,f,S){var _=g!==null?g.key:null;if(typeof f=="string"||typeof f=="number")return _!==null?null:a(m,g,""+f,S);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case ds:return f.key===_?f.type===Wn?c(m,g,f.props.children,S,_):l(m,g,f,S):null;case jr:return f.key===_?u(m,g,f,S):null}if(vl(f)||Ji(f))return _!==null?null:c(m,g,f,S,null);Sl(m,f)}return null}function h(m,g,f,S,_){if(typeof S=="string"||typeof S=="number")return m=m.get(f)||null,a(g,m,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:return m=m.get(S.key===null?f:S.key)||null,S.type===Wn?c(g,m,S.props.children,_,S.key):l(g,m,S,_);case jr:return m=m.get(S.key===null?f:S.key)||null,u(g,m,S,_)}if(vl(S)||Ji(S))return m=m.get(f)||null,c(g,m,S,_,null);Sl(g,S)}return null}function v(m,g,f,S){for(var _=null,b=null,E=g,C=g=0,R=null;E!==null&&C<f.length;C++){E.index>C?(R=E,E=null):R=E.sibling;var P=d(m,E,f[C],S);if(P===null){E===null&&(E=R);break}e&&E&&P.alternate===null&&t(m,E),g=i(P,g,C),b===null?_=P:b.sibling=P,b=P,E=R}if(C===f.length)return n(m,E),_;if(E===null){for(;C<f.length;C++)E=p(m,f[C],S),E!==null&&(g=i(E,g,C),b===null?_=E:b.sibling=E,b=E);return _}for(E=r(m,E);C<f.length;C++)R=h(E,m,C,f[C],S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?C:R.key),g=i(R,g,C),b===null?_=R:b.sibling=R,b=R);return e&&E.forEach(function(N){return t(m,N)}),_}function y(m,g,f,S){var _=Ji(f);if(typeof _!="function")throw Error(T(150));if(f=_.call(f),f==null)throw Error(T(151));for(var b=_=null,E=g,C=g=0,R=null,P=f.next();E!==null&&!P.done;C++,P=f.next()){E.index>C?(R=E,E=null):R=E.sibling;var N=d(m,E,P.value,S);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(m,E),g=i(N,g,C),b===null?_=N:b.sibling=N,b=N,E=R}if(P.done)return n(m,E),_;if(E===null){for(;!P.done;C++,P=f.next())P=p(m,P.value,S),P!==null&&(g=i(P,g,C),b===null?_=P:b.sibling=P,b=P);return _}for(E=r(m,E);!P.done;C++,P=f.next())P=h(E,m,C,P.value,S),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?C:P.key),g=i(P,g,C),b===null?_=P:b.sibling=P,b=P);return e&&E.forEach(function(H){return t(m,H)}),_}return function(m,g,f,S){var _=typeof f=="object"&&f!==null&&f.type===Wn&&f.key===null;_&&(f=f.props.children);var b=typeof f=="object"&&f!==null;if(b)switch(f.$$typeof){case ds:e:{for(b=f.key,_=g;_!==null;){if(_.key===b){switch(_.tag){case 7:if(f.type===Wn){n(m,_.sibling),g=o(_,f.props.children),g.return=m,m=g;break e}break;default:if(_.elementType===f.type){n(m,_.sibling),g=o(_,f.props),g.ref=os(m,_,f),g.return=m,m=g;break e}}n(m,_);break}else t(m,_);_=_.sibling}f.type===Wn?(g=Wo(f.props.children,m.mode,S,f.key),g.return=m,m=g):(S=Ll(f.type,f.key,f.props,null,m.mode,S),S.ref=os(m,g,f),S.return=m,m=S)}return s(m);case jr:e:{for(_=f.key;g!==null;){if(g.key===_)if(g.tag===4&&g.stateNode.containerInfo===f.containerInfo&&g.stateNode.implementation===f.implementation){n(m,g.sibling),g=o(g,f.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=yp(f,m.mode,S),g.return=m,m=g}return s(m)}if(typeof f=="string"||typeof f=="number")return f=""+f,g!==null&&g.tag===6?(n(m,g.sibling),g=o(g,f),g.return=m,m=g):(n(m,g),g=hp(f,m.mode,S),g.return=m,m=g),s(m);if(vl(f))return v(m,g,f,S);if(Ji(f))return y(m,g,f,S);if(b&&Sl(m,f),typeof f>"u"&&!_)switch(m.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Do(m.type)||"Component"))}return n(m,g)}}var $l=DS(!0),FS=DS(!1),Ks={},en=lr(Ks),Bs=lr(Ks),Hs=lr(Ks);function zr(e){if(e===Ks)throw Error(T(174));return e}function Up(e,t){switch(pe(Hs,t),pe(Bs,e),pe(en,Ks),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Tp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Tp(t,e)}se(en),pe(en,t)}function Xo(){se(en),se(Bs),se(Hs)}function pv(e){zr(Hs.current);var t=zr(en.current),n=Tp(t,e.type);t!==n&&(pe(Bs,e),pe(en,n))}function Mf(e){Bs.current===e&&(se(en),se(Bs))}var de=lr(0);function ql(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=null,Gn=null,tn=!1;function jS(e,t){var n=xt(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function fv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Vp(e){if(tn){var t=Gn;if(t){var n=t;if(!fv(e,t)){if(t=Ho(n.nextSibling),!t||!fv(e,t)){e.flags=e.flags&-1025|2,tn=!1,mn=e;return}jS(mn,n)}mn=e,Gn=Ho(t.firstChild)}else e.flags=e.flags&-1025|2,tn=!1,mn=e}}function mv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function xl(e){if(e!==mn)return!1;if(!tn)return mv(e),tn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Fp(t,e.memoizedProps))for(t=Gn;t;)jS(e,t),t=Ho(t.nextSibling);if(mv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Gn=Ho(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Gn=null}}else Gn=mn?Ho(e.stateNode.nextSibling):null;return!0}function pp(){Gn=mn=null,tn=!1}var Uo=[];function Df(){for(var e=0;e<Uo.length;e++)Uo[e]._workInProgressVersionPrimary=null;Uo.length=0}var bs=Gr.ReactCurrentDispatcher,_t=Gr.ReactCurrentBatchConfig,zs=0,he=null,Le=null,Ce=null,Gl=!1,Es=!1;function Xe(){throw Error(T(321))}function Ff(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!St(e[n],t[n]))return!1;return!0}function jf(e,t,n,r,o,i){if(zs=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bs.current=e===null||e.memoizedState===null?hT:yT,e=n(r,o),Es){i=0;do{if(Es=!1,!(25>i))throw Error(T(301));i+=1,Ce=Le=null,t.updateQueue=null,bs.current=vT,e=n(r,o)}while(Es)}if(bs.current=Zl,t=Le!==null&&Le.next!==null,zs=0,Ce=Le=he=null,Gl=!1,t)throw Error(T(300));return e}function Ur(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ce===null?he.memoizedState=Ce=e:Ce=Ce.next=e,Ce}function Qr(){if(Le===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=Ce===null?he.memoizedState:Ce.next;if(t!==null)Ce=t,Le=e;else{if(e===null)throw Error(T(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Ce===null?he.memoizedState=Ce=e:Ce=Ce.next=e}return Ce}function Zt(e,t){return typeof t=="function"?t(e):t}function is(e){var t=Qr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Le,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){o=o.next,r=r.baseState;var a=s=i=null,l=o;do{var u=l.lane;if((zs&u)===u)a!==null&&(a=a.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var c={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,he.lanes|=u,Ws|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,St(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ss(e){var t=Qr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);St(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function gv(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(o!==null?e=o===r:(e=e.mutableReadLanes,(e=(zs&e)===e)&&(t._workInProgressVersionPrimary=r,Uo.push(t))),e)return n(t._source);throw Uo.push(t),Error(T(350))}function BS(e,t,n,r){var o=Ve;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=bs.current,l=a.useState(function(){return gv(o,t,n)}),u=l[1],c=l[0];l=Ce;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,v=p.source;p=p.subscribe;var y=he;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var m=i(t._source);if(!St(s,m)){m=n(t._source),St(c,m)||(u(m),m=er(y),o.mutableReadLanes|=m&o.pendingLanes),m=o.mutableReadLanes,o.entangledLanes|=m;for(var g=o.entanglements,f=m;0<f;){var S=31-or(f),_=1<<S;g[S]|=m,f&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var m=d.getSnapshot,g=d.setSnapshot;try{g(m(t._source));var f=er(y);o.mutableReadLanes|=f&o.pendingLanes}catch(S){g(function(){throw S})}})},[t,r]),St(h,n)&&St(v,t)&&St(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:c},e.dispatch=u=zf.bind(null,he,e),l.queue=e,l.baseQueue=null,c=gv(o,t,n),l.memoizedState=l.baseState=c),c}function HS(e,t,n){var r=Qr();return BS(r,e,t,n)}function as(e){var t=Ur();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:e},e=e.dispatch=zf.bind(null,he,e),[t.memoizedState,e]}function Xl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null},he.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function hv(e){var t=Ur();return e={current:e},t.memoizedState=e}function Ql(){return Qr().memoizedState}function Kp(e,t,n,r){var o=Ur();he.flags|=e,o.memoizedState=Xl(1|t,n,void 0,r===void 0?null:r)}function Bf(e,t,n,r){var o=Qr();r=r===void 0?null:r;var i=void 0;if(Le!==null){var s=Le.memoizedState;if(i=s.destroy,r!==null&&Ff(r,s.deps)){Xl(t,n,i,r);return}}he.flags|=e,o.memoizedState=Xl(1|t,n,i,r)}function yv(e,t){return Kp(516,4,e,t)}function Yl(e,t){return Bf(516,4,e,t)}function zS(e,t){return Bf(4,2,e,t)}function US(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function VS(e,t,n){return n=n!=null?n.concat([e]):null,Bf(4,2,US.bind(null,t,e),n)}function Hf(){}function KS(e,t){var n=Qr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ff(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function WS(e,t){var n=Qr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ff(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function gT(e,t){var n=Go();Wr(98>n?98:n,function(){e(!0)}),Wr(97<n?97:n,function(){var r=_t.transition;_t.transition=1;try{e(!1),t()}finally{_t.transition=r}})}function zf(e,t,n){var r=ot(),o=er(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i,s=e.alternate,e===he||s!==null&&s===he)Es=Gl=!0;else{if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.eagerReducer=s,i.eagerState=l,St(l,a))return}catch{}finally{}tr(e,o,r)}}var Zl={readContext:wt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useOpaqueIdentifier:Xe,unstable_isNewReconciler:!1},hT={readContext:wt,useCallback:function(e,t){return Ur().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:yv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Kp(4,2,US.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Kp(4,2,e,t)},useMemo:function(e,t){var n=Ur();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ur();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=zf.bind(null,he,e),[r.memoizedState,e]},useRef:hv,useState:as,useDebugValue:Hf,useDeferredValue:function(e){var t=as(e),n=t[0],r=t[1];return yv(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=as(!1),t=e[0];return e=gT.bind(null,e[1]),hv(e),[e,t]},useMutableSource:function(e,t,n){var r=Ur();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},BS(r,e,t,n)},useOpaqueIdentifier:function(){if(tn){var e=!1,t=uT(function(){throw e||(e=!0,n("r:"+(up++).toString(36))),Error(T(355))}),n=as(t)[1];return!(he.mode&2)&&(he.flags|=516,Xl(5,function(){n("r:"+(up++).toString(36))},void 0,null)),t}return t="r:"+(up++).toString(36),as(t),t},unstable_isNewReconciler:!1},yT={readContext:wt,useCallback:KS,useContext:wt,useEffect:Yl,useImperativeHandle:VS,useLayoutEffect:zS,useMemo:WS,useReducer:is,useRef:Ql,useState:function(){return is(Zt)},useDebugValue:Hf,useDeferredValue:function(e){var t=is(Zt),n=t[0],r=t[1];return Yl(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=is(Zt)[0];return[Ql().current,e]},useMutableSource:HS,useOpaqueIdentifier:function(){return is(Zt)[0]},unstable_isNewReconciler:!1},vT={readContext:wt,useCallback:KS,useContext:wt,useEffect:Yl,useImperativeHandle:VS,useLayoutEffect:zS,useMemo:WS,useReducer:ss,useRef:Ql,useState:function(){return ss(Zt)},useDebugValue:Hf,useDeferredValue:function(e){var t=ss(Zt),n=t[0],r=t[1];return Yl(function(){var o=_t.transition;_t.transition=1;try{r(e)}finally{_t.transition=o}},[e]),n},useTransition:function(){var e=ss(Zt)[0];return[Ql().current,e]},useMutableSource:HS,useOpaqueIdentifier:function(){return ss(Zt)[0]},unstable_isNewReconciler:!1},ST=Gr.ReactCurrentOwner,Mt=!1;function Qe(e,t,n,r){t.child=e===null?FS(t,null,n,r):$l(t,e.child,n,r)}function vv(e,t,n,r,o){n=n.render;var i=t.ref;return zo(t,o),r=jf(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Qe(e,t,r,o),t.child)}function Sv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!qf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,$S(e,t,s,r,o,i)):(e=Ll(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}return s=e.child,!(o&i)&&(o=s.memoizedProps,n=n.compare,n=n!==null?n:Ms,n(o,r)&&e.ref===t.ref)?gn(e,t,i):(t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e)}function $S(e,t,n,r,o,i){if(e!==null&&Ms(e.memoizedProps,r)&&e.ref===t.ref)if(Mt=!1,(i&o)!==0)e.flags&16384&&(Mt=!0);else return t.lanes=e.lanes,gn(e,t,i);return Wp(e,t,n,r,i)}function fp(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden"||r.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},wl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},wl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},wl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,wl(t,r);return Qe(e,t,o,n),t.child}function qS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Wp(e,t,n,r,o){var i=Ze(n)?Kr:Me.current;return i=qo(t,i),zo(t,o),n=jf(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Qe(e,t,n,o),t.child)}function xv(e,t,n,r,o){if(Ze(n)){var i=!0;kl(t)}else i=!1;if(zo(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),MS(t,n,r),zp(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=wt(u):(u=Ze(n)?Kr:Me.current,u=qo(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&dv(t,s,r,u),Kn=!1;var d=t.memoizedState;s.state=d,js(t,r,s,o),l=t.memoizedState,a!==r||d!==l||Ye.current||Kn?(typeof c=="function"&&(Wl(t,n,c,r),l=t.memoizedState),(a=Kn||cv(t,n,a,r,d,l,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,OS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Nt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=wt(l):(l=Ze(n)?Kr:Me.current,l=qo(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&dv(t,s,r,l),Kn=!1,d=t.memoizedState,s.state=d,js(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||Ye.current||Kn?(typeof h=="function"&&(Wl(t,n,h,r),v=t.memoizedState),(u=Kn||cv(t,n,u,r,d,v,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return $p(e,t,n,r,i,o)}function $p(e,t,n,r,o,i){qS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&iv(t,n,!1),gn(e,t,i);r=t.stateNode,ST.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=$l(t,e.child,null,i),t.child=$l(t,null,a,i)):Qe(e,t,a,i),t.memoizedState=r.state,o&&iv(t,n,!0),t.child}function _v(e){var t=e.stateNode;t.pendingContext?ov(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ov(e,t.context,!1),Up(e,t.containerInfo)}var _l={dehydrated:null,retryLane:0};function wv(e,t,n){var r=t.pendingProps,o=de.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),pe(de,o&1),e===null?(r.fallback!==void 0&&Vp(t),e=r.children,o=r.fallback,i?(e=bv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=_l,e):typeof r.unstable_expectedLoadTime=="number"?(e=bv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=_l,t.lanes=33554432,e):(n=Gf({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Cv(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=_l,r):(n=Ev(e,t,r.children,n),t.memoizedState=null,n):i?(r=Cv(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=_l,r):(n=Ev(e,t,r.children,n),t.memoizedState=null,n)}function bv(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},!(o&2)&&i!==null?(i.childLanes=0,i.pendingProps=t):i=Gf(t,o,0,null),n=Wo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Ev(e,t,n,r){var o=e.child;return e=o.sibling,n=ar(o,{mode:"visible",children:n}),!(t.mode&2)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Cv(e,t,n,r,o){var i=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return!(i&2)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=a,s=n.lastEffect,s!==null?(t.firstEffect=n.firstEffect,t.lastEffect=s,s.nextEffect=null):t.firstEffect=t.lastEffect=null):n=ar(s,a),e!==null?r=ar(e,r):(r=Wo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Tv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),LS(e.return,t)}function mp(e,t,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o,s.lastEffect=i)}function kv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Qe(e,t,r.children,n),r=de.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tv(e,n);else if(e.tag===19)Tv(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(pe(de,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ql(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),mp(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ql(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}mp(t,!0,n,null,i,t.lastEffect);break;case"together":mp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ws|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=ar(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ar(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var GS,qp,XS,QS;GS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};qp=function(){};XS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,zr(en.current);var i=null;switch(n){case"input":o=xp(e,o),r=xp(e,r),i=[];break;case"option":o=bp(e,o),r=bp(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Ep(e,o),r=Ep(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bl)}kp(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ps.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ps.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===mf?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};QS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ls(e,t){if(!tn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function xT(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ze(t.type)&&zl(),null;case 3:return Xo(),se(Ye),se(Me),Df(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),qp(t),null;case 5:Mf(t);var o=zr(Hs.current);if(n=t.type,e!==null&&t.stateNode!=null)XS(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(T(166));return null}if(e=zr(en.current),xl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[qn]=t,r[Hl]=i,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(e=0;e<fs.length;e++)ie(fs[e],r);break;case"source":ie("error",r);break;case"img":case"image":case"link":ie("error",r),ie("load",r);break;case"details":ie("toggle",r);break;case"input":Ry(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Ay(r,i),ie("invalid",r)}kp(n,i),e=null;for(var s in i)i.hasOwnProperty(s)&&(o=i[s],s==="children"?typeof o=="string"?r.textContent!==o&&(e=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(e=["children",""+o]):Ps.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":dl(r),Iy(r,i,!0);break;case"textarea":dl(r),Ly(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Bl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Cp.html&&(e=Vv(n)),e===Cp.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[qn]=t,e[Hl]=r,GS(e,t,!1,!1),t.stateNode=e,s=Pp(n,r),n){case"dialog":ie("cancel",e),ie("close",e),o=r;break;case"iframe":case"object":case"embed":ie("load",e),o=r;break;case"video":case"audio":for(o=0;o<fs.length;o++)ie(fs[o],e);o=r;break;case"source":ie("error",e),o=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),o=r;break;case"details":ie("toggle",e),o=r;break;case"input":Ry(e,r),o=xp(e,r),ie("invalid",e);break;case"option":o=bp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Ay(e,r),o=Ep(e,r),ie("invalid",e);break;default:o=r}kp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?$v(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Kv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Rs(e,l):typeof l=="number"&&Rs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ps.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&lf(e,i,l,s))}switch(n){case"input":dl(e),Iy(e,r,!1);break;case"textarea":dl(e),Ly(e);break;case"option":r.value!=null&&e.setAttribute("value",""+rr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Fo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Fo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Bl)}bS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)QS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=zr(Hs.current),zr(en.current),xl(t)?(r=t.stateNode,n=t.memoizedProps,r[qn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[qn]=t,t.stateNode=r)}return null;case 13:return se(de),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&xl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||de.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),Ve===null||!(Ws&134217727)&&!(Jo&134217727)||Vo(Ve,Ne))),(r||n)&&(t.flags|=4),null);case 4:return Xo(),qp(t),e===null&&xS(t.stateNode.containerInfo),null;case 10:return Of(t),null;case 17:return Ze(t.type)&&zl(),null;case 19:if(se(de),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)ls(r,!1);else{if(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=ql(e),s!==null){for(t.flags|=64,ls(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return pe(de,de.current&1|2),t.child}e=e.sibling}r.tail!==null&&Oe()>Jp&&(t.flags|=64,i=!0,ls(r,!1),t.lanes=33554432)}else{if(!i)if(e=ql(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ls(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!tn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Oe()-r.renderingStartTime>Jp&&n!==1073741824&&(t.flags|=64,i=!0,ls(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Oe(),n.sibling=null,t=de.current,pe(de,i?t&1|2:t&1),n):null;case 23:case 24:return $f(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(T(156,t.tag))}function _T(e){switch(e.tag){case 1:Ze(e.type)&&zl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Xo(),se(Ye),se(Me),Df(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Mf(e),null;case 13:return se(de),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(de),null;case 4:return Xo(),null;case 10:return Of(e),null;case 23:case 24:return $f(),null;default:return null}}function Uf(e,t){try{var n="",r=t;do n+=tC(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
6
6
|
Error generating stack: `+i.message+`
|
|
7
|
-
`+i.stack}return{value:e,source:t,stack:o}}function Wf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var cT=typeof WeakMap=="function"?WeakMap:Map;function KS(e,t,n){n=Zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Jl||(Jl=!0,Yf=r),Wf(e,t)},n}function WS(e,t,n){n=Zn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Wf(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Yt===null?Yt=new Set([this]):Yt.add(this),Wf(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var dT=typeof WeakSet=="function"?WeakSet:Set;function _v(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){nr(e,n)}else t.current=null}function fT(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Ot(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&bp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function pT(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var o=e;r=o.next,o=o.tag,o&4&&o&1&&(e0(n,e),_T(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ot(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&nv(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}nv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&hS(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&Xv(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function wv(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=o!=null&&o.hasOwnProperty("display")?o.display:null,r.style.display=jv("display",o)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Ev(e,t){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(Tp,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,o!==void 0)if(r&4)e0(t,n);else{r=t;try{o()}catch(i){nr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(_v(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){nr(t,i)}break;case 5:_v(t);break;case 4:$S(e,t)}}function Cv(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function bv(e){return e.tag===5||e.tag===3||e.tag===4}function Tv(e){e:{for(var t=e.return;t!==null;){if(bv(t))break e;t=t.return}throw Error(T(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(T(161))}n.flags&16&&(ks(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||bv(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?$f(e,n,t):qf(e,n,t)}function $f(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=jl));else if(r!==4&&(e=e.child,e!==null))for($f(e,t,n),e=e.sibling;e!==null;)$f(e,t,n),e=e.sibling}function qf(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qf(e,t,n),e=e.sibling;e!==null;)qf(e,t,n),e=e.sibling}function $S(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(T(160));switch(o=r.stateNode,r.tag){case 5:i=!1;break e;case 3:o=o.containerInfo,i=!0;break e;case 4:o=o.containerInfo,i=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var s=e,a=n,l=a;;)if(Ev(s,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(s=o,a=n.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):o.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){o=n.stateNode.containerInfo,i=!0,n.child.return=n,n=n.child;continue}}else if(Ev(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function ff(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var o=e!==null?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,i!==null){for(n[Hl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Nv(n,r),bf(e,o),t=bf(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Hv(n,a):s==="dangerouslySetInnerHTML"?Fv(n,a):s==="children"?ks(n,a):op(n,s,a,t)}switch(e){case"input":vf(n,r);break;case"textarea":Mv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Oo(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Oo(n,!!r.multiple,r.defaultValue,!0):Oo(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(T(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,Xv(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Up=Le(),wv(t.child,!0)),kv(t);return;case 19:kv(t);return;case 17:return;case 23:case 24:wv(t,t.memoizedState!==null);return}throw Error(T(163))}function kv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dT),t.forEach(function(r){var o=CT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function mT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var gT=Math.ceil,Zl=qr.ReactCurrentDispatcher,Hp=qr.ReactCurrentOwner,F=0,Be=null,ve=null,Ae=0,Wr=0,Gf=lr(0),be=0,fu=null,Go=0,Vs=0,Xo=0,Bp=0,Xf=null,Up=0,Qf=1/0;function Qo(){Qf=Le()+500}var A=null,Jl=!1,Yf=null,Yt=null,sr=!1,Es=null,fs=90,Zf=[],Jf=[],hn=null,Cs=0,ep=null,Pl=-1,pn=0,Rl=0,bs=null,Il=!1;function tt(){return F&48?Le():Pl!==-1?Pl:Pl=Le()}function er(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Ko()===99?1:2;if(pn===0&&(pn=Go),nT.transition!==0){Rl!==0&&(Rl=Xf!==null?Xf.pendingLanes:0),e=pn;var t=4186112&~Rl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Ko(),F&4&&e===98?e=Dl(12,pn):(e=ib(e),e=Dl(e,pn)),e}function tr(e,t,n){if(50<Cs)throw Cs=0,ep=null,Error(T(185));if(e=pu(e,t),e===null)return null;iu(e,t,n),e===Be&&(Xo|=t,be===4&&Ho(e,Ae));var r=Ko();t===1?F&8&&!(F&48)?tp(e):(wt(e,n),F===0&&(Qo(),en())):(!(F&4)||r!==98&&r!==99||(hn===null?hn=new Set([e]):hn.add(e)),wt(e,n)),Xf=e}function pu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}function wt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-or(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,Co(l);var c=ne;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Ls(e,e===Be?Ae:0),t=ne,r===0)n!==null&&(n!==af&&Df(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==af&&Df(n)}t===15?(n=tp.bind(null,e),fn===null?(fn=[n],kl=kp(cu,CS)):fn.push(n),n=af):t===14?n=Ms(99,tp.bind(null,e)):(n=sb(t),n=Ms(n,qS.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function qS(e){if(Pl=-1,Rl=pn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(ur()&&e.callbackNode!==t)return null;var n=Ls(e,e===Be?Ae:0);if(n===0)return null;var r=n,o=F;F|=16;var i=YS();(Be!==e||Ae!==r)&&(Qo(),Bo(e,r));do try{vT();break}catch(a){QS(e,a)}while(1);if(Pp(),Zl.current=i,F=o,ve!==null?r=0:(Be=null,Ae=0,r=be),Go&Xo)Bo(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,bp(e.containerInfo)),n=nS(e),n!==0&&(r=ps(e,n))),r===1)throw t=fu,Bo(e,0),Ho(e,n),wt(e,Le()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:Dr(e);break;case 3:if(Ho(e,n),(n&62914560)===n&&(r=Up+500-Le(),10<r)){if(Ls(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Gy(Dr.bind(null,e),r);break}Dr(e);break;case 4:if(Ho(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-or(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*gT(n/1960))-n,10<n){e.timeoutHandle=Gy(Dr.bind(null,e),n);break}Dr(e);break;case 5:Dr(e);break;default:throw Error(T(329))}}return wt(e,Le()),e.callbackNode===t?qS.bind(null,e):null}function Ho(e,t){for(t&=~Bp,t&=~Xo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-or(t),r=1<<n;e[n]=-1,t&=~r}}function tp(e){if(F&48)throw Error(T(327));if(ur(),e===Be&&e.expiredLanes&Ae){var t=Ae,n=ps(e,t);Go&Xo&&(t=Ls(e,t),n=ps(e,t))}else t=Ls(e,0),n=ps(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,bp(e.containerInfo)),t=nS(e),t!==0&&(n=ps(e,t))),n===1)throw n=fu,Bo(e,0),Ho(e,t),wt(e,Le()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dr(e),wt(e,Le()),null}function hT(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,wt(t,Le())})}en()}function GS(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(Qo(),en())}}function XS(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(Qo(),en())}}function _l(e,t){de(Gf,Wr),Wr|=t,Go|=t}function zp(){Wr=Gf.current,se(Gf)}function Bo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Qb(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Bl();break;case 3:Wo(),se(qe),se(Oe),Ap();break;case 5:Lp(r);break;case 4:Wo();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Rp(r);break;case 23:case 24:zp()}n=n.return}Be=e,ve=ar(e.current,null),Ae=Wr=Go=t,be=0,fu=null,Bp=Xo=Vs=0}function QS(e,t){do{var n=ve;try{if(Pp(),_s.current=Yl,ql){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ql=!1}if(Hs=0,Ce=Ie=ge=null,ws=!1,Hp.current=null,n===null||n.return===null){be=1,fu=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ae,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var f=(ce.current&1)!==0,d=s;do{var y;if(y=d.tag===13){var v=d.memoizedState;if(v!==null)y=v.dehydrated!==null;else{var h=d.memoizedProps;y=h.fallback===void 0?!1:h.unstable_avoidThisFallback!==!0?!0:!f}}if(y){var g=d.updateQueue;if(g===null){var m=new Set;m.add(u),d.updateQueue=m}else g.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var p=Zn(-1,1);p.tag=2,Jn(a,p)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new cT,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var _=ET.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Ao(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
7
|
+
`+i.stack}return{value:e,source:t,stack:o}}function Gp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wT=typeof WeakMap=="function"?WeakMap:Map;function YS(e,t,n){n=Zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){eu||(eu=!0,ef=r),Gp(e,t)},n}function ZS(e,t,n){n=Zn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Gp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Jt===null?Jt=new Set([this]):Jt.add(this),Gp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var bT=typeof WeakSet=="function"?WeakSet:Set;function Pv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){nr(e,n)}else t.current=null}function ET(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Nt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Rf(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function CT(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var o=e;r=o.next,o=o.tag,o&4&&o&1&&(a0(n,e),OT(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Nt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&uv(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}uv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&bS(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&nS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Rv(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=o!=null&&o.hasOwnProperty("display")?o.display:null,r.style.display=Wv("display",o)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Iv(e,t){if(Vr&&typeof Vr.onCommitFiberUnmount=="function")try{Vr.onCommitFiberUnmount(If,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,o!==void 0)if(r&4)a0(t,n);else{r=t;try{o()}catch(i){nr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Pv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){nr(t,i)}break;case 5:Pv(t);break;case 4:JS(e,t)}}function Av(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Lv(e){return e.tag===5||e.tag===3||e.tag===4}function Ov(e){e:{for(var t=e.return;t!==null;){if(Lv(t))break e;t=t.return}throw Error(T(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(T(161))}n.flags&16&&(Rs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Lv(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?Xp(e,n,t):Qp(e,n,t)}function Xp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Bl));else if(r!==4&&(e=e.child,e!==null))for(Xp(e,t,n),e=e.sibling;e!==null;)Xp(e,t,n),e=e.sibling}function Qp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Qp(e,t,n),e=e.sibling;e!==null;)Qp(e,t,n),e=e.sibling}function JS(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(T(160));switch(o=r.stateNode,r.tag){case 5:i=!1;break e;case 3:o=o.containerInfo,i=!0;break e;case 4:o=o.containerInfo,i=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var s=e,a=n,l=a;;)if(Iv(s,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(s=o,a=n.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):o.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){o=n.stateNode.containerInfo,i=!0,n.child.return=n,n=n.child;continue}}else if(Iv(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function gp(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var o=e!==null?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,i!==null){for(n[Hl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&zv(n,r),Pp(e,o),t=Pp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?$v(n,a):s==="dangerouslySetInnerHTML"?Kv(n,a):s==="children"?Rs(n,a):lf(n,s,a,t)}switch(e){case"input":_p(n,r);break;case"textarea":Uv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Fo(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Fo(n,!!r.multiple,r.defaultValue,!0):Fo(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(T(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,nS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Wf=Oe(),Rv(t.child,!0)),Nv(t);return;case 19:Nv(t);return;case 17:return;case 23:case 24:Rv(t,t.memoizedState!==null);return}throw Error(T(163))}function Nv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bT),t.forEach(function(r){var o=DT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function TT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var kT=Math.ceil,Jl=Gr.ReactCurrentDispatcher,Vf=Gr.ReactCurrentOwner,F=0,Ve=null,Se=null,Ne=0,$r=0,Yp=lr(0),Te=0,fu=null,Zo=0,Ws=0,Jo=0,Kf=0,Zp=null,Wf=0,Jp=1/0;function ei(){Jp=Oe()+500}var L=null,eu=!1,ef=null,Jt=null,sr=!1,Cs=null,ms=90,tf=[],nf=[],hn=null,Ts=0,rf=null,Rl=-1,fn=0,Il=0,ks=null,Al=!1;function ot(){return F&48?Oe():Rl!==-1?Rl:Rl=Oe()}function er(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Go()===99?1:2;if(fn===0&&(fn=Zo),mT.transition!==0){Il!==0&&(Il=Zp!==null?Zp.pendingLanes:0),e=fn;var t=4186112&~Il;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Go(),F&4&&e===98?e=Fl(12,fn):(e=yC(e),e=Fl(e,fn)),e}function tr(e,t,n){if(50<Ts)throw Ts=0,rf=null,Error(T(185));if(e=mu(e,t),e===null)return null;su(e,t,n),e===Ve&&(Jo|=t,Te===4&&Vo(e,Ne));var r=Go();t===1?F&8&&!(F&48)?of(e):(bt(e,n),F===0&&(ei(),nn())):(!(F&4)||r!==98&&r!==99||(hn===null?hn=new Set([e]):hn.add(e)),bt(e,n)),Zp=e}function mu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}function bt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-or(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,Po(l);var c=ne;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Os(e,e===Ve?Ne:0),t=ne,r===0)n!==null&&(n!==cp&&Bp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==cp&&Bp(n)}t===15?(n=of.bind(null,e),pn===null?(pn=[n],Pl=Af(du,AS)):pn.push(n),n=cp):t===14?n=Fs(99,of.bind(null,e)):(n=vC(t),n=Fs(n,e0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function e0(e){if(Rl=-1,Il=fn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(ur()&&e.callbackNode!==t)return null;var n=Os(e,e===Ve?Ne:0);if(n===0)return null;var r=n,o=F;F|=16;var i=o0();(Ve!==e||Ne!==r)&&(ei(),Ko(e,r));do try{IT();break}catch(a){r0(e,a)}while(1);if(Lf(),Jl.current=i,F=o,Se!==null?r=0:(Ve=null,Ne=0,r=Te),Zo&Jo)Ko(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Rf(e.containerInfo)),n=uS(e),n!==0&&(r=gs(e,n))),r===1)throw t=fu,Ko(e,0),Vo(e,n),bt(e,Oe()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:Fr(e);break;case 3:if(Vo(e,n),(n&62914560)===n&&(r=Wf+500-Oe(),10<r)){if(Os(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){ot(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=tv(Fr.bind(null,e),r);break}Fr(e);break;case 4:if(Vo(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-or(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Oe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*kT(n/1960))-n,10<n){e.timeoutHandle=tv(Fr.bind(null,e),n);break}Fr(e);break;case 5:Fr(e);break;default:throw Error(T(329))}}return bt(e,Oe()),e.callbackNode===t?e0.bind(null,e):null}function Vo(e,t){for(t&=~Kf,t&=~Jo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-or(t),r=1<<n;e[n]=-1,t&=~r}}function of(e){if(F&48)throw Error(T(327));if(ur(),e===Ve&&e.expiredLanes&Ne){var t=Ne,n=gs(e,t);Zo&Jo&&(t=Os(e,t),n=gs(e,t))}else t=Os(e,0),n=gs(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Rf(e.containerInfo)),t=uS(e),t!==0&&(n=gs(e,t))),n===1)throw n=fu,Ko(e,0),Vo(e,t),bt(e,Oe()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fr(e),bt(e,Oe()),null}function PT(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,bt(t,Oe())})}nn()}function t0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(ei(),nn())}}function n0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(ei(),nn())}}function wl(e,t){pe(Yp,$r),$r|=t,Zo|=t}function $f(){$r=Yp.current,se(Yp)}function Ko(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,lT(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&zl();break;case 3:Xo(),se(Ye),se(Me),Df();break;case 5:Mf(r);break;case 4:Xo();break;case 13:se(de);break;case 19:se(de);break;case 10:Of(r);break;case 23:case 24:$f()}n=n.return}Ve=e,Se=ar(e.current,null),Ne=$r=Zo=t,Te=0,fu=null,Kf=Jo=Ws=0}function r0(e,t){do{var n=Se;try{if(Lf(),bs.current=Zl,Gl){for(var r=he.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Gl=!1}if(zs=0,Ce=Le=he=null,Es=!1,Vf.current=null,n===null||n.return===null){Te=1,fu=t,Se=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ne,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(de.current&1)!==0,d=s;do{var h;if(h=d.tag===13){var v=d.memoizedState;if(v!==null)h=v.dehydrated!==null;else{var y=d.memoizedProps;h=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(h){var m=d.updateQueue;if(m===null){var g=new Set;g.add(u),d.updateQueue=g}else m.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var f=Zn(-1,1);f.tag=2,Jn(a,f)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new wT,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var _=MT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Do(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
8
8
|
|
|
9
|
-
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}be!==5&&(be=2),l=jp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=KS(d,i,t);tv(d,C);break e;case 1:i=l;var E=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yt===null||!Yt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=WS(d,i,t);tv(d,R);break e}}d=d.return}while(d!==null)}JS(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function YS(){var e=Zl.current;return Zl.current=Yl,e===null?Yl:e}function ps(e,t){var n=F;F|=16;var r=YS();Be===e&&Ae===t||Bo(e,t);do try{yT();break}catch(o){QS(e,o)}while(1);if(Pp(),F=n,Zl.current=r,ve!==null)throw Error(T(261));return Be=null,Ae=0,be}function yT(){for(;ve!==null;)ZS(ve)}function vT(){for(;ve!==null&&!Jb();)ZS(ve)}function ZS(e){var t=t0(e.alternate,e,Wr);e.memoizedProps=e.pendingProps,t===null?JS(e):ve=t,Hp.current=null}function JS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=uT(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=lT(n,t,Wr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Wr&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);be===0&&(be=5)}function Dr(e){var t=Ko();return Kr(99,ST.bind(null,e,t)),null}function ST(e,t){do ur();while(Es!==null);if(F&48)throw Error(T(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,a=e.expirationTimes;0<i;){var l=31-or(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(hn!==null&&!(r&24)&&hn.has(e)&&hn.delete(e),e===Be&&(ve=Be=null,Ae=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=F,F|=32,Hp.current=null,rf=El,s=zy(),Lf(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,f=-1,d=-1,y=0,v=0,h=s,g=null;t:for(;;){for(var m;h!==a||i!==0&&h.nodeType!==3||(f=c+i),h!==l||u!==0&&h.nodeType!==3||(d=c+u),h.nodeType===3&&(c+=h.nodeValue.length),(m=h.firstChild)!==null;)g=h,h=m;for(;;){if(h===s)break t;if(g===a&&++y===i&&(f=c),g===l&&++v===u&&(d=c),(m=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=m}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;of={focusedElem:s,selectionRange:a},El=!1,bs=null,Il=!1,A=r;do try{xT()}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);bs=null,A=r;do try{for(s=e;A!==null;){var p=A.flags;if(p&16&&ks(A.stateNode,""),p&128){var S=A.alternate;if(S!==null){var _=S.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(p&1038){case 2:Tv(A),A.flags&=-3;break;case 6:Tv(A),A.flags&=-3,ff(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,ff(A.alternate,A);break;case 4:ff(A.alternate,A);break;case 8:a=A,$S(s,a);var C=a.alternate;Cv(a),C!==null&&Cv(C)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);if(_=of,S=zy(),p=_.focusedElem,s=_.selectionRange,S!==p&&p&&p.ownerDocument&&cS(p.ownerDocument.documentElement,p)){for(s!==null&&Lf(p)&&(S=s.start,_=s.end,_===void 0&&(_=S),"selectionStart"in p?(p.selectionStart=S,p.selectionEnd=Math.min(_,p.value.length)):(_=(S=p.ownerDocument||document)&&S.defaultView||window,_.getSelection&&(_=_.getSelection(),a=p.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!_.extend&&C>s&&(a=s,s=C,C=a),a=Uy(p,C),i=Uy(p,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(S),_.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),_.addRange(S)))))),S=[],_=p;_=_.parentNode;)_.nodeType===1&&S.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<S.length;p++)_=S[p],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}El=!!rf,of=rf=null,e.current=n,A=r;do try{for(p=e;A!==null;){var E=A.flags;if(E&36&&pT(p,A.alternate,A),E&128){S=void 0;var b=A.ref;if(b!==null){var R=A.stateNode;switch(A.tag){case 5:S=R;break;default:S=R}typeof b=="function"?b(S):b.current=S}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);A=null,tT(),F=o}else e.current=n;if(sr)sr=!1,Es=e,fs=t;else for(A=r;A!==null;)t=A.nextEffect,A.nextEffect=null,A.flags&8&&(E=A,E.sibling=null,E.stateNode=null),A=t;if(r=e.pendingLanes,r===0&&(Yt=null),r===1?e===ep?Cs++:(Cs=0,ep=e):Cs=0,n=n.stateNode,zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(Tp,n,void 0,(n.current.flags&64)===64)}catch{}if(wt(e,Le()),Jl)throw Jl=!1,e=Yf,Yf=null,e;return F&8||en(),null}function xT(){for(;A!==null;){var e=A.alternate;Il||bs===null||(A.flags&8?Py(A,bs)&&(Il=!0):A.tag===13&&mT(e,A)&&Py(A,bs)&&(Il=!0));var t=A.flags;t&256&&fT(e,A),!(t&512)||sr||(sr=!0,Ms(97,function(){return ur(),null})),A=A.nextEffect}}function ur(){if(fs!==90){var e=97<fs?97:fs;return fs=90,Kr(e,wT)}return!1}function _T(e,t){Zf.push(t,e),sr||(sr=!0,Ms(97,function(){return ur(),null}))}function e0(e,t){Jf.push(t,e),sr||(sr=!0,Ms(97,function(){return ur(),null}))}function wT(){if(Es===null)return!1;var e=Es;if(Es=null,F&48)throw Error(T(331));var t=F;F|=32;var n=Jf;Jf=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,typeof s=="function")try{s()}catch(l){if(i===null)throw Error(T(330));nr(i,l)}}for(n=Zf,Zf=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var a=o.create;o.destroy=a()}catch(l){if(i===null)throw Error(T(330));nr(i,l)}}for(a=e.current.firstEffect;a!==null;)e=a.nextEffect,a.nextEffect=null,a.flags&8&&(a.sibling=null,a.stateNode=null),a=e;return F=t,en(),!0}function Pv(e,t,n){t=jp(n,t),t=KS(e,t,1),Jn(e,t),t=tt(),e=pu(e,1),e!==null&&(iu(e,1,t),wt(e,t))}function nr(e,t){if(e.tag===3)Pv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Pv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r))){e=jp(t,e);var o=WS(n,e,1);if(Jn(n,o),o=tt(),n=pu(n,1),n!==null)iu(n,1,o),wt(n,o);else if(typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function ET(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Ae&n)===n&&(be===4||be===3&&(Ae&62914560)===Ae&&500>Le()-Up?Bo(e,0):Bp|=n),wt(e,t)}function CT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(pn===0&&(pn=Go),t=bo(62914560&~pn),t===0&&(t=4194304)):t=Ko()===99?1:2:t=1),n=tt(),e=pu(e,t),e!==null&&(iu(e,t,n),wt(e,n))}var t0;t0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Nt=!0;else if(n&r)Nt=!!(e.flags&16384);else{switch(Nt=!1,t.tag){case 3:mv(t),uf();break;case 5:iv(t);break;case 1:Ge(t.type)&&Tl(t);break;case 4:Hf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(Ul,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?gv(e,t,n):(de(ce,ce.current&1),t=gn(e,t,n),t!==null?t.sibling:null);de(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return xv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),de(ce,ce.current),r)break;return null;case 23:case 24:return t.lanes=0,cf(e,t,n)}return gn(e,t,n)}else Nt=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=Vo(t,Oe.current),Fo(t,n),o=Np(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)){var i=!0;Tl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ip(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Kl(t,r,s,e),o.updater=du,t.stateNode=o,o._reactInternals=t,jf(t,r,e,n),t=Vf(null,t,r,!0,i,n)}else t.tag=0,$e(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=TT(o),e=Ot(o,e),i){case 0:t=zf(null,t,o,e,n);break e;case 1:t=pv(null,t,o,e,n);break e;case 11:t=dv(null,t,o,e,n);break e;case 14:t=fv(null,t,o,Ot(o.type,e),r,n);break e}throw Error(T(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ot(r,o),zf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ot(r,o),pv(e,t,r,o,n);case 3:if(mv(t),r=t.updateQueue,e===null||r===null)throw Error(T(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,TS(e,t),Ds(t,r,null,n),r=t.memoizedState.element,r===o)uf(),t=gn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Gn=Do(t.stateNode.containerInfo.firstChild),mn=t,i=Jt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],jo.push(i);for(n=IS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else $e(e,t,r,n),uf();t=t.child}return t;case 5:return iv(t),e===null&&Bf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Nf(r,o)?s=null:i!==null&&Nf(r,i)&&(t.flags|=16),BS(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&Bf(t),null;case 13:return gv(e,t,n);case 4:return Hf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wl(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ot(r,o),dv(e,t,r,o,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(de(Ul,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=vt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!qe.current){t=gn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r&&u.observedBits&i){a.tag===1&&(u=Zn(-1,n&-n),u.tag=2,Jn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),bS(a.return,n),l.lanes|=n;break}u=u.next}}else s=a.tag===10&&a.type===t.type?null:a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}$e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Fo(t,n),o=_t(o,i.unstable_observedBits),r=r(o),t.flags|=1,$e(e,t,r,n),t.child;case 14:return o=t.type,i=Ot(o,t.pendingProps),i=Ot(o.type,i),fv(e,t,o,i,r,n);case 15:return HS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ot(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ge(r)?(e=!0,Tl(t)):e=!1,Fo(t,n),PS(t,r,o),jf(t,r,o,n),Vf(null,t,r,!0,e,n);case 19:return xv(e,t,n);case 23:return cf(e,t,n);case 24:return cf(e,t,n)}throw Error(T(156,t.tag))};function bT(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,n,r){return new bT(e,t,n,r)}function Vp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function TT(e){if(typeof e=="function")return Vp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===nu)return 11;if(e===ru)return 14}return 2}function ar(e,t){var n=e.alternate;return n===null?(n=St(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Vp(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wn:return Uo(n.children,o,i,t);case Lv:s=8,o|=16;break;case ip:s=8,o|=1;break;case ms:return e=St(12,n,t,o|8),e.elementType=ms,e.type=ms,e.lanes=i,e;case gs:return e=St(13,n,t,o),e.type=gs,e.elementType=gs,e.lanes=i,e;case Al:return e=St(19,n,t,o),e.elementType=Al,e.lanes=i,e;case dp:return Kp(n,o,i,t);case hf:return e=St(24,n,t,o),e.elementType=hf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sp:s=10;break e;case ap:s=9;break e;case nu:s=11;break e;case ru:s=14;break e;case lp:s=16,r=null;break e;case up:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=St(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Uo(e,t,n,r){return e=St(7,e,r,t),e.lanes=n,e}function Kp(e,t,n,r){return e=St(23,e,r,t),e.elementType=dp,e.lanes=n,e}function pf(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function mf(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kT(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Yd(0),this.expirationTimes=Yd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yd(0),this.mutableSourceEagerHydrationData=null}function PT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function eu(e,t,n,r){var o=t.current,i=tt(),s=er(o);e:if(n){n=n._reactInternals;t:{if(Gr(n)!==n||n.tag!==1)throw Error(T(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(Ge(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(T(171))}if(n.tag===1){var l=n.type;if(Ge(l)){n=vS(n,l,a);break e}}n=a}else n=ir;return t.context===null?t.context=n:t.pendingContext=n,t=Zn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Jn(o,t),tr(o,s,i),s}function gf(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Rv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Wp(e,t){Rv(e,t),(e=e.alternate)&&Rv(e,t)}function RT(){return null}function $p(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new kT(e,t,n!=null&&n.hydrate===!0),t=St(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Ip(t),e[qo]=n.current,pS(e.nodeType===8?e.parentNode:e),r)for(e=0;e<r.length;e++){t=r[e];var o=t._getVersion;o=o(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}$p.prototype.render=function(e){eu(e,this._internalRoot,null,null)};$p.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;eu(null,e,null,function(){t[qo]=null})};function Ks(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function IT(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new $p(e,0,t?{hydrate:!0}:void 0)}function mu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i._internalRoot;if(typeof o=="function"){var a=o;o=function(){var u=gf(s);a.call(u)}}eu(t,s,e,o)}else{if(i=n._reactRootContainer=IT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=gf(s);l.call(u)}}XS(function(){eu(t,s,e,o)})}return gf(s)}$v=function(e){if(e.tag===13){var t=tt();tr(e,4,t),Wp(e,4)}};hp=function(e){if(e.tag===13){var t=tt();tr(e,67108864,t),Wp(e,67108864)}};qv=function(e){if(e.tag===13){var t=tt(),n=er(e);tr(e,n,t),Wp(e,n)}};Gv=function(e,t){return t()};Tf=function(e,t,n){switch(t){case"input":if(vf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=uu(r);if(!o)throw Error(T(90));Ov(r),vf(r,o)}}}break;case"textarea":Mv(e,n);break;case"select":t=n.value,t!=null&&Oo(e,!!n.multiple,t,!1)}};pp=GS;zv=function(e,t,n,r,o){var i=F;F|=4;try{return Kr(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(Qo(),en())}};mp=function(){!(F&49)&&(hT(),ur())};Vv=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(Qo(),en())}};function n0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ks(t))throw Error(T(200));return PT(e,t,null,n)}var LT={Events:[Us,Ro,uu,Bv,Uv,ur,{current:!1}]},as={findFiberByHostInstance:Hr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},AT={bundleType:as.bundleType,version:as.version,rendererPackageName:as.rendererPackageName,rendererConfig:as.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Wv(e),e===null?null:e.stateNode},findFiberByHostInstance:as.findFiberByHostInstance||RT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ls=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ls.isDisabled&&ls.supportsFiber))try{Tp=ls.inject(AT),zr=ls}catch{}var ls;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LT;Et.createPortal=n0;Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(T(188)):Error(T(268,Object.keys(e)));return e=Wv(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e,t){var n=F;if(n&48)return e(t);F|=1;try{if(e)return Kr(99,e.bind(null,t))}finally{F=n,en()}};Et.hydrate=function(e,t,n){if(!Ks(t))throw Error(T(200));return mu(null,e,t,!0,n)};Et.render=function(e,t,n){if(!Ks(t))throw Error(T(200));return mu(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!Ks(e))throw Error(T(40));return e._reactRootContainer?(XS(function(){mu(null,null,e,!1,function(){e._reactRootContainer=null,e[qo]=null})}),!0):!1};Et.unstable_batchedUpdates=GS;Et.unstable_createPortal=function(e,t){return n0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ks(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return mu(e,t,n,!1,r)};Et.version="17.0.2"});var gu=pe((dO,i0)=>{"use strict";function o0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o0)}catch(e){console.error(e)}}o0(),i0.exports=r0()});var O0=pe(A0=>{"use strict";var ni=O();function hk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yk=typeof Object.is=="function"?Object.is:hk,vk=ni.useState,Sk=ni.useEffect,xk=ni.useLayoutEffect,_k=ni.useDebugValue;function wk(e,t){var n=t(),r=vk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return xk(function(){o.value=n,o.getSnapshot=t,Sm(o)&&i({inst:o})},[e,n,t]),Sk(function(){return Sm(o)&&i({inst:o}),e(function(){Sm(o)&&i({inst:o})})},[e]),_k(n),n}function Sm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yk(e,n)}catch{return!0}}function Ek(e,t){return t()}var Ck=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ek:wk;A0.useSyncExternalStore=ni.useSyncExternalStore!==void 0?ni.useSyncExternalStore:Ck});var xm=pe((ZO,N0)=>{"use strict";N0.exports=O0()});var D0=pe(M0=>{"use strict";var Eu=O(),bk=xm();function Tk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kk=typeof Object.is=="function"?Object.is:Tk,Pk=bk.useSyncExternalStore,Rk=Eu.useRef,Ik=Eu.useEffect,Lk=Eu.useMemo,Ak=Eu.useDebugValue;M0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Rk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Lk(function(){function l(y){if(!u){if(u=!0,c=y,y=r(y),o!==void 0&&s.hasValue){var v=s.value;if(o(v,y))return f=v}return f=y}if(v=f,kk(c,y))return v;var h=r(y);return o!==void 0&&o(v,h)?v:(c=y,f=h)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=Pk(e,i[0],i[1]);return Ik(function(){s.hasValue=!0,s.value=a},[a]),Ak(a),a}});var j0=pe((eN,F0)=>{"use strict";F0.exports=D0()});var X0=pe(Q=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,wm=_e?Symbol.for("react.element"):60103,Em=_e?Symbol.for("react.portal"):60106,ku=_e?Symbol.for("react.fragment"):60107,Pu=_e?Symbol.for("react.strict_mode"):60108,Ru=_e?Symbol.for("react.profiler"):60114,Iu=_e?Symbol.for("react.provider"):60109,Lu=_e?Symbol.for("react.context"):60110,Cm=_e?Symbol.for("react.async_mode"):60111,Au=_e?Symbol.for("react.concurrent_mode"):60111,Ou=_e?Symbol.for("react.forward_ref"):60112,Nu=_e?Symbol.for("react.suspense"):60113,Dk=_e?Symbol.for("react.suspense_list"):60120,Mu=_e?Symbol.for("react.memo"):60115,Du=_e?Symbol.for("react.lazy"):60116,Fk=_e?Symbol.for("react.block"):60121,jk=_e?Symbol.for("react.fundamental"):60117,Hk=_e?Symbol.for("react.responder"):60118,Bk=_e?Symbol.for("react.scope"):60119;function ot(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case wm:switch(e=e.type,e){case Cm:case Au:case ku:case Ru:case Pu:case Nu:return e;default:switch(e=e&&e.$$typeof,e){case Lu:case Ou:case Du:case Mu:case Iu:return e;default:return t}}case Em:return t}}}function G0(e){return ot(e)===Au}Q.AsyncMode=Cm;Q.ConcurrentMode=Au;Q.ContextConsumer=Lu;Q.ContextProvider=Iu;Q.Element=wm;Q.ForwardRef=Ou;Q.Fragment=ku;Q.Lazy=Du;Q.Memo=Mu;Q.Portal=Em;Q.Profiler=Ru;Q.StrictMode=Pu;Q.Suspense=Nu;Q.isAsyncMode=function(e){return G0(e)||ot(e)===Cm};Q.isConcurrentMode=G0;Q.isContextConsumer=function(e){return ot(e)===Lu};Q.isContextProvider=function(e){return ot(e)===Iu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===wm};Q.isForwardRef=function(e){return ot(e)===Ou};Q.isFragment=function(e){return ot(e)===ku};Q.isLazy=function(e){return ot(e)===Du};Q.isMemo=function(e){return ot(e)===Mu};Q.isPortal=function(e){return ot(e)===Em};Q.isProfiler=function(e){return ot(e)===Ru};Q.isStrictMode=function(e){return ot(e)===Pu};Q.isSuspense=function(e){return ot(e)===Nu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ku||e===Au||e===Ru||e===Pu||e===Nu||e===Dk||typeof e=="object"&&e!==null&&(e.$$typeof===Du||e.$$typeof===Mu||e.$$typeof===Iu||e.$$typeof===Lu||e.$$typeof===Ou||e.$$typeof===jk||e.$$typeof===Hk||e.$$typeof===Bk||e.$$typeof===Fk)};Q.typeOf=ot});var Y0=pe((mN,Q0)=>{"use strict";Q0.exports=X0()});var ox=pe((gN,rx)=>{"use strict";var bm=Y0(),Uk={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},zk={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vk={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},tx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Tm={};Tm[bm.ForwardRef]=Vk;Tm[bm.Memo]=tx;function Z0(e){return bm.isMemo(e)?tx:Tm[e.$$typeof]||Uk}var Kk=Object.defineProperty,Wk=Object.getOwnPropertyNames,J0=Object.getOwnPropertySymbols,$k=Object.getOwnPropertyDescriptor,qk=Object.getPrototypeOf,ex=Object.prototype;function nx(e,t,n){if(typeof t!="string"){if(ex){var r=qk(t);r&&r!==ex&&nx(e,r,n)}var o=Wk(t);J0&&(o=o.concat(J0(t)));for(var i=Z0(e),s=Z0(t),a=0;a<o.length;++a){var l=o[a];if(!zk[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=$k(t,l);try{Kk(e,l,u)}catch{}}}}return e}rx.exports=nx});var sx=pe(Y=>{"use strict";var km=Symbol.for("react.element"),Pm=Symbol.for("react.portal"),Fu=Symbol.for("react.fragment"),ju=Symbol.for("react.strict_mode"),Hu=Symbol.for("react.profiler"),Bu=Symbol.for("react.provider"),Uu=Symbol.for("react.context"),Gk=Symbol.for("react.server_context"),zu=Symbol.for("react.forward_ref"),Vu=Symbol.for("react.suspense"),Ku=Symbol.for("react.suspense_list"),Wu=Symbol.for("react.memo"),$u=Symbol.for("react.lazy"),Xk=Symbol.for("react.offscreen"),ix;ix=Symbol.for("react.module.reference");function bt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case km:switch(e=e.type,e){case Fu:case Hu:case ju:case Vu:case Ku:return e;default:switch(e=e&&e.$$typeof,e){case Gk:case Uu:case zu:case $u:case Wu:case Bu:return e;default:return t}}case Pm:return t}}}Y.ContextConsumer=Uu;Y.ContextProvider=Bu;Y.Element=km;Y.ForwardRef=zu;Y.Fragment=Fu;Y.Lazy=$u;Y.Memo=Wu;Y.Portal=Pm;Y.Profiler=Hu;Y.StrictMode=ju;Y.Suspense=Vu;Y.SuspenseList=Ku;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return bt(e)===Uu};Y.isContextProvider=function(e){return bt(e)===Bu};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===km};Y.isForwardRef=function(e){return bt(e)===zu};Y.isFragment=function(e){return bt(e)===Fu};Y.isLazy=function(e){return bt(e)===$u};Y.isMemo=function(e){return bt(e)===Wu};Y.isPortal=function(e){return bt(e)===Pm};Y.isProfiler=function(e){return bt(e)===Hu};Y.isStrictMode=function(e){return bt(e)===ju};Y.isSuspense=function(e){return bt(e)===Vu};Y.isSuspenseList=function(e){return bt(e)===Ku};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fu||e===Hu||e===ju||e===Vu||e===Ku||e===Xk||typeof e=="object"&&e!==null&&(e.$$typeof===$u||e.$$typeof===Wu||e.$$typeof===Bu||e.$$typeof===Uu||e.$$typeof===zu||e.$$typeof===ix||e.getModuleId!==void 0)};Y.typeOf=bt});var lx=pe((yN,ax)=>{"use strict";ax.exports=sx()});var i_=pe((V2,o_)=>{"use strict";var BP=/["'&<>]/;o_.exports=UP;function UP(e){var t=""+e,n=BP.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var Og=pe((n8,Ow)=>{"use strict";var AR="Expected a function",Lw=NaN,OR="[object Symbol]",NR=/^\s+|\s+$/g,MR=/^[-+]0x[0-9a-f]+$/i,DR=/^0b[01]+$/i,FR=/^0o[0-7]+$/i,jR=parseInt,HR=typeof global=="object"&&global&&global.Object===Object&&global,BR=typeof self=="object"&&self&&self.Object===Object&&self,UR=HR||BR||Function("return this")(),zR=Object.prototype,VR=zR.toString,KR=Math.max,WR=Math.min,Lg=function(){return UR.Date.now()};function $R(e,t,n){var r,o,i,s,a,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(AR);t=Aw(t)||0,Ag(n)&&(c=!!n.leading,f="maxWait"in n,i=f?KR(Aw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(E){var b=r,R=o;return r=o=void 0,u=E,s=e.apply(R,b),s}function v(E){return u=E,a=setTimeout(m,t),c?y(E):s}function h(E){var b=E-l,R=E-u,P=t-b;return f?WR(P,i-R):P}function g(E){var b=E-l,R=E-u;return l===void 0||b>=t||b<0||f&&R>=i}function m(){var E=Lg();if(g(E))return p(E);a=setTimeout(m,h(E))}function p(E){return a=void 0,d&&r?y(E):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:p(Lg())}function C(){var E=Lg(),b=g(E);if(r=arguments,o=this,l=E,b){if(a===void 0)return v(l);if(f)return a=setTimeout(m,t),y(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=S,C.flush=_,C}function Ag(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function qR(e){return!!e&&typeof e=="object"}function GR(e){return typeof e=="symbol"||qR(e)&&VR.call(e)==OR}function Aw(e){if(typeof e=="number")return e;if(GR(e))return Lw;if(Ag(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ag(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(NR,"");var n=DR.test(e);return n||FR.test(e)?jR(e.slice(2),n?2:8):MR.test(e)?Lw:+e}Ow.exports=$R});var DL={};Pe(DL,{Card:()=>me,ContentEditableInput:()=>co,DeepdeskAPI:()=>Hn,DeepdeskSDK:()=>Ba,HTTPClient:()=>Wt,InputMediator:()=>bn,InputType:()=>zn,KeyboardHint:()=>Ja,Label:()=>el,Locale:()=>Zs,Section:()=>Un,SectionList:()=>tl,Sources:()=>Lt,Suggestion:()=>oe,SuggestionList:()=>ht,TextAreaInput:()=>Tn,ToggleButton:()=>Nr,attachFile:()=>rC,authenticateWithKey:()=>tC,createFullRange:()=>Mi,createOverlayContainer:()=>oo,createRangeFromOffsets:()=>Pr,escapeHTML:()=>Ii,fetchPlatformConfig:()=>nC,formatTextMarkup:()=>eC,getRangeOffsets:()=>Da,getRangeText:()=>Fa,insertCKEditor:()=>JE,isSupportedInputElement:()=>Cd,updateContentEditable:()=>ZE,updateTextArea:()=>YE,useStyles:()=>k,waitForElementVisibilityChange:()=>bd});var Qa=x(X()),pt=x(O());var Ga=x(O()),Bh=x(X()),Ki=Ga.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Ga.useContext)(Ki),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Bh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Uh={root:"_root_vr71j_1"};var Ar=x(w()),Xa=()=>(0,Ar.jsxs)("svg",{className:Uh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ar.jsx)("defs",{children:(0,Ar.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Ar.jsx)("title",{children:"Failed loading image"}),(0,Ar.jsx)("path",{className:"cls-1",d:"M15 130.896V16.994c0-1.097.898-1.994 2.007-1.994h150.986A2 2 0 0 1 170 16.994v69.147L133.015 51 87.26 120.377l-35.863-17.758L15 130.896zM2 0C.895 0 0 .887 0 2v166c0 1.105.887 2 2 2h181c1.105 0 2-.887 2-2V2c0-1.105-.887-2-2-2H2zm49 72c11.046 0 20-9.178 20-20.5S62.046 31 51 31s-20 9.178-20 20.5S39.954 72 51 72z",fillRule:"evenodd"})]});var Od={root:"_root_4e7lf_1",imageWrapper:"_imageWrapper_4e7lf_7",image:"_image_4e7lf_7",content:"_content_4e7lf_24",title:"_title_4e7lf_35",contentIsCropped:"_contentIsCropped_4e7lf_45",lineClamp:"_lineClamp_4e7lf_51"};var Or=x(w()),Ya=(0,pt.createContext)(Od),EC=({title:e,src:t})=>{let n=(0,pt.useContext)(Ya),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Or.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Or.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Or.jsx)(Xa,{})})},CC=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)(Ya);return(0,Or.jsx)("div",{className:(0,Qa.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},bC=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,pt.useContext)(Ya);return pt.default.createElement(e,{className:(0,Qa.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Za=({children:e})=>{let t=k("Card",Od);return(0,Or.jsx)("div",{className:(0,Qa.default)(t.root),children:(0,Or.jsx)(Ya.Provider,{value:t,children:e})})};Za.Image=EC;Za.Content=CC;Za.Title=bC;var me=Za;var qh=x(X());var $h={root:"_root_cq1yq_1"};var Gh=x(w());var TC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},kC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",$h);return(0,Gh.jsx)("span",{"data-key":TC[t],className:(0,qh.default)(e,r.root),...n})},Ja=kC;var Qh=x(X());var Xh={root:"_root_4a08n_1"};var Yh=x(w()),PC=({className:e,children:t,...n})=>{let r=k("Label",Xh);return(0,Yh.jsx)("span",{...n,className:(0,Qh.default)(e,r.root),children:t})},el=PC;var Zh={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var ho=x(w()),RC=({title:e,children:t,type:n,...r})=>{let o=k("Section",Zh);return(0,ho.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,ho.jsx)("div",{className:o.subTitleContainer,children:(0,ho.jsx)("span",{className:o.subtitle,children:e})}),(0,ho.jsx)("div",{className:o.suggestions,children:t})]})},Un=RC;var ey=x(X()),ty=x(O());var Jh={root:"_root_19wxp_1"};var ny=x(w()),IC=ty.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",Jh);return(0,ny.jsx)("div",{ref:n,className:(0,ey.default)(r.root,e),children:t})}),tl=IC;var $i=x(X()),gt=x(O());var Nd={root:"_root_fsa1k_10",fadein:"_fadein_fsa1k_1",isClickable:"_isClickable_fsa1k_45",isSelected:"_isSelected_fsa1k_50",actions:"_actions_fsa1k_74",actionsIsFixed:"_actionsIsFixed_fsa1k_96",actionButton:"_actionButton_fsa1k_104",dropdownList:"_dropdownList_fsa1k_125",dropdownButton:"_dropdownButton_fsa1k_140",dropdownItem:"_dropdownItem_fsa1k_150",dropdownItemButton:"_dropdownItemButton_fsa1k_159",actionButtonIsPrimary:"_actionButtonIsPrimary_fsa1k_173",actionButtonIsDisabled:"_actionButtonIsDisabled_fsa1k_177",labels:"_labels_fsa1k_185",label:"_label_fsa1k_185"};var mt=x(w()),yo=(0,gt.createContext)(Nd),LC=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(yo);return(0,mt.jsx)("div",{...n,className:(0,$i.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},AC=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(yo);return(0,mt.jsxs)("div",{className:(0,$i.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,mt.jsx)("ul",{className:i.dropdownList,children:o})]})},OC=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(yo);return(0,mt.jsx)("li",{className:r.dropdownItem,children:(0,mt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},NC=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(yo);return(0,mt.jsx)("button",{type:"button",className:(0,$i.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Md=({labels:e})=>{let t=(0,gt.useContext)(yo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},vo=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Nd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,$i.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(yo.Provider,{value:a,children:r})})});vo.Labels=Md;vo.Actions=LC;vo.ActionButton=NC;vo.DropdownButton=AC;vo.DropdownItem=OC;var oe=vo;var oy=x(X());var ry={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var iy=x(w()),MC=({withDivider:e,children:t})=>{let n=k("SuggestionList",ry);return(0,iy.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,oy.default)(n.root,{[n.isWithDivider]:e}),children:t})},ht=MC;var ay=x(X());var sy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var nl=x(w()),DC=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",sy);return(0,nl.jsx)("button",{type:"button",className:(0,ay.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,nl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,nl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Nr=DC;var ly=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,So=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var uy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Lt=(h=>(h.SEARCH="search",h.TEMPLATE="template",h.ELASTIC_SEARCH="search-autocomplete",h.GPT="gpt",h.TRIE="trie",h.TRIE_WITH_TYPOS="trie-with-typos",h.SEMANTIC="semantic",h.TEXT_RECOMMENDATION="text_recommendation",h.URL_RECOMMENDATION="url_recommendation",h.LINK_RECOMMENDATION="link_recommendation",h.PERSONAL_COLLECTION="personal-collection",h.PERSONAL_COLLECTION_SEARCH="personal-collection-search",h.SEARCH_OVERLAY="search-overlay",h.SEARCH_PREVIEW="search-preview",h.SEARCH_URL="search-url",h))(Lt||{}),zn=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(zn||{});var $t=x(gu());var o1=x(O());function Ct(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!1)var o,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function vn(e){return!!e&&!!e[le]}function Mt(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===BT}(e)||Array.isArray(e)||!!e[f0]||!!(!((t=e.constructor)===null||t===void 0)&&t[f0])||tm(e)||nm(e))}function Qr(e,t,n){n===void 0&&(n=!1),Jo(e)===0?(n?Object.keys:Zo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Jo(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:tm(e)?2:nm(e)?3:0}function Yo(e,t){return Jo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function OT(e,t){return Jo(e)===2?e.get(t):e[t]}function p0(e,t,n){var r=Jo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function m0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function tm(e){return jT&&e instanceof Map}function nm(e){return HT&&e instanceof Set}function cr(e){return e.o||e.t}function rm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=y0(e);delete t[le];for(var n=Zo(t),r=0;r<n.length;r++){var o=n[r],i=t[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function om(e,t){return t===void 0&&(t=!1),im(e)||vn(e)||!Mt(e)||(Jo(e)>1&&(e.set=e.add=e.clear=e.delete=NT),Object.freeze(e),t&&Qr(e,function(n,r){return om(r,!0)},!0)),e}function NT(){Ct(2)}function im(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tn(e){var t=em[e];return t||Ct(18,e),t}function MT(e,t){em[e]||(em[e]=t)}function Yp(){return $s}function qp(e,t){t&&(tn("Patches"),e.u=[],e.s=[],e.v=t)}function hu(e){Zp(e),e.p.forEach(DT),e.p=null}function Zp(e){e===$s&&($s=e.l)}function s0(e){return $s={p:[],l:$s,h:e,m:!0,_:0}}function DT(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function Gp(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||tn("ES5").S(t,e,r),r?(n[le].P&&(hu(t),Ct(4)),Mt(e)&&(e=yu(t,e),t.l||vu(t,e)),t.u&&tn("Patches").M(n[le].t,e,t.u,t.s)):e=yu(t,n,[]),hu(t),t.u&&t.v(t.u,t.s),e!==h0?e:void 0}function yu(e,t,n){if(im(t))return t;var r=t[le];if(!r)return Qr(t,function(a,l){return a0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return vu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=rm(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Qr(i,function(a,l){return a0(e,r,o,a,l,n,s)}),vu(e,o,!1),n&&e.u&&tn("Patches").N(r,n,e.u,e.s)}return r.o}function a0(e,t,n,r,o,i,s){if(vn(o)){var a=yu(e,o,i&&t&&t.i!==3&&!Yo(t.R,r)?i.concat(r):void 0);if(p0(n,r,a),!vn(a))return;e.m=!1}else s&&n.add(o);if(Mt(o)&&!im(o)){if(!e.h.D&&e._<1)return;yu(e,o),t&&t.A.l||vu(e,o)}}function vu(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&om(t,n)}function Xp(e,t){var n=e[le];return(n?cr(n):e)[t]}function l0(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function dr(e){e.P||(e.P=!0,e.l&&dr(e.l))}function Qp(e){e.o||(e.o=rm(e.t))}function Jp(e,t,n){var r=tm(t)?tn("MapSet").F(t,n):nm(t)?tn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Yp(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=qs;s&&(l=[a],u=Ws);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):tn("ES5").J(t,n);return(n?n.A:Yp()).p.push(r),r}function FT(e){return vn(e)||Ct(22,e),function t(n){if(!Mt(n))return n;var r,o=n[le],i=Jo(n);if(o){if(!o.P&&(o.i<4||!tn("ES5").K(o)))return o.t;o.I=!0,r=u0(n,i),o.I=!1}else r=u0(n,i);return Qr(r,function(s,a){o&&OT(o.t,s)===a||p0(r,s,t(a))}),i===3?new Set(r):r}(e)}function u0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return rm(e)}function g0(){function e(s,a){var l=i[s];return l?l.enumerable=a:i[s]=l={configurable:!0,enumerable:a,get:function(){var u=this[le];return qs.get(u,s)},set:function(u){var c=this[le];qs.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][le];if(!l.P)switch(l.i){case 5:r(l)&&dr(l);break;case 4:n(l)&&dr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Zo(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==le){var d=a[f];if(d===void 0&&!Yo(a,f))return!0;var y=l[f],v=y&&y[le];if(v?v.t!==d:!m0(y,d))return!0}}var h=!!a[le];return u.length!==Zo(a).length+(h?0:1)}function r(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var u=0;u<a.length;u++)if(!a.hasOwnProperty(u))return!0;return!1}function o(s){s.g&&Ct(3,JSON.stringify(cr(s)))}var i={};MT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var y=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(y,""+v,e(v,!0));return y}var h=y0(d);delete h[le];for(var g=Zo(h),m=0;m<g.length;m++){var p=g[m];h[p]=e(p,f||!!h[p].enumerable)}return Object.create(Object.getPrototypeOf(d),h)}(l,s),c={i:l?5:4,A:a?a.A:Yp(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,le,{value:c,writable:!0}),u},S:function(s,a,l){l?vn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[le];if(f){var d=f.t,y=f.k,v=f.R,h=f.i;if(h===4)Qr(y,function(_){_!==le&&(d[_]!==void 0||Yo(d,_)?v[_]||u(y[_]):(v[_]=!0,dr(f)))}),Qr(d,function(_){y[_]!==void 0||Yo(y,_)||(v[_]=!1,dr(f))});else if(h===5){if(r(f)&&(dr(f),v.length=!0),y.length<d.length)for(var g=y.length;g<d.length;g++)v[g]=!1;else for(var m=d.length;m<y.length;m++)v[m]=!0;for(var p=Math.min(y.length,d.length),S=0;S<p;S++)y.hasOwnProperty(S)||(v[S]=!0),v[S]===void 0&&u(y[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var c0,$s,sm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",jT=typeof Map<"u",HT=typeof Set<"u",d0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",h0=sm?Symbol.for("immer-nothing"):((c0={})["immer-nothing"]=!0,c0),f0=sm?Symbol.for("immer-draftable"):"__$immer_draftable",le=sm?Symbol.for("immer-state"):"__$immer_state";var BT=""+Object.prototype.constructor,Zo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,y0=Object.getOwnPropertyDescriptors||function(e){var t={};return Zo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},em={},qs={get:function(e,t){if(t===le)return e;var n=cr(e);if(!Yo(n,t))return function(o,i,s){var a,l=l0(i,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Mt(r)?r:r===Xp(e.t,t)?(Qp(e),e.o[t]=Jp(e.A.h,r,e)):r},has:function(e,t){return t in cr(e)},ownKeys:function(e){return Reflect.ownKeys(cr(e))},set:function(e,t,n){var r=l0(cr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Xp(cr(e),t),i=o==null?void 0:o[le];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(m0(n,o)&&(n!==void 0||Yo(e.t,t)))return!0;Qp(e),dr(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return Xp(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Qp(e),dr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=cr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ct(12)}},Ws={};Qr(qs,function(e,t){Ws[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ws.deleteProperty=function(e,t){return Ws.set.call(this,e,t,void 0)},Ws.set=function(e,t,n){return qs.set.call(this,e[0],t,n,e[0])};var UT=function(){function e(n){var r=this;this.O=d0,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(h){var g=this;h===void 0&&(h=a);for(var m=arguments.length,p=Array(m>1?m-1:0),S=1;S<m;S++)p[S-1]=arguments[S];return l.produce(h,function(_){var C;return(C=i).call.apply(C,[g,_].concat(p))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Mt(o)){var c=s0(r),f=Jp(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?hu(c):Zp(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(h){return qp(c,s),Gp(h,c)},function(h){throw hu(c),h}):(qp(c,s),Gp(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===h0&&(u=void 0),r.D&&om(u,!0),s){var y=[],v=[];tn("Patches").M(o,u,y,v),s(y,v)}return u}Ct(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,f=Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];return r.produceWithPatches(u,function(y){return o.apply(void 0,[y].concat(f))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Mt(n)||Ct(8),vn(n)&&(n=FT(n));var r=s0(this),o=Jp(this,n,void 0);return o[le].C=!0,Zp(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return qp(i,r),Gp(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!d0&&Ct(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=tn("Patches").$;return vn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),rt=new UT,zT=rt.produce,fO=rt.produceWithPatches.bind(rt),pO=rt.setAutoFreeze.bind(rt),mO=rt.setUseProxies.bind(rt),gO=rt.applyPatches.bind(rt),hO=rt.createDraft.bind(rt),yO=rt.finishDraft.bind(rt),Su=zT;function fr(e){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr(e)}function am(e,t){if(fr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lm(e){var t=am(e,"string");return fr(t)==="symbol"?t:String(t)}function um(e,t,n){return t=lm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v0(Object(n),!0).forEach(function(r){um(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var S0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cm=function(){return Math.random().toString(36).substring(7).split("").join(".")},_u={INIT:"@@redux/INIT"+cm(),REPLACE:"@@redux/REPLACE"+cm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cm()}};function VT(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function dm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ne(1));return n(dm)(e,t)}if(typeof e!="function")throw new Error(Ne(2));var o=e,i=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error(Ne(3));return i}function f(h){if(typeof h!="function")throw new Error(Ne(4));if(l)throw new Error(Ne(5));var g=!0;return u(),a.push(h),function(){if(g){if(l)throw new Error(Ne(6));g=!1,u();var p=a.indexOf(h);a.splice(p,1),s=null}}}function d(h){if(!VT(h))throw new Error(Ne(7));if(typeof h.type>"u")throw new Error(Ne(8));if(l)throw new Error(Ne(9));try{l=!0,i=o(i,h)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var p=g[m];p()}return h}function y(h){if(typeof h!="function")throw new Error(Ne(10));o=h,d({type:_u.REPLACE})}function v(){var h,g=f;return h={subscribe:function(p){if(typeof p!="object"||p===null)throw new Error(Ne(11));function S(){p.next&&p.next(c())}S();var _=g(S);return{unsubscribe:_}}},h[S0]=function(){return this},h}return d({type:_u.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:y},r[S0]=v,r}function KT(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:_u.INIT});if(typeof r>"u")throw new Error(Ne(12));if(typeof n(void 0,{type:_u.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ne(13))})}function wu(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];typeof e[o]=="function"&&(n[o]=e[o])}var i=Object.keys(n),s,a;try{KT(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var f;for(var d=!1,y={},v=0;v<i.length;v++){var h=i[v],g=n[h],m=u[h],p=g(m,c);if(typeof p>"u"){var S=c&&c.type;throw new Error(Ne(14))}y[h]=p,d=d||p!==m}return d=d||i.length!==Object.keys(u).length,d?y:u}}function ei(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function x0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(Ne(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=ei.apply(void 0,a)(o.dispatch),xu(xu({},o),{},{dispatch:i})}}}function _0(e){var t=function(r){var o=r.dispatch,i=r.getState;return function(s){return function(a){return typeof a=="function"?a(o,i,e):s(a)}}};return t}var w0=_0();w0.withExtraArgument=_0;var fm=w0;var k0=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),WT=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},ti=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},$T=Object.defineProperty,qT=Object.defineProperties,GT=Object.getOwnPropertyDescriptors,E0=Object.getOwnPropertySymbols,XT=Object.prototype.hasOwnProperty,QT=Object.prototype.propertyIsEnumerable,C0=function(e,t,n){return t in e?$T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},pr=function(e,t){for(var n in t||(t={}))XT.call(t,n)&&C0(e,n,t[n]);if(E0)for(var r=0,o=E0(t);r<o.length;r++){var n=o[r];QT.call(t,n)&&C0(e,n,t[n])}return e},pm=function(e,t){return qT(e,GT(t))},YT=function(e,t,n){return new Promise(function(r,o){var i=function(l){try{a(n.next(l))}catch(u){o(u)}},s=function(l){try{a(n.throw(l))}catch(u){o(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(i,s)};a((n=n.apply(e,t)).next())})};var ZT=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ei:ei.apply(null,arguments)},MO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function JT(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var ek=function(e){k0(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,ti([void 0],n[0].concat(this)))):new(t.bind.apply(t,ti([void 0],n.concat(this))))},t}(Array),tk=function(e){k0(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,ti([void 0],n[0].concat(this)))):new(t.bind.apply(t,ti([void 0],n.concat(this))))},t}(Array);function hm(e){return Mt(e)?Su(e,function(){}):e}function nk(e){return typeof e=="boolean"}function rk(){return function(t){return ok(t)}}function ok(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t,r=e.immutableCheck,o=r===void 0?!0:r,i=e.serializableCheck,s=i===void 0?!0:i,a=new ek;if(n&&(nk(n)?a.push(fm):a.push(fm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var mm=!0;function P0(e){var t=rk(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,f=n.enhancers,d=f===void 0?void 0:f,y;if(typeof o=="function")y=o;else if(JT(o))y=wu(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(t),!mm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!mm&&v.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=x0.apply(void 0,v),g=ei;l&&(g=ZT(pr({trace:!mm},typeof l=="object"&&l)));var m=new tk(h),p=m;Array.isArray(d)?p=ti([h],d):typeof d=="function"&&(p=d(m));var S=g.apply(void 0,p);return dm(y,c,S)}function fe(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return pr(pr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function R0(e){var t={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(a in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[a]=s,o},addMatcher:function(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase:function(i){return r=i,o}};return e(o),[t,n,r]}function ik(e){return typeof e=="function"}function sk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?R0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(ik(e))l=function(){return hm(e())};else{var u=hm(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var y=ti([i[d.type]],s.filter(function(v){var h=v.matcher;return h(d)}).map(function(v){var h=v.reducer;return h}));return y.filter(function(v){return!!v}).length===0&&(y=[a]),y.reduce(function(v,h){if(h)if(vn(v)){var g=v,m=h(g,d);return m===void 0?v:m}else{if(Mt(v))return Su(v,function(p){return h(p,d)});var m=h(v,d);if(m===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return v},f)}return c.getInitialState=l,c}function ak(e,t){return e+"/"+t}function j(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:hm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=ak(t,c),y,v;"reducer"in f?(y=f.reducer,v=f.prepare):y=f,i[c]=y,s[d]=y,a[c]=v?fe(d,v):fe(d)});function l(){var c=typeof e.extraReducers=="function"?R0(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,y=c[1],v=y===void 0?[]:y,h=c[2],g=h===void 0?void 0:h,m=pr(pr({},d),s);return sk(n,function(p){for(var S in m)p.addCase(S,m[S]);for(var _=0,C=v;_<C.length;_++){var E=C[_];p.addMatcher(E.matcher,E.reducer)}g&&p.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,f){return u||(u=l()),u(c,f)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var lk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",uk=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=lk[Math.random()*64|0];return t},ck=["name","message","stack","code"],gm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),b0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),dk=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=ck;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},M=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,f,d,y){return{payload:c,meta:pm(pr({},y||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,f,d){return{payload:void 0,meta:pm(pr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,f,d,y,v){return{payload:y,error:(r&&r.serializeError||dk)(c||"Rejected"),meta:pm(pr({},v||{}),{arg:d,requestId:f,rejectedWithValue:!!y,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(f,d,y){var v=r!=null&&r.idGenerator?r.idGenerator(c):uk(),h=new l,g,m=!1;function p(_){g=_,h.abort()}var S=function(){return YT(this,null,function(){var _,C,E,b,R,P,N;return WT(this,function(G){switch(G.label){case 0:return G.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:y}),pk(b)?[4,b]:[3,2];case 1:b=G.sent(),G.label=2;case 2:if(b===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(V,He){return h.signal.addEventListener("abort",function(){return He({name:"AbortError",message:g||"Aborted"})})}),f(i(v,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:v,arg:c},{getState:d,extra:y}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:f,getState:d,extra:y,requestId:v,signal:h.signal,abort:p,rejectWithValue:function(V,He){return new gm(V,He)},fulfillWithValue:function(V,He){return new b0(V,He)}})).then(function(V){if(V instanceof gm)throw V;return V instanceof b0?o(V.payload,v,c,V.meta):o(V,v,c)})])];case 3:return E=G.sent(),[3,5];case 4:return P=G.sent(),E=P instanceof gm?s(null,v,c,P.payload,P.meta):s(P,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||f(E),[2,E]}})})}();return Object.assign(S,{abort:p,requestId:v,arg:c,unwrap:function(){return S.then(fk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function fk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function pk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var mk="task",I0="listener",L0="completed",ym="cancelled",HO="task-"+ym,BO="task-"+L0,UO=I0+"-"+ym,zO=I0+"-"+L0,VO=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=mk+" "+ym+" (reason: "+t+")"}return e}();var vm="listenerMiddleware";var KO=fe(vm+"/add"),WO=fe(vm+"/removeAll"),$O=fe(vm+"/remove");var T0,qO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(T0||(T0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},gk=function(e){return function(t){setTimeout(t,e)}},GO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:gk(10);g0();var Sx=x(xm()),xx=x(j0());var _m=x(gu());function Ok(e){e()}var H0=Ok,B0=e=>H0=e,U0=()=>H0;var ri=x(O());var K0=x(O());var Cu=x(O()),z0=Symbol.for(`react-redux-context-${Cu.version}`),V0=globalThis;function Nk(){let e=V0[z0];return e||(e=(0,Cu.createContext)(null),V0[z0]=e),e}var Me=new Proxy({},new Proxy({},{get(e,t){let n=Nk();return(r,...o)=>Reflect[t](n,...o)}}));function Gs(e=Me){return function(){return(0,K0.useContext)(e)}}var bu=Gs();var Tu=()=>{throw new Error("uSES not initialized!")};var W0=Tu,$0=e=>{W0=e},Mk=(e,t)=>e===t;function q0(e=Me){let t=e===Me?bu:Gs(e);return function(r,o={}){let{equalityFn:i=Mk,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:f,noopCheck:d}=t(),y=(0,ri.useRef)(!0),v=(0,ri.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),h=W0(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,ri.useDebugValue)(h),h}}var I=q0();function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}function Xs(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Lm=x(ox()),Z=x(O()),gx=x(lx());var Yk=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Zk(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function y(p,S){return l=p,u=S,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function h(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function g(){let p=e(l,u),S=!s(p,c);return c=p,S&&(d=n(c,f,u)),d}function m(p,S){let _=!i(S,u),C=!o(p,l,S,u);return l=p,u=S,_&&C?v():_?h():C?g():d}return function(S,_){return a?m(S,_):y(S,_)}}function Rm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Xs(t,Yk),s=n(e,i),a=r(e,i),l=o(e,i);return Zk(s,a,l,e,i)}function Im(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function Qs(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function ux(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function qu(e,t){return function(r,{displayName:o}){let i=function(a,l){return i.dependsOnOwnProps?i.mapToProps(a,l):i.mapToProps(a,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(a,l){i.mapToProps=e,i.dependsOnOwnProps=ux(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=ux(u),u=i(a,l)),u},i}}function oi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function cx(e){return e&&typeof e=="object"?Qs(t=>Im(e,t)):e?typeof e=="function"?qu(e,"mapDispatchToProps"):oi(e,"mapDispatchToProps"):Qs(t=>({dispatch:t}))}function dx(e){return e?typeof e=="function"?qu(e,"mapStateToProps"):oi(e,"mapStateToProps"):Qs(()=>({}))}function Jk(e,t,n){return Sn({},n,e,t)}function eP(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let f=e(l,u,c);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function fx(e){return e?typeof e=="function"?eP(e):oi(e,"mergeProps"):()=>Jk}function tP(){let e=U0(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var px={notify(){},get:()=>[]};function Gu(e,t){let n,r=px;function o(f){return l(),r.subscribe(f)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=tP())}function u(){n&&(n(),n=void 0,r.clear(),r=px)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Xu=x(O()),nP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ii=nP?Xu.useLayoutEffect:Xu.useEffect;function mx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function si(e,t){if(mx(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!mx(e[n[o]],t[n[o]]))return!1;return!0}var rP=["reactReduxForwardedRef"],hx=Tu,yx=e=>{hx=e};var oP=[null,null];function iP(e,t,n){ii(()=>e(...t),n)}function sP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function aP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,y=()=>{if(f||!a.current)return;let h=t.getState(),g,m;try{g=r(h,o.current)}catch(p){m=p,d=p}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function lP(e,t){return e===t}function uP(e,t,n,{pure:r,areStatesEqual:o=lP,areOwnPropsEqual:i=si,areStatePropsEqual:s=si,areMergedPropsEqual:a=si,forwardRef:l=!1,context:u=Me}={}){let c=u,f=dx(e),d=cx(t),y=fx(n),v=!!e;return g=>{let m=g.displayName||g.name||"Component",p=`Connect(${m})`,S={shouldHandleStateChanges:v,displayName:p,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:y,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(b){let[R,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:dt}=b,Lr=Xs(b,rP);return[b.context,dt,Lr]},[b]),G=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,gx.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),V=(0,Z.useContext)(G),He=!!b.store&&!!b.store.getState&&!!b.store.dispatch,ln=!!V&&!!V.store,qt=He?b.store:V.store,po=ln?V.getServerState:qt.getState,ji=(0,Z.useMemo)(()=>Rm(qt.dispatch,S),[qt]),[Rr,Ua]=(0,Z.useMemo)(()=>{if(!v)return oP;let dt=Gu(qt,He?void 0:V.subscription),Lr=dt.notifyNestedSubs.bind(dt);return[dt,Lr]},[qt,He,V]),za=(0,Z.useMemo)(()=>He?V:Sn({},V,{subscription:Rr}),[He,V,Rr]),Hi=(0,Z.useRef)(),Bi=(0,Z.useRef)(N),un=(0,Z.useRef)(),Ui=(0,Z.useRef)(!1),Ir=(0,Z.useRef)(!1),L=(0,Z.useRef)(!1),W=(0,Z.useRef)();ii(()=>(L.current=!0,()=>{L.current=!1}),[]);let It=(0,Z.useMemo)(()=>()=>un.current&&N===Bi.current?un.current:ji(qt.getState(),N),[qt,N]),Bn=(0,Z.useMemo)(()=>Lr=>Rr?aP(v,qt,Rr,ji,Bi,Hi,Ui,L,un,Ua,Lr):()=>{},[Rr]);iP(sP,[Bi,Hi,Ui,N,un,Ua]);let cn;try{cn=hx(Bn,It,po?()=>ji(po(),N):It)}catch(dt){throw W.current&&(dt.message+=`
|
|
9
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Te!==5&&(Te=2),l=Uf(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var b=YS(d,i,t);lv(d,b);break e;case 1:i=l;var E=d.type,C=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Jt===null||!Jt.has(C)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=ZS(d,i,t);lv(d,R);break e}}d=d.return}while(d!==null)}s0(n)}catch(P){t=P,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(1)}function o0(){var e=Jl.current;return Jl.current=Zl,e===null?Zl:e}function gs(e,t){var n=F;F|=16;var r=o0();Ve===e&&Ne===t||Ko(e,t);do try{RT();break}catch(o){r0(e,o)}while(1);if(Lf(),F=n,Jl.current=r,Se!==null)throw Error(T(261));return Ve=null,Ne=0,Te}function RT(){for(;Se!==null;)i0(Se)}function IT(){for(;Se!==null&&!dT();)i0(Se)}function i0(e){var t=l0(e.alternate,e,$r);e.memoizedProps=e.pendingProps,t===null?s0(e):Se=t,Vf.current=null}function s0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=_T(t),n!==null){n.flags&=2047,Se=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=xT(n,t,$r),n!==null){Se=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||$r&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Te===0&&(Te=5)}function Fr(e){var t=Go();return Wr(99,AT.bind(null,e,t)),null}function AT(e,t){do ur();while(Cs!==null);if(F&48)throw Error(T(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,a=e.expirationTimes;0<i;){var l=31-or(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(hn!==null&&!(r&24)&&hn.has(e)&&hn.delete(e),e===Ve&&(Se=Ve=null,Ne=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=F,F|=32,Vf.current=null,ap=El,s=Xy(),Np(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,p=-1,d=-1,h=0,v=0,y=s,m=null;t:for(;;){for(var g;y!==a||i!==0&&y.nodeType!==3||(p=c+i),y!==l||u!==0&&y.nodeType!==3||(d=c+u),y.nodeType===3&&(c+=y.nodeValue.length),(g=y.firstChild)!==null;)m=y,y=g;for(;;){if(y===s)break t;if(m===a&&++h===i&&(p=c),m===l&&++v===u&&(d=c),(g=y.nextSibling)!==null)break;y=m,m=y.parentNode}y=g}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;lp={focusedElem:s,selectionRange:a},El=!1,ks=null,Al=!1,L=r;do try{LT()}catch(P){if(L===null)throw Error(T(330));nr(L,P),L=L.nextEffect}while(L!==null);ks=null,L=r;do try{for(s=e;L!==null;){var f=L.flags;if(f&16&&Rs(L.stateNode,""),f&128){var S=L.alternate;if(S!==null){var _=S.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(f&1038){case 2:Ov(L),L.flags&=-3;break;case 6:Ov(L),L.flags&=-3,gp(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,gp(L.alternate,L);break;case 4:gp(L.alternate,L);break;case 8:a=L,JS(s,a);var b=a.alternate;Av(a),b!==null&&Av(b)}L=L.nextEffect}}catch(P){if(L===null)throw Error(T(330));nr(L,P),L=L.nextEffect}while(L!==null);if(_=lp,S=Xy(),f=_.focusedElem,s=_.selectionRange,S!==f&&f&&f.ownerDocument&&yS(f.ownerDocument.documentElement,f)){for(s!==null&&Np(f)&&(S=s.start,_=s.end,_===void 0&&(_=S),"selectionStart"in f?(f.selectionStart=S,f.selectionEnd=Math.min(_,f.value.length)):(_=(S=f.ownerDocument||document)&&S.defaultView||window,_.getSelection&&(_=_.getSelection(),a=f.textContent.length,b=Math.min(s.start,a),s=s.end===void 0?b:Math.min(s.end,a),!_.extend&&b>s&&(a=s,s=b,b=a),a=Gy(f,b),i=Gy(f,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),_.removeAllRanges(),b>s?(_.addRange(S),_.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),_.addRange(S)))))),S=[],_=f;_=_.parentNode;)_.nodeType===1&&S.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<S.length;f++)_=S[f],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}El=!!ap,lp=ap=null,e.current=n,L=r;do try{for(f=e;L!==null;){var E=L.flags;if(E&36&&CT(f,L.alternate,L),E&128){S=void 0;var C=L.ref;if(C!==null){var R=L.stateNode;switch(L.tag){case 5:S=R;break;default:S=R}typeof C=="function"?C(S):C.current=S}}L=L.nextEffect}}catch(P){if(L===null)throw Error(T(330));nr(L,P),L=L.nextEffect}while(L!==null);L=null,fT(),F=o}else e.current=n;if(sr)sr=!1,Cs=e,ms=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(E=L,E.sibling=null,E.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(Jt=null),r===1?e===rf?Ts++:(Ts=0,rf=e):Ts=0,n=n.stateNode,Vr&&typeof Vr.onCommitFiberRoot=="function")try{Vr.onCommitFiberRoot(If,n,void 0,(n.current.flags&64)===64)}catch{}if(bt(e,Oe()),eu)throw eu=!1,e=ef,ef=null,e;return F&8||nn(),null}function LT(){for(;L!==null;){var e=L.alternate;Al||ks===null||(L.flags&8?My(L,ks)&&(Al=!0):L.tag===13&&TT(e,L)&&My(L,ks)&&(Al=!0));var t=L.flags;t&256&&ET(e,L),!(t&512)||sr||(sr=!0,Fs(97,function(){return ur(),null})),L=L.nextEffect}}function ur(){if(ms!==90){var e=97<ms?97:ms;return ms=90,Wr(e,NT)}return!1}function OT(e,t){tf.push(t,e),sr||(sr=!0,Fs(97,function(){return ur(),null}))}function a0(e,t){nf.push(t,e),sr||(sr=!0,Fs(97,function(){return ur(),null}))}function NT(){if(Cs===null)return!1;var e=Cs;if(Cs=null,F&48)throw Error(T(331));var t=F;F|=32;var n=nf;nf=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,typeof s=="function")try{s()}catch(l){if(i===null)throw Error(T(330));nr(i,l)}}for(n=tf,tf=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var a=o.create;o.destroy=a()}catch(l){if(i===null)throw Error(T(330));nr(i,l)}}for(a=e.current.firstEffect;a!==null;)e=a.nextEffect,a.nextEffect=null,a.flags&8&&(a.sibling=null,a.stateNode=null),a=e;return F=t,nn(),!0}function Mv(e,t,n){t=Uf(n,t),t=YS(e,t,1),Jn(e,t),t=ot(),e=mu(e,1),e!==null&&(su(e,1,t),bt(e,t))}function nr(e,t){if(e.tag===3)Mv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Mv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r))){e=Uf(t,e);var o=ZS(n,e,1);if(Jn(n,o),o=ot(),n=mu(n,1),n!==null)su(n,1,o),bt(n,o);else if(typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function MT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ot(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(Ne&n)===n&&(Te===4||Te===3&&(Ne&62914560)===Ne&&500>Oe()-Wf?Ko(e,0):Kf|=n),bt(e,t)}function DT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(fn===0&&(fn=Zo),t=Ro(62914560&~fn),t===0&&(t=4194304)):t=Go()===99?1:2:t=1),n=ot(),e=mu(e,t),e!==null&&(su(e,t,n),bt(e,n))}var l0;l0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Mt=!0;else if(n&r)Mt=!!(e.flags&16384);else{switch(Mt=!1,t.tag){case 3:_v(t),pp();break;case 5:pv(t);break;case 1:Ze(t.type)&&kl(t);break;case 4:Up(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;pe(Ul,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?wv(e,t,n):(pe(de,de.current&1),t=gn(e,t,n),t!==null?t.sibling:null);pe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return kv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),pe(de,de.current),r)break;return null;case 23:case 24:return t.lanes=0,fp(e,t,n)}return gn(e,t,n)}else Mt=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=qo(t,Me.current),zo(t,n),o=jf(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)){var i=!0;kl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Nf(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Wl(t,r,s,e),o.updater=pu,t.stateNode=o,o._reactInternals=t,zp(t,r,e,n),t=$p(null,t,r,!0,i,n)}else t.tag=0,Qe(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=jT(o),e=Nt(o,e),i){case 0:t=Wp(null,t,o,e,n);break e;case 1:t=xv(null,t,o,e,n);break e;case 11:t=vv(null,t,o,e,n);break e;case 14:t=Sv(null,t,o,Nt(o.type,e),r,n);break e}throw Error(T(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Wp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),xv(e,t,r,o,n);case 3:if(_v(t),r=t.updateQueue,e===null||r===null)throw Error(T(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,OS(e,t),js(t,r,null,n),r=t.memoizedState.element,r===o)pp(),t=gn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Gn=Ho(t.stateNode.containerInfo.firstChild),mn=t,i=tn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Uo.push(i);for(n=FS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else Qe(e,t,r,n),pp();t=t.child}return t;case 5:return pv(t),e===null&&Vp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Fp(r,o)?s=null:i!==null&&Fp(r,i)&&(t.flags|=16),qS(e,t),Qe(e,t,s,n),t.child;case 6:return e===null&&Vp(t),null;case 13:return wv(e,t,n);case 4:return Up(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$l(t,null,r,n):Qe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),vv(e,t,r,o,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(pe(Ul,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=St(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!Ye.current){t=gn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r&&u.observedBits&i){a.tag===1&&(u=Zn(-1,n&-n),u.tag=2,Jn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),LS(a.return,n),l.lanes|=n;break}u=u.next}}else s=a.tag===10&&a.type===t.type?null:a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}Qe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,zo(t,n),o=wt(o,i.unstable_observedBits),r=r(o),t.flags|=1,Qe(e,t,r,n),t.child;case 14:return o=t.type,i=Nt(o,t.pendingProps),i=Nt(o.type,i),Sv(e,t,o,i,r,n);case 15:return $S(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ze(r)?(e=!0,kl(t)):e=!1,zo(t,n),MS(t,r,o),zp(t,r,o,n),$p(null,t,r,!0,e,n);case 19:return kv(e,t,n);case 23:return fp(e,t,n);case 24:return fp(e,t,n)}throw Error(T(156,t.tag))};function FT(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,n,r){return new FT(e,t,n,r)}function qf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jT(e){if(typeof e=="function")return qf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ru)return 11;if(e===ou)return 14}return 2}function ar(e,t){var n=e.alternate;return n===null?(n=xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")qf(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wn:return Wo(n.children,o,i,t);case jv:s=8,o|=16;break;case uf:s=8,o|=1;break;case hs:return e=xt(12,n,t,o|8),e.elementType=hs,e.type=hs,e.lanes=i,e;case ys:return e=xt(13,n,t,o),e.type=ys,e.elementType=ys,e.lanes=i,e;case Ol:return e=xt(19,n,t,o),e.elementType=Ol,e.lanes=i,e;case gf:return Gf(n,o,i,t);case Sp:return e=xt(24,n,t,o),e.elementType=Sp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cf:s=10;break e;case df:s=9;break e;case ru:s=11;break e;case ou:s=14;break e;case pf:s=16,r=null;break e;case ff:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=xt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Wo(e,t,n,r){return e=xt(7,e,r,t),e.lanes=n,e}function Gf(e,t,n,r){return e=xt(23,e,r,t),e.elementType=gf,e.lanes=n,e}function hp(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function yp(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BT(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=tp(0),this.expirationTimes=tp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tp(0),this.mutableSourceEagerHydrationData=null}function HT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:jr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function tu(e,t,n,r){var o=t.current,i=ot(),s=er(o);e:if(n){n=n._reactInternals;t:{if(Xr(n)!==n||n.tag!==1)throw Error(T(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(Ze(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(T(171))}if(n.tag===1){var l=n.type;if(Ze(l)){n=CS(n,l,a);break e}}n=a}else n=ir;return t.context===null?t.context=n:t.pendingContext=n,t=Zn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Jn(o,t),tr(o,s,i),s}function vp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Dv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xf(e,t){Dv(e,t),(e=e.alternate)&&Dv(e,t)}function zT(){return null}function Qf(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new BT(e,t,n!=null&&n.hydrate===!0),t=xt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Nf(t),e[Yo]=n.current,xS(e.nodeType===8?e.parentNode:e),r)for(e=0;e<r.length;e++){t=r[e];var o=t._getVersion;o=o(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}Qf.prototype.render=function(e){tu(e,this._internalRoot,null,null)};Qf.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;tu(null,e,null,function(){t[Yo]=null})};function $s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function UT(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Qf(e,0,t?{hydrate:!0}:void 0)}function gu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i._internalRoot;if(typeof o=="function"){var a=o;o=function(){var u=vp(s);a.call(u)}}tu(t,s,e,o)}else{if(i=n._reactRootContainer=UT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=vp(s);l.call(u)}}n0(function(){tu(t,s,e,o)})}return vp(s)}Jv=function(e){if(e.tag===13){var t=ot();tr(e,4,t),Xf(e,4)}};xf=function(e){if(e.tag===13){var t=ot();tr(e,67108864,t),Xf(e,67108864)}};eS=function(e){if(e.tag===13){var t=ot(),n=er(e);tr(e,n,t),Xf(e,n)}};tS=function(e,t){return t()};Rp=function(e,t,n){switch(t){case"input":if(_p(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=cu(r);if(!o)throw Error(T(90));Hv(r),_p(r,o)}}}break;case"textarea":Uv(e,n);break;case"select":t=n.value,t!=null&&Fo(e,!!n.multiple,t,!1)}};yf=t0;Xv=function(e,t,n,r,o){var i=F;F|=4;try{return Wr(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(ei(),nn())}};vf=function(){!(F&49)&&(PT(),ur())};Qv=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(ei(),nn())}};function u0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$s(t))throw Error(T(200));return HT(e,t,null,n)}var VT={Events:[Vs,Oo,cu,qv,Gv,ur,{current:!1}]},us={findFiberByHostInstance:Hr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},KT={bundleType:us.bundleType,version:us.version,rendererPackageName:us.rendererPackageName,rendererConfig:us.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Gr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zv(e),e===null?null:e.stateNode},findFiberByHostInstance:us.findFiberByHostInstance||zT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(cs=__REACT_DEVTOOLS_GLOBAL_HOOK__,!cs.isDisabled&&cs.supportsFiber))try{If=cs.inject(KT),Vr=cs}catch{}var cs;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VT;Et.createPortal=u0;Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(T(188)):Error(T(268,Object.keys(e)));return e=Zv(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e,t){var n=F;if(n&48)return e(t);F|=1;try{if(e)return Wr(99,e.bind(null,t))}finally{F=n,nn()}};Et.hydrate=function(e,t,n){if(!$s(t))throw Error(T(200));return gu(null,e,t,!0,n)};Et.render=function(e,t,n){if(!$s(t))throw Error(T(200));return gu(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!$s(e))throw Error(T(40));return e._reactRootContainer?(n0(function(){gu(null,null,e,!1,function(){e._reactRootContainer=null,e[Yo]=null})}),!0):!1};Et.unstable_batchedUpdates=t0;Et.unstable_createPortal=function(e,t){return u0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$s(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return gu(e,t,n,!1,r)};Et.version="17.0.2"});var hu=me((RO,p0)=>{"use strict";function d0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d0)}catch(e){console.error(e)}}d0(),p0.exports=c0()});var H0=me(B0=>{"use strict";var si=O();function Pk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rk=typeof Object.is=="function"?Object.is:Pk,Ik=si.useState,Ak=si.useEffect,Lk=si.useLayoutEffect,Ok=si.useDebugValue;function Nk(e,t){var n=t(),r=Ik({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Lk(function(){o.value=n,o.getSnapshot=t,bm(o)&&i({inst:o})},[e,n,t]),Ak(function(){return bm(o)&&i({inst:o}),e(function(){bm(o)&&i({inst:o})})},[e]),Ok(n),n}function bm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rk(e,n)}catch{return!0}}function Mk(e,t){return t()}var Dk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mk:Nk;B0.useSyncExternalStore=si.useSyncExternalStore!==void 0?si.useSyncExternalStore:Dk});var Em=me((hN,z0)=>{"use strict";z0.exports=H0()});var V0=me(U0=>{"use strict";var Eu=O(),Fk=Em();function jk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bk=typeof Object.is=="function"?Object.is:jk,Hk=Fk.useSyncExternalStore,zk=Eu.useRef,Uk=Eu.useEffect,Vk=Eu.useMemo,Kk=Eu.useDebugValue;U0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=zk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Vk(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var v=s.value;if(o(v,h))return p=v}return p=h}if(v=p,Bk(c,h))return v;var y=r(h);return o!==void 0&&o(v,y)?v:(c=h,p=y)}var u=!1,c,p,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=Hk(e,i[0],i[1]);return Uk(function(){s.hasValue=!0,s.value=a},[a]),Kk(a),a}});var W0=me((vN,K0)=>{"use strict";K0.exports=V0()});var nx=me(Q=>{"use strict";var we=typeof Symbol=="function"&&Symbol.for,Tm=we?Symbol.for("react.element"):60103,km=we?Symbol.for("react.portal"):60106,Pu=we?Symbol.for("react.fragment"):60107,Ru=we?Symbol.for("react.strict_mode"):60108,Iu=we?Symbol.for("react.profiler"):60114,Au=we?Symbol.for("react.provider"):60109,Lu=we?Symbol.for("react.context"):60110,Pm=we?Symbol.for("react.async_mode"):60111,Ou=we?Symbol.for("react.concurrent_mode"):60111,Nu=we?Symbol.for("react.forward_ref"):60112,Mu=we?Symbol.for("react.suspense"):60113,Gk=we?Symbol.for("react.suspense_list"):60120,Du=we?Symbol.for("react.memo"):60115,Fu=we?Symbol.for("react.lazy"):60116,Xk=we?Symbol.for("react.block"):60121,Qk=we?Symbol.for("react.fundamental"):60117,Yk=we?Symbol.for("react.responder"):60118,Zk=we?Symbol.for("react.scope"):60119;function at(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Tm:switch(e=e.type,e){case Pm:case Ou:case Pu:case Iu:case Ru:case Mu:return e;default:switch(e=e&&e.$$typeof,e){case Lu:case Nu:case Fu:case Du:case Au:return e;default:return t}}case km:return t}}}function tx(e){return at(e)===Ou}Q.AsyncMode=Pm;Q.ConcurrentMode=Ou;Q.ContextConsumer=Lu;Q.ContextProvider=Au;Q.Element=Tm;Q.ForwardRef=Nu;Q.Fragment=Pu;Q.Lazy=Fu;Q.Memo=Du;Q.Portal=km;Q.Profiler=Iu;Q.StrictMode=Ru;Q.Suspense=Mu;Q.isAsyncMode=function(e){return tx(e)||at(e)===Pm};Q.isConcurrentMode=tx;Q.isContextConsumer=function(e){return at(e)===Lu};Q.isContextProvider=function(e){return at(e)===Au};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Tm};Q.isForwardRef=function(e){return at(e)===Nu};Q.isFragment=function(e){return at(e)===Pu};Q.isLazy=function(e){return at(e)===Fu};Q.isMemo=function(e){return at(e)===Du};Q.isPortal=function(e){return at(e)===km};Q.isProfiler=function(e){return at(e)===Iu};Q.isStrictMode=function(e){return at(e)===Ru};Q.isSuspense=function(e){return at(e)===Mu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pu||e===Ou||e===Iu||e===Ru||e===Mu||e===Gk||typeof e=="object"&&e!==null&&(e.$$typeof===Fu||e.$$typeof===Du||e.$$typeof===Au||e.$$typeof===Lu||e.$$typeof===Nu||e.$$typeof===Qk||e.$$typeof===Yk||e.$$typeof===Zk||e.$$typeof===Xk)};Q.typeOf=at});var ox=me((LN,rx)=>{"use strict";rx.exports=nx()});var dx=me((ON,cx)=>{"use strict";var Rm=ox(),Jk={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},eP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},tP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Im={};Im[Rm.ForwardRef]=tP;Im[Rm.Memo]=lx;function ix(e){return Rm.isMemo(e)?lx:Im[e.$$typeof]||Jk}var nP=Object.defineProperty,rP=Object.getOwnPropertyNames,sx=Object.getOwnPropertySymbols,oP=Object.getOwnPropertyDescriptor,iP=Object.getPrototypeOf,ax=Object.prototype;function ux(e,t,n){if(typeof t!="string"){if(ax){var r=iP(t);r&&r!==ax&&ux(e,r,n)}var o=rP(t);sx&&(o=o.concat(sx(t)));for(var i=ix(e),s=ix(t),a=0;a<o.length;++a){var l=o[a];if(!eP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=oP(t,l);try{nP(e,l,u)}catch{}}}}return e}cx.exports=ux});var fx=me(Y=>{"use strict";var Am=Symbol.for("react.element"),Lm=Symbol.for("react.portal"),ju=Symbol.for("react.fragment"),Bu=Symbol.for("react.strict_mode"),Hu=Symbol.for("react.profiler"),zu=Symbol.for("react.provider"),Uu=Symbol.for("react.context"),sP=Symbol.for("react.server_context"),Vu=Symbol.for("react.forward_ref"),Ku=Symbol.for("react.suspense"),Wu=Symbol.for("react.suspense_list"),$u=Symbol.for("react.memo"),qu=Symbol.for("react.lazy"),aP=Symbol.for("react.offscreen"),px;px=Symbol.for("react.module.reference");function Tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Am:switch(e=e.type,e){case ju:case Hu:case Bu:case Ku:case Wu:return e;default:switch(e=e&&e.$$typeof,e){case sP:case Uu:case Vu:case qu:case $u:case zu:return e;default:return t}}case Lm:return t}}}Y.ContextConsumer=Uu;Y.ContextProvider=zu;Y.Element=Am;Y.ForwardRef=Vu;Y.Fragment=ju;Y.Lazy=qu;Y.Memo=$u;Y.Portal=Lm;Y.Profiler=Hu;Y.StrictMode=Bu;Y.Suspense=Ku;Y.SuspenseList=Wu;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Tt(e)===Uu};Y.isContextProvider=function(e){return Tt(e)===zu};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Am};Y.isForwardRef=function(e){return Tt(e)===Vu};Y.isFragment=function(e){return Tt(e)===ju};Y.isLazy=function(e){return Tt(e)===qu};Y.isMemo=function(e){return Tt(e)===$u};Y.isPortal=function(e){return Tt(e)===Lm};Y.isProfiler=function(e){return Tt(e)===Hu};Y.isStrictMode=function(e){return Tt(e)===Bu};Y.isSuspense=function(e){return Tt(e)===Ku};Y.isSuspenseList=function(e){return Tt(e)===Wu};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ju||e===Hu||e===Bu||e===Ku||e===Wu||e===aP||typeof e=="object"&&e!==null&&(e.$$typeof===qu||e.$$typeof===$u||e.$$typeof===zu||e.$$typeof===Uu||e.$$typeof===Vu||e.$$typeof===px||e.getModuleId!==void 0)};Y.typeOf=Tt});var gx=me((MN,mx)=>{"use strict";mx.exports=fx()});var p_=me((aD,d_)=>{"use strict";var ZP=/["'&<>]/;d_.exports=JP;function JP(e){var t=""+e,n=ZP.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var Hg=me((N6,Kw)=>{"use strict";var ZR="Expected a function",Uw=NaN,JR="[object Symbol]",eI=/^\s+|\s+$/g,tI=/^[-+]0x[0-9a-f]+$/i,nI=/^0b[01]+$/i,rI=/^0o[0-7]+$/i,oI=parseInt,iI=typeof global=="object"&&global&&global.Object===Object&&global,sI=typeof self=="object"&&self&&self.Object===Object&&self,aI=iI||sI||Function("return this")(),lI=Object.prototype,uI=lI.toString,cI=Math.max,dI=Math.min,jg=function(){return aI.Date.now()};function pI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,p=!1,d=!0;if(typeof e!="function")throw new TypeError(ZR);t=Vw(t)||0,Bg(n)&&(c=!!n.leading,p="maxWait"in n,i=p?cI(Vw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(E){var C=r,R=o;return r=o=void 0,u=E,s=e.apply(R,C),s}function v(E){return u=E,a=setTimeout(g,t),c?h(E):s}function y(E){var C=E-l,R=E-u,P=t-C;return p?dI(P,i-R):P}function m(E){var C=E-l,R=E-u;return l===void 0||C>=t||C<0||p&&R>=i}function g(){var E=jg();if(m(E))return f(E);a=setTimeout(g,y(E))}function f(E){return a=void 0,d&&r?h(E):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:f(jg())}function b(){var E=jg(),C=m(E);if(r=arguments,o=this,l=E,C){if(a===void 0)return v(l);if(p)return a=setTimeout(g,t),h(l)}return a===void 0&&(a=setTimeout(g,t)),s}return b.cancel=S,b.flush=_,b}function Bg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function fI(e){return!!e&&typeof e=="object"}function mI(e){return typeof e=="symbol"||fI(e)&&uI.call(e)==JR}function Vw(e){if(typeof e=="number")return e;if(mI(e))return Uw;if(Bg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Bg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(eI,"");var n=nI.test(e);return n||rI.test(e)?oI(e.slice(2),n?2:8):tI.test(e)?Uw:+e}Kw.exports=pI});var eL={};Ie(eL,{Card:()=>ge,ContentEditableInput:()=>mo,DeepdeskAPI:()=>Bn,DeepdeskSDK:()=>za,HTTPClient:()=>Wt,InputMediator:()=>Cn,InputType:()=>Un,KeyboardHint:()=>el,Label:()=>tl,Locale:()=>ea,Section:()=>zn,SectionList:()=>nl,Sources:()=>Lt,Suggestion:()=>oe,SuggestionList:()=>yt,TextAreaInput:()=>Tn,ToggleButton:()=>Mr,attachFile:()=>mE,authenticateWithKey:()=>pE,createFullRange:()=>Bi,createOverlayContainer:()=>oo,createRangeFromOffsets:()=>Rr,escapeHTML:()=>Ni,fetchPlatformConfig:()=>fE,formatTextMarkup:()=>dE,getRangeOffsets:()=>Fa,getRangeText:()=>ja,insertCKEditor:()=>cE,isSupportedInputElement:()=>kd,updateContentEditable:()=>uE,updateTextArea:()=>lE,useStyles:()=>k,waitForElementVisibilityChange:()=>Pd});var Ya=x($()),mt=x(O());var Xa=x(O()),qh=x($()),$i=Xa.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Xa.useContext)($i),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,qh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Gh={root:"_root_vr71j_1"};var Or=x(w()),Qa=()=>(0,Or.jsxs)("svg",{className:Gh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Or.jsx)("defs",{children:(0,Or.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Or.jsx)("title",{children:"Failed loading image"}),(0,Or.jsx)("path",{className:"cls-1",d:"M15 130.896V16.994c0-1.097.898-1.994 2.007-1.994h150.986A2 2 0 0 1 170 16.994v69.147L133.015 51 87.26 120.377l-35.863-17.758L15 130.896zM2 0C.895 0 0 .887 0 2v166c0 1.105.887 2 2 2h181c1.105 0 2-.887 2-2V2c0-1.105-.887-2-2-2H2zm49 72c11.046 0 20-9.178 20-20.5S62.046 31 51 31s-20 9.178-20 20.5S39.954 72 51 72z",fillRule:"evenodd"})]});var Fd={root:"_root_4e7lf_1",imageWrapper:"_imageWrapper_4e7lf_7",image:"_image_4e7lf_7",content:"_content_4e7lf_24",title:"_title_4e7lf_35",contentIsCropped:"_contentIsCropped_4e7lf_45",lineClamp:"_lineClamp_4e7lf_51"};var Nr=x(w()),Za=(0,mt.createContext)(Fd),ME=({title:e,src:t})=>{let n=(0,mt.useContext)(Za),[r,o]=(0,mt.useState)(!1);return(0,mt.useEffect)(()=>{o(!1)},[t]),(0,Nr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Nr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Nr.jsx)(Qa,{})})},DE=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,mt.useContext)(Za);return(0,Nr.jsx)("div",{className:(0,Ya.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},FE=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,mt.useContext)(Za);return mt.default.createElement(e,{className:(0,Ya.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ja=({children:e})=>{let t=k("Card",Fd);return(0,Nr.jsx)("div",{className:(0,Ya.default)(t.root),children:(0,Nr.jsx)(Za.Provider,{value:t,children:e})})};Ja.Image=ME;Ja.Content=DE;Ja.Title=FE;var ge=Ja;var ey=x($());var Jh={root:"_root_cq1yq_1"};var ty=x(w());var jE={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},BE=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",Jh);return(0,ty.jsx)("span",{"data-key":jE[t],className:(0,ey.default)(e,r.root),...n})},el=BE;var ry=x($());var ny={root:"_root_4a08n_1"};var oy=x(w()),HE=({className:e,children:t,...n})=>{let r=k("Label",ny);return(0,oy.jsx)("span",{...n,className:(0,ry.default)(e,r.root),children:t})},tl=HE;var iy={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var xo=x(w()),zE=({title:e,children:t,type:n,...r})=>{let o=k("Section",iy);return(0,xo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,xo.jsx)("div",{className:o.subTitleContainer,children:(0,xo.jsx)("span",{className:o.subtitle,children:e})}),(0,xo.jsx)("div",{className:o.suggestions,children:t})]})},zn=zE;var ay=x($()),ly=x(O());var sy={root:"_root_19wxp_1"};var uy=x(w()),UE=ly.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",sy);return(0,uy.jsx)("div",{ref:n,className:(0,ay.default)(r.root,e),children:t})}),nl=UE;var Gi=x($()),ht=x(O());var jd={root:"_root_ipo0b_11",fadein:"_fadein_ipo0b_1",isClickable:"_isClickable_ipo0b_46",isSelected:"_isSelected_ipo0b_51",actions:"_actions_ipo0b_75",actionsIsFixed:"_actionsIsFixed_ipo0b_97",actionButton:"_actionButton_ipo0b_105",dropdownList:"_dropdownList_ipo0b_126",dropdownButton:"_dropdownButton_ipo0b_141",dropdownItem:"_dropdownItem_ipo0b_151",dropdownItemButton:"_dropdownItemButton_ipo0b_160",actionButtonIsPrimary:"_actionButtonIsPrimary_ipo0b_174",actionButtonIsDisabled:"_actionButtonIsDisabled_ipo0b_178",labels:"_labels_ipo0b_186",label:"_label_ipo0b_186"};var gt=x(w()),_o=(0,ht.createContext)(jd),VE=({fixed:e,children:t,...n})=>{let r=(0,ht.useContext)(_o);return(0,gt.jsx)("div",{...n,className:(0,Gi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},KE=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,ht.useContext)(_o);return(0,gt.jsxs)("div",{className:(0,Gi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,gt.jsx)("ul",{className:i.dropdownList,children:o})]})},WE=({index:e,label:t,onClick:n})=>{let r=(0,ht.useContext)(_o);return(0,gt.jsx)("li",{className:r.dropdownItem,children:(0,gt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},$E=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,ht.useContext)(_o);return(0,gt.jsx)("button",{type:"button",className:(0,Gi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Bd=({labels:e})=>{let t=(0,ht.useContext)(_o);return(0,gt.jsx)("div",{className:t.labels,children:e.map(n=>(0,gt.jsx)("span",{className:t.label,children:n},n))})},wo=ht.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",jd),l=(0,ht.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,gt.jsx)(o,{...i,ref:s,className:(0,Gi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,gt.jsx)(_o.Provider,{value:a,children:r})})});wo.Labels=Bd;wo.Actions=VE;wo.ActionButton=$E;wo.DropdownButton=KE;wo.DropdownItem=WE;var oe=wo;var dy=x($());var cy={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var py=x(w()),qE=({withDivider:e,children:t})=>{let n=k("SuggestionList",cy);return(0,py.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,dy.default)(n.root,{[n.isWithDivider]:e}),children:t})},yt=qE;var my=x($());var fy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var rl=x(w()),GE=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",fy);return(0,rl.jsx)("button",{type:"button",className:(0,my.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,rl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,rl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Mr=GE;var gy=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,bo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var hy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Lt=(y=>(y.SEARCH="search",y.TEMPLATE="template",y.ELASTIC_SEARCH="search-autocomplete",y.GPT="gpt",y.TRIE="trie",y.TRIE_WITH_TYPOS="trie-with-typos",y.SEMANTIC="semantic",y.TEXT_RECOMMENDATION="text_recommendation",y.URL_RECOMMENDATION="url_recommendation",y.LINK_RECOMMENDATION="link_recommendation",y.PERSONAL_COLLECTION="personal-collection",y.PERSONAL_COLLECTION_SEARCH="personal-collection-search",y.SEARCH_OVERLAY="search-overlay",y.SEARCH_PREVIEW="search-preview",y.SEARCH_URL="search-url",y))(Lt||{}),Un=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(Un||{});var $t=x(hu());var g1=x(O());function Ct(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!1)var o,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function vn(e){return!!e&&!!e[le]}function Dt(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===ZT}(e)||Array.isArray(e)||!!e[S0]||!!(!((t=e.constructor)===null||t===void 0)&&t[S0])||im(e)||sm(e))}function Yr(e,t,n){n===void 0&&(n=!1),ri(e)===0?(n?Object.keys:ni)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function ri(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:im(e)?2:sm(e)?3:0}function ti(e,t){return ri(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function WT(e,t){return ri(e)===2?e.get(t):e[t]}function x0(e,t,n){var r=ri(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function _0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function im(e){return QT&&e instanceof Map}function sm(e){return YT&&e instanceof Set}function cr(e){return e.o||e.t}function am(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=E0(e);delete t[le];for(var n=ni(t),r=0;r<n.length;r++){var o=n[r],i=t[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function lm(e,t){return t===void 0&&(t=!1),um(e)||vn(e)||!Dt(e)||(ri(e)>1&&(e.set=e.add=e.clear=e.delete=$T),Object.freeze(e),t&&Yr(e,function(n,r){return lm(r,!0)},!0)),e}function $T(){Ct(2)}function um(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rn(e){var t=om[e];return t||Ct(18,e),t}function qT(e,t){om[e]||(om[e]=t)}function tm(){return Gs}function Yf(e,t){t&&(rn("Patches"),e.u=[],e.s=[],e.v=t)}function yu(e){nm(e),e.p.forEach(GT),e.p=null}function nm(e){e===Gs&&(Gs=e.l)}function f0(e){return Gs={p:[],l:Gs,h:e,m:!0,_:0}}function GT(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function Zf(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||rn("ES5").S(t,e,r),r?(n[le].P&&(yu(t),Ct(4)),Dt(e)&&(e=vu(t,e),t.l||Su(t,e)),t.u&&rn("Patches").M(n[le].t,e,t.u,t.s)):e=vu(t,n,[]),yu(t),t.u&&t.v(t.u,t.s),e!==b0?e:void 0}function vu(e,t,n){if(um(t))return t;var r=t[le];if(!r)return Yr(t,function(a,l){return m0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Su(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=am(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Yr(i,function(a,l){return m0(e,r,o,a,l,n,s)}),Su(e,o,!1),n&&e.u&&rn("Patches").N(r,n,e.u,e.s)}return r.o}function m0(e,t,n,r,o,i,s){if(vn(o)){var a=vu(e,o,i&&t&&t.i!==3&&!ti(t.R,r)?i.concat(r):void 0);if(x0(n,r,a),!vn(a))return;e.m=!1}else s&&n.add(o);if(Dt(o)&&!um(o)){if(!e.h.D&&e._<1)return;vu(e,o),t&&t.A.l||Su(e,o)}}function Su(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&lm(t,n)}function Jf(e,t){var n=e[le];return(n?cr(n):e)[t]}function g0(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function dr(e){e.P||(e.P=!0,e.l&&dr(e.l))}function em(e){e.o||(e.o=am(e.t))}function rm(e,t,n){var r=im(t)?rn("MapSet").F(t,n):sm(t)?rn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:tm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Xs;s&&(l=[a],u=qs);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):rn("ES5").J(t,n);return(n?n.A:tm()).p.push(r),r}function XT(e){return vn(e)||Ct(22,e),function t(n){if(!Dt(n))return n;var r,o=n[le],i=ri(n);if(o){if(!o.P&&(o.i<4||!rn("ES5").K(o)))return o.t;o.I=!0,r=h0(n,i),o.I=!1}else r=h0(n,i);return Yr(r,function(s,a){o&&WT(o.t,s)===a||x0(r,s,t(a))}),i===3?new Set(r):r}(e)}function h0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return am(e)}function w0(){function e(s,a){var l=i[s];return l?l.enumerable=a:i[s]=l={configurable:!0,enumerable:a,get:function(){var u=this[le];return Xs.get(u,s)},set:function(u){var c=this[le];Xs.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][le];if(!l.P)switch(l.i){case 5:r(l)&&dr(l);break;case 4:n(l)&&dr(l)}}}function n(s){for(var a=s.t,l=s.k,u=ni(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!ti(a,p))return!0;var h=l[p],v=h&&h[le];if(v?v.t!==d:!_0(h,d))return!0}}var y=!!a[le];return u.length!==ni(a).length+(y?0:1)}function r(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var u=0;u<a.length;u++)if(!a.hasOwnProperty(u))return!0;return!1}function o(s){s.g&&Ct(3,JSON.stringify(cr(s)))}var i={};qT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var h=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(h,""+v,e(v,!0));return h}var y=E0(d);delete y[le];for(var m=ni(y),g=0;g<m.length;g++){var f=m[g];y[f]=e(f,p||!!y[f].enumerable)}return Object.create(Object.getPrototypeOf(d),y)}(l,s),c={i:l?5:4,A:a?a.A:tm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,le,{value:c,writable:!0}),u},S:function(s,a,l){l?vn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[le];if(p){var d=p.t,h=p.k,v=p.R,y=p.i;if(y===4)Yr(h,function(_){_!==le&&(d[_]!==void 0||ti(d,_)?v[_]||u(h[_]):(v[_]=!0,dr(p)))}),Yr(d,function(_){h[_]!==void 0||ti(h,_)||(v[_]=!1,dr(p))});else if(y===5){if(r(p)&&(dr(p),v.length=!0),h.length<d.length)for(var m=h.length;m<d.length;m++)v[m]=!1;else for(var g=d.length;g<h.length;g++)v[g]=!0;for(var f=Math.min(h.length,d.length),S=0;S<f;S++)h.hasOwnProperty(S)||(v[S]=!0),v[S]===void 0&&u(h[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var y0,Gs,cm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",QT=typeof Map<"u",YT=typeof Set<"u",v0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",b0=cm?Symbol.for("immer-nothing"):((y0={})["immer-nothing"]=!0,y0),S0=cm?Symbol.for("immer-draftable"):"__$immer_draftable",le=cm?Symbol.for("immer-state"):"__$immer_state";var ZT=""+Object.prototype.constructor,ni=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,E0=Object.getOwnPropertyDescriptors||function(e){var t={};return ni(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},om={},Xs={get:function(e,t){if(t===le)return e;var n=cr(e);if(!ti(n,t))return function(o,i,s){var a,l=g0(i,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Dt(r)?r:r===Jf(e.t,t)?(em(e),e.o[t]=rm(e.A.h,r,e)):r},has:function(e,t){return t in cr(e)},ownKeys:function(e){return Reflect.ownKeys(cr(e))},set:function(e,t,n){var r=g0(cr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Jf(cr(e),t),i=o==null?void 0:o[le];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(_0(n,o)&&(n!==void 0||ti(e.t,t)))return!0;em(e),dr(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return Jf(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,em(e),dr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=cr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ct(12)}},qs={};Yr(Xs,function(e,t){qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)},qs.set=function(e,t,n){return Xs.set.call(this,e[0],t,n,e[0])};var JT=function(){function e(n){var r=this;this.O=v0,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(y){var m=this;y===void 0&&(y=a);for(var g=arguments.length,f=Array(g>1?g-1:0),S=1;S<g;S++)f[S-1]=arguments[S];return l.produce(y,function(_){var b;return(b=i).call.apply(b,[m,_].concat(f))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Dt(o)){var c=f0(r),p=rm(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?yu(c):nm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Yf(c,s),Zf(y,c)},function(y){throw yu(c),y}):(Yf(c,s),Zf(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===b0&&(u=void 0),r.D&&lm(u,!0),s){var h=[],v=[];rn("Patches").M(o,u,h,v),s(h,v)}return u}Ct(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(h){return o.apply(void 0,[h].concat(p))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Dt(n)||Ct(8),vn(n)&&(n=XT(n));var r=f0(this),o=rm(this,n,void 0);return o[le].C=!0,nm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return Yf(i,r),Zf(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!v0&&Ct(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=rn("Patches").$;return vn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),st=new JT,ek=st.produce,IO=st.produceWithPatches.bind(st),AO=st.setAutoFreeze.bind(st),LO=st.setUseProxies.bind(st),OO=st.applyPatches.bind(st),NO=st.createDraft.bind(st),MO=st.finishDraft.bind(st),xu=ek;function pr(e){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pr(e)}function dm(e,t){if(pr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(pr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pm(e){var t=dm(e,"string");return pr(t)==="symbol"?t:String(t)}function fm(e,t,n){return t=pm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C0(Object(n),!0).forEach(function(r){fm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function De(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var T0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mm=function(){return Math.random().toString(36).substring(7).split("").join(".")},wu={INIT:"@@redux/INIT"+mm(),REPLACE:"@@redux/REPLACE"+mm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mm()}};function tk(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function gm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(De(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(De(1));return n(gm)(e,t)}if(typeof e!="function")throw new Error(De(2));var o=e,i=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error(De(3));return i}function p(y){if(typeof y!="function")throw new Error(De(4));if(l)throw new Error(De(5));var m=!0;return u(),a.push(y),function(){if(m){if(l)throw new Error(De(6));m=!1,u();var f=a.indexOf(y);a.splice(f,1),s=null}}}function d(y){if(!tk(y))throw new Error(De(7));if(typeof y.type>"u")throw new Error(De(8));if(l)throw new Error(De(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var m=s=a,g=0;g<m.length;g++){var f=m[g];f()}return y}function h(y){if(typeof y!="function")throw new Error(De(10));o=y,d({type:wu.REPLACE})}function v(){var y,m=p;return y={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(De(11));function S(){f.next&&f.next(c())}S();var _=m(S);return{unsubscribe:_}}},y[T0]=function(){return this},y}return d({type:wu.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:h},r[T0]=v,r}function nk(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:wu.INIT});if(typeof r>"u")throw new Error(De(12));if(typeof n(void 0,{type:wu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(De(13))})}function bu(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];typeof e[o]=="function"&&(n[o]=e[o])}var i=Object.keys(n),s,a;try{nk(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,h={},v=0;v<i.length;v++){var y=i[v],m=n[y],g=u[y],f=m(g,c);if(typeof f>"u"){var S=c&&c.type;throw new Error(De(14))}h[y]=f,d=d||f!==g}return d=d||i.length!==Object.keys(u).length,d?h:u}}function oi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function k0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(De(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=oi.apply(void 0,a)(o.dispatch),_u(_u({},o),{},{dispatch:i})}}}function P0(e){var t=function(r){var o=r.dispatch,i=r.getState;return function(s){return function(a){return typeof a=="function"?a(o,i,e):s(a)}}};return t}var R0=P0();R0.withExtraArgument=P0;var hm=R0;var N0=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),rk=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},ii=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},ok=Object.defineProperty,ik=Object.defineProperties,sk=Object.getOwnPropertyDescriptors,I0=Object.getOwnPropertySymbols,ak=Object.prototype.hasOwnProperty,lk=Object.prototype.propertyIsEnumerable,A0=function(e,t,n){return t in e?ok(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},fr=function(e,t){for(var n in t||(t={}))ak.call(t,n)&&A0(e,n,t[n]);if(I0)for(var r=0,o=I0(t);r<o.length;r++){var n=o[r];lk.call(t,n)&&A0(e,n,t[n])}return e},ym=function(e,t){return ik(e,sk(t))},uk=function(e,t,n){return new Promise(function(r,o){var i=function(l){try{a(n.next(l))}catch(u){o(u)}},s=function(l){try{a(n.throw(l))}catch(u){o(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(i,s)};a((n=n.apply(e,t)).next())})};var ck=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?oi:oi.apply(null,arguments)},JO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function dk(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var pk=function(e){N0(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,ii([void 0],n[0].concat(this)))):new(t.bind.apply(t,ii([void 0],n.concat(this))))},t}(Array),fk=function(e){N0(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,ii([void 0],n[0].concat(this)))):new(t.bind.apply(t,ii([void 0],n.concat(this))))},t}(Array);function xm(e){return Dt(e)?xu(e,function(){}):e}function mk(e){return typeof e=="boolean"}function gk(){return function(t){return hk(t)}}function hk(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t,r=e.immutableCheck,o=r===void 0?!0:r,i=e.serializableCheck,s=i===void 0?!0:i,a=new pk;if(n&&(mk(n)?a.push(hm):a.push(hm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var vm=!0;function M0(e){var t=gk(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,p=n.enhancers,d=p===void 0?void 0:p,h;if(typeof o=="function")h=o;else if(dk(o))h=bu(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(t),!vm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vm&&v.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=k0.apply(void 0,v),m=oi;l&&(m=ck(fr({trace:!vm},typeof l=="object"&&l)));var g=new fk(y),f=g;Array.isArray(d)?f=ii([y],d):typeof d=="function"&&(f=d(g));var S=m.apply(void 0,f);return gm(h,c,S)}function fe(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return fr(fr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function D0(e){var t={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(a in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[a]=s,o},addMatcher:function(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase:function(i){return r=i,o}};return e(o),[t,n,r]}function yk(e){return typeof e=="function"}function vk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?D0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(yk(e))l=function(){return xm(e())};else{var u=xm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var h=ii([i[d.type]],s.filter(function(v){var y=v.matcher;return y(d)}).map(function(v){var y=v.reducer;return y}));return h.filter(function(v){return!!v}).length===0&&(h=[a]),h.reduce(function(v,y){if(y)if(vn(v)){var m=v,g=y(m,d);return g===void 0?v:g}else{if(Dt(v))return xu(v,function(f){return y(f,d)});var g=y(v,d);if(g===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}return v},p)}return c.getInitialState=l,c}function Sk(e,t){return e+"/"+t}function j(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:xm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=Sk(t,c),h,v;"reducer"in p?(h=p.reducer,v=p.prepare):h=p,i[c]=h,s[d]=h,a[c]=v?fe(d,v):fe(d)});function l(){var c=typeof e.extraReducers=="function"?D0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,h=c[1],v=h===void 0?[]:h,y=c[2],m=y===void 0?void 0:y,g=fr(fr({},d),s);return vk(n,function(f){for(var S in g)f.addCase(S,g[S]);for(var _=0,b=v;_<b.length;_++){var E=b[_];f.addMatcher(E.matcher,E.reducer)}m&&f.addDefaultCase(m)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var xk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_k=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=xk[Math.random()*64|0];return t},wk=["name","message","stack","code"],Sm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),L0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),bk=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=wk;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},D=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,p,d,h){return{payload:c,meta:ym(fr({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:ym(fr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,h,v){return{payload:h,error:(r&&r.serializeError||bk)(c||"Rejected"),meta:ym(fr({},v||{}),{arg:d,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(p,d,h){var v=r!=null&&r.idGenerator?r.idGenerator(c):_k(),y=new l,m,g=!1;function f(_){m=_,y.abort()}var S=function(){return uk(this,null,function(){var _,b,E,C,R,P,N;return rk(this,function(H){switch(H.label){case 0:return H.trys.push([0,4,,5]),C=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:h}),Ck(C)?[4,C]:[3,2];case 1:C=H.sent(),H.label=2;case 2:if(C===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return g=!0,R=new Promise(function(z,Ue){return y.signal.addEventListener("abort",function(){return Ue({name:"AbortError",message:m||"Aborted"})})}),p(i(v,c,(b=r==null?void 0:r.getPendingMeta)==null?void 0:b.call(r,{requestId:v,arg:c},{getState:d,extra:h}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:p,getState:d,extra:h,requestId:v,signal:y.signal,abort:f,rejectWithValue:function(z,Ue){return new Sm(z,Ue)},fulfillWithValue:function(z,Ue){return new L0(z,Ue)}})).then(function(z){if(z instanceof Sm)throw z;return z instanceof L0?o(z.payload,v,c,z.meta):o(z,v,c)})])];case 3:return E=H.sent(),[3,5];case 4:return P=H.sent(),E=P instanceof Sm?s(null,v,c,P.payload,P.meta):s(P,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||p(E),[2,E]}})})}();return Object.assign(S,{abort:f,requestId:v,arg:c,unwrap:function(){return S.then(Ek)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ek(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ck(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Tk="task",F0="listener",j0="completed",_m="cancelled",rN="task-"+_m,oN="task-"+j0,iN=F0+"-"+_m,sN=F0+"-"+j0,aN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Tk+" "+_m+" (reason: "+t+")"}return e}();var wm="listenerMiddleware";var lN=fe(wm+"/add"),uN=fe(wm+"/removeAll"),cN=fe(wm+"/remove");var O0,dN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(O0||(O0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},kk=function(e){return function(t){setTimeout(t,e)}},pN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:kk(10);w0();var Tx=x(Em()),kx=x(W0());var Cm=x(hu());function Wk(e){e()}var $0=Wk,q0=e=>$0=e,G0=()=>$0;var ai=x(O());var Y0=x(O());var Cu=x(O()),X0=Symbol.for(`react-redux-context-${Cu.version}`),Q0=globalThis;function $k(){let e=Q0[X0];return e||(e=(0,Cu.createContext)(null),Q0[X0]=e),e}var Fe=new Proxy({},new Proxy({},{get(e,t){let n=$k();return(r,...o)=>Reflect[t](n,...o)}}));function Qs(e=Fe){return function(){return(0,Y0.useContext)(e)}}var Tu=Qs();var ku=()=>{throw new Error("uSES not initialized!")};var Z0=ku,J0=e=>{Z0=e},qk=(e,t)=>e===t;function ex(e=Fe){let t=e===Fe?Tu:Qs(e);return function(r,o={}){let{equalityFn:i=qk,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),h=(0,ai.useRef)(!0),v=(0,ai.useCallback)({[r.name](m){return r(m)}}[r.name],[r,p,s]),y=Z0(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,ai.useDebugValue)(y),y}}var A=ex();function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}function Ys(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Mm=x(dx()),Z=x(O()),wx=x(gx());var uP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function cP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function h(f,S){return l=f,u=S,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function y(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function m(){let f=e(l,u),S=!s(f,c);return c=f,S&&(d=n(c,p,u)),d}function g(f,S){let _=!i(S,u),b=!o(f,l,S,u);return l=f,u=S,_&&b?v():_?y():b?m():d}return function(S,_){return a?g(S,_):h(S,_)}}function Om(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Ys(t,uP),s=n(e,i),a=r(e,i),l=o(e,i);return cP(s,a,l,e,i)}function Nm(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function Zs(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function hx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Gu(e,t){return function(r,{displayName:o}){let i=function(a,l){return i.dependsOnOwnProps?i.mapToProps(a,l):i.mapToProps(a,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(a,l){i.mapToProps=e,i.dependsOnOwnProps=hx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=hx(u),u=i(a,l)),u},i}}function li(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function yx(e){return e&&typeof e=="object"?Zs(t=>Nm(e,t)):e?typeof e=="function"?Gu(e,"mapDispatchToProps"):li(e,"mapDispatchToProps"):Zs(t=>({dispatch:t}))}function vx(e){return e?typeof e=="function"?Gu(e,"mapStateToProps"):li(e,"mapStateToProps"):Zs(()=>({}))}function dP(e,t,n){return Sn({},n,e,t)}function pP(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let p=e(l,u,c);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function Sx(e){return e?typeof e=="function"?pP(e):li(e,"mergeProps"):()=>dP}function fP(){let e=G0(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var xx={notify(){},get:()=>[]};function Xu(e,t){let n,r=xx;function o(p){return l(),r.subscribe(p)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=fP())}function u(){n&&(n(),n=void 0,r.clear(),r=xx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Qu=x(O()),mP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ui=mP?Qu.useLayoutEffect:Qu.useEffect;function _x(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ci(e,t){if(_x(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!_x(e[n[o]],t[n[o]]))return!1;return!0}var gP=["reactReduxForwardedRef"],bx=ku,Ex=e=>{bx=e};var hP=[null,null];function yP(e,t,n){ui(()=>e(...t),n)}function vP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function SP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,h=()=>{if(p||!a.current)return;let y=t.getState(),m,g;try{m=r(y,o.current)}catch(f){g=f,d=f}g||(d=null),m===i.current?s.current||u():(i.current=m,l.current=m,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function xP(e,t){return e===t}function _P(e,t,n,{pure:r,areStatesEqual:o=xP,areOwnPropsEqual:i=ci,areStatePropsEqual:s=ci,areMergedPropsEqual:a=ci,forwardRef:l=!1,context:u=Fe}={}){let c=u,p=vx(e),d=yx(t),h=Sx(n),v=!!e;return m=>{let g=m.displayName||m.name||"Component",f=`Connect(${g})`,S={shouldHandleStateChanges:v,displayName:f,wrappedComponentName:g,WrappedComponent:m,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(C){let[R,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:ce}=C,Lr=Ys(C,gP);return[C.context,ce,Lr]},[C]),H=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,wx.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),z=(0,Z.useContext)(H),Ue=!!C.store&&!!C.store.getState&&!!C.store.dispatch,cn=!!z&&!!z.store,qt=Ue?C.store:z.store,ho=cn?z.getServerState:qt.getState,Ui=(0,Z.useMemo)(()=>Om(qt.dispatch,S),[qt]),[Ir,Ua]=(0,Z.useMemo)(()=>{if(!v)return hP;let ce=Xu(qt,Ue?void 0:z.subscription),Lr=ce.notifyNestedSubs.bind(ce);return[ce,Lr]},[qt,Ue,z]),Va=(0,Z.useMemo)(()=>Ue?z:Sn({},z,{subscription:Ir}),[Ue,z,Ir]),Vi=(0,Z.useRef)(),Ki=(0,Z.useRef)(N),Ar=(0,Z.useRef)(),yo=(0,Z.useRef)(!1),Rd=(0,Z.useRef)(!1),Gt=(0,Z.useRef)(!1),I=(0,Z.useRef)();ui(()=>(Gt.current=!0,()=>{Gt.current=!1}),[]);let X=(0,Z.useMemo)(()=>()=>Ar.current&&N===Ki.current?Ar.current:Ui(qt.getState(),N),[qt,N]),Xt=(0,Z.useMemo)(()=>Lr=>Ir?SP(v,qt,Ir,Ui,Ki,Vi,yo,Gt,Ar,Ua,Lr):()=>{},[Ir]);yP(vP,[Ki,Vi,yo,N,Ar,Ua]);let At;try{At=bx(Xt,X,ho?()=>Ui(ho(),N):X)}catch(ce){throw I.current&&(ce.message+=`
|
|
10
10
|
The error may be correlated with this previous error:
|
|
11
|
-
${
|
|
11
|
+
${I.current.stack}
|
|
12
12
|
|
|
13
|
-
`),dt}ii(()=>{W.current=void 0,un.current=void 0,Hi.current=cn});let zi=(0,Z.useMemo)(()=>Z.default.createElement(g,Sn({},cn,{ref:P})),[P,g,cn]);return(0,Z.useMemo)(()=>v?Z.default.createElement(G.Provider,{value:za},zi):zi,[G,zi,za])}let E=Z.default.memo(_);if(E.WrappedComponent=g,E.displayName=_.displayName=p,l){let R=Z.default.forwardRef(function(N,G){return Z.default.createElement(E,Sn({},N,{reactReduxForwardedRef:G}))});return R.displayName=p,R.WrappedComponent=g,(0,Lm.default)(R,g)}return(0,Lm.default)(E,g)}}var xn=uP;var Ys=x(O());function cP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Ys.useMemo)(()=>{let u=Gu(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Ys.useMemo)(()=>e.getState(),[e]);ii(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||Me;return Ys.default.createElement(l.Provider,{value:s},n)}var Am=cP;function Qu(e=Me){let t=e===Me?bu:Gs(e);return function(){let{store:r}=t();return r}}var Om=Qu();function vx(e=Me){let t=e===Me?Om:Qu(e);return function(){return t().dispatch}}var B=vx();$0(xx.useSyncExternalStoreWithSelector);yx(Sx.useSyncExternalStore);B0(_m.unstable_batchedUpdates);var Zs=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Zs||{});var dP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showPersonalCollectionLink:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,adminUrl:void 0,productName:"Deepdesk"},_x=j({name:"settings",initialState:dP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Js}=_x.actions,Nm=e=>t=>t.settings[e],D=e=>I(Nm(e)),wx=_x.reducer;var ww=x(O());function _n(){}_n.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(h){return o?(setTimeout(function(){o(void 0,h)},0),!0):h}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function y(){for(var h=-1*u;h<=u;h+=2){var g=void 0,m=f[h-1],p=f[h+1],S=(p?p.newPos:0)-h;m&&(f[h-1]=void 0);var _=m&&m.newPos+1<a,C=p&&0<=S&&S<l;if(!_&&!C){f[h]=void 0;continue}if(!_||C&&m.newPos<p.newPos?(g=pP(p),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),S=i.extractCommon(g,n,t,h),g.newPos+1>=a&&S+1>=l)return s(fP(i,g.components,n,t,i.useLongestToken));f[h]=g}u++}if(o)(function h(){setTimeout(function(){if(u>c)return o();y()||h()},0)})();else for(;u<=c;){var v=y();if(v)return v}},pushComponent:function(t,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?t[t.length-1]={count:o.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.newPos,l=a-o,u=0;a+1<i&&l+1<s&&this.equals(n[a+1],r[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function fP(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(y,v){var h=r[l+v];return h.length>y.length?h:y}),u.value=e.join(c)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function pP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var mP=new _n;function bx(e,t,n){return mP.diff(e,t,n)}var Ex=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Cx=/\S/,Tx=new _n;Tx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Cx.test(e)&&!Cx.test(t)};Tx.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&Ex.test(t[n])&&Ex.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var kx=new _n;kx.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var gP=new _n;gP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var hP=new _n;hP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Yu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Yu=function(t){return typeof t}:Yu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}var yP=Object.prototype.toString,ea=new _n;ea.useLongestToken=!0;ea.tokenize=kx.tokenize;ea.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify(Mm(e,null,null,o),o," ")};ea.equals=function(e,t){return _n.prototype.equals.call(ea,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Mm(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var s;if(yP.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=Mm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Yu(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),i=0;i<a.length;i+=1)l=a[i],s[l]=Mm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Dm=new _n;Dm.tokenize=function(e){return e.slice()};Dm.join=Dm.removeEmpty=function(e){return e};function Px(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function mr(e,t,n=10){let r=typeof e,o=typeof t;if(n===0)throw new Error("Max depth deepEqual, possible circular references?");return r!==o?!1:e==null||r==="string"||r==="number"||r==="boolean"?e===t:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:e.every((i,s)=>mr(i,t[s],n-1)):Px(e)&&Px(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>mr(e[s],t[s],n-1)):!1}function vP(e){return Math.max(...e.map(t=>t.length))}function SP(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return{...r,[o]:i}}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function Rx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<vP(r);o++){let i=SP(r.map(a=>a[o]),t),s=r.filter(a=>!i.includes(a[o]));if(s.length>=t)r=s;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var xP=2;function Fm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Rx(e,xP);return n&&n.text!==t?n:e[0]}var Ix={current:null,isSupported:null},J=fe("resetConversation"),Zu=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},Ju=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},ai=e=>e.conversation.isSupported,jm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),ec=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),tc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),nc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Ju(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Hm=M("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),rc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Ju(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),_P=[ec.rejected,tc.rejected,nc.rejected,rc.rejected].map(e=>e==null?void 0:e.toString()),wP=j({name:"conversation",initialState:Ix,reducers:{},extraReducers:e=>{e.addCase(jm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(ec.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(tc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Hm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(nc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(rc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Ix).addMatcher(t=>_P.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),Lx=wP.reducer;var gr={text:"",html:null,selection:{start:0,end:0},stagedSuggestion:null,userCommitted:{text:"",selection:{start:0,end:0}},tabCompletionSuggestion:void 0,previousKeyDownEvent:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function ic(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}}var sc=fe("input/replaceText"),ac=fe("input/keyDown"),Yr=fe("input/sendMessage"),lc=fe("input/sendEditSuggestionMessage"),uc=fe("input/uiInputChange"),cc=fe("input/applyImageSuggestion"),it=fe("input/sendEvent");function oc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,f=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(f||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:f?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var Ax=e=>j({name:e,initialState:gr,reducers:{initialInput(t,n){let{text:r,selection:o,html:i}=n.payload;t.text=r,t.selection.start=(o==null?void 0:o.start)??r.length,t.selection.end=(o==null?void 0:o.end)??r.length,t.userCommitted.text=r,t.userCommitted.selection.start=(o==null?void 0:o.start)??r.length,t.userCommitted.selection.end=(o==null?void 0:o.end)??r.length,t.html=i||null},reset(t){Object.assign(t,{...gr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Fm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(mr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&oc(t)))},platformInput(t,n){let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end),t.text=r,t.html=o||null},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:f,ctrlKey:d,metaKey:y,altKey:v}=t.previousKeyDownEvent;switch(c){case"Enter":f&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:h}=t,{text:g}=n.payload,m=bx(h,g);h.length-g.length>1&&t.metrics.deletions.push(...m.filter(p=>p.removed).map(p=>p.value)),t.metrics.numCharsDeleted+=h.length-g.length;break}case"C":case"V":case"X":if(!d&&!y){t.metrics.numCharsTyped+=1;let h=((s=t.selection)==null?void 0:s.start)!==void 0&&((a=t.selection)==null?void 0:a.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}break;case"Shift":break;default:if(!d&&!y&&!v){t.metrics.numCharsTyped+=1;let h=((l=t.selection)==null?void 0:l.start)!==void 0&&((u=t.selection)==null?void 0:u.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=gr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&oc(t);let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end,t.userCommitted.selection.start=i.start,t.userCommitted.selection.end=i.end),t.text=r,t.html=o||null,t.userCommitted.text=r,t.previousKeyDownEvent=null},stageSuggestion(t,n){let{text:r}=n.payload;switch(t.stagedSuggestion=n.payload,t.tabCompletionSuggestion=void 0,n.payload.replace){case"selection":t.text=`${t.text.slice(0,t.selection.start)}${r}${t.text.slice(t.selection.end)}`,t.selection.end=t.selection.start+r.length,t.selection.start+=r.length;break;case"until-selection-end":t.text=`${r}${t.text.slice(t.selection.end)}`,t.selection.start=r.length,t.selection.end=r.length;break;default:throw new Error(`Unknown replace ${n.payload.replace}`)}n.payload.eventMetrics.inputType==="tab"&&oc(t)},commitSuggestion(t){oc(t)},offeredTextSuggestion(t,n){let{text:r,suggestion:{source:o}}=n.payload;t.metrics.offeredTextSuggestions.find(s=>s.text===r)||t.metrics.offeredTextSuggestions.push({text:r,source:o})},registerCut(t,n){let{metrics:r}=t,o=n.payload;t.metrics={...t.metrics,numCharsCut:r.numCharsCut+o.length,cuts:[...r.cuts,o]}},registerPaste(t,n){let{metrics:r}=t,{text:o,selectionText:i}=n.payload,s=r.numCharsDeleted+(i&&i.length?i.length:0),a=i&&i.length?[...r.deletions,i]:r.deletions;t.metrics={...t.metrics,numCharsDeleted:s,deletions:a,numCharsPasted:r.numCharsPasted+o.length,numPaste:r.numPaste+1,pastes:[...r.pastes,o]}},registerKeyDown(t,n){t.previousKeyDownEvent=n.payload},nextTextSuggestionIndex(t){let n=t.textSuggestions.length;t.selectedSuggestionIndex=t.selectedSuggestionIndex<n-1?t.selectedSuggestionIndex+1:t.selectedSuggestionIndex},previousTextSuggestionIndex(t){t.selectedSuggestionIndex=t.selectedSuggestionIndex>=0?t.selectedSuggestionIndex-1:t.selectedSuggestionIndex},setTextSuggestions(t,n){if(t.selectedSuggestionIndex=-1,t.textSuggestions=n.payload,n.payload.length===0)return;let r=t.userCommitted.text.substring(0,t.userCommitted.selection.end),o=Fm(n.payload,r);t.tabCompletionSuggestion=o!=null&&o.text.includes(r)?o:void 0},setSelectedTextSuggestionIndex(t,n){t.selectedSuggestionIndex=n.payload},mergeMetrics(t,{payload:n}){let r=n.agentStartedTypingTimestamp!=null?n.agentStartedTypingTimestamp:Date.now(),o=(Date.now()-r)/1e3;t.metrics.externalTimeTotalSeconds=o,t.metrics.numCharsTyped+=n.numCharsTyped,t.metrics.numCharsPasted+=n.numCharsPasted,t.metrics.numCharsCut+=n.numCharsCut,t.metrics.numCharsDeleted+=n.numCharsDeleted,t.metrics.numPaste+=n.numPaste,t.metrics.pastes.push(...n.pastes),t.metrics.deletions.push(...n.deletions)}},extraReducers:t=>{t.addCase(J,n=>{n.tabCompletionSuggestion=gr.tabCompletionSuggestion,n.previousKeyDownEvent=gr.previousKeyDownEvent,n.textSuggestions=gr.textSuggestions,n.selectedSuggestionIndex=gr.selectedSuggestionIndex,n.metrics=gr.metrics})}}),Bm=Ax("input"),li=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),EP=e=>e.input.selection,Ox=()=>I(EP),{userInput:Nx,changeSelection:Um,initialInput:Mx,mergeMetrics:Dx,nextTextSuggestionIndex:Fx,offeredTextSuggestion:jx,previousTextSuggestionIndex:Hx,registerCut:Bx,registerKeyDown:Ux,registerPaste:zx,reset:Vx,resetToCommitted:ta,platformInput:Kx,setSelectedTextSuggestionIndex:Zr,setTextSuggestions:nn,stageSuggestion:Dt,commitSuggestion:hr}=Bm.actions,Xe=Ax("overlay");var ui=x(O());var Wx={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var zm=x(w()),CP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ui.useRef)(null),l=(0,ui.useRef)(null),u=k("Dialog",Wx);return(0,ui.useEffect)(()=>{var d,y;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},f=v=>{let h=window.getSelection();h!=null&&h.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",f),(y=a.current)==null||y.addEventListener("keyup",c),()=>{var v,h;(v=a.current)==null||v.removeEventListener("click",f),(h=a.current)==null||h.removeEventListener("keyup",c)}},[a,l,o,r]),(0,ui.useEffect)(()=>{var c,f;!a.current||!e||!t||(f=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||f.focus()},[e,t,a]),e?(0,zm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,zm.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},ci=CP;var Eg=x(O());var Vm={};Pe(Vm,{enUS:()=>bP,nlNL:()=>TP});var bP={dismiss:[{type:0,value:"Close"}],add:[{type:0,value:"Add to message"}],next:[{type:0,value:"Next"}],previous:[{type:0,value:"Previous"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},TP={dismiss:[{type:0,value:"Sluiten"}],add:[{type:0,value:"Toevoegen"}],next:[{type:0,value:"Volgende"}],previous:[{type:0,value:"Vorige"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var $x={root:"_root_l80t9_1",content:"_content_l80t9_3",title:"_title_l80t9_7",actions:"_actions_l80t9_15",pagination:"_pagination_l80t9_20",primaryButton:"_primaryButton_l80t9_51",primaryButtons:"_primaryButtons_l80t9_55"};var Cc=x(O());var Km=function(e,t){return Km=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Km(e,t)};function na(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Km(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var st=function(){return st=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},st.apply(this,arguments)};function qx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function dc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var fc;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(fc||(fc={}));var pc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Ft;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Ft||(Ft={}));var mc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(mc||(mc={}));function Wm(e){return e.type===Ft.literal}function Gx(e){return e.type===Ft.argument}function gc(e){return e.type===Ft.number}function hc(e){return e.type===Ft.date}function yc(e){return e.type===Ft.time}function vc(e){return e.type===Ft.select}function Sc(e){return e.type===Ft.plural}function Xx(e){return e.type===Ft.pound}function xc(e){return e.type===Ft.tag}function _c(e){return!!(e&&typeof e=="object"&&e.type===mc.number)}function ra(e){return!!(e&&typeof e=="object"&&e.type===mc.dateTime)}function $m(e){e.forEach(function(t){if(delete t.location,vc(t)||Sc(t))for(var n in t.options)delete t.options[n].location,$m(t.options[n].value);else gc(t)&&_c(t.style)||(hc(t)||yc(t))&&ra(t.style)?delete t.style.location:xc(t)&&$m(t.children)})}function Qx(e,t){t===void 0&&(t={}),t=st({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new pc(e,t).parse();if(n.err){var r=SyntaxError(fc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||$m(n.val),n.val}function wc(e,t){var n=t&&t.cache?t.cache:AP,r=t&&t.serializer?t.serializer:LP,o=t&&t.strategy?t.strategy:PP;return o(e,{cache:n,serializer:r})}function kP(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Yx(e,t,n,r){var o=kP(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Zx(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function qm(e,t,n,r,o){return n.bind(t,e,r,o)}function PP(e,t){var n=e.length===1?Yx:Zx;return qm(e,this,n,t.cache.create(),t.serializer)}function RP(e,t){return qm(e,this,Zx,t.cache.create(),t.serializer)}function IP(e,t){return qm(e,this,Yx,t.cache.create(),t.serializer)}var LP=function(){return JSON.stringify(arguments)};function Gm(){this.cache=Object.create(null)}Gm.prototype.get=function(e){return this.cache[e]};Gm.prototype.set=function(e,t){this.cache[e]=t};var AP={create:function(){return new Gm}},Ec={variadic:RP,monadic:IP};var Jr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Jr||(Jr={}));var oa=function(e){na(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Xm=function(e){na(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Jr.INVALID_VALUE,i)||this}return t}(oa);var Jx=function(e){na(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Jr.INVALID_VALUE,o)||this}return t}(oa);var e_=function(e){na(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Jr.MISSING_VALUE,r)||this}return t}(oa);var De;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(De||(De={}));function OP(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==De.literal||n.type!==De.literal?t.push(n):r.value+=n.value,t},[])}function NP(e){return typeof e=="function"}function ia(e,t,n,r,o,i,s){if(e.length===1&&Wm(e[0]))return[{type:De.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Wm(c)){a.push({type:De.literal,value:c.value});continue}if(Xx(c)){typeof i=="number"&&a.push({type:De.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new e_(f,s);var d=o[f];if(Gx(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?De.literal:De.object,value:d});continue}if(hc(c)){var y=typeof c.style=="string"?r.date[c.style]:ra(c.style)?c.style.parsedOptions:void 0;a.push({type:De.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(yc(c)){var y=typeof c.style=="string"?r.time[c.style]:ra(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:De.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(gc(c)){var y=typeof c.style=="string"?r.number[c.style]:_c(c.style)?c.style.parsedOptions:void 0;y&&y.scale&&(d=d*(y.scale||1)),a.push({type:De.literal,value:n.getNumberFormat(t,y).format(d)});continue}if(xc(c)){var v=c.children,h=c.value,g=o[h];if(!NP(g))throw new Jx(h,"function",s);var m=ia(v,t,n,r,o,i),p=g(m.map(function(C){return C.value}));Array.isArray(p)||(p=[p]),a.push.apply(a,p.map(function(C){return{type:typeof C=="string"?De.literal:De.object,value:C}}))}if(vc(c)){var S=c.options[d]||c.options.other;if(!S)throw new Xm(c.value,d,Object.keys(c.options),s);a.push.apply(a,ia(S.value,t,n,r,o));continue}if(Sc(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new oa(`Intl.PluralRules is not available in this environment.
|
|
13
|
+
`),ce}ui(()=>{I.current=void 0,Ar.current=void 0,Vi.current=At});let Hn=(0,Z.useMemo)(()=>Z.default.createElement(m,Sn({},At,{ref:P})),[P,m,At]);return(0,Z.useMemo)(()=>v?Z.default.createElement(H.Provider,{value:Va},Hn):Hn,[H,Hn,Va])}let E=Z.default.memo(_);if(E.WrappedComponent=m,E.displayName=_.displayName=f,l){let R=Z.default.forwardRef(function(N,H){return Z.default.createElement(E,Sn({},N,{reactReduxForwardedRef:H}))});return R.displayName=f,R.WrappedComponent=m,(0,Mm.default)(R,m)}return(0,Mm.default)(E,m)}}var xn=_P;var Js=x(O());function wP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Js.useMemo)(()=>{let u=Xu(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Js.useMemo)(()=>e.getState(),[e]);ui(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||Fe;return Js.default.createElement(l.Provider,{value:s},n)}var Dm=wP;function Yu(e=Fe){let t=e===Fe?Tu:Qs(e);return function(){let{store:r}=t();return r}}var Fm=Yu();function Cx(e=Fe){let t=e===Fe?Fm:Yu(e);return function(){return t().dispatch}}var U=Cx();J0(kx.useSyncExternalStoreWithSelector);Ex(Tx.useSyncExternalStore);q0(Cm.unstable_batchedUpdates);var ea=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ea||{});var bP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showPersonalCollectionLink:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,adminUrl:void 0,productName:"Deepdesk"},Px=j({name:"settings",initialState:bP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ta}=Px.actions,jm=e=>t=>t.settings[e],M=e=>A(jm(e)),Rx=Px.reducer;var Ow=x(O());function _n(){}_n.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(y){return o?(setTimeout(function(){o(void 0,y)},0),!0):y}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function h(){for(var y=-1*u;y<=u;y+=2){var m=void 0,g=p[y-1],f=p[y+1],S=(f?f.newPos:0)-y;g&&(p[y-1]=void 0);var _=g&&g.newPos+1<a,b=f&&0<=S&&S<l;if(!_&&!b){p[y]=void 0;continue}if(!_||b&&g.newPos<f.newPos?(m=CP(f),i.pushComponent(m.components,void 0,!0)):(m=g,m.newPos++,i.pushComponent(m.components,!0,void 0)),S=i.extractCommon(m,n,t,y),m.newPos+1>=a&&S+1>=l)return s(EP(i,m.components,n,t,i.useLongestToken));p[y]=m}u++}if(o)(function y(){setTimeout(function(){if(u>c)return o();h()||y()},0)})();else for(;u<=c;){var v=h();if(v)return v}},pushComponent:function(t,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?t[t.length-1]={count:o.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.newPos,l=a-o,u=0;a+1<i&&l+1<s&&this.equals(n[a+1],r[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function EP(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(h,v){var y=r[l+v];return y.length>h.length?y:h}),u.value=e.join(c)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function CP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var TP=new _n;function Lx(e,t,n){return TP.diff(e,t,n)}var Ix=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Ax=/\S/,Ox=new _n;Ox.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Ax.test(e)&&!Ax.test(t)};Ox.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&Ix.test(t[n])&&Ix.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Nx=new _n;Nx.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var kP=new _n;kP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var PP=new _n;PP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Zu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zu=function(t){return typeof t}:Zu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}var RP=Object.prototype.toString,na=new _n;na.useLongestToken=!0;na.tokenize=Nx.tokenize;na.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify(Bm(e,null,null,o),o," ")};na.equals=function(e,t){return _n.prototype.equals.call(na,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Bm(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var s;if(RP.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=Bm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Zu(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),i=0;i<a.length;i+=1)l=a[i],s[l]=Bm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Hm=new _n;Hm.tokenize=function(e){return e.slice()};Hm.join=Hm.removeEmpty=function(e){return e};function Mx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function mr(e,t,n=10){let r=typeof e,o=typeof t;if(n===0)throw new Error("Max depth deepEqual, possible circular references?");return r!==o?!1:e==null||r==="string"||r==="number"||r==="boolean"?e===t:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:e.every((i,s)=>mr(i,t[s],n-1)):Mx(e)&&Mx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>mr(e[s],t[s],n-1)):!1}function IP(e){return Math.max(...e.map(t=>t.length))}function AP(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return{...r,[o]:i}}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function Dx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<IP(r);o++){let i=AP(r.map(a=>a[o]),t),s=r.filter(a=>!i.includes(a[o]));if(s.length>=t)r=s;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var LP=2;function zm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Dx(e,LP);return n&&n.text!==t?n:e[0]}var Fx={current:null,isSupported:null},J=fe("resetConversation"),Ju=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},ec=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},di=e=>e.conversation.isSupported,Um=D("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),tc=D("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),nc=D("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),rc=D("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ec(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Vm=D("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),oc=D("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ec(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),OP=[tc.rejected,nc.rejected,rc.rejected,oc.rejected].map(e=>e==null?void 0:e.toString()),NP=j({name:"conversation",initialState:Fx,reducers:{},extraReducers:e=>{e.addCase(Um.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(tc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(nc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Vm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(rc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(oc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Fx).addMatcher(t=>OP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),jx=NP.reducer;var gr={text:"",html:null,selection:{start:0,end:0},stagedSuggestion:null,userCommitted:{text:"",selection:{start:0,end:0}},tabCompletionSuggestion:void 0,previousKeyDownEvent:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function sc(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}}var ac=fe("input/replaceText"),lc=fe("input/keyDown"),Zr=fe("input/sendMessage"),uc=fe("input/sendEditSuggestionMessage"),cc=fe("input/uiInputChange"),dc=fe("input/applyImageSuggestion"),je=fe("input/sendEvent");function ic(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,p=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(p||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:p?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var Bx=e=>j({name:e,initialState:gr,reducers:{initialInput(t,n){let{text:r,selection:o,html:i}=n.payload;t.text=r,t.selection.start=(o==null?void 0:o.start)??r.length,t.selection.end=(o==null?void 0:o.end)??r.length,t.userCommitted.text=r,t.userCommitted.selection.start=(o==null?void 0:o.start)??r.length,t.userCommitted.selection.end=(o==null?void 0:o.end)??r.length,t.html=i||null},reset(t){Object.assign(t,{...gr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=zm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(mr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&ic(t)))},platformInput(t,n){let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end),t.text=r,t.html=o||null},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:p,ctrlKey:d,metaKey:h,altKey:v}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=t,{text:m}=n.payload,g=Lx(y,m);y.length-m.length>1&&t.metrics.deletions.push(...g.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=y.length-m.length;break}case"C":case"V":case"X":if(!d&&!h){t.metrics.numCharsTyped+=1;let y=((s=t.selection)==null?void 0:s.start)!==void 0&&((a=t.selection)==null?void 0:a.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}break;case"Shift":break;default:if(!d&&!h&&!v){t.metrics.numCharsTyped+=1;let y=((l=t.selection)==null?void 0:l.start)!==void 0&&((u=t.selection)==null?void 0:u.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=gr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&ic(t);let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end,t.userCommitted.selection.start=i.start,t.userCommitted.selection.end=i.end),t.text=r,t.html=o||null,t.userCommitted.text=r,t.previousKeyDownEvent=null},stageSuggestion(t,n){let{text:r}=n.payload;switch(t.stagedSuggestion=n.payload,t.tabCompletionSuggestion=void 0,n.payload.replace){case"selection":t.text=`${t.text.slice(0,t.selection.start)}${r}${t.text.slice(t.selection.end)}`,t.selection.end=t.selection.start+r.length,t.selection.start+=r.length;break;case"until-selection-end":t.text=`${r}${t.text.slice(t.selection.end)}`,t.selection.start=r.length,t.selection.end=r.length;break;default:throw new Error(`Unknown replace ${n.payload.replace}`)}n.payload.eventMetrics.inputType==="tab"&&ic(t)},commitSuggestion(t){ic(t)},offeredTextSuggestion(t,n){let{text:r,suggestion:{source:o}}=n.payload;t.metrics.offeredTextSuggestions.find(s=>s.text===r)||t.metrics.offeredTextSuggestions.push({text:r,source:o})},registerCut(t,n){let{metrics:r}=t,o=n.payload;t.metrics={...t.metrics,numCharsCut:r.numCharsCut+o.length,cuts:[...r.cuts,o]}},registerPaste(t,n){let{metrics:r}=t,{text:o,selectionText:i}=n.payload,s=r.numCharsDeleted+(i&&i.length?i.length:0),a=i&&i.length?[...r.deletions,i]:r.deletions;t.metrics={...t.metrics,numCharsDeleted:s,deletions:a,numCharsPasted:r.numCharsPasted+o.length,numPaste:r.numPaste+1,pastes:[...r.pastes,o]}},registerKeyDown(t,n){t.previousKeyDownEvent=n.payload},nextTextSuggestionIndex(t){let n=t.textSuggestions.length;t.selectedSuggestionIndex=t.selectedSuggestionIndex<n-1?t.selectedSuggestionIndex+1:t.selectedSuggestionIndex},previousTextSuggestionIndex(t){t.selectedSuggestionIndex=t.selectedSuggestionIndex>=0?t.selectedSuggestionIndex-1:t.selectedSuggestionIndex},setTextSuggestions(t,n){if(t.selectedSuggestionIndex=-1,t.textSuggestions=n.payload,n.payload.length===0)return;let r=t.userCommitted.text.substring(0,t.userCommitted.selection.end),o=zm(n.payload,r);t.tabCompletionSuggestion=o!=null&&o.text.includes(r)?o:void 0},setSelectedTextSuggestionIndex(t,n){t.selectedSuggestionIndex=n.payload},mergeMetrics(t,{payload:n}){let r=n.agentStartedTypingTimestamp!=null?n.agentStartedTypingTimestamp:Date.now(),o=(Date.now()-r)/1e3;t.metrics.externalTimeTotalSeconds=o,t.metrics.numCharsTyped+=n.numCharsTyped,t.metrics.numCharsPasted+=n.numCharsPasted,t.metrics.numCharsCut+=n.numCharsCut,t.metrics.numCharsDeleted+=n.numCharsDeleted,t.metrics.numPaste+=n.numPaste,t.metrics.pastes.push(...n.pastes),t.metrics.deletions.push(...n.deletions)}},extraReducers:t=>{t.addCase(J,n=>{n.tabCompletionSuggestion=gr.tabCompletionSuggestion,n.previousKeyDownEvent=gr.previousKeyDownEvent,n.textSuggestions=gr.textSuggestions,n.selectedSuggestionIndex=gr.selectedSuggestionIndex,n.metrics=gr.metrics})}}),Km=Bx("input"),pi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),MP=e=>e.input.selection,Hx=()=>A(MP),{userInput:zx,changeSelection:Wm,initialInput:Ux,mergeMetrics:Vx,nextTextSuggestionIndex:Kx,offeredTextSuggestion:Wx,previousTextSuggestionIndex:$x,registerCut:qx,registerKeyDown:Gx,registerPaste:Xx,reset:Qx,resetToCommitted:ra,platformInput:Yx,setSelectedTextSuggestionIndex:hr,setTextSuggestions:on,stageSuggestion:Ft,commitSuggestion:yr}=Km.actions,Je=Bx("overlay");var fi=x(O());var Zx={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var $m=x(w()),DP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,fi.useRef)(null),l=(0,fi.useRef)(null),u=k("Dialog",Zx);return(0,fi.useEffect)(()=>{var d,h;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},p=v=>{let y=window.getSelection();y!=null&&y.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(h=a.current)==null||h.addEventListener("keyup",c),()=>{var v,y;(v=a.current)==null||v.removeEventListener("click",p),(y=a.current)==null||y.removeEventListener("keyup",c)}},[a,l,o,r]),(0,fi.useEffect)(()=>{var c,p;!a.current||!e||!t||(p=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||p.focus()},[e,t,a]),e?(0,$m.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,$m.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},mi=DP;var Ig=x(O());var qm={};Ie(qm,{enUS:()=>FP,nlNL:()=>jP});var FP={dismiss:[{type:0,value:"Close"}],add:[{type:0,value:"Add to message"}],next:[{type:0,value:"Next"}],previous:[{type:0,value:"Previous"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},jP={dismiss:[{type:0,value:"Sluiten"}],add:[{type:0,value:"Toevoegen"}],next:[{type:0,value:"Volgende"}],previous:[{type:0,value:"Vorige"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Jx={root:"_root_l80t9_1",content:"_content_l80t9_3",title:"_title_l80t9_7",actions:"_actions_l80t9_15",pagination:"_pagination_l80t9_20",primaryButton:"_primaryButton_l80t9_51",primaryButtons:"_primaryButtons_l80t9_55"};var Cc=x(O());var Gm=function(e,t){return Gm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Gm(e,t)};function oa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Gm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var lt=function(){return lt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},lt.apply(this,arguments)};function e_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function pc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var fc;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(fc||(fc={}));var mc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var jt;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(jt||(jt={}));var gc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(gc||(gc={}));function Xm(e){return e.type===jt.literal}function t_(e){return e.type===jt.argument}function hc(e){return e.type===jt.number}function yc(e){return e.type===jt.date}function vc(e){return e.type===jt.time}function Sc(e){return e.type===jt.select}function xc(e){return e.type===jt.plural}function n_(e){return e.type===jt.pound}function _c(e){return e.type===jt.tag}function wc(e){return!!(e&&typeof e=="object"&&e.type===gc.number)}function ia(e){return!!(e&&typeof e=="object"&&e.type===gc.dateTime)}function Qm(e){e.forEach(function(t){if(delete t.location,Sc(t)||xc(t))for(var n in t.options)delete t.options[n].location,Qm(t.options[n].value);else hc(t)&&wc(t.style)||(yc(t)||vc(t))&&ia(t.style)?delete t.style.location:_c(t)&&Qm(t.children)})}function r_(e,t){t===void 0&&(t={}),t=lt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new mc(e,t).parse();if(n.err){var r=SyntaxError(fc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Qm(n.val),n.val}function bc(e,t){var n=t&&t.cache?t.cache:KP,r=t&&t.serializer?t.serializer:VP,o=t&&t.strategy?t.strategy:HP;return o(e,{cache:n,serializer:r})}function BP(e){return e==null||typeof e=="number"||typeof e=="boolean"}function o_(e,t,n,r){var o=BP(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function i_(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function Ym(e,t,n,r,o){return n.bind(t,e,r,o)}function HP(e,t){var n=e.length===1?o_:i_;return Ym(e,this,n,t.cache.create(),t.serializer)}function zP(e,t){return Ym(e,this,i_,t.cache.create(),t.serializer)}function UP(e,t){return Ym(e,this,o_,t.cache.create(),t.serializer)}var VP=function(){return JSON.stringify(arguments)};function Zm(){this.cache=Object.create(null)}Zm.prototype.get=function(e){return this.cache[e]};Zm.prototype.set=function(e,t){this.cache[e]=t};var KP={create:function(){return new Zm}},Ec={variadic:zP,monadic:UP};var Jr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Jr||(Jr={}));var sa=function(e){oa(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Jm=function(e){oa(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Jr.INVALID_VALUE,i)||this}return t}(sa);var s_=function(e){oa(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Jr.INVALID_VALUE,o)||this}return t}(sa);var a_=function(e){oa(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Jr.MISSING_VALUE,r)||this}return t}(sa);var Be;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Be||(Be={}));function WP(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Be.literal||n.type!==Be.literal?t.push(n):r.value+=n.value,t},[])}function $P(e){return typeof e=="function"}function aa(e,t,n,r,o,i,s){if(e.length===1&&Xm(e[0]))return[{type:Be.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Xm(c)){a.push({type:Be.literal,value:c.value});continue}if(n_(c)){typeof i=="number"&&a.push({type:Be.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new a_(p,s);var d=o[p];if(t_(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Be.literal:Be.object,value:d});continue}if(yc(c)){var h=typeof c.style=="string"?r.date[c.style]:ia(c.style)?c.style.parsedOptions:void 0;a.push({type:Be.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(vc(c)){var h=typeof c.style=="string"?r.time[c.style]:ia(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Be.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(hc(c)){var h=typeof c.style=="string"?r.number[c.style]:wc(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),a.push({type:Be.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(_c(c)){var v=c.children,y=c.value,m=o[y];if(!$P(m))throw new s_(y,"function",s);var g=aa(v,t,n,r,o,i),f=m(g.map(function(b){return b.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(b){return{type:typeof b=="string"?Be.literal:Be.object,value:b}}))}if(Sc(c)){var S=c.options[d]||c.options.other;if(!S)throw new Jm(c.value,d,Object.keys(c.options),s);a.push.apply(a,aa(S.value,t,n,r,o));continue}if(xc(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new sa(`Intl.PluralRules is not available in this environment.
|
|
14
14
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
15
|
-
`,Jr.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[_]||c.options.other}if(!S)throw new Xm(c.value,d,Object.keys(c.options),s);a.push.apply(a,ia(S.value,t,n,r,o,d-(c.offset||0)));continue}}return OP(a)}function MP(e,t){return t?st(st(st({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=st(st({},e[r]),t[r]||{}),n},{})):e}function DP(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=MP(e[r],t[r]),n},st({},e)):e}function Qm(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function FP(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:wc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,dc([void 0],n,!1)))},{cache:Qm(e.number),strategy:Ec.variadic}),getDateTimeFormat:wc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,dc([void 0],n,!1)))},{cache:Qm(e.dateTime),strategy:Ec.variadic}),getPluralRules:wc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,dc([void 0],n,!1)))},{cache:Qm(e.pluralRules),strategy:Ec.variadic})}}var t_=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var f=c.reduce(function(d,y){return!d.length||y.type!==De.literal||typeof d[d.length-1]!="string"?d.push(y.value):d[d.length-1]+=y.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return ia(i.ast,i.locales,i.formatters,i.formats,u,void 0,i.message)},this.resolvedOptions=function(){var u;return{locale:((u=i.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{},a=s.formatters,l=qx(s,["formatters"]);this.ast=e.__parse(t,st(st({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=DP(e.formats,r),this.formatters=o&&o.formatters||FP(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Qx,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function jP(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var HP="dummy",Ym=(0,Cc.createContext)(null);function H(e){let t=(0,Cc.useContext)(Ym);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=e[t]??{};return(r,o)=>{let i=jP(n,r);return i?new t_(i).format(o):(t!==HP&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var sa=x(w()),bc=()=>(0,sa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,sa.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,sa.jsx)("path",{d:"M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"})]});var aa=x(w()),n_=()=>(0,aa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,aa.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,aa.jsx)("path",{d:"M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"})]});var Tt=x(O());var Tc=x(O());function la(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=1,Jm=2,eg=4,Se=8,kc=16,ua=32,jt=64,Zm={a:{content:q|Se,self:!1,type:q|Se|ua|jt},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:q|Se,void:!0},body:{content:q|Jm|eg|Se|kc|ua|jt},button:{content:Se,type:q|Se|ua|jt},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|ua|jt},dd:{content:q,parent:["dl"]},dl:{children:["dt","dd"],type:q},dt:{content:q,invalid:["footer","header"],parent:["dl"]},figcaption:{content:q,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:q,void:!0},img:{void:!0},li:{content:q,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:q},picture:{children:["source","img"],type:q|Se|kc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Se,parent:["ruby","rtc"]},rtc:{content:Se,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Se,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:q},tbody:{parent:["table"],children:["tr"]},td:{content:q,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:q,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:q},video:{children:["track","source"]},wbr:{type:q|Se,void:!0}};function to(e){return t=>{Zm[t]={...e,...Zm[t]}}}["address","main","div","figure","p","pre"].forEach(to({content:q,type:q|jt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(to({content:Se,type:q|Se|jt}));["p","pre"].forEach(to({content:Se,type:q|jt}));["s","small","span","del","ins"].forEach(to({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(to({content:q,type:q|Jm|jt}));["h1","h2","h3","h4","h5","h6"].forEach(to({content:Se,type:q|eg|jt}));["audio","canvas","iframe","img","video"].forEach(to({type:q|Se|kc|jt}));var da=Object.freeze(Zm),tg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ng=Object.keys(da).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,rg=2,eo=3,yr=4,Rc=5,Ic=Object.freeze({alt:ee,cite:ee,class:ee,colspan:eo,controls:yr,datetime:ee,default:yr,disabled:yr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:yr,media:ee,muted:yr,poster:ee,rel:ee,role:ee,rowspan:eo,scope:ee,sizes:ee,span:eo,start:eo,style:Rc,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),og=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Pc(){return Pc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(this,arguments)}function Lc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Tc.default.createElement(i,Pc({className:t},e)):Tc.default.createElement(i,Pc({className:t},e),n)}var ca=class{attribute(t,n){return n}node(t,n){return n}};function r_(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var wn=class{constructor(t,n,r){la(this,"greedy",!1),la(this,"options",void 0),la(this,"propName",void 0),la(this,"inverseName",void 0),la(this,"factory",void 0),this.options={...n},this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r??null}createElement(t,n){return this.factory?Tc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return r_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var no=x(O()),a_=x(i_());function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zP=/(url|image|image-set)\(/i,ig=class extends ca{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(zP)&&delete n[r]}),n}},s_=1,VP=3,KP=/^<(!doctype|(html|head|body)(\s|>))/i,WP=/^(aria-|data-|\w+:)/iu,$P=/{{{(\w+)\/?}}}/;function qP(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Ac=class{constructor(t,n={},r=[],o=[]){var i;En(this,"allowed",void 0),En(this,"banned",void 0),En(this,"blocked",void 0),En(this,"container",void 0),En(this,"content",[]),En(this,"props",void 0),En(this,"matchers",void 0),En(this,"filters",void 0),En(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new ig],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:ng),this.banned=new Set(tg),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let f="";for(;i&&(a=l.match(i));){let{index:d,length:y,match:v,valid:h,void:g,...m}=a,p=l.propName+String(s);d>0&&(f+=i.slice(0,d)),h?(f+=g?`{{{${p}/}}}`:`{{{${p}}}}${v}{{{/${p}}}}`,this.keyIndex+=1,s+=1,r[p]={children:v,matcher:l,props:{...o,...m,key:this.keyIndex}}):f+=v,l.greedy?(i=f+i.slice(d+y),f=""):i=i.slice(d+(y||v.length))}l.greedy||(i=f+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
|
|
15
|
+
`,Jr.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[_]||c.options.other}if(!S)throw new Jm(c.value,d,Object.keys(c.options),s);a.push.apply(a,aa(S.value,t,n,r,o,d-(c.offset||0)));continue}}return WP(a)}function qP(e,t){return t?lt(lt(lt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=lt(lt({},e[r]),t[r]||{}),n},{})):e}function GP(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=qP(e[r],t[r]),n},lt({},e)):e}function eg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function XP(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,pc([void 0],n,!1)))},{cache:eg(e.number),strategy:Ec.variadic}),getDateTimeFormat:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,pc([void 0],n,!1)))},{cache:eg(e.dateTime),strategy:Ec.variadic}),getPluralRules:bc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,pc([void 0],n,!1)))},{cache:eg(e.pluralRules),strategy:Ec.variadic})}}var l_=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var p=c.reduce(function(d,h){return!d.length||h.type!==Be.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return aa(i.ast,i.locales,i.formatters,i.formats,u,void 0,i.message)},this.resolvedOptions=function(){var u;return{locale:((u=i.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{},a=s.formatters,l=e_(s,["formatters"]);this.ast=e.__parse(t,lt(lt({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=GP(e.formats,r),this.formatters=o&&o.formatters||XP(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=r_,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function QP(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var YP="dummy",tg=(0,Cc.createContext)(null);function B(e){let t=(0,Cc.useContext)(tg);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=e[t]??{};return(r,o)=>{let i=QP(n,r);return i?new l_(i).format(o):(t!==YP&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var la=x(w()),Tc=()=>(0,la.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,la.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,la.jsx)("path",{d:"M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"})]});var ua=x(w()),u_=()=>(0,ua.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,ua.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,ua.jsx)("path",{d:"M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"})]});var kt=x(O());var kc=x(O());function ca(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G=1,rg=2,og=4,xe=8,Pc=16,da=32,Bt=64,ng={a:{content:G|xe,self:!1,type:G|xe|da|Bt},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:G|xe,void:!0},body:{content:G|rg|og|xe|Pc|da|Bt},button:{content:xe,type:G|xe|da|Bt},caption:{content:G,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:G|da|Bt},dd:{content:G,parent:["dl"]},dl:{children:["dt","dd"],type:G},dt:{content:G,invalid:["footer","header"],parent:["dl"]},figcaption:{content:G,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:G,void:!0},img:{void:!0},li:{content:G,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:G},picture:{children:["source","img"],type:G|xe|Pc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:xe,parent:["ruby","rtc"]},rtc:{content:xe,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:xe,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:G},tbody:{parent:["table"],children:["tr"]},td:{content:G,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:G,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:G},video:{children:["track","source"]},wbr:{type:G|xe,void:!0}};function to(e){return t=>{ng[t]={...e,...ng[t]}}}["address","main","div","figure","p","pre"].forEach(to({content:G,type:G|Bt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(to({content:xe,type:G|xe|Bt}));["p","pre"].forEach(to({content:xe,type:G|Bt}));["s","small","span","del","ins"].forEach(to({content:xe,type:G|xe}));["article","aside","footer","header","nav","section","blockquote"].forEach(to({content:G,type:G|rg|Bt}));["h1","h2","h3","h4","h5","h6"].forEach(to({content:xe,type:G|og|Bt}));["audio","canvas","iframe","img","video"].forEach(to({type:G|xe|Pc|Bt}));var fa=Object.freeze(ng),ig=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],sg=Object.keys(fa).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,ag=2,eo=3,vr=4,Ic=5,Ac=Object.freeze({alt:ee,cite:ee,class:ee,colspan:eo,controls:vr,datetime:ee,default:vr,disabled:vr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:vr,media:ee,muted:vr,poster:ee,rel:ee,role:ee,rowspan:eo,scope:ee,sizes:ee,span:eo,start:eo,style:Ic,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),lg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Rc(){return Rc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rc.apply(this,arguments)}function Lc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?kc.default.createElement(i,Rc({className:t},e)):kc.default.createElement(i,Rc({className:t},e),n)}var pa=class{attribute(t,n){return n}node(t,n){return n}};function c_(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var wn=class{constructor(t,n,r){ca(this,"greedy",!1),ca(this,"options",void 0),ca(this,"propName",void 0),ca(this,"inverseName",void 0),ca(this,"factory",void 0),this.options={...n},this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r??null}createElement(t,n){return this.factory?kc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return c_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var no=x(O()),m_=x(p_());function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eR=/(url|image|image-set)\(/i,ug=class extends pa{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(eR)&&delete n[r]}),n}},f_=1,tR=3,nR=/^<(!doctype|(html|head|body)(\s|>))/i,rR=/^(aria-|data-|\w+:)/iu,oR=/{{{(\w+)\/?}}}/;function iR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Oc=class{constructor(t,n={},r=[],o=[]){var i;bn(this,"allowed",void 0),bn(this,"banned",void 0),bn(this,"blocked",void 0),bn(this,"container",void 0),bn(this,"content",[]),bn(this,"props",void 0),bn(this,"matchers",void 0),bn(this,"filters",void 0),bn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new ug],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:sg),this.banned=new Set(ig),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let p="";for(;i&&(a=l.match(i));){let{index:d,length:h,match:v,valid:y,void:m,...g}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=m?`{{{${f}/}}}`:`{{{${f}}}}${v}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:v,matcher:l,props:{...o,...g,key:this.keyIndex}}):p+=v,l.greedy?(i=p+i.slice(d+h),p=""):i=i.slice(d+(h||v.length))}l.greedy||(i=p+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
|
|
16
16
|
`);return o=o.replace(/\n{3,}/g,`
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||qP)();if(!o)return;let i=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",s=i==="body"||i==="fragment"?o.body:o.createElement(i);return t.match(KP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,a_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==s_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Ic[l]||Ic[s];if(!this.isSafe(t)||!l.match(WP)&&(!n&&(!u||u===rg)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===yr?c=!0:u===eo?c=Number.parseFloat(String(c)):u!==Rc&&(c=String(c)),r[og[l]||l]=this.applyAttributeFilters(l,c),o+=1}),o===0)?null:r}extractStyleAttribute(t){let n={};return Array.from(t.style).forEach(r=>{let o=t.style[r];(typeof o=="string"||typeof o=="number")&&(n[r.replace(/-([a-z])/g,(i,s)=>String(s).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return da[t]?{...n,...da[t],tagName:t}:n}isSafe(t){if(typeof HTMLAnchorElement<"u"&&t instanceof HTMLAnchorElement){let n=t.getAttribute("href");if(n!=null&&n.startsWith("#"))return!0;let r=t.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(t){return this.banned.has(t)||this.blocked.has(t)?!1:this.props.allowElements||this.allowed.has(t)}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(t,n){let{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:s,transformOnlyAllowList:a}=this.props,l=[],u="";return[...t.childNodes].forEach(c=>{if(c.nodeType===s_){let d=c.nodeName.toLowerCase(),y=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let h;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;h=this.parseNode(v,y);let m=s(v,h,y);if(m===null)return;if(typeof m<"u"){l.push(no.default.cloneElement(m,{key:g}));return}this.keyIndex=g-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,y))){var f;this.keyIndex+=1;let g=this.extractAttributes(v),m={tagName:d};g&&(m.attributes=g),y.void&&(m.selfClose=y.void),l.push(no.default.createElement(Lc,{...m,key:this.keyIndex},(f=h)!==null&&f!==void 0?f:this.parseNode(v,y)))}else l=[...l,...this.parseNode(v,y.tagName?y:n)]}else if(c.nodeType===VP){let d=r&&!o?c.textContent:this.applyMatchers(c.textContent||"",n);Array.isArray(d)?l=[...l,...d]:u+=d}}),u&&l.push(u),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match($P);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:f,props:d}=n[a],y;if(u)y=s.length,r.push(f.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));y=v.index+v[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(y)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function GP(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",f=c==="fragment"?!0:u,d;if(a)d=a;else{let y=new Ac(i??"",e).parse();y.length>0&&(d=y)}return d||(d=s),f?no.default.createElement(no.default.Fragment,null,d):no.default.createElement(Lc,{attributes:n,className:r,tagName:c},d)}function di(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:f="span",noWrap:d=!1,...y}=e,v=i?[]:l,h=o?[]:a,g=c?[c]:[],m=u?[u]:[];v.forEach(C=>{C.onBeforeParse&&g.push(C.onBeforeParse.bind(C)),C.onAfterParse&&m.push(C.onAfterParse.bind(C))});let p=g.reduce((C,E)=>E(C,e),r??""),S=new Ac(p,y,v,h),_=m.reduce((C,E)=>E(C,e),S.parse());return no.default.createElement(GP,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:f})}var gg=x(X());var sg={root:"_root_kxnai_1",agentText:"_agentText_kxnai_3",textInput:"_textInput_kxnai_8",textInputWrapper:"_textInputWrapper_kxnai_27",alert:"_alert_kxnai_31",alertText:"_alertText_kxnai_50",warning:"_warning_kxnai_60",success:"_success_kxnai_69"};var u_=x(X());var fi=x(O());function l_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Oc(e){let t=(0,fi.useRef)(null),[n,r]=(0,fi.useState)(!1);return(0,fi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=l_((c,f)=>{let d=t.current;if(!d)return;let y=c/i,v=f/i,h=d.getBoundingClientRect(),g=y>h.x&&y<h.x+h.width&&v>h.y&&v<h.y+h.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:f})=>[c,f]),[l,u]=l_(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),u(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}var Cn={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var ag=x(w()),XP=({inputElement:e,children:t})=>{let n=k("TabCompletion",Cn),[r,o]=Oc(e);return(0,ag.jsx)("mark",{ref:r,className:(0,u_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},pi=class extends wn{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,ag.jsx)(XP,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var mi=x(O());function Nc(e){return e.contentEditable==="true"}function QP(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),i=o.cloneRange();i.selectNodeContents(e),i.setEnd(o.endContainer,o.endOffset),n=i.toString().length,i.selectNodeContents(e),i.setEnd(o.startContainer,o.startOffset),t=i.toString().length}return{selectionStart:t,selectionEnd:n}}function c_(e){let{selectionStart:t,selectionEnd:n}=Nc(e)?QP(e):e;return[t,n]}function Mc(e){let[,t]=(0,mi.useState)(),n=(0,mi.useRef)(null);return n.current=c_(e),(0,mi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=c_(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function Dc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(So);if(!s||s.length===0)return;let a=0;s.find(l=>{let u=r.indexOf(l,a);return o>u&&i<u+l.length?(n.selectionStart=u,n.selectionEnd=u+l.length,!0):(a=u+l.length,!1)})}var d_=x(O());function gi(e){(0,d_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ro(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var f_,rn=new Map,YP=["bottom","height","left","right","top","width"],ZP=(e={},t={})=>YP.some(n=>e[n]!==t[n]);function p_(e){var n,r;let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...p_(t)]:[]}function m_(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var lg=!1,g_=()=>{lg=!0;let e=[];rn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),rn.delete(n);return}let r=n.getBoundingClientRect();ZP(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(m_,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),rn.size!==0&&(f_=window.requestAnimationFrame(g_))};function ug(e,t){let n=p_(e),r=[],o=n.map((i,s)=>ug(i,a=>{r[s]=a;let l=rn.get(e);if(!l)return;let u=r.reduce(m_,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),rn.has(e)){let s=rn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else rn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!lg&&g_()},unobserve(){o.forEach(s=>s.unobserve());let i=rn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||rn.delete(e),rn.size||(cancelAnimationFrame(f_),lg=!1)}}}}var h_,on=new Map,y_=()=>{on.forEach((e,t)=>{if(!t.isConnected){on.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),on.size!==0&&(h_=window.requestAnimationFrame(y_))};function v_(e,t){return{observe(){let n=on.size===0;on.has(e)?on.get(e).callbacks.push(t):on.set(e,{visible:void 0,callbacks:[t]}),n&&y_()},unobserve(){let n=on.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||on.delete(e),on.size||cancelAnimationFrame(h_)}}}}var cg=["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderStyle","boxSizing","color","overflowWrap","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontWeight","fontKerning","lineHeight","letterSpacing","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","textIndent","whiteSpace","wordBreak","wordSpacing","wordWrap"];function dg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function hi(e){return parseFloat(e)}function Fc(e){return Math.round(e*1e6)}function S_(e){return e/1e6}function fg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=hi(e.width),i=hi(e.borderLeftWidth),s=hi(e.borderRightWidth),a=hi(e.paddingRight),l=S_(Fc(o)-Fc(i)-Fc(s)),u=S_(Fc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function oo(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ro(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};dg(r,n,cg),fg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=v_(e,()=>{dg(r,n,cg),fg(r,e,n),i(),setTimeout(i,0)}),a=ug(e,u=>{if(u===null){t.onRemove&&t.onRemove(),n.remove();return}if(u.height===0&&u.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(dg(r,n,cg),fg(r,e,n),i(),n.style.top=`${u.top}px`,n.style.left=`${u.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let c=t.closestScrollElement.getBoundingClientRect(),f=window.getComputedStyle(t.closestScrollElement),d=hi(f.borderTopWidth),y=hi(f.borderBottomWidth),v=c.top+d-u.top,h=u.top+u.height+-(c.top+c.height-y);n.style.clipPath=`inset(${v}px 0px ${h}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(l=e.parentElement)==null||l.appendChild(n),a.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),a.unobserve(),s.unobserve()}]}var pg={};Pe(pg,{enUS:()=>JP,nlNL:()=>eR});var JP={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"No placeholders found"}]},one:{value:[{type:0,value:"There is one placeholder in your message"}]},other:{value:[{type:0,value:"There are "},{type:7},{type:0,value:" placeholders in your message"}]}},offset:0,pluralType:"cardinal"}]},eR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"Alle placeholders zijn uit je bericht"}]},one:{value:[{type:0,value:"Er is 1 placeholder in jouw bericht"}]},other:{value:[{type:0,value:"Er zijn "},{type:7},{type:0,value:" placeholders in jouw bericht"}]}},offset:0,pluralType:"cardinal"}]};var fa=x(w()),x_=()=>(0,fa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,fa.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,fa.jsx)("path",{d:"M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"})]});var mg=x(w()),__=()=>(0,mg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,mg.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});function tR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function jc(e){return e?e instanceof ShadowRoot?jc(e.host):e===e.ownerDocument.body?e.ownerDocument:tR(e)?e:jc(e.parentNode):document.body}var w_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(w_||{}),bn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();mr(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(w_).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()});let n=jc(this.element);if(n){let r=()=>{this.currentCaret!==null&&(this.currentCaret=null,this.emit("caret",null))};n.addEventListener("scroll",r),this.disposeHandlers.push(()=>{n.removeEventListener("scroll",r)})}this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var Tn=class extends bn{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};var Qe=x(w()),nR=({value:e,onUse:t,...n})=>{var c;let r=H(pg),o=B(),i=k("EditSuggestionTextInput",sg),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(So))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let f;return l.current&&(a(l.current),f=new Tn(l.current),f.on("change",({plainText:d})=>{o(Xe.actions.userInput({text:d,selection:f.getSelection()}))}),f.on("keydown",d=>{o(Xe.actions.registerKeyDown(ic(d))),d.code==="Enter"&&d.shiftKey&&t(f.getText())}),f.on("paste",({pastedText:d,selectionText:y})=>{o(Xe.actions.registerPaste({text:d,selectionText:y}))}),f.on("cut",({selectionText:d})=>{o(Xe.actions.registerCut(d))})),()=>{o(Xe.actions.reset()),f.dispose(),f.deactivate()}},[l]),(0,Tt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,Tt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let f=l.current.value.length;l.current.setSelectionRange(f,f),l.current.focus()},0)},[l]),(0,Qe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Qe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Qe.jsx)(rR,{inputElement:l.current,value:e}),(0,Qe.jsxs)("div",{className:(0,gg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Qe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Qe.jsx)(x_,{}):(0,Qe.jsx)(__,{})]})]})},rR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",sg),r=(0,Tt.useRef)(null),o=Mc(e);return(0,Tt.useEffect)(()=>{Dc(e,o)},[o,e]),(0,Qe.jsx)(oR,{inputElement:e,children:(0,Qe.jsxs)("div",{ref:r,className:(0,gg.default)(n.root,n.agentText),children:[(0,Qe.jsx)(di,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new pi("placeholders")],inputElement:e,boundaryRef:r}),(0,Qe.jsx)("br",{})]})})},oR=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=oo(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,Qe.jsx)("div",{ref:n,children:t})},E_=nR;var Si=x(O());var C_=x(O()),Hc=x(X());var Ye={root:"_root_185k9_1",list:"_list_185k9_2",listWrapper:"_listWrapper_185k9_6",listHorizontal:"_listHorizontal_185k9_10",page:"_page_185k9_19",search:"_search_185k9_25",pageNav:"_pageNav_185k9_33",pageTitle:"_pageTitle_185k9_41",pageBackButton:"_pageBackButton_185k9_48",listHeading:"_listHeading_185k9_62",listItem:"_listItem_185k9_70",listItemContent:"_listItemContent_185k9_79",listItemText:"_listItemText_185k9_97",listItemDescription:"_listItemDescription_185k9_105",truncate:"_truncate_185k9_112",lineClamp:"_lineClamp_185k9_118",listItemTitle:"_listItemTitle_185k9_125",listItemAction:"_listItemAction_185k9_132",listItemPrimaryAction:"_listItemPrimaryAction_185k9_146",listItemSelected:"_listItemSelected_185k9_151",sources:"_sources_185k9_155",sourcesTitle:"_sourcesTitle_185k9_162",source:"_source_185k9_155",icon:"_icon_185k9_177",searchIcon:"_searchIcon_185k9_194",searchInputWrapper:"_searchInputWrapper_185k9_199",searchInput:"_searchInput_185k9_199",select:"_select_185k9_220",selectType:"_selectType_185k9_237",selectWrapper:"_selectWrapper_185k9_241",image:"_image_185k9_271",imageSrc:"_imageSrc_185k9_278",imageSrcHidden:"_imageSrcHidden_185k9_289",imageSrcStatus:"_imageSrcStatus_185k9_293",imageTitle:"_imageTitle_185k9_303",actions:"_actions_185k9_308",actionsWrapper:"_actionsWrapper_185k9_312",actionsBar:"_actionsBar_185k9_318",actionButton:"_actionButton_185k9_327",actionShortcut:"_actionShortcut_185k9_345",actionShortcutFixKerning:"_actionShortcutFixKerning_185k9_352"};var io={};Pe(io,{enUS:()=>iR,nlNL:()=>sR});var iR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},sR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var vr=x(w()),aR=({src:e,title:t})=>{let n=k("CommandPalette",Ye),[r,o]=(0,C_.useState)("loading"),i=H(io);return(0,vr.jsxs)("div",{className:n.image,children:[(0,vr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Hc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,vr.jsx)("span",{className:(0,Hc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,vr.jsx)("span",{className:(0,Hc.default)(n.imageSrc,n.imageSrcStatus),children:(0,vr.jsx)(Xa,{})}),t&&(0,vr.jsx)("span",{className:n.imageTitle,children:t})]})},b_=aR;var T_=x(O()),k_=x(X());var pa=x(w());function hg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Ye);return T_.default.Children.count(e)===0?null:(0,pa.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,pa.jsx)("h4",{className:r.listHeading,children:t}),(0,pa.jsx)("div",{className:(0,k_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ma=x(X());var Bc=x(O()),I_=x(w()),P_=Bc.default.createContext(void 0);function Sr(){let e=Bc.default.useContext(P_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var R_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Bc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,I_.jsx)(P_.Provider,{value:s,children:e})};var Ht=x(w());function yg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,description:s,sources:a,styles:l,...u}){let{selected:c,onChangeOpen:f}=Sr(),d=k("CommandPalette",Ye);function y(v){r(v),e&&f(!1)}return(0,Ht.jsxs)("div",{className:(0,ma.default)(d.listItem,c===i&&d.listItemSelected),children:[(0,Ht.jsx)("button",{type:"button",className:(0,ma.default)("command-palette-list-item",d.listItemAction,d.listItemPrimaryAction),"aria-disabled":u.disabled??!1,onClick:y,...u,children:(0,Ht.jsxs)("div",{className:d.listItemContent,children:[typeof n=="string"?(0,Ht.jsx)("p",{className:(0,ma.default)(d.listItemText,d.truncate,l==null?void 0:l.title),children:n}):n,s&&(0,Ht.jsx)("p",{className:(0,ma.default)(d.listItemDescription,l==null?void 0:l.description,t?d.lineClamp:d.truncate),children:s})]})}),a&&(0,Ht.jsxs)("div",{className:d.sources,children:[(0,Ht.jsx)("span",{className:d.sourcesTitle,children:"Sources"}),a.map(v=>v.url?(0,Ht.jsx)("a",{className:d.source,href:v.url,target:"_blank",title:v.url,rel:"noopener noreferrer",onClick:()=>o&&o(v),children:v.name},v.url):(0,Ht.jsx)("span",{className:d.source,children:v.name},v.name))]})]})}var so=x(w());function vg({children:e,title:t,id:n,onDismiss:r}){let o=H(io),i=k("CommandPalette",Ye),{page:s}=Sr();return s!==n?null:(0,so.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,so.jsxs)("div",{className:i.pageNav,children:[(0,so.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,so.jsx)(bc,{}),o("back")]}),t&&(0,so.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var xr=x(O());var Uc=()=>/Mac/i.test(navigator.platform);var lR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},U=lR;function uR(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function re(e){return Array.isArray(e)?e.map(re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[uR(n)]:re(e[n])}),{}):e}function Sg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function we(e){return Array.isArray(e)?e.map(we):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Sg(n)]:we(e[n])}),{}):e}var cR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},ha=e=>{var t,n,r;return{timezone:((t=e.info.visitorInfo)==null?void 0:t.visitorTimeZone)||Intl.DateTimeFormat().resolvedOptions().timeZone,agentName:((n=e.info.agentInfo)==null?void 0:n.agentNickname)||"",visitorName:((r=e.info.visitorInfo)==null?void 0:r.visitorName)||""}},ga=M("info/setAgentInfo",async(e,t)=>{let{deepdeskAPI:n}=t.extra;if(!e.agentId&&!e.agentNickname)throw new Error("At least provide agentId or agentNickname");let r=await n.client.get("/apis/admin/session/me/",{version:null}),o={};return r.external_id||(o.external_id=e.agentId),r.nickname||(o.nickname=e.agentNickname),!o.external_id&&!o.nickname?re(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),re(r))}),xg=M("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),_g=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),L_=e=>e.info.agentInfo,A_=j({name:"info",initialState:cR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ga.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ga.rejected,t=>{t.fetchState="error"}).addCase(ga.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo={...t.agentInfo,...n.meta.arg,agentId:n.payload.externalId||n.meta.arg.agentId||"",agentNickname:n.payload.nickname||n.meta.arg.agentNickname||""}}).addCase(xg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(_g.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:O_}=A_.actions,N_=A_.reducer;var zc={list:[],fetchState:"idle",isOpen:!1,page:"search"},M_=e=>e.search.isOpen,D_=e=>e.search.page,F_=e=>e.search.list;function j_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var ao=M("search/getAll",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i}=await n.search({profile:o,query:e.query,filters:{type:e.type},params:ha(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),H_=j({name:"search",initialState:zc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=zc.fetchState,e.list=zc.list}},extraReducers:e=>{e.addCase(ao.pending,t=>{t.fetchState="loading"}).addCase(ao.rejected,(t,n)=>{t.fetchState="error",U.error(n.error)}).addCase(ao.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>zc)}}),{resetSearch:Vc,setIsOpen:at,setPage:ze}=H_.actions,B_=H_.reducer;var dR=/(https?:\/\/[^\s]+)/,Kc=e=>e.split(" ").find(t=>dR.test(t));var wg=x(X());var Wc=x(w()),fR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Ye);return(0,Wc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,wg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Wc.jsx)("span",{className:(0,wg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},yi=fR;var kn=x(w()),pR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Ye),a=H(io),{selected:l,setSelected:u}=Sr(),c=i[l],f=c&&typeof c.text=="string"&&Kc(c.text),d=(0,xr.useRef)(null);function y(S){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,E=0;S==="down"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C===_.length-1?0:C+1):S==="up"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C?C-1:_.length-1):u(0);let b=_[E];b&&typeof E=="number"&&(u(E),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function v(){if(!d.current)return;let S=d.current.querySelectorAll(".command-palette-list-item"),_=0;S.forEach((E,b)=>{b===l&&(_=b)});let C=S[_];C&&C.click()}let h=()=>{f&&window.open(f,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},p=(0,xr.useCallback)(S=>{if(S.key==="Enter"&&S.altKey&&f){h();return}if(S.key==="Enter"&&S.shiftKey){m();return}if(S.key==="ArrowDown"){S.preventDefault(),S.stopPropagation(),y("down");return}if(S.key==="ArrowUp"){S.preventDefault(),S.stopPropagation(),y("up");return}S.key==="Enter"&&l!==-1&&(S.preventDefault(),S.stopPropagation(),v())},[l]);return(0,xr.useEffect)(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]),(0,kn.jsxs)("div",{className:s.actions,children:[(0,kn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,kn.jsxs)("div",{className:s.actionsBar,children:[f&&(0,kn.jsx)(yi,{onClick:h,shortKeys:[Uc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,kn.jsxs)(xr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,kn.jsx)(yi,{onClick:m,shortKeys:[8679,8629],children:n}),(0,kn.jsx)(yi,{onClick:g,shortKeys:[8629],children:t})]})]})]})},z_=pR;var V_=x(O());var ya=x(w()),vi=()=>(0,ya.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,ya.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,ya.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})]});var Bt=x(w());function mR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Ye);return(0,Bt.jsxs)("div",{className:l.search,children:[(0,Bt.jsx)("div",{className:l.searchIcon,children:(0,Bt.jsx)(vi,{})}),(0,Bt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Bt.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,Bt.jsx)("div",{className:l.selectWrapper,children:(0,Bt.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:u=>t(u.target.value===r?void 0:u.target.value),value:s||r,children:[r&&(0,Bt.jsx)("option",{children:r}),o.map(u=>(0,Bt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var K_=(0,V_.forwardRef)(mR);var va=x(w());function lo({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:f,search:d}){let[y,v]=(0,Si.useState)(0),h=(0,Si.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var p;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(p=h.current)==null||p.focus();return}if(d.length>0){i("");return}a(!1)};return(0,Si.useEffect)(()=>{v(0)},[d,r]),(0,va.jsx)(ci,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:m,onClose:g,children:(0,va.jsxs)(R_,{selected:y,setSelected:v,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,va.jsx)(K_,{ref:h,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}lo.Page=vg;lo.List=hg;lo.Image=b_;lo.ListItem=yg;lo.ActionsBar=z_;lo.Button=yi;var te=lo;var Fe=x(w()),gR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",$x),l=B(),u=H(Vm),c=I(v=>v.overlayInput.text);(0,Eg.useEffect)(()=>{e&&(l(Xe.actions.reset()),l(Xe.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Xe.actions.commitSuggestion()))},[e]);let f=v=>{v.preventDefault(),d(c)},d=v=>{l(lc(v)),t(v)},y=v=>h=>{c!==s?window.confirm(u("warning"))&&v(h):v(h)};return(0,Eg.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,Fe.jsxs)("div",{className:a.root,children:[(0,Fe.jsxs)("div",{className:a.content,children:[e.title&&(0,Fe.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,Fe.jsx)(Md,{labels:e.searchKeywords}),(0,Fe.jsx)(E_,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:f,children:[(0,Fe.jsxs)("div",{children:[(0,Fe.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&y(i),children:(0,Fe.jsx)(bc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&y(o),children:(0,Fe.jsx)(n_,{})})]}),(0,Fe.jsxs)("div",{className:a.primaryButtons,children:[(0,Fe.jsx)(te.Button,{onClick:y(n),shortKeys:["esc"],children:u("dismiss")}),(0,Fe.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},$c=gR;var hR=["{amount}"," {amount}","{date}","{email}","{iban}","{name}","{postal_code}","{street}","{tarif}","{usage}","{3_digits}","{4_digits}","{5_digits}","{6_digits}","{7_digits}","{8_digits}","{9_digits}","{10_digits}"],yR=new RegExp(hR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function W_(e,t){let n=e.split(yR),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let f=a.charAt(0),d=0;do u=f?t.indexOf(f,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function $_(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var G_={suggestions:[],fetchState:"idle",isInitialRequest:null},q_={default:G_},X_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},Q_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Y_=e=>{let t=Object.keys(e.textSuggestions).map(n=>{var r;return(r=e.textSuggestions[n])==null?void 0:r.fetchState});return t.length===0?!0:t.every(n=>n!=="done")},xi=e=>e.textSuggestions,Z_=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},qc=fe("textSuggestions/refresh"),Pn=M("textSuggestions/recommendations",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=li(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,ha(r),e);if(e==="default"){let c=s?l.filter(Z_(a)):l;t.dispatch(nn(c.slice(0,i)))}return l}),Sa=M("textSuggestions/autocompletions",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,deanonymize:s,inlineSuggestions:a}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getAutocompleteSuggestions(o,{...ha(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(Z_(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?W_(c.text,e):c.text}))),l=$_(l,i),t.dispatch(nn(l)),l}),J_=j({name:"textSuggestions",initialState:q_,reducers:{setTextSuggestions:{reducer(e,t){let{contentType:n}=t.payload;e[n].fetchState="done",e[n].suggestions=t.payload.suggestions},prepare(e,t){return{payload:{contentType:e,suggestions:t}}}},setSuggestionState(e,t){return t.payload}},extraReducers:e=>{e.addCase(Pn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||G_;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Pn.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Pn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Sa.pending,t=>{t.default.fetchState="loading"}).addCase(Sa.rejected,t=>{t.default.fetchState="error"}).addCase(Sa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>q_)}}),{setTextSuggestions:ew,setSuggestionState:tw}=J_.actions,nw=J_.reducer;var rw={contentType:null,suggestion:null},ow=e=>e.activeSuggestion.suggestion,iw=e=>e.activeSuggestion.contentType,sw=j({name:"activeSuggestion",initialState:rw,reducers:{setActiveSuggestion(e,t){let{contentType:n,suggestion:r}=t.payload;e.contentType=n,e.suggestion=r},resetActiveSuggestion(e){e.contentType=null,e.suggestion=null}},extraReducers:e=>{e.addCase(J,()=>rw)}}),{setActiveSuggestion:Rn,resetActiveSuggestion:Cg}=sw.actions,aw=sw.reducer;var bg={};Pe(bg,{enUS:()=>vR,nlNL:()=>SR});var vR={warning:[{type:0,value:"Are you sure you want to discard the message?"}],editContentLabel:[{type:0,value:"Edit and view suggestion"}],overlayLabel:[{type:0,value:"Close dialog"}]},SR={warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}],editContentLabel:[{type:0,value:"Bewerk en bekijk suggestie"}],overlayLabel:[{type:0,value:"Sluit"}]};var xR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Gc=({ui:e})=>e.overlayCollapsed;var lw=j({name:"ui",initialState:xR,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputHasFocus(e,t){e.overlayCollapsedUserOverwrite!==!0&&(t.payload===!0&&(e.overlayCollapsed=!1),e.inputHasFocus=t.payload)},setOverlayCollapsed(e,t){t.payload.collapse===!1&&(e.openOverlayWhenTyping=!1),!(t.payload.skipWhenInputFocus&&e.inputHasFocus)&&(e.overlayCollapsed=t.payload.collapse)},setOpenOverlayWhenTyping(e,t){e.openOverlayWhenTyping=t.payload},setOverlayCollapsedUserOverwrite(e,t){e.overlayCollapsedUserOverwrite=t.payload,e.overlayCollapsed=t.payload}}}),{setShowTabHint:xa,setInputHasFocus:_i,setOverlayCollapsed:_r,setOpenOverlayWhenTyping:uw,setOverlayCollapsedUserOverwrite:cw}=lw.actions,dw=lw.reducer;var _a=x(O()),pw=x(w()),fw=_a.default.createContext(null),wi=({broadcastEvents:e,children:t})=>{let n=_a.default.useMemo(()=>e,[]);return(0,pw.jsx)(fw.Provider,{value:n,children:t})},kt=()=>{let e=(0,_a.useContext)(fw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var _R={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Ut=e=>e.auth.isLoggedIn,mw=e=>e.auth.loginFetchState,gw=e=>e.auth.verifyFetchState,hw=e=>e.auth.showLoginOverlay,wr=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),yw=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),wa=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),vw=j({name:"auth",initialState:_R,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(wr.pending,t=>{t.loginFetchState="loading"}),e.addCase(wr.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(wr.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(wa.pending,t=>{t.verifyFetchState="loading"}),e.addCase(wa.rejected,t=>{t.verifyFetchState="error"}),e.addCase(wa.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Ei,setShowLoginOverlay:Sw}=vw.actions,xw=vw.reducer;var Tg="SetActiveSuggestion",Ci="ShowLoginOverlay",kg="UserLoggedIn",wR="UserLoggedOut",In="ApplySuggestion",Pg="ApplyImageSuggestion",ER="ShowCommandPalette",CR=e=>({[Tg]:t=>{e.dispatch(tw(t.state)),e.dispatch(Rn({contentType:t.contentType,suggestion:t.suggestion}))},[ER]:t=>{e.dispatch(at(t.isOpen)),t.page&&e.dispatch(ze(t.page))},[Ci]:t=>{e.dispatch(Sw(t))},[kg]:()=>{e.dispatch(wr())},[wR]:()=>{e.dispatch(wr())},[Pg]:t=>{e.dispatch(cc({suggestion:t.suggestion}))},[In]:t=>{e.dispatch(Dt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(hr())}}),_w=CR;var Rg=x(w()),bR=()=>{var v;let[e,t]=(0,ww.useState)(!1),n=I(ow),r=I(iw),o=I(xi),i=B(),s=kt(),a=H(bg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(Cg()),i(_i(!0)),i(Xe.actions.reset())},c=(h,g)=>{i(Cg()),i(_i(!0)),s.send(In,{text:h,suggestion:{...g,source:`${g.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let f=(v=o[r])==null?void 0:v.suggestions.indexOf(n),d=f===0||f===null?void 0:()=>i(Rn({contentType:r,suggestion:o[r].suggestions[f-1]})),y=f===o[r].suggestions.length-1||f===null?void 0:()=>i(Rn({contentType:r,suggestion:o[r].suggestions[f+1]}));return(0,Rg.jsx)(ci,{autoFocus:!0,isOpen:f!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Rg.jsx)($c,{onTouched:t,onDismiss:u,onUse:h=>c(h,n),suggestion:n,onNext:y,onPrevious:d})})},Ew=bR;var Xc=x(X()),zt=x(O());var bw=x(X());var Cw={root:"_root_1ukx5_1"};var Tw=x(w()),TR=({className:e,value:t,...n})=>{let r=k("TextInput",Cw);return(0,Tw.jsx)("input",{className:(0,bw.default)(e,r.root),type:"text",value:t,...n})},Ea=TR;var Ig={};Pe(Ig,{enUS:()=>kR,nlNL:()=>PR});var kR={back:[{type:0,value:"Back"}],promptTitle:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Paste the code from your email"}],verifyCodeBody:[{type:0,value:"Copy the code from the email you just received and paste it here."}],verifyCodeInputPlaceholder:[{type:0,value:"Paste link or code here"}],verifyCodeSubmitLabel:[{type:0,value:"Sign in"}],verifyCodeError:[{type:0,value:"Sign in failed. The code is probably no longer valid. Please "},{type:8,value:"login",children:[{type:0,value:"request new code"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Have a code sent to your email"}],requestCodeBody:[{type:0,value:"Enter your email and request a code. If you are an existing "},{type:1,value:"productName"},{type:0,value:" user you will receive an email with a code. If you are a new user you will receive an email asking to request access to "},{type:1,value:"productName"},{type:0,value:" first."}],requestCodeInputPlaceholder:[{type:0,value:"Enter your email"}],requestCodeSubmitLabel:[{type:0,value:"Request code"}]},PR={back:[{type:0,value:"Terug"}],promptTitle:[{type:0,value:"Login bij "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Plak de code uit je email"}],verifyCodeBody:[{type:0,value:"Kopieer de code uit de email en plak deze hier."}],verifyCodeInputPlaceholder:[{type:0,value:"Plak hier de code"}],verifyCodeSubmitLabel:[{type:0,value:"Inloggen"}],verifyCodeError:[{type:0,value:"Inloggen is niet gelukt. De code is waarschijnlijk niet meer geldig. "},{type:8,value:"login",children:[{type:0,value:"Vraag een nieuwe code aan"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Verstuur een login code naar je email"}],requestCodeBody:[{type:0,value:"Voer je e-mailadres in en krijg een login code. Als je een bestaande "},{type:1,value:"productName"},{type:0,value:" gebruiker bent krijg je een email met een code. Als je een nieuwe gebruiker bent wordt er een email verstuurd met een toegangsverzoek voor "},{type:1,value:"productName"},{type:0,value:"."}],requestCodeInputPlaceholder:[{type:0,value:"Typ hier je e-mailadres"}],requestCodeSubmitLabel:[{type:0,value:"Code aanvragen"}]};var kw={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=x(w());var RR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},IR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=H(Ig),s=k("LoginTokenDialog",kw),a=I(gw),l=B(),u=D("productName"),[c,f]=(0,zt.useState)(e||""),[d,y]=(0,zt.useState)(0),[v,h]=(0,zt.useState)(""),g=(0,zt.useCallback)(async _=>{_.preventDefault(),l(yw({email:c})),y(1)},[n,c]),m=()=>{h(""),y(0)},p=(0,zt.useCallback)(async _=>{_.preventDefault();let C=RR(_.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:S}));return}l(wa({token:C}))},[n]),S=(0,zt.useMemo)(()=>_=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:_},"back-button"),[]);return(0,zt.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,he.jsx)(ci,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,he.jsxs)("div",{className:s.root,children:[(0,he.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,he.jsxs)("form",{onSubmit:g,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,he.jsx)(Ea,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>f(_.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,Xc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:p,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Ea,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,he.jsx)("div",{className:s.errorMessage,children:v}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Xc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Xc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Pw=IR;var Iw=x(w()),LR=()=>{let e=I(hw),t=I(L_),n=D("adminUrl"),r=kt(),o=()=>r.send(Ci,!1),i=()=>{r.send(Ci,!1),r.send(kg)};return(0,Iw.jsx)(Pw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Rw=LR;var n1=x(Og()),Je=x(O());var XR={data:null,fetchState:"idle"},Nw=e=>e.contentTypes.data,Ca=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),QR=j({name:"contentTypes",initialState:XR,reducers:{},extraReducers:e=>{e.addCase(Ca.pending,t=>{t.fetchState="loading"}).addCase(Ca.rejected,t=>{t.fetchState="error"}).addCase(Ca.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Mw=QR.reducer;function ba(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove()}var Dw=x(O());function Fw(e,t){(0,Dw.useEffect)(()=>{let n=r=>{var o;((o=navigator==null?void 0:navigator.platform)!=null&&o.toLowerCase().includes("mac")?r.metaKey:r.ctrlKey)&&r.key===e&&(r.preventDefault(),r.stopPropagation(),t())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[])}var Ta=x(O());var jw={data:null,fetchState:"idle"},Qc=e=>{var i;let t=[],{visitorName:n}=e.info.visitorInfo??{},{agentName:r,agentNickname:o}=e.info.agentInfo??{};return r&&r!==n&&t.push(r),o&&o!==n&&t.push(o),((i=e.entities.data)==null?void 0:i.filter(s=>!t.includes(s.text)))??null},Vt=M("entities/getEntities",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=await o();return i.length===0?Promise.resolve([]):n.getEntities(i)}),YR=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),ZR=j({name:"entities",initialState:jw,reducers:{},extraReducers:e=>{e.addCase(Vt.pending,t=>{t.fetchState="loading"}).addCase(Vt.rejected,t=>{t.fetchState="error"}).addCase(Vt.fulfilled,(t,n)=>{t.fetchState="done",t.data=YR(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>jw)}}),Hw=ZR.reducer;var Ng={};Pe(Ng,{enUS:()=>JR,nlNL:()=>eI});var JR={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},eI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var Bw={root:"_root_17kae_1",empty:"_empty_17kae_5"};var uo=x(w()),tI=({onCopy:e,onUse:t})=>{let n=(0,Ta.useRef)(null),r=k("EntitiesList",Bw),o=H(Ng),i=I(Qc),s=B();return(0,Ta.useEffect)(()=>{s(Vt())},[]),(0,Ta.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,uo.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,uo.jsx)(te.ActionsBar,{primaryLabel:o("copy"),secondaryLabel:o("use"),onPrimary:(a,l)=>e(i[l]),onSecondary:(a,l)=>t(i[l]),list:i.map(a=>({text:a.text,type:a.label,primaryAction:"copy",secondaryAction:"use"})),children:(0,uo.jsx)(te.List,{children:i.map((a,l)=>(0,uo.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,uo.jsx)("p",{className:r.empty,children:o("noResults")})]})},Uw=tI;var Kt=x(O());var zw={data:null,fetchState:"idle"},Vw=e=>e.summary.data,Kw=e=>e.summary.fetchState==="error",Ln=M("summary/getSummary",async(e,t)=>{let n=t.getState().profile.data;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:r,dynamicThunkObject:o}=t.extra;if(!o.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let i=o.conversationQuery,s=await i();return s.length===0?Promise.reject(new Error("No messages are included")):{summary:await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel})}}),nI=j({name:"summary",initialState:zw,reducers:{},extraReducers:e=>{e.addCase(Ln.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Ln.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Ln.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>zw)}}),Ww=nI.reducer;var Mg={};Pe(Mg,{enUS:()=>rI,nlNL:()=>oI});var rI={copy:[{type:0,value:"Copy"}],error:[{type:0,value:"Could not generate a summary"}],loading:[{type:0,value:"Generating summary, this may take a few moments."}]},oI={copy:[{type:0,value:"Kopieer"}],error:[{type:0,value:"Kon helaas geen samenvatting genereren."}],loading:[{type:0,value:"Samenvatting wordt gemaakt, dit kan even duren."}]};var $w={root:"_root_6ahh3_1",actions:"_actions_6ahh3_5",main:"_main_6ahh3_11",textInput:"_textInput_6ahh3_15",loading:"_loading_6ahh3_34",error:"_error_6ahh3_38"};var An=x(w()),iI=({onCopy:e})=>{let t=(0,Kt.useRef)(null),n=k("SummaryForm",$w),[r,o]=(0,Kt.useState)(""),i=H(Mg),s=I(Vw),a=I(Kw),l=B(),u=()=>{l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,Kt.useEffect)(()=>{l(Ln())},[]),(0,Kt.useEffect)(()=>{o(s||"")},[s]),(0,Kt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Kt.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,An.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,An.jsx)("p",{className:n.error,children:i("error")}):(0,An.jsxs)(Kt.Fragment,{children:[(0,An.jsx)("div",{className:n.main,children:(0,An.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:f=>o(f.target.value)})}),(0,An.jsx)("div",{className:n.actions,children:(0,An.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},qw=iI;var Dg={};Pe(Dg,{enUS:()=>sI,nlNL:()=>aI});var sI={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},aI={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Er=x(O());var Fg={};Pe(Fg,{enUS:()=>lI,nlNL:()=>uI});var lI={use:[{type:0,value:"Use"}],loading:[{type:0,value:"Loading..."}],error:[{type:0,value:"Something went wrong, please try again later."}],anotherQuestion:[{type:0,value:"Send a message..."}],reset:[{type:0,value:"Reset conversation"}]},uI={use:[{type:0,value:"Gebruik"}],loading:[{type:0,value:"Laden..."}],error:[{type:0,value:"Er ging iets mis, probeer het later opnieuw."}],anotherQuestion:[{type:0,value:"Stuur een bericht..."}],reset:[{type:0,value:"Reset gesprek"}]};var Gw={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var jg={data:[],fetchState:"idle"},Xw=e=>{var t;return(t=e.answer)==null?void 0:t.data},Qw=e=>e.answer.fetchState,Ti=fe("answer/resetKnowledgeSearch"),bi=M("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeAssist({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),cI=j({name:"answer",initialState:jg,reducers:{},extraReducers:e=>{e.addCase(bi.pending,t=>{t.fetchState="loading"}).addCase(bi.rejected,t=>{t.fetchState="error"}).addCase(bi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>jg).addCase(Ti,()=>jg)}}),Yw=cI.reducer;var ka=x(w()),Zw=()=>(0,ka.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,ka.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,ka.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var Ze=x(w()),dI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Er.default.useState(""),{setSelected:s}=Sr(),a=(0,Er.useRef)(null),l=k("EntitiesList",Gw),u=H(Fg),c=B(),f=I(Xw),d=I(Qw),y=async h=>{h.preventDefault(),h.stopPropagation(),o!==""&&c(bi({question:o,promptInstruction:r}))},v=(h,g)=>{c(it({name:"knowledge assist source viewed",data:{question:g,sourceViewed:h.url||h.name},options:{includeConversationData:!0}}))};return(0,Er.useEffect)(()=>{var h;n&&d==="idle"?c(bi({question:n,promptInstruction:r})):(h=a.current)==null||h.focus()},[a,d]),(0,Er.useEffect)(()=>{d==="done"&&(c(it({name:"knowledge assist question answered",data:{question:o||n,sources:f[f.length-1].answer.sources,answer:f[f.length-1].answer.answer,isFollowUpQuestion:f.length>1},options:{includeConversationData:!0}})),s(f.length-1),i(""))},[d,f]),(0,Er.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,f]),(0,Ze.jsxs)("div",{className:l.root,children:[f.length>0&&(0,Ze.jsx)("div",{className:l.alignRight,children:(0,Ze.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ze.jsxs)(te.ActionsBar,{list:f.map(({answer:h})=>({text:h.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:h=>e(h.text),children:[f.map(({question:h,answer:g},m)=>(0,Ze.jsx)(te.List,{children:(0,Ze.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:g.answer,closeOnSelect:!0,onClick:()=>e(g.answer),onSourceClick:p=>v(p,h),sources:g.sources,styles:{title:l.question,description:l.answer},children:h})},`${g.answer}_${m}`)),d==="loading"&&(0,Ze.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ze.jsx)("p",{className:l.status,children:u("error")}),(0,Ze.jsxs)("form",{className:l.form,onSubmit:y,children:[(0,Ze.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:h=>{s(-1),i(h.target.value)}}),(0,Ze.jsx)("button",{type:"submit",className:l.submit,children:(0,Ze.jsx)(Zw,{})})]})]})]})},Jw=dI;var fI={data:null,fetchState:"idle"},ki=e=>e.profile.data,Yc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Pa=M("profile/getProfile",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)}),pI=j({name:"profile",initialState:fI,reducers:{},extraReducers:e=>{e.addCase(Pa.pending,t=>{t.fetchState="loading"}).addCase(Pa.rejected,t=>{t.fetchState="error"}).addCase(Pa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),e1=pI.reducer;var Ee=x(w()),mI=200,gI=5,hI=4,yI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),t1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),vI=()=>{let e=B(),t=kt(),n=H(Dg),[r,o]=(0,Je.useState)(!1),[i,s]=(0,Je.useState)(""),a=I(D_),l=I(ki),[u,c]=(0,Je.useState)(null),[f,d]=(0,Je.useState)([]),[y,v]=(0,Je.useState)(),h=I(Ut),g=D("showSearch"),m=D("showEntitiesCommand"),p=D("showSummaryCommand"),S=D("showKnowledgeSearch"),_=D("showImageSearch"),C=D("searchTriggerKey"),E=I(Nw),b=I(F_),R=I(M_),P=L=>un(b.filter(W=>W.type===L.toUpperCase()),L),N=[{value:"PERSONAL",label:n("personalSuggestions"),list:P("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:P("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:P("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:P("IMAGE"),listOrientation:"horizontal",shouldShow:_}].filter(L=>L.shouldShow),G=[{label:n("entitiesClipboard"),onClick:()=>e(ze("entities")),shouldShow:m&&t1(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(ze("summary")),shouldShow:p&&t1(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(ze("knowledgeAssist")),shouldShow:S}].filter(L=>L.shouldShow),V=(E==null?void 0:E.map(L=>({value:L.code.toUpperCase(),label:`${L.name}s`,list:P(L.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],He=(0,Je.useCallback)((0,n1.default)((L,W)=>{e(ao({query:L,type:W,tags:["search-overlay"]}))},mI),[]),ln=yI([...V,...N]),qt=(0,Je.useCallback)((L,W)=>{if(!W)return;let It=[...N,...V].find(({value:Bn})=>Bn===W);It&&(e(ze("edit")),c({...L,searchTerm:void 0}),d(It.list))},[e,u,V]),po=(0,Je.useCallback)((L,W)=>{switch(W.type){case"IMAGE":t.send(Pg,{suggestion:W});break;default:t.send(In,{text:L,suggestion:W})}e(at(!1))},[e]),ji=L=>{ba(L.text),e(it({name:"entity copied",data:{entity:L,type:"copy"}})),e(at(!1))},Rr=L=>{t.send(In,{text:L,suggestion:{source:"knowledge-assist",text:L}}),e(it({name:"answer used",data:{originalText:L},options:{includeConversationData:!0}})),s(""),e(ze("search")),e(Ti()),e(at(!1))},Ua=L=>{ba(L),e(at(!1))},za=L=>{t.send(In,{text:L.text,suggestion:{source:"entity",text:L.text}}),e(at(!1))},Hi=u===null||f.indexOf(u)-1<0?void 0:()=>c(f[f.indexOf(u)-1]),Bi=u===null||f.indexOf(u)===f.length-1?void 0:()=>c(f[f.indexOf(u)+1]);function un(L,W){return L.slice(0,y?10:W.toLowerCase()==="image"?hI:gI)}function Ui(L,W,It){return W.reduce((Bn,cn)=>It&&y===It?cn.length+Bn:un(cn,It).length+Bn,L)}function Ir(L){return W=>{r?window.confirm(n("warning"))&&(L(W),o(!1)):L(W)}}return(0,Je.useEffect)(()=>{i?He(i,y):e(Vc())},[i,y]),(0,Je.useEffect)(()=>{a==="search"&&e(Ti())},[a]),(0,Je.useEffect)(()=>{h&&e(Ca())},[h]),Fw(C,()=>e(at(!0))),!g||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Ir(L=>e(at(L))),onChangeType:L=>v(L),onChangePage:Ir(L=>e(ze(L))),selectedType:y,search:i,page:a,isOpen:R,types:[...V,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...G.map(L=>({text:L.label,type:"command"})),...ln.map(L=>({text:L.text||L.url||L.message,type:L.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:L},W)=>po(L,ln[W]),onSecondary:(L,W)=>{qt(ln[W-G.length],ln[W-G.length].type)},children:[G.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:G.map((L,W)=>(0,Ee.jsx)(te.ListItem,{index:Ui(W,[],"commands"),closeOnSelect:!1,onClick:L.onClick,children:L.label},L.label))}),[...V,...N].map(({value:L,label:W,list:It,lineClamp:Bn,listOrientation:cn},zi)=>(0,Ee.jsx)(te.List,{heading:W,orientation:cn==="horizontal"?"horizontal":"vertical",children:un(It,L).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Ui(G.length+dt,[...V,...N].slice(0,zi).map(({list:Lr})=>Lr),L),closeOnSelect:!1,lineClamp:Bn,onClick:()=>po(ct.text,ct),description:L!=="IMAGE"?ct.title&&ct.text:void 0,children:L==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},L))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Ir(()=>{e(ze("search")),c(null)}),children:u&&(0,Ee.jsx)($c,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(ze("search")),c(null),d([])},onNext:Bi,onPrevious:Hi,onUse:L=>{e(ze("search")),po(L,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(at(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Ir(()=>{e(ze("search"))}),children:(0,Ee.jsx)(Uw,{onUse:za,onCopy:ji})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Ir(()=>{e(ze("search"))}),children:(0,Ee.jsx)(qw,{onCopy:Ua})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Ir(()=>{e(Ti()),e(ze("search"))}),children:(0,Ee.jsx)(Jw,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Rr,onResetQuestion:()=>{e(Ti()),s("")}})})]})},r1=vI;var Pi=x(w()),SI=()=>{let e=D("showSearch"),t=D("isEmbedded");return(0,Pi.jsxs)(o1.Fragment,{children:[e&&(0,Pi.jsx)(r1,{}),(0,Pi.jsx)(Ew,{}),t&&(0,Pi.jsx)(Rw,{})]})},i1=SI;function Ri(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input.userCommitted;return i.start!==i.end?!1:i.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(i.end))||r&&new RegExp(r).test(o.substring(0,i.end))?!0:n===!1&&r===!1:!1}var Zc=x(O());var Li=x(O());var s1=x(O());function a1(e,t,n){(0,s1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var xI=/[.*+?^${}()|[\]\\]/g,_I=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function wI(e){return e.replace(xI,"\\$&")}function EI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function CI(e){return e.search(_I)}function l1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${wI(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function u1(e){return e.replace(So,'<mark data-type="placeholder">$1</mark>')}function Ii(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function bI(e,t){return e.split("").map((s,a)=>({char:s,index:a})).filter(({char:s,index:a})=>/\s/.test(s)&&a<=t).map(({index:s})=>s).reverse()[0]}function Hg(e,t,n={}){if(t){let r=EI(t.toLowerCase(),e.toLowerCase()),o=Ii(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=CI(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(ly).length>3||t.length>30?bI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ii(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var c1={badge:"_badge_1syy2_1",formattedText:"_formattedText_1syy2_5"};var Bg=x(w()),kI=["search","personal-collection-search","search-autocomplete"];function PI(e,t,n,r={}){let o="";return kI.includes(t)?o=l1(Hg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Hg(e,n,r),r.placeholders===!0&&(o=u1(o)),o}var RI=()=>{},II=({index:e,selected:t,suggestion:n})=>{let r=D("inlineSuggestions"),o=I(li),i=B(),s=k("TextSuggestion",c1),a=(0,Li.useRef)(null);(0,Li.useEffect)(()=>{let u=setTimeout(()=>{i(jx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),a1(a,"click",()=>{i(Zr(e)),i(Dt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Li.useMemo)(()=>PI(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"&&!r?null:(0,Bg.jsx)(oe,{ref:a,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:RI,children:(0,Bg.jsx)(di,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},d1=II;var Ug=x(w()),LI=({suggestions:e,selectedIndex:t,reverse:n})=>{let r=(0,Zc.useMemo)(()=>{let o=e.map((i,s)=>(0,Ug.jsx)(d1,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]);return(0,Ug.jsx)(Zc.Fragment,{children:r})},Jc=LI;var f1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var Ra=x(w()),AI=({textSuggestions:e,selectedIndex:t})=>{let n=k("InlineSuggestionsOverlay",f1),r=I(Ri),o=B(),i=I(Ut),s=I(ai),a=I(Gc),l=D("showTextSuggestions");return gi(()=>{o(_r({collapse:!0,skipWhenInputFocus:!0}))}),a||!r||!l||e.length===0||i!==!0||s===!1?null:(0,Ra.jsx)("div",{className:n.root,"data-variant":"inline",children:(0,Ra.jsx)("div",{className:n.paper,children:(0,Ra.jsx)(ht,{children:(0,Ra.jsx)(Jc,{suggestions:e,selectedIndex:t})})})})},OI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),p1=xn(OI)(AI);var td=x(X()),Ai=x(O());var m1=x(O());function g1(e,t){let[n,r]=(0,m1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return U.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){U.error(s)}}]}var y1=x(X()),On=x(O());var zg={};Pe(zg,{enUS:()=>NI,nlNL:()=>MI});var NI={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Sign in"}]},{type:0,value:" to enable "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze for "},{type:8,value:"min",children:[{type:0,value:"10 minutes"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 hour"}]},{type:0,value:" or "},{type:8,value:"day",children:[{type:0,value:"1 day"}]}]},MI={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Log in"}]},{type:0,value:" bij "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze voor "},{type:8,value:"min",children:[{type:0,value:"10 minuten"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 uur"}]},{type:0,value:" of "},{type:8,value:"day",children:[{type:0,value:"1 dag"}]}]};var h1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var Cr=x(w()),Vg=(e,t,n)=>r=>(0,Cr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),DI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=H(zg),i=kt(),s=k("Login",h1),a=D("productName"),l=(0,On.useCallback)(h=>{h.preventDefault(),r&&r(parseInt(h.target.value,10))},[]),u=(0,On.useCallback)(h=>{h.preventDefault(),i.send(Ci,!0)},[t]),c=(0,On.useMemo)(()=>h=>(0,Cr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:h},"login"),[t]),f=(0,On.useCallback)(h=>(0,Cr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:h},"prompt"),[u]),{min:d,hour:y,day:v}=(0,On.useMemo)(()=>({min:Vg(s,60*10,l),hour:Vg(s,60*60,l),day:Vg(s,60*60*12,l)}),[]);return(0,Cr.jsxs)("div",{className:(0,y1.default)(e,s.root),children:[o("loginPlease",{login:n?f:c,productName:a}),r&&(0,Cr.jsxs)(On.Fragment,{children:[(0,Cr.jsx)("br",{}),o("snooze",{min:d,hour:y,day:v})]})]})},ed=DI;var v1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Ia=x(w()),FI=({title:e})=>{let t=k("SearchTrigger",v1),n=B();return(0,Ia.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(at(!0)),children:[(0,Ia.jsx)(vi,{}),(0,Ia.jsx)("span",{className:t.text,children:e})]})},S1=FI;var Kg={};Pe(Kg,{enUS:()=>jI,nlNL:()=>HI});var jI={arrowHint:[{type:0,value:"Tip: use arrow keys to navigate suggestions"}],searchHintWindows:[{type:0,value:"Press CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],searchHintMac:[{type:0,value:"Press CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Close"}],search:[{type:0,value:"Search"}]},HI={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var x1={root:"_root_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ue=x(w()),BI=({textSuggestions:e,selectedIndex:t})=>{let n=k("SuggestionsOverlay",x1),r=H(Kg),o=I(Ri),i=Ox(),s=B(),a=(0,Ai.useRef)(null),l=D("searchTriggerKey"),u=D("productName"),c=I(Gc),f=I(Ut),d=I(ai),[y,v]=(0,Ai.useState)(null),h=D("showSearch"),g=D("showTextSuggestions"),m=D("adminUrl"),p=D("isEmbedded"),[S,_]=g1("dd-snooze-until-ms",0),C=c||S>Date.now(),E=e.filter(P=>P.source!=="gpt").length,b=()=>{C&&_(0),s(cw(!C))},R=P=>{let N=Date.now()+P*1e3;_(N),U.info(`Snooze until: ${new Date(N)}`),s(_r({collapse:!0}))};return(0,Ai.useEffect)(()=>{E===0&&v(null)},[e,E]),gi(()=>{s(_r({collapse:!0,skipWhenInputFocus:!0}))}),f===null||d===!1?null:f===!1?(0,ue.jsxs)("div",{ref:a,className:(0,td.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:n.triggersRight,children:(0,ue.jsx)(Nr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Nr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),(0,ue.jsx)("div",{className:n.collapsible,children:(0,ue.jsx)(ed,{loginUrl:m,isEmbedded:p,onSnooze:R})})]}):!i||!o?null:(0,ue.jsxs)("div",{ref:a,className:(0,td.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:h&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(r(Uc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:l.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,ue.jsx)(S1,{title:r("search")})})}),(0,ue.jsxs)("div",{className:n.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,td.default)(!y&&n.hintsHidden,n.hints),children:y}),(0,ue.jsx)(Nr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Nr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),E>0&&g&&(0,ue.jsx)("div",{className:n.collapsible,onFocus:()=>{},children:(0,ue.jsx)(ht,{children:(0,ue.jsx)(Jc,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},UI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),_1=xn(UI)(BI);var La=x(w()),zI=({children:e})=>{let n=D("locale").replace("-","");return(0,La.jsx)(Ym.Provider,{value:n,children:e})},VI=({store:e,customStyles:t={},children:n})=>(0,La.jsx)(Am,{store:e,children:(0,La.jsx)(zI,{children:(0,La.jsx)(Ki.Provider,{value:t,children:n})})}),Oi=VI;var md=x(X());var Dn=x(O());var w1=x(O()),KI=["div","span","mark","strong","b","i","u","em"];function Wg(e,t,n=0){var i;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(i=r.props)==null?void 0:i.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(KI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,w1.cloneElement)(r,{children:Wg(s,t,n+1)})]}return[...e,...t]}function br(e){return e.tagName.toLowerCase()==="textarea"}var E1={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var A1=x(X());var cd=x(O());function C1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function nd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function b1(e){return e!=null}var qg=x(X()),Pt=x(O());var rd=x(O()),WI=["bottom","height","left","right","top","width"],$I=(e={},t={})=>WI.some(n=>e[n]!==t[n]),Nn=new Map,T1,k1=()=>{let e=[],t=[];Nn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();$I(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Nn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),T1=window.requestAnimationFrame(k1)};function qI(e,t){return{observe(){let n=Nn.size===0;if(Nn.has(e)){let r=Nn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Nn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&k1()},unobserve(){let n=Nn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Nn.delete(e),Nn.size||cancelAnimationFrame(T1)}}}}function $g(e){let[t,n]=(0,rd.useState)(null);return(0,rd.useLayoutEffect)(()=>{if(!e.current)return;let r=qI(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ni=x(O()),R1=x(gu());var P1={root:"_root_1jq08_1"};var I1=({children:e})=>{let[t,n]=(0,Ni.useState)(null),r=(0,Ni.useContext)(Ki);return(0,Ni.useLayoutEffect)(()=>{let o=document.createElement("div");return ro(o),o.classList.add(P1.root),r!=null&&r.portalRootNode&&o.classList.add(r==null?void 0:r.portalRootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,R1.createPortal)(e,t):null};var sn={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var od=x(w()),id=(e=!1)=>{let[t,n]=(0,Pt.useState)(e),r=(0,Pt.useCallback)(()=>n(!0),[]),o=(0,Pt.useCallback)(()=>n(!1),[]),i=(0,Pt.useCallback)(()=>n(a=>!a),[]),s=(0,Pt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Gg(e,t=null,n=0){if(!e)return{display:"none"};let r=t?e.top-t.top<0||e.top<t.top-n?t.top-n:e.top+e.height>t.top+t.height+n?t.top+t.height+n-e.height:e.top:e.top,o=t?e.left<t.left-n?t.left-n:e.left+e.width>t.left+t.width+n?t.left+t.width+n-e.width:e.left:e.left;return{top:r,left:o,height:e.height,width:e.width}}var sd=({className:e,triggerRef:t,boundaryRef:n=(0,Pt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Gg,...a})=>{let l=$g(t),u=$g(n),c=(0,Pt.useMemo)(()=>s(l,u,0),[l,u]);return(0,od.jsx)(I1,{children:(0,od.jsx)("div",{className:(0,qg.default)(sn.ref,{[sn.positionAbove]:r==="above",[sn.positionBelow]:r==="below",[sn.positionLeft]:r==="left",[sn.positionRight]:r==="right",[sn.alignStart]:o==="start",[sn.alignCenter]:o==="center",[sn.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,od.jsx)("div",{className:(0,qg.default)(e,sn.root),children:i})})})};var L1=x(X()),ad=x(O());var Xg=x(w()),ld=(0,ad.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,ad.useRef)(null),i=k("TabCompletion",Cn);return(0,Xg.jsx)("div",{ref:nd([o,r]),className:(0,L1.default)(e,i.popoverContentContainer),...n,children:(0,Xg.jsx)("div",{className:i.popoverContent,children:t})})});var Tr=x(w()),GI=e=>t=>{let n=Gg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},XI=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Cn),s=id(),a=(0,cd.useMemo)(()=>GI(e.getBoundingClientRect()),[e]),[l,u]=Oc(e);return(0,cd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Tr.jsxs)("span",{children:[(0,Tr.jsx)("mark",{ref:nd([l,s.triggerRef]),className:(0,A1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Tr.jsx)(sd,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Tr.jsx)(ld,{style:n,children:(0,Tr.jsx)("div",{className:i.hintText,children:o})})})]})},ud=class extends wn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${C1(r.keyword)}\\b`,"i")})),this.keywordMatches=n.keywordMatches),this.usedKeywordMatches.clear(),t}match(t){let n=this.preparedKeywordMatches.map(o=>{if(this.usedKeywordMatches.has(o))return null;let i=t.match(o.keywordRegex);if(!i)return null;let s=t.charAt(i.index-1),a=t.charAt(i.index+o.keyword.length);return s==="{"&&a==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:o.suggestion,preparedKeywordMatch:o,valid:!0}}).filter(b1);if(n.length===0)return null;let r=n.reduce((o,i)=>i.index<o.index?i:o);return this.usedKeywordMatches.add(r.preparedKeywordMatch),r}replaceWith(t,n){return(0,Tr.jsx)(XI,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var fd=x(X());var Ke=x(O());var Qg=x(w()),O1=()=>(0,Qg.jsx)("svg",{width:"1.3em",height:"1.3em",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"InsertLinkIcon",tabIndex:-1,children:(0,Qg.jsx)("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})});var kr=x(O());var M1=x(Og());var N1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function dd(e,t,n){var o;let r=((o=e.imageSizes)==null?void 0:o[t])||e.image||n;if(!r)return null;try{return new URL(r).toString()}catch{return null}}function Yg(e){return e.replace("https://www.","").replace("https://","")}var Rt=x(w()),QI=3,YI=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),ZI=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=QI})=>{let i=k("LinkSearch",N1),[s,a]=(0,kr.useState)(""),l=B(),u=I(X_("url")),c=I(j_("URL",YI)),[f,d]=(0,kr.useState)(c.length-1),y=D("fallbackImage"),v=p=>{let S=p.target;a(S.value)},h=(p,S)=>{p.stopPropagation(),p.preventDefault(),window.open(S,"_blank")},g=p=>{var C;let S=f-1<0?c.length-1:f-1,_=f+1===c.length?0:f+1;p.code==="Escape"&&(a(""),t()),p.code==="ArrowUp"&&d(S),p.code==="ArrowDown"&&d(_),p.code==="Enter"&&e(((C=c[f])==null?void 0:C.text)||s)},m=(0,kr.useCallback)((0,M1.default)(p=>{l(ao({query:p,type:"URL",tags:["link-search"]}))},300),[]);return(0,kr.useEffect)(()=>{s&&m(s)},[s]),(0,kr.useEffect)(()=>()=>{l(Vc())},[]),(0,Rt.jsxs)("div",{className:i.root,children:[(0,Rt.jsx)(ht,{withDivider:!0,children:(s?c:u).slice(0,o).map((p,S)=>(0,Rt.jsx)(oe,{selected:f===S,onClick:()=>e(p.text),"data-testid":"linksearch-suggestion",children:(0,Rt.jsxs)(me,{children:[(0,Rt.jsx)(me.Image,{src:dd(p,"small",y||void 0),title:p.title||p.text}),(0,Rt.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,Rt.jsx)(me.Title,{children:p.title||Yg(p.text)}),p.title&&Yg(p.text)]}),(0,Rt.jsx)(oe.Actions,{children:(0,Rt.jsx)(oe.ActionButton,{label:r,onClick:_=>h(_,p.text)})})]})},p.text))}),(0,Rt.jsx)(Ea,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:g})]})},D1=ZI;var Zg={};Pe(Zg,{enUS:()=>JI,nlNL:()=>eL});var JI={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},eL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Ve=x(w()),tL=(0,Ke.forwardRef)((e,t)=>{let n=k("TabCompletion",Cn);return(0,Ve.jsx)("mark",{ref:t,className:(0,fd.default)(n.matchSelection)},"selection-start")}),nL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=H(Zg),s=k("TabCompletion",Cn),a=(0,Ke.useRef)(null),l=(0,Ke.useRef)(null),[u,c]=(0,Ke.useState)(null),f=B(),d=id(document.activeElement===r),[y]=(0,Ke.useState)(()=>document.createRange());d.triggerRef.current=y,(0,Ke.useEffect)(()=>()=>y.detach(),[]),(0,Ke.useEffect)(()=>{let h=e.current,g=a.current;!h||!g||(y.setStart(h,0),y.setEnd(g,0))},[e.current,a.current]),gi(()=>{d.close()});let v=(0,Ke.useCallback)(h=>{let g=y.toString(),m=/^http(s?):\/\//.test(h)?h:`https://${h}`;f(sc({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,Ve.jsxs)("span",{children:[(0,Ve.jsx)("mark",{ref:a,className:(0,fd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Ve.jsx)(sd,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ve.jsxs)(ld,{style:n,ref:l,children:[(0,Ve.jsx)("div",{className:(0,fd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Ve.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Ve.jsx)(O1,{}),(0,Ve.jsx)("span",{children:"\xA0"}),(0,Ve.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Ve.jsx)(D1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},pd=class extends wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ke.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,Ve.jsx)(tL,{ref:this.startRef}):(0,Ve.jsx)(nL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Mn=x(w()),rL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",E1),c=D("insertLink"),f=D("showMidSentenceSuggestions"),d=D("inlineSuggestions"),y=Mc(a),v=(0,Dn.useRef)(null);(0,Dn.useEffect)(()=>{br(a)&&y&&Dc(a,y)},[y]);let h=(0,Dn.useCallback)(p=>{if(!o||!n)return p;let S=[(0,Mn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Mn.jsx)("span",{"data-testid":"tab-completion",className:(0,md.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&S.push((0,Mn.jsx)("span",{className:(0,md.default)(u.hint,u.resetIndent),children:(0,Mn.jsx)(Ja,{keyCode:"tab"},"tabHint")})),Wg(p,S)},[o,n,r]),g=(0,Dn.useMemo)(()=>{let p=[];return c&&p.push(new pd("selection")),p.push(new pi("placeholders")),i&&p.push(new ud("keywords")),p},[d,c,i]),m=(0,Dn.useMemo)(()=>{let p=window.getComputedStyle(a);return{"--dd-color":p.color,"--dd-font-size":p.fontSize,"--dd-font-family":p.fontFamily,"--dd-font-variant":p.fontVariant}},[]);return e?(0,Mn.jsxs)("div",{ref:p=>{p!=null&&p.parentElement&&(v.current=p==null?void 0:p.parentElement)},className:u.root,style:m,children:[(0,Mn.jsx)(di,{tagName:"span",containerTagName:"div",className:(0,md.default)(u.container,u.agentText),disableLineBreaks:br(a),content:t||"\u200B",onAfterParse:h,matchers:g,selection:y,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!f}),(0,Mn.jsx)("br",{})]}):null},oL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var h;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Ii(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:y,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((h=r.list)==null?void 0:h.keywordMatches)??[],enabled:y&&f!==!1}},F1=xn(oL)(rL);var bE=x(X()),TE=x(O());var j1={list:[],fetchState:"idle",isInitialRequest:null},B1=e=>e.autoflows.list||[],H1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Fn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Jg=M("autoflows/start",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.startAutoflowSession(e),await n(Fn(e.platformSessionId))}),eh=M("autoflows/stop",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.stopAutoflowSession(e.platformSessionId),await n(Fn(e.platformSessionId))}),iL=j({name:"autoflows",initialState:j1,reducers:{},extraReducers:e=>{e.addCase(Jg.pending,(t,n)=>{let r=H1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(eh.pending,(t,n)=>{let r=H1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Fn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Fn.rejected,t=>{t.fetchState="error"}),e.addCase(Fn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>j1)}}),U1=M("autoflows/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");let o=r.openStream(e);o.on("sessionAborted",()=>{n(Fn(e))}),o.on("sessionCompleted",()=>{n(Fn(e))})}),z1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),V1=iL.reducer;var K1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},W1=e=>e.customMessages.list,$1=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),q1=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),G1=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Aa=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),gd=M("customMessages/send",async(e,t)=>{let{platformSessionId:n,suggestion:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.sendCustomMessage(n,r)}),hd=M("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),X1=j({name:"customMessages",initialState:K1,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Aa.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Aa.rejected,t=>{t.fetchState="error"}).addCase(Aa.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(gd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(gd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(hd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(hd.rejected,(t,n)=>{let r=t.answeredSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1)),t.answeredSuggestions.splice(r,1)}).addCase(J,()=>K1)}}),Q1=M("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(X1.actions.onCustomMessage(i))})}),Y1=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),Z1=X1.reducer;var sL={jwt:null,accountUrl:null,interval:null},J1=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},th=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),nh=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(th()),setInterval(()=>r(th()),n)}),eE=j({name:"exchangeToken",initialState:sL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(th.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(nh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:tE}=eE.actions,nE=eE.reducer;function rE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var fE=x(O());var uE=x(X()),cE=x(O());var iE=x(X());var oE={root:"_root_838fd_1"};var aE=x(w()),aL=({className:e,children:t})=>{let n=k("Unicode",oE);return(0,aE.jsx)("span",{className:(0,iE.default)(e,n.root),children:t})},sE=aL;var lE={isDisabled:"_isDisabled_1rmfm_1",buttonStart:"_buttonStart_1rmfm_5",root:"_root_1rmfm_8",buttonStop:"_buttonStop_1rmfm_8",stateBadge:"_stateBadge_1rmfm_19",isCompleted:"_isCompleted_1rmfm_26",isStarted:"_isStarted_1rmfm_30",isAborted:"_isAborted_1rmfm_34"};var rh={};Pe(rh,{enUS:()=>lL,nlNL:()=>uL});var lL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]},uL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]};var lt=x(w()),dL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",lE),a=H(rh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,lt.jsxs)(oe,{className:(0,uE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,lt.jsx)(me,{children:(0,lt.jsxs)(me.Content,{children:[(0,lt.jsxs)(me.Title,{children:[t&&(0,lt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,lt.jsx)("span",{children:r})]})}),(0,lt.jsx)(oe.Actions,{fixed:t==="Started",children:(0,lt.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,lt.jsxs)(cE.Fragment,{children:[(0,lt.jsx)(sE,{children:u})," ",(0,lt.jsx)("span",{children:a(l)})]})})})]})},dE=dL;var oh=x(w()),fL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},pL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,oh.jsx)(fE.Fragment,{children:e.map(o=>(0,oh.jsx)(dE,{displayName:o.displayName,description:o.description,disabled:o.isBusy||fL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),mL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},gL={onStartAutoflow:Jg,onStopAutoflow:eh},pE=xn(mL,gL)(pL);var yd=x(O());var ah=x(X());var ih=x(w()),sh=()=>(0,ih.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,ih.jsx)("path",{d:"M502.6 70.63l-61.25-61.25C435.4 3.371 427.2 0 418.7 0H255.1c-35.35 0-64 28.66-64 64l.0195 256C192 355.4 220.7 384 256 384h192c35.2 0 64-28.8 64-64V93.25C512 84.77 508.6 76.63 502.6 70.63zM464 320c0 8.836-7.164 16-16 16H255.1c-8.838 0-16-7.164-16-16L239.1 64.13c0-8.836 7.164-16 16-16h128L384 96c0 17.67 14.33 32 32 32h47.1V320zM272 448c0 8.836-7.164 16-16 16H63.1c-8.838 0-16-7.164-16-16L47.98 192.1c0-8.836 7.164-16 16-16H160V128H63.99c-35.35 0-64 28.65-64 64l.0098 256C.002 483.3 28.66 512 64 512h192c35.2 0 64-28.8 64-64v-32h-47.1L272 448z"})});var mE={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var an=x(w()),hL=({entities:e})=>{let t=k("EntitiesWidgetList",mE),[n,r]=(0,yd.useState)(void 0),o=B(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),ba(a.text),o(it({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,yd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,an.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,an.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,an.jsx)("span",{className:t.entityText,children:a.text}),(0,an.jsxs)("span",{className:t.iconWrapper,children:[(0,an.jsx)("span",{className:(0,ah.default)(t.icon),children:(0,an.jsx)(sh,{})}),(0,an.jsx)("span",{className:(0,ah.default)(t.icon,n===l&&t.iconClicked),children:(0,an.jsx)(sh,{})})]})]},a.text))})},gE=hL;var hE=x(X()),lh=x(O());var Oa={};Pe(Oa,{enUS:()=>yL,nlNL:()=>vL});var yL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],answer:[{type:0,value:"Answer"}]},vL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],answer:[{type:0,value:"Antwoord"}]};var jn={root:"_root_1e6ej_1",title:"_title_1e6ej_8",isUsed:"_isUsed_1e6ej_13",quickReplies:"_quickReplies_1e6ej_22",quickReply:"_quickReply_1e6ej_29",hasError:"_hasError_1e6ej_39",label:"_label_1e6ej_43",errorIcon:"_errorIcon_1e6ej_48"};var et=x(w()),SL=({suggestion:e})=>{let t=H(Oa),n=B(),r=I($1(e.text)),o=I(q1(e.text)),i=I(G1(e.text)),s=I(Zu),{replyOptions:a}=e,l=(0,lh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(gd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,lh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(hd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,et.jsxs)(oe,{onClick:l,className:(0,hE.default)(jn.root,{[jn.isUsed]:r,[jn.hasError]:i}),children:[(0,et.jsx)(me,{children:(0,et.jsxs)(me.Content,{children:[(0,et.jsxs)(me.Title,{className:jn.title,children:[e.text," ",(0,et.jsx)(el,{className:jn.label,children:"analyse tool"})," ",i&&(0,et.jsx)("span",{className:jn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,et.jsx)("ul",{className:jn.quickReplies,children:a.map(c=>(0,et.jsx)("li",{className:jn.quickReply,children:c.title},c.title))})]})}),(0,et.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,et.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,et.jsx)(oe.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,et.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},yE=SL;var uh=x(w()),vE=()=>(0,uh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,uh.jsx)("path",{d:"M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9",stroke:"currentColor",strokeWidth:"1.5",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"})});var SE=x(O());var ut=x(w()),xL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Kc(o),s=H(Oa),a=D("showImages"),l=D("fallbackImage"),u=y=>{y.preventDefault(),y.stopPropagation(),r(o)},c=y=>{y.preventDefault(),y.stopPropagation(),n(e)},f=(0,SE.useCallback)(y=>{window.open(i,"_blank"),y.stopPropagation(),y.preventDefault()},[i]);return(0,ut.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,ut.jsxs)(me,{children:[a&&e.image&&(0,ut.jsx)(me.Image,{src:dd(e,"small",l||void 0),title:e.title}),(0,ut.jsxs)(me.Content,{children:[e.title&&(0,ut.jsx)(me.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,ut.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,ut.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,ut.jsxs)(oe.Actions,{children:[i&&(0,ut.jsx)(oe.ActionButton,{onClick:f,label:s("visitUrl")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},xE=xL;var Na=x(w()),_L=({contentType:e,lines:t,suggestions:n})=>{let r=kt(),o=I(xi),i=a=>{r.send(Tg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(In,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Na.jsx)(Na.Fragment,{children:n.map(a=>(0,Na.jsx)(xE,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},_E=_L;var ch={};Pe(ch,{enUS:()=>wL,nlNL:()=>EL});var wL={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},EL={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var wE={root:"_root_x0pwe_1",loginText:"_loginText_x0pwe_7",stateText:"_stateText_x0pwe_8",sectionList:"_sectionList_x0pwe_20",shortcutList:"_shortcutList_x0pwe_24",shortcut:"_shortcut_x0pwe_24",link:"_link_x0pwe_52"};var dh=x(w()),EE=()=>(0,dh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,dh.jsx)("path",{d:"M543-340q16.595 0 28.798-12.202Q584-364.405 584-381t-12.202-28.798Q559.595-422 543-422t-28.798 12.202Q502-397.595 502-381t12.202 28.798Q526.405-340 543-340Zm-25-126h47q2-29 8.5-43t32.5-39q27-26 37.5-45.395Q654-612.79 654-639q0-45.882-31.5-74.941Q591-743 540-743q-38 0-68 20.5T428-665l45 19q11-25 27.5-38t39.5-13q29.778 0 48.389 17Q607-663 607-637q0 20-9 35t-32 32q-32 29-40 46.5t-8 57.5ZM260-200q-24 0-42-18t-18-42v-560q0-24 18-42t42-18h560q24 0 42 18t18 42v560q0 24-18 42t-42 18H260Zm0-60h560v-560H260v560ZM140-80q-24 0-42-18t-18-42v-620h60v620h620v60H140Zm120-740v560-560Z"})});var fh=x(w()),CE=()=>(0,fh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,fh.jsx)("path",{d:"M319-250h322v-60H319v60Zm0-170h322v-60H319v60ZM220-80q-24 0-42-18t-18-42v-680q0-24 18-42t42-18h361l219 219v521q0 24-18 42t-42 18H220Zm331-554v-186H220v680h520v-494H551ZM220-820v186-186 680-680Z"})});var z=x(w()),vd=(e,t)=>{let n=I(Ut);(0,TE.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},CL=()=>{let e=H(ch),t=B(),n=D("isEmbedded"),r=k("Widget",wE),o=D("showAutoflows"),i=D("showCustomMessages"),s=D("showPersonalCollectionLink"),a=D("showSummaryCommand"),l=D("showKnowledgeSearch"),u=D("showSearch"),c=I(ki),f=I(Yc),d=I(B1),y=I(Qc),v=I(W1),h=I(Ju),g=I(ai),m=I(Ut),p=I(Zu),S=I(rE),_=I(xi),C=kt(),E=I(Y_),b=I(J1("/admin/personal-collection")),R=D("adminUrl");if(vd(()=>(t(Aa(p)),t(Q1(p)),()=>{t(Y1(p))}),[t,g,i,p]),vd(()=>(t(Fn(p)),t(U1(p)),()=>{t(z1(p))}),[t,g,o,p]),vd(()=>{f.forEach(({type:N})=>{t(N==="entities"?Vt():Pn(N))})},[t,g,h,c]),vd(()=>(t(nh()),()=>{t(tE())}),[t,g,s,h]),g===!1)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("notSupported")})})},"supported");if(m===!1)return(0,z.jsx)("div",{className:r.loginText,children:(0,z.jsx)("div",{children:(0,z.jsx)(ed,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!p||m===null||E||S)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("waiting")})})},"waiting");let P=u||a||l||b;return(0,z.jsx)("div",{className:(0,bE.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(tl,{className:r.sectionList,children:[P&&(0,z.jsx)(Un,{title:e("actions"),type:"shortcuts",children:(0,z.jsxs)("div",{className:r.shortcutList,children:[u&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-search",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0}),children:[(0,z.jsx)(vi,{}),e("linkSearch")]}),a&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-summary",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,z.jsx)(CE,{}),e("linkSummary")]}),l&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,z.jsx)(EE,{}),e("linkKnowledgeSearch")]}),b&&(0,z.jsxs)("a",{className:r.shortcut,target:"_blank",href:b,"data-testid":"shortcut-personal-collection",rel:"noreferrer",children:[(0,z.jsx)(vE,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,z.jsx)(Un,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(ht,{withDivider:!0,children:v.map(N=>(0,z.jsx)(yE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(Un,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(pE,{})})}),f.map(({type:N,title:G,amount:V,lines:He})=>{var ln;switch(N){case"entities":return y&&y.length>0&&(0,z.jsx)(Un,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(gE,{entities:y})},N);default:return((ln=_[N])==null?void 0:ln.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(Un,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(_E,{lines:He,contentType:N,suggestions:_[N].suggestions.slice(0,V)||[]})})},N)}})]})})},kE=CL;function Mi(e){let t=new Range;return t.selectNodeContents(e),t}function PE(e,t,n){try{return Pr(e,t,n),!0}catch{return!1}}function Sd(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function xd(e){return"tagName"in e&&e.tagName==="BR"}var Ma=/[\u200B-\u200D\uFEFF]/g;function Pr(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return u;for(let d=0;d<=l.length;d++)if(f.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(Ma,""),f=o+c.length,d=t>=o&&t<=f,y=n>=o&&n<=f;if(d){let v=s(u,t-o);v===0&&!y?r.setStartBefore(l):r.setStart(l,v)}y&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(xd(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;Sd(l)&&u&&!Sd(u)&&!xd(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Da(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(f){let d=f===n,y=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let v=f.textContent;d&&(a=u+v.substring(0,r).replace(Ma,"").length),y&&(l=u+v.substring(0,i).replace(Ma,"").length),u+=v.replace(Ma,"").length;break}case Node.ELEMENT_NODE:{let v=f.nextSibling===null;xd(f)&&!v&&u++;for(let h=0;h<f.childNodes.length;h++){let g=d&&h===r,m=y&&h===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(f.childNodes[h]),y&&h===i-1&&(l=u),l!==void 0))break}!y&&Sd(f)&&!v&&u++,y&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function Fa(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,f=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,y=f?i:void 0,v=u.textContent.replace(Ma,"");d===0&&y===void 0?a+=v:a+=v.substring(d,y);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&xd(u)&&!d&&(a+=`
|
|
20
|
-
`);for(let
|
|
21
|
-
`);break}default:break}f&&s++}return l(e),a}function RE(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var co=class extends bn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Fa(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!RE(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!RE(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Da(this.element,t);let n=this.lastKnownSelection;if(n&&PE(this.element,n.start,n.end))return n;let r=Mi(this.element);return r.collapse(!1),Da(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Fa(this.element,Pr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var ph=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(t)}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},mh=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=this.createIframe(),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];createIframe(){let t=`deepdesk-iframe-${this.name}`,n=document.getElementById(t);if(n)return n;let r=document.createElement("iframe"),o=`${this.targetOrigin}/v2/widget/liveengage/channel.html`,i=new URLSearchParams({channel:this.name,host:window.location.origin});return this.options.debug&&i.set("debug","1"),r.style.position="absolute",r.style.left="-999em",r.style.width="0px",r.style.height="0px",r.tabIndex=-1,r.id=t,r.title=`iframe-${this.name}`,r.src=`${o}?${i.toString()}`,r}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(t,this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},gh=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),U.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new mh(t,this.deepdeskUrl,{debug:!0}):new ph(t),r=o=>{var i,s;o.origin===this.deepdeskUrl&&o.data.type==="event"&&o.data.channel===t&&(U.info("Received broadcast event",this.sessionId,o),(s=(i=this.eventMap)[o.data.name])==null||s.call(i,o.data.payload))};return n.onMessage(r),n}send(t,n){var o,i,s;if(!this.sessionId)return;U.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(i=(o=this.eventMap)[t])==null||i.call(o,n),(s=this.channel)==null||s.postMessage({...r,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},IE=gh;var Di=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var hh=e=>new Promise(t=>{setTimeout(t,e)});var Fi=class extends Di{name="ClientError"},yh=class extends Di{name="ServerError"},Wt=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:f=!0,retryOnError:d=_=>_ instanceof TypeError,retryOnResponse:y=_=>_.status>=500,version:v="v1",...h}=n,g={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(g.headers={...g.headers,"X-CSRFToken":this.csrfToken}),typeof v=="string"&&(g.headers={...g.headers,"X-Deepdesk-API-Version":v});let m=u,p=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let S=async()=>(m--,a(s,g).then(async _=>y(_)&&!i.isAborted&&m>0?(await hh(c),S()):_.status===401&&f===!0&&p===!1?(p=!0,await this.refreshToken(),S()):_).catch(async _=>{if(d(_)&&!i.isAborted&&m>0)return await hh(c),S();throw _}));S().then(_=>_.json().catch(()=>null).then(C=>{_.status>=500?o(new yh("Server Error",C)):_.status===401?o(new Fi("Unauthorized",C)):_.status===403?o(new Fi("Forbidden",C)):_.status===404?o(new Fi("Not Found",C)):_.status>=400&&o(new Fi("Bad Request",C)),delete this.latestRequestByUrl[s],r(C)})).catch(_=>{o(_)})})}async validateToken(){let{has_valid_access_token:t}=await this.get("/auth/validate");if(!t)return!1;let{is_logged_in:n}=await this.get("/apis/admin/session/validate/",{version:null});return!!n}refreshToken(){return e.refreshingToken||(e.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{e.refreshingToken=null},1e3*60)})),e.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,{method:"POST",body:JSON.stringify(n),...r})}patch(t,n,r){return this.request(t,{method:"PATCH",body:JSON.stringify(n),...r})}put(t,n,r){return this.request(t,{method:"PUT",body:JSON.stringify(n),...r})}delete(t,n){return this.request(t,{method:"DELETE",...n})}};var bL;(t=>{let e;(l=>(l.SEND_MESSAGE="Send Message",l.HANDLING_TIME="Handling Time",l.START_AUTOFLOW="Start Autoflow",l.ABORT_AUTOFLOW="Abort Autoflow",l.ADD_TO_PERSONAL_COLLECTION="Add to personal collection",l.DELETE_FROM_PERSONAL_COLLECTION="Delete from personal collection"))(e=t.EventType||={})})(bL||={});function _d(e){return{...re(e),tags:e.tags}}var Hn=class e{constructor(t,n={}){this.options=n;this.client=new Wt(t,{fetch:n.fetch}),this.client.patchFetch(r=>async(o,i)=>{let s=await r(o,i);return this.handleDeepdeskVersionHeaders(s),s})}latestReceivedDeepdeskVersions={};client;shouldFetchCsrfToken=!0;static exchangeTokenPromise=null;async preflight(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=await this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(e.exchangeTokenPromise||(e.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),e.exchangeTokenPromise):Promise.resolve()}async createConversation(t){await this.preflight(),U.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...we(t),tags:t.tags},{version:"v2"});return _d(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return re(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return re(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return re(t)}async checkUserExists(t){let{exists:n}=await this.client.get(`/apis/admin/users/exists?external_id=${t}`);return n}async getConversationBySessionId(t,n={}){await this.preflight(),U.info(`Getting conversation for session ${t}`);let{attempts:r=1,retryDelay:o=1e3}=n,i=await this.client.get(`/api/conversations/by_session_id/${t}`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"});return _d(i)}async isConversationSupported(t,n={}){U.info(`Check if conversation for session ${t} is supported`);let{attempts:r=1,retryDelay:o=1e3}=n;return(await this.client.get(`/api/conversations/by_session_id/${t}/active_profile`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"})).has_active_profile}async updateConversation(t,n){let r=we(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return _d(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...we(o),tags:o.tags})),{version:"v2"})).map(o=>_d(o))}async sendEvent(t,n){let{data:r,...o}=n,i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((s,[a,l])=>({...s,[a]:l}),{});return this.client.post("/api/events",we({...i,...o,data:r,name:t}),{version:"v2"})}async sendEventV1(t,n){let r=Object.entries(this.latestReceivedDeepdeskVersions).reduce((o,[i,s])=>({...o,[i]:s}),{});return this.client.post("/api/events",{event:t,data:we({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source)},prompt_instruction:n.promptInstruction,model:n.model})).summary}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.post("/apis/admin/session/jwt/",{jwt:t},{version:null}).catch(n=>{throw U.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",we(n),{version:null,refreshTokenOn401:!1,headers:{apikey:t}})}async getTextSuggestions(t,n={},r){return r==="sticky-messages"?this.getPinnedMessages(t):(await this.client.post(`/api/conversations/${t}/recommend/${r}`,we(n),{abortLatest:!0})).map(i=>({...re(i),text:i.text||i.url||i.message,source:r,type:r})).filter((i,s,a)=>s===a.findIndex(l=>l.text===i.text))}async isLoggedIn(){return await this.preflight(),this.client.validateToken()}async getAutocompleteSuggestions(t,n){return(await this.client.post(`/api/conversations/${t}/autocomplete`,we(n),{abortLatest:!0})).map(o=>({score:1,source:o.source,sourceText:o.source_text,text:o.label,trainingJobs:o.training_jobs,searchKeywords:o.search_keywords,type:o.source})).filter((o,i,s)=>i===s.findIndex(a=>a.text===o.text))}async getPinnedMessages(t){let n=await this.client.get(`/api/conversations/${t}/sticky-messages`,{abortLatest:!0});return re(n).map(r=>({...r,text:r.message,source:"sticky-messages",type:"pinned-message"}))}async getStyleSuggestions(t){let n=await this.client.post("/api/style-suggestions",we(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,we(t),{version:"v2"});return re(n)}async knowledgeAssist(t,n,r){let o=await this.client.post("/api/knowledge-search/search",we({question:t.question,promptInstruction:t.promptInstruction,profile:r,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return re(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return re(n)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return re(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(uy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&U.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var ja=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Sg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{U.warn(`Invalid JSON for ${t}: ${r}`)}})}connect(){clearTimeout(this.timeoutTimer);let t=new EventSource(this.url,{withCredentials:!0});this.eventSource=t;let n=!1;t.onopen=()=>{n=!0},t.onerror=()=>{n&&t.readyState===2&&this.connect()},this.timeoutTimer=setTimeout(()=>{t.close(),this.connect()},this.options.timeout),Object.keys(this.eventListeners).forEach(r=>{this.proxyEvent(r)})}disconnect(){var t;clearTimeout(this.timeoutTimer),this.eventListeners={},(t=this.eventSource)==null||t.close()}emit(t,n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>r(n))}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),this.proxyEvent(t),()=>{this.off(t,n)}}off(t,n){let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}};var TL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(TL||={});var Ha=class{constructor(t,n={}){this.apiUrl=t;this.client=new Wt(t,n)}client;streams={};logger=U;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return re(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,we(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,we(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return re(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",we(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new ja(`${this.apiUrl}/sessions/${t}/events`),this.streams[t].connect()),this.streams[t]}closeStream(t){this.streams[t]||(this.streams[t].disconnect(),delete this.streams[t])}};var LE={startTime:null,stopTime:null},AE=j({name:"handlingTime",initialState:LE,reducers:{handlingTimeStart(e){if(e.startTime&&!e.stopTime)throw new Error("Timing already started");e.startTime=new Date,e.stopTime=null},handlingTimeStop(e){if(!e.startTime)throw new Error("Timing not started");e.stopTime=new Date},handlingTimeReset(e){e.startTime=null,e.stopTime=null}},extraReducers:e=>{e.addCase(J,()=>LE)}}),{handlingTimeStart:OE,handlingTimeStop:wd,handlingTimeReset:NE}=AE.actions,ME=AE.reducer;var DE=(e={})=>{let t={onAuthError:Ei(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Ed={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var fo=M("styleSuggestions/getAll",async({text:e},t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),{showStyleSuggestions:o}=r.settings,i=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)return Ed.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),kL=j({name:"styleSuggestions",initialState:Ed,reducers:{},extraReducers:e=>{e.addCase(fo.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(fo.rejected,t=>{t.fetchState="error"}).addCase(fo.fulfilled,(t,n)=>{t.fetchState="done",mr(t.list,n.payload)||(t.list=n.payload)}).addCase(Yr,t=>{t.list=Ed.list}).addCase(J,()=>Ed)}}),FE=kL.reducer;var jE=(e={})=>{let t,n=!0,r={getStyleSuggestions:fo,debounce:500,...e};return o=>i=>s=>{var y;let a=o.getState().input.text,l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:c}=u.settings;if(!((y=u.conversation.current)==null?void 0:y.id)||!c)return l;let{text:d}=u.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function PL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var HE=(e={})=>{let t={getTextSuggestions:Pn,getAutocompleteSuggestions:Sa,debounce:200,check:Ri,...e},n;return r=>o=>i=>{var h;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,f=(h=l.conversation.current)==null?void 0:h.id,d=i.type===qc.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:y}}=l;return PL(y,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=li(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var BE=fo.fulfilled.toString();function RL(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let i=e.keywordMatches.filter(l=>l.keyword===o),s=t.keywordMatches.filter(l=>l.keyword===o),a=s.length-i.length;a<=0||r.push(...s.slice(0,a))}),r}var UE=e=>t=>n=>r=>{var u;if(r.type!==BE){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=RL(o,s);r.type===BE&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var IL=wu({activeSuggestion:aw,answer:Yw,auth:xw,autoflows:V1,conversation:Lx,contentTypes:Mw,customMessages:Z1,exchangeToken:nE,entities:Hw,handlingTime:ME,info:N_,input:Bm.reducer,overlayInput:Xe.reducer,settings:wx,profile:e1,search:B_,summary:Ww,styleSuggestions:FE,ui:dw,textSuggestions:nw});function zE(e){return P0({reducer:IL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),DE(),HE({debounce:200}),jE({debounce:500}),UE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var LL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},AL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Nm("inlineSuggestions")(o);switch(r.type){case Rn.toString():{let l=Q_(r.payload.contentType)(t.getState()),u=l.indexOf(r.payload.suggestion);e.emit("edit-suggestion",{contentType:r.payload.contentType,index:u,suggestions:l});break}case Ei.toString():{!r.payload&&e.emit("logout",void 0);break}case Dt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:LL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case sc.toString():{let{start:l,end:u}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case ta.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case cc.toString():e.emit("select-image",r.payload,{mayApplyChanges:!0}),e.sendEvent("Image attached",{conversationId:o.conversation.current.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Vt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Ln.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case it.toString():e.sendEvent(r.payload.name,{conversationId:((a=r.payload.options)==null?void 0:a.includeConversationData)&&o.conversation.current.id,data:r.payload.data});break;case ac.toString():e.handleKeyDown(r.payload);break;case Yr.toString():e.logSendMessage(r.payload);break;case lc.toString():e.logSendEditSuggestionMessage(r.payload);break;case uc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Yr.toString():e.handleAfterSendMessage(r.payload);break;case xa.toString():e.onUpdateShowTabHint(r.payload);break;case wd.toString():e.logHandlingTime();break;case Dt.toString():{i&&(t.dispatch(nn([])),t.dispatch(hr()));break}case nn.toString():{i&&r.payload.length>0&&t.dispatch(Zr(0));break}default:break}return s},VE=AL;function vh(e){return e.toISOString().replace("T"," ").replace("Z","")}function KE(e,t){var o,i,s;let{startTime:n,stopTime:r}=e.handlingTime;if(!n||!r)throw new Error("No startTime and stopTime for handling time metrics");return{conversationId:e.conversation.current.id,clientVersion:t.version,agentId:(o=e.info.agentInfo)==null?void 0:o.agentId,agentName:(i=e.info.agentInfo)==null?void 0:i.agentName,agentEmail:(s=e.info.agentInfo)==null?void 0:s.agentEmail,timeStart:vh(n),timeStop:vh(r)}}function Sh(e,t,n){var b,R,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:y,textSuggestions:v,offeredTextSuggestions:h}}=t[e],g=r.length,p=v.reduce((N,{text:G,searchTerm:V})=>N+G.length-(V?V.length:0),0),S=u??Date.now(),_=(Date.now()-S)/1e3+(c||0),C=o/_,E=v.reduce((N,{searchTerm:G})=>N+(G?G.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:y,lenTextTyped:o+E,lenTextTotal:g,lenTextAssisted:p,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:C,numPastes:l,textSuggestionsV2:v,suggestionsCounters:[{source:"gpt",countOffered:h.filter(N=>N.source==="gpt").length}],agentId:(b=t.info.agentInfo)==null?void 0:b.agentId,agentName:(R=t.info.agentInfo)==null?void 0:R.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function WE(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?WE(r,t):null}function $E(e,t){return WE(e,t)}function qE(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function OL(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Cd(e){return OL(e)&&(br(e)||Nc(e))}var GE=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch{return t}}catch{return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch{U.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function NL(e){return e.offsetParent!==null}function XE(e){if(!NL(e))return!1;let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function bd(e,t,n=100){let r=XE(e);t({isVisible:r});let o=setInterval(()=>{let i=XE(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var je=x(w()),QE=GE("showTabHint",!0),Ba=class e{static version="10.4.1-beta.1";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new Hn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[VE({emit:(f,d,y)=>this.emit(f,d,y),handleAfterSendMessage:f=>this.handleAfterSendMessage(f),handleInputChanged:f=>this.handleInputChanged(f),handleKeyDown:f=>this.handleKeyDown(f),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:f=>this.logSendMessage(f),logSendEditSuggestionMessage:f=>this.logSendEditMessage(f),onUpdateShowTabHint:f=>QE.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Ha(n)}),this.store=zE(c),this.broadcastEvents=new IE({debug:!0,deepdeskUrl:u,eventMap:_w(this.store),createCustomChannel:l}),this.store.dispatch(Js),this.store.dispatch(xa(QE.value())),this.store.dispatch(Js({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(U.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(U.warn("Profile has not been loaded (yet)"),!0):(U.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Ei(null)),this.store.dispatch(wr()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Ut(r)&&mw(r)!=="loading"&&t()});this.unmountHandlers.push(()=>{n()})})}isLoggedIn(){return this.deepdeskApi.isLoggedIn()}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){U.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(jm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(ec(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(tc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Hm(t))).payload}async postMessages(t){return(await this.store.dispatch(rc(t))).payload}async updateConversation(t){return(await this.store.dispatch(nc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Ln());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Js(t))}setVisitorInfo(t){this.store.dispatch(O_(t))}async setAgentInfo(t){await this.store.dispatch(ga(t))}async setAgentSettings(t){await this.store.dispatch(xg(t))}async getAgentSettings(){return(await this.store.dispatch(_g())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(qc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(uc(t))}notifyKeyDown(t){this.store.dispatch(ac(t))}notifyPaste(t,n){this.store.dispatch(zx({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(Bx(t))}notifyExternalSuggestion(t){this.store.dispatch(Dt(t)),this.store.dispatch(hr())}notifyEditSuggestion(t){this.store.dispatch(ew(t.contentType,t.suggestions)),this.store.dispatch(Rn({contentType:t.contentType,suggestion:typeof t.index=="number"?t.suggestions[t.index]:null}))}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(_r({collapse:!1})),this.inputMediator&&this.store.dispatch(Nx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(nn([])))}handleKeyDown(t){let{overlayCollapsed:n}=this.state.ui,{textSuggestions:r,selectedSuggestionIndex:o,selection:i}=this.state.input,{inlineSuggestions:s}=this.state.settings,a=r.length>0,l=o!==-1;if(this.store.dispatch(Ux(ic(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(Fx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Hx());let{selectedSuggestionIndex:f}=this.state.input;t.preventDefault(),!s&&(f===-1?this.store.dispatch(ta()):this.stageSelectedSuggestion({inputType:"arrow"}))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(Zr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(Zr(-1)),this.store.dispatch(ta()),t.preventDefault()):n||(this.store.dispatch(_r({collapse:!0})),this.store.dispatch(uw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:y}=this.state.input;this.store.dispatch(xa(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&y&&y.text.startsWith(d)&&(this.store.dispatch(Dt({text:y.text,suggestion:y,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(hr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Vx()),this.store.dispatch(nn([]))}handlingTimeStart(){this.state.handlingTime.startTime||(U.info("Start handling time"),this.store.dispatch(OE()))}handlingTimeStop(){this.state.handlingTime.startTime&&(U.info("Stop handling time"),this.store.dispatch(wd()))}logSendMessage(t){let n=Sh("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=Sh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(Dx(this.state.overlayInput.metrics))}logHandlingTime(){let t=KE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(NE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(hr()),this.store.dispatch(Yr(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Dt({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{this.eventListeners[t]&&this.eventListeners[t].forEach(i=>{try{i(n)}catch(s){U.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),U.error(s)}})};this.inputMediator&&r.mayApplyChanges?this.inputMediator.applyChanges(o):o()}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),()=>{this.off(t,n)}}off(t,n){if(!t&&!n){this.eventListeners={};return}let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}setConversationQuery(t){this.dynamicThunkObject.conversationQuery=t}whenConversationLoaded(t){let n=()=>this.loadProfileConfig().then(()=>t());this.hasConversation()&&n();let r=this.hasConversation();this.store.subscribe(()=>{this.hasConversation()!==r&&(r=this.hasConversation(),r&&n())})}overlayContainerFactory(t,n,r,o){let[i,s]=oo(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=oo(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ro(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),o.remove()}),o}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Cd(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:f,detectSubmit:d,insertLink:y,inputMediator:v,closestScrollSelector:h,appendOverlayTo:g,inlineSuggestions:m}=n;if(this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:y,isEmbedded:f,inlineSuggestions:m}),n.automaticHandlingTime&&this.setupHandlingTime(t),ro(t),this.inputMediator=v||(br(t)?new Tn(t):new co(t)),this.inputMediator.on("change",({plainText:S})=>{this.notifyInputChanged(S)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(Kx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",S=>{this.notifyKeyDown(S)}),this.inputMediator.on("paste",({pastedText:S,selectionText:_})=>{this.notifyPaste(S,_)}),this.inputMediator.on("cut",({selectionText:S})=>{this.notifyCut(S)}),m){if(br(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let S=this.createInlineContainer(t,"deepdesk-caret");(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(p1,{})})}),S),this.inputMediator.on("caret",_=>{this.store.dispatch(nn([])),_?(S.style.display="block",S.style.top=`${_.top}px`,S.style.left=`${_.left}px`):S.style.display="none"})}else{let S=h&&$E(t,h)||void 0,_=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:g,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(F1,{inputElement:t})})}),_),(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(_1,{})})}),C)}(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(i1,{})})}),this.createContainer("deepdesk-overlays"));let p;this.inputMediator.on("selection",S=>{clearTimeout(p),S===null?p=setTimeout(()=>{S!==null&&this.store.dispatch(Um(S))},500):this.store.dispatch(Um(S))}),this.inputMediator.on("disabled",()=>{var S;(S=this.inputMediator)==null||S.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{d&&this.notifySubmit()}),this.inputMediator.on("blur",()=>this.store.dispatch(_i(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(_i(!0))),this.store.dispatch(Mx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var S;this.refresh(),this.broadcastEvents.setSessionId((S=this.state.conversation.current)==null?void 0:S.sessionId)}),this.isMounted=!0}unmount(){var t;this.unmountHandlers.forEach(n=>n()),this.unmountHandlers=[],(t=this.inputMediator)==null||t.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderWidget(t,n={}){if(this.widgetRoot&&U.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,showPersonalCollectionLink:i,isEmbedded:s}=n;this.widgetRoot=t,this.configure({showImages:o,showPersonalCollectionLink:i,isEmbedded:s}),(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(kE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,$t.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=bd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){qE(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Pa());let t=ki(this.state);t&&this.store.dispatch(Js({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeAssistForAgents,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(U.info("Trial is active"),!await this.deepdeskApi.checkUserExists(t))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;U.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Yc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Vt()):this.store.dispatch(Pn(r))})}catch(r){this.handleError(r)}}};async function YE(e,t,n={}){let{value:r}=e,{start:o,end:i}=n.replace??{start:0,end:r.length},s=`${r.slice(0,o)}${t}${r.slice(i)}`,a=n.selectionAfter??{start:o+t.length,end:o+t.length},l=()=>{if(n.setValue)return n.setValue(s);e.value=s};return Promise.resolve(l()).then(()=>{e.selectionStart=a.start,e.selectionEnd=a.end,e.blur(),e.focus()})}async function ZE(e,t,n={}){let r=n.replace?Pr(e,n.replace.start,n.replace.end):Mi(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
|
|
22
|
-
`).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?
|
|
23
|
-
`).reverse().forEach((a,l)=>{l>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(a))}),s.collapse(!1))};return Promise.resolve(r()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!n)try{n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"nearest"})}finally{n&&n.remove()}})}function
|
|
19
|
+
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||iR)();if(!o)return;let i=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",s=i==="body"||i==="fragment"?o.body:o.createElement(i);return t.match(nR)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,m_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==f_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Ac[l]||Ac[s];if(!this.isSafe(t)||!l.match(rR)&&(!n&&(!u||u===ag)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===vr?c=!0:u===eo?c=Number.parseFloat(String(c)):u!==Ic&&(c=String(c)),r[lg[l]||l]=this.applyAttributeFilters(l,c),o+=1}),o===0)?null:r}extractStyleAttribute(t){let n={};return Array.from(t.style).forEach(r=>{let o=t.style[r];(typeof o=="string"||typeof o=="number")&&(n[r.replace(/-([a-z])/g,(i,s)=>String(s).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return fa[t]?{...n,...fa[t],tagName:t}:n}isSafe(t){if(typeof HTMLAnchorElement<"u"&&t instanceof HTMLAnchorElement){let n=t.getAttribute("href");if(n!=null&&n.startsWith("#"))return!0;let r=t.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(t){return this.banned.has(t)||this.blocked.has(t)?!1:this.props.allowElements||this.allowed.has(t)}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(t,n){let{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:s,transformOnlyAllowList:a}=this.props,l=[],u="";return[...t.childNodes].forEach(c=>{if(c.nodeType===f_){let d=c.nodeName.toLowerCase(),h=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let y;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let m=this.keyIndex;y=this.parseNode(v,h);let g=s(v,y,h);if(g===null)return;if(typeof g<"u"){l.push(no.default.cloneElement(g,{key:m}));return}this.keyIndex=m-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,h))){var p;this.keyIndex+=1;let m=this.extractAttributes(v),g={tagName:d};m&&(g.attributes=m),h.void&&(g.selfClose=h.void),l.push(no.default.createElement(Lc,{...g,key:this.keyIndex},(p=y)!==null&&p!==void 0?p:this.parseNode(v,h)))}else l=[...l,...this.parseNode(v,h.tagName?h:n)]}else if(c.nodeType===tR){let d=r&&!o?c.textContent:this.applyMatchers(c.textContent||"",n);Array.isArray(d)?l=[...l,...d]:u+=d}}),u&&l.push(u),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(oR);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:p,props:d}=n[a],h;if(u)h=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));h=v.index+v[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(h)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function sR(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",p=c==="fragment"?!0:u,d;if(a)d=a;else{let h=new Oc(i??"",e).parse();h.length>0&&(d=h)}return d||(d=s),p?no.default.createElement(no.default.Fragment,null,d):no.default.createElement(Lc,{attributes:n,className:r,tagName:c},d)}function gi(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:p="span",noWrap:d=!1,...h}=e,v=i?[]:l,y=o?[]:a,m=c?[c]:[],g=u?[u]:[];v.forEach(b=>{b.onBeforeParse&&m.push(b.onBeforeParse.bind(b)),b.onAfterParse&&g.push(b.onAfterParse.bind(b))});let f=m.reduce((b,E)=>E(b,e),r??""),S=new Oc(f,h,v,y),_=g.reduce((b,E)=>E(b,e),S.parse());return no.default.createElement(sR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:p})}var Sg=x($());var cg={root:"_root_kxnai_1",agentText:"_agentText_kxnai_3",textInput:"_textInput_kxnai_8",textInputWrapper:"_textInputWrapper_kxnai_27",alert:"_alert_kxnai_31",alertText:"_alertText_kxnai_50",warning:"_warning_kxnai_60",success:"_success_kxnai_69"};var h_=x($());var hi=x(O());function g_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Nc(e){let t=(0,hi.useRef)(null),[n,r]=(0,hi.useState)(!1);return(0,hi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=g_((c,p)=>{let d=t.current;if(!d)return;let h=c/i,v=p/i,y=d.getBoundingClientRect(),m=h>y.x&&h<y.x+y.width&&v>y.y&&v<y.y+y.height;m&&!o?(o=!0,r(!0)):!m&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=g_(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),u(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}var En={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var dg=x(w()),aR=({inputElement:e,children:t})=>{let n=k("TabCompletion",En),[r,o]=Nc(e);return(0,dg.jsx)("mark",{ref:r,className:(0,h_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},yi=class extends wn{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,dg.jsx)(aR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var vi=x(O());function Mc(e){return e.contentEditable==="true"}function lR(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),i=o.cloneRange();i.selectNodeContents(e),i.setEnd(o.endContainer,o.endOffset),n=i.toString().length,i.selectNodeContents(e),i.setEnd(o.startContainer,o.startOffset),t=i.toString().length}return{selectionStart:t,selectionEnd:n}}function y_(e){let{selectionStart:t,selectionEnd:n}=Mc(e)?lR(e):e;return[t,n]}function Dc(e){let[,t]=(0,vi.useState)(),n=(0,vi.useRef)(null);return n.current=y_(e),(0,vi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=y_(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function Fc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(bo);if(!s||s.length===0)return;let a=0;s.find(l=>{let u=r.indexOf(l,a);return o>u&&i<u+l.length?(n.selectionStart=u,n.selectionEnd=u+l.length,!0):(a=u+l.length,!1)})}var v_=x(O());function Si(e){(0,v_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ro(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var S_,sn=new Map,uR=["bottom","height","left","right","top","width"],cR=(e={},t={})=>uR.some(n=>e[n]!==t[n]);function x_(e){var n,r;let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...x_(t)]:[]}function __(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var pg=!1,w_=()=>{pg=!0;let e=[];sn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),sn.delete(n);return}let r=n.getBoundingClientRect();cR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(__,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),sn.size!==0&&(S_=window.requestAnimationFrame(w_))};function fg(e,t){let n=x_(e),r=[],o=n.map((i,s)=>fg(i,a=>{r[s]=a;let l=sn.get(e);if(!l)return;let u=r.reduce(__,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),sn.has(e)){let s=sn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else sn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!pg&&w_()},unobserve(){o.forEach(s=>s.unobserve());let i=sn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||sn.delete(e),sn.size||(cancelAnimationFrame(S_),pg=!1)}}}}var b_,an=new Map,E_=()=>{an.forEach((e,t)=>{if(!t.isConnected){an.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),an.size!==0&&(b_=window.requestAnimationFrame(E_))};function C_(e,t){return{observe(){let n=an.size===0;an.has(e)?an.get(e).callbacks.push(t):an.set(e,{visible:void 0,callbacks:[t]}),n&&E_()},unobserve(){let n=an.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||an.delete(e),an.size||cancelAnimationFrame(b_)}}}}var mg=["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderStyle","boxSizing","color","overflowWrap","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontWeight","fontKerning","lineHeight","letterSpacing","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","textIndent","whiteSpace","wordBreak","wordSpacing","wordWrap"];function gg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function xi(e){return parseFloat(e)}function jc(e){return Math.round(e*1e6)}function T_(e){return e/1e6}function hg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=xi(e.width),i=xi(e.borderLeftWidth),s=xi(e.borderRightWidth),a=xi(e.paddingRight),l=T_(jc(o)-jc(i)-jc(s)),u=T_(jc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function oo(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ro(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};gg(r,n,mg),hg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=C_(e,()=>{gg(r,n,mg),hg(r,e,n),i(),setTimeout(i,0)}),a=fg(e,u=>{if(u===null){t.onRemove&&t.onRemove(),n.remove();return}if(u.height===0&&u.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(gg(r,n,mg),hg(r,e,n),i(),n.style.top=`${u.top}px`,n.style.left=`${u.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let c=t.closestScrollElement.getBoundingClientRect(),p=window.getComputedStyle(t.closestScrollElement),d=xi(p.borderTopWidth),h=xi(p.borderBottomWidth),v=c.top+d-u.top,y=u.top+u.height+-(c.top+c.height-h);n.style.clipPath=`inset(${v}px 0px ${y}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(l=e.parentElement)==null||l.appendChild(n),a.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),a.unobserve(),s.unobserve()}]}var yg={};Ie(yg,{enUS:()=>dR,nlNL:()=>pR});var dR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"No placeholders found"}]},one:{value:[{type:0,value:"There is one placeholder in your message"}]},other:{value:[{type:0,value:"There are "},{type:7},{type:0,value:" placeholders in your message"}]}},offset:0,pluralType:"cardinal"}]},pR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"Alle placeholders zijn uit je bericht"}]},one:{value:[{type:0,value:"Er is 1 placeholder in jouw bericht"}]},other:{value:[{type:0,value:"Er zijn "},{type:7},{type:0,value:" placeholders in jouw bericht"}]}},offset:0,pluralType:"cardinal"}]};var ma=x(w()),k_=()=>(0,ma.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ma.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ma.jsx)("path",{d:"M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"})]});var vg=x(w()),P_=()=>(0,vg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,vg.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});function fR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function Bc(e){return e?e instanceof ShadowRoot?Bc(e.host):e===e.ownerDocument.body?e.ownerDocument:fR(e)?e:Bc(e.parentNode):document.body}var R_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(R_||{}),Cn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();mr(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(R_).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()});let n=Bc(this.element);if(n){let r=()=>{this.currentCaret!==null&&(this.currentCaret=null,this.emit("caret",null))};n.addEventListener("scroll",r),this.disposeHandlers.push(()=>{n.removeEventListener("scroll",r)})}this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var Tn=class extends Cn{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};var et=x(w()),mR=({value:e,onUse:t,...n})=>{var c;let r=B(yg),o=U(),i=k("EditSuggestionTextInput",cg),[s,a]=(0,kt.useState)(null),l=(0,kt.useRef)(null),u=((c=e.match(bo))==null?void 0:c.length)||0;return(0,kt.useEffect)(()=>{let p;return l.current&&(a(l.current),p=new Tn(l.current),p.on("change",({plainText:d})=>{o(Je.actions.userInput({text:d,selection:p.getSelection()}))}),p.on("keydown",d=>{o(Je.actions.registerKeyDown(sc(d))),d.code==="Enter"&&d.shiftKey&&t(p.getText())}),p.on("paste",({pastedText:d,selectionText:h})=>{o(Je.actions.registerPaste({text:d,selectionText:h}))}),p.on("cut",({selectionText:d})=>{o(Je.actions.registerCut(d))})),()=>{o(Je.actions.reset()),p.dispose(),p.deactivate()}},[l]),(0,kt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,kt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let p=l.current.value.length;l.current.setSelectionRange(p,p),l.current.focus()},0)},[l]),(0,et.jsxs)("div",{className:i.textInputWrapper,children:[(0,et.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,et.jsx)(gR,{inputElement:l.current,value:e}),(0,et.jsxs)("div",{className:(0,Sg.default)(i.alert,u===0?i.success:i.warning),children:[(0,et.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,et.jsx)(k_,{}):(0,et.jsx)(P_,{})]})]})},gR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",cg),r=(0,kt.useRef)(null),o=Dc(e);return(0,kt.useEffect)(()=>{Fc(e,o)},[o,e]),(0,et.jsx)(hR,{inputElement:e,children:(0,et.jsxs)("div",{ref:r,className:(0,Sg.default)(n.root,n.agentText),children:[(0,et.jsx)(gi,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new yi("placeholders")],inputElement:e,boundaryRef:r}),(0,et.jsx)("br",{})]})})},hR=({inputElement:e,children:t})=>{let n=(0,kt.useRef)(null);return(0,kt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=oo(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,et.jsx)("div",{ref:n,children:t})},I_=mR;var bi=x(O());var A_=x(O()),Hc=x($());var tt={root:"_root_pc5uy_1",list:"_list_pc5uy_2",listWrapper:"_listWrapper_pc5uy_6",listHorizontal:"_listHorizontal_pc5uy_10",page:"_page_pc5uy_19",search:"_search_pc5uy_25",pageNav:"_pageNav_pc5uy_33",pageTitle:"_pageTitle_pc5uy_41",pageBackButton:"_pageBackButton_pc5uy_48",listHeading:"_listHeading_pc5uy_62",listItem:"_listItem_pc5uy_70",listItemContent:"_listItemContent_pc5uy_79",listItemText:"_listItemText_pc5uy_97",listItemDescription:"_listItemDescription_pc5uy_105",listItemActions:"_listItemActions_pc5uy_112",truncate:"_truncate_pc5uy_123",lineClamp:"_lineClamp_pc5uy_129",listItemTitle:"_listItemTitle_pc5uy_136",listItemAction:"_listItemAction_pc5uy_112",listItemPrimaryAction:"_listItemPrimaryAction_pc5uy_157",listItemSelected:"_listItemSelected_pc5uy_162",sources:"_sources_pc5uy_166",sourcesTitle:"_sourcesTitle_pc5uy_173",source:"_source_pc5uy_166",icon:"_icon_pc5uy_188",searchIcon:"_searchIcon_pc5uy_205",searchInputWrapper:"_searchInputWrapper_pc5uy_210",searchInput:"_searchInput_pc5uy_210",select:"_select_pc5uy_231",selectType:"_selectType_pc5uy_248",selectWrapper:"_selectWrapper_pc5uy_252",image:"_image_pc5uy_282",imageSrc:"_imageSrc_pc5uy_289",imageSrcHidden:"_imageSrcHidden_pc5uy_300",imageSrcStatus:"_imageSrcStatus_pc5uy_304",imageTitle:"_imageTitle_pc5uy_314",actions:"_actions_pc5uy_319",actionsWrapper:"_actionsWrapper_pc5uy_323",actionsBar:"_actionsBar_pc5uy_329",actionButton:"_actionButton_pc5uy_338",actionShortcut:"_actionShortcut_pc5uy_356",actionShortcutFixKerning:"_actionShortcutFixKerning_pc5uy_363"};var io={};Ie(io,{enUS:()=>yR,nlNL:()=>vR});var yR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},vR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var Sr=x(w()),SR=({src:e,title:t})=>{let n=k("CommandPalette",tt),[r,o]=(0,A_.useState)("loading"),i=B(io);return(0,Sr.jsxs)("div",{className:n.image,children:[(0,Sr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Hc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Sr.jsx)("span",{className:(0,Hc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Sr.jsx)("span",{className:(0,Hc.default)(n.imageSrc,n.imageSrcStatus),children:(0,Sr.jsx)(Qa,{})}),t&&(0,Sr.jsx)("span",{className:n.imageTitle,children:t})]})},L_=SR;var O_=x(O()),N_=x($());var ga=x(w());function xg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",tt);return O_.default.Children.count(e)===0?null:(0,ga.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,ga.jsx)("h4",{className:r.listHeading,children:t}),(0,ga.jsx)("div",{className:(0,N_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ha=x($());var zc=x(O()),F_=x(w()),M_=zc.default.createContext(void 0);function xr(){let e=zc.default.useContext(M_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var D_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=zc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,F_.jsx)(M_.Provider,{value:s,children:e})};var Re=x(O()),j_=x($());var _g={root:"_root_1oh4w_1",trigger:"_trigger_1oh4w_5",content:"_content_1oh4w_19",contentOpen:"_contentOpen_1oh4w_33",contentTop:"_contentTop_1oh4w_37",contentBottom:"_contentBottom_1oh4w_41",item:"_item_1oh4w_45"};var so=x(w()),xR=0,B_=Re.default.createContext(null),_R=()=>{let e=(0,Re.useContext)(B_);if(!e)throw new Error("Invalid DropdownContext");return e},H_=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Re.useMemo)(()=>++xR,[]),o=(0,Re.useRef)(null),i=(0,Re.useRef)(null),s=k("Dropdown",_g),[a,l]=(0,Re.useState)(!1),[u,c]=(0,Re.useState)(n),p=h=>{h.preventDefault(),h.stopPropagation(),l(!a)},d=(0,Re.useCallback)(([h])=>{!h.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Re.useEffect)(()=>{let h=v=>{o.current&&!o.current.contains(v.target)&&l(!1)};return document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}},[]),(0,Re.useEffect)(()=>{if(!i.current&&!a)return()=>{};let h=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&h.observe(i.current),()=>{i.current&&h.unobserve(i.current)}},[i,a]),(0,so.jsx)(B_.Provider,{value:{setIsOpen:l},children:(0,so.jsxs)("div",{ref:o,className:s.root,children:[(0,so.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:p,children:e}),(0,so.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,j_.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function wR({as:e,children:t,onClick:n,...r}){let o=e||"button",i=k("Dropdown",_g),{setIsOpen:s}=_R(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,so.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}H_.Item=wR;var wg=H_;var bg=x(w()),z_=e=>(0,bg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,bg.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var ao={};Ie(ao,{enUS:()=>bR,nlNL:()=>ER});var bR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},ER={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Uc=x(w()),CR="%0d%0a%0d%0a%0d%0a",TR=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(CR)}`},kR=({suggestion:e,onFeedback:t})=>{let n=B(ao),r=M("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Uc.jsx)(wg,{trigger:(0,Uc.jsx)(z_,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Uc.jsx)(wg.Item,{as:"a",href:TR(r,e),onClick:t,children:n("giveFeedback")})})},Vc=kR;var ut=x(w());function Eg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,index:s,description:a,sources:l,styles:u,...c}){let{selected:p,setSelected:d,onChangeOpen:h}=xr(),v=k("CommandPalette",tt);function y(m){r(m),e&&h(!1)}return(0,ut.jsxs)("div",{className:(0,ha.default)(v.listItem,p===s&&v.listItemSelected),children:[(0,ut.jsx)("button",{onMouseEnter:()=>d(s),type:"button",className:(0,ha.default)("command-palette-list-item",v.listItemAction,v.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:y,...c,children:(0,ut.jsxs)("div",{className:v.listItemContent,children:[typeof n=="string"?(0,ut.jsx)("p",{className:(0,ha.default)(v.listItemText,v.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,ut.jsx)("p",{className:(0,ha.default)(v.listItemDescription,u==null?void 0:u.description,t?v.lineClamp:v.truncate),children:a})]})}),o&&p===s&&(0,ut.jsx)("div",{className:v.listItemActions,children:(0,ut.jsx)(Vc,{suggestion:String(n),onFeedback:o})}),l&&(0,ut.jsxs)("div",{className:v.sources,children:[(0,ut.jsx)("span",{className:v.sourcesTitle,children:"Sources"}),l.map(m=>m.url?(0,ut.jsx)("a",{className:v.source,href:m.url,target:"_blank",title:m.url,rel:"noopener noreferrer",onClick:()=>i&&i(m),children:m.name},m.url):(0,ut.jsx)("span",{className:v.source,children:m.name},m.name))]})]})}var lo=x(w());function Cg({children:e,title:t,id:n,onDismiss:r}){let o=B(io),i=k("CommandPalette",tt),{page:s}=xr();return s!==n?null:(0,lo.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,lo.jsxs)("div",{className:i.pageNav,children:[(0,lo.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,lo.jsx)(Tc,{}),o("back")]}),t&&(0,lo.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var _r=x(O());var Kc=()=>/Mac/i.test(navigator.platform);var PR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},V=PR;function RR(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function re(e){return Array.isArray(e)?e.map(re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[RR(n)]:re(e[n])}),{}):e}function Tg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function be(e){return Array.isArray(e)?e.map(be):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Tg(n)]:be(e[n])}),{}):e}var IR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},va=e=>{var t,n,r;return{timezone:((t=e.info.visitorInfo)==null?void 0:t.visitorTimeZone)||Intl.DateTimeFormat().resolvedOptions().timeZone,agentName:((n=e.info.agentInfo)==null?void 0:n.agentNickname)||"",visitorName:((r=e.info.visitorInfo)==null?void 0:r.visitorName)||""}},ya=D("info/setAgentInfo",async(e,t)=>{let{deepdeskAPI:n}=t.extra;if(!e.agentId&&!e.agentNickname)throw new Error("At least provide agentId or agentNickname");let r=await n.client.get("/apis/admin/session/me/",{version:null}),o={};return r.external_id||(o.external_id=e.agentId),r.nickname||(o.nickname=e.agentNickname),!o.external_id&&!o.nickname?re(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),re(r))}),kg=D("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),Pg=D("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),U_=e=>e.info.agentInfo,V_=j({name:"info",initialState:IR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ya.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ya.rejected,t=>{t.fetchState="error"}).addCase(ya.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo={...t.agentInfo,...n.meta.arg,agentId:n.payload.externalId||n.meta.arg.agentId||"",agentNickname:n.payload.nickname||n.meta.arg.agentNickname||""}}).addCase(kg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Pg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:K_}=V_.actions,W_=V_.reducer;var Wc={list:[],fetchState:"idle",isOpen:!1,page:"search"},$_=e=>e.search.isOpen,q_=e=>e.search.page,G_=e=>e.search.list;function X_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var uo=D("search/getAll",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i}=await n.search({profile:o,query:e.query,filters:{type:e.type},params:va(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),Q_=j({name:"search",initialState:Wc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Wc.fetchState,e.list=Wc.list}},extraReducers:e=>{e.addCase(uo.pending,t=>{t.fetchState="loading"}).addCase(uo.rejected,(t,n)=>{t.fetchState="error",V.error(n.error)}).addCase(uo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>Wc)}}),{resetSearch:$c,setIsOpen:ct,setPage:We}=Q_.actions,Y_=Q_.reducer;var AR=/(https?:\/\/[^\s]+)/,qc=e=>e.split(" ").find(t=>AR.test(t));var Rg=x($());var Gc=x(w()),LR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",tt);return(0,Gc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Rg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Gc.jsx)("span",{className:(0,Rg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},_i=LR;var kn=x(w()),OR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",tt),a=B(io),{selected:l,setSelected:u}=xr(),c=i[l],p=c&&typeof c.text=="string"&&qc(c.text),d=(0,_r.useRef)(null);function h(S){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),b=0,E=0;S==="down"?(_.forEach((R,P)=>{P===l&&(b=P)}),E=b===_.length-1?0:b+1):S==="up"?(_.forEach((R,P)=>{P===l&&(b=P)}),E=b?b-1:_.length-1):u(0);let C=_[E];C&&typeof E=="number"&&(u(E),C.scrollIntoView&&C.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function v(){if(!d.current)return;let S=d.current.querySelectorAll(".command-palette-list-item"),_=0;S.forEach((E,C)=>{C===l&&(_=C)});let b=S[_];b&&b.click()}let y=()=>{p&&window.open(p,"_blank")},m=()=>{c&&r(c,l)},g=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,_r.useCallback)(S=>{if(S.key==="Enter"&&S.altKey&&p){y();return}if(S.key==="Enter"&&S.shiftKey){g();return}if(S.key==="ArrowDown"){S.preventDefault(),S.stopPropagation(),h("down");return}if(S.key==="ArrowUp"){S.preventDefault(),S.stopPropagation(),h("up");return}S.key==="Enter"&&l!==-1&&(S.preventDefault(),S.stopPropagation(),v())},[l]);return(0,_r.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,kn.jsxs)("div",{className:s.actions,children:[(0,kn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,kn.jsxs)("div",{className:s.actionsBar,children:[p&&(0,kn.jsx)(_i,{onClick:y,shortKeys:[Kc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,kn.jsxs)(_r.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,kn.jsx)(_i,{onClick:g,shortKeys:[8679,8629],children:n}),(0,kn.jsx)(_i,{onClick:m,shortKeys:[8629],children:t})]})]})]})},J_=OR;var ew=x(O());var Sa=x(w()),wi=()=>(0,Sa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Sa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Sa.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})]});var Ht=x(w());function NR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",tt);return(0,Ht.jsxs)("div",{className:l.search,children:[(0,Ht.jsx)("div",{className:l.searchIcon,children:(0,Ht.jsx)(wi,{})}),(0,Ht.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ht.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,Ht.jsx)("div",{className:l.selectWrapper,children:(0,Ht.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:u=>t(u.target.value===r?void 0:u.target.value),value:s||r,children:[r&&(0,Ht.jsx)("option",{children:r}),o.map(u=>(0,Ht.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var tw=(0,ew.forwardRef)(NR);var xa=x(w());function co({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:p,search:d}){let[h,v]=(0,bi.useState)(0),y=(0,bi.useRef)(null),m=()=>{o&&o(n),s(void 0),i(""),a(!1)},g=()=>{var f;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(f=y.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,bi.useEffect)(()=>{v(0)},[d,r]),(0,xa.jsx)(mi,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:g,onClose:m,children:(0,xa.jsxs)(D_,{selected:h,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,xa.jsx)(tw,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}co.Page=Cg;co.List=xg;co.Image=L_;co.ListItem=Eg;co.ActionsBar=J_;co.Button=_i;var te=co;var He=x(w()),MR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",Jx),l=U(),u=B(qm),c=A(v=>v.overlayInput.text);(0,Ig.useEffect)(()=>{e&&(l(Je.actions.reset()),l(Je.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Je.actions.commitSuggestion()))},[e]);let p=v=>{v.preventDefault(),d(c)},d=v=>{l(uc(v)),t(v)},h=v=>y=>{c!==s?window.confirm(u("warning"))&&v(y):v(y)};return(0,Ig.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,He.jsxs)("div",{className:a.root,children:[(0,He.jsxs)("div",{className:a.content,children:[e.title&&(0,He.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,He.jsx)(Bd,{labels:e.searchKeywords}),(0,He.jsx)(I_,{onUse:d,value:c})]}),(0,He.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,He.jsxs)("div",{children:[(0,He.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&h(i),children:(0,He.jsx)(Tc,{})}),(0,He.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&h(o),children:(0,He.jsx)(u_,{})})]}),(0,He.jsxs)("div",{className:a.primaryButtons,children:[(0,He.jsx)(te.Button,{onClick:h(n),shortKeys:["esc"],children:u("dismiss")}),(0,He.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},Xc=MR;var DR=["{amount}"," {amount}","{date}","{email}","{iban}","{name}","{postal_code}","{street}","{tarif}","{usage}","{3_digits}","{4_digits}","{5_digits}","{6_digits}","{7_digits}","{8_digits}","{9_digits}","{10_digits}"],FR=new RegExp(DR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function nw(e,t){let n=e.split(FR),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let p=a.charAt(0),d=0;do u=p?t.indexOf(p,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function rw(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var iw={suggestions:[],fetchState:"idle",isInitialRequest:null},ow={default:iw},sw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},aw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},lw=e=>{let t=Object.keys(e.textSuggestions).map(n=>{var r;return(r=e.textSuggestions[n])==null?void 0:r.fetchState});return t.length===0?!0:t.every(n=>n!=="done")},Ei=e=>e.textSuggestions,uw=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Qc=fe("textSuggestions/refresh"),Pn=D("textSuggestions/recommendations",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=pi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,va(r),e);if(e==="default"){let c=s?l.filter(uw(a)):l;t.dispatch(on(c.slice(0,i)))}return l}),_a=D("textSuggestions/autocompletions",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,deanonymize:s,inlineSuggestions:a}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getAutocompleteSuggestions(o,{...va(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(uw(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?nw(c.text,e):c.text}))),l=rw(l,i),t.dispatch(on(l)),l}),cw=j({name:"textSuggestions",initialState:ow,reducers:{setTextSuggestions:{reducer(e,t){let{contentType:n}=t.payload;e[n].fetchState="done",e[n].suggestions=t.payload.suggestions},prepare(e,t){return{payload:{contentType:e,suggestions:t}}}},setSuggestionState(e,t){return t.payload}},extraReducers:e=>{e.addCase(Pn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||iw;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Pn.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Pn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(_a.pending,t=>{t.default.fetchState="loading"}).addCase(_a.rejected,t=>{t.default.fetchState="error"}).addCase(_a.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>ow)}}),{setTextSuggestions:dw,setSuggestionState:pw}=cw.actions,fw=cw.reducer;var mw={contentType:null,suggestion:null},gw=e=>e.activeSuggestion.suggestion,hw=e=>e.activeSuggestion.contentType,yw=j({name:"activeSuggestion",initialState:mw,reducers:{setActiveSuggestion(e,t){let{contentType:n,suggestion:r}=t.payload;e.contentType=n,e.suggestion=r},resetActiveSuggestion(e){e.contentType=null,e.suggestion=null}},extraReducers:e=>{e.addCase(J,()=>mw)}}),{setActiveSuggestion:Rn,resetActiveSuggestion:Ag}=yw.actions,vw=yw.reducer;var Lg={};Ie(Lg,{enUS:()=>jR,nlNL:()=>BR});var jR={warning:[{type:0,value:"Are you sure you want to discard the message?"}],editContentLabel:[{type:0,value:"Edit and view suggestion"}],overlayLabel:[{type:0,value:"Close dialog"}]},BR={warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}],editContentLabel:[{type:0,value:"Bewerk en bekijk suggestie"}],overlayLabel:[{type:0,value:"Sluit"}]};var HR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Yc=({ui:e})=>e.overlayCollapsed;var Sw=j({name:"ui",initialState:HR,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputHasFocus(e,t){e.overlayCollapsedUserOverwrite!==!0&&(t.payload===!0&&(e.overlayCollapsed=!1),e.inputHasFocus=t.payload)},setOverlayCollapsed(e,t){t.payload.collapse===!1&&(e.openOverlayWhenTyping=!1),!(t.payload.skipWhenInputFocus&&e.inputHasFocus)&&(e.overlayCollapsed=t.payload.collapse)},setOpenOverlayWhenTyping(e,t){e.openOverlayWhenTyping=t.payload},setOverlayCollapsedUserOverwrite(e,t){e.overlayCollapsedUserOverwrite=t.payload,e.overlayCollapsed=t.payload}}}),{setShowTabHint:wa,setInputHasFocus:Ci,setOverlayCollapsed:wr,setOpenOverlayWhenTyping:xw,setOverlayCollapsedUserOverwrite:_w}=Sw.actions,ww=Sw.reducer;var ba=x(O()),Ew=x(w()),bw=ba.default.createContext(null),Ti=({broadcastEvents:e,children:t})=>{let n=ba.default.useMemo(()=>e,[]);return(0,Ew.jsx)(bw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,ba.useContext)(bw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var zR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},zt=e=>e.auth.isLoggedIn,Cw=e=>e.auth.loginFetchState,Tw=e=>e.auth.verifyFetchState,kw=e=>e.auth.showLoginOverlay,br=D("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Pw=D("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Ea=D("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Rw=j({name:"auth",initialState:zR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(br.pending,t=>{t.loginFetchState="loading"}),e.addCase(br.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(br.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Ea.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Ea.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Ea.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:ki,setShowLoginOverlay:Iw}=Rw.actions,Aw=Rw.reducer;var Og="SetActiveSuggestion",Pi="ShowLoginOverlay",Ng="UserLoggedIn",UR="UserLoggedOut",In="ApplySuggestion",Mg="ApplyImageSuggestion",VR="ShowCommandPalette",KR=e=>({[Og]:t=>{e.dispatch(pw(t.state)),e.dispatch(Rn({contentType:t.contentType,suggestion:t.suggestion}))},[VR]:t=>{e.dispatch(ct(t.isOpen)),t.page&&e.dispatch(We(t.page))},[Pi]:t=>{e.dispatch(Iw(t))},[Ng]:()=>{e.dispatch(br())},[UR]:()=>{e.dispatch(br())},[Mg]:t=>{e.dispatch(dc({suggestion:t.suggestion}))},[In]:t=>{e.dispatch(Ft({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(yr())}}),Lw=KR;var Dg=x(w()),WR=()=>{var v;let[e,t]=(0,Ow.useState)(!1),n=A(gw),r=A(hw),o=A(Ei),i=U(),s=Pt(),a=B(Lg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(Ag()),i(Ci(!0)),i(Je.actions.reset())},c=(y,m)=>{i(Ag()),i(Ci(!0)),s.send(In,{text:y,suggestion:{...m,source:`${m.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let p=(v=o[r])==null?void 0:v.suggestions.indexOf(n),d=p===0||p===null?void 0:()=>i(Rn({contentType:r,suggestion:o[r].suggestions[p-1]})),h=p===o[r].suggestions.length-1||p===null?void 0:()=>i(Rn({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,Dg.jsx)(mi,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Dg.jsx)(Xc,{onTouched:t,onDismiss:u,onUse:y=>c(y,n),suggestion:n,onNext:h,onPrevious:d})})},Nw=WR;var Zc=x($()),Ut=x(O());var Dw=x($());var Mw={root:"_root_1ukx5_1"};var Fw=x(w()),$R=({className:e,value:t,...n})=>{let r=k("TextInput",Mw);return(0,Fw.jsx)("input",{className:(0,Dw.default)(e,r.root),type:"text",value:t,...n})},Ca=$R;var Fg={};Ie(Fg,{enUS:()=>qR,nlNL:()=>GR});var qR={back:[{type:0,value:"Back"}],promptTitle:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Paste the code from your email"}],verifyCodeBody:[{type:0,value:"Copy the code from the email you just received and paste it here."}],verifyCodeInputPlaceholder:[{type:0,value:"Paste link or code here"}],verifyCodeSubmitLabel:[{type:0,value:"Sign in"}],verifyCodeError:[{type:0,value:"Sign in failed. The code is probably no longer valid. Please "},{type:8,value:"login",children:[{type:0,value:"request new code"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Have a code sent to your email"}],requestCodeBody:[{type:0,value:"Enter your email and request a code. If you are an existing "},{type:1,value:"productName"},{type:0,value:" user you will receive an email with a code. If you are a new user you will receive an email asking to request access to "},{type:1,value:"productName"},{type:0,value:" first."}],requestCodeInputPlaceholder:[{type:0,value:"Enter your email"}],requestCodeSubmitLabel:[{type:0,value:"Request code"}]},GR={back:[{type:0,value:"Terug"}],promptTitle:[{type:0,value:"Login bij "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Plak de code uit je email"}],verifyCodeBody:[{type:0,value:"Kopieer de code uit de email en plak deze hier."}],verifyCodeInputPlaceholder:[{type:0,value:"Plak hier de code"}],verifyCodeSubmitLabel:[{type:0,value:"Inloggen"}],verifyCodeError:[{type:0,value:"Inloggen is niet gelukt. De code is waarschijnlijk niet meer geldig. "},{type:8,value:"login",children:[{type:0,value:"Vraag een nieuwe code aan"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Verstuur een login code naar je email"}],requestCodeBody:[{type:0,value:"Voer je e-mailadres in en krijg een login code. Als je een bestaande "},{type:1,value:"productName"},{type:0,value:" gebruiker bent krijg je een email met een code. Als je een nieuwe gebruiker bent wordt er een email verstuurd met een toegangsverzoek voor "},{type:1,value:"productName"},{type:0,value:"."}],requestCodeInputPlaceholder:[{type:0,value:"Typ hier je e-mailadres"}],requestCodeSubmitLabel:[{type:0,value:"Code aanvragen"}]};var jw={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var ye=x(w());var XR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},QR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=B(Fg),s=k("LoginTokenDialog",jw),a=A(Tw),l=U(),u=M("productName"),[c,p]=(0,Ut.useState)(e||""),[d,h]=(0,Ut.useState)(0),[v,y]=(0,Ut.useState)(""),m=(0,Ut.useCallback)(async _=>{_.preventDefault(),l(Pw({email:c})),h(1)},[n,c]),g=()=>{y(""),h(0)},f=(0,Ut.useCallback)(async _=>{_.preventDefault();let b=XR(_.target.elements.token.value);if(!b){y(i("verifyCodeError",{login:S}));return}l(Ea({token:b}))},[n]),S=(0,Ut.useMemo)(()=>_=>(0,ye.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:g,children:_},"back-button"),[]);return(0,Ut.useEffect)(()=>{a==="error"&&y(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,ye.jsx)(mi,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,ye.jsxs)("div",{className:s.root,children:[(0,ye.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,ye.jsxs)("form",{onSubmit:m,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,ye.jsx)(Ca,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>p(_.target.value)}),(0,ye.jsx)("div",{className:s.actions,children:(0,ye.jsx)("button",{type:"submit",className:(0,Zc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,ye.jsxs)("form",{onSubmit:f,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,ye.jsx)(Ca,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,ye.jsx)("div",{className:s.errorMessage,children:v}),(0,ye.jsxs)("div",{className:s.actions,children:[(0,ye.jsx)("button",{type:"button",className:(0,Zc.default)(s.button),onClick:g,children:i("back")}),(0,ye.jsx)("button",{type:"submit",className:(0,Zc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Bw=QR;var zw=x(w()),YR=()=>{let e=A(kw),t=A(U_),n=M("adminUrl"),r=Pt(),o=()=>r.send(Pi,!1),i=()=>{r.send(Pi,!1),r.send(Ng)};return(0,zw.jsx)(Bw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Hw=YR;var f1=x(Hg()),$e=x(O());var gI={data:null,fetchState:"idle"},Ww=e=>e.contentTypes.data,Ta=D("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),hI=j({name:"contentTypes",initialState:gI,reducers:{},extraReducers:e=>{e.addCase(Ta.pending,t=>{t.fetchState="loading"}).addCase(Ta.rejected,t=>{t.fetchState="error"}).addCase(Ta.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),$w=hI.reducer;function ka(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove()}var qw=x(O());function Gw(e,t){(0,qw.useEffect)(()=>{let n=r=>{var o;((o=navigator==null?void 0:navigator.platform)!=null&&o.toLowerCase().includes("mac")?r.metaKey:r.ctrlKey)&&r.key===e&&(r.preventDefault(),r.stopPropagation(),t())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[])}var Pa=x(O());var Xw={data:null,fetchState:"idle"},Jc=e=>{var i;let t=[],{visitorName:n}=e.info.visitorInfo??{},{agentName:r,agentNickname:o}=e.info.agentInfo??{};return r&&r!==n&&t.push(r),o&&o!==n&&t.push(o),((i=e.entities.data)==null?void 0:i.filter(s=>!t.includes(s.text)))??null},Vt=D("entities/getEntities",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=await o();return i.length===0?Promise.resolve([]):n.getEntities(i)}),yI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),vI=j({name:"entities",initialState:Xw,reducers:{},extraReducers:e=>{e.addCase(Vt.pending,t=>{t.fetchState="loading"}).addCase(Vt.rejected,t=>{t.fetchState="error"}).addCase(Vt.fulfilled,(t,n)=>{t.fetchState="done",t.data=yI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Xw)}}),Qw=vI.reducer;var zg={};Ie(zg,{enUS:()=>SI,nlNL:()=>xI});var SI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},xI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var Yw={root:"_root_17kae_1",empty:"_empty_17kae_5"};var po=x(w()),_I=({onCopy:e,onUse:t})=>{let n=(0,Pa.useRef)(null),r=k("EntitiesList",Yw),o=B(zg),i=A(Jc),s=U();return(0,Pa.useEffect)(()=>{s(Vt())},[]),(0,Pa.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,po.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,po.jsx)(te.ActionsBar,{primaryLabel:o("copy"),secondaryLabel:o("use"),onPrimary:(a,l)=>e(i[l]),onSecondary:(a,l)=>t(i[l]),list:i.map(a=>({text:a.text,type:a.label,primaryAction:"copy",secondaryAction:"use"})),children:(0,po.jsx)(te.List,{children:i.map((a,l)=>(0,po.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,po.jsx)("p",{className:r.empty,children:o("noResults")})]})},Zw=_I;var Kt=x(O());var Jw={data:null,fetchState:"idle"},e1=e=>e.summary.data,t1=e=>e.summary.fetchState==="error",An=D("summary/getSummary",async(e,t)=>{let n=t.getState().profile.data;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:r,dynamicThunkObject:o}=t.extra;if(!o.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let i=o.conversationQuery,s=await i();return s.length===0?Promise.reject(new Error("No messages are included")):{summary:await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel})}}),wI=j({name:"summary",initialState:Jw,reducers:{},extraReducers:e=>{e.addCase(An.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(An.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(An.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>Jw)}}),n1=wI.reducer;var Ug={};Ie(Ug,{enUS:()=>bI,nlNL:()=>EI});var bI={copy:[{type:0,value:"Copy"}],error:[{type:0,value:"Could not generate a summary"}],loading:[{type:0,value:"Generating summary, this may take a few moments."}]},EI={copy:[{type:0,value:"Kopieer"}],error:[{type:0,value:"Kon helaas geen samenvatting genereren."}],loading:[{type:0,value:"Samenvatting wordt gemaakt, dit kan even duren."}]};var r1={root:"_root_6ahh3_1",actions:"_actions_6ahh3_5",main:"_main_6ahh3_11",textInput:"_textInput_6ahh3_15",loading:"_loading_6ahh3_34",error:"_error_6ahh3_38"};var Ln=x(w()),CI=({onCopy:e})=>{let t=(0,Kt.useRef)(null),n=k("SummaryForm",r1),[r,o]=(0,Kt.useState)(""),i=B(Ug),s=A(e1),a=A(t1),l=U(),u=()=>{l(je({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(je({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Kt.useEffect)(()=>{l(An())},[]),(0,Kt.useEffect)(()=>{o(s||"")},[s]),(0,Kt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Kt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,Ln.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Ln.jsx)("p",{className:n.error,children:i("error")}):(0,Ln.jsxs)(Kt.Fragment,{children:[(0,Ln.jsx)("div",{className:n.main,children:(0,Ln.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:p=>o(p.target.value)})}),(0,Ln.jsx)("div",{className:n.actions,children:(0,Ln.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},o1=CI;var Vg={};Ie(Vg,{enUS:()=>TI,nlNL:()=>kI});var TI={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},kI={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Er=x(O());var Kg={};Ie(Kg,{enUS:()=>PI,nlNL:()=>RI});var PI={use:[{type:0,value:"Use"}],loading:[{type:0,value:"Loading..."}],error:[{type:0,value:"Something went wrong, please try again later."}],anotherQuestion:[{type:0,value:"Send a message..."}],reset:[{type:0,value:"Reset conversation"}]},RI={use:[{type:0,value:"Gebruik"}],loading:[{type:0,value:"Laden..."}],error:[{type:0,value:"Er ging iets mis, probeer het later opnieuw."}],anotherQuestion:[{type:0,value:"Stuur een bericht..."}],reset:[{type:0,value:"Reset gesprek"}]};var i1={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var Wg={data:[],fetchState:"idle"},s1=e=>{var t;return(t=e.answer)==null?void 0:t.data},a1=e=>e.answer.fetchState,Ii=fe("answer/resetKnowledgeSearch"),Ri=D("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeAssist({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),II=j({name:"answer",initialState:Wg,reducers:{},extraReducers:e=>{e.addCase(Ri.pending,t=>{t.fetchState="loading"}).addCase(Ri.rejected,t=>{t.fetchState="error"}).addCase(Ri.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Wg).addCase(Ii,()=>Wg)}}),l1=II.reducer;var Ra=x(w()),u1=()=>(0,Ra.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ra.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ra.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var nt=x(w()),AI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Er.default.useState(""),{setSelected:s}=xr(),a=(0,Er.useRef)(null),l=k("EntitiesList",i1),u=B(Kg),c=U(),p=A(s1),d=A(a1),h=async y=>{y.preventDefault(),y.stopPropagation(),o!==""&&c(Ri({question:o,promptInstruction:r}))},v=(y,m)=>{c(je({name:"knowledge assist source viewed",data:{question:m,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,Er.useEffect)(()=>{var y;n&&d==="idle"?c(Ri({question:n,promptInstruction:r})):(y=a.current)==null||y.focus()},[a,d]),(0,Er.useEffect)(()=>{d==="done"&&(c(je({name:"knowledge assist question answered",data:{question:o||n,sources:p[p.length-1].answer.sources,answer:p[p.length-1].answer.answer,isFollowUpQuestion:p.length>1},options:{includeConversationData:!0}})),s(p.length-1),i(""))},[d,p]),(0,Er.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,p]),(0,nt.jsxs)("div",{className:l.root,children:[p.length>0&&(0,nt.jsx)("div",{className:l.alignRight,children:(0,nt.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,nt.jsxs)(te.ActionsBar,{list:p.map(({answer:y})=>({text:y.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:y=>e(y.text),children:[p.map(({question:y,answer:m},g)=>(0,nt.jsx)(te.List,{children:(0,nt.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:g,description:m.answer,closeOnSelect:!0,onClick:()=>e(m.answer),onSourceClick:f=>v(f,y),sources:m.sources,styles:{title:l.question,description:l.answer},children:y})},`${m.answer}_${g}`)),d==="loading"&&(0,nt.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,nt.jsx)("p",{className:l.status,children:u("error")}),(0,nt.jsxs)("form",{className:l.form,onSubmit:h,children:[(0,nt.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:y=>{s(-1),i(y.target.value)}}),(0,nt.jsx)("button",{type:"submit",className:l.submit,children:(0,nt.jsx)(u1,{})})]})]})]})},c1=AI;var LI={data:null,fetchState:"idle"},Ai=e=>e.profile.data,ed=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ia=D("profile/getProfile",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)}),OI=j({name:"profile",initialState:LI,reducers:{},extraReducers:e=>{e.addCase(Ia.pending,t=>{t.fetchState="loading"}).addCase(Ia.rejected,t=>{t.fetchState="error"}).addCase(Ia.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),d1=OI.reducer;var Ee=x(w()),NI=200,MI=5,DI=4,FI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),p1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),jI=()=>{let e=U(),t=Pt(),n=B(Vg),[r,o]=(0,$e.useState)(!1),[i,s]=(0,$e.useState)(""),a=A(q_),l=A(Ai),[u,c]=(0,$e.useState)(null),[p,d]=(0,$e.useState)([]),[h,v]=(0,$e.useState)(),y=A(zt),m=M("showSearch"),g=M("showEntitiesCommand"),f=M("showSummaryCommand"),S=M("showKnowledgeSearch"),_=M("showImageSearch"),b=M("searchTriggerKey"),E=A(Ww),C=A(G_),R=A($_),P=I=>yo(C.filter(X=>X.type===I.toUpperCase()),I),N=[{value:"PERSONAL",label:n("personalSuggestions"),list:P("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:P("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:P("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:P("IMAGE"),listOrientation:"horizontal",shouldShow:_}].filter(I=>I.shouldShow),H=[{label:n("entitiesClipboard"),onClick:()=>e(We("entities")),shouldShow:g&&p1(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(We("summary")),shouldShow:f&&p1(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(We("knowledgeAssist")),shouldShow:S}].filter(I=>I.shouldShow),z=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],Ue=(0,$e.useCallback)((0,f1.default)((I,X)=>{e(uo({query:I,type:X,tags:["search-overlay"]}))},NI),[]),cn=FI([...z,...N]),qt=(0,$e.useCallback)((I,X)=>{if(!X)return;let Xt=[...N,...z].find(({value:At})=>At===X);Xt&&(e(We("edit")),c({...I,searchTerm:void 0}),d(Xt.list))},[e,u,z]),ho=(0,$e.useCallback)((I,X)=>{switch(X.type){case"IMAGE":t.send(Mg,{suggestion:X});break;default:t.send(In,{text:I,suggestion:X})}e(ct(!1))},[e]),Ui=I=>{ka(I.text),e(je({name:"entity copied",data:{entity:I,type:"copy"}})),e(ct(!1))},Ir=(0,$e.useCallback)(I=>{e(je({name:"suggestion feedback",data:{text:I.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),Ua=I=>{t.send(In,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(je({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(We("search")),e(Ii()),e(ct(!1))},Va=I=>{ka(I),e(ct(!1))},Vi=I=>{t.send(In,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(ct(!1))},Ki=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Ar=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function yo(I,X){return I.slice(0,h?10:X.toLowerCase()==="image"?DI:MI)}function Rd(I,X,Xt){return X.reduce((At,Hn)=>Xt&&h===Xt?Hn.length+At:yo(Hn,Xt).length+At,I)}function Gt(I){return X=>{r?window.confirm(n("warning"))&&(I(X),o(!1)):I(X)}}return(0,$e.useEffect)(()=>{i?Ue(i,h):e($c())},[i,h]),(0,$e.useEffect)(()=>{a==="search"&&e(Ii())},[a]),(0,$e.useEffect)(()=>{y&&e(Ta())},[y]),Gw(b,()=>e(ct(!0))),!m||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Gt(I=>e(ct(I))),onChangeType:I=>v(I),onChangePage:Gt(I=>e(We(I))),selectedType:h,search:i,page:a,isOpen:R,types:[...z,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...H.map(I=>({text:I.label,type:"command"})),...cn.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},X)=>ho(I,cn[X]),onSecondary:(I,X)=>{qt(cn[X-H.length],cn[X-H.length].type)},children:[H.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:H.map((I,X)=>(0,Ee.jsx)(te.ListItem,{index:Rd(X,[],"commands"),closeOnSelect:!1,onClick:I.onClick,children:I.label},I.label))}),[...z,...N].map(({value:I,label:X,list:Xt,lineClamp:At,listOrientation:Hn},Th)=>(0,Ee.jsx)(te.List,{heading:X,orientation:Hn==="horizontal"?"horizontal":"vertical",children:yo(Xt,I).map((ce,Lr)=>(0,Ee.jsx)(te.ListItem,{index:Rd(H.length+Lr,[...z,...N].slice(0,Th).map(({list:gE})=>gE),I),closeOnSelect:!1,lineClamp:At,onClick:()=>ho(ce.text,ce),description:I!=="IMAGE"?ce.title&&ce.text:void 0,onFeedback:I!=="IMAGE"?()=>Ir(ce):void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ce.title||ce.text,src:ce.image}):ce.title||ce.text},`${ce.id}-${ce.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Gt(()=>{e(We("search")),c(null)}),children:u&&(0,Ee.jsx)(Xc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(We("search")),c(null),d([])},onNext:Ar,onPrevious:Ki,onUse:I=>{e(We("search")),ho(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(ct(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Gt(()=>{e(We("search"))}),children:(0,Ee.jsx)(Zw,{onUse:Vi,onCopy:Ui})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Gt(()=>{e(We("search"))}),children:(0,Ee.jsx)(o1,{onCopy:Va})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Gt(()=>{e(Ii()),e(We("search"))}),children:(0,Ee.jsx)(c1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Ua,onResetQuestion:()=>{e(Ii()),s("")}})})]})},m1=jI;var Li=x(w()),BI=()=>{let e=M("showSearch"),t=M("isEmbedded");return(0,Li.jsxs)(g1.Fragment,{children:[e&&(0,Li.jsx)(m1,{}),(0,Li.jsx)(Nw,{}),t&&(0,Li.jsx)(Hw,{})]})},h1=BI;function Oi(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input.userCommitted;return i.start!==i.end?!1:i.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(i.end))||r&&new RegExp(r).test(o.substring(0,i.end))?!0:n===!1&&r===!1:!1}var td=x(O());var Mi=x(O());var y1=x(O());function v1(e,t,n){(0,y1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var HI=/[.*+?^${}()|[\]\\]/g,zI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function UI(e){return e.replace(HI,"\\$&")}function VI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function KI(e){return e.search(zI)}function S1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${UI(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function x1(e){return e.replace(bo,'<mark data-type="placeholder">$1</mark>')}function Ni(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function WI(e,t){return e.split("").map((s,a)=>({char:s,index:a})).filter(({char:s,index:a})=>/\s/.test(s)&&a<=t).map(({index:s})=>s).reverse()[0]}function $g(e,t,n={}){if(t){let r=VI(t.toLowerCase(),e.toLowerCase()),o=Ni(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=KI(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(gy).length>3||t.length>30?WI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ni(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var _1={root:"_root_4u430_1",actions:"_actions_4u430_8",badge:"_badge_4u430_15",formattedText:"_formattedText_4u430_19"};var fo=x(w()),qI=["search","personal-collection-search","search-autocomplete"];function GI(e,t,n,r={}){let o="";return qI.includes(t)?o=S1($g(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=$g(e,n,r),r.placeholders===!0&&(o=x1(o)),o}var XI=()=>{},QI=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=M("inlineSuggestions"),i=A(pi),s=U(),a=k("TextSuggestion",_1),l=(0,Mi.useRef)(null);(0,Mi.useEffect)(()=>{let c=setTimeout(()=>{s(Wx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),v1(l,"click",()=>{s(hr(e)),s(Ft({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,Mi.useMemo)(()=>GI(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,fo.jsxs)("div",{className:a.root,onMouseEnter:()=>s(hr(e)),children:[(0,fo.jsx)(oe,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:XI,children:(0,fo.jsx)(gi,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,fo.jsx)("div",{className:a.actions,children:(0,fo.jsx)(Vc,{onFeedback:()=>r(n),suggestion:n.text})})]})},w1=QI;var qg=x(w()),YI=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,td.useMemo)(()=>{let i=t.map((s,a)=>(0,qg.jsx)(w1,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,qg.jsx)(td.Fragment,{children:o})},nd=YI;var b1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var Aa=x(w()),ZI=({textSuggestions:e,selectedIndex:t})=>{let n=k("InlineSuggestionsOverlay",b1),r=A(Oi),o=U(),i=A(zt),s=A(di),a=A(Yc),l=M("showTextSuggestions");return Si(()=>{o(wr({collapse:!0,skipWhenInputFocus:!0}))}),a||!r||!l||e.length===0||i!==!0||s===!1?null:(0,Aa.jsx)("div",{className:n.root,"data-variant":"inline",children:(0,Aa.jsx)("div",{className:n.paper,children:(0,Aa.jsx)(yt,{children:(0,Aa.jsx)(nd,{suggestions:e,selectedIndex:t})})})})},JI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),E1=xn(JI)(ZI);var od=x($()),Di=x(O());var C1=x(O());function T1(e,t){let[n,r]=(0,C1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return V.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){V.error(s)}}]}var P1=x($()),On=x(O());var Gg={};Ie(Gg,{enUS:()=>eA,nlNL:()=>tA});var eA={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Sign in"}]},{type:0,value:" to enable "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze for "},{type:8,value:"min",children:[{type:0,value:"10 minutes"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 hour"}]},{type:0,value:" or "},{type:8,value:"day",children:[{type:0,value:"1 day"}]}]},tA={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Log in"}]},{type:0,value:" bij "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze voor "},{type:8,value:"min",children:[{type:0,value:"10 minuten"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 uur"}]},{type:0,value:" of "},{type:8,value:"day",children:[{type:0,value:"1 dag"}]}]};var k1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var Cr=x(w()),Xg=(e,t,n)=>r=>(0,Cr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),nA=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=B(Gg),i=Pt(),s=k("Login",k1),a=M("productName"),l=(0,On.useCallback)(y=>{y.preventDefault(),r&&r(parseInt(y.target.value,10))},[]),u=(0,On.useCallback)(y=>{y.preventDefault(),i.send(Pi,!0)},[t]),c=(0,On.useMemo)(()=>y=>(0,Cr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:y},"login"),[t]),p=(0,On.useCallback)(y=>(0,Cr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:y},"prompt"),[u]),{min:d,hour:h,day:v}=(0,On.useMemo)(()=>({min:Xg(s,60*10,l),hour:Xg(s,60*60,l),day:Xg(s,60*60*12,l)}),[]);return(0,Cr.jsxs)("div",{className:(0,P1.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,Cr.jsxs)(On.Fragment,{children:[(0,Cr.jsx)("br",{}),o("snooze",{min:d,hour:h,day:v})]})]})},rd=nA;var R1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var La=x(w()),rA=({title:e})=>{let t=k("SearchTrigger",R1),n=U();return(0,La.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(ct(!0)),children:[(0,La.jsx)(wi,{}),(0,La.jsx)("span",{className:t.text,children:e})]})},I1=rA;var Qg={};Ie(Qg,{enUS:()=>oA,nlNL:()=>iA});var oA={arrowHint:[{type:0,value:"Tip: use arrow keys to navigate suggestions"}],searchHintWindows:[{type:0,value:"Press CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],searchHintMac:[{type:0,value:"Press CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Close"}],search:[{type:0,value:"Search"}]},iA={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var A1={root:"_root_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ue=x(w()),sA=({textSuggestions:e,selectedIndex:t})=>{let n=k("SuggestionsOverlay",A1),r=B(Qg),o=A(Oi),i=Hx(),s=U(),a=(0,Di.useRef)(null),l=M("searchTriggerKey"),u=M("productName"),c=A(Yc),p=A(zt),d=A(di),[h,v]=(0,Di.useState)(null),y=M("showSearch"),m=M("showTextSuggestions"),g=M("adminUrl"),f=M("isEmbedded"),[S,_]=T1("dd-snooze-until-ms",0),b=c||S>Date.now(),E=A(H=>H.input.text),C=e.filter(H=>H.source!=="gpt").length,R=()=>{b&&_(0),s(_w(!b))},P=H=>{s(je({name:"suggestion feedback",data:{text:H.text,source:"overlay",context:E},options:{includeConversationData:!0}}))},N=H=>{let z=Date.now()+H*1e3;_(z),V.info(`Snooze until: ${new Date(z)}`),s(wr({collapse:!0}))};return(0,Di.useEffect)(()=>{C===0&&v(null)},[e,C]),Si(()=>{s(wr({collapse:!0,skipWhenInputFocus:!0}))}),p===null||d===!1?null:p===!1?(0,ue.jsxs)("div",{ref:a,className:(0,od.default)(n.root,{[n.isCollapsed]:b}),children:[!b&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:n.triggersRight,children:(0,ue.jsx)(Mr,{className:n.toggleButton,title:r("collapse"),onClick:R,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Mr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:R,isCollapsed:!0})}),(0,ue.jsx)("div",{className:n.collapsible,children:(0,ue.jsx)(rd,{loginUrl:g,isEmbedded:f,onSnooze:N})})]}):!i||!o?null:(0,ue.jsxs)("div",{ref:a,className:(0,od.default)(n.root,{[n.isCollapsed]:b}),children:[!b&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:y&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(r(Kc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:l.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,ue.jsx)(I1,{title:r("search")})})}),(0,ue.jsxs)("div",{className:n.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,od.default)(!h&&n.hintsHidden,n.hints),children:h}),(0,ue.jsx)(Mr,{className:n.toggleButton,title:r("collapse"),onClick:R,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Mr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:R,isCollapsed:!0})}),C>0&&m&&(0,ue.jsx)("div",{className:n.collapsible,onFocus:()=>{},children:(0,ue.jsx)(yt,{children:(0,ue.jsx)(nd,{onFeedback:P,suggestions:e,selectedIndex:t,reverse:!0})})})]})},aA=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),L1=xn(aA)(sA);var Oa=x(w()),lA=({children:e})=>{let n=M("locale").replace("-","");return(0,Oa.jsx)(tg.Provider,{value:n,children:e})},uA=({store:e,customStyles:t={},children:n})=>(0,Oa.jsx)(Dm,{store:e,children:(0,Oa.jsx)(lA,{children:(0,Oa.jsx)($i.Provider,{value:t,children:n})})}),Fi=uA;var yd=x($());var Dn=x(O());var O1=x(O()),cA=["div","span","mark","strong","b","i","u","em"];function Yg(e,t,n=0){var i;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(i=r.props)==null?void 0:i.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(cA.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,O1.cloneElement)(r,{children:Yg(s,t,n+1)})]}return[...e,...t]}function Tr(e){return e.tagName.toLowerCase()==="textarea"}var N1={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var V1=x($());var fd=x(O());function M1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function id(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function D1(e){return e!=null}var Jg=x($()),Rt=x(O());var sd=x(O()),dA=["bottom","height","left","right","top","width"],pA=(e={},t={})=>dA.some(n=>e[n]!==t[n]),Nn=new Map,F1,j1=()=>{let e=[],t=[];Nn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();pA(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Nn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),F1=window.requestAnimationFrame(j1)};function fA(e,t){return{observe(){let n=Nn.size===0;if(Nn.has(e)){let r=Nn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Nn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&j1()},unobserve(){let n=Nn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Nn.delete(e),Nn.size||cancelAnimationFrame(F1)}}}}function Zg(e){let[t,n]=(0,sd.useState)(null);return(0,sd.useLayoutEffect)(()=>{if(!e.current)return;let r=fA(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var ji=x(O()),H1=x(hu());var B1={root:"_root_1jq08_1"};var z1=({children:e})=>{let[t,n]=(0,ji.useState)(null),r=(0,ji.useContext)($i);return(0,ji.useLayoutEffect)(()=>{let o=document.createElement("div");return ro(o),o.classList.add(B1.root),r!=null&&r.portalRootNode&&o.classList.add(r==null?void 0:r.portalRootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,H1.createPortal)(e,t):null};var ln={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var ad=x(w()),ld=(e=!1)=>{let[t,n]=(0,Rt.useState)(e),r=(0,Rt.useCallback)(()=>n(!0),[]),o=(0,Rt.useCallback)(()=>n(!1),[]),i=(0,Rt.useCallback)(()=>n(a=>!a),[]),s=(0,Rt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function eh(e,t=null,n=0){if(!e)return{display:"none"};let r=t?e.top-t.top<0||e.top<t.top-n?t.top-n:e.top+e.height>t.top+t.height+n?t.top+t.height+n-e.height:e.top:e.top,o=t?e.left<t.left-n?t.left-n:e.left+e.width>t.left+t.width+n?t.left+t.width+n-e.width:e.left:e.left;return{top:r,left:o,height:e.height,width:e.width}}var ud=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=eh,...a})=>{let l=Zg(t),u=Zg(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,ad.jsx)(z1,{children:(0,ad.jsx)("div",{className:(0,Jg.default)(ln.ref,{[ln.positionAbove]:r==="above",[ln.positionBelow]:r==="below",[ln.positionLeft]:r==="left",[ln.positionRight]:r==="right",[ln.alignStart]:o==="start",[ln.alignCenter]:o==="center",[ln.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,ad.jsx)("div",{className:(0,Jg.default)(e,ln.root),children:i})})})};var U1=x($()),cd=x(O());var th=x(w()),dd=(0,cd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,cd.useRef)(null),i=k("TabCompletion",En);return(0,th.jsx)("div",{ref:id([o,r]),className:(0,U1.default)(e,i.popoverContentContainer),...n,children:(0,th.jsx)("div",{className:i.popoverContent,children:t})})});var kr=x(w()),mA=e=>t=>{let n=eh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},gA=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",En),s=ld(),a=(0,fd.useMemo)(()=>mA(e.getBoundingClientRect()),[e]),[l,u]=Nc(e);return(0,fd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,kr.jsxs)("span",{children:[(0,kr.jsx)("mark",{ref:id([l,s.triggerRef]),className:(0,V1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,kr.jsx)(ud,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,kr.jsx)(dd,{style:n,children:(0,kr.jsx)("div",{className:i.hintText,children:o})})})]})},pd=class extends wn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${M1(r.keyword)}\\b`,"i")})),this.keywordMatches=n.keywordMatches),this.usedKeywordMatches.clear(),t}match(t){let n=this.preparedKeywordMatches.map(o=>{if(this.usedKeywordMatches.has(o))return null;let i=t.match(o.keywordRegex);if(!i)return null;let s=t.charAt(i.index-1),a=t.charAt(i.index+o.keyword.length);return s==="{"&&a==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:o.suggestion,preparedKeywordMatch:o,valid:!0}}).filter(D1);if(n.length===0)return null;let r=n.reduce((o,i)=>i.index<o.index?i:o);return this.usedKeywordMatches.add(r.preparedKeywordMatch),r}replaceWith(t,n){return(0,kr.jsx)(gA,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var gd=x($());var Ge=x(O());var nh=x(w()),K1=()=>(0,nh.jsx)("svg",{width:"1.3em",height:"1.3em",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"InsertLinkIcon",tabIndex:-1,children:(0,nh.jsx)("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})});var Pr=x(O());var $1=x(Hg());var W1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function md(e,t,n){var o;let r=((o=e.imageSizes)==null?void 0:o[t])||e.image||n;if(!r)return null;try{return new URL(r).toString()}catch{return null}}function rh(e){return e.replace("https://www.","").replace("https://","")}var It=x(w()),hA=3,yA=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),vA=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=hA})=>{let i=k("LinkSearch",W1),[s,a]=(0,Pr.useState)(""),l=U(),u=A(sw("url")),c=A(X_("URL",yA)),[p,d]=(0,Pr.useState)(c.length-1),h=M("fallbackImage"),v=f=>{let S=f.target;a(S.value)},y=(f,S)=>{f.stopPropagation(),f.preventDefault(),window.open(S,"_blank")},m=f=>{var b;let S=p-1<0?c.length-1:p-1,_=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(S),f.code==="ArrowDown"&&d(_),f.code==="Enter"&&e(((b=c[p])==null?void 0:b.text)||s)},g=(0,Pr.useCallback)((0,$1.default)(f=>{l(uo({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,Pr.useEffect)(()=>{s&&g(s)},[s]),(0,Pr.useEffect)(()=>()=>{l($c())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(yt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,S)=>(0,It.jsx)(oe,{selected:p===S,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(ge,{children:[(0,It.jsx)(ge.Image,{src:md(f,"small",h||void 0),title:f.title||f.text}),(0,It.jsxs)(ge.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(ge.Title,{children:f.title||rh(f.text)}),f.title&&rh(f.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:_=>y(_,f.text)})})]})},f.text))}),(0,It.jsx)(Ca,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:m})]})},q1=vA;var oh={};Ie(oh,{enUS:()=>SA,nlNL:()=>xA});var SA={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},xA={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var qe=x(w()),_A=(0,Ge.forwardRef)((e,t)=>{let n=k("TabCompletion",En);return(0,qe.jsx)("mark",{ref:t,className:(0,gd.default)(n.matchSelection)},"selection-start")}),wA=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=B(oh),s=k("TabCompletion",En),a=(0,Ge.useRef)(null),l=(0,Ge.useRef)(null),[u,c]=(0,Ge.useState)(null),p=U(),d=ld(document.activeElement===r),[h]=(0,Ge.useState)(()=>document.createRange());d.triggerRef.current=h,(0,Ge.useEffect)(()=>()=>h.detach(),[]),(0,Ge.useEffect)(()=>{let y=e.current,m=a.current;!y||!m||(h.setStart(y,0),h.setEnd(m,0))},[e.current,a.current]),Si(()=>{d.close()});let v=(0,Ge.useCallback)(y=>{let m=h.toString(),g=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(ac({text:`[${m}](${g})`,replace:"selection"}))},[]);return(0,qe.jsxs)("span",{children:[(0,qe.jsx)("mark",{ref:a,className:(0,gd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,qe.jsx)(ud,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,qe.jsxs)(dd,{style:n,ref:l,children:[(0,qe.jsx)("div",{className:(0,gd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,qe.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,qe.jsx)(K1,{}),(0,qe.jsx)("span",{children:"\xA0"}),(0,qe.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,qe.jsx)(q1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},hd=class extends wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ge.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,qe.jsx)(_A,{ref:this.startRef}):(0,qe.jsx)(wA,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Mn=x(w()),bA=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",N1),c=M("insertLink"),p=M("showMidSentenceSuggestions"),d=M("inlineSuggestions"),h=Dc(a),v=(0,Dn.useRef)(null);(0,Dn.useEffect)(()=>{Tr(a)&&h&&Fc(a,h)},[h]);let y=(0,Dn.useCallback)(f=>{if(!o||!n)return f;let S=[(0,Mn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Mn.jsx)("span",{"data-testid":"tab-completion",className:(0,yd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&S.push((0,Mn.jsx)("span",{className:(0,yd.default)(u.hint,u.resetIndent),children:(0,Mn.jsx)(el,{keyCode:"tab"},"tabHint")})),Yg(f,S)},[o,n,r]),m=(0,Dn.useMemo)(()=>{let f=[];return c&&f.push(new hd("selection")),f.push(new yi("placeholders")),i&&f.push(new pd("keywords")),f},[d,c,i]),g=(0,Dn.useMemo)(()=>{let f=window.getComputedStyle(a);return{"--dd-color":f.color,"--dd-font-size":f.fontSize,"--dd-font-family":f.fontFamily,"--dd-font-variant":f.fontVariant}},[]);return e?(0,Mn.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(v.current=f==null?void 0:f.parentElement)},className:u.root,style:g,children:[(0,Mn.jsx)(gi,{tagName:"span",containerTagName:"div",className:(0,yd.default)(u.container,u.agentText),disableLineBreaks:Tr(a),content:t||"\u200B",onAfterParse:y,matchers:m,selection:h,keywordMatches:s,inputElement:a,inputStyle:g,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,Mn.jsx)("br",{})]}):null},EA=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var y;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Ni(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:h,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((y=r.list)==null?void 0:y.keywordMatches)??[],enabled:h&&p!==!1}},G1=xn(EA)(bA);var Db=x($()),Fb=x(O());var X1={list:[],fetchState:"idle",isInitialRequest:null},Y1=e=>e.autoflows.list||[],Q1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Fn=D("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),ih=D("autoflows/start",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.startAutoflowSession(e),await n(Fn(e.platformSessionId))}),sh=D("autoflows/stop",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.stopAutoflowSession(e.platformSessionId),await n(Fn(e.platformSessionId))}),CA=j({name:"autoflows",initialState:X1,reducers:{},extraReducers:e=>{e.addCase(ih.pending,(t,n)=>{let r=Q1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(sh.pending,(t,n)=>{let r=Q1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Fn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Fn.rejected,t=>{t.fetchState="error"}),e.addCase(Fn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>X1)}}),Z1=D("autoflows/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");let o=r.openStream(e);o.on("sessionAborted",()=>{n(Fn(e))}),o.on("sessionCompleted",()=>{n(Fn(e))})}),J1=D("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),eb=CA.reducer;var tb={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},nb=e=>e.customMessages.list,rb=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),ob=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),ib=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Na=D("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),vd=D("customMessages/send",async(e,t)=>{let{platformSessionId:n,suggestion:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.sendCustomMessage(n,r)}),Sd=D("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),sb=j({name:"customMessages",initialState:tb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Na.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Na.rejected,t=>{t.fetchState="error"}).addCase(Na.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(vd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(vd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(Sd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(Sd.rejected,(t,n)=>{let r=t.answeredSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1)),t.answeredSuggestions.splice(r,1)}).addCase(J,()=>tb)}}),ab=D("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(sb.actions.onCustomMessage(i))})}),lb=D("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),ub=sb.reducer;var TA={jwt:null,accountUrl:null,interval:null},cb=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},ah=D("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),lh=D("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(ah()),setInterval(()=>r(ah()),n)}),db=j({name:"exchangeToken",initialState:TA,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(ah.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(lh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:pb}=db.actions,fb=db.reducer;function mb(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var bb=x(O());var xb=x($()),_b=x(O());var hb=x($());var gb={root:"_root_838fd_1"};var vb=x(w()),kA=({className:e,children:t})=>{let n=k("Unicode",gb);return(0,vb.jsx)("span",{className:(0,hb.default)(e,n.root),children:t})},yb=kA;var Sb={isDisabled:"_isDisabled_1rmfm_1",buttonStart:"_buttonStart_1rmfm_5",root:"_root_1rmfm_8",buttonStop:"_buttonStop_1rmfm_8",stateBadge:"_stateBadge_1rmfm_19",isCompleted:"_isCompleted_1rmfm_26",isStarted:"_isStarted_1rmfm_30",isAborted:"_isAborted_1rmfm_34"};var uh={};Ie(uh,{enUS:()=>PA,nlNL:()=>RA});var PA={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]},RA={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]};var dt=x(w()),AA=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",Sb),a=B(uh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,dt.jsxs)(oe,{className:(0,xb.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,dt.jsx)(ge,{children:(0,dt.jsxs)(ge.Content,{children:[(0,dt.jsxs)(ge.Title,{children:[t&&(0,dt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,dt.jsx)("span",{children:r})]})}),(0,dt.jsx)(oe.Actions,{fixed:t==="Started",children:(0,dt.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,dt.jsxs)(_b.Fragment,{children:[(0,dt.jsx)(yb,{children:u})," ",(0,dt.jsx)("span",{children:a(l)})]})})})]})},wb=AA;var ch=x(w()),LA=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},OA=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,ch.jsx)(bb.Fragment,{children:e.map(o=>(0,ch.jsx)(wb,{displayName:o.displayName,description:o.description,disabled:o.isBusy||LA(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),NA=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},MA={onStartAutoflow:ih,onStopAutoflow:sh},Eb=xn(NA,MA)(OA);var xd=x(O());var fh=x($());var dh=x(w()),ph=()=>(0,dh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,dh.jsx)("path",{d:"M502.6 70.63l-61.25-61.25C435.4 3.371 427.2 0 418.7 0H255.1c-35.35 0-64 28.66-64 64l.0195 256C192 355.4 220.7 384 256 384h192c35.2 0 64-28.8 64-64V93.25C512 84.77 508.6 76.63 502.6 70.63zM464 320c0 8.836-7.164 16-16 16H255.1c-8.838 0-16-7.164-16-16L239.1 64.13c0-8.836 7.164-16 16-16h128L384 96c0 17.67 14.33 32 32 32h47.1V320zM272 448c0 8.836-7.164 16-16 16H63.1c-8.838 0-16-7.164-16-16L47.98 192.1c0-8.836 7.164-16 16-16H160V128H63.99c-35.35 0-64 28.65-64 64l.0098 256C.002 483.3 28.66 512 64 512h192c35.2 0 64-28.8 64-64v-32h-47.1L272 448z"})});var Cb={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var un=x(w()),DA=({entities:e})=>{let t=k("EntitiesWidgetList",Cb),[n,r]=(0,xd.useState)(void 0),o=U(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),ka(a.text),o(je({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,xd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,un.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,un.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,un.jsx)("span",{className:t.entityText,children:a.text}),(0,un.jsxs)("span",{className:t.iconWrapper,children:[(0,un.jsx)("span",{className:(0,fh.default)(t.icon),children:(0,un.jsx)(ph,{})}),(0,un.jsx)("span",{className:(0,fh.default)(t.icon,n===l&&t.iconClicked),children:(0,un.jsx)(ph,{})})]})]},a.text))})},Tb=DA;var kb=x($()),mh=x(O());var jn={root:"_root_1e6ej_1",title:"_title_1e6ej_8",isUsed:"_isUsed_1e6ej_13",quickReplies:"_quickReplies_1e6ej_22",quickReply:"_quickReply_1e6ej_29",hasError:"_hasError_1e6ej_39",label:"_label_1e6ej_43",errorIcon:"_errorIcon_1e6ej_48"};var rt=x(w()),FA=({suggestion:e})=>{let t=B(ao),n=U(),r=A(rb(e.text)),o=A(ob(e.text)),i=A(ib(e.text)),s=A(Ju),{replyOptions:a}=e,l=(0,mh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(vd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,mh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(Sd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,rt.jsxs)(oe,{onClick:l,className:(0,kb.default)(jn.root,{[jn.isUsed]:r,[jn.hasError]:i}),children:[(0,rt.jsx)(ge,{children:(0,rt.jsxs)(ge.Content,{children:[(0,rt.jsxs)(ge.Title,{className:jn.title,children:[e.text," ",(0,rt.jsx)(tl,{className:jn.label,children:"analyse tool"})," ",i&&(0,rt.jsx)("span",{className:jn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,rt.jsx)("ul",{className:jn.quickReplies,children:a.map(c=>(0,rt.jsx)("li",{className:jn.quickReply,children:c.title},c.title))})]})}),(0,rt.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,rt.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,rt.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,rt.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},Pb=FA;var gh=x(w()),Rb=()=>(0,gh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,gh.jsx)("path",{d:"M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9",stroke:"currentColor",strokeWidth:"1.5",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"})});var Ib=x(O());var pt=x(w()),jA=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=qc(o),s=B(ao),a=M("showImages"),l=M("fallbackImage"),u=h=>{h.preventDefault(),h.stopPropagation(),r(o)},c=h=>{h.preventDefault(),h.stopPropagation(),n(e)},p=(0,Ib.useCallback)(h=>{window.open(i,"_blank"),h.stopPropagation(),h.preventDefault()},[i]);return(0,pt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,pt.jsxs)(ge,{children:[a&&e.image&&(0,pt.jsx)(ge.Image,{src:md(e,"small",l||void 0),title:e.title}),(0,pt.jsxs)(ge.Content,{children:[e.title&&(0,pt.jsx)(ge.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,pt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,pt.jsx)(ge.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,pt.jsxs)(oe.Actions,{children:[i&&(0,pt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,pt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,pt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},Ab=jA;var Ma=x(w()),BA=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=A(Ei),i=a=>{r.send(Og,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(In,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Ma.jsx)(Ma.Fragment,{children:n.map(a=>(0,Ma.jsx)(Ab,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},Lb=BA;var hh={};Ie(hh,{enUS:()=>HA,nlNL:()=>zA});var HA={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},zA={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var Ob={root:"_root_x0pwe_1",loginText:"_loginText_x0pwe_7",stateText:"_stateText_x0pwe_8",sectionList:"_sectionList_x0pwe_20",shortcutList:"_shortcutList_x0pwe_24",shortcut:"_shortcut_x0pwe_24",link:"_link_x0pwe_52"};var yh=x(w()),Nb=()=>(0,yh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,yh.jsx)("path",{d:"M543-340q16.595 0 28.798-12.202Q584-364.405 584-381t-12.202-28.798Q559.595-422 543-422t-28.798 12.202Q502-397.595 502-381t12.202 28.798Q526.405-340 543-340Zm-25-126h47q2-29 8.5-43t32.5-39q27-26 37.5-45.395Q654-612.79 654-639q0-45.882-31.5-74.941Q591-743 540-743q-38 0-68 20.5T428-665l45 19q11-25 27.5-38t39.5-13q29.778 0 48.389 17Q607-663 607-637q0 20-9 35t-32 32q-32 29-40 46.5t-8 57.5ZM260-200q-24 0-42-18t-18-42v-560q0-24 18-42t42-18h560q24 0 42 18t18 42v560q0 24-18 42t-42 18H260Zm0-60h560v-560H260v560ZM140-80q-24 0-42-18t-18-42v-620h60v620h620v60H140Zm120-740v560-560Z"})});var vh=x(w()),Mb=()=>(0,vh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,vh.jsx)("path",{d:"M319-250h322v-60H319v60Zm0-170h322v-60H319v60ZM220-80q-24 0-42-18t-18-42v-680q0-24 18-42t42-18h361l219 219v521q0 24-18 42t-42 18H220Zm331-554v-186H220v680h520v-494H551ZM220-820v186-186 680-680Z"})});var K=x(w()),_d=(e,t)=>{let n=A(zt);(0,Fb.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},UA=()=>{let e=B(hh),t=U(),n=M("isEmbedded"),r=k("Widget",Ob),o=M("showAutoflows"),i=M("showCustomMessages"),s=M("showPersonalCollectionLink"),a=M("showSummaryCommand"),l=M("showKnowledgeSearch"),u=M("showSearch"),c=A(Ai),p=A(ed),d=A(Y1),h=A(Jc),v=A(nb),y=A(ec),m=A(di),g=A(zt),f=A(Ju),S=A(mb),_=A(Ei),b=Pt(),E=A(lw),C=A(cb("/admin/personal-collection")),R=M("adminUrl");if(_d(()=>(t(Na(f)),t(ab(f)),()=>{t(lb(f))}),[t,m,i,f]),_d(()=>(t(Fn(f)),t(Z1(f)),()=>{t(J1(f))}),[t,m,o,f]),_d(()=>{p.forEach(({type:N})=>{t(N==="entities"?Vt():Pn(N))})},[t,m,y,c]),_d(()=>(t(lh()),()=>{t(pb())}),[t,m,s,y]),m===!1)return(0,K.jsx)("div",{className:r.stateText,children:(0,K.jsx)("div",{children:(0,K.jsx)("p",{children:e("notSupported")})})},"supported");if(g===!1)return(0,K.jsx)("div",{className:r.loginText,children:(0,K.jsx)("div",{children:(0,K.jsx)(rd,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!f||g===null||E||S)return(0,K.jsx)("div",{className:r.stateText,children:(0,K.jsx)("div",{children:(0,K.jsx)("p",{children:e("waiting")})})},"waiting");let P=u||a||l||C;return(0,K.jsx)("div",{className:(0,Db.default)(r.root),"data-testid":"widget",children:(0,K.jsxs)(nl,{className:r.sectionList,children:[P&&(0,K.jsx)(zn,{title:e("actions"),type:"shortcuts",children:(0,K.jsxs)("div",{className:r.shortcutList,children:[u&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-search",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0}),children:[(0,K.jsx)(wi,{}),e("linkSearch")]}),a&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-summary",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,K.jsx)(Mb,{}),e("linkSummary")]}),l&&(0,K.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,K.jsx)(Nb,{}),e("linkKnowledgeSearch")]}),C&&(0,K.jsxs)("a",{className:r.shortcut,target:"_blank",href:C,"data-testid":"shortcut-personal-collection",rel:"noreferrer",children:[(0,K.jsx)(Rb,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,K.jsx)(zn,{type:"custom-messages","data-testid":"custom-messages",children:(0,K.jsx)(yt,{withDivider:!0,children:v.map(N=>(0,K.jsx)(Pb,{suggestion:N},N.text))})}),o&&d.length>0&&(0,K.jsx)(zn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,K.jsx)(yt,{withDivider:!0,children:(0,K.jsx)(Eb,{})})}),p.map(({type:N,title:H,amount:z,lines:Ue})=>{var cn;switch(N){case"entities":return h&&h.length>0&&(0,K.jsx)(zn,{type:N,title:H,"data-testid":`type-${N}`,children:(0,K.jsx)(Tb,{entities:h})},N);default:return((cn=_[N])==null?void 0:cn.fetchState)==="done"&&_[N].suggestions.length>0&&(0,K.jsx)(zn,{type:N,title:H,"data-testid":`type-${N}`,children:(0,K.jsx)(yt,{withDivider:!0,children:(0,K.jsx)(Lb,{lines:Ue,contentType:N,suggestions:_[N].suggestions.slice(0,z)||[]})})},N)}})]})})},jb=UA;function Bi(e){let t=new Range;return t.selectNodeContents(e),t}function Bb(e,t,n){try{return Rr(e,t,n),!0}catch{return!1}}function wd(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function bd(e){return"tagName"in e&&e.tagName==="BR"}var Da=/[\u200B-\u200D\uFEFF]/g;function Rr(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(Da,""),p=o+c.length,d=t>=o&&t<=p,h=n>=o&&n<=p;if(d){let v=s(u,t-o);v===0&&!h?r.setStartBefore(l):r.setStart(l,v)}h&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(bd(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;wd(l)&&u&&!wd(u)&&!bd(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Fa(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,h=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let v=p.textContent;d&&(a=u+v.substring(0,r).replace(Da,"").length),h&&(l=u+v.substring(0,i).replace(Da,"").length),u+=v.replace(Da,"").length;break}case Node.ELEMENT_NODE:{let v=p.nextSibling===null;bd(p)&&!v&&u++;for(let y=0;y<p.childNodes.length;y++){let m=d&&y===r,g=h&&y===i;if(m&&(a=u),g&&(l=u),l!==void 0||((!m||!s)&&c(p.childNodes[y]),h&&y===i-1&&(l=u),l!==void 0))break}!h&&wd(p)&&!v&&u++,h&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function ja(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,h=p?i:void 0,v=u.textContent.replace(Da,"");d===0&&h===void 0?a+=v:a+=v.substring(d,h);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&bd(u)&&!d&&(a+=`
|
|
20
|
+
`);for(let h=c?r:0;h<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[h]),s!==1);h++);!p&&s===0&&wd(u)&&!d&&(a+=`
|
|
21
|
+
`);break}default:break}p&&s++}return l(e),a}function Hb(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var mo=class extends Cn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),ja(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!Hb(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!Hb(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Fa(this.element,t);let n=this.lastKnownSelection;if(n&&Bb(this.element,n.start,n.end))return n;let r=Bi(this.element);return r.collapse(!1),Fa(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return ja(this.element,Rr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var Sh=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(t)}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},xh=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=this.createIframe(),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];createIframe(){let t=`deepdesk-iframe-${this.name}`,n=document.getElementById(t);if(n)return n;let r=document.createElement("iframe"),o=`${this.targetOrigin}/v2/widget/liveengage/channel.html`,i=new URLSearchParams({channel:this.name,host:window.location.origin});return this.options.debug&&i.set("debug","1"),r.style.position="absolute",r.style.left="-999em",r.style.width="0px",r.style.height="0px",r.tabIndex=-1,r.id=t,r.title=`iframe-${this.name}`,r.src=`${o}?${i.toString()}`,r}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(t,this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},_h=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),V.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new xh(t,this.deepdeskUrl,{debug:!0}):new Sh(t),r=o=>{var i,s;o.origin===this.deepdeskUrl&&o.data.type==="event"&&o.data.channel===t&&(V.info("Received broadcast event",this.sessionId,o),(s=(i=this.eventMap)[o.data.name])==null||s.call(i,o.data.payload))};return n.onMessage(r),n}send(t,n){var o,i,s;if(!this.sessionId)return;V.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(i=(o=this.eventMap)[t])==null||i.call(o,n),(s=this.channel)==null||s.postMessage({...r,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},zb=_h;var Hi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var wh=e=>new Promise(t=>{setTimeout(t,e)});var zi=class extends Hi{name="ClientError"},bh=class extends Hi{name="ServerError"},Wt=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:p=!0,retryOnError:d=_=>_ instanceof TypeError,retryOnResponse:h=_=>_.status>=500,version:v="v1",...y}=n,m={credentials:"include",...y,headers:{"Content-Type":"application/json",...y.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(m.headers={...m.headers,"X-CSRFToken":this.csrfToken}),typeof v=="string"&&(m.headers={...m.headers,"X-Deepdesk-API-Version":v});let g=u,f=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let S=async()=>(g--,a(s,m).then(async _=>h(_)&&!i.isAborted&&g>0?(await wh(c),S()):_.status===401&&p===!0&&f===!1?(f=!0,await this.refreshToken(),S()):_).catch(async _=>{if(d(_)&&!i.isAborted&&g>0)return await wh(c),S();throw _}));S().then(_=>_.json().catch(()=>null).then(b=>{_.status>=500?o(new bh("Server Error",b)):_.status===401?o(new zi("Unauthorized",b)):_.status===403?o(new zi("Forbidden",b)):_.status===404?o(new zi("Not Found",b)):_.status>=400&&o(new zi("Bad Request",b)),delete this.latestRequestByUrl[s],r(b)})).catch(_=>{o(_)})})}async validateToken(){let{has_valid_access_token:t}=await this.get("/auth/validate");if(!t)return!1;let{is_logged_in:n}=await this.get("/apis/admin/session/validate/",{version:null});return!!n}refreshToken(){return e.refreshingToken||(e.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{e.refreshingToken=null},1e3*60)})),e.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,{method:"POST",body:JSON.stringify(n),...r})}patch(t,n,r){return this.request(t,{method:"PATCH",body:JSON.stringify(n),...r})}put(t,n,r){return this.request(t,{method:"PUT",body:JSON.stringify(n),...r})}delete(t,n){return this.request(t,{method:"DELETE",...n})}};var VA;(t=>{let e;(l=>(l.SEND_MESSAGE="Send Message",l.HANDLING_TIME="Handling Time",l.START_AUTOFLOW="Start Autoflow",l.ABORT_AUTOFLOW="Abort Autoflow",l.ADD_TO_PERSONAL_COLLECTION="Add to personal collection",l.DELETE_FROM_PERSONAL_COLLECTION="Delete from personal collection"))(e=t.EventType||={})})(VA||={});function Ed(e){return{...re(e),tags:e.tags}}var Bn=class e{constructor(t,n={}){this.options=n;this.client=new Wt(t,{fetch:n.fetch}),this.client.patchFetch(r=>async(o,i)=>{let s=await r(o,i);return this.handleDeepdeskVersionHeaders(s),s})}latestReceivedDeepdeskVersions={};client;shouldFetchCsrfToken=!0;static exchangeTokenPromise=null;async preflight(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=await this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(e.exchangeTokenPromise||(e.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),e.exchangeTokenPromise):Promise.resolve()}async createConversation(t){await this.preflight(),V.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...be(t),tags:t.tags},{version:"v2"});return Ed(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return re(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return re(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return re(t)}async checkUserExists(t){let{exists:n}=await this.client.get(`/apis/admin/users/exists?external_id=${t}`);return n}async getConversationBySessionId(t,n={}){await this.preflight(),V.info(`Getting conversation for session ${t}`);let{attempts:r=1,retryDelay:o=1e3}=n,i=await this.client.get(`/api/conversations/by_session_id/${t}`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"});return Ed(i)}async isConversationSupported(t,n={}){V.info(`Check if conversation for session ${t} is supported`);let{attempts:r=1,retryDelay:o=1e3}=n;return(await this.client.get(`/api/conversations/by_session_id/${t}/active_profile`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"})).has_active_profile}async updateConversation(t,n){let r=be(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return Ed(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...be(o),tags:o.tags})),{version:"v2"})).map(o=>Ed(o))}async sendEvent(t,n){let{data:r,...o}=n,i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((s,[a,l])=>({...s,[a]:l}),{});return this.client.post("/api/events",be({...i,...o,data:r,name:t}),{version:"v2"})}async sendEventV1(t,n){let r=Object.entries(this.latestReceivedDeepdeskVersions).reduce((o,[i,s])=>({...o,[i]:s}),{});return this.client.post("/api/events",{event:t,data:be({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source)},prompt_instruction:n.promptInstruction,model:n.model})).summary}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.post("/apis/admin/session/jwt/",{jwt:t},{version:null}).catch(n=>{throw V.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",be(n),{version:null,refreshTokenOn401:!1,headers:{apikey:t}})}async getTextSuggestions(t,n={},r){return r==="sticky-messages"?this.getPinnedMessages(t):(await this.client.post(`/api/conversations/${t}/recommend/${r}`,be(n),{abortLatest:!0})).map(i=>({...re(i),text:i.text||i.url||i.message,source:r,type:r})).filter((i,s,a)=>s===a.findIndex(l=>l.text===i.text))}async isLoggedIn(){return await this.preflight(),this.client.validateToken()}async getAutocompleteSuggestions(t,n){return(await this.client.post(`/api/conversations/${t}/autocomplete`,be(n),{abortLatest:!0})).map(o=>({score:1,source:o.source,sourceText:o.source_text,text:o.label,trainingJobs:o.training_jobs,searchKeywords:o.search_keywords,type:o.source})).filter((o,i,s)=>i===s.findIndex(a=>a.text===o.text))}async getPinnedMessages(t){let n=await this.client.get(`/api/conversations/${t}/sticky-messages`,{abortLatest:!0});return re(n).map(r=>({...r,text:r.message,source:"sticky-messages",type:"pinned-message"}))}async getStyleSuggestions(t){let n=await this.client.post("/api/style-suggestions",be(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,be(t),{version:"v2"});return re(n)}async knowledgeAssist(t,n,r){let o=await this.client.post("/api/knowledge-search/search",be({question:t.question,promptInstruction:t.promptInstruction,profile:r,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return re(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return re(n)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return re(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(hy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&V.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Ba=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Tg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{V.warn(`Invalid JSON for ${t}: ${r}`)}})}connect(){clearTimeout(this.timeoutTimer);let t=new EventSource(this.url,{withCredentials:!0});this.eventSource=t;let n=!1;t.onopen=()=>{n=!0},t.onerror=()=>{n&&t.readyState===2&&this.connect()},this.timeoutTimer=setTimeout(()=>{t.close(),this.connect()},this.options.timeout),Object.keys(this.eventListeners).forEach(r=>{this.proxyEvent(r)})}disconnect(){var t;clearTimeout(this.timeoutTimer),this.eventListeners={},(t=this.eventSource)==null||t.close()}emit(t,n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>r(n))}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),this.proxyEvent(t),()=>{this.off(t,n)}}off(t,n){let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}};var KA;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(KA||={});var Ha=class{constructor(t,n={}){this.apiUrl=t;this.client=new Wt(t,n)}client;streams={};logger=V;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return re(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,be(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,be(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return re(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",be(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Ba(`${this.apiUrl}/sessions/${t}/events`),this.streams[t].connect()),this.streams[t]}closeStream(t){this.streams[t]||(this.streams[t].disconnect(),delete this.streams[t])}};var Ub={startTime:null,stopTime:null},Vb=j({name:"handlingTime",initialState:Ub,reducers:{handlingTimeStart(e){if(e.startTime&&!e.stopTime)throw new Error("Timing already started");e.startTime=new Date,e.stopTime=null},handlingTimeStop(e){if(!e.startTime)throw new Error("Timing not started");e.stopTime=new Date},handlingTimeReset(e){e.startTime=null,e.stopTime=null}},extraReducers:e=>{e.addCase(J,()=>Ub)}}),{handlingTimeStart:Kb,handlingTimeStop:Cd,handlingTimeReset:Wb}=Vb.actions,$b=Vb.reducer;var qb=(e={})=>{let t={onAuthError:ki(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Td={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var go=D("styleSuggestions/getAll",async({text:e},t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),{showStyleSuggestions:o}=r.settings,i=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)return Td.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),WA=j({name:"styleSuggestions",initialState:Td,reducers:{},extraReducers:e=>{e.addCase(go.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(go.rejected,t=>{t.fetchState="error"}).addCase(go.fulfilled,(t,n)=>{t.fetchState="done",mr(t.list,n.payload)||(t.list=n.payload)}).addCase(Zr,t=>{t.list=Td.list}).addCase(J,()=>Td)}}),Gb=WA.reducer;var Xb=(e={})=>{let t,n=!0,r={getStyleSuggestions:go,debounce:500,...e};return o=>i=>s=>{var h;let a=o.getState().input.text,l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:c}=u.settings;if(!((h=u.conversation.current)==null?void 0:h.id)||!c)return l;let{text:d}=u.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function $A(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var Qb=(e={})=>{let t={getTextSuggestions:Pn,getAutocompleteSuggestions:_a,debounce:200,check:Oi,...e},n;return r=>o=>i=>{var y;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,p=(y=l.conversation.current)==null?void 0:y.id,d=i.type===Qc.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:h}}=l;return $A(h,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let m=pi(l);m===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(m))},d?0:t.debounce)),a}};var Yb=go.fulfilled.toString();function qA(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let i=e.keywordMatches.filter(l=>l.keyword===o),s=t.keywordMatches.filter(l=>l.keyword===o),a=s.length-i.length;a<=0||r.push(...s.slice(0,a))}),r}var Zb=e=>t=>n=>r=>{var u;if(r.type!==Yb){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=qA(o,s);r.type===Yb&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var GA=bu({activeSuggestion:vw,answer:l1,auth:Aw,autoflows:eb,conversation:jx,contentTypes:$w,customMessages:ub,exchangeToken:fb,entities:Qw,handlingTime:$b,info:W_,input:Km.reducer,overlayInput:Je.reducer,settings:Rx,profile:d1,search:Y_,summary:n1,styleSuggestions:Gb,ui:ww,textSuggestions:fw});function Jb(e){return M0({reducer:GA,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),qb(),Qb({debounce:200}),Xb({debounce:500}),Zb(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var XA=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},QA=e=>t=>n=>r=>{var a;let o=t.getState(),i=jm("inlineSuggestions")(o);switch(r.type){case Rn.toString():{let l=aw(r.payload.contentType)(t.getState()),u=l.indexOf(r.payload.suggestion);e.emit("edit-suggestion",{contentType:r.payload.contentType,index:u,suggestions:l});break}case ki.toString():{!r.payload&&e.emit("logout",void 0);break}case Ft.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:XA(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case ac.toString():{let{start:l,end:u}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case ra.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case dc.toString():e.emit("select-image",r.payload,{mayApplyChanges:!0}),e.sendEvent("Image attached",{conversationId:o.conversation.current.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Vt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case An.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case je.toString():e.sendEvent(r.payload.name,{conversationId:((a=r.payload.options)==null?void 0:a.includeConversationData)&&o.conversation.current.id,data:r.payload.data});break;case lc.toString():e.handleKeyDown(r.payload);break;case Zr.toString():e.logSendMessage(r.payload);break;case uc.toString():e.logSendEditSuggestionMessage(r.payload);break;case cc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Zr.toString():e.handleAfterSendMessage(r.payload);break;case wa.toString():e.onUpdateShowTabHint(r.payload);break;case Cd.toString():e.logHandlingTime();break;case Ft.toString():{i&&(t.dispatch(on([])),t.dispatch(yr()));break}case on.toString():{i&&r.payload.length>0&&t.dispatch(hr(0));break}default:break}return s},eE=QA;function Eh(e){return e.toISOString().replace("T"," ").replace("Z","")}function tE(e,t){var o,i,s;let{startTime:n,stopTime:r}=e.handlingTime;if(!n||!r)throw new Error("No startTime and stopTime for handling time metrics");return{conversationId:e.conversation.current.id,clientVersion:t.version,agentId:(o=e.info.agentInfo)==null?void 0:o.agentId,agentName:(i=e.info.agentInfo)==null?void 0:i.agentName,agentEmail:(s=e.info.agentInfo)==null?void 0:s.agentEmail,timeStart:Eh(n),timeStop:Eh(r)}}function Ch(e,t,n){var C,R,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:p,cuts:d,deletions:h,textSuggestions:v,offeredTextSuggestions:y}}=t[e],m=r.length,f=v.reduce((N,{text:H,searchTerm:z})=>N+H.length-(z?z.length:0),0),S=u??Date.now(),_=(Date.now()-S)/1e3+(c||0),b=o/_,E=v.reduce((N,{searchTerm:H})=>N+(H?H.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:h,lenTextTyped:o+E,lenTextTotal:m,lenTextAssisted:f,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:b,numPastes:l,textSuggestionsV2:v,suggestionsCounters:[{source:"gpt",countOffered:y.filter(N=>N.source==="gpt").length}],agentId:(C=t.info.agentInfo)==null?void 0:C.agentId,agentName:(R=t.info.agentInfo)==null?void 0:R.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function nE(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?nE(r,t):null}function rE(e,t){return nE(e,t)}function oE(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function YA(e){return typeof e=="object"&&e!==null&&"tagName"in e}function kd(e){return YA(e)&&(Tr(e)||Mc(e))}var iE=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch{return t}}catch{return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch{V.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function ZA(e){return e.offsetParent!==null}function sE(e){if(!ZA(e))return!1;let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function Pd(e,t,n=100){let r=sE(e);t({isVisible:r});let o=setInterval(()=>{let i=sE(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var ze=x(w()),aE=iE("showTabHint",!0),za=class e{static version="10.5.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new Bn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[eE({emit:(p,d,h)=>this.emit(p,d,h),handleAfterSendMessage:p=>this.handleAfterSendMessage(p),handleInputChanged:p=>this.handleInputChanged(p),handleKeyDown:p=>this.handleKeyDown(p),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:p=>this.logSendMessage(p),logSendEditSuggestionMessage:p=>this.logSendEditMessage(p),onUpdateShowTabHint:p=>aE.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Ha(n)}),this.store=Jb(c),this.broadcastEvents=new zb({debug:!0,deepdeskUrl:u,eventMap:Lw(this.store),createCustomChannel:l}),this.store.dispatch(ta),this.store.dispatch(wa(aE.value())),this.store.dispatch(ta({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(V.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(V.warn("Profile has not been loaded (yet)"),!0):(V.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(ki(null)),this.store.dispatch(br()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();zt(r)&&Cw(r)!=="loading"&&t()});this.unmountHandlers.push(()=>{n()})})}isLoggedIn(){return this.deepdeskApi.isLoggedIn()}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){V.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Um({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(tc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(nc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Vm(t))).payload}async postMessages(t){return(await this.store.dispatch(oc(t))).payload}async updateConversation(t){return(await this.store.dispatch(rc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(An());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(ta(t))}setVisitorInfo(t){this.store.dispatch(K_(t))}async setAgentInfo(t){await this.store.dispatch(ya(t))}async setAgentSettings(t){await this.store.dispatch(kg(t))}async getAgentSettings(){return(await this.store.dispatch(Pg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Qc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(cc(t))}notifyKeyDown(t){this.store.dispatch(lc(t))}notifyPaste(t,n){this.store.dispatch(Xx({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(qx(t))}notifyExternalSuggestion(t){this.store.dispatch(Ft(t)),this.store.dispatch(yr())}notifyEditSuggestion(t){this.store.dispatch(dw(t.contentType,t.suggestions)),this.store.dispatch(Rn({contentType:t.contentType,suggestion:typeof t.index=="number"?t.suggestions[t.index]:null}))}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(wr({collapse:!1})),this.inputMediator&&this.store.dispatch(zx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(on([])))}handleKeyDown(t){let{overlayCollapsed:n}=this.state.ui,{textSuggestions:r,selectedSuggestionIndex:o,selection:i}=this.state.input,{inlineSuggestions:s}=this.state.settings,a=r.length>0,l=o!==-1;if(this.store.dispatch(Gx(sc(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(Kx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch($x());let{selectedSuggestionIndex:p}=this.state.input;t.preventDefault(),!s&&(p===-1?this.store.dispatch(ra()):this.stageSelectedSuggestion({inputType:"arrow"}))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(hr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(hr(-1)),this.store.dispatch(ra()),t.preventDefault()):n||(this.store.dispatch(wr({collapse:!0})),this.store.dispatch(xw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:h}=this.state.input;this.store.dispatch(wa(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&h&&h.text.startsWith(d)&&(this.store.dispatch(Ft({text:h.text,suggestion:h,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(yr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Qx()),this.store.dispatch(on([]))}handlingTimeStart(){this.state.handlingTime.startTime||(V.info("Start handling time"),this.store.dispatch(Kb()))}handlingTimeStop(){this.state.handlingTime.startTime&&(V.info("Stop handling time"),this.store.dispatch(Cd()))}logSendMessage(t){let n=Ch("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=Ch("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(Vx(this.state.overlayInput.metrics))}logHandlingTime(){let t=tE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(Wb())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(yr()),this.store.dispatch(Zr(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ft({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{this.eventListeners[t]&&this.eventListeners[t].forEach(i=>{try{i(n)}catch(s){V.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),V.error(s)}})};this.inputMediator&&r.mayApplyChanges?this.inputMediator.applyChanges(o):o()}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),()=>{this.off(t,n)}}off(t,n){if(!t&&!n){this.eventListeners={};return}let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}setConversationQuery(t){this.dynamicThunkObject.conversationQuery=t}whenConversationLoaded(t){let n=()=>this.loadProfileConfig().then(()=>t());this.hasConversation()&&n();let r=this.hasConversation();this.store.subscribe(()=>{this.hasConversation()!==r&&(r=this.hasConversation(),r&&n())})}overlayContainerFactory(t,n,r,o){let[i,s]=oo(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=oo(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ro(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),o.remove()}),o}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!kd(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:p,detectSubmit:d,insertLink:h,inputMediator:v,closestScrollSelector:y,appendOverlayTo:m,inlineSuggestions:g}=n;if(this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:h,isEmbedded:p,inlineSuggestions:g}),n.automaticHandlingTime&&this.setupHandlingTime(t),ro(t),this.inputMediator=v||(Tr(t)?new Tn(t):new mo(t)),this.inputMediator.on("change",({plainText:S})=>{this.notifyInputChanged(S)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(Yx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",S=>{this.notifyKeyDown(S)}),this.inputMediator.on("paste",({pastedText:S,selectionText:_})=>{this.notifyPaste(S,_)}),this.inputMediator.on("cut",({selectionText:S})=>{this.notifyCut(S)}),g){if(Tr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let S=this.createInlineContainer(t,"deepdesk-caret");(0,$t.render)((0,ze.jsx)(Fi,{store:this.store,customStyles:r,children:(0,ze.jsx)(Ti,{broadcastEvents:this.broadcastEvents,children:(0,ze.jsx)(E1,{})})}),S),this.inputMediator.on("caret",_=>{this.store.dispatch(on([])),_?(S.style.display="block",S.style.top=`${_.top}px`,S.style.left=`${_.left}px`):S.style.display="none"})}else{let S=y&&rE(t,y)||void 0,_=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:m,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),b=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:m},r==null?void 0:r.suggestionsRootNode);(0,$t.render)((0,ze.jsx)(Fi,{store:this.store,customStyles:r,children:(0,ze.jsx)(Ti,{broadcastEvents:this.broadcastEvents,children:(0,ze.jsx)(G1,{inputElement:t})})}),_),(0,$t.render)((0,ze.jsx)(Fi,{store:this.store,customStyles:r,children:(0,ze.jsx)(Ti,{broadcastEvents:this.broadcastEvents,children:(0,ze.jsx)(L1,{})})}),b)}(0,$t.render)((0,ze.jsx)(Fi,{store:this.store,customStyles:r,children:(0,ze.jsx)(Ti,{broadcastEvents:this.broadcastEvents,children:(0,ze.jsx)(h1,{})})}),this.createContainer("deepdesk-overlays"));let f;this.inputMediator.on("selection",S=>{clearTimeout(f),S===null?f=setTimeout(()=>{S!==null&&this.store.dispatch(Wm(S))},500):this.store.dispatch(Wm(S))}),this.inputMediator.on("disabled",()=>{var S;(S=this.inputMediator)==null||S.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{d&&this.notifySubmit()}),this.inputMediator.on("blur",()=>this.store.dispatch(Ci(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Ci(!0))),this.store.dispatch(Ux({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var S;this.refresh(),this.broadcastEvents.setSessionId((S=this.state.conversation.current)==null?void 0:S.sessionId)}),this.isMounted=!0}unmount(){var t;this.unmountHandlers.forEach(n=>n()),this.unmountHandlers=[],(t=this.inputMediator)==null||t.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderWidget(t,n={}){if(this.widgetRoot&&V.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,showPersonalCollectionLink:i,isEmbedded:s}=n;this.widgetRoot=t,this.configure({showImages:o,showPersonalCollectionLink:i,isEmbedded:s}),(0,$t.render)((0,ze.jsx)(Fi,{store:this.store,customStyles:r,children:(0,ze.jsx)(Ti,{broadcastEvents:this.broadcastEvents,children:(0,ze.jsx)(jb,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,$t.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Pd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){oE(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ia());let t=Ai(this.state);t&&this.store.dispatch(ta({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeAssistForAgents,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(V.info("Trial is active"),!await this.deepdeskApi.checkUserExists(t))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;V.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=ed(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Vt()):this.store.dispatch(Pn(r))})}catch(r){this.handleError(r)}}};async function lE(e,t,n={}){let{value:r}=e,{start:o,end:i}=n.replace??{start:0,end:r.length},s=`${r.slice(0,o)}${t}${r.slice(i)}`,a=n.selectionAfter??{start:o+t.length,end:o+t.length},l=()=>{if(n.setValue)return n.setValue(s);e.value=s};return Promise.resolve(l()).then(()=>{e.selectionStart=a.start,e.selectionEnd=a.end,e.blur(),e.focus()})}async function uE(e,t,n={}){let r=n.replace?Rr(e,n.replace.start,n.replace.end):Bi(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
|
|
22
|
+
`).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?Rr(e,n.selectionAfter.start,n.selectionAfter.end):(r.collapse(!1),r),a=window.getSelection();a==null||a.removeAllRanges(),a==null||a.addRange(s)}if(!o)return;o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}async function cE(e,t){let n;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let r=()=>{let i=(e.ownerDocument.defaultView??window).getSelection();if(!i)return;let s=i.getRangeAt(0);s&&(s.deleteContents(),n=document.createElement("span"),s.insertNode(n),t.split(`
|
|
23
|
+
`).reverse().forEach((a,l)=>{l>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(a))}),s.collapse(!1))};return Promise.resolve(r()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!n)try{n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"nearest"})}finally{n&&n.remove()}})}function dE(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function pE(e,t,n){await new Bn(e).authenticateWithKey(t,n)}async function fE(e){let n=await new Wt(e).get("/platform/config/",{version:null});return re(n)}async function JA(e){let n=await(e.fetch??window.fetch)(e.url),r=await n.blob();return new File([r],e.name,{type:e.mimeType??n.headers.get("Content-Type")??"image/jpeg"})}async function mE(e,t){let n=await JA(t),r=new Event("change",{bubbles:!0,cancelable:!0});try{Object.defineProperty(e,"files",{configurable:!0,get:()=>[n]}),e.dispatchEvent(r)}finally{Object.hasOwn(e,"files")&&delete e.files}}return _E(eL);})();
|
|
24
24
|
/*! Bundled license information:
|
|
25
25
|
|
|
26
26
|
classnames/index.js:
|