@deepdesk/deepdesk-sdk 10.1.11 → 10.1.13
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/dist/index.cjs.js +2 -2
- package/dist/index.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.esm.js +2 -2
- package/dist/index.iife.js +8 -8
- package/package.json +3 -3
- package/styles/index.js +1 -1
- package/styles.css +1 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";var Deepdesk=(()=>{var rC=Object.create;var za=Object.defineProperty;var oC=Object.getOwnPropertyDescriptor;var iC=Object.getOwnPropertyNames;var sC=Object.getPrototypeOf,aC=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ce=(e,t)=>{for(var n in t)za(e,n,{get:t[n],enumerable:!0})},Sh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of iC(t))!aC.call(e,o)&&o!==n&&za(e,o,{get:()=>t[o],enumerable:!(r=oC(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?rC(sC(e)):{},Sh(t||!e||!e.__esModule?za(n,"default",{value:e,enumerable:!0}):n,e)),lC=e=>Sh(za({},"__esModule",{value:!0}),e);var X=fe((ML,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 Va=fe((DL,_h)=>{"use strict";var xh=Object.getOwnPropertySymbols,uC=Object.prototype.hasOwnProperty,cC=Object.prototype.propertyIsEnumerable;function dC(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}}_h.exports=pC()?Object.assign:function(e,t){for(var n,r=dC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)uC.call(n,s)&&(r[s]=n[s]);if(xh){o=xh(n);for(var a=0;a<o.length;a++)cC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Fh=fe(V=>{"use strict";var bd=Va(),co=60103,Ch=60106;V.Fragment=60107;V.StrictMode=60108;V.Profiler=60114;var bh=60109,Th=60110,kh=60112;V.Suspense=60113;var Ph=60115,Rh=60116;typeof Symbol=="function"&&Symbol.for&&(pt=Symbol.for,co=pt("react.element"),Ch=pt("react.portal"),V.Fragment=pt("react.fragment"),V.StrictMode=pt("react.strict_mode"),V.Profiler=pt("react.profiler"),bh=pt("react.provider"),Th=pt("react.context"),kh=pt("react.forward_ref"),V.Suspense=pt("react.suspense"),Ph=pt("react.memo"),Rh=pt("react.lazy"));var pt,wh=typeof Symbol=="function"&&Symbol.iterator;function fC(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}function zi(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 Ih={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lh={};function po(e,t,n){this.props=e,this.context=t,this.refs=Lh,this.updater=n||Ih}po.prototype.isReactComponent={};po.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(zi(85));this.updater.enqueueSetState(this,e,t,"setState")};po.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ah(){}Ah.prototype=po.prototype;function Td(e,t,n){this.props=e,this.context=t,this.refs=Lh,this.updater=n||Ih}var kd=Td.prototype=new Ah;kd.constructor=Td;bd(kd,po.prototype);kd.isPureReactComponent=!0;var Pd={current:null},Oh=Object.prototype.hasOwnProperty,Nh={key:!0,ref:!0,__self:!0,__source:!0};function Mh(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)Oh.call(t,r)&&!Nh.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:co,type:e,key:i,ref:s,props:o,_owner:Pd.current}}function mC(e,t){return{$$typeof:co,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Rd(e){return typeof e=="object"&&e!==null&&e.$$typeof===co}function gC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Eh=/\/+/g;function Cd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gC(""+e.key):t.toString(36)}function $a(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 co:case Ch:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Cd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Eh,"$&/")+"/"),$a(o,t,n,"",function(u){return u})):o!=null&&(Rd(o)&&(o=mC(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Eh,"$&/")+"/")+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+Cd(i,a);s+=$a(i,t,n,l,o)}else if(l=fC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Cd(i,a++),s+=$a(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(zi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Wa(e,t,n){if(e==null)return e;var r=[],o=0;return $a(e,r,"","",function(i){return t.call(n,i,o++)}),r}function hC(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 Dh={current:null};function cn(){var e=Dh.current;if(e===null)throw Error(zi(321));return e}var yC={ReactCurrentDispatcher:Dh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Pd,IsSomeRendererActing:{current:!1},assign:bd};V.Children={map:Wa,forEach:function(e,t,n){Wa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wa(e,function(){t++}),t},toArray:function(e){return Wa(e,function(t){return t})||[]},only:function(e){if(!Rd(e))throw Error(zi(143));return e}};V.Component=po;V.PureComponent=Td;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yC;V.cloneElement=function(e,t,n){if(e==null)throw Error(zi(267,e));var r=bd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Pd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Oh.call(t,l)&&!Nh.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:co,type:e.type,key:o,ref:i,props:r,_owner:s}};V.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Th,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:bh,_context:e},e.Consumer=e};V.createElement=Mh;V.createFactory=function(e){var t=Mh.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:kh,render:e}};V.isValidElement=Rd;V.lazy=function(e){return{$$typeof:Rh,_payload:{_status:-1,_result:e},_init:hC}};V.memo=function(e,t){return{$$typeof:Ph,type:e,compare:t===void 0?null:t}};V.useCallback=function(e,t){return cn().useCallback(e,t)};V.useContext=function(e,t){return cn().useContext(e,t)};V.useDebugValue=function(){};V.useEffect=function(e,t){return cn().useEffect(e,t)};V.useImperativeHandle=function(e,t,n){return cn().useImperativeHandle(e,t,n)};V.useLayoutEffect=function(e,t){return cn().useLayoutEffect(e,t)};V.useMemo=function(e,t){return cn().useMemo(e,t)};V.useReducer=function(e,t,n){return cn().useReducer(e,t,n)};V.useRef=function(e){return cn().useRef(e)};V.useState=function(e){return cn().useState(e)};V.version="17.0.2"});var O=fe((jL,jh)=>{"use strict";jh.exports=Fh()});var Kh=fe(Vi=>{"use strict";Va();var vC=O(),Uh=60103;Vi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Id=Symbol.for,Uh=Id("react.element"),Vi.Fragment=Id("react.fragment"));var Id,SC=vC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xC=Object.prototype.hasOwnProperty,_C={key:!0,ref:!0,__self:!0,__source:!0};function zh(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)xC.call(t,r)&&!_C.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:Uh,type:e,key:i,ref:s,props:o,_owner:SC.current}}Vi.jsx=zh;Vi.jsxs=zh});var E=fe((WL,Vh)=>{"use strict";Vh.exports=Kh()});var Ty=fe(q=>{"use strict";var vo,Zi,xl,Qd;typeof performance=="object"&&typeof performance.now=="function"?(_y=performance,q.unstable_now=function(){return _y.now()}):(Vd=Date,wy=Vd.now(),q.unstable_now=function(){return Vd.now()-wy});var _y,Vd,wy;typeof window>"u"||typeof MessageChannel!="function"?(yo=null,Wd=null,$d=function(){if(yo!==null)try{var e=q.unstable_now();yo(!0,e),yo=null}catch(t){throw setTimeout($d,0),t}},vo=function(e){yo!==null?setTimeout(vo,0,e):(yo=e,setTimeout($d,0))},Zi=function(e,t){Wd=setTimeout(e,t)},xl=function(){clearTimeout(Wd)},q.unstable_shouldYield=function(){return!1},Qd=q.unstable_forceFrameRate=function(){}):(Ey=window.setTimeout,Cy=window.clearTimeout,typeof console<"u"&&(by=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 by!="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,Yi=null,yl=-1,qd=5,Gd=0,q.unstable_shouldYield=function(){return q.unstable_now()>=Gd},Qd=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"):qd=0<e?Math.floor(1e3/e):5},Xd=new MessageChannel,vl=Xd.port2,Xd.port1.onmessage=function(){if(Yi!==null){var e=q.unstable_now();Gd=e+qd;try{Yi(!0,e)?vl.postMessage(null):(Qi=!1,Yi=null)}catch(t){throw vl.postMessage(null),t}}else Qi=!1},vo=function(e){Yi=e,Qi||(Qi=!0,vl.postMessage(null))},Zi=function(e,t){yl=Ey(function(){e(q.unstable_now())},t)},xl=function(){Cy(yl),yl=-1});var yo,Wd,$d,Ey,Cy,by,Qi,Yi,yl,qd,Gd,Xd,vl;function Yd(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 Nt(e){return e=e[0],e===void 0?null:e}function _l(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 Gt=[],zn=[],YC=1,ht=null,Ie=3,wl=!1,Mr=!1,Ji=!1;function Zd(e){for(var t=Nt(zn);t!==null;){if(t.callback===null)_l(zn);else if(t.startTime<=e)_l(zn),t.sortIndex=t.expirationTime,Yd(Gt,t);else break;t=Nt(zn)}}function Jd(e){if(Ji=!1,Zd(e),!Mr)if(Nt(Gt)!==null)Mr=!0,vo(ep);else{var t=Nt(zn);t!==null&&Zi(Jd,t.startTime-e)}}function ep(e,t){Mr=!1,Ji&&(Ji=!1,xl()),wl=!0;var n=Ie;try{for(Zd(t),ht=Nt(Gt);ht!==null&&(!(ht.expirationTime>t)||e&&!q.unstable_shouldYield());){var r=ht.callback;if(typeof r=="function"){ht.callback=null,Ie=ht.priorityLevel;var o=r(ht.expirationTime<=t);t=q.unstable_now(),typeof o=="function"?ht.callback=o:ht===Nt(Gt)&&_l(Gt),Zd(t)}else _l(Gt);ht=Nt(Gt)}if(ht!==null)var i=!0;else{var s=Nt(zn);s!==null&&Zi(Jd,s.startTime-t),i=!1}return i}finally{ht=null,Ie=n,wl=!1}}var ZC=Qd;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(){Mr||wl||(Mr=!0,vo(ep))};q.unstable_getCurrentPriorityLevel=function(){return Ie};q.unstable_getFirstCallbackNode=function(){return Nt(Gt)};q.unstable_next=function(e){switch(Ie){case 1:case 2:case 3:var t=3;break;default:t=Ie}var n=Ie;Ie=t;try{return e()}finally{Ie=n}};q.unstable_pauseExecution=function(){};q.unstable_requestPaint=ZC;q.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ie;Ie=e;try{return t()}finally{Ie=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:YC++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Yd(zn,e),Nt(Gt)===null&&e===Nt(zn)&&(Ji?xl():Ji=!0,Zi(Jd,n-r))):(e.sortIndex=o,Yd(Gt,e),Mr||wl||(Mr=!0,vo(ep))),e};q.unstable_wrapCallback=function(e){var t=Ie;return function(){var n=Ie;Ie=t;try{return e.apply(this,arguments)}finally{Ie=n}}}});var Py=fe((FO,ky)=>{"use strict";ky.exports=Ty()});var m0=fe(wt=>{"use strict";var gu=O(),ae=Va(),xe=Py();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(!gu)throw Error(T(227));var Uv=new Set,Rs={};function $r(e,t){Ho(e,t),Ho(e+"Capture",t)}function Ho(e,t){for(Rs[e]=t,e=0;e<t.length;e++)Uv.add(t[e])}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JC=/^[: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]*$/,Ry=Object.prototype.hasOwnProperty,Iy={},Ly={};function eb(e){return Ry.call(Ly,e)?!0:Ry.call(Iy,e)?!1:JC.test(e)?Ly[e]=!0:(Iy[e]=!0,!1)}function tb(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 nb(e,t,n,r){if(t===null||typeof t>"u"||tb(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 Be(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 Be(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 Be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Be(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 Be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Be(e,5,!1,e.toLowerCase(),null,!1,!1)});var cf=/[\-:]([a-z])/g;function df(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(cf,df);ke[t]=new Be(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(cf,df);ke[t]=new Be(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(cf,df);ke[t]=new Be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Be(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Be(e,1,!1,e.toLowerCase(),null,!0,!0)});function pf(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||(nb(t,n,o,r)&&(n=null),r||o===null?eb(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=gu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ps=60103,Fr=60106,Vn=60107,ff=60108,ys=60114,mf=60109,gf=60110,hu=60112,vs=60113,$l=60120,yu=60115,hf=60116,yf=60121,vf=60128,zv=60129,Sf=60130,Ep=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,ps=ye("react.element"),Fr=ye("react.portal"),Vn=ye("react.fragment"),ff=ye("react.strict_mode"),ys=ye("react.profiler"),mf=ye("react.provider"),gf=ye("react.context"),hu=ye("react.forward_ref"),vs=ye("react.suspense"),$l=ye("react.suspense_list"),yu=ye("react.memo"),hf=ye("react.lazy"),yf=ye("react.block"),ye("react.scope"),vf=ye("react.opaque.id"),zv=ye("react.debug_trace_mode"),Sf=ye("react.offscreen"),Ep=ye("react.legacy_hidden"));var ye,Ay=typeof Symbol=="function"&&Symbol.iterator;function es(e){return e===null||typeof e!="object"?null:(e=Ay&&e[Ay]||e["@@iterator"],typeof e=="function"?e:null)}var tp;function fs(e){if(tp===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);tp=t&&t[1]||""}return`
|
|
1
|
+
"use strict";var Deepdesk=(()=>{var rC=Object.create;var za=Object.defineProperty;var oC=Object.getOwnPropertyDescriptor;var iC=Object.getOwnPropertyNames;var sC=Object.getPrototypeOf,aC=Object.prototype.hasOwnProperty;var fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ce=(e,t)=>{for(var n in t)za(e,n,{get:t[n],enumerable:!0})},Sh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of iC(t))!aC.call(e,o)&&o!==n&&za(e,o,{get:()=>t[o],enumerable:!(r=oC(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?rC(sC(e)):{},Sh(t||!e||!e.__esModule?za(n,"default",{value:e,enumerable:!0}):n,e)),lC=e=>Sh(za({},"__esModule",{value:!0}),e);var X=fe((ML,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 Va=fe((DL,_h)=>{"use strict";var xh=Object.getOwnPropertySymbols,uC=Object.prototype.hasOwnProperty,cC=Object.prototype.propertyIsEnumerable;function dC(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}}_h.exports=pC()?Object.assign:function(e,t){for(var n,r=dC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)uC.call(n,s)&&(r[s]=n[s]);if(xh){o=xh(n);for(var a=0;a<o.length;a++)cC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Fh=fe(V=>{"use strict";var bd=Va(),co=60103,Ch=60106;V.Fragment=60107;V.StrictMode=60108;V.Profiler=60114;var bh=60109,Th=60110,kh=60112;V.Suspense=60113;var Ph=60115,Rh=60116;typeof Symbol=="function"&&Symbol.for&&(pt=Symbol.for,co=pt("react.element"),Ch=pt("react.portal"),V.Fragment=pt("react.fragment"),V.StrictMode=pt("react.strict_mode"),V.Profiler=pt("react.profiler"),bh=pt("react.provider"),Th=pt("react.context"),kh=pt("react.forward_ref"),V.Suspense=pt("react.suspense"),Ph=pt("react.memo"),Rh=pt("react.lazy"));var pt,wh=typeof Symbol=="function"&&Symbol.iterator;function fC(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}function zi(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 Ih={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lh={};function po(e,t,n){this.props=e,this.context=t,this.refs=Lh,this.updater=n||Ih}po.prototype.isReactComponent={};po.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(zi(85));this.updater.enqueueSetState(this,e,t,"setState")};po.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ah(){}Ah.prototype=po.prototype;function Td(e,t,n){this.props=e,this.context=t,this.refs=Lh,this.updater=n||Ih}var kd=Td.prototype=new Ah;kd.constructor=Td;bd(kd,po.prototype);kd.isPureReactComponent=!0;var Pd={current:null},Oh=Object.prototype.hasOwnProperty,Nh={key:!0,ref:!0,__self:!0,__source:!0};function Mh(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)Oh.call(t,r)&&!Nh.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:co,type:e,key:i,ref:s,props:o,_owner:Pd.current}}function mC(e,t){return{$$typeof:co,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Rd(e){return typeof e=="object"&&e!==null&&e.$$typeof===co}function gC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Eh=/\/+/g;function Cd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gC(""+e.key):t.toString(36)}function $a(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 co:case Ch:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Cd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Eh,"$&/")+"/"),$a(o,t,n,"",function(u){return u})):o!=null&&(Rd(o)&&(o=mC(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Eh,"$&/")+"/")+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+Cd(i,a);s+=$a(i,t,n,l,o)}else if(l=fC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Cd(i,a++),s+=$a(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(zi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Wa(e,t,n){if(e==null)return e;var r=[],o=0;return $a(e,r,"","",function(i){return t.call(n,i,o++)}),r}function hC(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 Dh={current:null};function cn(){var e=Dh.current;if(e===null)throw Error(zi(321));return e}var yC={ReactCurrentDispatcher:Dh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Pd,IsSomeRendererActing:{current:!1},assign:bd};V.Children={map:Wa,forEach:function(e,t,n){Wa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wa(e,function(){t++}),t},toArray:function(e){return Wa(e,function(t){return t})||[]},only:function(e){if(!Rd(e))throw Error(zi(143));return e}};V.Component=po;V.PureComponent=Td;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yC;V.cloneElement=function(e,t,n){if(e==null)throw Error(zi(267,e));var r=bd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Pd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Oh.call(t,l)&&!Nh.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:co,type:e.type,key:o,ref:i,props:r,_owner:s}};V.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Th,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:bh,_context:e},e.Consumer=e};V.createElement=Mh;V.createFactory=function(e){var t=Mh.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:kh,render:e}};V.isValidElement=Rd;V.lazy=function(e){return{$$typeof:Rh,_payload:{_status:-1,_result:e},_init:hC}};V.memo=function(e,t){return{$$typeof:Ph,type:e,compare:t===void 0?null:t}};V.useCallback=function(e,t){return cn().useCallback(e,t)};V.useContext=function(e,t){return cn().useContext(e,t)};V.useDebugValue=function(){};V.useEffect=function(e,t){return cn().useEffect(e,t)};V.useImperativeHandle=function(e,t,n){return cn().useImperativeHandle(e,t,n)};V.useLayoutEffect=function(e,t){return cn().useLayoutEffect(e,t)};V.useMemo=function(e,t){return cn().useMemo(e,t)};V.useReducer=function(e,t,n){return cn().useReducer(e,t,n)};V.useRef=function(e){return cn().useRef(e)};V.useState=function(e){return cn().useState(e)};V.version="17.0.2"});var O=fe((jL,jh)=>{"use strict";jh.exports=Fh()});var Kh=fe(Vi=>{"use strict";Va();var vC=O(),Uh=60103;Vi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Id=Symbol.for,Uh=Id("react.element"),Vi.Fragment=Id("react.fragment"));var Id,SC=vC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xC=Object.prototype.hasOwnProperty,_C={key:!0,ref:!0,__self:!0,__source:!0};function zh(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)xC.call(t,r)&&!_C.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:Uh,type:e,key:i,ref:s,props:o,_owner:SC.current}}Vi.jsx=zh;Vi.jsxs=zh});var E=fe((WL,Vh)=>{"use strict";Vh.exports=Kh()});var Ty=fe(q=>{"use strict";var vo,Zi,xl,Qd;typeof performance=="object"&&typeof performance.now=="function"?(_y=performance,q.unstable_now=function(){return _y.now()}):(Vd=Date,wy=Vd.now(),q.unstable_now=function(){return Vd.now()-wy});var _y,Vd,wy;typeof window>"u"||typeof MessageChannel!="function"?(yo=null,Wd=null,$d=function(){if(yo!==null)try{var e=q.unstable_now();yo(!0,e),yo=null}catch(t){throw setTimeout($d,0),t}},vo=function(e){yo!==null?setTimeout(vo,0,e):(yo=e,setTimeout($d,0))},Zi=function(e,t){Wd=setTimeout(e,t)},xl=function(){clearTimeout(Wd)},q.unstable_shouldYield=function(){return!1},Qd=q.unstable_forceFrameRate=function(){}):(Ey=window.setTimeout,Cy=window.clearTimeout,typeof console<"u"&&(by=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 by!="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,Yi=null,yl=-1,qd=5,Gd=0,q.unstable_shouldYield=function(){return q.unstable_now()>=Gd},Qd=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"):qd=0<e?Math.floor(1e3/e):5},Xd=new MessageChannel,vl=Xd.port2,Xd.port1.onmessage=function(){if(Yi!==null){var e=q.unstable_now();Gd=e+qd;try{Yi(!0,e)?vl.postMessage(null):(Qi=!1,Yi=null)}catch(t){throw vl.postMessage(null),t}}else Qi=!1},vo=function(e){Yi=e,Qi||(Qi=!0,vl.postMessage(null))},Zi=function(e,t){yl=Ey(function(){e(q.unstable_now())},t)},xl=function(){Cy(yl),yl=-1});var yo,Wd,$d,Ey,Cy,by,Qi,Yi,yl,qd,Gd,Xd,vl;function Yd(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 Nt(e){return e=e[0],e===void 0?null:e}function _l(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 Gt=[],zn=[],YC=1,ht=null,Ie=3,wl=!1,Mr=!1,Ji=!1;function Zd(e){for(var t=Nt(zn);t!==null;){if(t.callback===null)_l(zn);else if(t.startTime<=e)_l(zn),t.sortIndex=t.expirationTime,Yd(Gt,t);else break;t=Nt(zn)}}function Jd(e){if(Ji=!1,Zd(e),!Mr)if(Nt(Gt)!==null)Mr=!0,vo(ep);else{var t=Nt(zn);t!==null&&Zi(Jd,t.startTime-e)}}function ep(e,t){Mr=!1,Ji&&(Ji=!1,xl()),wl=!0;var n=Ie;try{for(Zd(t),ht=Nt(Gt);ht!==null&&(!(ht.expirationTime>t)||e&&!q.unstable_shouldYield());){var r=ht.callback;if(typeof r=="function"){ht.callback=null,Ie=ht.priorityLevel;var o=r(ht.expirationTime<=t);t=q.unstable_now(),typeof o=="function"?ht.callback=o:ht===Nt(Gt)&&_l(Gt),Zd(t)}else _l(Gt);ht=Nt(Gt)}if(ht!==null)var i=!0;else{var s=Nt(zn);s!==null&&Zi(Jd,s.startTime-t),i=!1}return i}finally{ht=null,Ie=n,wl=!1}}var ZC=Qd;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(){Mr||wl||(Mr=!0,vo(ep))};q.unstable_getCurrentPriorityLevel=function(){return Ie};q.unstable_getFirstCallbackNode=function(){return Nt(Gt)};q.unstable_next=function(e){switch(Ie){case 1:case 2:case 3:var t=3;break;default:t=Ie}var n=Ie;Ie=t;try{return e()}finally{Ie=n}};q.unstable_pauseExecution=function(){};q.unstable_requestPaint=ZC;q.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ie;Ie=e;try{return t()}finally{Ie=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:YC++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Yd(zn,e),Nt(Gt)===null&&e===Nt(zn)&&(Ji?xl():Ji=!0,Zi(Jd,n-r))):(e.sortIndex=o,Yd(Gt,e),Mr||wl||(Mr=!0,vo(ep))),e};q.unstable_wrapCallback=function(e){var t=Ie;return function(){var n=Ie;Ie=t;try{return e.apply(this,arguments)}finally{Ie=n}}}});var Py=fe((FO,ky)=>{"use strict";ky.exports=Ty()});var m0=fe(wt=>{"use strict";var gu=O(),ae=Va(),xe=Py();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(!gu)throw Error(T(227));var Uv=new Set,Rs={};function $r(e,t){Bo(e,t),Bo(e+"Capture",t)}function Bo(e,t){for(Rs[e]=t,e=0;e<t.length;e++)Uv.add(t[e])}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JC=/^[: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]*$/,Ry=Object.prototype.hasOwnProperty,Iy={},Ly={};function eb(e){return Ry.call(Ly,e)?!0:Ry.call(Iy,e)?!1:JC.test(e)?Ly[e]=!0:(Iy[e]=!0,!1)}function tb(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 nb(e,t,n,r){if(t===null||typeof t>"u"||tb(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 He(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 He(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 He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new He(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 He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var cf=/[\-:]([a-z])/g;function df(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(cf,df);ke[t]=new He(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(cf,df);ke[t]=new He(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(cf,df);ke[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function pf(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||(nb(t,n,o,r)&&(n=null),r||o===null?eb(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=gu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ps=60103,Fr=60106,Vn=60107,ff=60108,ys=60114,mf=60109,gf=60110,hu=60112,vs=60113,$l=60120,yu=60115,hf=60116,yf=60121,vf=60128,zv=60129,Sf=60130,Ep=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,ps=ye("react.element"),Fr=ye("react.portal"),Vn=ye("react.fragment"),ff=ye("react.strict_mode"),ys=ye("react.profiler"),mf=ye("react.provider"),gf=ye("react.context"),hu=ye("react.forward_ref"),vs=ye("react.suspense"),$l=ye("react.suspense_list"),yu=ye("react.memo"),hf=ye("react.lazy"),yf=ye("react.block"),ye("react.scope"),vf=ye("react.opaque.id"),zv=ye("react.debug_trace_mode"),Sf=ye("react.offscreen"),Ep=ye("react.legacy_hidden"));var ye,Ay=typeof Symbol=="function"&&Symbol.iterator;function es(e){return e===null||typeof e!="object"?null:(e=Ay&&e[Ay]||e["@@iterator"],typeof e=="function"?e:null)}var tp;function fs(e){if(tp===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);tp=t&&t[1]||""}return`
|
|
2
2
|
`+tp+e}var np=!1;function El(e,t){if(!e||np)return"";np=!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{np=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fs(e):""}function rb(e){switch(e.tag){case 5:return fs(e.type);case 16:return fs("Lazy");case 13:return fs("Suspense");case 19:return fs("SuspenseList");case 0:case 2:case 15:return e=El(e.type,!1),e;case 11:return e=El(e.type.render,!1),e;case 22:return e=El(e.type._render,!1),e;case 1:return e=El(e.type,!0),e;default:return""}}function Ro(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 Vn:return"Fragment";case Fr:return"Portal";case ys:return"Profiler";case ff:return"StrictMode";case vs:return"Suspense";case $l:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gf:return(e.displayName||"Context")+".Consumer";case mf:return(e._context.displayName||"Context")+".Provider";case hu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case yu:return Ro(e.type);case yf:return Ro(e._render);case hf:t=e._payload,e=e._init;try{return Ro(e(t))}catch{}}return null}function nr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Kv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ob(e){var t=Kv(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=ob(e))}function Vv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Kv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ql(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 Cp(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Oy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nr(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 Wv(e,t){t=t.checked,t!=null&&pf(e,"checked",t,!1)}function bp(e,t){Wv(e,t);var n=nr(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")?Tp(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tp(e,t.type,nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ny(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 Tp(e,t,n){(t!=="number"||ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ib(e){var t="";return gu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function kp(e,t){return e=ae({children:void 0},t),(t=ib(t.children))&&(e.children=t),e}function Io(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=""+nr(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 Pp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function My(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:nr(n)}}function $v(e,t){var n=nr(t.value),r=nr(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 Dy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Rp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function qv(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 Ip(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bl,Gv=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!==Rp.svg||"innerHTML"in e)e.innerHTML=t;else{for(bl=bl||document.createElement("div"),bl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=bl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Is(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ss={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},sb=["Webkit","ms","Moz","O"];Object.keys(Ss).forEach(function(e){sb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ss[t]=Ss[e]})});function Xv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ss.hasOwnProperty(e)&&Ss[e]?(""+t).trim():t+"px"}function Qv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Xv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ab=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 Lp(e,t){if(t){if(ab[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 Ap(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 xf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Op=null,Lo=null,Ao=null;function Fy(e){if(e=Vs(e)){if(typeof Op!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Eu(t),Op(e.stateNode,e.type,t))}}function Yv(e){Lo?Ao?Ao.push(e):Ao=[e]:Lo=e}function Zv(){if(Lo){var e=Lo,t=Ao;if(Ao=Lo=null,Fy(e),t)for(e=0;e<t.length;e++)Fy(t[e])}}function _f(e,t){return e(t)}function Jv(e,t,n,r,o){return e(t,n,r,o)}function wf(){}var eS=_f,jr=!1,rp=!1;function Ef(){(Lo!==null||Ao!==null)&&(wf(),Zv())}function lb(e,t,n){if(rp)return e(t,n);rp=!0;try{return eS(e,t,n)}finally{rp=!1,Ef()}}function Ls(e,t){var n=e.stateNode;if(n===null)return null;var r=Eu(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 Np=!1;if(hn)try{So={},Object.defineProperty(So,"passive",{get:function(){Np=!0}}),window.addEventListener("test",So,So),window.removeEventListener("test",So,So)}catch{Np=!1}var So;function ub(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 xs=!1,Gl=null,Xl=!1,Mp=null,cb={onError:function(e){xs=!0,Gl=e}};function db(e,t,n,r,o,i,s,a,l){xs=!1,Gl=null,ub.apply(cb,arguments)}function pb(e,t,n,r,o,i,s,a,l){if(db.apply(this,arguments),xs){if(xs){var u=Gl;xs=!1,Gl=null}else throw Error(T(198));Xl||(Xl=!0,Mp=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 tS(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 jy(e){if(Gr(e)!==e)throw Error(T(188))}function fb(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 jy(o),e;if(i===r)return jy(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 nS(e){if(e=fb(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 Hy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var rS,Cf,oS,iS,Dp=!1,Xt=[],Gn=null,Xn=null,Qn=null,As=new Map,Os=new Map,ts=[],By="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 Fp(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Uy(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":As.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(t.pointerId)}}function ns(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Fp(t,n,r,o,i),t!==null&&(t=Vs(t),t!==null&&Cf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function mb(e,t,n,r,o){switch(t){case"focusin":return Gn=ns(Gn,e,t,n,r,o),!0;case"dragenter":return Xn=ns(Xn,e,t,n,r,o),!0;case"mouseover":return Qn=ns(Qn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return As.set(i,ns(As.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Os.set(i,ns(Os.get(i)||null,e,t,n,r,o)),!0}return!1}function gb(e){var t=Hr(e.target);if(t!==null){var n=Gr(t);if(n!==null){if(t=n.tag,t===13){if(t=tS(n),t!==null){e.blockedOn=t,iS(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){oS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Vs(n),t!==null&&Cf(t),e.blockedOn=n,!1;t.shift()}return!0}function zy(e,t,n){Dl(e)&&n.delete(t)}function hb(){for(Dp=!1;0<Xt.length;){var e=Xt[0];if(e.blockedOn!==null){e=Vs(e.blockedOn),e!==null&&rS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Pf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Xt.shift()}Gn!==null&&Dl(Gn)&&(Gn=null),Xn!==null&&Dl(Xn)&&(Xn=null),Qn!==null&&Dl(Qn)&&(Qn=null),As.forEach(zy),Os.forEach(zy)}function rs(e,t){e.blockedOn===t&&(e.blockedOn=null,Dp||(Dp=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,hb)))}function sS(e){function t(o){return rs(o,e)}if(0<Xt.length){rs(Xt[0],e);for(var n=1;n<Xt.length;n++){var r=Xt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&rs(Gn,e),Xn!==null&&rs(Xn,e),Qn!==null&&rs(Qn,e),As.forEach(t),Os.forEach(t),n=0;n<ts.length;n++)r=ts[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ts.length&&(n=ts[0],n.blockedOn===null);)gb(n),n.blockedOn===null&&ts.shift()}function Tl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Eo={animationend:Tl("Animation","AnimationEnd"),animationiteration:Tl("Animation","AnimationIteration"),animationstart:Tl("Animation","AnimationStart"),transitionend:Tl("Transition","TransitionEnd")},op={},aS={};hn&&(aS=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function vu(e){if(op[e])return op[e];if(!Eo[e])return e;var t=Eo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in aS)return op[e]=t[n];return e}var lS=vu("animationend"),uS=vu("animationiteration"),cS=vu("animationstart"),dS=vu("transitionend"),pS=new Map,bf=new Map,yb=["abort","abort",lS,"animationEnd",uS,"animationIteration",cS,"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",dS,"transitionEnd","waiting","waiting"];function Tf(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)),bf.set(r,t),pS.set(r,o),$r(o,[r])}}var vb=xe.unstable_now;vb();var ne=8;function _o(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 Sb(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 xb(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 Ns(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=_o(l),o=ne):(a&=i,a!==0&&(r=_o(a),o=ne))}else i=n&~s,i!==0?(r=_o(i),o=ne):a!==0&&(r=_o(a),o=ne);if(r===0)return 0;if(r=31-rr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(_o(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-rr(t),o=1<<n,r|=e[n],t&=~o;return r}function fS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ql(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=wo(24&~t),e===0?Ql(10,t):e;case 10:return e=wo(192&~t),e===0?Ql(8,t):e;case 8:return e=wo(3584&~t),e===0&&(e=wo(4186112&~t),e===0&&(e=512)),e;case 2:return t=wo(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function wo(e){return e&-e}function ip(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-rr(t),e[t]=n}var rr=Math.clz32?Math.clz32:Eb,_b=Math.log,wb=Math.LN2;function Eb(e){return e===0?32:31-(_b(e)/wb|0)|0}var Cb=xe.unstable_UserBlockingPriority,bb=xe.unstable_runWithPriority,Fl=!0;function Tb(e,t,n,r){jr||wf();var o=kf,i=jr;jr=!0;try{Jv(o,e,t,n,r)}finally{(jr=i)||Ef()}}function kb(e,t,n,r){bb(Cb,kf.bind(null,e,t,n,r))}function kf(e,t,n,r){if(Fl){var o;if((o=(t&4)===0)&&0<Xt.length&&-1<By.indexOf(e))e=Fp(null,e,t,n,r),Xt.push(e);else{var i=Pf(e,t,n,r);if(i===null)o&&Uy(e,r);else{if(o){if(-1<By.indexOf(e)){e=Fp(i,e,t,n,r),Xt.push(e);return}if(mb(i,e,t,n,r))return;Uy(e,r)}TS(e,t,r,null,n)}}}}function Pf(e,t,n,r){var o=xf(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=tS(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 TS(e,t,r,o,n),null}var Wn=null,Rf=null,jl=null;function mS(){if(jl)return jl;var e,t=Rf,n=t.length,r,o="value"in Wn?Wn.value:Wn.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 jl=o.slice(e,1<r?1-r:void 0)}function Hl(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 kl(){return!0}function Ky(){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)?kl:Ky,this.isPropagationStopped=Ky,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=kl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=kl)},persist:function(){},isPersistent:kl}),t}var Ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},If=nt(Ko),Ks=ae({},Ko,{view:0,detail:0}),Pb=nt(Ks),sp,ap,os,xu=ae({},Ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lf,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!==os&&(os&&e.type==="mousemove"?(sp=e.screenX-os.screenX,ap=e.screenY-os.screenY):ap=sp=0,os=e),sp)},movementY:function(e){return"movementY"in e?e.movementY:ap}}),Vy=nt(xu),Rb=ae({},xu,{dataTransfer:0}),Ib=nt(Rb),Lb=ae({},Ks,{relatedTarget:0}),lp=nt(Lb),Ab=ae({},Ko,{animationName:0,elapsedTime:0,pseudoElement:0}),Ob=nt(Ab),Nb=ae({},Ko,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Mb=nt(Nb),Db=ae({},Ko,{data:0}),Wy=nt(Db),Fb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jb={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"},Hb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hb[e])?!!t[e]:!1}function Lf(){return Bb}var Ub=ae({},Ks,{key:function(e){if(e.key){var t=Fb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lf,charCode:function(e){return e.type==="keypress"?Hl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zb=nt(Ub),Kb=ae({},xu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$y=nt(Kb),Vb=ae({},Ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lf}),Wb=nt(Vb),$b=ae({},Ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),qb=nt($b),Gb=ae({},xu,{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}),Xb=nt(Gb),Qb=[9,13,27,32],Af=hn&&"CompositionEvent"in window,_s=null;hn&&"documentMode"in document&&(_s=document.documentMode);var Yb=hn&&"TextEvent"in window&&!_s,gS=hn&&(!Af||_s&&8<_s&&11>=_s),qy=String.fromCharCode(32),Gy=!1;function hS(e,t){switch(e){case"keyup":return Qb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Co=!1;function Zb(e,t){switch(e){case"compositionend":return yS(t);case"keypress":return t.which!==32?null:(Gy=!0,qy);case"textInput":return e=t.data,e===qy&&Gy?null:e;default:return null}}function Jb(e,t){if(Co)return e==="compositionend"||!Af&&hS(e,t)?(e=mS(),jl=Rf=Wn=null,Co=!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 gS&&t.locale!=="ko"?null:t.data;default:return null}}var eT={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 Xy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eT[e.type]:t==="textarea"}function vS(e,t,n,r){Yv(r),t=Yl(t,"onChange"),0<t.length&&(n=new If("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ws=null,Ms=null;function tT(e){ES(e,0)}function _u(e){var t=To(e);if(Vv(t))return e}function nT(e,t){if(e==="change")return t}var SS=!1;hn&&(hn?(Rl="oninput"in document,Rl||(up=document.createElement("div"),up.setAttribute("oninput","return;"),Rl=typeof up.oninput=="function"),Pl=Rl):Pl=!1,SS=Pl&&(!document.documentMode||9<document.documentMode));var Pl,Rl,up;function Qy(){ws&&(ws.detachEvent("onpropertychange",xS),Ms=ws=null)}function xS(e){if(e.propertyName==="value"&&_u(Ms)){var t=[];if(vS(t,Ms,e,xf(e)),e=tT,jr)e(t);else{jr=!0;try{_f(e,t)}finally{jr=!1,Ef()}}}}function rT(e,t,n){e==="focusin"?(Qy(),ws=t,Ms=n,ws.attachEvent("onpropertychange",xS)):e==="focusout"&&Qy()}function oT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(Ms)}function iT(e,t){if(e==="click")return _u(t)}function sT(e,t){if(e==="input"||e==="change")return _u(t)}function aT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:aT,lT=Object.prototype.hasOwnProperty;function Ds(e,t){if(yt(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(!lT.call(t,n[r])||!yt(e[n[r]],t[n[r]]))return!1;return!0}function Yy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zy(e,t){var n=Yy(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=Yy(n)}}function _S(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_S(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jy(){for(var e=window,t=ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ql(e.document)}return t}function jp(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 uT=hn&&"documentMode"in document&&11>=document.documentMode,bo=null,Hp=null,Es=null,Bp=!1;function ev(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bp||bo==null||bo!==ql(r)||(r=bo,"selectionStart"in r&&jp(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}),Es&&Ds(Es,r)||(Es=r,r=Yl(Hp,"onSelect"),0<r.length&&(t=new If("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=bo)))}Tf("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);Tf("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);Tf(yb,2);for(cp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Il=0;Il<cp.length;Il++)bf.set(cp[Il],0);var cp,Il;Ho("onMouseEnter",["mouseout","mouseover"]);Ho("onMouseLeave",["mouseout","mouseover"]);Ho("onPointerEnter",["pointerout","pointerover"]);Ho("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 ms="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),wS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ms));function tv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pb(r,t,void 0,e),e.currentTarget=null}function ES(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;tv(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;tv(o,a,u),i=l}}}if(Xl)throw e=Mp,Xl=!1,Mp=null,e}function ie(e,t){var n=PS(t),r=e+"__bubble";n.has(r)||(bS(t,e,2,!1),n.add(r))}var nv="_reactListening"+Math.random().toString(36).slice(2);function CS(e){e[nv]||(e[nv]=!0,Uv.forEach(function(t){wS.has(t)||rv(t,!1,e,null),rv(t,!0,e,null)}))}function rv(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&&wS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=PS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),bS(i,e,o,t),s.add(a))}function bS(e,t,n,r){var o=bf.get(t);switch(o===void 0?2:o){case 0:o=Tb;break;case 1:o=kb;break;default:o=kf}n=o.bind(null,t,n,e),o=void 0,!Np||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 TS(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}lb(function(){var u=i,c=xf(n),p=[];e:{var d=pS.get(e);if(d!==void 0){var y=If,v=e;switch(e){case"keypress":if(Hl(n)===0)break e;case"keydown":case"keyup":y=zb;break;case"focusin":v="focus",y=lp;break;case"focusout":v="blur",y=lp;break;case"beforeblur":case"afterblur":y=lp;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=Vy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Ib;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Wb;break;case lS:case uS:case cS:y=Ob;break;case dS:y=qb;break;case"scroll":y=Pb;break;case"wheel":y=Xb;break;case"copy":case"cut":case"paste":y=Mb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=$y}var h=(t&4)!==0,m=!h&&e==="scroll",g=h?d!==null?d+"Capture":null:d;h=[];for(var f=u,x;f!==null;){x=f;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,g!==null&&(_=Ls(f,g),_!=null&&h.push(Fs(f,_,x)))),m)break;f=f.return}0<h.length&&(d=new y(d,v,null,n,c),p.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[Vo]))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&&(m=Gr(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(y=null,v=u),y!==v)){if(h=Vy,_="onMouseLeave",g="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(h=$y,_="onPointerLeave",g="onPointerEnter",f="pointer"),m=y==null?d:To(y),x=v==null?d:To(v),d=new h(_,f+"leave",y,n,c),d.target=m,d.relatedTarget=x,_=null,Hr(c)===u&&(h=new h(g,f+"enter",v,n,c),h.target=x,h.relatedTarget=m,_=h),m=_,y&&v)t:{for(h=y,g=v,f=0,x=h;x;x=xo(x))f++;for(x=0,_=g;_;_=xo(_))x++;for(;0<f-x;)h=xo(h),f--;for(;0<x-f;)g=xo(g),x--;for(;f--;){if(h===g||g!==null&&h===g.alternate)break t;h=xo(h),g=xo(g)}h=null}else h=null;y!==null&&ov(p,d,y,h,!1),v!==null&&m!==null&&ov(p,m,v,h,!0)}}e:{if(d=u?To(u):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=nT;else if(Xy(d))if(SS)C=sT;else{C=oT;var w=rT}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=iT);if(C&&(C=C(e,u))){vS(p,C,n,c);break e}w&&w(e,d,u),e==="focusout"&&(w=d._wrapperState)&&w.controlled&&d.type==="number"&&Tp(d,"number",d.value)}switch(w=u?To(u):window,e){case"focusin":(Xy(w)||w.contentEditable==="true")&&(bo=w,Hp=u,Es=null);break;case"focusout":Es=Hp=bo=null;break;case"mousedown":Bp=!0;break;case"contextmenu":case"mouseup":case"dragend":Bp=!1,ev(p,n,c);break;case"selectionchange":if(uT)break;case"keydown":case"keyup":ev(p,n,c)}var b;if(Af)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 Co?hS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(gS&&n.locale!=="ko"&&(Co||R!=="onCompositionStart"?R==="onCompositionEnd"&&Co&&(b=mS()):(Wn=c,Rf="value"in Wn?Wn.value:Wn.textContent,Co=!0)),w=Yl(u,R),0<w.length&&(R=new Wy(R,e,null,n,c),p.push({event:R,listeners:w}),b?R.data=b:(b=yS(n),b!==null&&(R.data=b)))),(b=Yb?Zb(e,n):Jb(e,n))&&(u=Yl(u,"onBeforeInput"),0<u.length&&(c=new Wy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=b))}ES(p,t)})}function Fs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ls(e,n),i!=null&&r.unshift(Fs(e,i,o)),i=Ls(e,t),i!=null&&r.push(Fs(e,i,o))),e=e.return}return r}function xo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ov(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=Ls(n,i),l!=null&&s.unshift(Fs(n,l,a))):o||(l=Ls(n,i),l!=null&&s.push(Fs(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Zl(){}var dp=null,pp=null;function kS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Up(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 iv=typeof setTimeout=="function"?setTimeout:void 0,cT=typeof clearTimeout=="function"?clearTimeout:void 0;function Of(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Oo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function sv(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 fp=0;function dT(e){return{$$typeof:vf,toString:e,valueOf:e}}var wu=Math.random().toString(36).slice(2),$n="__reactFiber$"+wu,Jl="__reactProps$"+wu,Vo="__reactContainer$"+wu,av="__reactEvents$"+wu;function Hr(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vo]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=sv(e);e!==null;){if(n=e[$n])return n;e=sv(e)}return t}e=n,n=e.parentNode}return null}function Vs(e){return e=e[$n]||e[Vo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function To(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Eu(e){return e[Jl]||null}function PS(e){var t=e[av];return t===void 0&&(t=e[av]=new Set),t}var zp=[],ko=-1;function ar(e){return{current:e}}function se(e){0>ko||(e.current=zp[ko],zp[ko]=null,ko--)}function de(e,t){ko++,zp[ko]=e.current,e.current=t}var or={},Ne=ar(or),$e=ar(!1),Kr=or;function Bo(e,t){var n=e.type.contextTypes;if(!n)return or;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 qe(e){return e=e.childContextTypes,e!=null}function eu(){se($e),se(Ne)}function lv(e,t,n){if(Ne.current!==or)throw Error(T(168));de(Ne,t),de($e,n)}function RS(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,Ro(t)||"Unknown",o));return ae({},n,r)}function Bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Kr=Ne.current,de(Ne,e),de($e,$e.current),!0}function uv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=RS(e,t,Kr),r.__reactInternalMemoizedMergedChildContext=e,se($e),se(Ne),de(Ne,e)):se($e),de($e,n)}var Nf=null,zr=null,pT=xe.unstable_runWithPriority,Mf=xe.unstable_scheduleCallback,Kp=xe.unstable_cancelCallback,fT=xe.unstable_shouldYield,cv=xe.unstable_requestPaint,Vp=xe.unstable_now,mT=xe.unstable_getCurrentPriorityLevel,Cu=xe.unstable_ImmediatePriority,IS=xe.unstable_UserBlockingPriority,LS=xe.unstable_NormalPriority,AS=xe.unstable_LowPriority,OS=xe.unstable_IdlePriority,mp={},gT=cv!==void 0?cv:function(){},dn=null,Ul=null,gp=!1,dv=Vp(),Ae=1e4>dv?Vp:function(){return Vp()-dv};function Uo(){switch(mT()){case Cu:return 99;case IS:return 98;case LS:return 97;case AS:return 96;case OS:return 95;default:throw Error(T(332))}}function NS(e){switch(e){case 99:return Cu;case 98:return IS;case 97:return LS;case 96:return AS;case 95:return OS;default:throw Error(T(332))}}function Vr(e,t){return e=NS(e),pT(e,t)}function js(e,t,n){return e=NS(e),Mf(e,t,n)}function en(){if(Ul!==null){var e=Ul;Ul=null,Kp(e)}MS()}function MS(){if(!gp&&dn!==null){gp=!0;var e=0;try{var t=dn;Vr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),dn=null}catch(n){throw dn!==null&&(dn=dn.slice(e+1)),Mf(Cu,en),n}finally{gp=!1}}}var hT=qr.ReactCurrentBatchConfig;function Mt(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 tu=ar(null),nu=null,Po=null,ru=null;function Df(){ru=Po=nu=null}function Ff(e){var t=tu.current;se(tu),e.type._context._currentValue=t}function DS(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 No(e,t){nu=e,ru=Po=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dt=!0),e.firstContext=null)}function xt(e,t){if(ru!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(ru=e,t=1073741823),t={context:e,observedBits:t,next:null},Po===null){if(nu===null)throw Error(T(308));Po=t,nu.dependencies={lanes:0,firstContext:t,responders:null}}else Po=Po.next=t;return e._currentValue}var Kn=!1;function jf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function FS(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 Yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(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 pv(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 Hs(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 y=e,v=i;switch(a=t,d=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){p=y.call(d,p,a);break e}p=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=v.payload,a=typeof y=="function"?y.call(d,p,a):y,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,$s|=s,e.lanes=s,e.memoizedState=p}}function fv(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 jS=new gu.Component().refs;function ou(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 bu={isMounted:function(e){return(e=e._reactInternals)?Gr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Jn(e),i=Yn(r,o);i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Jn(e),i=Yn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tt(),r=Jn(e),o=Yn(n,r);o.tag=2,t!=null&&(o.callback=t),Zn(e,o),er(e,r,n)}};function mv(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?!Ds(n,r)||!Ds(o,i):!0}function HS(e,t,n){var r=!1,o=or,i=t.contextType;return typeof i=="object"&&i!==null?i=xt(i):(o=qe(t)?Kr:Ne.current,r=t.contextTypes,i=(r=r!=null)?Bo(e,o):or),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function gv(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&&bu.enqueueReplaceState(t,t.state,null)}function Wp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=jS,jf(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=xt(i):(i=qe(t)?Kr:Ne.current,o.context=Bo(e,i)),Hs(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ou(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&&bu.enqueueReplaceState(o,o.state,null),Hs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Ll=Array.isArray;function is(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===jS&&(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 Al(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 BS(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=sr(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,x){return g===null||g.tag!==6?(g=xp(f,m.mode,x),g.return=m,g):(g=o(g,f),g.return=m,g)}function l(m,g,f,x){return g!==null&&g.elementType===f.type?(x=o(g,f.props),x.ref=is(m,g,f),x.return=m,x):(x=Wl(f.type,f.key,f.props,null,m.mode,x),x.ref=is(m,g,f),x.return=m,x)}function u(m,g,f,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==f.containerInfo||g.stateNode.implementation!==f.implementation?(g=_p(f,m.mode,x),g.return=m,g):(g=o(g,f.children||[]),g.return=m,g)}function c(m,g,f,x,_){return g===null||g.tag!==7?(g=jo(f,m.mode,x,_),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=xp(""+g,m.mode,f),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ps:return f=Wl(g.type,g.key,g.props,null,m.mode,f),f.ref=is(m,null,g),f.return=m,f;case Fr:return g=_p(g,m.mode,f),g.return=m,g}if(Ll(g)||es(g))return g=jo(g,m.mode,f,null),g.return=m,g;Al(m,g)}return null}function d(m,g,f,x){var _=g!==null?g.key:null;if(typeof f=="string"||typeof f=="number")return _!==null?null:a(m,g,""+f,x);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case ps:return f.key===_?f.type===Vn?c(m,g,f.props.children,x,_):l(m,g,f,x):null;case Fr:return f.key===_?u(m,g,f,x):null}if(Ll(f)||es(f))return _!==null?null:c(m,g,f,x,null);Al(m,f)}return null}function y(m,g,f,x,_){if(typeof x=="string"||typeof x=="number")return m=m.get(f)||null,a(g,m,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ps:return m=m.get(x.key===null?f:x.key)||null,x.type===Vn?c(g,m,x.props.children,_,x.key):l(g,m,x,_);case Fr:return m=m.get(x.key===null?f:x.key)||null,u(g,m,x,_)}if(Ll(x)||es(x))return m=m.get(f)||null,c(g,m,x,_,null);Al(g,x)}return null}function v(m,g,f,x){for(var _=null,C=null,w=g,b=g=0,R=null;w!==null&&b<f.length;b++){w.index>b?(R=w,w=null):R=w.sibling;var P=d(m,w,f[b],x);if(P===null){w===null&&(w=R);break}e&&w&&P.alternate===null&&t(m,w),g=i(P,g,b),C===null?_=P:C.sibling=P,C=P,w=R}if(b===f.length)return n(m,w),_;if(w===null){for(;b<f.length;b++)w=p(m,f[b],x),w!==null&&(g=i(w,g,b),C===null?_=w:C.sibling=w,C=w);return _}for(w=r(m,w);b<f.length;b++)R=y(w,m,b,f[b],x),R!==null&&(e&&R.alternate!==null&&w.delete(R.key===null?b:R.key),g=i(R,g,b),C===null?_=R:C.sibling=R,C=R);return e&&w.forEach(function(N){return t(m,N)}),_}function h(m,g,f,x){var _=es(f);if(typeof _!="function")throw Error(T(150));if(f=_.call(f),f==null)throw Error(T(151));for(var C=_=null,w=g,b=g=0,R=null,P=f.next();w!==null&&!P.done;b++,P=f.next()){w.index>b?(R=w,w=null):R=w.sibling;var N=d(m,w,P.value,x);if(N===null){w===null&&(w=R);break}e&&w&&N.alternate===null&&t(m,w),g=i(N,g,b),C===null?_=N:C.sibling=N,C=N,w=R}if(P.done)return n(m,w),_;if(w===null){for(;!P.done;b++,P=f.next())P=p(m,P.value,x),P!==null&&(g=i(P,g,b),C===null?_=P:C.sibling=P,C=P);return _}for(w=r(m,w);!P.done;b++,P=f.next())P=y(w,m,b,P.value,x),P!==null&&(e&&P.alternate!==null&&w.delete(P.key===null?b:P.key),g=i(P,g,b),C===null?_=P:C.sibling=P,C=P);return e&&w.forEach(function(K){return t(m,K)}),_}return function(m,g,f,x){var _=typeof f=="object"&&f!==null&&f.type===Vn&&f.key===null;_&&(f=f.props.children);var C=typeof f=="object"&&f!==null;if(C)switch(f.$$typeof){case ps:e:{for(C=f.key,_=g;_!==null;){if(_.key===C){switch(_.tag){case 7:if(f.type===Vn){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=is(m,_,f),g.return=m,m=g;break e}}n(m,_);break}else t(m,_);_=_.sibling}f.type===Vn?(g=jo(f.props.children,m.mode,x,f.key),g.return=m,m=g):(x=Wl(f.type,f.key,f.props,null,m.mode,x),x.ref=is(m,g,f),x.return=m,m=x)}return s(m);case Fr: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=_p(f,m.mode,x),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=xp(f,m.mode,x),g.return=m,m=g),s(m);if(Ll(f))return v(m,g,f,x);if(es(f))return h(m,g,f,x);if(C&&Al(m,f),typeof f>"u"&&!_)switch(m.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Ro(m.type)||"Component"))}return n(m,g)}}var iu=BS(!0),US=BS(!1),Ws={},Zt=ar(Ws),Bs=ar(Ws),Us=ar(Ws);function Br(e){if(e===Ws)throw Error(T(174));return e}function $p(e,t){switch(de(Us,t),de(Bs,e),de(Zt,Ws),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ip(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ip(t,e)}se(Zt),de(Zt,t)}function zo(){se(Zt),se(Bs),se(Us)}function hv(e){Br(Us.current);var t=Br(Zt.current),n=Ip(t,e.type);t!==n&&(de(Bs,e),de(Zt,n))}function Hf(e){Bs.current===e&&(se(Zt),se(Bs))}var ce=ar(0);function su(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 fn=null,qn=null,Jt=!1;function zS(e,t){var n=vt(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 yv(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 qp(e){if(Jt){var t=qn;if(t){var n=t;if(!yv(e,t)){if(t=Oo(n.nextSibling),!t||!yv(e,t)){e.flags=e.flags&-1025|2,Jt=!1,fn=e;return}zS(fn,n)}fn=e,qn=Oo(t.firstChild)}else e.flags=e.flags&-1025|2,Jt=!1,fn=e}}function vv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;fn=e}function Ol(e){if(e!==fn)return!1;if(!Jt)return vv(e),Jt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Up(t,e.memoizedProps))for(t=qn;t;)zS(e,t),t=Oo(t.nextSibling);if(vv(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){qn=Oo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qn=null}}else qn=fn?Oo(e.stateNode.nextSibling):null;return!0}function hp(){qn=fn=null,Jt=!1}var Mo=[];function Bf(){for(var e=0;e<Mo.length;e++)Mo[e]._workInProgressVersionPrimary=null;Mo.length=0}var Cs=qr.ReactCurrentDispatcher,St=qr.ReactCurrentBatchConfig,zs=0,ge=null,Le=null,be=null,au=!1,bs=!1;function Ve(){throw Error(T(321))}function Uf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function zf(e,t,n,r,o,i){if(zs=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cs.current=e===null||e.memoizedState===null?vT:ST,e=n(r,o),bs){i=0;do{if(bs=!1,!(25>i))throw Error(T(301));i+=1,be=Le=null,t.updateQueue=null,Cs.current=xT,e=n(r,o)}while(bs)}if(Cs.current=du,t=Le!==null&&Le.next!==null,zs=0,be=Le=ge=null,au=!1,t)throw Error(T(300));return e}function Ur(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?ge.memoizedState=be=e:be=be.next=e,be}function Xr(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=be===null?ge.memoizedState:be.next;if(t!==null)be=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},be===null?ge.memoizedState=be=e:be=be.next=e}return be}function Qt(e,t){return typeof t=="function"?t(e):t}function ss(e){var t=Xr(),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,ge.lanes|=u,$s|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,yt(r,t.memoizedState)||(Dt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function as(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);yt(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Sv(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,Mo.push(t))),e)return n(t._source);throw Mo.push(t),Error(T(350))}function KS(e,t,n,r){var o=He;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=Cs.current,l=a.useState(function(){return Sv(o,t,n)}),u=l[1],c=l[0];l=be;var p=e.memoizedState,d=p.refs,y=d.getSnapshot,v=p.source;p=p.subscribe;var h=ge;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var m=i(t._source);if(!yt(s,m)){m=n(t._source),yt(c,m)||(u(m),m=Jn(h),o.mutableReadLanes|=m&o.pendingLanes),m=o.mutableReadLanes,o.entangledLanes|=m;for(var g=o.entanglements,f=m;0<f;){var x=31-rr(f),_=1<<x;g[x]|=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=Jn(h);o.mutableReadLanes|=f&o.pendingLanes}catch(x){g(function(){throw x})}})},[t,r]),yt(y,n)&&yt(v,t)&&yt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:c},e.dispatch=u=Wf.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=Sv(o,t,n),l.memoizedState=l.baseState=c),c}function VS(e,t,n){var r=Xr();return KS(r,e,t,n)}function ls(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=Wf.bind(null,ge,e),[t.memoizedState,e]}function lu(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 xv(e){var t=Ur();return e={current:e},t.memoizedState=e}function uu(){return Xr().memoizedState}function Gp(e,t,n,r){var o=Ur();ge.flags|=e,o.memoizedState=lu(1|t,n,void 0,r===void 0?null:r)}function Kf(e,t,n,r){var o=Xr();r=r===void 0?null:r;var i=void 0;if(Le!==null){var s=Le.memoizedState;if(i=s.destroy,r!==null&&Uf(r,s.deps)){lu(t,n,i,r);return}}ge.flags|=e,o.memoizedState=lu(1|t,n,i,r)}function _v(e,t){return Gp(516,4,e,t)}function cu(e,t){return Kf(516,4,e,t)}function WS(e,t){return Kf(4,2,e,t)}function $S(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 qS(e,t,n){return n=n!=null?n.concat([e]):null,Kf(4,2,$S.bind(null,t,e),n)}function Vf(){}function GS(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Uf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function XS(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Uf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yT(e,t){var n=Uo();Vr(98>n?98:n,function(){e(!0)}),Vr(97<n?97:n,function(){var r=St.transition;St.transition=1;try{e(!1),t()}finally{St.transition=r}})}function Wf(e,t,n){var r=tt(),o=Jn(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)bs=au=!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,yt(l,a))return}catch{}finally{}er(e,o,r)}}var du={readContext:xt,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useOpaqueIdentifier:Ve,unstable_isNewReconciler:!1},vT={readContext:xt,useCallback:function(e,t){return Ur().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:_v,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gp(4,2,$S.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gp(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=Wf.bind(null,ge,e),[r.memoizedState,e]},useRef:xv,useState:ls,useDebugValue:Vf,useDeferredValue:function(e){var t=ls(e),n=t[0],r=t[1];return _v(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ls(!1),t=e[0];return e=yT.bind(null,e[1]),xv(e),[e,t]},useMutableSource:function(e,t,n){var r=Ur();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},KS(r,e,t,n)},useOpaqueIdentifier:function(){if(Jt){var e=!1,t=dT(function(){throw e||(e=!0,n("r:"+(fp++).toString(36))),Error(T(355))}),n=ls(t)[1];return!(ge.mode&2)&&(ge.flags|=516,lu(5,function(){n("r:"+(fp++).toString(36))},void 0,null)),t}return t="r:"+(fp++).toString(36),ls(t),t},unstable_isNewReconciler:!1},ST={readContext:xt,useCallback:GS,useContext:xt,useEffect:cu,useImperativeHandle:qS,useLayoutEffect:WS,useMemo:XS,useReducer:ss,useRef:uu,useState:function(){return ss(Qt)},useDebugValue:Vf,useDeferredValue:function(e){var t=ss(Qt),n=t[0],r=t[1];return cu(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ss(Qt)[0];return[uu().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return ss(Qt)[0]},unstable_isNewReconciler:!1},xT={readContext:xt,useCallback:GS,useContext:xt,useEffect:cu,useImperativeHandle:qS,useLayoutEffect:WS,useMemo:XS,useReducer:as,useRef:uu,useState:function(){return as(Qt)},useDebugValue:Vf,useDeferredValue:function(e){var t=as(Qt),n=t[0],r=t[1];return cu(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=as(Qt)[0];return[uu().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return as(Qt)[0]},unstable_isNewReconciler:!1},_T=qr.ReactCurrentOwner,Dt=!1;function We(e,t,n,r){t.child=e===null?US(t,null,n,r):iu(t,e.child,n,r)}function wv(e,t,n,r,o){n=n.render;var i=t.ref;return No(t,o),r=zf(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,mn(e,t,o)):(t.flags|=1,We(e,t,r,o),t.child)}function Ev(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Yf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,QS(e,t,s,r,o,i)):(e=Wl(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:Ds,n(o,r)&&e.ref===t.ref)?mn(e,t,i):(t.flags|=1,e=sr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function QS(e,t,n,r,o,i){if(e!==null&&Ds(e.memoizedProps,r)&&e.ref===t.ref)if(Dt=!1,(i&o)!==0)e.flags&16384&&(Dt=!0);else return t.lanes=e.lanes,mn(e,t,i);return Xp(e,t,n,r,i)}function yp(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},Ml(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Ml(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Ml(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ml(t,r);return We(e,t,o,n),t.child}function YS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Xp(e,t,n,r,o){var i=qe(n)?Kr:Ne.current;return i=Bo(t,i),No(t,o),n=zf(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,mn(e,t,o)):(t.flags|=1,We(e,t,n,o),t.child)}function Cv(e,t,n,r,o){if(qe(n)){var i=!0;Bl(t)}else i=!1;if(No(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),HS(t,n,r),Wp(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=xt(u):(u=qe(n)?Kr:Ne.current,u=Bo(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)&&gv(t,s,r,u),Kn=!1;var d=t.memoizedState;s.state=d,Hs(t,r,s,o),l=t.memoizedState,a!==r||d!==l||$e.current||Kn?(typeof c=="function"&&(ou(t,n,c,r),l=t.memoizedState),(a=Kn||mv(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,FS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Mt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=xt(l):(l=qe(n)?Kr:Ne.current,l=Bo(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&gv(t,s,r,l),Kn=!1,d=t.memoizedState,s.state=d,Hs(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||$e.current||Kn?(typeof y=="function"&&(ou(t,n,y,r),v=t.memoizedState),(u=Kn||mv(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 Qp(e,t,n,r,i,o)}function Qp(e,t,n,r,o,i){YS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&uv(t,n,!1),mn(e,t,i);r=t.stateNode,_T.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=iu(t,e.child,null,i),t.child=iu(t,null,a,i)):We(e,t,a,i),t.memoizedState=r.state,o&&uv(t,n,!0),t.child}function bv(e){var t=e.stateNode;t.pendingContext?lv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lv(e,t.context,!1),$p(e,t.containerInfo)}var Nl={dehydrated:null,retryLane:0};function Tv(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&&qp(t),e=r.children,o=r.fallback,i?(e=kv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Nl,e):typeof r.unstable_expectedLoadTime=="number"?(e=kv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Nl,t.lanes=33554432,e):(n=Zf({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Rv(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=Nl,r):(n=Pv(e,t,r.children,n),t.memoizedState=null,n):i?(r=Rv(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=Nl,r):(n=Pv(e,t,r.children,n),t.memoizedState=null,n)}function kv(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=Zf(t,o,0,null),n=jo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Pv(e,t,n,r){var o=e.child;return e=o.sibling,n=sr(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 Rv(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=sr(s,a),e!==null?r=sr(e,r):(r=jo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Iv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),DS(e.return,t)}function vp(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 Lv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(We(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&&Iv(e,n);else if(e.tag===19)Iv(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&&su(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),vp(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&&su(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}vp(t,!0,n,null,i,t.lastEffect);break;case"together":vp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$s|=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=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var ZS,Yp,JS,e0;ZS=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}};Yp=function(){};JS=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=Cp(e,o),r=Cp(e,r),i=[];break;case"option":o=kp(e,o),r=kp(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Pp(e,o),r=Pp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zl)}Lp(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"&&(Rs.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"&&(Rs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===vf?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};e0=function(e,t,n,r){n!==r&&(t.flags|=4)};function us(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 wT(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 qe(t.type)&&eu(),null;case 3:return zo(),se($e),se(Ne),Bf(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ol(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Yp(t),null;case 5:Hf(t);var o=Br(Us.current);if(n=t.type,e!==null&&t.stateNode!=null)JS(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),Ol(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[$n]=t,r[Jl]=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<ms.length;e++)ie(ms[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":Oy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":My(r,i),ie("invalid",r)}Lp(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]):Rs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":Cl(r),Ny(r,i,!0);break;case"textarea":Cl(r),Dy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Zl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Rp.html&&(e=qv(n)),e===Rp.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[$n]=t,e[Jl]=r,ZS(e,t,!1,!1),t.stateNode=e,s=Ap(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<ms.length;o++)ie(ms[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":Oy(e,r),o=Cp(e,r),ie("invalid",e);break;case"option":o=kp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":My(e,r),o=Pp(e,r),ie("invalid",e);break;default:o=r}Lp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Qv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Gv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Is(e,l):typeof l=="number"&&Is(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Rs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&pf(e,i,l,s))}switch(n){case"input":Cl(e),Ny(e,r,!1);break;case"textarea":Cl(e),Dy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Io(e,!!r.multiple,i,!1):r.defaultValue!=null&&Io(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Zl)}kS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)e0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Br(Us.current),Br(Zt.current),Ol(t)?(r=t.stateNode,n=t.memoizedProps,r[$n]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=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&&Ol(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),He===null||!($s&134217727)&&!($o&134217727)||Do(He,Oe))),(r||n)&&(t.flags|=4),null);case 4:return zo(),Yp(t),e===null&&CS(t.stateNode.containerInfo),null;case 10:return Ff(t),null;case 17:return qe(t.type)&&eu(),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)us(r,!1);else{if(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=su(e),s!==null){for(t.flags|=64,us(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&&Ae()>rf&&(t.flags|=64,i=!0,us(r,!1),t.lanes=33554432)}else{if(!i)if(e=su(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),us(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*Ae()-r.renderingStartTime>rf&&n!==1073741824&&(t.flags|=64,i=!0,us(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=Ae(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return Qf(),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 ET(e){switch(e.tag){case 1:qe(e.type)&&eu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(zo(),se($e),se(Ne),Bf(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Hf(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 zo(),null;case 10:return Ff(e),null;case 23:case 24:return Qf(),null;default:return null}}function $f(e,t){try{var n="",r=t;do n+=rb(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{np=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fs(e):""}function rb(e){switch(e.tag){case 5:return fs(e.type);case 16:return fs("Lazy");case 13:return fs("Suspense");case 19:return fs("SuspenseList");case 0:case 2:case 15:return e=El(e.type,!1),e;case 11:return e=El(e.type.render,!1),e;case 22:return e=El(e.type._render,!1),e;case 1:return e=El(e.type,!0),e;default:return""}}function Ro(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 Vn:return"Fragment";case Fr:return"Portal";case ys:return"Profiler";case ff:return"StrictMode";case vs:return"Suspense";case $l:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gf:return(e.displayName||"Context")+".Consumer";case mf:return(e._context.displayName||"Context")+".Provider";case hu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case yu:return Ro(e.type);case yf:return Ro(e._render);case hf:t=e._payload,e=e._init;try{return Ro(e(t))}catch{}}return null}function nr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Kv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ob(e){var t=Kv(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=ob(e))}function Vv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Kv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ql(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 Cp(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Oy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nr(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 Wv(e,t){t=t.checked,t!=null&&pf(e,"checked",t,!1)}function bp(e,t){Wv(e,t);var n=nr(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")?Tp(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tp(e,t.type,nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ny(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 Tp(e,t,n){(t!=="number"||ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ib(e){var t="";return gu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function kp(e,t){return e=ae({children:void 0},t),(t=ib(t.children))&&(e.children=t),e}function Io(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=""+nr(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 Pp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function My(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:nr(n)}}function $v(e,t){var n=nr(t.value),r=nr(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 Dy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Rp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function qv(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 Ip(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bl,Gv=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!==Rp.svg||"innerHTML"in e)e.innerHTML=t;else{for(bl=bl||document.createElement("div"),bl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=bl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Is(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ss={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},sb=["Webkit","ms","Moz","O"];Object.keys(Ss).forEach(function(e){sb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ss[t]=Ss[e]})});function Xv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ss.hasOwnProperty(e)&&Ss[e]?(""+t).trim():t+"px"}function Qv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Xv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ab=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 Lp(e,t){if(t){if(ab[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 Ap(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 xf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Op=null,Lo=null,Ao=null;function Fy(e){if(e=Vs(e)){if(typeof Op!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Eu(t),Op(e.stateNode,e.type,t))}}function Yv(e){Lo?Ao?Ao.push(e):Ao=[e]:Lo=e}function Zv(){if(Lo){var e=Lo,t=Ao;if(Ao=Lo=null,Fy(e),t)for(e=0;e<t.length;e++)Fy(t[e])}}function _f(e,t){return e(t)}function Jv(e,t,n,r,o){return e(t,n,r,o)}function wf(){}var eS=_f,jr=!1,rp=!1;function Ef(){(Lo!==null||Ao!==null)&&(wf(),Zv())}function lb(e,t,n){if(rp)return e(t,n);rp=!0;try{return eS(e,t,n)}finally{rp=!1,Ef()}}function Ls(e,t){var n=e.stateNode;if(n===null)return null;var r=Eu(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 Np=!1;if(hn)try{So={},Object.defineProperty(So,"passive",{get:function(){Np=!0}}),window.addEventListener("test",So,So),window.removeEventListener("test",So,So)}catch{Np=!1}var So;function ub(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 xs=!1,Gl=null,Xl=!1,Mp=null,cb={onError:function(e){xs=!0,Gl=e}};function db(e,t,n,r,o,i,s,a,l){xs=!1,Gl=null,ub.apply(cb,arguments)}function pb(e,t,n,r,o,i,s,a,l){if(db.apply(this,arguments),xs){if(xs){var u=Gl;xs=!1,Gl=null}else throw Error(T(198));Xl||(Xl=!0,Mp=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 tS(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 jy(e){if(Gr(e)!==e)throw Error(T(188))}function fb(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 jy(o),e;if(i===r)return jy(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 nS(e){if(e=fb(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 By(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var rS,Cf,oS,iS,Dp=!1,Xt=[],Gn=null,Xn=null,Qn=null,As=new Map,Os=new Map,ts=[],Hy="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 Fp(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Uy(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":As.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(t.pointerId)}}function ns(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Fp(t,n,r,o,i),t!==null&&(t=Vs(t),t!==null&&Cf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function mb(e,t,n,r,o){switch(t){case"focusin":return Gn=ns(Gn,e,t,n,r,o),!0;case"dragenter":return Xn=ns(Xn,e,t,n,r,o),!0;case"mouseover":return Qn=ns(Qn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return As.set(i,ns(As.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Os.set(i,ns(Os.get(i)||null,e,t,n,r,o)),!0}return!1}function gb(e){var t=Br(e.target);if(t!==null){var n=Gr(t);if(n!==null){if(t=n.tag,t===13){if(t=tS(n),t!==null){e.blockedOn=t,iS(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){oS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Vs(n),t!==null&&Cf(t),e.blockedOn=n,!1;t.shift()}return!0}function zy(e,t,n){Dl(e)&&n.delete(t)}function hb(){for(Dp=!1;0<Xt.length;){var e=Xt[0];if(e.blockedOn!==null){e=Vs(e.blockedOn),e!==null&&rS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Pf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Xt.shift()}Gn!==null&&Dl(Gn)&&(Gn=null),Xn!==null&&Dl(Xn)&&(Xn=null),Qn!==null&&Dl(Qn)&&(Qn=null),As.forEach(zy),Os.forEach(zy)}function rs(e,t){e.blockedOn===t&&(e.blockedOn=null,Dp||(Dp=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,hb)))}function sS(e){function t(o){return rs(o,e)}if(0<Xt.length){rs(Xt[0],e);for(var n=1;n<Xt.length;n++){var r=Xt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&rs(Gn,e),Xn!==null&&rs(Xn,e),Qn!==null&&rs(Qn,e),As.forEach(t),Os.forEach(t),n=0;n<ts.length;n++)r=ts[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ts.length&&(n=ts[0],n.blockedOn===null);)gb(n),n.blockedOn===null&&ts.shift()}function Tl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Eo={animationend:Tl("Animation","AnimationEnd"),animationiteration:Tl("Animation","AnimationIteration"),animationstart:Tl("Animation","AnimationStart"),transitionend:Tl("Transition","TransitionEnd")},op={},aS={};hn&&(aS=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function vu(e){if(op[e])return op[e];if(!Eo[e])return e;var t=Eo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in aS)return op[e]=t[n];return e}var lS=vu("animationend"),uS=vu("animationiteration"),cS=vu("animationstart"),dS=vu("transitionend"),pS=new Map,bf=new Map,yb=["abort","abort",lS,"animationEnd",uS,"animationIteration",cS,"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",dS,"transitionEnd","waiting","waiting"];function Tf(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)),bf.set(r,t),pS.set(r,o),$r(o,[r])}}var vb=xe.unstable_now;vb();var ne=8;function _o(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 Sb(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 xb(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 Ns(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=_o(l),o=ne):(a&=i,a!==0&&(r=_o(a),o=ne))}else i=n&~s,i!==0?(r=_o(i),o=ne):a!==0&&(r=_o(a),o=ne);if(r===0)return 0;if(r=31-rr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(_o(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-rr(t),o=1<<n,r|=e[n],t&=~o;return r}function fS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ql(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=wo(24&~t),e===0?Ql(10,t):e;case 10:return e=wo(192&~t),e===0?Ql(8,t):e;case 8:return e=wo(3584&~t),e===0&&(e=wo(4186112&~t),e===0&&(e=512)),e;case 2:return t=wo(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function wo(e){return e&-e}function ip(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-rr(t),e[t]=n}var rr=Math.clz32?Math.clz32:Eb,_b=Math.log,wb=Math.LN2;function Eb(e){return e===0?32:31-(_b(e)/wb|0)|0}var Cb=xe.unstable_UserBlockingPriority,bb=xe.unstable_runWithPriority,Fl=!0;function Tb(e,t,n,r){jr||wf();var o=kf,i=jr;jr=!0;try{Jv(o,e,t,n,r)}finally{(jr=i)||Ef()}}function kb(e,t,n,r){bb(Cb,kf.bind(null,e,t,n,r))}function kf(e,t,n,r){if(Fl){var o;if((o=(t&4)===0)&&0<Xt.length&&-1<Hy.indexOf(e))e=Fp(null,e,t,n,r),Xt.push(e);else{var i=Pf(e,t,n,r);if(i===null)o&&Uy(e,r);else{if(o){if(-1<Hy.indexOf(e)){e=Fp(i,e,t,n,r),Xt.push(e);return}if(mb(i,e,t,n,r))return;Uy(e,r)}TS(e,t,r,null,n)}}}}function Pf(e,t,n,r){var o=xf(r);if(o=Br(o),o!==null){var i=Gr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=tS(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 TS(e,t,r,o,n),null}var Wn=null,Rf=null,jl=null;function mS(){if(jl)return jl;var e,t=Rf,n=t.length,r,o="value"in Wn?Wn.value:Wn.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 jl=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 kl(){return!0}function Ky(){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)?kl:Ky,this.isPropagationStopped=Ky,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=kl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=kl)},persist:function(){},isPersistent:kl}),t}var Ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},If=nt(Ko),Ks=ae({},Ko,{view:0,detail:0}),Pb=nt(Ks),sp,ap,os,xu=ae({},Ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lf,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!==os&&(os&&e.type==="mousemove"?(sp=e.screenX-os.screenX,ap=e.screenY-os.screenY):ap=sp=0,os=e),sp)},movementY:function(e){return"movementY"in e?e.movementY:ap}}),Vy=nt(xu),Rb=ae({},xu,{dataTransfer:0}),Ib=nt(Rb),Lb=ae({},Ks,{relatedTarget:0}),lp=nt(Lb),Ab=ae({},Ko,{animationName:0,elapsedTime:0,pseudoElement:0}),Ob=nt(Ab),Nb=ae({},Ko,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Mb=nt(Nb),Db=ae({},Ko,{data:0}),Wy=nt(Db),Fb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jb={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 Hb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bb[e])?!!t[e]:!1}function Lf(){return Hb}var Ub=ae({},Ks,{key:function(e){if(e.key){var t=Fb[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"?jb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lf,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}}),zb=nt(Ub),Kb=ae({},xu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$y=nt(Kb),Vb=ae({},Ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lf}),Wb=nt(Vb),$b=ae({},Ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),qb=nt($b),Gb=ae({},xu,{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}),Xb=nt(Gb),Qb=[9,13,27,32],Af=hn&&"CompositionEvent"in window,_s=null;hn&&"documentMode"in document&&(_s=document.documentMode);var Yb=hn&&"TextEvent"in window&&!_s,gS=hn&&(!Af||_s&&8<_s&&11>=_s),qy=String.fromCharCode(32),Gy=!1;function hS(e,t){switch(e){case"keyup":return Qb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Co=!1;function Zb(e,t){switch(e){case"compositionend":return yS(t);case"keypress":return t.which!==32?null:(Gy=!0,qy);case"textInput":return e=t.data,e===qy&&Gy?null:e;default:return null}}function Jb(e,t){if(Co)return e==="compositionend"||!Af&&hS(e,t)?(e=mS(),jl=Rf=Wn=null,Co=!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 gS&&t.locale!=="ko"?null:t.data;default:return null}}var eT={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 Xy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eT[e.type]:t==="textarea"}function vS(e,t,n,r){Yv(r),t=Yl(t,"onChange"),0<t.length&&(n=new If("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ws=null,Ms=null;function tT(e){ES(e,0)}function _u(e){var t=To(e);if(Vv(t))return e}function nT(e,t){if(e==="change")return t}var SS=!1;hn&&(hn?(Rl="oninput"in document,Rl||(up=document.createElement("div"),up.setAttribute("oninput","return;"),Rl=typeof up.oninput=="function"),Pl=Rl):Pl=!1,SS=Pl&&(!document.documentMode||9<document.documentMode));var Pl,Rl,up;function Qy(){ws&&(ws.detachEvent("onpropertychange",xS),Ms=ws=null)}function xS(e){if(e.propertyName==="value"&&_u(Ms)){var t=[];if(vS(t,Ms,e,xf(e)),e=tT,jr)e(t);else{jr=!0;try{_f(e,t)}finally{jr=!1,Ef()}}}}function rT(e,t,n){e==="focusin"?(Qy(),ws=t,Ms=n,ws.attachEvent("onpropertychange",xS)):e==="focusout"&&Qy()}function oT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(Ms)}function iT(e,t){if(e==="click")return _u(t)}function sT(e,t){if(e==="input"||e==="change")return _u(t)}function aT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:aT,lT=Object.prototype.hasOwnProperty;function Ds(e,t){if(yt(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(!lT.call(t,n[r])||!yt(e[n[r]],t[n[r]]))return!1;return!0}function Yy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zy(e,t){var n=Yy(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=Yy(n)}}function _S(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_S(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jy(){for(var e=window,t=ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ql(e.document)}return t}function jp(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 uT=hn&&"documentMode"in document&&11>=document.documentMode,bo=null,Bp=null,Es=null,Hp=!1;function ev(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hp||bo==null||bo!==ql(r)||(r=bo,"selectionStart"in r&&jp(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}),Es&&Ds(Es,r)||(Es=r,r=Yl(Bp,"onSelect"),0<r.length&&(t=new If("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=bo)))}Tf("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);Tf("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);Tf(yb,2);for(cp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Il=0;Il<cp.length;Il++)bf.set(cp[Il],0);var cp,Il;Bo("onMouseEnter",["mouseout","mouseover"]);Bo("onMouseLeave",["mouseout","mouseover"]);Bo("onPointerEnter",["pointerout","pointerover"]);Bo("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 ms="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),wS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ms));function tv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pb(r,t,void 0,e),e.currentTarget=null}function ES(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;tv(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;tv(o,a,u),i=l}}}if(Xl)throw e=Mp,Xl=!1,Mp=null,e}function ie(e,t){var n=PS(t),r=e+"__bubble";n.has(r)||(bS(t,e,2,!1),n.add(r))}var nv="_reactListening"+Math.random().toString(36).slice(2);function CS(e){e[nv]||(e[nv]=!0,Uv.forEach(function(t){wS.has(t)||rv(t,!1,e,null),rv(t,!0,e,null)}))}function rv(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&&wS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=PS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),bS(i,e,o,t),s.add(a))}function bS(e,t,n,r){var o=bf.get(t);switch(o===void 0?2:o){case 0:o=Tb;break;case 1:o=kb;break;default:o=kf}n=o.bind(null,t,n,e),o=void 0,!Np||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 TS(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=Br(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}lb(function(){var u=i,c=xf(n),p=[];e:{var d=pS.get(e);if(d!==void 0){var y=If,v=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":y=zb;break;case"focusin":v="focus",y=lp;break;case"focusout":v="blur",y=lp;break;case"beforeblur":case"afterblur":y=lp;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=Vy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Ib;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Wb;break;case lS:case uS:case cS:y=Ob;break;case dS:y=qb;break;case"scroll":y=Pb;break;case"wheel":y=Xb;break;case"copy":case"cut":case"paste":y=Mb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=$y}var h=(t&4)!==0,m=!h&&e==="scroll",g=h?d!==null?d+"Capture":null:d;h=[];for(var f=u,x;f!==null;){x=f;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,g!==null&&(_=Ls(f,g),_!=null&&h.push(Fs(f,_,x)))),m)break;f=f.return}0<h.length&&(d=new y(d,v,null,n,c),p.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)&&(Br(v)||v[Vo]))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?Br(v):null,v!==null&&(m=Gr(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(y=null,v=u),y!==v)){if(h=Vy,_="onMouseLeave",g="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(h=$y,_="onPointerLeave",g="onPointerEnter",f="pointer"),m=y==null?d:To(y),x=v==null?d:To(v),d=new h(_,f+"leave",y,n,c),d.target=m,d.relatedTarget=x,_=null,Br(c)===u&&(h=new h(g,f+"enter",v,n,c),h.target=x,h.relatedTarget=m,_=h),m=_,y&&v)t:{for(h=y,g=v,f=0,x=h;x;x=xo(x))f++;for(x=0,_=g;_;_=xo(_))x++;for(;0<f-x;)h=xo(h),f--;for(;0<x-f;)g=xo(g),x--;for(;f--;){if(h===g||g!==null&&h===g.alternate)break t;h=xo(h),g=xo(g)}h=null}else h=null;y!==null&&ov(p,d,y,h,!1),v!==null&&m!==null&&ov(p,m,v,h,!0)}}e:{if(d=u?To(u):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=nT;else if(Xy(d))if(SS)C=sT;else{C=oT;var w=rT}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=iT);if(C&&(C=C(e,u))){vS(p,C,n,c);break e}w&&w(e,d,u),e==="focusout"&&(w=d._wrapperState)&&w.controlled&&d.type==="number"&&Tp(d,"number",d.value)}switch(w=u?To(u):window,e){case"focusin":(Xy(w)||w.contentEditable==="true")&&(bo=w,Bp=u,Es=null);break;case"focusout":Es=Bp=bo=null;break;case"mousedown":Hp=!0;break;case"contextmenu":case"mouseup":case"dragend":Hp=!1,ev(p,n,c);break;case"selectionchange":if(uT)break;case"keydown":case"keyup":ev(p,n,c)}var b;if(Af)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 Co?hS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(gS&&n.locale!=="ko"&&(Co||R!=="onCompositionStart"?R==="onCompositionEnd"&&Co&&(b=mS()):(Wn=c,Rf="value"in Wn?Wn.value:Wn.textContent,Co=!0)),w=Yl(u,R),0<w.length&&(R=new Wy(R,e,null,n,c),p.push({event:R,listeners:w}),b?R.data=b:(b=yS(n),b!==null&&(R.data=b)))),(b=Yb?Zb(e,n):Jb(e,n))&&(u=Yl(u,"onBeforeInput"),0<u.length&&(c=new Wy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=b))}ES(p,t)})}function Fs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ls(e,n),i!=null&&r.unshift(Fs(e,i,o)),i=Ls(e,t),i!=null&&r.push(Fs(e,i,o))),e=e.return}return r}function xo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ov(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=Ls(n,i),l!=null&&s.unshift(Fs(n,l,a))):o||(l=Ls(n,i),l!=null&&s.push(Fs(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Zl(){}var dp=null,pp=null;function kS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Up(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 iv=typeof setTimeout=="function"?setTimeout:void 0,cT=typeof clearTimeout=="function"?clearTimeout:void 0;function Of(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Oo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function sv(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 fp=0;function dT(e){return{$$typeof:vf,toString:e,valueOf:e}}var wu=Math.random().toString(36).slice(2),$n="__reactFiber$"+wu,Jl="__reactProps$"+wu,Vo="__reactContainer$"+wu,av="__reactEvents$"+wu;function Br(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vo]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=sv(e);e!==null;){if(n=e[$n])return n;e=sv(e)}return t}e=n,n=e.parentNode}return null}function Vs(e){return e=e[$n]||e[Vo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function To(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Eu(e){return e[Jl]||null}function PS(e){var t=e[av];return t===void 0&&(t=e[av]=new Set),t}var zp=[],ko=-1;function ar(e){return{current:e}}function se(e){0>ko||(e.current=zp[ko],zp[ko]=null,ko--)}function de(e,t){ko++,zp[ko]=e.current,e.current=t}var or={},Ne=ar(or),$e=ar(!1),Kr=or;function Ho(e,t){var n=e.type.contextTypes;if(!n)return or;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 qe(e){return e=e.childContextTypes,e!=null}function eu(){se($e),se(Ne)}function lv(e,t,n){if(Ne.current!==or)throw Error(T(168));de(Ne,t),de($e,n)}function RS(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,Ro(t)||"Unknown",o));return ae({},n,r)}function Hl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Kr=Ne.current,de(Ne,e),de($e,$e.current),!0}function uv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=RS(e,t,Kr),r.__reactInternalMemoizedMergedChildContext=e,se($e),se(Ne),de(Ne,e)):se($e),de($e,n)}var Nf=null,zr=null,pT=xe.unstable_runWithPriority,Mf=xe.unstable_scheduleCallback,Kp=xe.unstable_cancelCallback,fT=xe.unstable_shouldYield,cv=xe.unstable_requestPaint,Vp=xe.unstable_now,mT=xe.unstable_getCurrentPriorityLevel,Cu=xe.unstable_ImmediatePriority,IS=xe.unstable_UserBlockingPriority,LS=xe.unstable_NormalPriority,AS=xe.unstable_LowPriority,OS=xe.unstable_IdlePriority,mp={},gT=cv!==void 0?cv:function(){},dn=null,Ul=null,gp=!1,dv=Vp(),Ae=1e4>dv?Vp:function(){return Vp()-dv};function Uo(){switch(mT()){case Cu:return 99;case IS:return 98;case LS:return 97;case AS:return 96;case OS:return 95;default:throw Error(T(332))}}function NS(e){switch(e){case 99:return Cu;case 98:return IS;case 97:return LS;case 96:return AS;case 95:return OS;default:throw Error(T(332))}}function Vr(e,t){return e=NS(e),pT(e,t)}function js(e,t,n){return e=NS(e),Mf(e,t,n)}function en(){if(Ul!==null){var e=Ul;Ul=null,Kp(e)}MS()}function MS(){if(!gp&&dn!==null){gp=!0;var e=0;try{var t=dn;Vr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),dn=null}catch(n){throw dn!==null&&(dn=dn.slice(e+1)),Mf(Cu,en),n}finally{gp=!1}}}var hT=qr.ReactCurrentBatchConfig;function Mt(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 tu=ar(null),nu=null,Po=null,ru=null;function Df(){ru=Po=nu=null}function Ff(e){var t=tu.current;se(tu),e.type._context._currentValue=t}function DS(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 No(e,t){nu=e,ru=Po=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dt=!0),e.firstContext=null)}function xt(e,t){if(ru!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(ru=e,t=1073741823),t={context:e,observedBits:t,next:null},Po===null){if(nu===null)throw Error(T(308));Po=t,nu.dependencies={lanes:0,firstContext:t,responders:null}}else Po=Po.next=t;return e._currentValue}var Kn=!1;function jf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function FS(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 Yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(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 pv(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 Bs(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 y=e,v=i;switch(a=t,d=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){p=y.call(d,p,a);break e}p=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=v.payload,a=typeof y=="function"?y.call(d,p,a):y,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,$s|=s,e.lanes=s,e.memoizedState=p}}function fv(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 jS=new gu.Component().refs;function ou(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 bu={isMounted:function(e){return(e=e._reactInternals)?Gr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Jn(e),i=Yn(r,o);i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Jn(e),i=Yn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tt(),r=Jn(e),o=Yn(n,r);o.tag=2,t!=null&&(o.callback=t),Zn(e,o),er(e,r,n)}};function mv(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?!Ds(n,r)||!Ds(o,i):!0}function BS(e,t,n){var r=!1,o=or,i=t.contextType;return typeof i=="object"&&i!==null?i=xt(i):(o=qe(t)?Kr:Ne.current,r=t.contextTypes,i=(r=r!=null)?Ho(e,o):or),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function gv(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&&bu.enqueueReplaceState(t,t.state,null)}function Wp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=jS,jf(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=xt(i):(i=qe(t)?Kr:Ne.current,o.context=Ho(e,i)),Bs(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ou(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&&bu.enqueueReplaceState(o,o.state,null),Bs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Ll=Array.isArray;function is(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===jS&&(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 Al(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 HS(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=sr(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,x){return g===null||g.tag!==6?(g=xp(f,m.mode,x),g.return=m,g):(g=o(g,f),g.return=m,g)}function l(m,g,f,x){return g!==null&&g.elementType===f.type?(x=o(g,f.props),x.ref=is(m,g,f),x.return=m,x):(x=Wl(f.type,f.key,f.props,null,m.mode,x),x.ref=is(m,g,f),x.return=m,x)}function u(m,g,f,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==f.containerInfo||g.stateNode.implementation!==f.implementation?(g=_p(f,m.mode,x),g.return=m,g):(g=o(g,f.children||[]),g.return=m,g)}function c(m,g,f,x,_){return g===null||g.tag!==7?(g=jo(f,m.mode,x,_),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=xp(""+g,m.mode,f),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ps:return f=Wl(g.type,g.key,g.props,null,m.mode,f),f.ref=is(m,null,g),f.return=m,f;case Fr:return g=_p(g,m.mode,f),g.return=m,g}if(Ll(g)||es(g))return g=jo(g,m.mode,f,null),g.return=m,g;Al(m,g)}return null}function d(m,g,f,x){var _=g!==null?g.key:null;if(typeof f=="string"||typeof f=="number")return _!==null?null:a(m,g,""+f,x);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case ps:return f.key===_?f.type===Vn?c(m,g,f.props.children,x,_):l(m,g,f,x):null;case Fr:return f.key===_?u(m,g,f,x):null}if(Ll(f)||es(f))return _!==null?null:c(m,g,f,x,null);Al(m,f)}return null}function y(m,g,f,x,_){if(typeof x=="string"||typeof x=="number")return m=m.get(f)||null,a(g,m,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ps:return m=m.get(x.key===null?f:x.key)||null,x.type===Vn?c(g,m,x.props.children,_,x.key):l(g,m,x,_);case Fr:return m=m.get(x.key===null?f:x.key)||null,u(g,m,x,_)}if(Ll(x)||es(x))return m=m.get(f)||null,c(g,m,x,_,null);Al(g,x)}return null}function v(m,g,f,x){for(var _=null,C=null,w=g,b=g=0,R=null;w!==null&&b<f.length;b++){w.index>b?(R=w,w=null):R=w.sibling;var P=d(m,w,f[b],x);if(P===null){w===null&&(w=R);break}e&&w&&P.alternate===null&&t(m,w),g=i(P,g,b),C===null?_=P:C.sibling=P,C=P,w=R}if(b===f.length)return n(m,w),_;if(w===null){for(;b<f.length;b++)w=p(m,f[b],x),w!==null&&(g=i(w,g,b),C===null?_=w:C.sibling=w,C=w);return _}for(w=r(m,w);b<f.length;b++)R=y(w,m,b,f[b],x),R!==null&&(e&&R.alternate!==null&&w.delete(R.key===null?b:R.key),g=i(R,g,b),C===null?_=R:C.sibling=R,C=R);return e&&w.forEach(function(N){return t(m,N)}),_}function h(m,g,f,x){var _=es(f);if(typeof _!="function")throw Error(T(150));if(f=_.call(f),f==null)throw Error(T(151));for(var C=_=null,w=g,b=g=0,R=null,P=f.next();w!==null&&!P.done;b++,P=f.next()){w.index>b?(R=w,w=null):R=w.sibling;var N=d(m,w,P.value,x);if(N===null){w===null&&(w=R);break}e&&w&&N.alternate===null&&t(m,w),g=i(N,g,b),C===null?_=N:C.sibling=N,C=N,w=R}if(P.done)return n(m,w),_;if(w===null){for(;!P.done;b++,P=f.next())P=p(m,P.value,x),P!==null&&(g=i(P,g,b),C===null?_=P:C.sibling=P,C=P);return _}for(w=r(m,w);!P.done;b++,P=f.next())P=y(w,m,b,P.value,x),P!==null&&(e&&P.alternate!==null&&w.delete(P.key===null?b:P.key),g=i(P,g,b),C===null?_=P:C.sibling=P,C=P);return e&&w.forEach(function(K){return t(m,K)}),_}return function(m,g,f,x){var _=typeof f=="object"&&f!==null&&f.type===Vn&&f.key===null;_&&(f=f.props.children);var C=typeof f=="object"&&f!==null;if(C)switch(f.$$typeof){case ps:e:{for(C=f.key,_=g;_!==null;){if(_.key===C){switch(_.tag){case 7:if(f.type===Vn){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=is(m,_,f),g.return=m,m=g;break e}}n(m,_);break}else t(m,_);_=_.sibling}f.type===Vn?(g=jo(f.props.children,m.mode,x,f.key),g.return=m,m=g):(x=Wl(f.type,f.key,f.props,null,m.mode,x),x.ref=is(m,g,f),x.return=m,m=x)}return s(m);case Fr: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=_p(f,m.mode,x),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=xp(f,m.mode,x),g.return=m,m=g),s(m);if(Ll(f))return v(m,g,f,x);if(es(f))return h(m,g,f,x);if(C&&Al(m,f),typeof f>"u"&&!_)switch(m.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Ro(m.type)||"Component"))}return n(m,g)}}var iu=HS(!0),US=HS(!1),Ws={},Zt=ar(Ws),Hs=ar(Ws),Us=ar(Ws);function Hr(e){if(e===Ws)throw Error(T(174));return e}function $p(e,t){switch(de(Us,t),de(Hs,e),de(Zt,Ws),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ip(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ip(t,e)}se(Zt),de(Zt,t)}function zo(){se(Zt),se(Hs),se(Us)}function hv(e){Hr(Us.current);var t=Hr(Zt.current),n=Ip(t,e.type);t!==n&&(de(Hs,e),de(Zt,n))}function Bf(e){Hs.current===e&&(se(Zt),se(Hs))}var ce=ar(0);function su(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 fn=null,qn=null,Jt=!1;function zS(e,t){var n=vt(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 yv(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 qp(e){if(Jt){var t=qn;if(t){var n=t;if(!yv(e,t)){if(t=Oo(n.nextSibling),!t||!yv(e,t)){e.flags=e.flags&-1025|2,Jt=!1,fn=e;return}zS(fn,n)}fn=e,qn=Oo(t.firstChild)}else e.flags=e.flags&-1025|2,Jt=!1,fn=e}}function vv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;fn=e}function Ol(e){if(e!==fn)return!1;if(!Jt)return vv(e),Jt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Up(t,e.memoizedProps))for(t=qn;t;)zS(e,t),t=Oo(t.nextSibling);if(vv(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){qn=Oo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qn=null}}else qn=fn?Oo(e.stateNode.nextSibling):null;return!0}function hp(){qn=fn=null,Jt=!1}var Mo=[];function Hf(){for(var e=0;e<Mo.length;e++)Mo[e]._workInProgressVersionPrimary=null;Mo.length=0}var Cs=qr.ReactCurrentDispatcher,St=qr.ReactCurrentBatchConfig,zs=0,ge=null,Le=null,be=null,au=!1,bs=!1;function Ve(){throw Error(T(321))}function Uf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function zf(e,t,n,r,o,i){if(zs=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cs.current=e===null||e.memoizedState===null?vT:ST,e=n(r,o),bs){i=0;do{if(bs=!1,!(25>i))throw Error(T(301));i+=1,be=Le=null,t.updateQueue=null,Cs.current=xT,e=n(r,o)}while(bs)}if(Cs.current=du,t=Le!==null&&Le.next!==null,zs=0,be=Le=ge=null,au=!1,t)throw Error(T(300));return e}function Ur(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?ge.memoizedState=be=e:be=be.next=e,be}function Xr(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=be===null?ge.memoizedState:be.next;if(t!==null)be=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},be===null?ge.memoizedState=be=e:be=be.next=e}return be}function Qt(e,t){return typeof t=="function"?t(e):t}function ss(e){var t=Xr(),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,ge.lanes|=u,$s|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,yt(r,t.memoizedState)||(Dt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function as(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);yt(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Sv(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,Mo.push(t))),e)return n(t._source);throw Mo.push(t),Error(T(350))}function KS(e,t,n,r){var o=Be;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=Cs.current,l=a.useState(function(){return Sv(o,t,n)}),u=l[1],c=l[0];l=be;var p=e.memoizedState,d=p.refs,y=d.getSnapshot,v=p.source;p=p.subscribe;var h=ge;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var m=i(t._source);if(!yt(s,m)){m=n(t._source),yt(c,m)||(u(m),m=Jn(h),o.mutableReadLanes|=m&o.pendingLanes),m=o.mutableReadLanes,o.entangledLanes|=m;for(var g=o.entanglements,f=m;0<f;){var x=31-rr(f),_=1<<x;g[x]|=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=Jn(h);o.mutableReadLanes|=f&o.pendingLanes}catch(x){g(function(){throw x})}})},[t,r]),yt(y,n)&&yt(v,t)&&yt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:c},e.dispatch=u=Wf.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=Sv(o,t,n),l.memoizedState=l.baseState=c),c}function VS(e,t,n){var r=Xr();return KS(r,e,t,n)}function ls(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=Wf.bind(null,ge,e),[t.memoizedState,e]}function lu(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 xv(e){var t=Ur();return e={current:e},t.memoizedState=e}function uu(){return Xr().memoizedState}function Gp(e,t,n,r){var o=Ur();ge.flags|=e,o.memoizedState=lu(1|t,n,void 0,r===void 0?null:r)}function Kf(e,t,n,r){var o=Xr();r=r===void 0?null:r;var i=void 0;if(Le!==null){var s=Le.memoizedState;if(i=s.destroy,r!==null&&Uf(r,s.deps)){lu(t,n,i,r);return}}ge.flags|=e,o.memoizedState=lu(1|t,n,i,r)}function _v(e,t){return Gp(516,4,e,t)}function cu(e,t){return Kf(516,4,e,t)}function WS(e,t){return Kf(4,2,e,t)}function $S(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 qS(e,t,n){return n=n!=null?n.concat([e]):null,Kf(4,2,$S.bind(null,t,e),n)}function Vf(){}function GS(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Uf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function XS(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Uf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yT(e,t){var n=Uo();Vr(98>n?98:n,function(){e(!0)}),Vr(97<n?97:n,function(){var r=St.transition;St.transition=1;try{e(!1),t()}finally{St.transition=r}})}function Wf(e,t,n){var r=tt(),o=Jn(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)bs=au=!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,yt(l,a))return}catch{}finally{}er(e,o,r)}}var du={readContext:xt,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useOpaqueIdentifier:Ve,unstable_isNewReconciler:!1},vT={readContext:xt,useCallback:function(e,t){return Ur().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:_v,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gp(4,2,$S.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gp(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=Wf.bind(null,ge,e),[r.memoizedState,e]},useRef:xv,useState:ls,useDebugValue:Vf,useDeferredValue:function(e){var t=ls(e),n=t[0],r=t[1];return _v(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ls(!1),t=e[0];return e=yT.bind(null,e[1]),xv(e),[e,t]},useMutableSource:function(e,t,n){var r=Ur();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},KS(r,e,t,n)},useOpaqueIdentifier:function(){if(Jt){var e=!1,t=dT(function(){throw e||(e=!0,n("r:"+(fp++).toString(36))),Error(T(355))}),n=ls(t)[1];return!(ge.mode&2)&&(ge.flags|=516,lu(5,function(){n("r:"+(fp++).toString(36))},void 0,null)),t}return t="r:"+(fp++).toString(36),ls(t),t},unstable_isNewReconciler:!1},ST={readContext:xt,useCallback:GS,useContext:xt,useEffect:cu,useImperativeHandle:qS,useLayoutEffect:WS,useMemo:XS,useReducer:ss,useRef:uu,useState:function(){return ss(Qt)},useDebugValue:Vf,useDeferredValue:function(e){var t=ss(Qt),n=t[0],r=t[1];return cu(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ss(Qt)[0];return[uu().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return ss(Qt)[0]},unstable_isNewReconciler:!1},xT={readContext:xt,useCallback:GS,useContext:xt,useEffect:cu,useImperativeHandle:qS,useLayoutEffect:WS,useMemo:XS,useReducer:as,useRef:uu,useState:function(){return as(Qt)},useDebugValue:Vf,useDeferredValue:function(e){var t=as(Qt),n=t[0],r=t[1];return cu(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=as(Qt)[0];return[uu().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return as(Qt)[0]},unstable_isNewReconciler:!1},_T=qr.ReactCurrentOwner,Dt=!1;function We(e,t,n,r){t.child=e===null?US(t,null,n,r):iu(t,e.child,n,r)}function wv(e,t,n,r,o){n=n.render;var i=t.ref;return No(t,o),r=zf(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,mn(e,t,o)):(t.flags|=1,We(e,t,r,o),t.child)}function Ev(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Yf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,QS(e,t,s,r,o,i)):(e=Wl(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:Ds,n(o,r)&&e.ref===t.ref)?mn(e,t,i):(t.flags|=1,e=sr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function QS(e,t,n,r,o,i){if(e!==null&&Ds(e.memoizedProps,r)&&e.ref===t.ref)if(Dt=!1,(i&o)!==0)e.flags&16384&&(Dt=!0);else return t.lanes=e.lanes,mn(e,t,i);return Xp(e,t,n,r,i)}function yp(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},Ml(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Ml(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Ml(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ml(t,r);return We(e,t,o,n),t.child}function YS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Xp(e,t,n,r,o){var i=qe(n)?Kr:Ne.current;return i=Ho(t,i),No(t,o),n=zf(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,mn(e,t,o)):(t.flags|=1,We(e,t,n,o),t.child)}function Cv(e,t,n,r,o){if(qe(n)){var i=!0;Hl(t)}else i=!1;if(No(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),BS(t,n,r),Wp(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=xt(u):(u=qe(n)?Kr:Ne.current,u=Ho(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)&&gv(t,s,r,u),Kn=!1;var d=t.memoizedState;s.state=d,Bs(t,r,s,o),l=t.memoizedState,a!==r||d!==l||$e.current||Kn?(typeof c=="function"&&(ou(t,n,c,r),l=t.memoizedState),(a=Kn||mv(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,FS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Mt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=xt(l):(l=qe(n)?Kr:Ne.current,l=Ho(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&gv(t,s,r,l),Kn=!1,d=t.memoizedState,s.state=d,Bs(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||$e.current||Kn?(typeof y=="function"&&(ou(t,n,y,r),v=t.memoizedState),(u=Kn||mv(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 Qp(e,t,n,r,i,o)}function Qp(e,t,n,r,o,i){YS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&uv(t,n,!1),mn(e,t,i);r=t.stateNode,_T.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=iu(t,e.child,null,i),t.child=iu(t,null,a,i)):We(e,t,a,i),t.memoizedState=r.state,o&&uv(t,n,!0),t.child}function bv(e){var t=e.stateNode;t.pendingContext?lv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lv(e,t.context,!1),$p(e,t.containerInfo)}var Nl={dehydrated:null,retryLane:0};function Tv(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&&qp(t),e=r.children,o=r.fallback,i?(e=kv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Nl,e):typeof r.unstable_expectedLoadTime=="number"?(e=kv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Nl,t.lanes=33554432,e):(n=Zf({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Rv(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=Nl,r):(n=Pv(e,t,r.children,n),t.memoizedState=null,n):i?(r=Rv(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=Nl,r):(n=Pv(e,t,r.children,n),t.memoizedState=null,n)}function kv(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=Zf(t,o,0,null),n=jo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Pv(e,t,n,r){var o=e.child;return e=o.sibling,n=sr(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 Rv(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=sr(s,a),e!==null?r=sr(e,r):(r=jo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Iv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),DS(e.return,t)}function vp(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 Lv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(We(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&&Iv(e,n);else if(e.tag===19)Iv(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&&su(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),vp(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&&su(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}vp(t,!0,n,null,i,t.lastEffect);break;case"together":vp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$s|=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=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var ZS,Yp,JS,e0;ZS=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}};Yp=function(){};JS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Hr(Zt.current);var i=null;switch(n){case"input":o=Cp(e,o),r=Cp(e,r),i=[];break;case"option":o=kp(e,o),r=kp(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Pp(e,o),r=Pp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zl)}Lp(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"&&(Rs.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"&&(Rs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===vf?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};e0=function(e,t,n,r){n!==r&&(t.flags|=4)};function us(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 wT(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 qe(t.type)&&eu(),null;case 3:return zo(),se($e),se(Ne),Hf(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ol(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Yp(t),null;case 5:Bf(t);var o=Hr(Us.current);if(n=t.type,e!==null&&t.stateNode!=null)JS(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=Hr(Zt.current),Ol(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[$n]=t,r[Jl]=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<ms.length;e++)ie(ms[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":Oy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":My(r,i),ie("invalid",r)}Lp(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]):Rs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":Cl(r),Ny(r,i,!0);break;case"textarea":Cl(r),Dy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Zl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Rp.html&&(e=qv(n)),e===Rp.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[$n]=t,e[Jl]=r,ZS(e,t,!1,!1),t.stateNode=e,s=Ap(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<ms.length;o++)ie(ms[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":Oy(e,r),o=Cp(e,r),ie("invalid",e);break;case"option":o=kp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":My(e,r),o=Pp(e,r),ie("invalid",e);break;default:o=r}Lp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Qv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Gv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Is(e,l):typeof l=="number"&&Is(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Rs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&pf(e,i,l,s))}switch(n){case"input":Cl(e),Ny(e,r,!1);break;case"textarea":Cl(e),Dy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Io(e,!!r.multiple,i,!1):r.defaultValue!=null&&Io(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Zl)}kS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)e0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Hr(Us.current),Hr(Zt.current),Ol(t)?(r=t.stateNode,n=t.memoizedProps,r[$n]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=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&&Ol(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),Be===null||!($s&134217727)&&!($o&134217727)||Do(Be,Oe))),(r||n)&&(t.flags|=4),null);case 4:return zo(),Yp(t),e===null&&CS(t.stateNode.containerInfo),null;case 10:return Ff(t),null;case 17:return qe(t.type)&&eu(),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)us(r,!1);else{if(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=su(e),s!==null){for(t.flags|=64,us(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&&Ae()>rf&&(t.flags|=64,i=!0,us(r,!1),t.lanes=33554432)}else{if(!i)if(e=su(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),us(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*Ae()-r.renderingStartTime>rf&&n!==1073741824&&(t.flags|=64,i=!0,us(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=Ae(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return Qf(),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 ET(e){switch(e.tag){case 1:qe(e.type)&&eu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(zo(),se($e),se(Ne),Hf(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Bf(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 zo(),null;case 10:return Ff(e),null;case 23:case 24:return Qf(),null;default:return null}}function $f(e,t){try{var n="",r=t;do n+=rb(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 Zp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var CT=typeof WeakMap=="function"?WeakMap:Map;function t0(e,t,n){n=Yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fu||(fu=!0,of=r),Zp(e,t)},n}function n0(e,t,n){n=Yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Zp(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),Zp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var bT=typeof WeakSet=="function"?WeakSet:Set;function Av(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){tr(e,n)}else t.current=null}function TT(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:Mt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Of(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function kT(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&&(d0(n,e),MT(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:Mt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&fv(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}fv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&kS(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&&sS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Ov(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=Xv("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 Nv(e,t){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(Nf,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)d0(t,n);else{r=t;try{o()}catch(i){tr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Av(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){tr(t,i)}break;case 5:Av(t);break;case 4:r0(e,t)}}function Mv(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 Dv(e){return e.tag===5||e.tag===3||e.tag===4}function Fv(e){e:{for(var t=e.return;t!==null;){if(Dv(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&&(Is(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Dv(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?Jp(e,n,t):ef(e,n,t)}function Jp(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=Zl));else if(r!==4&&(e=e.child,e!==null))for(Jp(e,t,n),e=e.sibling;e!==null;)Jp(e,t,n),e=e.sibling}function ef(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(ef(e,t,n),e=e.sibling;e!==null;)ef(e,t,n),e=e.sibling}function r0(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(Nv(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(Nv(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 Sp(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[Jl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Wv(n,r),Ap(e,o),t=Ap(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Qv(n,a):s==="dangerouslySetInnerHTML"?Gv(n,a):s==="children"?Is(n,a):pf(n,s,a,t)}switch(e){case"input":bp(n,r);break;case"textarea":$v(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Io(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Io(n,!!r.multiple,r.defaultValue,!0):Io(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,sS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Xf=Ae(),Ov(t.child,!0)),jv(t);return;case 19:jv(t);return;case 17:return;case 23:case 24:Ov(t,t.memoizedState!==null);return}throw Error(T(163))}function jv(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=jT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function PT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var RT=Math.ceil,pu=qr.ReactCurrentDispatcher,qf=qr.ReactCurrentOwner,D=0,He=null,ve=null,Oe=0,Wr=0,tf=ar(0),Te=0,Tu=null,Wo=0,$s=0,$o=0,Gf=0,nf=null,Xf=0,rf=1/0;function qo(){rf=Ae()+500}var L=null,fu=!1,of=null,Yt=null,ir=!1,Ts=null,gs=90,sf=[],af=[],gn=null,ks=0,lf=null,zl=-1,pn=0,Kl=0,Ps=null,Vl=!1;function tt(){return D&48?Ae():zl!==-1?zl:zl=Ae()}function Jn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Uo()===99?1:2;if(pn===0&&(pn=Wo),hT.transition!==0){Kl!==0&&(Kl=nf!==null?nf.pendingLanes:0),e=pn;var t=4186112&~Kl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Uo(),D&4&&e===98?e=Ql(12,pn):(e=Sb(e),e=Ql(e,pn)),e}function er(e,t,n){if(50<ks)throw ks=0,lf=null,Error(T(185));if(e=ku(e,t),e===null)return null;Su(e,t,n),e===He&&($o|=t,Te===4&&Do(e,Oe));var r=Uo();t===1?D&8&&!(D&48)?uf(e):(_t(e,n),D===0&&(qo(),en())):(!(D&4)||r!==98&&r!==99||(gn===null?gn=new Set([e]):gn.add(e)),_t(e,n)),nf=e}function ku(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 _t(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-rr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,_o(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=Ns(e,e===He?Oe:0),t=ne,r===0)n!==null&&(n!==mp&&Kp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==mp&&Kp(n)}t===15?(n=uf.bind(null,e),dn===null?(dn=[n],Ul=Mf(Cu,MS)):dn.push(n),n=mp):t===14?n=js(99,uf.bind(null,e)):(n=xb(t),n=js(n,o0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function o0(e){if(zl=-1,Kl=pn=0,D&48)throw Error(T(327));var t=e.callbackNode;if(lr()&&e.callbackNode!==t)return null;var n=Ns(e,e===He?Oe:0);if(n===0)return null;var r=n,o=D;D|=16;var i=l0();(He!==e||Oe!==r)&&(qo(),Fo(e,r));do try{AT();break}catch(a){a0(e,a)}while(1);if(Df(),pu.current=i,D=o,ve!==null?r=0:(He=null,Oe=0,r=Te),Wo&$o)Fo(e,0);else if(r!==0){if(r===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Of(e.containerInfo)),n=fS(e),n!==0&&(r=hs(e,n))),r===1)throw t=Tu,Fo(e,0),Do(e,n),_t(e,Ae()),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(Do(e,n),(n&62914560)===n&&(r=Xf+500-Ae(),10<r)){if(Ns(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=iv(Dr.bind(null,e),r);break}Dr(e);break;case 4:if(Do(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-rr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*RT(n/1960))-n,10<n){e.timeoutHandle=iv(Dr.bind(null,e),n);break}Dr(e);break;case 5:Dr(e);break;default:throw Error(T(329))}}return _t(e,Ae()),e.callbackNode===t?o0.bind(null,e):null}function Do(e,t){for(t&=~Gf,t&=~$o,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rr(t),r=1<<n;e[n]=-1,t&=~r}}function uf(e){if(D&48)throw Error(T(327));if(lr(),e===He&&e.expiredLanes&Oe){var t=Oe,n=hs(e,t);Wo&$o&&(t=Ns(e,t),n=hs(e,t))}else t=Ns(e,0),n=hs(e,t);if(e.tag!==0&&n===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Of(e.containerInfo)),t=fS(e),t!==0&&(n=hs(e,t))),n===1)throw n=Tu,Fo(e,0),Do(e,t),_t(e,Ae()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dr(e),_t(e,Ae()),null}function IT(){if(gn!==null){var e=gn;gn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,_t(t,Ae())})}en()}function i0(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(qo(),en())}}function s0(e,t){var n=D;D&=-2,D|=8;try{return e(t)}finally{D=n,D===0&&(qo(),en())}}function Ml(e,t){de(tf,Wr),Wr|=t,Wo|=t}function Qf(){Wr=tf.current,se(tf)}function Fo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cT(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&eu();break;case 3:zo(),se($e),se(Ne),Bf();break;case 5:Hf(r);break;case 4:zo();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Ff(r);break;case 23:case 24:Qf()}n=n.return}He=e,ve=sr(e.current,null),Oe=Wr=Wo=t,Te=0,Tu=null,Gf=$o=$s=0}function a0(e,t){do{var n=ve;try{if(Df(),Cs.current=du,au){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}au=!1}if(zs=0,be=Le=ge=null,bs=!1,qf.current=null,n===null||n.return===null){Te=1,Tu=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Oe,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=(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:!p}}if(y){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=Yn(-1,1);f.tag=2,Zn(a,f)}a.lanes|=1;break e}l=void 0,a=t;var x=i.pingCache;if(x===null?(x=i.pingCache=new CT,l=new Set,x.set(u,l)):(l=x.get(u),l===void 0&&(l=new Set,x.set(u,l))),!l.has(a)){l.add(a);var _=FT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Ro(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 Zp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var CT=typeof WeakMap=="function"?WeakMap:Map;function t0(e,t,n){n=Yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fu||(fu=!0,of=r),Zp(e,t)},n}function n0(e,t,n){n=Yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Zp(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),Zp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var bT=typeof WeakSet=="function"?WeakSet:Set;function Av(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){tr(e,n)}else t.current=null}function TT(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:Mt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Of(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function kT(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&&(d0(n,e),MT(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:Mt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&fv(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}fv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&kS(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&&sS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Ov(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=Xv("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 Nv(e,t){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(Nf,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)d0(t,n);else{r=t;try{o()}catch(i){tr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Av(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){tr(t,i)}break;case 5:Av(t);break;case 4:r0(e,t)}}function Mv(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 Dv(e){return e.tag===5||e.tag===3||e.tag===4}function Fv(e){e:{for(var t=e.return;t!==null;){if(Dv(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&&(Is(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Dv(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?Jp(e,n,t):ef(e,n,t)}function Jp(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=Zl));else if(r!==4&&(e=e.child,e!==null))for(Jp(e,t,n),e=e.sibling;e!==null;)Jp(e,t,n),e=e.sibling}function ef(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(ef(e,t,n),e=e.sibling;e!==null;)ef(e,t,n),e=e.sibling}function r0(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(Nv(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(Nv(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 Sp(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[Jl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Wv(n,r),Ap(e,o),t=Ap(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Qv(n,a):s==="dangerouslySetInnerHTML"?Gv(n,a):s==="children"?Is(n,a):pf(n,s,a,t)}switch(e){case"input":bp(n,r);break;case"textarea":$v(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Io(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Io(n,!!r.multiple,r.defaultValue,!0):Io(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,sS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Xf=Ae(),Ov(t.child,!0)),jv(t);return;case 19:jv(t);return;case 17:return;case 23:case 24:Ov(t,t.memoizedState!==null);return}throw Error(T(163))}function jv(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=jT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function PT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var RT=Math.ceil,pu=qr.ReactCurrentDispatcher,qf=qr.ReactCurrentOwner,D=0,Be=null,ve=null,Oe=0,Wr=0,tf=ar(0),Te=0,Tu=null,Wo=0,$s=0,$o=0,Gf=0,nf=null,Xf=0,rf=1/0;function qo(){rf=Ae()+500}var L=null,fu=!1,of=null,Yt=null,ir=!1,Ts=null,gs=90,sf=[],af=[],gn=null,ks=0,lf=null,zl=-1,pn=0,Kl=0,Ps=null,Vl=!1;function tt(){return D&48?Ae():zl!==-1?zl:zl=Ae()}function Jn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Uo()===99?1:2;if(pn===0&&(pn=Wo),hT.transition!==0){Kl!==0&&(Kl=nf!==null?nf.pendingLanes:0),e=pn;var t=4186112&~Kl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Uo(),D&4&&e===98?e=Ql(12,pn):(e=Sb(e),e=Ql(e,pn)),e}function er(e,t,n){if(50<ks)throw ks=0,lf=null,Error(T(185));if(e=ku(e,t),e===null)return null;Su(e,t,n),e===Be&&($o|=t,Te===4&&Do(e,Oe));var r=Uo();t===1?D&8&&!(D&48)?uf(e):(_t(e,n),D===0&&(qo(),en())):(!(D&4)||r!==98&&r!==99||(gn===null?gn=new Set([e]):gn.add(e)),_t(e,n)),nf=e}function ku(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 _t(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-rr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,_o(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=Ns(e,e===Be?Oe:0),t=ne,r===0)n!==null&&(n!==mp&&Kp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==mp&&Kp(n)}t===15?(n=uf.bind(null,e),dn===null?(dn=[n],Ul=Mf(Cu,MS)):dn.push(n),n=mp):t===14?n=js(99,uf.bind(null,e)):(n=xb(t),n=js(n,o0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function o0(e){if(zl=-1,Kl=pn=0,D&48)throw Error(T(327));var t=e.callbackNode;if(lr()&&e.callbackNode!==t)return null;var n=Ns(e,e===Be?Oe:0);if(n===0)return null;var r=n,o=D;D|=16;var i=l0();(Be!==e||Oe!==r)&&(qo(),Fo(e,r));do try{AT();break}catch(a){a0(e,a)}while(1);if(Df(),pu.current=i,D=o,ve!==null?r=0:(Be=null,Oe=0,r=Te),Wo&$o)Fo(e,0);else if(r!==0){if(r===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Of(e.containerInfo)),n=fS(e),n!==0&&(r=hs(e,n))),r===1)throw t=Tu,Fo(e,0),Do(e,n),_t(e,Ae()),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(Do(e,n),(n&62914560)===n&&(r=Xf+500-Ae(),10<r)){if(Ns(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=iv(Dr.bind(null,e),r);break}Dr(e);break;case 4:if(Do(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-rr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*RT(n/1960))-n,10<n){e.timeoutHandle=iv(Dr.bind(null,e),n);break}Dr(e);break;case 5:Dr(e);break;default:throw Error(T(329))}}return _t(e,Ae()),e.callbackNode===t?o0.bind(null,e):null}function Do(e,t){for(t&=~Gf,t&=~$o,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rr(t),r=1<<n;e[n]=-1,t&=~r}}function uf(e){if(D&48)throw Error(T(327));if(lr(),e===Be&&e.expiredLanes&Oe){var t=Oe,n=hs(e,t);Wo&$o&&(t=Ns(e,t),n=hs(e,t))}else t=Ns(e,0),n=hs(e,t);if(e.tag!==0&&n===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Of(e.containerInfo)),t=fS(e),t!==0&&(n=hs(e,t))),n===1)throw n=Tu,Fo(e,0),Do(e,t),_t(e,Ae()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dr(e),_t(e,Ae()),null}function IT(){if(gn!==null){var e=gn;gn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,_t(t,Ae())})}en()}function i0(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(qo(),en())}}function s0(e,t){var n=D;D&=-2,D|=8;try{return e(t)}finally{D=n,D===0&&(qo(),en())}}function Ml(e,t){de(tf,Wr),Wr|=t,Wo|=t}function Qf(){Wr=tf.current,se(tf)}function Fo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cT(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&eu();break;case 3:zo(),se($e),se(Ne),Hf();break;case 5:Bf(r);break;case 4:zo();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Ff(r);break;case 23:case 24:Qf()}n=n.return}Be=e,ve=sr(e.current,null),Oe=Wr=Wo=t,Te=0,Tu=null,Gf=$o=$s=0}function a0(e,t){do{var n=ve;try{if(Df(),Cs.current=du,au){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}au=!1}if(zs=0,be=Le=ge=null,bs=!1,qf.current=null,n===null||n.return===null){Te=1,Tu=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Oe,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=(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:!p}}if(y){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=Yn(-1,1);f.tag=2,Zn(a,f)}a.lanes|=1;break e}l=void 0,a=t;var x=i.pingCache;if(x===null?(x=i.pingCache=new CT,l=new Set,x.set(u,l)):(l=x.get(u),l===void 0&&(l=new Set,x.set(u,l))),!l.has(a)){l.add(a);var _=FT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Ro(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.`)}Te!==5&&(Te=2),l=$f(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=t0(d,i,t);pv(d,C);break e;case 1:i=l;var w=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yt===null||!Yt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=n0(d,i,t);pv(d,R);break e}}d=d.return}while(d!==null)}c0(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function l0(){var e=pu.current;return pu.current=du,e===null?du:e}function hs(e,t){var n=D;D|=16;var r=l0();He===e&&Oe===t||Fo(e,t);do try{LT();break}catch(o){a0(e,o)}while(1);if(Df(),D=n,pu.current=r,ve!==null)throw Error(T(261));return He=null,Oe=0,Te}function LT(){for(;ve!==null;)u0(ve)}function AT(){for(;ve!==null&&!fT();)u0(ve)}function u0(e){var t=p0(e.alternate,e,Wr);e.memoizedProps=e.pendingProps,t===null?c0(e):ve=t,qf.current=null}function c0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=ET(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=wT(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);Te===0&&(Te=5)}function Dr(e){var t=Uo();return Vr(99,OT.bind(null,e,t)),null}function OT(e,t){do lr();while(Ts!==null);if(D&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-rr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(gn!==null&&!(r&24)&&gn.has(e)&&gn.delete(e),e===He&&(ve=He=null,Oe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=D,D|=32,qf.current=null,dp=Fl,s=Jy(),jp(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,y=0,v=0,h=s,m=null;t:for(;;){for(var g;h!==a||i!==0&&h.nodeType!==3||(p=c+i),h!==l||u!==0&&h.nodeType!==3||(d=c+u),h.nodeType===3&&(c+=h.nodeValue.length),(g=h.firstChild)!==null;)m=h,h=g;for(;;){if(h===s)break t;if(m===a&&++y===i&&(p=c),m===l&&++v===u&&(d=c),(g=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=g}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;pp={focusedElem:s,selectionRange:a},Fl=!1,Ps=null,Vl=!1,L=r;do try{NT()}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);Ps=null,L=r;do try{for(s=e;L!==null;){var f=L.flags;if(f&16&&Is(L.stateNode,""),f&128){var x=L.alternate;if(x!==null){var _=x.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(f&1038){case 2:Fv(L),L.flags&=-3;break;case 6:Fv(L),L.flags&=-3,Sp(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,Sp(L.alternate,L);break;case 4:Sp(L.alternate,L);break;case 8:a=L,r0(s,a);var C=a.alternate;Mv(a),C!==null&&Mv(C)}L=L.nextEffect}}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);if(_=pp,x=Jy(),f=_.focusedElem,s=_.selectionRange,x!==f&&f&&f.ownerDocument&&_S(f.ownerDocument.documentElement,f)){for(s!==null&&jp(f)&&(x=s.start,_=s.end,_===void 0&&(_=x),"selectionStart"in f?(f.selectionStart=x,f.selectionEnd=Math.min(_,f.value.length)):(_=(x=f.ownerDocument||document)&&x.defaultView||window,_.getSelection&&(_=_.getSelection(),a=f.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=Zy(f,C),i=Zy(f,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(x=x.createRange(),x.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(x),_.extend(i.node,i.offset)):(x.setEnd(i.node,i.offset),_.addRange(x)))))),x=[],_=f;_=_.parentNode;)_.nodeType===1&&x.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<x.length;f++)_=x[f],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}Fl=!!dp,pp=dp=null,e.current=n,L=r;do try{for(f=e;L!==null;){var w=L.flags;if(w&36&&kT(f,L.alternate,L),w&128){x=void 0;var b=L.ref;if(b!==null){var R=L.stateNode;switch(L.tag){case 5:x=R;break;default:x=R}typeof b=="function"?b(x):b.current=x}}L=L.nextEffect}}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);L=null,gT(),D=o}else e.current=n;if(ir)ir=!1,Ts=e,gs=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(w=L,w.sibling=null,w.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(Yt=null),r===1?e===lf?ks++:(ks=0,lf=e):ks=0,n=n.stateNode,zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(Nf,n,void 0,(n.current.flags&64)===64)}catch{}if(_t(e,Ae()),fu)throw fu=!1,e=of,of=null,e;return D&8||en(),null}function NT(){for(;L!==null;){var e=L.alternate;Vl||Ps===null||(L.flags&8?Hy(L,Ps)&&(Vl=!0):L.tag===13&&PT(e,L)&&Hy(L,Ps)&&(Vl=!0));var t=L.flags;t&256&&TT(e,L),!(t&512)||ir||(ir=!0,js(97,function(){return lr(),null})),L=L.nextEffect}}function lr(){if(gs!==90){var e=97<gs?97:gs;return gs=90,Vr(e,DT)}return!1}function MT(e,t){sf.push(t,e),ir||(ir=!0,js(97,function(){return lr(),null}))}function d0(e,t){af.push(t,e),ir||(ir=!0,js(97,function(){return lr(),null}))}function DT(){if(Ts===null)return!1;var e=Ts;if(Ts=null,D&48)throw Error(T(331));var t=D;D|=32;var n=af;af=[];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));tr(i,l)}}for(n=sf,sf=[],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));tr(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 D=t,en(),!0}function Hv(e,t,n){t=$f(n,t),t=t0(e,t,1),Zn(e,t),t=tt(),e=ku(e,1),e!==null&&(Su(e,1,t),_t(e,t))}function tr(e,t){if(e.tag===3)Hv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Hv(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=$f(t,e);var o=n0(n,e,1);if(Zn(n,o),o=tt(),n=ku(n,1),n!==null)Su(n,1,o),_t(n,o);else if(typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function FT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tt(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Oe&n)===n&&(Te===4||Te===3&&(Oe&62914560)===Oe&&500>Ae()-Xf?Fo(e,0):Gf|=n),_t(e,t)}function jT(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=Wo),t=wo(62914560&~pn),t===0&&(t=4194304)):t=Uo()===99?1:2:t=1),n=tt(),e=ku(e,t),e!==null&&(Su(e,t,n),_t(e,n))}var p0;p0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)Dt=!0;else if(n&r)Dt=!!(e.flags&16384);else{switch(Dt=!1,t.tag){case 3:bv(t),hp();break;case 5:hv(t);break;case 1:qe(t.type)&&Bl(t);break;case 4:$p(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(tu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Tv(e,t,n):(de(ce,ce.current&1),t=mn(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 Lv(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,yp(e,t,n)}return mn(e,t,n)}else Dt=!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=Bo(t,Ne.current),No(t,n),o=zf(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,qe(r)){var i=!0;Bl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,jf(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&ou(t,r,s,e),o.updater=bu,t.stateNode=o,o._reactInternals=t,Wp(t,r,e,n),t=Qp(null,t,r,!0,i,n)}else t.tag=0,We(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=BT(o),e=Mt(o,e),i){case 0:t=Xp(null,t,o,e,n);break e;case 1:t=Cv(null,t,o,e,n);break e;case 11:t=wv(null,t,o,e,n);break e;case 14:t=Ev(null,t,o,Mt(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:Mt(r,o),Xp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Cv(e,t,r,o,n);case 3:if(bv(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,FS(e,t),Hs(t,r,null,n),r=t.memoizedState.element,r===o)hp(),t=mn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(qn=Oo(t.stateNode.containerInfo.firstChild),fn=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],Mo.push(i);for(n=US(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else We(e,t,r,n),hp();t=t.child}return t;case 5:return hv(t),e===null&&qp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Up(r,o)?s=null:i!==null&&Up(r,i)&&(t.flags|=16),YS(e,t),We(e,t,s,n),t.child;case 6:return e===null&&qp(t),null;case 13:return Tv(e,t,n);case 4:return $p(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=iu(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),wv(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(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(tu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=yt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!$e.current){t=mn(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=Yn(-1,n&-n),u.tag=2,Zn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),DS(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}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,No(t,n),o=xt(o,i.unstable_observedBits),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return o=t.type,i=Mt(o,t.pendingProps),i=Mt(o.type,i),Ev(e,t,o,i,r,n);case 15:return QS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,qe(r)?(e=!0,Bl(t)):e=!1,No(t,n),HS(t,r,o),Wp(t,r,o,n),Qp(null,t,r,!0,e,n);case 19:return Lv(e,t,n);case 23:return yp(e,t,n);case 24:return yp(e,t,n)}throw Error(T(156,t.tag))};function HT(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 vt(e,t,n,r){return new HT(e,t,n,r)}function Yf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function BT(e){if(typeof e=="function")return Yf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hu)return 11;if(e===yu)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=vt(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 Wl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Yf(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Vn:return jo(n.children,o,i,t);case zv:s=8,o|=16;break;case ff:s=8,o|=1;break;case ys:return e=vt(12,n,t,o|8),e.elementType=ys,e.type=ys,e.lanes=i,e;case vs:return e=vt(13,n,t,o),e.type=vs,e.elementType=vs,e.lanes=i,e;case $l:return e=vt(19,n,t,o),e.elementType=$l,e.lanes=i,e;case Sf:return Zf(n,o,i,t);case Ep:return e=vt(24,n,t,o),e.elementType=Ep,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mf:s=10;break e;case gf:s=9;break e;case hu:s=11;break e;case yu:s=14;break e;case hf:s=16,r=null;break e;case yf:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=vt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function jo(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Zf(e,t,n,r){return e=vt(23,e,r,t),e.elementType=Sf,e.lanes=n,e}function xp(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function _p(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function UT(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=ip(0),this.expirationTimes=ip(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ip(0),this.mutableSourceEagerHydrationData=null}function zT(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 mu(e,t,n,r){var o=t.current,i=tt(),s=Jn(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(qe(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(qe(l)){n=RS(n,l,a);break e}}n=a}else n=or;return t.context===null?t.context=n:t.pendingContext=n,t=Yn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Zn(o,t),er(o,s,i),s}function wp(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 Bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Jf(e,t){Bv(e,t),(e=e.alternate)&&Bv(e,t)}function KT(){return null}function em(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new UT(e,t,n!=null&&n.hydrate===!0),t=vt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,jf(t),e[Vo]=n.current,CS(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}em.prototype.render=function(e){mu(e,this._internalRoot,null,null)};em.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;mu(null,e,null,function(){t[Vo]=null})};function qs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function VT(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 em(e,0,t?{hydrate:!0}:void 0)}function Pu(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=wp(s);a.call(u)}}mu(t,s,e,o)}else{if(i=n._reactRootContainer=VT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=wp(s);l.call(u)}}s0(function(){mu(t,s,e,o)})}return wp(s)}rS=function(e){if(e.tag===13){var t=tt();er(e,4,t),Jf(e,4)}};Cf=function(e){if(e.tag===13){var t=tt();er(e,67108864,t),Jf(e,67108864)}};oS=function(e){if(e.tag===13){var t=tt(),n=Jn(e);er(e,n,t),Jf(e,n)}};iS=function(e,t){return t()};Op=function(e,t,n){switch(t){case"input":if(bp(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=Eu(r);if(!o)throw Error(T(90));Vv(r),bp(r,o)}}}break;case"textarea":$v(e,n);break;case"select":t=n.value,t!=null&&Io(e,!!n.multiple,t,!1)}};_f=i0;Jv=function(e,t,n,r,o){var i=D;D|=4;try{return Vr(98,e.bind(null,t,n,r,o))}finally{D=i,D===0&&(qo(),en())}};wf=function(){!(D&49)&&(IT(),lr())};eS=function(e,t){var n=D;D|=2;try{return e(t)}finally{D=n,D===0&&(qo(),en())}};function f0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qs(t))throw Error(T(200));return zT(e,t,null,n)}var WT={Events:[Vs,To,Eu,Yv,Zv,lr,{current:!1}]},cs={findFiberByHostInstance:Hr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},$T={bundleType:cs.bundleType,version:cs.version,rendererPackageName:cs.rendererPackageName,rendererConfig:cs.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=nS(e),e===null?null:e.stateNode},findFiberByHostInstance:cs.findFiberByHostInstance||KT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ds=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ds.isDisabled&&ds.supportsFiber))try{Nf=ds.inject($T),zr=ds}catch{}var ds;wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WT;wt.createPortal=f0;wt.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=nS(t),e=e===null?null:e.stateNode,e};wt.flushSync=function(e,t){var n=D;if(n&48)return e(t);D|=1;try{if(e)return Vr(99,e.bind(null,t))}finally{D=n,en()}};wt.hydrate=function(e,t,n){if(!qs(t))throw Error(T(200));return Pu(null,e,t,!0,n)};wt.render=function(e,t,n){if(!qs(t))throw Error(T(200));return Pu(null,e,t,!1,n)};wt.unmountComponentAtNode=function(e){if(!qs(e))throw Error(T(40));return e._reactRootContainer?(s0(function(){Pu(null,null,e,!1,function(){e._reactRootContainer=null,e[Vo]=null})}),!0):!1};wt.unstable_batchedUpdates=i0;wt.unstable_createPortal=function(e,t){return f0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qs(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Pu(e,t,n,!1,r)};wt.version="17.0.2"});var Ru=fe((HO,h0)=>{"use strict";function g0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g0)}catch(e){console.error(e)}}g0(),h0.exports=m0()});var V0=fe(K0=>{"use strict";var Jo=O();function Ik(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lk=typeof Object.is=="function"?Object.is:Ik,Ak=Jo.useState,Ok=Jo.useEffect,Nk=Jo.useLayoutEffect,Mk=Jo.useDebugValue;function Dk(e,t){var n=t(),r=Ak({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Nk(function(){o.value=n,o.getSnapshot=t,km(o)&&i({inst:o})},[e,n,t]),Ok(function(){return km(o)&&i({inst:o}),e(function(){km(o)&&i({inst:o})})},[e]),Mk(n),n}function km(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lk(e,n)}catch{return!0}}function Fk(e,t){return t()}var jk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Fk:Dk;K0.useSyncExternalStore=Jo.useSyncExternalStore!==void 0?Jo.useSyncExternalStore:jk});var Pm=fe((TN,W0)=>{"use strict";W0.exports=V0()});var q0=fe($0=>{"use strict";var Fu=O(),Hk=Pm();function Bk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uk=typeof Object.is=="function"?Object.is:Bk,zk=Hk.useSyncExternalStore,Kk=Fu.useRef,Vk=Fu.useEffect,Wk=Fu.useMemo,$k=Fu.useDebugValue;$0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Kk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Wk(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 p=v}return p=y}if(v=p,Uk(c,y))return v;var h=r(y);return o!==void 0&&o(v,h)?v:(c=y,p=h)}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=zk(e,i[0],i[1]);return Vk(function(){s.hasValue=!0,s.value=a},[a]),$k(a),a}});var X0=fe((PN,G0)=>{"use strict";G0.exports=q0()});var sx=fe(Q=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,Im=_e?Symbol.for("react.element"):60103,Lm=_e?Symbol.for("react.portal"):60106,Uu=_e?Symbol.for("react.fragment"):60107,zu=_e?Symbol.for("react.strict_mode"):60108,Ku=_e?Symbol.for("react.profiler"):60114,Vu=_e?Symbol.for("react.provider"):60109,Wu=_e?Symbol.for("react.context"):60110,Am=_e?Symbol.for("react.async_mode"):60111,$u=_e?Symbol.for("react.concurrent_mode"):60111,qu=_e?Symbol.for("react.forward_ref"):60112,Gu=_e?Symbol.for("react.suspense"):60113,Qk=_e?Symbol.for("react.suspense_list"):60120,Xu=_e?Symbol.for("react.memo"):60115,Qu=_e?Symbol.for("react.lazy"):60116,Yk=_e?Symbol.for("react.block"):60121,Zk=_e?Symbol.for("react.fundamental"):60117,Jk=_e?Symbol.for("react.responder"):60118,eP=_e?Symbol.for("react.scope"):60119;function ot(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Im:switch(e=e.type,e){case Am:case $u:case Uu:case Ku:case zu:case Gu:return e;default:switch(e=e&&e.$$typeof,e){case Wu:case qu:case Qu:case Xu:case Vu:return e;default:return t}}case Lm:return t}}}function ix(e){return ot(e)===$u}Q.AsyncMode=Am;Q.ConcurrentMode=$u;Q.ContextConsumer=Wu;Q.ContextProvider=Vu;Q.Element=Im;Q.ForwardRef=qu;Q.Fragment=Uu;Q.Lazy=Qu;Q.Memo=Xu;Q.Portal=Lm;Q.Profiler=Ku;Q.StrictMode=zu;Q.Suspense=Gu;Q.isAsyncMode=function(e){return ix(e)||ot(e)===Am};Q.isConcurrentMode=ix;Q.isContextConsumer=function(e){return ot(e)===Wu};Q.isContextProvider=function(e){return ot(e)===Vu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Im};Q.isForwardRef=function(e){return ot(e)===qu};Q.isFragment=function(e){return ot(e)===Uu};Q.isLazy=function(e){return ot(e)===Qu};Q.isMemo=function(e){return ot(e)===Xu};Q.isPortal=function(e){return ot(e)===Lm};Q.isProfiler=function(e){return ot(e)===Ku};Q.isStrictMode=function(e){return ot(e)===zu};Q.isSuspense=function(e){return ot(e)===Gu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Uu||e===$u||e===Ku||e===zu||e===Gu||e===Qk||typeof e=="object"&&e!==null&&(e.$$typeof===Qu||e.$$typeof===Xu||e.$$typeof===Vu||e.$$typeof===Wu||e.$$typeof===qu||e.$$typeof===Zk||e.$$typeof===Jk||e.$$typeof===eP||e.$$typeof===Yk)};Q.typeOf=ot});var lx=fe((zN,ax)=>{"use strict";ax.exports=sx()});var gx=fe((KN,mx)=>{"use strict";var Om=lx(),tP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},nP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},rP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},px={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Nm={};Nm[Om.ForwardRef]=rP;Nm[Om.Memo]=px;function ux(e){return Om.isMemo(e)?px:Nm[e.$$typeof]||tP}var oP=Object.defineProperty,iP=Object.getOwnPropertyNames,cx=Object.getOwnPropertySymbols,sP=Object.getOwnPropertyDescriptor,aP=Object.getPrototypeOf,dx=Object.prototype;function fx(e,t,n){if(typeof t!="string"){if(dx){var r=aP(t);r&&r!==dx&&fx(e,r,n)}var o=iP(t);cx&&(o=o.concat(cx(t)));for(var i=ux(e),s=ux(t),a=0;a<o.length;++a){var l=o[a];if(!nP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=sP(t,l);try{oP(e,l,u)}catch{}}}}return e}mx.exports=fx});var yx=fe(Y=>{"use strict";var Mm=Symbol.for("react.element"),Dm=Symbol.for("react.portal"),Yu=Symbol.for("react.fragment"),Zu=Symbol.for("react.strict_mode"),Ju=Symbol.for("react.profiler"),ec=Symbol.for("react.provider"),tc=Symbol.for("react.context"),lP=Symbol.for("react.server_context"),nc=Symbol.for("react.forward_ref"),rc=Symbol.for("react.suspense"),oc=Symbol.for("react.suspense_list"),ic=Symbol.for("react.memo"),sc=Symbol.for("react.lazy"),uP=Symbol.for("react.offscreen"),hx;hx=Symbol.for("react.module.reference");function Ct(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Mm:switch(e=e.type,e){case Yu:case Ju:case Zu:case rc:case oc:return e;default:switch(e=e&&e.$$typeof,e){case lP:case tc:case nc:case sc:case ic:case ec:return e;default:return t}}case Dm:return t}}}Y.ContextConsumer=tc;Y.ContextProvider=ec;Y.Element=Mm;Y.ForwardRef=nc;Y.Fragment=Yu;Y.Lazy=sc;Y.Memo=ic;Y.Portal=Dm;Y.Profiler=Ju;Y.StrictMode=Zu;Y.Suspense=rc;Y.SuspenseList=oc;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Ct(e)===tc};Y.isContextProvider=function(e){return Ct(e)===ec};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Mm};Y.isForwardRef=function(e){return Ct(e)===nc};Y.isFragment=function(e){return Ct(e)===Yu};Y.isLazy=function(e){return Ct(e)===sc};Y.isMemo=function(e){return Ct(e)===ic};Y.isPortal=function(e){return Ct(e)===Dm};Y.isProfiler=function(e){return Ct(e)===Ju};Y.isStrictMode=function(e){return Ct(e)===Zu};Y.isSuspense=function(e){return Ct(e)===rc};Y.isSuspenseList=function(e){return Ct(e)===oc};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Yu||e===Ju||e===Zu||e===rc||e===oc||e===uP||typeof e=="object"&&e!==null&&(e.$$typeof===sc||e.$$typeof===ic||e.$$typeof===ec||e.$$typeof===tc||e.$$typeof===nc||e.$$typeof===hx||e.getModuleId!==void 0)};Y.typeOf=Ct});var Sx=fe((WN,vx)=>{"use strict";vx.exports=yx()});var a_=fe((G2,s_)=>{"use strict";var UP=/["'&<>]/;s_.exports=zP;function zP(e){var t=""+e,n=UP.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 Lg=fe((s8,Mw)=>{"use strict";var AR="Expected a function",Ow=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,KR=zR.toString,VR=Math.max,WR=Math.min,Rg=function(){return UR.Date.now()};function $R(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(AR);t=Nw(t)||0,Ig(n)&&(c=!!n.leading,p="maxWait"in n,i=p?VR(Nw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(w){var b=r,R=o;return r=o=void 0,u=w,s=e.apply(R,b),s}function v(w){return u=w,a=setTimeout(g,t),c?y(w):s}function h(w){var b=w-l,R=w-u,P=t-b;return p?WR(P,i-R):P}function m(w){var b=w-l,R=w-u;return l===void 0||b>=t||b<0||p&&R>=i}function g(){var w=Rg();if(m(w))return f(w);a=setTimeout(g,h(w))}function f(w){return a=void 0,d&&r?y(w):(r=o=void 0,s)}function x(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:f(Rg())}function C(){var w=Rg(),b=m(w);if(r=arguments,o=this,l=w,b){if(a===void 0)return v(l);if(p)return a=setTimeout(g,t),y(l)}return a===void 0&&(a=setTimeout(g,t)),s}return C.cancel=x,C.flush=_,C}function Ig(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)&&KR.call(e)==OR}function Nw(e){if(typeof e=="number")return e;if(GR(e))return Ow;if(Ig(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ig(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)?Ow:+e}Mw.exports=$R});var OL={};Ce(OL,{Card:()=>me,Chip:()=>ny,ContentEditableInput:()=>ao,DeepdeskAPI:()=>Fn,DeepdeskSDK:()=>Ha,HTTPClient:()=>Wt,InputMediator:()=>_n,InputType:()=>Un,KeyboardHint:()=>fl,Label:()=>ml,Locale:()=>ta,Section:()=>Bn,SectionList:()=>gl,Sources:()=>Ot,Suggestion:()=>oe,SuggestionList:()=>qt,TextAreaInput:()=>wn,ToggleButton:()=>Nr,attachFile:()=>nC,authenticateWithKey:()=>eC,createFullRange:()=>Oi,createOverlayContainer:()=>mi,createRangeFromOffsets:()=>kr,escapeHTML:()=>ki,fetchPlatformConfig:()=>tC,formatTextMarkup:()=>JE,getRangeOffsets:()=>Ni,getRangeText:()=>Da,isSupportedInputElement:()=>wd,updateContentEditable:()=>ZE,updateTextArea:()=>YE,useStyles:()=>k,waitForElementVisibilityChange:()=>Ed});var Xa=S(X()),ft=S(O());var qa=S(O()),Hh=S(X()),Ki=qa.default.createContext({});function k(e,t){let{debug:n,...r}=(0,qa.useContext)(Ki),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Hh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Bh={root:"_root_vr71j_1"};var Lr=S(E()),Ga=()=>(0,Lr.jsxs)("svg",{className:Bh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Lr.jsx)("defs",{children:(0,Lr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Lr.jsx)("title",{children:"Failed loading image"}),(0,Lr.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 Ld={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 Ar=S(E()),Qa=(0,ft.createContext)(Ld),wC=({title:e,src:t})=>{let n=(0,ft.useContext)(Qa),[r,o]=(0,ft.useState)(!1);return(0,ft.useEffect)(()=>{o(!1)},[t]),(0,Ar.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Ar.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Ar.jsx)(Ga,{})})},EC=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,ft.useContext)(Qa);return(0,Ar.jsx)("div",{className:(0,Xa.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},CC=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,ft.useContext)(Qa);return ft.default.createElement(e,{className:(0,Xa.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ya=({children:e})=>{let t=k("Card",Ld);return(0,Ar.jsx)("div",{className:(0,Xa.default)(t.root),children:(0,Ar.jsx)(Qa.Provider,{value:t,children:e})})};Ya.Image=wC;Ya.Content=EC;Ya.Title=CC;var me=Ya;var Wh={root:"_root_nkim0_1"};var dl=S(O());var Ad=function(e,t){return Ad=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])},Ad(e,t)};function Wi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ad(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var et=function(){return et=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},et.apply(this,arguments)};function $h(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 Za(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 Ja;(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"})(Ja||(Ja={}));var el=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var At;(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"})(At||(At={}));var tl;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(tl||(tl={}));function Od(e){return e.type===At.literal}function qh(e){return e.type===At.argument}function nl(e){return e.type===At.number}function rl(e){return e.type===At.date}function ol(e){return e.type===At.time}function il(e){return e.type===At.select}function sl(e){return e.type===At.plural}function Gh(e){return e.type===At.pound}function al(e){return e.type===At.tag}function ll(e){return!!(e&&typeof e=="object"&&e.type===tl.number)}function $i(e){return!!(e&&typeof e=="object"&&e.type===tl.dateTime)}function Nd(e){e.forEach(function(t){if(delete t.location,il(t)||sl(t))for(var n in t.options)delete t.options[n].location,Nd(t.options[n].value);else nl(t)&&ll(t.style)||(rl(t)||ol(t))&&$i(t.style)?delete t.style.location:al(t)&&Nd(t.children)})}function Xh(e,t){t===void 0&&(t={}),t=et({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new el(e,t).parse();if(n.err){var r=SyntaxError(Ja[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Nd(n.val),n.val}function ul(e,t){var n=t&&t.cache?t.cache:IC,r=t&&t.serializer?t.serializer:RC,o=t&&t.strategy?t.strategy:TC;return o(e,{cache:n,serializer:r})}function bC(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Qh(e,t,n,r){var o=bC(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Yh(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 Md(e,t,n,r,o){return n.bind(t,e,r,o)}function TC(e,t){var n=e.length===1?Qh:Yh;return Md(e,this,n,t.cache.create(),t.serializer)}function kC(e,t){return Md(e,this,Yh,t.cache.create(),t.serializer)}function PC(e,t){return Md(e,this,Qh,t.cache.create(),t.serializer)}var RC=function(){return JSON.stringify(arguments)};function Dd(){this.cache=Object.create(null)}Dd.prototype.get=function(e){return this.cache[e]};Dd.prototype.set=function(e,t){this.cache[e]=t};var IC={create:function(){return new Dd}},cl={variadic:kC,monadic:PC};var Or;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Or||(Or={}));var qi=function(e){Wi(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 Fd=function(e){Wi(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('", "'),'"'),Or.INVALID_VALUE,i)||this}return t}(qi);var Zh=function(e){Wi(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Or.INVALID_VALUE,o)||this}return t}(qi);var Jh=function(e){Wi(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,'"'),Or.MISSING_VALUE,r)||this}return t}(qi);var Re;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Re||(Re={}));function LC(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Re.literal||n.type!==Re.literal?t.push(n):r.value+=n.value,t},[])}function AC(e){return typeof e=="function"}function Gi(e,t,n,r,o,i,s){if(e.length===1&&Od(e[0]))return[{type:Re.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Od(c)){a.push({type:Re.literal,value:c.value});continue}if(Gh(c)){typeof i=="number"&&a.push({type:Re.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new Jh(p,s);var d=o[p];if(qh(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Re.literal:Re.object,value:d});continue}if(rl(c)){var y=typeof c.style=="string"?r.date[c.style]:$i(c.style)?c.style.parsedOptions:void 0;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(ol(c)){var y=typeof c.style=="string"?r.time[c.style]:$i(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(nl(c)){var y=typeof c.style=="string"?r.number[c.style]:ll(c.style)?c.style.parsedOptions:void 0;y&&y.scale&&(d=d*(y.scale||1)),a.push({type:Re.literal,value:n.getNumberFormat(t,y).format(d)});continue}if(al(c)){var v=c.children,h=c.value,m=o[h];if(!AC(m))throw new Zh(h,"function",s);var g=Gi(v,t,n,r,o,i),f=m(g.map(function(C){return C.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(C){return{type:typeof C=="string"?Re.literal:Re.object,value:C}}))}if(il(c)){var x=c.options[d]||c.options.other;if(!x)throw new Fd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Gi(x.value,t,n,r,o));continue}if(sl(c)){var x=c.options["=".concat(d)];if(!x){if(!Intl.PluralRules)throw new qi(`Intl.PluralRules is not available in this environment.
|
|
9
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Te!==5&&(Te=2),l=$f(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=t0(d,i,t);pv(d,C);break e;case 1:i=l;var w=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yt===null||!Yt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=n0(d,i,t);pv(d,R);break e}}d=d.return}while(d!==null)}c0(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function l0(){var e=pu.current;return pu.current=du,e===null?du:e}function hs(e,t){var n=D;D|=16;var r=l0();Be===e&&Oe===t||Fo(e,t);do try{LT();break}catch(o){a0(e,o)}while(1);if(Df(),D=n,pu.current=r,ve!==null)throw Error(T(261));return Be=null,Oe=0,Te}function LT(){for(;ve!==null;)u0(ve)}function AT(){for(;ve!==null&&!fT();)u0(ve)}function u0(e){var t=p0(e.alternate,e,Wr);e.memoizedProps=e.pendingProps,t===null?c0(e):ve=t,qf.current=null}function c0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=ET(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=wT(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);Te===0&&(Te=5)}function Dr(e){var t=Uo();return Vr(99,OT.bind(null,e,t)),null}function OT(e,t){do lr();while(Ts!==null);if(D&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-rr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(gn!==null&&!(r&24)&&gn.has(e)&&gn.delete(e),e===Be&&(ve=Be=null,Oe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=D,D|=32,qf.current=null,dp=Fl,s=Jy(),jp(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,y=0,v=0,h=s,m=null;t:for(;;){for(var g;h!==a||i!==0&&h.nodeType!==3||(p=c+i),h!==l||u!==0&&h.nodeType!==3||(d=c+u),h.nodeType===3&&(c+=h.nodeValue.length),(g=h.firstChild)!==null;)m=h,h=g;for(;;){if(h===s)break t;if(m===a&&++y===i&&(p=c),m===l&&++v===u&&(d=c),(g=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=g}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;pp={focusedElem:s,selectionRange:a},Fl=!1,Ps=null,Vl=!1,L=r;do try{NT()}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);Ps=null,L=r;do try{for(s=e;L!==null;){var f=L.flags;if(f&16&&Is(L.stateNode,""),f&128){var x=L.alternate;if(x!==null){var _=x.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(f&1038){case 2:Fv(L),L.flags&=-3;break;case 6:Fv(L),L.flags&=-3,Sp(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,Sp(L.alternate,L);break;case 4:Sp(L.alternate,L);break;case 8:a=L,r0(s,a);var C=a.alternate;Mv(a),C!==null&&Mv(C)}L=L.nextEffect}}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);if(_=pp,x=Jy(),f=_.focusedElem,s=_.selectionRange,x!==f&&f&&f.ownerDocument&&_S(f.ownerDocument.documentElement,f)){for(s!==null&&jp(f)&&(x=s.start,_=s.end,_===void 0&&(_=x),"selectionStart"in f?(f.selectionStart=x,f.selectionEnd=Math.min(_,f.value.length)):(_=(x=f.ownerDocument||document)&&x.defaultView||window,_.getSelection&&(_=_.getSelection(),a=f.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=Zy(f,C),i=Zy(f,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(x=x.createRange(),x.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(x),_.extend(i.node,i.offset)):(x.setEnd(i.node,i.offset),_.addRange(x)))))),x=[],_=f;_=_.parentNode;)_.nodeType===1&&x.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<x.length;f++)_=x[f],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}Fl=!!dp,pp=dp=null,e.current=n,L=r;do try{for(f=e;L!==null;){var w=L.flags;if(w&36&&kT(f,L.alternate,L),w&128){x=void 0;var b=L.ref;if(b!==null){var R=L.stateNode;switch(L.tag){case 5:x=R;break;default:x=R}typeof b=="function"?b(x):b.current=x}}L=L.nextEffect}}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);L=null,gT(),D=o}else e.current=n;if(ir)ir=!1,Ts=e,gs=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(w=L,w.sibling=null,w.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(Yt=null),r===1?e===lf?ks++:(ks=0,lf=e):ks=0,n=n.stateNode,zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(Nf,n,void 0,(n.current.flags&64)===64)}catch{}if(_t(e,Ae()),fu)throw fu=!1,e=of,of=null,e;return D&8||en(),null}function NT(){for(;L!==null;){var e=L.alternate;Vl||Ps===null||(L.flags&8?By(L,Ps)&&(Vl=!0):L.tag===13&&PT(e,L)&&By(L,Ps)&&(Vl=!0));var t=L.flags;t&256&&TT(e,L),!(t&512)||ir||(ir=!0,js(97,function(){return lr(),null})),L=L.nextEffect}}function lr(){if(gs!==90){var e=97<gs?97:gs;return gs=90,Vr(e,DT)}return!1}function MT(e,t){sf.push(t,e),ir||(ir=!0,js(97,function(){return lr(),null}))}function d0(e,t){af.push(t,e),ir||(ir=!0,js(97,function(){return lr(),null}))}function DT(){if(Ts===null)return!1;var e=Ts;if(Ts=null,D&48)throw Error(T(331));var t=D;D|=32;var n=af;af=[];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));tr(i,l)}}for(n=sf,sf=[],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));tr(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 D=t,en(),!0}function Bv(e,t,n){t=$f(n,t),t=t0(e,t,1),Zn(e,t),t=tt(),e=ku(e,1),e!==null&&(Su(e,1,t),_t(e,t))}function tr(e,t){if(e.tag===3)Bv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Bv(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=$f(t,e);var o=n0(n,e,1);if(Zn(n,o),o=tt(),n=ku(n,1),n!==null)Su(n,1,o),_t(n,o);else if(typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function FT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Oe&n)===n&&(Te===4||Te===3&&(Oe&62914560)===Oe&&500>Ae()-Xf?Fo(e,0):Gf|=n),_t(e,t)}function jT(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=Wo),t=wo(62914560&~pn),t===0&&(t=4194304)):t=Uo()===99?1:2:t=1),n=tt(),e=ku(e,t),e!==null&&(Su(e,t,n),_t(e,n))}var p0;p0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)Dt=!0;else if(n&r)Dt=!!(e.flags&16384);else{switch(Dt=!1,t.tag){case 3:bv(t),hp();break;case 5:hv(t);break;case 1:qe(t.type)&&Hl(t);break;case 4:$p(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(tu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Tv(e,t,n):(de(ce,ce.current&1),t=mn(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 Lv(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,yp(e,t,n)}return mn(e,t,n)}else Dt=!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=Ho(t,Ne.current),No(t,n),o=zf(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,qe(r)){var i=!0;Hl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,jf(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&ou(t,r,s,e),o.updater=bu,t.stateNode=o,o._reactInternals=t,Wp(t,r,e,n),t=Qp(null,t,r,!0,i,n)}else t.tag=0,We(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=HT(o),e=Mt(o,e),i){case 0:t=Xp(null,t,o,e,n);break e;case 1:t=Cv(null,t,o,e,n);break e;case 11:t=wv(null,t,o,e,n);break e;case 14:t=Ev(null,t,o,Mt(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:Mt(r,o),Xp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Cv(e,t,r,o,n);case 3:if(bv(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,FS(e,t),Bs(t,r,null,n),r=t.memoizedState.element,r===o)hp(),t=mn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(qn=Oo(t.stateNode.containerInfo.firstChild),fn=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],Mo.push(i);for(n=US(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else We(e,t,r,n),hp();t=t.child}return t;case 5:return hv(t),e===null&&qp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Up(r,o)?s=null:i!==null&&Up(r,i)&&(t.flags|=16),YS(e,t),We(e,t,s,n),t.child;case 6:return e===null&&qp(t),null;case 13:return Tv(e,t,n);case 4:return $p(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=iu(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),wv(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(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(tu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=yt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!$e.current){t=mn(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=Yn(-1,n&-n),u.tag=2,Zn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),DS(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}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,No(t,n),o=xt(o,i.unstable_observedBits),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return o=t.type,i=Mt(o,t.pendingProps),i=Mt(o.type,i),Ev(e,t,o,i,r,n);case 15:return QS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,qe(r)?(e=!0,Hl(t)):e=!1,No(t,n),BS(t,r,o),Wp(t,r,o,n),Qp(null,t,r,!0,e,n);case 19:return Lv(e,t,n);case 23:return yp(e,t,n);case 24:return yp(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 vt(e,t,n,r){return new BT(e,t,n,r)}function Yf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function HT(e){if(typeof e=="function")return Yf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hu)return 11;if(e===yu)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=vt(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 Wl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Yf(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Vn:return jo(n.children,o,i,t);case zv:s=8,o|=16;break;case ff:s=8,o|=1;break;case ys:return e=vt(12,n,t,o|8),e.elementType=ys,e.type=ys,e.lanes=i,e;case vs:return e=vt(13,n,t,o),e.type=vs,e.elementType=vs,e.lanes=i,e;case $l:return e=vt(19,n,t,o),e.elementType=$l,e.lanes=i,e;case Sf:return Zf(n,o,i,t);case Ep:return e=vt(24,n,t,o),e.elementType=Ep,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mf:s=10;break e;case gf:s=9;break e;case hu:s=11;break e;case yu:s=14;break e;case hf:s=16,r=null;break e;case yf:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=vt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function jo(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Zf(e,t,n,r){return e=vt(23,e,r,t),e.elementType=Sf,e.lanes=n,e}function xp(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function _p(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function UT(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=ip(0),this.expirationTimes=ip(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ip(0),this.mutableSourceEagerHydrationData=null}function zT(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 mu(e,t,n,r){var o=t.current,i=tt(),s=Jn(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(qe(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(qe(l)){n=RS(n,l,a);break e}}n=a}else n=or;return t.context===null?t.context=n:t.pendingContext=n,t=Yn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Zn(o,t),er(o,s,i),s}function wp(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 Hv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Jf(e,t){Hv(e,t),(e=e.alternate)&&Hv(e,t)}function KT(){return null}function em(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new UT(e,t,n!=null&&n.hydrate===!0),t=vt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,jf(t),e[Vo]=n.current,CS(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}em.prototype.render=function(e){mu(e,this._internalRoot,null,null)};em.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;mu(null,e,null,function(){t[Vo]=null})};function qs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function VT(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 em(e,0,t?{hydrate:!0}:void 0)}function Pu(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=wp(s);a.call(u)}}mu(t,s,e,o)}else{if(i=n._reactRootContainer=VT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=wp(s);l.call(u)}}s0(function(){mu(t,s,e,o)})}return wp(s)}rS=function(e){if(e.tag===13){var t=tt();er(e,4,t),Jf(e,4)}};Cf=function(e){if(e.tag===13){var t=tt();er(e,67108864,t),Jf(e,67108864)}};oS=function(e){if(e.tag===13){var t=tt(),n=Jn(e);er(e,n,t),Jf(e,n)}};iS=function(e,t){return t()};Op=function(e,t,n){switch(t){case"input":if(bp(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=Eu(r);if(!o)throw Error(T(90));Vv(r),bp(r,o)}}}break;case"textarea":$v(e,n);break;case"select":t=n.value,t!=null&&Io(e,!!n.multiple,t,!1)}};_f=i0;Jv=function(e,t,n,r,o){var i=D;D|=4;try{return Vr(98,e.bind(null,t,n,r,o))}finally{D=i,D===0&&(qo(),en())}};wf=function(){!(D&49)&&(IT(),lr())};eS=function(e,t){var n=D;D|=2;try{return e(t)}finally{D=n,D===0&&(qo(),en())}};function f0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qs(t))throw Error(T(200));return zT(e,t,null,n)}var WT={Events:[Vs,To,Eu,Yv,Zv,lr,{current:!1}]},cs={findFiberByHostInstance:Br,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},$T={bundleType:cs.bundleType,version:cs.version,rendererPackageName:cs.rendererPackageName,rendererConfig:cs.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=nS(e),e===null?null:e.stateNode},findFiberByHostInstance:cs.findFiberByHostInstance||KT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ds=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ds.isDisabled&&ds.supportsFiber))try{Nf=ds.inject($T),zr=ds}catch{}var ds;wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WT;wt.createPortal=f0;wt.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=nS(t),e=e===null?null:e.stateNode,e};wt.flushSync=function(e,t){var n=D;if(n&48)return e(t);D|=1;try{if(e)return Vr(99,e.bind(null,t))}finally{D=n,en()}};wt.hydrate=function(e,t,n){if(!qs(t))throw Error(T(200));return Pu(null,e,t,!0,n)};wt.render=function(e,t,n){if(!qs(t))throw Error(T(200));return Pu(null,e,t,!1,n)};wt.unmountComponentAtNode=function(e){if(!qs(e))throw Error(T(40));return e._reactRootContainer?(s0(function(){Pu(null,null,e,!1,function(){e._reactRootContainer=null,e[Vo]=null})}),!0):!1};wt.unstable_batchedUpdates=i0;wt.unstable_createPortal=function(e,t){return f0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qs(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Pu(e,t,n,!1,r)};wt.version="17.0.2"});var Ru=fe((BO,h0)=>{"use strict";function g0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g0)}catch(e){console.error(e)}}g0(),h0.exports=m0()});var V0=fe(K0=>{"use strict";var Jo=O();function Ik(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lk=typeof Object.is=="function"?Object.is:Ik,Ak=Jo.useState,Ok=Jo.useEffect,Nk=Jo.useLayoutEffect,Mk=Jo.useDebugValue;function Dk(e,t){var n=t(),r=Ak({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Nk(function(){o.value=n,o.getSnapshot=t,km(o)&&i({inst:o})},[e,n,t]),Ok(function(){return km(o)&&i({inst:o}),e(function(){km(o)&&i({inst:o})})},[e]),Mk(n),n}function km(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lk(e,n)}catch{return!0}}function Fk(e,t){return t()}var jk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Fk:Dk;K0.useSyncExternalStore=Jo.useSyncExternalStore!==void 0?Jo.useSyncExternalStore:jk});var Pm=fe((TN,W0)=>{"use strict";W0.exports=V0()});var q0=fe($0=>{"use strict";var Fu=O(),Bk=Pm();function Hk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uk=typeof Object.is=="function"?Object.is:Hk,zk=Bk.useSyncExternalStore,Kk=Fu.useRef,Vk=Fu.useEffect,Wk=Fu.useMemo,$k=Fu.useDebugValue;$0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Kk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Wk(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 p=v}return p=y}if(v=p,Uk(c,y))return v;var h=r(y);return o!==void 0&&o(v,h)?v:(c=y,p=h)}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=zk(e,i[0],i[1]);return Vk(function(){s.hasValue=!0,s.value=a},[a]),$k(a),a}});var X0=fe((PN,G0)=>{"use strict";G0.exports=q0()});var sx=fe(Q=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,Im=_e?Symbol.for("react.element"):60103,Lm=_e?Symbol.for("react.portal"):60106,Uu=_e?Symbol.for("react.fragment"):60107,zu=_e?Symbol.for("react.strict_mode"):60108,Ku=_e?Symbol.for("react.profiler"):60114,Vu=_e?Symbol.for("react.provider"):60109,Wu=_e?Symbol.for("react.context"):60110,Am=_e?Symbol.for("react.async_mode"):60111,$u=_e?Symbol.for("react.concurrent_mode"):60111,qu=_e?Symbol.for("react.forward_ref"):60112,Gu=_e?Symbol.for("react.suspense"):60113,Qk=_e?Symbol.for("react.suspense_list"):60120,Xu=_e?Symbol.for("react.memo"):60115,Qu=_e?Symbol.for("react.lazy"):60116,Yk=_e?Symbol.for("react.block"):60121,Zk=_e?Symbol.for("react.fundamental"):60117,Jk=_e?Symbol.for("react.responder"):60118,eP=_e?Symbol.for("react.scope"):60119;function ot(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Im:switch(e=e.type,e){case Am:case $u:case Uu:case Ku:case zu:case Gu:return e;default:switch(e=e&&e.$$typeof,e){case Wu:case qu:case Qu:case Xu:case Vu:return e;default:return t}}case Lm:return t}}}function ix(e){return ot(e)===$u}Q.AsyncMode=Am;Q.ConcurrentMode=$u;Q.ContextConsumer=Wu;Q.ContextProvider=Vu;Q.Element=Im;Q.ForwardRef=qu;Q.Fragment=Uu;Q.Lazy=Qu;Q.Memo=Xu;Q.Portal=Lm;Q.Profiler=Ku;Q.StrictMode=zu;Q.Suspense=Gu;Q.isAsyncMode=function(e){return ix(e)||ot(e)===Am};Q.isConcurrentMode=ix;Q.isContextConsumer=function(e){return ot(e)===Wu};Q.isContextProvider=function(e){return ot(e)===Vu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Im};Q.isForwardRef=function(e){return ot(e)===qu};Q.isFragment=function(e){return ot(e)===Uu};Q.isLazy=function(e){return ot(e)===Qu};Q.isMemo=function(e){return ot(e)===Xu};Q.isPortal=function(e){return ot(e)===Lm};Q.isProfiler=function(e){return ot(e)===Ku};Q.isStrictMode=function(e){return ot(e)===zu};Q.isSuspense=function(e){return ot(e)===Gu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Uu||e===$u||e===Ku||e===zu||e===Gu||e===Qk||typeof e=="object"&&e!==null&&(e.$$typeof===Qu||e.$$typeof===Xu||e.$$typeof===Vu||e.$$typeof===Wu||e.$$typeof===qu||e.$$typeof===Zk||e.$$typeof===Jk||e.$$typeof===eP||e.$$typeof===Yk)};Q.typeOf=ot});var lx=fe((zN,ax)=>{"use strict";ax.exports=sx()});var gx=fe((KN,mx)=>{"use strict";var Om=lx(),tP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},nP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},rP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},px={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Nm={};Nm[Om.ForwardRef]=rP;Nm[Om.Memo]=px;function ux(e){return Om.isMemo(e)?px:Nm[e.$$typeof]||tP}var oP=Object.defineProperty,iP=Object.getOwnPropertyNames,cx=Object.getOwnPropertySymbols,sP=Object.getOwnPropertyDescriptor,aP=Object.getPrototypeOf,dx=Object.prototype;function fx(e,t,n){if(typeof t!="string"){if(dx){var r=aP(t);r&&r!==dx&&fx(e,r,n)}var o=iP(t);cx&&(o=o.concat(cx(t)));for(var i=ux(e),s=ux(t),a=0;a<o.length;++a){var l=o[a];if(!nP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=sP(t,l);try{oP(e,l,u)}catch{}}}}return e}mx.exports=fx});var yx=fe(Y=>{"use strict";var Mm=Symbol.for("react.element"),Dm=Symbol.for("react.portal"),Yu=Symbol.for("react.fragment"),Zu=Symbol.for("react.strict_mode"),Ju=Symbol.for("react.profiler"),ec=Symbol.for("react.provider"),tc=Symbol.for("react.context"),lP=Symbol.for("react.server_context"),nc=Symbol.for("react.forward_ref"),rc=Symbol.for("react.suspense"),oc=Symbol.for("react.suspense_list"),ic=Symbol.for("react.memo"),sc=Symbol.for("react.lazy"),uP=Symbol.for("react.offscreen"),hx;hx=Symbol.for("react.module.reference");function Ct(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Mm:switch(e=e.type,e){case Yu:case Ju:case Zu:case rc:case oc:return e;default:switch(e=e&&e.$$typeof,e){case lP:case tc:case nc:case sc:case ic:case ec:return e;default:return t}}case Dm:return t}}}Y.ContextConsumer=tc;Y.ContextProvider=ec;Y.Element=Mm;Y.ForwardRef=nc;Y.Fragment=Yu;Y.Lazy=sc;Y.Memo=ic;Y.Portal=Dm;Y.Profiler=Ju;Y.StrictMode=Zu;Y.Suspense=rc;Y.SuspenseList=oc;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Ct(e)===tc};Y.isContextProvider=function(e){return Ct(e)===ec};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Mm};Y.isForwardRef=function(e){return Ct(e)===nc};Y.isFragment=function(e){return Ct(e)===Yu};Y.isLazy=function(e){return Ct(e)===sc};Y.isMemo=function(e){return Ct(e)===ic};Y.isPortal=function(e){return Ct(e)===Dm};Y.isProfiler=function(e){return Ct(e)===Ju};Y.isStrictMode=function(e){return Ct(e)===Zu};Y.isSuspense=function(e){return Ct(e)===rc};Y.isSuspenseList=function(e){return Ct(e)===oc};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Yu||e===Ju||e===Zu||e===rc||e===oc||e===uP||typeof e=="object"&&e!==null&&(e.$$typeof===sc||e.$$typeof===ic||e.$$typeof===ec||e.$$typeof===tc||e.$$typeof===nc||e.$$typeof===hx||e.getModuleId!==void 0)};Y.typeOf=Ct});var Sx=fe((WN,vx)=>{"use strict";vx.exports=yx()});var a_=fe((G2,s_)=>{"use strict";var UP=/["'&<>]/;s_.exports=zP;function zP(e){var t=""+e,n=UP.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 Lg=fe((s8,Mw)=>{"use strict";var AR="Expected a function",Ow=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,BR=typeof global=="object"&&global&&global.Object===Object&&global,HR=typeof self=="object"&&self&&self.Object===Object&&self,UR=BR||HR||Function("return this")(),zR=Object.prototype,KR=zR.toString,VR=Math.max,WR=Math.min,Rg=function(){return UR.Date.now()};function $R(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(AR);t=Nw(t)||0,Ig(n)&&(c=!!n.leading,p="maxWait"in n,i=p?VR(Nw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(w){var b=r,R=o;return r=o=void 0,u=w,s=e.apply(R,b),s}function v(w){return u=w,a=setTimeout(g,t),c?y(w):s}function h(w){var b=w-l,R=w-u,P=t-b;return p?WR(P,i-R):P}function m(w){var b=w-l,R=w-u;return l===void 0||b>=t||b<0||p&&R>=i}function g(){var w=Rg();if(m(w))return f(w);a=setTimeout(g,h(w))}function f(w){return a=void 0,d&&r?y(w):(r=o=void 0,s)}function x(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:f(Rg())}function C(){var w=Rg(),b=m(w);if(r=arguments,o=this,l=w,b){if(a===void 0)return v(l);if(p)return a=setTimeout(g,t),y(l)}return a===void 0&&(a=setTimeout(g,t)),s}return C.cancel=x,C.flush=_,C}function Ig(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)&&KR.call(e)==OR}function Nw(e){if(typeof e=="number")return e;if(GR(e))return Ow;if(Ig(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ig(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)?Ow:+e}Mw.exports=$R});var OL={};Ce(OL,{Card:()=>me,Chip:()=>ny,ContentEditableInput:()=>ao,DeepdeskAPI:()=>Fn,DeepdeskSDK:()=>Ba,HTTPClient:()=>Wt,InputMediator:()=>_n,InputType:()=>Un,KeyboardHint:()=>fl,Label:()=>ml,Locale:()=>ta,Section:()=>Hn,SectionList:()=>gl,Sources:()=>Ot,Suggestion:()=>oe,SuggestionList:()=>qt,TextAreaInput:()=>wn,ToggleButton:()=>Nr,attachFile:()=>nC,authenticateWithKey:()=>eC,createFullRange:()=>Oi,createOverlayContainer:()=>mi,createRangeFromOffsets:()=>kr,escapeHTML:()=>ki,fetchPlatformConfig:()=>tC,formatTextMarkup:()=>JE,getRangeOffsets:()=>Ni,getRangeText:()=>Da,isSupportedInputElement:()=>wd,updateContentEditable:()=>ZE,updateTextArea:()=>YE,useStyles:()=>k,waitForElementVisibilityChange:()=>Ed});var Xa=S(X()),ft=S(O());var qa=S(O()),Bh=S(X()),Ki=qa.default.createContext({});function k(e,t){let{debug:n,...r}=(0,qa.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 Hh={root:"_root_vr71j_1"};var Lr=S(E()),Ga=()=>(0,Lr.jsxs)("svg",{className:Hh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Lr.jsx)("defs",{children:(0,Lr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Lr.jsx)("title",{children:"Failed loading image"}),(0,Lr.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 Ld={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 Ar=S(E()),Qa=(0,ft.createContext)(Ld),wC=({title:e,src:t})=>{let n=(0,ft.useContext)(Qa),[r,o]=(0,ft.useState)(!1);return(0,ft.useEffect)(()=>{o(!1)},[t]),(0,Ar.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Ar.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Ar.jsx)(Ga,{})})},EC=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,ft.useContext)(Qa);return(0,Ar.jsx)("div",{className:(0,Xa.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},CC=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,ft.useContext)(Qa);return ft.default.createElement(e,{className:(0,Xa.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ya=({children:e})=>{let t=k("Card",Ld);return(0,Ar.jsx)("div",{className:(0,Xa.default)(t.root),children:(0,Ar.jsx)(Qa.Provider,{value:t,children:e})})};Ya.Image=wC;Ya.Content=EC;Ya.Title=CC;var me=Ya;var Wh={root:"_root_nkim0_1"};var dl=S(O());var Ad=function(e,t){return Ad=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])},Ad(e,t)};function Wi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ad(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var et=function(){return et=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},et.apply(this,arguments)};function $h(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 Za(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 Ja;(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"})(Ja||(Ja={}));var el=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var At;(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"})(At||(At={}));var tl;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(tl||(tl={}));function Od(e){return e.type===At.literal}function qh(e){return e.type===At.argument}function nl(e){return e.type===At.number}function rl(e){return e.type===At.date}function ol(e){return e.type===At.time}function il(e){return e.type===At.select}function sl(e){return e.type===At.plural}function Gh(e){return e.type===At.pound}function al(e){return e.type===At.tag}function ll(e){return!!(e&&typeof e=="object"&&e.type===tl.number)}function $i(e){return!!(e&&typeof e=="object"&&e.type===tl.dateTime)}function Nd(e){e.forEach(function(t){if(delete t.location,il(t)||sl(t))for(var n in t.options)delete t.options[n].location,Nd(t.options[n].value);else nl(t)&&ll(t.style)||(rl(t)||ol(t))&&$i(t.style)?delete t.style.location:al(t)&&Nd(t.children)})}function Xh(e,t){t===void 0&&(t={}),t=et({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new el(e,t).parse();if(n.err){var r=SyntaxError(Ja[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Nd(n.val),n.val}function ul(e,t){var n=t&&t.cache?t.cache:IC,r=t&&t.serializer?t.serializer:RC,o=t&&t.strategy?t.strategy:TC;return o(e,{cache:n,serializer:r})}function bC(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Qh(e,t,n,r){var o=bC(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Yh(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 Md(e,t,n,r,o){return n.bind(t,e,r,o)}function TC(e,t){var n=e.length===1?Qh:Yh;return Md(e,this,n,t.cache.create(),t.serializer)}function kC(e,t){return Md(e,this,Yh,t.cache.create(),t.serializer)}function PC(e,t){return Md(e,this,Qh,t.cache.create(),t.serializer)}var RC=function(){return JSON.stringify(arguments)};function Dd(){this.cache=Object.create(null)}Dd.prototype.get=function(e){return this.cache[e]};Dd.prototype.set=function(e,t){this.cache[e]=t};var IC={create:function(){return new Dd}},cl={variadic:kC,monadic:PC};var Or;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Or||(Or={}));var qi=function(e){Wi(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 Fd=function(e){Wi(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('", "'),'"'),Or.INVALID_VALUE,i)||this}return t}(qi);var Zh=function(e){Wi(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Or.INVALID_VALUE,o)||this}return t}(qi);var Jh=function(e){Wi(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,'"'),Or.MISSING_VALUE,r)||this}return t}(qi);var Re;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Re||(Re={}));function LC(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Re.literal||n.type!==Re.literal?t.push(n):r.value+=n.value,t},[])}function AC(e){return typeof e=="function"}function Gi(e,t,n,r,o,i,s){if(e.length===1&&Od(e[0]))return[{type:Re.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Od(c)){a.push({type:Re.literal,value:c.value});continue}if(Gh(c)){typeof i=="number"&&a.push({type:Re.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new Jh(p,s);var d=o[p];if(qh(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Re.literal:Re.object,value:d});continue}if(rl(c)){var y=typeof c.style=="string"?r.date[c.style]:$i(c.style)?c.style.parsedOptions:void 0;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(ol(c)){var y=typeof c.style=="string"?r.time[c.style]:$i(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(nl(c)){var y=typeof c.style=="string"?r.number[c.style]:ll(c.style)?c.style.parsedOptions:void 0;y&&y.scale&&(d=d*(y.scale||1)),a.push({type:Re.literal,value:n.getNumberFormat(t,y).format(d)});continue}if(al(c)){var v=c.children,h=c.value,m=o[h];if(!AC(m))throw new Zh(h,"function",s);var g=Gi(v,t,n,r,o,i),f=m(g.map(function(C){return C.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(C){return{type:typeof C=="string"?Re.literal:Re.object,value:C}}))}if(il(c)){var x=c.options[d]||c.options.other;if(!x)throw new Fd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Gi(x.value,t,n,r,o));continue}if(sl(c)){var x=c.options["=".concat(d)];if(!x){if(!Intl.PluralRules)throw new qi(`Intl.PluralRules is not available in this environment.
|
|
10
10
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
11
|
-
`,Or.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));x=c.options[_]||c.options.other}if(!x)throw new Fd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Gi(x.value,t,n,r,o,d-(c.offset||0)));continue}}return LC(a)}function OC(e,t){return t?et(et(et({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=et(et({},e[r]),t[r]||{}),n},{})):e}function NC(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=OC(e[r],t[r]),n},et({},e)):e}function jd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function MC(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Za([void 0],n,!1)))},{cache:jd(e.number),strategy:cl.variadic}),getDateTimeFormat:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Za([void 0],n,!1)))},{cache:jd(e.dateTime),strategy:cl.variadic}),getPluralRules:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Za([void 0],n,!1)))},{cache:jd(e.pluralRules),strategy:cl.variadic})}}var ey=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,y){return!d.length||y.type!==Re.literal||typeof d[d.length-1]!="string"?d.push(y.value):d[d.length-1]+=y.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return Gi(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=$h(s,["formatters"]);this.ast=e.__parse(t,et(et({},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=NC(e.formats,r),this.formatters=o&&o.formatters||MC(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=Xh,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 DC(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var FC="dummy",Hd=(0,dl.createContext)(null);function j(e){let t=(0,dl.useContext)(Hd);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=DC(n,r);return i?new ey(i).format(o):(t!==FC&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Bd={};Ce(Bd,{enUS:()=>jC,nlNL:()=>HC});var jC={experimental:[{type:0,value:"Experimental"}]},HC={experimental:[{type:0,value:"Experimenteel"}]};var Ud=S(E()),ty=({children:e})=>{let t=k("Chip",Wh);return(0,Ud.jsx)("span",{className:t.root,children:e})},pl=()=>{let e=j(Bd);return(0,Ud.jsx)(ty,{children:e("experimental")})},ny=ty;var oy=S(X());var ry={root:"_root_cq1yq_1"};var iy=S(E());var BC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},UC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",ry);return(0,iy.jsx)("span",{"data-key":BC[t],className:(0,oy.default)(e,r.root),...n})},fl=UC;var ay=S(X());var sy={root:"_root_4a08n_1"};var ly=S(E()),zC=({className:e,children:t,...n})=>{let r=k("Label",sy);return(0,ly.jsx)("span",{...n,className:(0,ay.default)(e,r.root),children:t})},ml=zC;var uy={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var fo=S(E()),KC=({title:e,children:t,type:n,...r})=>{let o=k("Section",uy);return(0,fo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,fo.jsx)("div",{className:o.subTitleContainer,children:(0,fo.jsx)("span",{className:o.subtitle,children:e})}),(0,fo.jsx)("div",{className:o.suggestions,children:t})]})},Bn=KC;var dy=S(X()),py=S(O());var cy={root:"_root_19wxp_1"};var fy=S(E()),VC=py.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",cy);return(0,fy.jsx)("div",{ref:n,className:(0,dy.default)(r.root,e),children:t})}),gl=VC;var Xi=S(X()),gt=S(O());var zd={root:"_root_9kn3u_10",fadein:"_fadein_9kn3u_1",isClickable:"_isClickable_9kn3u_47",isSelected:"_isSelected_9kn3u_52",actions:"_actions_9kn3u_76",actionsIsFixed:"_actionsIsFixed_9kn3u_98",actionButton:"_actionButton_9kn3u_106",dropdownList:"_dropdownList_9kn3u_127",dropdownButton:"_dropdownButton_9kn3u_142",dropdownItem:"_dropdownItem_9kn3u_152",dropdownItemButton:"_dropdownItemButton_9kn3u_161",actionButtonIsPrimary:"_actionButtonIsPrimary_9kn3u_175",actionButtonIsDisabled:"_actionButtonIsDisabled_9kn3u_179",labels:"_labels_9kn3u_187",label:"_label_9kn3u_187"};var mt=S(E()),mo=(0,gt.createContext)(zd),WC=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(mo);return(0,mt.jsx)("div",{...n,className:(0,Xi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},$C=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(mo);return(0,mt.jsxs)("div",{className:(0,Xi.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})]})},qC=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(mo);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})})},GC=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(mo);return(0,mt.jsx)("button",{type:"button",className:(0,Xi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Kd=({labels:e})=>{let t=(0,gt.useContext)(mo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},go=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",zd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,Xi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(mo.Provider,{value:a,children:r})})});go.Labels=Kd;go.Actions=WC;go.ActionButton=GC;go.DropdownButton=$C;go.DropdownItem=qC;var oe=go;var gy=S(X());var my={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var hy=S(E()),XC=({withDivider:e,children:t})=>{let n=k("SuggestionList",my);return(0,hy.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,gy.default)(n.root,{[n.isWithDivider]:e}),children:t})},qt=XC;var vy=S(X());var yy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var hl=S(E()),QC=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",yy);return(0,hl.jsx)("button",{type:"button",className:(0,vy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,hl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,hl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Nr=QC;var Sy=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,ho=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var xy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Ot=(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))(Ot||{}),Un=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(Un||{});var jn=S(Ru());var s1=S(O());function Et(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 yn(e){return!!e&&!!e[le]}function Ft(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)===ek}(e)||Array.isArray(e)||!!e[E0]||!!(!((t=e.constructor)===null||t===void 0)&&t[E0])||um(e)||cm(e))}function Qr(e,t,n){n===void 0&&(n=!1),Qo(e)===0?(n?Object.keys:Xo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Qo(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:um(e)?2:cm(e)?3:0}function Go(e,t){return Qo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qT(e,t){return Qo(e)===2?e.get(t):e[t]}function C0(e,t,n){var r=Qo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function b0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function um(e){return ZT&&e instanceof Map}function cm(e){return JT&&e instanceof Set}function ur(e){return e.o||e.t}function dm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=P0(e);delete t[le];for(var n=Xo(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 pm(e,t){return t===void 0&&(t=!1),fm(e)||yn(e)||!Ft(e)||(Qo(e)>1&&(e.set=e.add=e.clear=e.delete=GT),Object.freeze(e),t&&Qr(e,function(n,r){return pm(r,!0)},!0)),e}function GT(){Et(2)}function fm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tn(e){var t=lm[e];return t||Et(18,e),t}function XT(e,t){lm[e]||(lm[e]=t)}function im(){return Xs}function tm(e,t){t&&(tn("Patches"),e.u=[],e.s=[],e.v=t)}function Iu(e){sm(e),e.p.forEach(QT),e.p=null}function sm(e){e===Xs&&(Xs=e.l)}function y0(e){return Xs={p:[],l:Xs,h:e,m:!0,_:0}}function QT(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function nm(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&&(Iu(t),Et(4)),Ft(e)&&(e=Lu(t,e),t.l||Au(t,e)),t.u&&tn("Patches").M(n[le].t,e,t.u,t.s)):e=Lu(t,n,[]),Iu(t),t.u&&t.v(t.u,t.s),e!==k0?e:void 0}function Lu(e,t,n){if(fm(t))return t;var r=t[le];if(!r)return Qr(t,function(a,l){return v0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Au(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=dm(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 v0(e,r,o,a,l,n,s)}),Au(e,o,!1),n&&e.u&&tn("Patches").N(r,n,e.u,e.s)}return r.o}function v0(e,t,n,r,o,i,s){if(yn(o)){var a=Lu(e,o,i&&t&&t.i!==3&&!Go(t.R,r)?i.concat(r):void 0);if(C0(n,r,a),!yn(a))return;e.m=!1}else s&&n.add(o);if(Ft(o)&&!fm(o)){if(!e.h.D&&e._<1)return;Lu(e,o),t&&t.A.l||Au(e,o)}}function Au(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&pm(t,n)}function rm(e,t){var n=e[le];return(n?ur(n):e)[t]}function S0(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 cr(e){e.P||(e.P=!0,e.l&&cr(e.l))}function om(e){e.o||(e.o=dm(e.t))}function am(e,t,n){var r=um(t)?tn("MapSet").F(t,n):cm(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:im(),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=Gs);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):tn("ES5").J(t,n);return(n?n.A:im()).p.push(r),r}function YT(e){return yn(e)||Et(22,e),function t(n){if(!Ft(n))return n;var r,o=n[le],i=Qo(n);if(o){if(!o.P&&(o.i<4||!tn("ES5").K(o)))return o.t;o.I=!0,r=x0(n,i),o.I=!1}else r=x0(n,i);return Qr(r,function(s,a){o&&qT(o.t,s)===a||C0(r,s,t(a))}),i===3?new Set(r):r}(e)}function x0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dm(e)}function T0(){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)&&cr(l);break;case 4:n(l)&&cr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Xo(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!Go(a,p))return!0;var y=l[p],v=y&&y[le];if(v?v.t!==d:!b0(y,d))return!0}}var h=!!a[le];return u.length!==Xo(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&&Et(3,JSON.stringify(ur(s)))}var i={};XT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var y=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(y,""+v,e(v,!0));return y}var h=P0(d);delete h[le];for(var m=Xo(h),g=0;g<m.length;g++){var f=m[g];h[f]=e(f,p||!!h[f].enumerable)}return Object.create(Object.getPrototypeOf(d),h)}(l,s),c={i:l?5:4,A:a?a.A:im(),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?yn(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,y=p.k,v=p.R,h=p.i;if(h===4)Qr(y,function(_){_!==le&&(d[_]!==void 0||Go(d,_)?v[_]||u(y[_]):(v[_]=!0,cr(p)))}),Qr(d,function(_){y[_]!==void 0||Go(y,_)||(v[_]=!1,cr(p))});else if(h===5){if(r(p)&&(cr(p),v.length=!0),y.length<d.length)for(var m=y.length;m<d.length;m++)v[m]=!1;else for(var g=d.length;g<y.length;g++)v[g]=!0;for(var f=Math.min(y.length,d.length),x=0;x<f;x++)y.hasOwnProperty(x)||(v[x]=!0),v[x]===void 0&&u(y[x])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var _0,Xs,mm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ZT=typeof Map<"u",JT=typeof Set<"u",w0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",k0=mm?Symbol.for("immer-nothing"):((_0={})["immer-nothing"]=!0,_0),E0=mm?Symbol.for("immer-draftable"):"__$immer_draftable",le=mm?Symbol.for("immer-state"):"__$immer_state";var ek=""+Object.prototype.constructor,Xo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,P0=Object.getOwnPropertyDescriptors||function(e){var t={};return Xo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},lm={},Qs={get:function(e,t){if(t===le)return e;var n=ur(e);if(!Go(n,t))return function(o,i,s){var a,l=S0(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||!Ft(r)?r:r===rm(e.t,t)?(om(e),e.o[t]=am(e.A.h,r,e)):r},has:function(e,t){return t in ur(e)},ownKeys:function(e){return Reflect.ownKeys(ur(e))},set:function(e,t,n){var r=S0(ur(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=rm(ur(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(b0(n,o)&&(n!==void 0||Go(e.t,t)))return!0;om(e),cr(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 rm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,om(e),cr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ur(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Et(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Et(12)}},Gs={};Qr(Qs,function(e,t){Gs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Gs.deleteProperty=function(e,t){return Gs.set.call(this,e,t,void 0)},Gs.set=function(e,t,n){return Qs.set.call(this,e[0],t,n,e[0])};var tk=function(){function e(n){var r=this;this.O=w0,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 m=this;h===void 0&&(h=a);for(var g=arguments.length,f=Array(g>1?g-1:0),x=1;x<g;x++)f[x-1]=arguments[x];return l.produce(h,function(_){var C;return(C=i).call.apply(C,[m,_].concat(f))})}}var u;if(typeof i!="function"&&Et(6),s!==void 0&&typeof s!="function"&&Et(7),Ft(o)){var c=y0(r),p=am(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?Iu(c):sm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(h){return tm(c,s),nm(h,c)},function(h){throw Iu(c),h}):(tm(c,s),nm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===k0&&(u=void 0),r.D&&pm(u,!0),s){var y=[],v=[];tn("Patches").M(o,u,y,v),s(y,v)}return u}Et(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(y){return o.apply(void 0,[y].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){Ft(n)||Et(8),yn(n)&&(n=YT(n));var r=y0(this),o=am(this,n,void 0);return o[le].C=!0,sm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return tm(i,r),nm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!w0&&Et(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 yn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),rt=new tk,nk=rt.produce,BO=rt.produceWithPatches.bind(rt),UO=rt.setAutoFreeze.bind(rt),zO=rt.setUseProxies.bind(rt),KO=rt.applyPatches.bind(rt),VO=rt.createDraft.bind(rt),WO=rt.finishDraft.bind(rt),Ou=nk;function dr(e){"@babel/helpers - typeof";return dr=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},dr(e)}function gm(e,t){if(dr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hm(e){var t=gm(e,"string");return dr(t)==="symbol"?t:String(t)}function ym(e,t,n){return t=hm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R0(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 Nu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R0(Object(n),!0).forEach(function(r){ym(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Me(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 I0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),vm=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mu={INIT:"@@redux/INIT"+vm(),REPLACE:"@@redux/REPLACE"+vm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+vm()}};function rk(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 Sm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Me(1));return n(Sm)(e,t)}if(typeof e!="function")throw new Error(Me(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(Me(3));return i}function p(h){if(typeof h!="function")throw new Error(Me(4));if(l)throw new Error(Me(5));var m=!0;return u(),a.push(h),function(){if(m){if(l)throw new Error(Me(6));m=!1,u();var f=a.indexOf(h);a.splice(f,1),s=null}}}function d(h){if(!rk(h))throw new Error(Me(7));if(typeof h.type>"u")throw new Error(Me(8));if(l)throw new Error(Me(9));try{l=!0,i=o(i,h)}finally{l=!1}for(var m=s=a,g=0;g<m.length;g++){var f=m[g];f()}return h}function y(h){if(typeof h!="function")throw new Error(Me(10));o=h,d({type:Mu.REPLACE})}function v(){var h,m=p;return h={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(Me(11));function x(){f.next&&f.next(c())}x();var _=m(x);return{unsubscribe:_}}},h[I0]=function(){return this},h}return d({type:Mu.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:y},r[I0]=v,r}function ok(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Mu.INIT});if(typeof r>"u")throw new Error(Me(12));if(typeof n(void 0,{type:Mu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function Du(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{ok(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,y={},v=0;v<i.length;v++){var h=i[v],m=n[h],g=u[h],f=m(g,c);if(typeof f>"u"){var x=c&&c.type;throw new Error(Me(14))}y[h]=f,d=d||f!==g}return d=d||i.length!==Object.keys(u).length,d?y:u}}function Yo(){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 L0(){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(Me(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Yo.apply(void 0,a)(o.dispatch),Nu(Nu({},o),{},{dispatch:i})}}}function A0(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 O0=A0();O0.withExtraArgument=A0;var xm=O0;var j0=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)}}(),ik=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}}},Zo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},sk=Object.defineProperty,ak=Object.defineProperties,lk=Object.getOwnPropertyDescriptors,N0=Object.getOwnPropertySymbols,uk=Object.prototype.hasOwnProperty,ck=Object.prototype.propertyIsEnumerable,M0=function(e,t,n){return t in e?sk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},pr=function(e,t){for(var n in t||(t={}))uk.call(t,n)&&M0(e,n,t[n]);if(N0)for(var r=0,o=N0(t);r<o.length;r++){var n=o[r];ck.call(t,n)&&M0(e,n,t[n])}return e},_m=function(e,t){return ak(e,lk(t))},dk=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 pk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Yo:Yo.apply(null,arguments)},uN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function fk(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 mk=function(e){j0(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,Zo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Zo([void 0],n.concat(this))))},t}(Array),gk=function(e){j0(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,Zo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Zo([void 0],n.concat(this))))},t}(Array);function Cm(e){return Ft(e)?Ou(e,function(){}):e}function hk(e){return typeof e=="boolean"}function yk(){return function(t){return vk(t)}}function vk(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 mk;if(n&&(hk(n)?a.push(xm):a.push(xm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var wm=!0;function H0(e){var t=yk(),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,y;if(typeof o=="function")y=o;else if(fk(o))y=Du(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),!wm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wm&&v.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=L0.apply(void 0,v),m=Yo;l&&(m=pk(pr({trace:!wm},typeof l=="object"&&l)));var g=new gk(h),f=g;Array.isArray(d)?f=Zo([h],d):typeof d=="function"&&(f=d(g));var x=m.apply(void 0,f);return Sm(y,c,x)}function pe(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 B0(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 Sk(e){return typeof e=="function"}function xk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?B0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Sk(e))l=function(){return Cm(e())};else{var u=Cm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var y=Zo([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(yn(v)){var m=v,g=h(m,d);return g===void 0?v:g}else{if(Ft(v))return Ou(v,function(f){return h(f,d)});var g=h(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 _k(e,t){return e+"/"+t}function H(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:Cm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=_k(t,c),y,v;"reducer"in p?(y=p.reducer,v=p.prepare):y=p,i[c]=y,s[d]=y,a[c]=v?pe(d,v):pe(d)});function l(){var c=typeof e.extraReducers=="function"?B0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,y=c[1],v=y===void 0?[]:y,h=c[2],m=h===void 0?void 0:h,g=pr(pr({},d),s);return xk(n,function(f){for(var x in g)f.addCase(x,g[x]);for(var _=0,C=v;_<C.length;_++){var w=C[_];f.addMatcher(w.matcher,w.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 wk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ek=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=wk[Math.random()*64|0];return t},Ck=["name","message","stack","code"],Em=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),D0=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=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=pe(t+"/fulfilled",function(c,p,d,y){return{payload:c,meta:_m(pr({},y||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=pe(t+"/pending",function(c,p,d){return{payload:void 0,meta:_m(pr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=pe(t+"/rejected",function(c,p,d,y,v){return{payload:y,error:(r&&r.serializeError||bk)(c||"Rejected"),meta:_m(pr({},v||{}),{arg:d,requestId:p,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(p,d,y){var v=r!=null&&r.idGenerator?r.idGenerator(c):Ek(),h=new l,m,g=!1;function f(_){m=_,h.abort()}var x=function(){return dk(this,null,function(){var _,C,w,b,R,P,N;return ik(this,function(K){switch(K.label){case 0:return K.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:y}),kk(b)?[4,b]:[3,2];case 1:b=K.sent(),K.label=2;case 2:if(b===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return g=!0,R=new Promise(function(B,je){return h.signal.addEventListener("abort",function(){return je({name:"AbortError",message:m||"Aborted"})})}),p(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:p,getState:d,extra:y,requestId:v,signal:h.signal,abort:f,rejectWithValue:function(B,je){return new Em(B,je)},fulfillWithValue:function(B,je){return new D0(B,je)}})).then(function(B){if(B instanceof Em)throw B;return B instanceof D0?o(B.payload,v,c,B.meta):o(B,v,c)})])];case 3:return w=K.sent(),[3,5];case 4:return P=K.sent(),w=P instanceof Em?s(null,v,c,P.payload,P.meta):s(P,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition,N||p(w),[2,w]}})})}();return Object.assign(x,{abort:f,requestId:v,arg:c,unwrap:function(){return x.then(Tk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Tk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pk="task",U0="listener",z0="completed",bm="cancelled",fN="task-"+bm,mN="task-"+z0,gN=U0+"-"+bm,hN=U0+"-"+z0,yN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Pk+" "+bm+" (reason: "+t+")"}return e}();var Tm="listenerMiddleware";var vN=pe(Tm+"/add"),SN=pe(Tm+"/removeAll"),xN=pe(Tm+"/remove");var F0,_N=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(F0||(F0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Rk=function(e){return function(t){setTimeout(t,e)}},wN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Rk(10);T0();var Ix=S(Pm()),Lx=S(X0());var Rm=S(Ru());function qk(e){e()}var Q0=qk,Y0=e=>Q0=e,Z0=()=>Q0;var ei=S(O());var tx=S(O());var ju=S(O()),J0=Symbol.for(`react-redux-context-${ju.version}`),ex=globalThis;function Gk(){let e=ex[J0];return e||(e=(0,ju.createContext)(null),ex[J0]=e),e}var De=new Proxy({},new Proxy({},{get(e,t){let n=Gk();return(r,...o)=>Reflect[t](n,...o)}}));function Ys(e=De){return function(){return(0,tx.useContext)(e)}}var Hu=Ys();var Bu=()=>{throw new Error("uSES not initialized!")};var nx=Bu,rx=e=>{nx=e},Xk=(e,t)=>e===t;function ox(e=De){let t=e===De?Hu:Ys(e);return function(r,o={}){let{equalityFn:i=Xk,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(),y=(0,ei.useRef)(!0),v=(0,ei.useCallback)({[r.name](m){return r(m)}}[r.name],[r,p,s]),h=nx(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,ei.useDebugValue)(h),h}}var A=ox();function vn(){return vn=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},vn.apply(this,arguments)}function Zs(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 Hm=S(gx()),Z=S(O()),Tx=S(Sx());var dP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function pP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function y(f,x){return l=f,u=x,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 h(){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),x=!s(f,c);return c=f,x&&(d=n(c,p,u)),d}function g(f,x){let _=!i(x,u),C=!o(f,l,x,u);return l=f,u=x,_&&C?v():_?h():C?m():d}return function(x,_){return a?g(x,_):y(x,_)}}function Fm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Zs(t,dP),s=n(e,i),a=r(e,i),l=o(e,i);return pP(s,a,l,e,i)}function jm(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 Js(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function xx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function ac(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=xx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=xx(u),u=i(a,l)),u},i}}function ti(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function _x(e){return e&&typeof e=="object"?Js(t=>jm(e,t)):e?typeof e=="function"?ac(e,"mapDispatchToProps"):ti(e,"mapDispatchToProps"):Js(t=>({dispatch:t}))}function wx(e){return e?typeof e=="function"?ac(e,"mapStateToProps"):ti(e,"mapStateToProps"):Js(()=>({}))}function fP(e,t,n){return vn({},n,e,t)}function mP(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 Ex(e){return e?typeof e=="function"?mP(e):ti(e,"mergeProps"):()=>fP}function gP(){let e=Z0(),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 Cx={notify(){},get:()=>[]};function lc(e,t){let n,r=Cx;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=gP())}function u(){n&&(n(),n=void 0,r.clear(),r=Cx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var uc=S(O()),hP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ni=hP?uc.useLayoutEffect:uc.useEffect;function bx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ri(e,t){if(bx(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])||!bx(e[n[o]],t[n[o]]))return!1;return!0}var yP=["reactReduxForwardedRef"],kx=Bu,Px=e=>{kx=e};var vP=[null,null];function SP(e,t,n){ni(()=>e(...t),n)}function xP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function _P(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,y=()=>{if(p||!a.current)return;let h=t.getState(),m,g;try{m=r(h,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=y,n.trySubscribe(),y(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function wP(e,t){return e===t}function EP(e,t,n,{pure:r,areStatesEqual:o=wP,areOwnPropsEqual:i=ri,areStatePropsEqual:s=ri,areMergedPropsEqual:a=ri,forwardRef:l=!1,context:u=De}={}){let c=u,p=wx(e),d=_x(t),y=Ex(n),v=!!e;return m=>{let g=m.displayName||m.name||"Component",f=`Connect(${g})`,x={shouldHandleStateChanges:v,displayName:f,wrappedComponentName:g,WrappedComponent:m,initMapStateToProps:p,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,Ir=Zs(b,yP);return[b.context,dt,Ir]},[b]),K=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Tx.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),B=(0,Z.useContext)(K),je=!!b.store&&!!b.store.getState&&!!b.store.dispatch,an=!!B&&!!B.store,$t=je?b.store:B.store,uo=an?B.getServerState:$t.getState,Fi=(0,Z.useMemo)(()=>Fm($t.dispatch,x),[$t]),[Pr,Ba]=(0,Z.useMemo)(()=>{if(!v)return vP;let dt=lc($t,je?void 0:B.subscription),Ir=dt.notifyNestedSubs.bind(dt);return[dt,Ir]},[$t,je,B]),Ua=(0,Z.useMemo)(()=>je?B:vn({},B,{subscription:Pr}),[je,B,Pr]),ji=(0,Z.useRef)(),Hi=(0,Z.useRef)(N),ln=(0,Z.useRef)(),Bi=(0,Z.useRef)(!1),Rr=(0,Z.useRef)(!1),I=(0,Z.useRef)(!1),$=(0,Z.useRef)();ni(()=>(I.current=!0,()=>{I.current=!1}),[]);let Lt=(0,Z.useMemo)(()=>()=>ln.current&&N===Hi.current?ln.current:Fi($t.getState(),N),[$t,N]),Hn=(0,Z.useMemo)(()=>Ir=>Pr?_P(v,$t,Pr,Fi,Hi,ji,Bi,I,ln,Ba,Ir):()=>{},[Pr]);SP(xP,[Hi,ji,Bi,N,ln,Ba]);let un;try{un=kx(Hn,Lt,uo?()=>Fi(uo(),N):Lt)}catch(dt){throw $.current&&(dt.message+=`
|
|
11
|
+
`,Or.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));x=c.options[_]||c.options.other}if(!x)throw new Fd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Gi(x.value,t,n,r,o,d-(c.offset||0)));continue}}return LC(a)}function OC(e,t){return t?et(et(et({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=et(et({},e[r]),t[r]||{}),n},{})):e}function NC(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=OC(e[r],t[r]),n},et({},e)):e}function jd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function MC(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Za([void 0],n,!1)))},{cache:jd(e.number),strategy:cl.variadic}),getDateTimeFormat:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Za([void 0],n,!1)))},{cache:jd(e.dateTime),strategy:cl.variadic}),getPluralRules:ul(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Za([void 0],n,!1)))},{cache:jd(e.pluralRules),strategy:cl.variadic})}}var ey=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,y){return!d.length||y.type!==Re.literal||typeof d[d.length-1]!="string"?d.push(y.value):d[d.length-1]+=y.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return Gi(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=$h(s,["formatters"]);this.ast=e.__parse(t,et(et({},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=NC(e.formats,r),this.formatters=o&&o.formatters||MC(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=Xh,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 DC(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var FC="dummy",Bd=(0,dl.createContext)(null);function j(e){let t=(0,dl.useContext)(Bd);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=DC(n,r);return i?new ey(i).format(o):(t!==FC&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Hd={};Ce(Hd,{enUS:()=>jC,nlNL:()=>BC});var jC={experimental:[{type:0,value:"Experimental"}]},BC={experimental:[{type:0,value:"Experimenteel"}]};var Ud=S(E()),ty=({children:e})=>{let t=k("Chip",Wh);return(0,Ud.jsx)("span",{className:t.root,children:e})},pl=()=>{let e=j(Hd);return(0,Ud.jsx)(ty,{children:e("experimental")})},ny=ty;var oy=S(X());var ry={root:"_root_cq1yq_1"};var iy=S(E());var HC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},UC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",ry);return(0,iy.jsx)("span",{"data-key":HC[t],className:(0,oy.default)(e,r.root),...n})},fl=UC;var ay=S(X());var sy={root:"_root_4a08n_1"};var ly=S(E()),zC=({className:e,children:t,...n})=>{let r=k("Label",sy);return(0,ly.jsx)("span",{...n,className:(0,ay.default)(e,r.root),children:t})},ml=zC;var uy={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var fo=S(E()),KC=({title:e,children:t,type:n,...r})=>{let o=k("Section",uy);return(0,fo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,fo.jsx)("div",{className:o.subTitleContainer,children:(0,fo.jsx)("span",{className:o.subtitle,children:e})}),(0,fo.jsx)("div",{className:o.suggestions,children:t})]})},Hn=KC;var dy=S(X()),py=S(O());var cy={root:"_root_19wxp_1"};var fy=S(E()),VC=py.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",cy);return(0,fy.jsx)("div",{ref:n,className:(0,dy.default)(r.root,e),children:t})}),gl=VC;var Xi=S(X()),gt=S(O());var zd={root:"_root_9kn3u_10",fadein:"_fadein_9kn3u_1",isClickable:"_isClickable_9kn3u_47",isSelected:"_isSelected_9kn3u_52",actions:"_actions_9kn3u_76",actionsIsFixed:"_actionsIsFixed_9kn3u_98",actionButton:"_actionButton_9kn3u_106",dropdownList:"_dropdownList_9kn3u_127",dropdownButton:"_dropdownButton_9kn3u_142",dropdownItem:"_dropdownItem_9kn3u_152",dropdownItemButton:"_dropdownItemButton_9kn3u_161",actionButtonIsPrimary:"_actionButtonIsPrimary_9kn3u_175",actionButtonIsDisabled:"_actionButtonIsDisabled_9kn3u_179",labels:"_labels_9kn3u_187",label:"_label_9kn3u_187"};var mt=S(E()),mo=(0,gt.createContext)(zd),WC=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(mo);return(0,mt.jsx)("div",{...n,className:(0,Xi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},$C=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(mo);return(0,mt.jsxs)("div",{className:(0,Xi.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})]})},qC=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(mo);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})})},GC=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(mo);return(0,mt.jsx)("button",{type:"button",className:(0,Xi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Kd=({labels:e})=>{let t=(0,gt.useContext)(mo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},go=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",zd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,Xi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(mo.Provider,{value:a,children:r})})});go.Labels=Kd;go.Actions=WC;go.ActionButton=GC;go.DropdownButton=$C;go.DropdownItem=qC;var oe=go;var gy=S(X());var my={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var hy=S(E()),XC=({withDivider:e,children:t})=>{let n=k("SuggestionList",my);return(0,hy.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,gy.default)(n.root,{[n.isWithDivider]:e}),children:t})},qt=XC;var vy=S(X());var yy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var hl=S(E()),QC=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",yy);return(0,hl.jsx)("button",{type:"button",className:(0,vy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,hl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,hl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Nr=QC;var Sy=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,ho=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var xy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Ot=(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))(Ot||{}),Un=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(Un||{});var jn=S(Ru());var s1=S(O());function Et(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 yn(e){return!!e&&!!e[le]}function Ft(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)===ek}(e)||Array.isArray(e)||!!e[E0]||!!(!((t=e.constructor)===null||t===void 0)&&t[E0])||um(e)||cm(e))}function Qr(e,t,n){n===void 0&&(n=!1),Qo(e)===0?(n?Object.keys:Xo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Qo(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:um(e)?2:cm(e)?3:0}function Go(e,t){return Qo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qT(e,t){return Qo(e)===2?e.get(t):e[t]}function C0(e,t,n){var r=Qo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function b0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function um(e){return ZT&&e instanceof Map}function cm(e){return JT&&e instanceof Set}function ur(e){return e.o||e.t}function dm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=P0(e);delete t[le];for(var n=Xo(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 pm(e,t){return t===void 0&&(t=!1),fm(e)||yn(e)||!Ft(e)||(Qo(e)>1&&(e.set=e.add=e.clear=e.delete=GT),Object.freeze(e),t&&Qr(e,function(n,r){return pm(r,!0)},!0)),e}function GT(){Et(2)}function fm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tn(e){var t=lm[e];return t||Et(18,e),t}function XT(e,t){lm[e]||(lm[e]=t)}function im(){return Xs}function tm(e,t){t&&(tn("Patches"),e.u=[],e.s=[],e.v=t)}function Iu(e){sm(e),e.p.forEach(QT),e.p=null}function sm(e){e===Xs&&(Xs=e.l)}function y0(e){return Xs={p:[],l:Xs,h:e,m:!0,_:0}}function QT(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function nm(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&&(Iu(t),Et(4)),Ft(e)&&(e=Lu(t,e),t.l||Au(t,e)),t.u&&tn("Patches").M(n[le].t,e,t.u,t.s)):e=Lu(t,n,[]),Iu(t),t.u&&t.v(t.u,t.s),e!==k0?e:void 0}function Lu(e,t,n){if(fm(t))return t;var r=t[le];if(!r)return Qr(t,function(a,l){return v0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Au(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=dm(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 v0(e,r,o,a,l,n,s)}),Au(e,o,!1),n&&e.u&&tn("Patches").N(r,n,e.u,e.s)}return r.o}function v0(e,t,n,r,o,i,s){if(yn(o)){var a=Lu(e,o,i&&t&&t.i!==3&&!Go(t.R,r)?i.concat(r):void 0);if(C0(n,r,a),!yn(a))return;e.m=!1}else s&&n.add(o);if(Ft(o)&&!fm(o)){if(!e.h.D&&e._<1)return;Lu(e,o),t&&t.A.l||Au(e,o)}}function Au(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&pm(t,n)}function rm(e,t){var n=e[le];return(n?ur(n):e)[t]}function S0(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 cr(e){e.P||(e.P=!0,e.l&&cr(e.l))}function om(e){e.o||(e.o=dm(e.t))}function am(e,t,n){var r=um(t)?tn("MapSet").F(t,n):cm(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:im(),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=Gs);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):tn("ES5").J(t,n);return(n?n.A:im()).p.push(r),r}function YT(e){return yn(e)||Et(22,e),function t(n){if(!Ft(n))return n;var r,o=n[le],i=Qo(n);if(o){if(!o.P&&(o.i<4||!tn("ES5").K(o)))return o.t;o.I=!0,r=x0(n,i),o.I=!1}else r=x0(n,i);return Qr(r,function(s,a){o&&qT(o.t,s)===a||C0(r,s,t(a))}),i===3?new Set(r):r}(e)}function x0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dm(e)}function T0(){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)&&cr(l);break;case 4:n(l)&&cr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Xo(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!Go(a,p))return!0;var y=l[p],v=y&&y[le];if(v?v.t!==d:!b0(y,d))return!0}}var h=!!a[le];return u.length!==Xo(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&&Et(3,JSON.stringify(ur(s)))}var i={};XT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var y=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(y,""+v,e(v,!0));return y}var h=P0(d);delete h[le];for(var m=Xo(h),g=0;g<m.length;g++){var f=m[g];h[f]=e(f,p||!!h[f].enumerable)}return Object.create(Object.getPrototypeOf(d),h)}(l,s),c={i:l?5:4,A:a?a.A:im(),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?yn(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,y=p.k,v=p.R,h=p.i;if(h===4)Qr(y,function(_){_!==le&&(d[_]!==void 0||Go(d,_)?v[_]||u(y[_]):(v[_]=!0,cr(p)))}),Qr(d,function(_){y[_]!==void 0||Go(y,_)||(v[_]=!1,cr(p))});else if(h===5){if(r(p)&&(cr(p),v.length=!0),y.length<d.length)for(var m=y.length;m<d.length;m++)v[m]=!1;else for(var g=d.length;g<y.length;g++)v[g]=!0;for(var f=Math.min(y.length,d.length),x=0;x<f;x++)y.hasOwnProperty(x)||(v[x]=!0),v[x]===void 0&&u(y[x])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var _0,Xs,mm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ZT=typeof Map<"u",JT=typeof Set<"u",w0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",k0=mm?Symbol.for("immer-nothing"):((_0={})["immer-nothing"]=!0,_0),E0=mm?Symbol.for("immer-draftable"):"__$immer_draftable",le=mm?Symbol.for("immer-state"):"__$immer_state";var ek=""+Object.prototype.constructor,Xo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,P0=Object.getOwnPropertyDescriptors||function(e){var t={};return Xo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},lm={},Qs={get:function(e,t){if(t===le)return e;var n=ur(e);if(!Go(n,t))return function(o,i,s){var a,l=S0(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||!Ft(r)?r:r===rm(e.t,t)?(om(e),e.o[t]=am(e.A.h,r,e)):r},has:function(e,t){return t in ur(e)},ownKeys:function(e){return Reflect.ownKeys(ur(e))},set:function(e,t,n){var r=S0(ur(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=rm(ur(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(b0(n,o)&&(n!==void 0||Go(e.t,t)))return!0;om(e),cr(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 rm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,om(e),cr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ur(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Et(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Et(12)}},Gs={};Qr(Qs,function(e,t){Gs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Gs.deleteProperty=function(e,t){return Gs.set.call(this,e,t,void 0)},Gs.set=function(e,t,n){return Qs.set.call(this,e[0],t,n,e[0])};var tk=function(){function e(n){var r=this;this.O=w0,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 m=this;h===void 0&&(h=a);for(var g=arguments.length,f=Array(g>1?g-1:0),x=1;x<g;x++)f[x-1]=arguments[x];return l.produce(h,function(_){var C;return(C=i).call.apply(C,[m,_].concat(f))})}}var u;if(typeof i!="function"&&Et(6),s!==void 0&&typeof s!="function"&&Et(7),Ft(o)){var c=y0(r),p=am(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?Iu(c):sm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(h){return tm(c,s),nm(h,c)},function(h){throw Iu(c),h}):(tm(c,s),nm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===k0&&(u=void 0),r.D&&pm(u,!0),s){var y=[],v=[];tn("Patches").M(o,u,y,v),s(y,v)}return u}Et(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(y){return o.apply(void 0,[y].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){Ft(n)||Et(8),yn(n)&&(n=YT(n));var r=y0(this),o=am(this,n,void 0);return o[le].C=!0,sm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return tm(i,r),nm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!w0&&Et(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 yn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),rt=new tk,nk=rt.produce,HO=rt.produceWithPatches.bind(rt),UO=rt.setAutoFreeze.bind(rt),zO=rt.setUseProxies.bind(rt),KO=rt.applyPatches.bind(rt),VO=rt.createDraft.bind(rt),WO=rt.finishDraft.bind(rt),Ou=nk;function dr(e){"@babel/helpers - typeof";return dr=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},dr(e)}function gm(e,t){if(dr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hm(e){var t=gm(e,"string");return dr(t)==="symbol"?t:String(t)}function ym(e,t,n){return t=hm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R0(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 Nu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R0(Object(n),!0).forEach(function(r){ym(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Me(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 I0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),vm=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mu={INIT:"@@redux/INIT"+vm(),REPLACE:"@@redux/REPLACE"+vm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+vm()}};function rk(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 Sm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Me(1));return n(Sm)(e,t)}if(typeof e!="function")throw new Error(Me(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(Me(3));return i}function p(h){if(typeof h!="function")throw new Error(Me(4));if(l)throw new Error(Me(5));var m=!0;return u(),a.push(h),function(){if(m){if(l)throw new Error(Me(6));m=!1,u();var f=a.indexOf(h);a.splice(f,1),s=null}}}function d(h){if(!rk(h))throw new Error(Me(7));if(typeof h.type>"u")throw new Error(Me(8));if(l)throw new Error(Me(9));try{l=!0,i=o(i,h)}finally{l=!1}for(var m=s=a,g=0;g<m.length;g++){var f=m[g];f()}return h}function y(h){if(typeof h!="function")throw new Error(Me(10));o=h,d({type:Mu.REPLACE})}function v(){var h,m=p;return h={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(Me(11));function x(){f.next&&f.next(c())}x();var _=m(x);return{unsubscribe:_}}},h[I0]=function(){return this},h}return d({type:Mu.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:y},r[I0]=v,r}function ok(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Mu.INIT});if(typeof r>"u")throw new Error(Me(12));if(typeof n(void 0,{type:Mu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function Du(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{ok(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,y={},v=0;v<i.length;v++){var h=i[v],m=n[h],g=u[h],f=m(g,c);if(typeof f>"u"){var x=c&&c.type;throw new Error(Me(14))}y[h]=f,d=d||f!==g}return d=d||i.length!==Object.keys(u).length,d?y:u}}function Yo(){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 L0(){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(Me(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Yo.apply(void 0,a)(o.dispatch),Nu(Nu({},o),{},{dispatch:i})}}}function A0(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 O0=A0();O0.withExtraArgument=A0;var xm=O0;var j0=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)}}(),ik=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}}},Zo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},sk=Object.defineProperty,ak=Object.defineProperties,lk=Object.getOwnPropertyDescriptors,N0=Object.getOwnPropertySymbols,uk=Object.prototype.hasOwnProperty,ck=Object.prototype.propertyIsEnumerable,M0=function(e,t,n){return t in e?sk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},pr=function(e,t){for(var n in t||(t={}))uk.call(t,n)&&M0(e,n,t[n]);if(N0)for(var r=0,o=N0(t);r<o.length;r++){var n=o[r];ck.call(t,n)&&M0(e,n,t[n])}return e},_m=function(e,t){return ak(e,lk(t))},dk=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 pk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Yo:Yo.apply(null,arguments)},uN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function fk(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 mk=function(e){j0(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,Zo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Zo([void 0],n.concat(this))))},t}(Array),gk=function(e){j0(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,Zo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Zo([void 0],n.concat(this))))},t}(Array);function Cm(e){return Ft(e)?Ou(e,function(){}):e}function hk(e){return typeof e=="boolean"}function yk(){return function(t){return vk(t)}}function vk(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 mk;if(n&&(hk(n)?a.push(xm):a.push(xm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var wm=!0;function B0(e){var t=yk(),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,y;if(typeof o=="function")y=o;else if(fk(o))y=Du(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),!wm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wm&&v.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=L0.apply(void 0,v),m=Yo;l&&(m=pk(pr({trace:!wm},typeof l=="object"&&l)));var g=new gk(h),f=g;Array.isArray(d)?f=Zo([h],d):typeof d=="function"&&(f=d(g));var x=m.apply(void 0,f);return Sm(y,c,x)}function pe(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 H0(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 Sk(e){return typeof e=="function"}function xk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?H0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Sk(e))l=function(){return Cm(e())};else{var u=Cm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var y=Zo([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(yn(v)){var m=v,g=h(m,d);return g===void 0?v:g}else{if(Ft(v))return Ou(v,function(f){return h(f,d)});var g=h(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 _k(e,t){return e+"/"+t}function B(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:Cm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=_k(t,c),y,v;"reducer"in p?(y=p.reducer,v=p.prepare):y=p,i[c]=y,s[d]=y,a[c]=v?pe(d,v):pe(d)});function l(){var c=typeof e.extraReducers=="function"?H0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,y=c[1],v=y===void 0?[]:y,h=c[2],m=h===void 0?void 0:h,g=pr(pr({},d),s);return xk(n,function(f){for(var x in g)f.addCase(x,g[x]);for(var _=0,C=v;_<C.length;_++){var w=C[_];f.addMatcher(w.matcher,w.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 wk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ek=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=wk[Math.random()*64|0];return t},Ck=["name","message","stack","code"],Em=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),D0=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=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=pe(t+"/fulfilled",function(c,p,d,y){return{payload:c,meta:_m(pr({},y||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=pe(t+"/pending",function(c,p,d){return{payload:void 0,meta:_m(pr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=pe(t+"/rejected",function(c,p,d,y,v){return{payload:y,error:(r&&r.serializeError||bk)(c||"Rejected"),meta:_m(pr({},v||{}),{arg:d,requestId:p,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(p,d,y){var v=r!=null&&r.idGenerator?r.idGenerator(c):Ek(),h=new l,m,g=!1;function f(_){m=_,h.abort()}var x=function(){return dk(this,null,function(){var _,C,w,b,R,P,N;return ik(this,function(K){switch(K.label){case 0:return K.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:y}),kk(b)?[4,b]:[3,2];case 1:b=K.sent(),K.label=2;case 2:if(b===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return g=!0,R=new Promise(function(H,je){return h.signal.addEventListener("abort",function(){return je({name:"AbortError",message:m||"Aborted"})})}),p(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:p,getState:d,extra:y,requestId:v,signal:h.signal,abort:f,rejectWithValue:function(H,je){return new Em(H,je)},fulfillWithValue:function(H,je){return new D0(H,je)}})).then(function(H){if(H instanceof Em)throw H;return H instanceof D0?o(H.payload,v,c,H.meta):o(H,v,c)})])];case 3:return w=K.sent(),[3,5];case 4:return P=K.sent(),w=P instanceof Em?s(null,v,c,P.payload,P.meta):s(P,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition,N||p(w),[2,w]}})})}();return Object.assign(x,{abort:f,requestId:v,arg:c,unwrap:function(){return x.then(Tk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Tk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pk="task",U0="listener",z0="completed",bm="cancelled",fN="task-"+bm,mN="task-"+z0,gN=U0+"-"+bm,hN=U0+"-"+z0,yN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Pk+" "+bm+" (reason: "+t+")"}return e}();var Tm="listenerMiddleware";var vN=pe(Tm+"/add"),SN=pe(Tm+"/removeAll"),xN=pe(Tm+"/remove");var F0,_N=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(F0||(F0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Rk=function(e){return function(t){setTimeout(t,e)}},wN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Rk(10);T0();var Ix=S(Pm()),Lx=S(X0());var Rm=S(Ru());function qk(e){e()}var Q0=qk,Y0=e=>Q0=e,Z0=()=>Q0;var ei=S(O());var tx=S(O());var ju=S(O()),J0=Symbol.for(`react-redux-context-${ju.version}`),ex=globalThis;function Gk(){let e=ex[J0];return e||(e=(0,ju.createContext)(null),ex[J0]=e),e}var De=new Proxy({},new Proxy({},{get(e,t){let n=Gk();return(r,...o)=>Reflect[t](n,...o)}}));function Ys(e=De){return function(){return(0,tx.useContext)(e)}}var Bu=Ys();var Hu=()=>{throw new Error("uSES not initialized!")};var nx=Hu,rx=e=>{nx=e},Xk=(e,t)=>e===t;function ox(e=De){let t=e===De?Bu:Ys(e);return function(r,o={}){let{equalityFn:i=Xk,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(),y=(0,ei.useRef)(!0),v=(0,ei.useCallback)({[r.name](m){return r(m)}}[r.name],[r,p,s]),h=nx(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,ei.useDebugValue)(h),h}}var A=ox();function vn(){return vn=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},vn.apply(this,arguments)}function Zs(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 Bm=S(gx()),Z=S(O()),Tx=S(Sx());var dP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function pP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function y(f,x){return l=f,u=x,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 h(){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),x=!s(f,c);return c=f,x&&(d=n(c,p,u)),d}function g(f,x){let _=!i(x,u),C=!o(f,l,x,u);return l=f,u=x,_&&C?v():_?h():C?m():d}return function(x,_){return a?g(x,_):y(x,_)}}function Fm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Zs(t,dP),s=n(e,i),a=r(e,i),l=o(e,i);return pP(s,a,l,e,i)}function jm(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 Js(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function xx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function ac(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=xx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=xx(u),u=i(a,l)),u},i}}function ti(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function _x(e){return e&&typeof e=="object"?Js(t=>jm(e,t)):e?typeof e=="function"?ac(e,"mapDispatchToProps"):ti(e,"mapDispatchToProps"):Js(t=>({dispatch:t}))}function wx(e){return e?typeof e=="function"?ac(e,"mapStateToProps"):ti(e,"mapStateToProps"):Js(()=>({}))}function fP(e,t,n){return vn({},n,e,t)}function mP(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 Ex(e){return e?typeof e=="function"?mP(e):ti(e,"mergeProps"):()=>fP}function gP(){let e=Z0(),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 Cx={notify(){},get:()=>[]};function lc(e,t){let n,r=Cx;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=gP())}function u(){n&&(n(),n=void 0,r.clear(),r=Cx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var uc=S(O()),hP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ni=hP?uc.useLayoutEffect:uc.useEffect;function bx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ri(e,t){if(bx(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])||!bx(e[n[o]],t[n[o]]))return!1;return!0}var yP=["reactReduxForwardedRef"],kx=Hu,Px=e=>{kx=e};var vP=[null,null];function SP(e,t,n){ni(()=>e(...t),n)}function xP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function _P(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,y=()=>{if(p||!a.current)return;let h=t.getState(),m,g;try{m=r(h,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=y,n.trySubscribe(),y(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function wP(e,t){return e===t}function EP(e,t,n,{pure:r,areStatesEqual:o=wP,areOwnPropsEqual:i=ri,areStatePropsEqual:s=ri,areMergedPropsEqual:a=ri,forwardRef:l=!1,context:u=De}={}){let c=u,p=wx(e),d=_x(t),y=Ex(n),v=!!e;return m=>{let g=m.displayName||m.name||"Component",f=`Connect(${g})`,x={shouldHandleStateChanges:v,displayName:f,wrappedComponentName:g,WrappedComponent:m,initMapStateToProps:p,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,Ir=Zs(b,yP);return[b.context,dt,Ir]},[b]),K=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Tx.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),H=(0,Z.useContext)(K),je=!!b.store&&!!b.store.getState&&!!b.store.dispatch,an=!!H&&!!H.store,$t=je?b.store:H.store,uo=an?H.getServerState:$t.getState,Fi=(0,Z.useMemo)(()=>Fm($t.dispatch,x),[$t]),[Pr,Ha]=(0,Z.useMemo)(()=>{if(!v)return vP;let dt=lc($t,je?void 0:H.subscription),Ir=dt.notifyNestedSubs.bind(dt);return[dt,Ir]},[$t,je,H]),Ua=(0,Z.useMemo)(()=>je?H:vn({},H,{subscription:Pr}),[je,H,Pr]),ji=(0,Z.useRef)(),Bi=(0,Z.useRef)(N),ln=(0,Z.useRef)(),Hi=(0,Z.useRef)(!1),Rr=(0,Z.useRef)(!1),I=(0,Z.useRef)(!1),$=(0,Z.useRef)();ni(()=>(I.current=!0,()=>{I.current=!1}),[]);let Lt=(0,Z.useMemo)(()=>()=>ln.current&&N===Bi.current?ln.current:Fi($t.getState(),N),[$t,N]),Bn=(0,Z.useMemo)(()=>Ir=>Pr?_P(v,$t,Pr,Fi,Bi,ji,Hi,I,ln,Ha,Ir):()=>{},[Pr]);SP(xP,[Bi,ji,Hi,N,ln,Ha]);let un;try{un=kx(Bn,Lt,uo?()=>Fi(uo(),N):Lt)}catch(dt){throw $.current&&(dt.message+=`
|
|
12
12
|
The error may be correlated with this previous error:
|
|
13
13
|
${$.current.stack}
|
|
14
14
|
|
|
15
|
-
`),dt}ni(()=>{$.current=void 0,ln.current=void 0,ji.current=un});let Ui=(0,Z.useMemo)(()=>Z.default.createElement(m,vn({},un,{ref:P})),[P,m,un]);return(0,Z.useMemo)(()=>v?Z.default.createElement(K.Provider,{value:Ua},Ui):Ui,[K,Ui,Ua])}let w=Z.default.memo(_);if(w.WrappedComponent=m,w.displayName=_.displayName=f,l){let R=Z.default.forwardRef(function(N,K){return Z.default.createElement(w,vn({},N,{reactReduxForwardedRef:K}))});return R.displayName=f,R.WrappedComponent=m,(0,Hm.default)(R,m)}return(0,Hm.default)(w,m)}}var Yr=EP;var ea=S(O());function CP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,ea.useMemo)(()=>{let u=lc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,ea.useMemo)(()=>e.getState(),[e]);ni(()=>{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||De;return ea.default.createElement(l.Provider,{value:s},n)}var Bm=CP;function cc(e=De){let t=e===De?Hu:Ys(e);return function(){let{store:r}=t();return r}}var Um=cc();function Rx(e=De){let t=e===De?Um:cc(e);return function(){return t().dispatch}}var W=Rx();rx(Lx.useSyncExternalStoreWithSelector);Px(Ix.useSyncExternalStore);Y0(Rm.unstable_batchedUpdates);var ta=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ta||{});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"},Ax=H({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:na}=Ax.actions,zm=e=>t=>t.settings[e],F=e=>A(zm(e)),Ox=Ax.reducer;var Cw=S(O());function Sn(){}Sn.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 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 y(){for(var h=-1*u;h<=u;h+=2){var m=void 0,g=p[h-1],f=p[h+1],x=(f?f.newPos:0)-h;g&&(p[h-1]=void 0);var _=g&&g.newPos+1<a,C=f&&0<=x&&x<l;if(!_&&!C){p[h]=void 0;continue}if(!_||C&&g.newPos<f.newPos?(m=kP(f),i.pushComponent(m.components,void 0,!0)):(m=g,m.newPos++,i.pushComponent(m.components,!0,void 0)),x=i.extractCommon(m,n,t,h),m.newPos+1>=a&&x+1>=l)return s(TP(i,m.components,n,t,i.useLongestToken));p[h]=m}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 TP(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(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 kP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var PP=new Sn;function Dx(e,t,n){return PP.diff(e,t,n)}var Nx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Mx=/\S/,Fx=new Sn;Fx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Mx.test(e)&&!Mx.test(t)};Fx.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]&&Nx.test(t[n])&&Nx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var jx=new Sn;jx.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 RP=new Sn;RP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var IP=new Sn;IP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function dc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dc=function(t){return typeof t}:dc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}var LP=Object.prototype.toString,ra=new Sn;ra.useLongestToken=!0;ra.tokenize=jx.tokenize;ra.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(Km(e,null,null,o),o," ")};ra.equals=function(e,t){return Sn.prototype.equals.call(ra,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Km(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(LP.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]=Km(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),dc(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]=Km(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Vm=new Sn;Vm.tokenize=function(e){return e.slice()};Vm.join=Vm.removeEmpty=function(e){return e};function Hx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function oi(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)=>oi(i,t[s],n-1)):Hx(e)&&Hx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>oi(e[s],t[s],n-1)):!1}function AP(e){return Math.max(...e.map(t=>t.length))}function OP(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 Bx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<AP(r);o++){let i=OP(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 NP=2;function Wm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Bx(e,NP);return n&&n.text!==t?n:e[0]}var Ux={current:null,isSupported:null},J=pe("resetConversation"),pc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},fc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},mc=e=>e.conversation.isSupported,$m=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),gc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),hc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),yc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=fc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),qm=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})})}),vc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=fc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),MP=[gc.rejected,hc.rejected,yc.rejected,vc.rejected].map(e=>e==null?void 0:e.toString()),DP=H({name:"conversation",initialState:Ux,reducers:{},extraReducers:e=>{e.addCase($m.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(gc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(hc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(qm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(yc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(vc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Ux).addMatcher(t=>MP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),zx=DP.reducer;var fr={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 xc(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 _c=pe("input/replaceText"),wc=pe("input/keyDown"),Zr=pe("input/sendMessage"),Ec=pe("input/sendEditSuggestionMessage"),Cc=pe("input/uiInputChange"),bc=pe("input/applyImageSuggestion"),it=pe("input/sendEvent");function Sc(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 Kx=e=>H({name:e,initialState:fr,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,{...fr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Wm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(oi(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&Sc(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:y,altKey:v}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:h}=t,{text:m}=n.payload,g=Dx(h,m);h.length-m.length>1&&t.metrics.deletions.push(...g.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=h.length-m.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=fr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&Sc(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"&&Sc(t)},commitSuggestion(t){Sc(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=Wm(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=fr.tabCompletionSuggestion,n.previousKeyDownEvent=fr.previousKeyDownEvent,n.textSuggestions=fr.textSuggestions,n.selectedSuggestionIndex=fr.selectedSuggestionIndex,n.metrics=fr.metrics})}}),Gm=Kx("input"),ii=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),FP=e=>e.input.selection,Vx=()=>A(FP),{userInput:Wx,changeSelection:Xm,initialInput:$x,mergeMetrics:qx,nextTextSuggestionIndex:Gx,offeredTextSuggestion:Xx,previousTextSuggestionIndex:Qx,registerCut:Yx,registerKeyDown:Zx,registerPaste:Jx,reset:e_,resetToCommitted:oa,platformInput:t_,setSelectedTextSuggestionIndex:Tc,setTextSuggestions:mr,stageSuggestion:jt,commitSuggestion:gr}=Gm.actions,Ge=Kx("overlay");var si=S(O());var n_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var Qm=S(E()),jP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,si.useRef)(null),l=(0,si.useRef)(null),u=k("Dialog",n_);return(0,si.useEffect)(()=>{var d,y;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},p=v=>{let h=window.getSelection();h!=null&&h.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(y=a.current)==null||y.addEventListener("keyup",c),()=>{var v,h;(v=a.current)==null||v.removeEventListener("click",p),(h=a.current)==null||h.removeEventListener("keyup",c)}},[a,l,o,r]),(0,si.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,Qm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,Qm.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},ai=jP;var _g=S(O());var Ym={};Ce(Ym,{enUS:()=>HP,nlNL:()=>BP});var HP={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?"}]},BP={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 r_={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 ia=S(E()),kc=()=>(0,ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,ia.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,ia.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 sa=S(E()),o_=()=>(0,sa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,sa.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,sa.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=S(O());var Pc=S(O());function aa(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,Jm=2,eg=4,Se=8,Rc=16,la=32,Ht=64,Zm={a:{content:G|Se,self:!1,type:G|Se|la|Ht},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:G|Se,void:!0},body:{content:G|Jm|eg|Se|Rc|la|Ht},button:{content:Se,type:G|Se|la|Ht},caption:{content:G,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:G|la|Ht},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|Se|Rc},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: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|Se,void:!0}};function eo(e){return t=>{Zm[t]={...e,...Zm[t]}}}["address","main","div","figure","p","pre"].forEach(eo({content:G,type:G|Ht}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(eo({content:Se,type:G|Se|Ht}));["p","pre"].forEach(eo({content:Se,type:G|Ht}));["s","small","span","del","ins"].forEach(eo({content:Se,type:G|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(eo({content:G,type:G|Jm|Ht}));["h1","h2","h3","h4","h5","h6"].forEach(eo({content:Se,type:G|eg|Ht}));["audio","canvas","iframe","img","video"].forEach(eo({type:G|Se|Rc|Ht}));var ca=Object.freeze(Zm),tg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ng=Object.keys(ca).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,rg=2,Jr=3,hr=4,Lc=5,Ac=Object.freeze({alt:ee,cite:ee,class:ee,colspan:Jr,controls:hr,datetime:ee,default:hr,disabled:hr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:hr,media:ee,muted:hr,poster:ee,rel:ee,role:ee,rowspan:Jr,scope:ee,sizes:ee,span:Jr,start:Jr,style:Lc,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 Ic(){return Ic=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},Ic.apply(this,arguments)}function Oc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Pc.default.createElement(i,Ic({className:t},e)):Pc.default.createElement(i,Ic({className:t},e),n)}var ua=class{attribute(t,n){return n}node(t,n){return n}};function i_(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 Bt=class{constructor(t,n,r){aa(this,"greedy",!1),aa(this,"options",void 0),aa(this,"propName",void 0),aa(this,"inverseName",void 0),aa(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?Pc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return i_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var to=S(O()),u_=S(a_());function xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var KP=/(url|image|image-set)\(/i,ig=class extends ua{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(KP)&&delete n[r]}),n}},l_=1,VP=3,WP=/^<(!doctype|(html|head|body)(\s|>))/i,$P=/^(aria-|data-|\w+:)/iu,qP=/{{{(\w+)\/?}}}/;function GP(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Nc=class{constructor(t,n={},r=[],o=[]){var i;xn(this,"allowed",void 0),xn(this,"banned",void 0),xn(this,"blocked",void 0),xn(this,"container",void 0),xn(this,"content",[]),xn(this,"props",void 0),xn(this,"matchers",void 0),xn(this,"filters",void 0),xn(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 p="";for(;i&&(a=l.match(i));){let{index:d,length:y,match:v,valid:h,void:m,...g}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),h?(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+y),p=""):i=i.slice(d+(y||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,`
|
|
15
|
+
`),dt}ni(()=>{$.current=void 0,ln.current=void 0,ji.current=un});let Ui=(0,Z.useMemo)(()=>Z.default.createElement(m,vn({},un,{ref:P})),[P,m,un]);return(0,Z.useMemo)(()=>v?Z.default.createElement(K.Provider,{value:Ua},Ui):Ui,[K,Ui,Ua])}let w=Z.default.memo(_);if(w.WrappedComponent=m,w.displayName=_.displayName=f,l){let R=Z.default.forwardRef(function(N,K){return Z.default.createElement(w,vn({},N,{reactReduxForwardedRef:K}))});return R.displayName=f,R.WrappedComponent=m,(0,Bm.default)(R,m)}return(0,Bm.default)(w,m)}}var Yr=EP;var ea=S(O());function CP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,ea.useMemo)(()=>{let u=lc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,ea.useMemo)(()=>e.getState(),[e]);ni(()=>{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||De;return ea.default.createElement(l.Provider,{value:s},n)}var Hm=CP;function cc(e=De){let t=e===De?Bu:Ys(e);return function(){let{store:r}=t();return r}}var Um=cc();function Rx(e=De){let t=e===De?Um:cc(e);return function(){return t().dispatch}}var W=Rx();rx(Lx.useSyncExternalStoreWithSelector);Px(Ix.useSyncExternalStore);Y0(Rm.unstable_batchedUpdates);var ta=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ta||{});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"},Ax=B({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:na}=Ax.actions,zm=e=>t=>t.settings[e],F=e=>A(zm(e)),Ox=Ax.reducer;var Cw=S(O());function Sn(){}Sn.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 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 y(){for(var h=-1*u;h<=u;h+=2){var m=void 0,g=p[h-1],f=p[h+1],x=(f?f.newPos:0)-h;g&&(p[h-1]=void 0);var _=g&&g.newPos+1<a,C=f&&0<=x&&x<l;if(!_&&!C){p[h]=void 0;continue}if(!_||C&&g.newPos<f.newPos?(m=kP(f),i.pushComponent(m.components,void 0,!0)):(m=g,m.newPos++,i.pushComponent(m.components,!0,void 0)),x=i.extractCommon(m,n,t,h),m.newPos+1>=a&&x+1>=l)return s(TP(i,m.components,n,t,i.useLongestToken));p[h]=m}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 TP(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(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 kP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var PP=new Sn;function Dx(e,t,n){return PP.diff(e,t,n)}var Nx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Mx=/\S/,Fx=new Sn;Fx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Mx.test(e)&&!Mx.test(t)};Fx.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]&&Nx.test(t[n])&&Nx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var jx=new Sn;jx.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 RP=new Sn;RP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var IP=new Sn;IP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function dc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dc=function(t){return typeof t}:dc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}var LP=Object.prototype.toString,ra=new Sn;ra.useLongestToken=!0;ra.tokenize=jx.tokenize;ra.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(Km(e,null,null,o),o," ")};ra.equals=function(e,t){return Sn.prototype.equals.call(ra,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Km(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(LP.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]=Km(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),dc(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]=Km(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Vm=new Sn;Vm.tokenize=function(e){return e.slice()};Vm.join=Vm.removeEmpty=function(e){return e};function Bx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function oi(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)=>oi(i,t[s],n-1)):Bx(e)&&Bx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>oi(e[s],t[s],n-1)):!1}function AP(e){return Math.max(...e.map(t=>t.length))}function OP(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 Hx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<AP(r);o++){let i=OP(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 NP=2;function Wm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Hx(e,NP);return n&&n.text!==t?n:e[0]}var Ux={current:null,isSupported:null},J=pe("resetConversation"),pc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},fc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},mc=e=>e.conversation.isSupported,$m=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),gc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),hc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),yc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=fc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),qm=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})})}),vc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=fc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),MP=[gc.rejected,hc.rejected,yc.rejected,vc.rejected].map(e=>e==null?void 0:e.toString()),DP=B({name:"conversation",initialState:Ux,reducers:{},extraReducers:e=>{e.addCase($m.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(gc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(hc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(qm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(yc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(vc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Ux).addMatcher(t=>MP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),zx=DP.reducer;var fr={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 xc(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 _c=pe("input/replaceText"),wc=pe("input/keyDown"),Zr=pe("input/sendMessage"),Ec=pe("input/sendEditSuggestionMessage"),Cc=pe("input/uiInputChange"),bc=pe("input/applyImageSuggestion"),it=pe("input/sendEvent");function Sc(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 Kx=e=>B({name:e,initialState:fr,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,{...fr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Wm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(oi(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&Sc(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:y,altKey:v}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:h}=t,{text:m}=n.payload,g=Dx(h,m);h.length-m.length>1&&t.metrics.deletions.push(...g.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=h.length-m.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=fr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&Sc(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"&&Sc(t)},commitSuggestion(t){Sc(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=Wm(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=fr.tabCompletionSuggestion,n.previousKeyDownEvent=fr.previousKeyDownEvent,n.textSuggestions=fr.textSuggestions,n.selectedSuggestionIndex=fr.selectedSuggestionIndex,n.metrics=fr.metrics})}}),Gm=Kx("input"),ii=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),FP=e=>e.input.selection,Vx=()=>A(FP),{userInput:Wx,changeSelection:Xm,initialInput:$x,mergeMetrics:qx,nextTextSuggestionIndex:Gx,offeredTextSuggestion:Xx,previousTextSuggestionIndex:Qx,registerCut:Yx,registerKeyDown:Zx,registerPaste:Jx,reset:e_,resetToCommitted:oa,platformInput:t_,setSelectedTextSuggestionIndex:Tc,setTextSuggestions:mr,stageSuggestion:jt,commitSuggestion:gr}=Gm.actions,Ge=Kx("overlay");var si=S(O());var n_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var Qm=S(E()),jP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,si.useRef)(null),l=(0,si.useRef)(null),u=k("Dialog",n_);return(0,si.useEffect)(()=>{var d,y;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},p=v=>{let h=window.getSelection();h!=null&&h.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(y=a.current)==null||y.addEventListener("keyup",c),()=>{var v,h;(v=a.current)==null||v.removeEventListener("click",p),(h=a.current)==null||h.removeEventListener("keyup",c)}},[a,l,o,r]),(0,si.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,Qm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,Qm.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},ai=jP;var _g=S(O());var Ym={};Ce(Ym,{enUS:()=>BP,nlNL:()=>HP});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?"}]},HP={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 r_={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 ia=S(E()),kc=()=>(0,ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,ia.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,ia.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 sa=S(E()),o_=()=>(0,sa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,sa.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,sa.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=S(O());var Pc=S(O());function aa(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,Jm=2,eg=4,Se=8,Rc=16,la=32,Bt=64,Zm={a:{content:G|Se,self:!1,type:G|Se|la|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|Se,void:!0},body:{content:G|Jm|eg|Se|Rc|la|Bt},button:{content:Se,type:G|Se|la|Bt},caption:{content:G,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:G|la|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|Se|Rc},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: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|Se,void:!0}};function eo(e){return t=>{Zm[t]={...e,...Zm[t]}}}["address","main","div","figure","p","pre"].forEach(eo({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(eo({content:Se,type:G|Se|Bt}));["p","pre"].forEach(eo({content:Se,type:G|Bt}));["s","small","span","del","ins"].forEach(eo({content:Se,type:G|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(eo({content:G,type:G|Jm|Bt}));["h1","h2","h3","h4","h5","h6"].forEach(eo({content:Se,type:G|eg|Bt}));["audio","canvas","iframe","img","video"].forEach(eo({type:G|Se|Rc|Bt}));var ca=Object.freeze(Zm),tg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ng=Object.keys(ca).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,rg=2,Jr=3,hr=4,Lc=5,Ac=Object.freeze({alt:ee,cite:ee,class:ee,colspan:Jr,controls:hr,datetime:ee,default:hr,disabled:hr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:hr,media:ee,muted:hr,poster:ee,rel:ee,role:ee,rowspan:Jr,scope:ee,sizes:ee,span:Jr,start:Jr,style:Lc,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 Ic(){return Ic=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},Ic.apply(this,arguments)}function Oc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Pc.default.createElement(i,Ic({className:t},e)):Pc.default.createElement(i,Ic({className:t},e),n)}var ua=class{attribute(t,n){return n}node(t,n){return n}};function i_(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 Ht=class{constructor(t,n,r){aa(this,"greedy",!1),aa(this,"options",void 0),aa(this,"propName",void 0),aa(this,"inverseName",void 0),aa(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?Pc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return i_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var to=S(O()),u_=S(a_());function xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var KP=/(url|image|image-set)\(/i,ig=class extends ua{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(KP)&&delete n[r]}),n}},l_=1,VP=3,WP=/^<(!doctype|(html|head|body)(\s|>))/i,$P=/^(aria-|data-|\w+:)/iu,qP=/{{{(\w+)\/?}}}/;function GP(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Nc=class{constructor(t,n={},r=[],o=[]){var i;xn(this,"allowed",void 0),xn(this,"banned",void 0),xn(this,"blocked",void 0),xn(this,"container",void 0),xn(this,"content",[]),xn(this,"props",void 0),xn(this,"matchers",void 0),xn(this,"filters",void 0),xn(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 p="";for(;i&&(a=l.match(i));){let{index:d,length:y,match:v,valid:h,void:m,...g}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),h?(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+y),p=""):i=i.slice(d+(y||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||GP)();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(WP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,u_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==l_||!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($P)&&(!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===hr?c=!0:u===Jr?c=Number.parseFloat(String(c)):u!==Lc&&(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 ca[t]?{...n,...ca[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===l_){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 m=this.keyIndex;h=this.parseNode(v,y);let g=s(v,h,y);if(g===null)return;if(typeof g<"u"){l.push(to.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,y))){var p;this.keyIndex+=1;let m=this.extractAttributes(v),g={tagName:d};m&&(g.attributes=m),y.void&&(g.selfClose=y.void),l.push(to.default.createElement(Oc,{...g,key:this.keyIndex},(p=h)!==null&&p!==void 0?p: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(qP);){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],y;if(u)y=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));y=v.index+v[0].length,r.push(p.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 XP(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 y=new Nc(i??"",e).parse();y.length>0&&(d=y)}return d||(d=s),p?to.default.createElement(to.default.Fragment,null,d):to.default.createElement(Oc,{attributes:n,className:r,tagName:c},d)}function li(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,...y}=e,v=i?[]:l,h=o?[]:a,m=c?[c]:[],g=u?[u]:[];v.forEach(C=>{C.onBeforeParse&&m.push(C.onBeforeParse.bind(C)),C.onAfterParse&&g.push(C.onAfterParse.bind(C))});let f=m.reduce((C,w)=>w(C,e),r??""),x=new Nc(f,y,v,h),_=g.reduce((C,w)=>w(C,e),x.parse());return to.default.createElement(XP,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:p})}var fg=S(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 d_=S(X());var ui=S(O());function c_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Mc(e){let t=(0,ui.useRef)(null),[n,r]=(0,ui.useState)(!1);return(0,ui.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=c_((c,p)=>{let d=t.current;if(!d)return;let y=c/i,v=p/i,h=d.getBoundingClientRect(),m=y>h.x&&y<h.x+h.width&&v>h.y&&v<h.y+h.height;m&&!o?(o=!0,r(!0)):!m&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=c_(()=>{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 bt={root:"_root_1l8n5_1",container:"_container_1l8n5_4",agentText:"_agentText_1l8n5_7",tabText:"_tabText_1l8n5_8",hint:"_hint_1l8n5_8",matchSelection:"_matchSelection_1l8n5_12",focus:"_focus_1l8n5_18",resetIndent:"_resetIndent_1l8n5_22",matchKeyword:"_matchKeyword_1l8n5_26",matchPlaceholder:"_matchPlaceholder_1l8n5_27",hover:"_hover_1l8n5_33",hintText:"_hintText_1l8n5_66",popover:"_popover_1l8n5_74",popoverRoot:"_popoverRoot_1l8n5_79",popoverContentContainer:"_popoverContentContainer_1l8n5_83",popoverContent:"_popoverContent_1l8n5_83",selectionOptions:"_selectionOptions_1l8n5_109",selectionOptionsIsHidden:"_selectionOptionsIsHidden_1l8n5_114",selectionOptionsButton:"_selectionOptionsButton_1l8n5_118",caret:"_caret_1l8n5_134",popoverSuggestionsRoot:"_popoverSuggestionsRoot_1l8n5_138",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_1l8n5_143"};var ag=S(E()),QP=({inputElement:e,children:t})=>{let n=k("TabCompletion",bt),[r,o]=Mc(e);return(0,ag.jsx)("mark",{ref:r,className:(0,d_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},ci=class extends Bt{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)(QP,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var di=S(O());function Dc(e){return e.contentEditable==="true"}function YP(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 p_(e){let{selectionStart:t,selectionEnd:n}=Dc(e)?YP(e):e;return[t,n]}function Fc(e){let[,t]=(0,di.useState)(),n=(0,di.useRef)(null);return n.current=p_(e),(0,di.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=p_(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 jc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(ho);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 f_=S(O());function pi(e){(0,f_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function no(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var m_,nn=new Map,ZP=["bottom","height","left","right","top","width"],JP=(e={},t={})=>ZP.some(n=>e[n]!==t[n]),g_=()=>{let e=[];nn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),nn.delete(n);return}let r=n.getBoundingClientRect();JP(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),nn.size!==0&&(m_=window.requestAnimationFrame(g_))};function h_(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,callbacks:[t]});n&&g_()},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(m_)}}}}var y_,rn=new Map,v_=()=>{rn.forEach((e,t)=>{if(!t.isConnected){rn.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)))}),rn.size!==0&&(y_=window.requestAnimationFrame(v_))};function S_(e,t){return{observe(){let n=rn.size===0;rn.has(e)?rn.get(e).callbacks.push(t):rn.set(e,{visible:void 0,callbacks:[t]}),n&&v_()},unobserve(){let n=rn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||rn.delete(e),rn.size||cancelAnimationFrame(y_)}}}}var lg=["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 ug(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function fi(e){return parseFloat(e)}function Hc(e){return Math.round(e*1e6)}function x_(e){return e/1e6}function cg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=fi(e.width),i=fi(e.borderLeftWidth),s=fi(e.borderRightWidth),a=fi(e.paddingRight),l=x_(Hc(o)-Hc(i)-Hc(s)),u=x_(Hc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function mi(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position="fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",no(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};ug(r,n,lg),cg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=S_(e,()=>{ug(r,n,lg),cg(r,e,n),i(),setTimeout(i,0)}),a=h_(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(ug(r,n,lg),cg(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=fi(p.borderTopWidth),y=fi(p.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 dg={};Ce(dg,{enUS:()=>eR,nlNL:()=>tR});var eR={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"}]},tR={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 da=S(E()),__=()=>(0,da.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,da.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,da.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 pg=S(E()),w_=()=>(0,pg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,pg.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"})});var E_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(E_||{}),_n=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";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,rawHtml:n}),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t,rawHtml:n}),this.currentHTML=n))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange()}handleFocus(){this.isFocused||this.emit("focus"),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(E_).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){let n=(t.clipboardData||window.clipboardData).getData("text");this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),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",n=>this.handlePaste(n)),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()})}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 wn=class extends _n{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):""}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=()=>{var s,a;if(document.activeElement!==this.element)return;let i=this.getSelection();i.start===((s=this.lastKnownSelection)==null?void 0:s.start)&&i.end===((a=this.lastKnownSelection)==null?void 0:a.end)||(this.lastKnownSelection=i,this.emit("selection",i))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)});let n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var i;return(i=n==null?void 0:n.get)==null?void 0:i.call(this.element)},set:i=>{var s;(s=n==null?void 0:n.set)==null||s.call(this.element,i),this.triggerChange()}});let r=this.element.disabled,o=new MutationObserver(()=>{this.element.disabled!==r&&(r=this.element.disabled,this.emit(r?"disabled":"enabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>o.disconnect())}};var Xe=S(E()),nR=({value:e,onUse:t,...n})=>{var c;let r=j(dg),o=W(),i=k("EditSuggestionTextInput",sg),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(ho))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let p;return l.current&&(a(l.current),p=new wn(l.current),p.on("change",({plainText:d})=>{o(Ge.actions.userInput({text:d,selection:p.getSelection()}))}),p.on("keydown",d=>{o(Ge.actions.registerKeyDown(xc(d))),d.code==="Enter"&&d.shiftKey&&t(p.getText())}),p.on("paste",({pastedText:d,selectionText:y})=>{o(Ge.actions.registerPaste({text:d,selectionText:y}))}),p.on("cut",({selectionText:d})=>{o(Ge.actions.registerCut(d))})),()=>{o(Ge.actions.reset()),p.dispose(),p.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 p=l.current.value.length;l.current.setSelectionRange(p,p),l.current.focus()},0)},[l]),(0,Xe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Xe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Xe.jsx)(rR,{inputElement:l.current,value:e}),(0,Xe.jsxs)("div",{className:(0,fg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Xe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Xe.jsx)(__,{}):(0,Xe.jsx)(w_,{})]})]})},rR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",sg),r=(0,Tt.useRef)(null),o=Fc(e);return(0,Tt.useEffect)(()=>{jc(e,o)},[o,e]),(0,Xe.jsx)(oR,{inputElement:e,children:(0,Xe.jsxs)("div",{ref:r,className:(0,fg.default)(n.root,n.agentText),children:[(0,Xe.jsx)(li,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new ci("placeholders")],inputElement:e,boundaryRef:r}),(0,Xe.jsx)("br",{})]})})},oR=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=mi(e,{overlayContainer:n.current,mirrorOverflow:!0});return()=>{o()}},[n.current]),(0,Xe.jsx)("div",{ref:n,children:t})},C_=nR;var yi=S(O());var b_=S(O()),Bc=S(X());var Qe={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 ro={};Ce(ro,{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 yr=S(E()),aR=({src:e,title:t})=>{let n=k("CommandPalette",Qe),[r,o]=(0,b_.useState)("loading"),i=j(ro);return(0,yr.jsxs)("div",{className:n.image,children:[(0,yr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Bc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,yr.jsx)("span",{className:(0,Bc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,yr.jsx)("span",{className:(0,Bc.default)(n.imageSrc,n.imageSrcStatus),children:(0,yr.jsx)(Ga,{})}),t&&(0,yr.jsx)("span",{className:n.imageTitle,children:t})]})},T_=aR;var k_=S(O()),P_=S(X());var pa=S(E());function mg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Qe);return k_.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,P_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var fa=S(X());var Uc=S(O()),L_=S(E()),R_=Uc.default.createContext(void 0);function vr(){let e=Uc.default.useContext(R_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var I_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Uc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,L_.jsx)(R_.Provider,{value:s,children:e})};var kt=S(E());function gg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:p,onChangeOpen:d}=vr(),y=k("CommandPalette",Qe);function v(h){r(h),e&&d(!1)}return(0,kt.jsxs)("div",{className:(0,fa.default)(y.listItem,p===i&&y.listItemSelected),children:[(0,kt.jsxs)("button",{type:"button",className:(0,fa.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,...c,children:[(0,kt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,kt.jsx)("p",{className:(0,fa.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,kt.jsx)("p",{className:(0,fa.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate),children:a})]}),s&&(0,kt.jsx)(pl,{})]}),l&&(0,kt.jsxs)("div",{className:y.sources,children:[(0,kt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(h=>h.url?(0,kt.jsx)("a",{className:y.source,href:h.url,target:"_blank",title:h.url,rel:"noopener noreferrer",onClick:()=>o&&o(h),children:h.name},h.url):(0,kt.jsx)("span",{className:y.source,children:h.name},h.name))]})]})}var Sr=S(E());function hg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(ro),s=k("CommandPalette",Qe),{page:a}=vr();return a!==n?null:(0,Sr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Sr.jsxs)("div",{className:s.pageNav,children:[(0,Sr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,Sr.jsx)(kc,{}),i("back")]}),t&&(0,Sr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,Sr.jsx)(pl,{})]}),e]})}var xr=S(O());var zc=()=>/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 yg(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,[yg(n)]:we(e[n])}),{}):e}var cR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},ga=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)||""}},ma=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))}),vg=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}),Sg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),A_=e=>e.info.agentInfo,O_=H({name:"info",initialState:cR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ma.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ma.rejected,t=>{t.fetchState="error"}).addCase(ma.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(vg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Sg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:N_}=O_.actions,M_=O_.reducer;var Kc={list:[],fetchState:"idle",isOpen:!1,page:"search"},D_=e=>e.search.isOpen,F_=e=>e.search.page,j_=e=>e.search.list;function H_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var oo=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:ga(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),B_=H({name:"search",initialState:Kc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Kc.fetchState,e.list=Kc.list}},extraReducers:e=>{e.addCase(oo.pending,t=>{t.fetchState="loading"}).addCase(oo.rejected,(t,n)=>{t.fetchState="error",U.error(n.error)}).addCase(oo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>Kc)}}),{resetSearch:Vc,setIsOpen:st,setPage:Ue}=B_.actions,U_=B_.reducer;var dR=/(https?:\/\/[^\s]+)/,Wc=e=>e.split(" ").find(t=>dR.test(t));var xg=S(X());var $c=S(E()),pR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Qe);return(0,$c.jsxs)("button",{type:"button",...r,onClick:e,className:(0,xg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,$c.jsx)("span",{className:(0,xg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},gi=pR;var En=S(E()),fR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Qe),a=j(ro),{selected:l,setSelected:u}=vr(),c=i[l],p=c&&typeof c.text=="string"&&Wc(c.text),d=(0,xr.useRef)(null);function y(x){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,w=0;x==="down"?(_.forEach((R,P)=>{P===l&&(C=P)}),w=C===_.length-1?0:C+1):x==="up"?(_.forEach((R,P)=>{P===l&&(C=P)}),w=C?C-1:_.length-1):u(0);let b=_[w];b&&typeof w=="number"&&(u(w),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:w?"center":"end"}))}function v(){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),_=0;x.forEach((w,b)=>{b===l&&(_=b)});let C=x[_];C&&C.click()}let h=()=>{p&&window.open(p,"_blank")},m=()=>{c&&r(c,l)},g=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,xr.useCallback)(x=>{if(x.key==="Enter"&&x.altKey&&p){h();return}if(x.key==="Enter"&&x.shiftKey){g();return}if(x.key==="ArrowDown"){x.preventDefault(),x.stopPropagation(),y("down");return}if(x.key==="ArrowUp"){x.preventDefault(),x.stopPropagation(),y("up");return}x.key==="Enter"&&l!==-1&&(x.preventDefault(),x.stopPropagation(),v())},[l]);return(0,xr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,En.jsxs)("div",{className:s.actions,children:[(0,En.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,En.jsxs)("div",{className:s.actionsBar,children:[p&&(0,En.jsx)(gi,{onClick:h,shortKeys:[zc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,En.jsxs)(xr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,En.jsx)(gi,{onClick:g,shortKeys:[8679,8629],children:n}),(0,En.jsx)(gi,{onClick:m,shortKeys:[8629],children:t})]})]})]})},K_=fR;var V_=S(O());var ha=S(E()),hi=()=>(0,ha.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,ha.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,ha.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 Ut=S(E());function mR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Qe);return(0,Ut.jsxs)("div",{className:l.search,children:[(0,Ut.jsx)("div",{className:l.searchIcon,children:(0,Ut.jsx)(hi,{})}),(0,Ut.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ut.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,Ut.jsx)("div",{className:l.selectWrapper,children:(0,Ut.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,Ut.jsx)("option",{children:r}),o.map(u=>(0,Ut.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var W_=(0,V_.forwardRef)(mR);var ya=S(E());function io({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[y,v]=(0,yi.useState)(0),h=(0,yi.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=h.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,yi.useEffect)(()=>{v(0)},[d,r]),(0,ya.jsx)(ai,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:g,onClose:m,children:(0,ya.jsxs)(I_,{selected:y,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,ya.jsx)(W_,{ref:h,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}io.Page=hg;io.List=mg;io.Image=T_;io.ListItem=gg;io.ActionsBar=K_;io.Button=gi;var te=io;var Fe=S(E()),gR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",r_),l=W(),u=j(Ym),c=A(v=>v.overlayInput.text);(0,_g.useEffect)(()=>{e&&(l(Ge.actions.reset()),l(Ge.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Ge.actions.commitSuggestion()))},[e]);let p=v=>{v.preventDefault(),d(c)},d=v=>{l(Ec(v)),t(v)},y=v=>h=>{c!==s?window.confirm(u("warning"))&&v(h):v(h)};return(0,_g.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)(Kd,{labels:e.searchKeywords}),(0,Fe.jsx)(C_,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:p,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)(kc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&y(o),children:(0,Fe.jsx)(o_,{})})]}),(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")})]})]})]})},qc=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 $_(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 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 q_(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var X_={suggestions:[],fetchState:"idle",isInitialRequest:null},G_={default:X_},Q_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},Y_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Z_=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")},vi=e=>e.textSuggestions,J_=e=>t=>t.text.startsWith(e),Gc=pe("textSuggestions/refresh"),Cn=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=ii(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,ga(r),e);if(e==="default"){let c=s?l.filter(J_(a)):l;t.dispatch(mr(c.slice(0,i)))}return l}),va=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,{...ga(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(J_(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?$_(c.text,e):c.text}))),l=q_(l,i),t.dispatch(mr(l)),l}),ew=H({name:"textSuggestions",initialState:G_,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(Cn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||X_;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Cn.rejected,(t,n)=>{let r=n.meta.arg;t[r].fetchState="error"}).addCase(Cn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r].fetchState="done",t[r].suggestions=n.payload}).addCase(va.pending,t=>{t.default.fetchState="loading"}).addCase(va.rejected,t=>{t.default.fetchState="error"}).addCase(va.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>G_)}}),{setTextSuggestions:tw,setSuggestionState:nw}=ew.actions,rw=ew.reducer;var ow={contentType:null,suggestion:null},iw=e=>e.activeSuggestion.suggestion,sw=e=>e.activeSuggestion.contentType,aw=H({name:"activeSuggestion",initialState:ow,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,()=>ow)}}),{setActiveSuggestion:bn,resetActiveSuggestion:wg}=aw.actions,lw=aw.reducer;var Eg={};Ce(Eg,{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 uw=({ui:e})=>e.overlayCollapsed;var cw=H({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:Sa,setInputHasFocus:Si,setOverlayCollapsed:xi,setOpenOverlayWhenTyping:dw,setOverlayCollapsedUserOverwrite:pw}=cw.actions,fw=cw.reducer;var xa=S(O()),gw=S(E()),mw=xa.default.createContext(null),_a=({broadcastEvents:e,children:t})=>{let n=xa.default.useMemo(()=>e,[]);return(0,gw.jsx)(mw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,xa.useContext)(mw);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},Tn=e=>e.auth.isLoggedIn,hw=e=>e.auth.loginFetchState,yw=e=>e.auth.verifyFetchState,vw=e=>e.auth.showLoginOverlay,_r=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Sw=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)}),xw=H({name:"auth",initialState:_R,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(_r.pending,t=>{t.loginFetchState="loading"}),e.addCase(_r.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(_r.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:_i,setShowLoginOverlay:_w}=xw.actions,ww=xw.reducer;var Cg="SetActiveSuggestion",wi="ShowLoginOverlay",bg="UserLoggedIn",wR="UserLoggedOut",kn="ApplySuggestion",Tg="ApplyImageSuggestion",ER="ShowCommandPalette",CR=e=>({[Cg]:t=>{e.dispatch(nw(t.state)),e.dispatch(bn({contentType:t.contentType,suggestion:t.suggestion}))},[ER]:t=>{e.dispatch(st(t.isOpen)),t.page&&e.dispatch(Ue(t.page))},[wi]:t=>{e.dispatch(_w(t))},[bg]:()=>{e.dispatch(_r())},[wR]:()=>{e.dispatch(_r())},[Tg]:t=>{e.dispatch(bc({suggestion:t.suggestion}))},[kn]:t=>{e.dispatch(jt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(gr())}}),Ew=CR;var kg=S(E()),bR=()=>{var v;let[e,t]=(0,Cw.useState)(!1),n=A(iw),r=A(sw),o=A(vi),i=W(),s=Pt(),a=j(Eg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(wg()),i(Si(!0)),i(Ge.actions.reset())},c=(h,m)=>{i(wg()),i(Si(!0)),s.send(kn,{text:h,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(bn({contentType:r,suggestion:o[r].suggestions[p-1]})),y=p===o[r].suggestions.length-1||p===null?void 0:()=>i(bn({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,kg.jsx)(ai,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,kg.jsx)(qc,{onTouched:t,onDismiss:u,onUse:h=>c(h,n),suggestion:n,onNext:y,onPrevious:d})})},bw=bR;var Xc=S(X()),zt=S(O());var kw=S(X());var Tw={root:"_root_1ukx5_1"};var Pw=S(E()),TR=({className:e,value:t,...n})=>{let r=k("TextInput",Tw);return(0,Pw.jsx)("input",{className:(0,kw.default)(e,r.root),type:"text",value:t,...n})},Ea=TR;var Pg={};Ce(Pg,{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 Rw={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=S(E());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=j(Pg),s=k("LoginTokenDialog",Rw),a=A(yw),l=W(),u=F("productName"),[c,p]=(0,zt.useState)(e||""),[d,y]=(0,zt.useState)(0),[v,h]=(0,zt.useState)(""),m=(0,zt.useCallback)(async _=>{_.preventDefault(),l(Sw({email:c})),y(1)},[n,c]),g=()=>{h(""),y(0)},f=(0,zt.useCallback)(async _=>{_.preventDefault();let C=RR(_.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:x}));return}l(wa({token:C}))},[n]),x=(0,zt.useMemo)(()=>_=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:g,children:_},"back-button"),[]);return(0,zt.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:x})),a==="done"&&r()},[a]),(0,he.jsx)(ai,{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:m,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:_=>p(_.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:f,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:g,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")})]})]})]})})},Iw=IR;var Aw=S(E()),LR=()=>{let e=A(vw),t=A(A_),n=F("adminUrl"),r=Pt(),o=()=>r.send(wi,!1),i=()=>{r.send(wi,!1),r.send(bg)};return(0,Aw.jsx)(Iw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Lw=LR;var o1=S(Lg()),Ze=S(O());var XR={data:null,fetchState:"idle"},Dw=e=>e.contentTypes.data,Ca=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),QR=H({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})}}),Fw=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 jw=S(O());function Hw(e,t){(0,jw.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=S(O());var Bw={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},Kt=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=H({name:"entities",initialState:Bw,reducers:{},extraReducers:e=>{e.addCase(Kt.pending,t=>{t.fetchState="loading"}).addCase(Kt.rejected,t=>{t.fetchState="error"}).addCase(Kt.fulfilled,(t,n)=>{t.fetchState="done",t.data=YR(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Bw)}}),Uw=ZR.reducer;var Ag={};Ce(Ag,{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 zw={root:"_root_17kae_1",empty:"_empty_17kae_5"};var so=S(E()),tI=({onCopy:e,onUse:t})=>{let n=(0,Ta.useRef)(null),r=k("EntitiesList",zw),o=j(Ag),i=A(Qc),s=W();return(0,Ta.useEffect)(()=>{s(Kt())},[]),(0,Ta.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,so.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,so.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,so.jsx)(te.List,{children:i.map((a,l)=>(0,so.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,so.jsx)("p",{className:r.empty,children:o("noResults")})]})},Kw=tI;var Vt=S(O());var Vw={data:null,fetchState:"idle"},Ww=e=>e.summary.data,$w=e=>e.summary.fetchState==="error",Pn=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();if(s.length===0)return Promise.reject(new Error("No messages are included"));let a=await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return{original:s,summary:a}}),nI=H({name:"summary",initialState:Vw,reducers:{},extraReducers:e=>{e.addCase(Pn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Pn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Pn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>Vw)}}),qw=nI.reducer;var Og={};Ce(Og,{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 Gw={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 Rn=S(E()),iI=({onCopy:e})=>{let t=(0,Vt.useRef)(null),n=k("SummaryForm",Gw),[r,o]=(0,Vt.useState)(""),i=j(Og),s=A(Ww),a=A($w),l=W(),u=()=>{l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Vt.useEffect)(()=>{l(Pn())},[]),(0,Vt.useEffect)(()=>{o(s||"")},[s]),(0,Vt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Vt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,Rn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Rn.jsx)("p",{className:n.error,children:i("error")}):(0,Rn.jsxs)(Vt.Fragment,{children:[(0,Rn.jsx)("div",{className:n.main,children:(0,Rn.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,Rn.jsx)("div",{className:n.actions,children:(0,Rn.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},Xw=iI;var Ng={};Ce(Ng,{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:"Vat gesprek samen"}],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 wr=S(O());var Mg={};Ce(Mg,{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 Qw={root:"_root_cnaw4_1",title:"_title_cnaw4_9",empty:"_empty_cnaw4_20",status:"_status_cnaw4_24",form:"_form_cnaw4_30",input:"_input_cnaw4_43",submit:"_submit_cnaw4_55",question:"_question_cnaw4_63",answer:"_answer_cnaw4_67",alignRight:"_alignRight_cnaw4_73"};var Dg={data:[],fetchState:"idle"},Yw=e=>{var t;return(t=e.answer)==null?void 0:t.data},Zw=e=>e.answer.fetchState,Ci=pe("answer/resetKnowledgeSearch"),Ei=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=H({name:"answer",initialState:Dg,reducers:{},extraReducers:e=>{e.addCase(Ei.pending,t=>{t.fetchState="loading"}).addCase(Ei.rejected,t=>{t.fetchState="error"}).addCase(Ei.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Dg).addCase(Ci,()=>Dg)}}),Jw=cI.reducer;var ka=S(E()),e1=()=>(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 Ye=S(E()),dI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=wr.default.useState(""),{setSelected:s}=vr(),a=(0,wr.useRef)(null),l=k("EntitiesList",Qw),u=j(Mg),c=W(),p=A(Yw),d=A(Zw),y=async h=>{h.preventDefault(),h.stopPropagation(),o!==""&&c(Ei({question:o,promptInstruction:r}))},v=(h,m)=>{c(it({name:"knowledge assist source viewed",data:{question:m,sourceViewed:h.url||h.name},options:{includeConversationData:!0}}))};return(0,wr.useEffect)(()=>{var h;n&&d==="idle"?c(Ei({question:n,promptInstruction:r})):(h=a.current)==null||h.focus()},[a,d]),(0,wr.useEffect)(()=>{d==="done"&&(c(it({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,wr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,p]),(0,Ye.jsxs)("div",{className:l.root,children:[p.length>0&&(0,Ye.jsx)("div",{className:l.alignRight,children:(0,Ye.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ye.jsxs)(te.ActionsBar,{list:p.map(({answer:h})=>({text:h.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:h=>e(h.text),children:[p.map(({question:h,answer:m},g)=>(0,Ye.jsx)(te.List,{children:(0,Ye.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:g,description:m.answer,closeOnSelect:!0,onClick:()=>e(m.answer),onSourceClick:f=>v(f,h),sources:m.sources,styles:{title:l.question,description:l.answer},children:h})},`${m.answer}_${g}`)),d==="loading"&&(0,Ye.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ye.jsx)("p",{className:l.status,children:u("error")}),(0,Ye.jsxs)("form",{className:l.form,onSubmit:y,children:[(0,Ye.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,Ye.jsx)("button",{type:"submit",className:l.submit,children:(0,Ye.jsx)(e1,{})})]})]})]})},t1=dI;var pI={data:null,fetchState:"idle"},bi=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)}),fI=H({name:"profile",initialState:pI,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})}}),n1=fI.reducer;var Ee=S(E()),mI=200,gI=5,hI=4,yI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),r1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),vI=()=>{let e=W(),t=Pt(),n=j(Ng),[r,o]=(0,Ze.useState)(!1),[i,s]=(0,Ze.useState)(""),a=A(F_),l=A(bi),[u,c]=(0,Ze.useState)(null),[p,d]=(0,Ze.useState)([]),[y,v]=(0,Ze.useState)(),h=A(Tn),m=F("showSearch"),g=F("showEntitiesCommand"),f=F("showSummaryCommand"),x=F("showKnowledgeSearch"),_=F("showImageSearch"),C=F("searchTriggerKey"),w=A(Dw),b=A(j_),R=A(D_),P=I=>ln(b.filter($=>$.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),K=[{label:n("entitiesClipboard"),onClick:()=>e(Ue("entities")),shouldShow:g&&r1(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(Ue("summary")),shouldShow:f&&r1(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Ue("knowledgeAssist")),shouldShow:x,experimental:!0}].filter(I=>I.shouldShow),B=(w==null?void 0:w.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],je=(0,Ze.useCallback)((0,o1.default)((I,$)=>{e(oo({query:I,type:$,tags:["search-overlay"]}))},mI),[]),an=yI([...B,...N]),$t=(0,Ze.useCallback)((I,$)=>{if(!$)return;let Lt=[...N,...B].find(({value:Hn})=>Hn===$);Lt&&(e(Ue("edit")),c({...I,searchTerm:void 0}),d(Lt.list))},[e,u,B]),uo=(0,Ze.useCallback)((I,$)=>{switch($.type){case"IMAGE":t.send(Tg,{suggestion:$});break;default:t.send(kn,{text:I,suggestion:$})}e(st(!1))},[e]),Fi=I=>{ba(I.text),e(it({name:"entity copied",data:{entity:I,type:"copy"}})),e(st(!1))},Pr=I=>{t.send(kn,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(it({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(Ue("search")),e(Ci()),e(st(!1))},Ba=I=>{ba(I),e(st(!1))},Ua=I=>{t.send(kn,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(st(!1))},ji=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Hi=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function ln(I,$){return I.slice(0,y?10:$.toLowerCase()==="image"?hI:gI)}function Bi(I,$,Lt){return $.reduce((Hn,un)=>Lt&&y===Lt?un.length+Hn:ln(un,Lt).length+Hn,I)}function Rr(I){return $=>{r?window.confirm(n("warning"))&&(I($),o(!1)):I($)}}return(0,Ze.useEffect)(()=>{i?je(i,y):e(Vc())},[i,y]),(0,Ze.useEffect)(()=>{a==="search"&&e(Ci())},[a]),(0,Ze.useEffect)(()=>{h&&e(Ca())},[h]),Hw(C,()=>e(st(!0))),!m||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Rr(I=>e(st(I))),onChangeType:I=>v(I),onChangePage:Rr(I=>e(Ue(I))),selectedType:y,search:i,page:a,isOpen:R,types:[...B,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...K.map(I=>({text:I.label,type:"command"})),...an.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},$)=>uo(I,an[$]),onSecondary:(I,$)=>{$t(an[$-K.length],an[$-K.length].type)},children:[K.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:K.map((I,$)=>(0,Ee.jsx)(te.ListItem,{index:Bi($,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...B,...N].map(({value:I,label:$,list:Lt,lineClamp:Hn,listOrientation:un},Ui)=>(0,Ee.jsx)(te.List,{heading:$,orientation:un==="horizontal"?"horizontal":"vertical",children:ln(Lt,I).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Bi(K.length+dt,[...B,...N].slice(0,Ui).map(({list:Ir})=>Ir),I),closeOnSelect:!1,lineClamp:Hn,onClick:()=>uo(ct.text,ct),description:I!=="IMAGE"?ct.title&&ct.text:void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Rr(()=>{e(Ue("search")),c(null)}),children:u&&(0,Ee.jsx)(qc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(Ue("search")),c(null),d([])},onNext:Hi,onPrevious:ji,onUse:I=>{e(Ue("search")),uo(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(st(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:Rr(()=>{e(Ue("search"))}),children:(0,Ee.jsx)(Kw,{onUse:Ua,onCopy:Fi})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:Rr(()=>{e(Ue("search"))}),children:(0,Ee.jsx)(Xw,{onCopy:Ba})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),isExperimental:!0,onDismiss:Rr(()=>{e(Ci()),e(Ue("search"))}),children:(0,Ee.jsx)(t1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Pr,onResetQuestion:()=>{e(Ci()),s("")}})})]})},i1=vI;var Ti=S(E()),SI=()=>{let e=F("showSearch"),t=F("isEmbedded");return(0,Ti.jsxs)(s1.Fragment,{children:[e&&(0,Ti.jsx)(i1,{}),(0,Ti.jsx)(bw,{}),t&&(0,Ti.jsx)(Lw,{})]})},a1=SI;var Ra=S(E()),xI=({children:e})=>{let n=F("locale").replace("-","");return(0,Ra.jsx)(Hd.Provider,{value:n,children:e})},_I=({store:e,customStyles:t={},children:n})=>(0,Ra.jsx)(Bm,{store:e,children:(0,Ra.jsx)(xI,{children:(0,Ra.jsx)(Ki.Provider,{value:t,children:n})})}),Ia=_I;var ed=S(X()),Ri=S(O());var l1=S(O());function u1(e,t){let[n,r]=(0,l1.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)}}]}function Zc(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 d1=S(X()),In=S(O());var Fg={};Ce(Fg,{enUS:()=>wI,nlNL:()=>EI});var wI={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"}]}]},EI={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 c1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var Er=S(E()),jg=(e,t,n)=>r=>(0,Er.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),CI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Fg),i=Pt(),s=k("Login",c1),a=F("productName"),l=(0,In.useCallback)(h=>{h.preventDefault(),r&&r(parseInt(h.target.value,10))},[]),u=(0,In.useCallback)(h=>{h.preventDefault(),i.send(wi,!0)},[t]),c=(0,In.useMemo)(()=>h=>(0,Er.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:h},"login"),[t]),p=(0,In.useCallback)(h=>(0,Er.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:h},"prompt"),[u]),{min:d,hour:y,day:v}=(0,In.useMemo)(()=>({min:jg(s,60*10,l),hour:jg(s,60*60,l),day:jg(s,60*60*12,l)}),[]);return(0,Er.jsxs)("div",{className:(0,d1.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,Er.jsxs)(In.Fragment,{children:[(0,Er.jsx)("br",{}),o("snooze",{min:d,hour:y,day:v})]})]})},Jc=CI;var p1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var La=S(E()),bI=({title:e})=>{let t=k("SearchTrigger",p1),n=W();return(0,La.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(st(!0)),children:[(0,La.jsx)(hi,{}),(0,La.jsx)("span",{className:t.text,children:e})]})},f1=bI;var x1=S(O());var Pi=S(O());var m1=S(O());function g1(e,t,n){(0,m1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var TI=/[.*+?^${}()|[\]\\]/g,kI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function PI(e){return e.replace(TI,"\\$&")}function RI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function Hg(e){return e.search(kI)}function h1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${PI(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function y1(e){return e.replace(ho,'<mark data-type="placeholder">$1</mark>')}function ki(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function II(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 Bg(e,t,n={}){if(t){let r=RI(t.toLowerCase(),e.toLowerCase()),o=ki(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=Hg(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Sy).length>3||t.length>30?II(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ki(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var v1={badge:"_badge_8rv7b_1",formattedText:"_formattedText_8rv7b_5"};var Ug=S(E()),AI=["search","personal-collection-search","search-autocomplete"];function OI(e,t,n,r={}){let o="";return AI.includes(t)?o=h1(Bg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Bg(e,n,r),r.placeholders===!0&&(o=y1(o)),o}var NI=()=>{},MI=({index:e,selected:t,suggestion:n})=>{let r=F("inlineSuggestions"),o=A(ii),i=W(),s=k("TextSuggestion",v1),a=(0,Pi.useRef)(null);(0,Pi.useEffect)(()=>{let u=setTimeout(()=>{i(Xx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),g1(a,"click",()=>{i(Tc(e)),i(jt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Pi.useMemo)(()=>OI(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"?null:(0,Ug.jsx)(oe,{ref:a,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:NI,children:(0,Ug.jsx)(li,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},S1=MI;var zg=S(E()),DI=({suggestions:e,selectedIndex:t})=>(0,zg.jsx)(x1.Fragment,{children:e.slice().map((n,r)=>(0,zg.jsx)(S1,{index:r,selected:r===t,suggestion:n},`${n.text}-${n.source}`)).reverse()}),_1=DI;var Kg={};Ce(Kg,{enUS:()=>FI,nlNL:()=>jI});var FI={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"}]},jI={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 w1={root:"_root_4kcme_1",isInline:"_isInline_4kcme_14",toggleButton:"_toggleButton_4kcme_18",toggleButtonWrapper:"_toggleButtonWrapper_4kcme_22",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_4kcme_29",isCollapsed:"_isCollapsed_4kcme_33",collapsible:"_collapsible_4kcme_33",hints:"_hints_4kcme_41",hintsHidden:"_hintsHidden_4kcme_48",triggers:"_triggers_4kcme_53",triggersRight:"_triggersRight_4kcme_68"};var ue=S(E()),HI=({inline:e=!1,textSuggestions:t,selectedIndex:n})=>{let r=k("SuggestionsOverlay",w1),o=j(Kg),i=F("inlineSuggestions"),s=A(Zc),a=Vx(),l=W(),u=(0,Ri.useRef)(null),c=F("searchTriggerKey"),p=F("productName"),d=A(uw),y=A(Tn),v=A(mc),[h,m]=(0,Ri.useState)(null),g=F("showSearch"),f=F("showTextSuggestions"),x=F("adminUrl"),_=F("isEmbedded"),[C,w]=u1("dd-snooze-until-ms",0),b=d||C>Date.now(),R=t.filter(K=>K.source!=="gpt").length,P=()=>{b&&w(0),l(pw(!b))},N=K=>{let B=Date.now()+K*1e3;w(B),U.info(`Snooze until: ${new Date(B)}`),l(xi({collapse:!0}))};return(0,Ri.useEffect)(()=>{R===0&&m(null)},[t,R]),pi(()=>{l(xi({collapse:!0,skipWhenInputFocus:!0}))}),i!==e||y===null||v===!1?null:y===!1?(0,ue.jsxs)("div",{ref:u,className:(0,ed.default)(r.root,{[r.isCollapsed]:b,[r.isInline]:e}),"data-inline":e,children:[!b&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:r.triggersRight,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("open",{productName:p}),onClick:P,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(Jc,{loginUrl:x,isEmbedded:_,onSnooze:N})})]}):!a||!s?null:(0,ue.jsxs)("div",{ref:u,className:(0,ed.default)(r.root,{[r.isCollapsed]:b,[r.isInline]:e}),"data-inline":e,children:[!b&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:g&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>m(o(zc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>m(null),children:(0,ue.jsx)(f1,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,ed.default)(!h&&r.hintsHidden,r.hints),children:h}),(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("open",{productName:p}),onClick:P,isCollapsed:!0})}),R>0&&f&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(qt,{children:(0,ue.jsx)(_1,{suggestions:t,selectedIndex:n})})})]})},BI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),td=Yr(BI)(HI);var md=S(X());var Nn=S(O());var E1=S(O()),UI=["div","span","mark","strong","b","i","u","em"];function Vg(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(UI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,E1.cloneElement)(r,{children:Vg(s,t,n+1)})]}return[...e,...t]}function Ln(e){return e.tagName.toLowerCase()==="textarea"}var C1={root:"_root_1l8n5_1",container:"_container_1l8n5_4",agentText:"_agentText_1l8n5_7",tabText:"_tabText_1l8n5_8",hint:"_hint_1l8n5_8",matchSelection:"_matchSelection_1l8n5_12",focus:"_focus_1l8n5_18",resetIndent:"_resetIndent_1l8n5_22",matchKeyword:"_matchKeyword_1l8n5_26",matchPlaceholder:"_matchPlaceholder_1l8n5_27",hover:"_hover_1l8n5_33",hintText:"_hintText_1l8n5_66",popover:"_popover_1l8n5_74",popoverRoot:"_popoverRoot_1l8n5_79",popoverContentContainer:"_popoverContentContainer_1l8n5_83",popoverContent:"_popoverContent_1l8n5_83",selectionOptions:"_selectionOptions_1l8n5_109",selectionOptionsIsHidden:"_selectionOptionsIsHidden_1l8n5_114",selectionOptionsButton:"_selectionOptionsButton_1l8n5_118",caret:"_caret_1l8n5_134",popoverSuggestionsRoot:"_popoverSuggestionsRoot_1l8n5_138",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_1l8n5_143"};var id=S(O());var $g=S(X()),Rt=S(O());var nd=S(O()),zI=["bottom","height","left","right","top","width"],KI=(e={},t={})=>zI.some(n=>e[n]!==t[n]),An=new Map,b1,T1=()=>{let e=[],t=[];An.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();KI(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{An.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),b1=window.requestAnimationFrame(T1)};function VI(e,t){return{observe(){let n=An.size===0;if(An.has(e)){let r=An.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else An.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&T1()},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(b1)}}}}function Wg(e){let[t,n]=(0,nd.useState)(null);return(0,nd.useLayoutEffect)(()=>{if(!e.current)return;let r=VI(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ii=S(O()),P1=S(Ru());var k1={root:"_root_1jq08_1"};var R1=({children:e})=>{let[t,n]=(0,Ii.useState)(null),r=(0,Ii.useContext)(Ki);return(0,Ii.useLayoutEffect)(()=>{let o=document.createElement("div");return no(o),o.classList.add(k1.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,P1.createPortal)(e,t):null};var on={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 rd=S(E()),Li=(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 qg(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 Ai=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=qg,...a})=>{let l=Wg(t),u=Wg(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,rd.jsx)(R1,{children:(0,rd.jsx)("div",{className:(0,$g.default)(on.ref,{[on.positionAbove]:r==="above",[on.positionBelow]:r==="below",[on.positionLeft]:r==="left",[on.positionRight]:r==="right",[on.alignStart]:o==="start",[on.alignCenter]:o==="center",[on.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,rd.jsx)("div",{className:(0,$g.default)(e,on.root),children:i})})})};var Cr=S(E()),WI=({inputStyle:e,inputElement:t})=>{let n=k("TabCompletion",bt),r=Li(document.activeElement===t);return pi(()=>r.close()),(0,id.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Cr.jsxs)(id.Fragment,{children:[(0,Cr.jsx)("mark",{className:bt.caret,ref:r.triggerRef}),r.opened&&(0,Cr.jsx)(Ai,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Cr.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Cr.jsx)(td,{inline:!0})})})]})},od=class extends Bt{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(Ln(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:Hg(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Cr.jsx)(WI,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var O1=S(X());var cd=S(O());function I1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function sd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function L1(e){return e!=null}var A1=S(X()),ad=S(O());var Gg=S(E()),ld=(0,ad.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,ad.useRef)(null),i=k("TabCompletion",bt);return(0,Gg.jsx)("div",{ref:sd([o,r]),className:(0,A1.default)(e,i.popoverContentContainer),...n,children:(0,Gg.jsx)("div",{className:i.popoverContent,children:t})})});var br=S(E()),$I=e=>t=>{let n=qg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},qI=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",bt),s=Li(),a=(0,cd.useMemo)(()=>$I(e.getBoundingClientRect()),[e]),[l,u]=Mc(e);return(0,cd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,br.jsxs)("span",{children:[(0,br.jsx)("mark",{ref:sd([l,s.triggerRef]),className:(0,O1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,br.jsx)(Ai,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,br.jsx)(ld,{style:n,children:(0,br.jsx)("div",{className:i.hintText,children:o})})})]})},ud=class extends Bt{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${I1(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(L1);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,br.jsx)(qI,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var pd=S(X());var Ke=S(O());var Xg=S(E()),N1=()=>(0,Xg.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,Xg.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 Tr=S(O());var D1=S(Lg());var M1={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 Qg(e){return e.replace("https://www.","").replace("https://","")}var It=S(E()),GI=3,XI=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),QI=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=GI})=>{let i=k("LinkSearch",M1),[s,a]=(0,Tr.useState)(""),l=W(),u=A(Q_("url")),c=A(H_("URL",XI)),[p,d]=(0,Tr.useState)(c.length-1),y=F("fallbackImage"),v=f=>{let x=f.target;a(x.value)},h=(f,x)=>{f.stopPropagation(),f.preventDefault(),window.open(x,"_blank")},m=f=>{var C;let x=p-1<0?c.length-1:p-1,_=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(x),f.code==="ArrowDown"&&d(_),f.code==="Enter"&&e(((C=c[p])==null?void 0:C.text)||s)},g=(0,Tr.useCallback)((0,D1.default)(f=>{l(oo({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,Tr.useEffect)(()=>{s&&g(s)},[s]),(0,Tr.useEffect)(()=>()=>{l(Vc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(qt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,x)=>(0,It.jsx)(oe,{selected:p===x,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(me,{children:[(0,It.jsx)(me.Image,{src:dd(f,"small",y||void 0),title:f.title||f.text}),(0,It.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(me.Title,{children:f.title||Qg(f.text)}),f.title&&Qg(f.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:_=>h(_,f.text)})})]})},f.text))}),(0,It.jsx)(Ea,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:m})]})},F1=QI;var Yg={};Ce(Yg,{enUS:()=>YI,nlNL:()=>ZI});var YI={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},ZI={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var ze=S(E()),JI=(0,Ke.forwardRef)((e,t)=>{let n=k("TabCompletion",bt);return(0,ze.jsx)("mark",{ref:t,className:(0,pd.default)(n.matchSelection)},"selection-start")}),eL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(Yg),s=k("TabCompletion",bt),a=(0,Ke.useRef)(null),l=(0,Ke.useRef)(null),[u,c]=(0,Ke.useState)(null),p=W(),d=Li(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,m=a.current;!h||!m||(y.setStart(h,0),y.setEnd(m,0))},[e.current,a.current]),pi(()=>{d.close()});let v=(0,Ke.useCallback)(h=>{let m=y.toString(),g=/^http(s?):\/\//.test(h)?h:`https://${h}`;p(_c({text:`[${m}](${g})`,replace:"selection"}))},[]);return(0,ze.jsxs)("span",{children:[(0,ze.jsx)("mark",{ref:a,className:(0,pd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,ze.jsx)(Ai,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,ze.jsxs)(ld,{style:n,ref:l,children:[(0,ze.jsx)("div",{className:(0,pd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,ze.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,ze.jsx)(N1,{}),(0,ze.jsx)("span",{children:"\xA0"}),(0,ze.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,ze.jsx)(F1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},fd=class extends Bt{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,ze.jsx)(JI,{ref:this.startRef}):(0,ze.jsx)(eL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var On=S(E()),tL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",C1),c=F("insertLink"),p=F("showMidSentenceSuggestions"),d=F("inlineSuggestions"),y=Fc(a),v=(0,Nn.useRef)(null);(0,Nn.useEffect)(()=>{Ln(a)&&y&&jc(a,y)},[y]);let h=(0,Nn.useCallback)(f=>{if(!o||!n)return f;let x=[(0,On.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,On.jsx)("span",{"data-testid":"tab-completion",className:(0,md.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,On.jsx)("span",{className:(0,md.default)(u.hint,u.resetIndent),children:(0,On.jsx)(fl,{keyCode:"tab"},"tabHint")})),Vg(f,x)},[o,n,r]),m=(0,Nn.useMemo)(()=>{let f=[];return d&&f.push(new od("inline")),c&&f.push(new fd("selection")),f.push(new ci("placeholders")),i&&f.push(new ud("keywords")),f},[d,c,i]),g=(0,Nn.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,On.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(v.current=f==null?void 0:f.parentElement)},className:u.root,style:g,children:[(0,On.jsx)(li,{tagName:"span",containerTagName:"div",className:(0,md.default)(u.container,u.agentText),disableLineBreaks:Ln(a),content:t||"\u200B",onAfterParse:h,matchers:m,selection:y,keywordMatches:s,inputElement:a,inputStyle:g,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,On.jsx)("br",{})]}):null},nL=({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??ki(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=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&&p!==!1}},j1=Yr(nL)(tL);var TE=S(X()),kE=S(O());var H1={list:[],fetchState:"idle",isInitialRequest:null},U1=e=>e.autoflows.list||[],B1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Mn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Zg=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(Mn(e.platformSessionId))}),Jg=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(Mn(e.platformSessionId))}),rL=H({name:"autoflows",initialState:H1,reducers:{},extraReducers:e=>{e.addCase(Zg.pending,(t,n)=>{let r=B1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Jg.pending,(t,n)=>{let r=B1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Mn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Mn.rejected,t=>{t.fetchState="error"}),e.addCase(Mn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>H1)}}),z1=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(Mn(e))}),o.on("sessionCompleted",()=>{n(Mn(e))})}),K1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),V1=rL.reducer;var W1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},$1=e=>e.customMessages.list,q1=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),G1=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),X1=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)}),Q1=H({name:"customMessages",initialState:W1,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,()=>W1)}}),Y1=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(Q1.actions.onCustomMessage(i))})}),Z1=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),J1=Q1.reducer;var oL={jwt:null,accountUrl:null,interval:null},eE=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},eh=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),th=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(eh()),setInterval(()=>r(eh()),n)}),tE=H({name:"exchangeToken",initialState:oL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(eh.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(th.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:nE}=tE.actions,rE=tE.reducer;function oE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var fE=S(O());var cE=S(X()),dE=S(O());var sE=S(X());var iE={root:"_root_838fd_1"};var lE=S(E()),iL=({className:e,children:t})=>{let n=k("Unicode",iE);return(0,lE.jsx)("span",{className:(0,sE.default)(e,n.root),children:t})},aE=iL;var uE={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 nh={};Ce(nh,{enUS:()=>sL,nlNL:()=>aL});var sL={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"}]},aL={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 at=S(E()),uL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",uE),a=j(nh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,at.jsxs)(oe,{className:(0,cE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,at.jsx)(me,{children:(0,at.jsxs)(me.Content,{children:[(0,at.jsxs)(me.Title,{children:[t&&(0,at.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,at.jsx)("span",{children:r})]})}),(0,at.jsx)(oe.Actions,{fixed:t==="Started",children:(0,at.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,at.jsxs)(dE.Fragment,{children:[(0,at.jsx)(aE,{children:u})," ",(0,at.jsx)("span",{children:a(l)})]})})})]})},pE=uL;var rh=S(E()),cL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},dL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,rh.jsx)(fE.Fragment,{children:e.map(o=>(0,rh.jsx)(pE,{displayName:o.displayName,description:o.description,disabled:o.isBusy||cL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),pL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},fL={onStartAutoflow:Zg,onStopAutoflow:Jg},mE=Yr(pL,fL)(dL);var yd=S(O());var sh=S(X());var oh=S(E()),ih=()=>(0,oh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,oh.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 gE={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 sn=S(E()),mL=({entities:e})=>{let t=k("EntitiesWidgetList",gE),[n,r]=(0,yd.useState)(void 0),o=W(),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,sn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,sn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,sn.jsx)("span",{className:t.entityText,children:a.text}),(0,sn.jsxs)("span",{className:t.iconWrapper,children:[(0,sn.jsx)("span",{className:(0,sh.default)(t.icon),children:(0,sn.jsx)(ih,{})}),(0,sn.jsx)("span",{className:(0,sh.default)(t.icon,n===l&&t.iconClicked),children:(0,sn.jsx)(ih,{})})]})]},a.text))})},hE=mL;var yE=S(X()),ah=S(O());var Oa={};Ce(Oa,{enUS:()=>gL,nlNL:()=>hL});var gL={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"}]},hL={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 Dn={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 Je=S(E()),yL=({suggestion:e})=>{let t=j(Oa),n=W(),r=A(q1(e.text)),o=A(G1(e.text)),i=A(X1(e.text)),s=A(pc),{replyOptions:a}=e,l=(0,ah.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(gd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,ah.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(hd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Je.jsxs)(oe,{onClick:l,className:(0,yE.default)(Dn.root,{[Dn.isUsed]:r,[Dn.hasError]:i}),children:[(0,Je.jsx)(me,{children:(0,Je.jsxs)(me.Content,{children:[(0,Je.jsxs)(me.Title,{className:Dn.title,children:[e.text," ",(0,Je.jsx)(ml,{className:Dn.label,children:"analyse tool"})," ",i&&(0,Je.jsx)("span",{className:Dn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,Je.jsx)("ul",{className:Dn.quickReplies,children:a.map(c=>(0,Je.jsx)("li",{className:Dn.quickReply,children:c.title},c.title))})]})}),(0,Je.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Je.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,Je.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,Je.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},vE=yL;var lh=S(E()),SE=()=>(0,lh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,lh.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 xE=S(O());var lt=S(E()),vL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Wc(o),s=j(Oa),a=F("showImages"),l=F("fallbackImage"),u=y=>{y.preventDefault(),y.stopPropagation(),r(o)},c=y=>{y.preventDefault(),y.stopPropagation(),n(e)},p=(0,xE.useCallback)(y=>{window.open(i,"_blank"),y.stopPropagation(),y.preventDefault()},[i]);return(0,lt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,lt.jsxs)(me,{children:[a&&e.image&&(0,lt.jsx)(me.Image,{src:dd(e,"small",l||void 0),title:e.title}),(0,lt.jsxs)(me.Content,{children:[e.title&&(0,lt.jsx)(me.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,lt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,lt.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,lt.jsxs)(oe.Actions,{children:[i&&(0,lt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},_E=vL;var Na=S(E()),SL=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=A(vi),i=a=>{r.send(Cg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(kn,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Na.jsx)(Na.Fragment,{children:n.map(a=>(0,Na.jsx)(_E,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},wE=SL;var uh={};Ce(uh,{enUS:()=>xL,nlNL:()=>_L});var xL={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"}]},_L={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:"Vat gesprek samen"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var EE={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 ch=S(E()),CE=()=>(0,ch.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ch.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 dh=S(E()),bE=()=>(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:"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=S(E()),vd=(e,t)=>{let n=A(Tn);(0,kE.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},wL=()=>{let e=j(uh),t=W(),n=F("isEmbedded"),r=k("Widget",EE),o=F("showAutoflows"),i=F("showCustomMessages"),s=F("showPersonalCollectionLink"),a=F("showSummaryCommand"),l=F("showKnowledgeSearch"),u=F("showSearch"),c=A(bi),p=A(Yc),d=A(U1),y=A(Qc),v=A($1),h=A(fc),m=A(mc),g=A(Tn),f=A(pc),x=A(oE),_=A(vi),C=Pt(),w=A(Z_),b=A(eE("/admin/personal-collection")),R=F("adminUrl");if(vd(()=>(t(Aa(f)),t(Y1(f)),()=>{t(Z1(f))}),[t,m,i,f]),vd(()=>(t(Mn(f)),t(z1(f)),()=>{t(K1(f))}),[t,m,o,f]),vd(()=>{p.forEach(({type:N})=>{t(N==="entities"?Kt():Cn(N))})},[t,m,h,c]),vd(()=>(t(th()),()=>{t(nE())}),[t,m,s,h]),m===!1)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("notSupported")})})},"supported");if(g===!1)return(0,z.jsx)("div",{className:r.loginText,children:(0,z.jsx)("div",{children:(0,z.jsx)(Jc,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!f||g===null||w||x)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,TE.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(gl,{className:r.sectionList,children:[P&&(0,z.jsx)(Bn,{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)(hi,{}),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)(bE,{}),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)(CE,{}),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)(SE,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,z.jsx)(Bn,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(qt,{withDivider:!0,children:v.map(N=>(0,z.jsx)(vE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(Bn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(qt,{withDivider:!0,children:(0,z.jsx)(mE,{})})}),p.map(({type:N,title:K,amount:B,lines:je})=>{var an;switch(N){case"entities":return y&&y.length>0&&(0,z.jsx)(Bn,{type:N,title:K,"data-testid":`type-${N}`,children:(0,z.jsx)(hE,{entities:y})},N);default:return((an=_[N])==null?void 0:an.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(Bn,{type:N,title:K,"data-testid":`type-${N}`,children:(0,z.jsx)(qt,{withDivider:!0,children:(0,z.jsx)(wE,{lines:je,contentType:N,suggestions:_[N].suggestions.slice(0,B)||[]})})},N)}})]})})},PE=wL;function Oi(e){let t=new Range;return t.selectNodeContents(e),t}function RE(e,t,n){try{return kr(e,t,n),!0}catch{return!1}}var Ma=/[\u200B-\u200D\uFEFF]/g;function kr(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){var u;switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,p=c.replace(Ma,""),d=o+p.length,y=t>=o&&t<=d,v=n>=o&&n<=d;if(y){let h=s(c,t-o);h===0&&!v?r.setStartBefore(l):r.setStart(l,h)}v&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(l.tagName==="BR"&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let p=0;p<l.childNodes.length&&(a(l.childNodes[p]),!i);p++);let c=(u=l.lastChild)==null?void 0:u.tagName;l.tagName==="DIV"&&c!=="DIV"&&c!=="BR"&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Ni(e,t){if(!e.contains(t.commonAncestorContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s,a,l=0;function u(c){let p=c===n,d=c===o;switch(c.nodeType){case Node.TEXT_NODE:{let y=c.textContent;p&&(s=l+y.substring(0,r).replace(Ma,"").length),d&&(a=l+y.substring(0,i).replace(Ma,"").length),l+=y.replace(Ma,"").length;break}case Node.ELEMENT_NODE:{let{tagName:y}=c,v=c.nextSibling===null;y==="BR"&&!v&&l++;for(let h=0;h<c.childNodes.length&&(p&&h===r&&(s=l),u(c.childNodes[h]),d&&h===i-1&&(a=l),a===void 0);h++);!d&&y==="DIV"&&!v&&l++,d&&(a=l);break}default:break}}if(u(e),a===void 0)throw new Error("Could not determine start and end");return{start:s??a,end:a}}function Da(e,t){if(!e.contains(t.commonAncestorContainer))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,y=p?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{tagName:d}=u,y=u.nextSibling===null;s===0&&d==="BR"&&!y&&(a+=`
|
|
19
|
+
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||GP)();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(WP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,u_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==l_||!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($P)&&(!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===hr?c=!0:u===Jr?c=Number.parseFloat(String(c)):u!==Lc&&(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 ca[t]?{...n,...ca[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===l_){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 m=this.keyIndex;h=this.parseNode(v,y);let g=s(v,h,y);if(g===null)return;if(typeof g<"u"){l.push(to.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,y))){var p;this.keyIndex+=1;let m=this.extractAttributes(v),g={tagName:d};m&&(g.attributes=m),y.void&&(g.selfClose=y.void),l.push(to.default.createElement(Oc,{...g,key:this.keyIndex},(p=h)!==null&&p!==void 0?p: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(qP);){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],y;if(u)y=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));y=v.index+v[0].length,r.push(p.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 XP(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 y=new Nc(i??"",e).parse();y.length>0&&(d=y)}return d||(d=s),p?to.default.createElement(to.default.Fragment,null,d):to.default.createElement(Oc,{attributes:n,className:r,tagName:c},d)}function li(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,...y}=e,v=i?[]:l,h=o?[]:a,m=c?[c]:[],g=u?[u]:[];v.forEach(C=>{C.onBeforeParse&&m.push(C.onBeforeParse.bind(C)),C.onAfterParse&&g.push(C.onAfterParse.bind(C))});let f=m.reduce((C,w)=>w(C,e),r??""),x=new Nc(f,y,v,h),_=g.reduce((C,w)=>w(C,e),x.parse());return to.default.createElement(XP,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:p})}var fg=S(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 d_=S(X());var ui=S(O());function c_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Mc(e){let t=(0,ui.useRef)(null),[n,r]=(0,ui.useState)(!1);return(0,ui.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=c_((c,p)=>{let d=t.current;if(!d)return;let y=c/i,v=p/i,h=d.getBoundingClientRect(),m=y>h.x&&y<h.x+h.width&&v>h.y&&v<h.y+h.height;m&&!o?(o=!0,r(!0)):!m&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=c_(()=>{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 bt={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=S(E()),QP=({inputElement:e,children:t})=>{let n=k("TabCompletion",bt),[r,o]=Mc(e);return(0,ag.jsx)("mark",{ref:r,className:(0,d_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},ci=class extends Ht{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)(QP,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var di=S(O());function Dc(e){return e.contentEditable==="true"}function YP(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 p_(e){let{selectionStart:t,selectionEnd:n}=Dc(e)?YP(e):e;return[t,n]}function Fc(e){let[,t]=(0,di.useState)(),n=(0,di.useRef)(null);return n.current=p_(e),(0,di.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=p_(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 jc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(ho);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 f_=S(O());function pi(e){(0,f_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function no(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var m_,nn=new Map,ZP=["bottom","height","left","right","top","width"],JP=(e={},t={})=>ZP.some(n=>e[n]!==t[n]),g_=()=>{let e=[];nn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),nn.delete(n);return}let r=n.getBoundingClientRect();JP(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),nn.size!==0&&(m_=window.requestAnimationFrame(g_))};function h_(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,callbacks:[t]});n&&g_()},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(m_)}}}}var y_,rn=new Map,v_=()=>{rn.forEach((e,t)=>{if(!t.isConnected){rn.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)))}),rn.size!==0&&(y_=window.requestAnimationFrame(v_))};function S_(e,t){return{observe(){let n=rn.size===0;rn.has(e)?rn.get(e).callbacks.push(t):rn.set(e,{visible:void 0,callbacks:[t]}),n&&v_()},unobserve(){let n=rn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||rn.delete(e),rn.size||cancelAnimationFrame(y_)}}}}var lg=["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 ug(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function fi(e){return parseFloat(e)}function Bc(e){return Math.round(e*1e6)}function x_(e){return e/1e6}function cg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=fi(e.width),i=fi(e.borderLeftWidth),s=fi(e.borderRightWidth),a=fi(e.paddingRight),l=x_(Bc(o)-Bc(i)-Bc(s)),u=x_(Bc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function mi(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position="fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",no(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};ug(r,n,lg),cg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=S_(e,()=>{ug(r,n,lg),cg(r,e,n),i(),setTimeout(i,0)}),a=h_(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(ug(r,n,lg),cg(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=fi(p.borderTopWidth),y=fi(p.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 dg={};Ce(dg,{enUS:()=>eR,nlNL:()=>tR});var eR={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"}]},tR={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 da=S(E()),__=()=>(0,da.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,da.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,da.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 pg=S(E()),w_=()=>(0,pg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,pg.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"})});var E_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(E_||{}),_n=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";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}),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.currentHTML=n))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange()}handleFocus(){this.isFocused||this.emit("focus"),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(E_).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",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),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",n=>this.handlePaste(n)),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()})}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 wn=class extends _n{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):""}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=()=>{var s,a;if(document.activeElement!==this.element)return;let i=this.getSelection();i.start===((s=this.lastKnownSelection)==null?void 0:s.start)&&i.end===((a=this.lastKnownSelection)==null?void 0:a.end)||(this.lastKnownSelection=i,this.emit("selection",i))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)});let n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var i;return(i=n==null?void 0:n.get)==null?void 0:i.call(this.element)},set:i=>{var s;(s=n==null?void 0:n.set)==null||s.call(this.element,i),this.triggerChange()}});let r=this.element.disabled,o=new MutationObserver(()=>{this.element.disabled!==r&&(r=this.element.disabled,this.emit(r?"disabled":"enabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>o.disconnect())}};var Xe=S(E()),nR=({value:e,onUse:t,...n})=>{var c;let r=j(dg),o=W(),i=k("EditSuggestionTextInput",sg),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(ho))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let p;return l.current&&(a(l.current),p=new wn(l.current),p.on("change",({plainText:d})=>{o(Ge.actions.userInput({text:d,selection:p.getSelection()}))}),p.on("keydown",d=>{o(Ge.actions.registerKeyDown(xc(d))),d.code==="Enter"&&d.shiftKey&&t(p.getText())}),p.on("paste",({pastedText:d,selectionText:y})=>{o(Ge.actions.registerPaste({text:d,selectionText:y}))}),p.on("cut",({selectionText:d})=>{o(Ge.actions.registerCut(d))})),()=>{o(Ge.actions.reset()),p.dispose(),p.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 p=l.current.value.length;l.current.setSelectionRange(p,p),l.current.focus()},0)},[l]),(0,Xe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Xe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Xe.jsx)(rR,{inputElement:l.current,value:e}),(0,Xe.jsxs)("div",{className:(0,fg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Xe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Xe.jsx)(__,{}):(0,Xe.jsx)(w_,{})]})]})},rR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",sg),r=(0,Tt.useRef)(null),o=Fc(e);return(0,Tt.useEffect)(()=>{jc(e,o)},[o,e]),(0,Xe.jsx)(oR,{inputElement:e,children:(0,Xe.jsxs)("div",{ref:r,className:(0,fg.default)(n.root,n.agentText),children:[(0,Xe.jsx)(li,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new ci("placeholders")],inputElement:e,boundaryRef:r}),(0,Xe.jsx)("br",{})]})})},oR=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=mi(e,{overlayContainer:n.current,mirrorOverflow:!0});return()=>{o()}},[n.current]),(0,Xe.jsx)("div",{ref:n,children:t})},C_=nR;var yi=S(O());var b_=S(O()),Hc=S(X());var Qe={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 ro={};Ce(ro,{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 yr=S(E()),aR=({src:e,title:t})=>{let n=k("CommandPalette",Qe),[r,o]=(0,b_.useState)("loading"),i=j(ro);return(0,yr.jsxs)("div",{className:n.image,children:[(0,yr.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,yr.jsx)("span",{className:(0,Hc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,yr.jsx)("span",{className:(0,Hc.default)(n.imageSrc,n.imageSrcStatus),children:(0,yr.jsx)(Ga,{})}),t&&(0,yr.jsx)("span",{className:n.imageTitle,children:t})]})},T_=aR;var k_=S(O()),P_=S(X());var pa=S(E());function mg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Qe);return k_.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,P_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var fa=S(X());var Uc=S(O()),L_=S(E()),R_=Uc.default.createContext(void 0);function vr(){let e=Uc.default.useContext(R_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var I_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Uc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,L_.jsx)(R_.Provider,{value:s,children:e})};var kt=S(E());function gg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:p,onChangeOpen:d}=vr(),y=k("CommandPalette",Qe);function v(h){r(h),e&&d(!1)}return(0,kt.jsxs)("div",{className:(0,fa.default)(y.listItem,p===i&&y.listItemSelected),children:[(0,kt.jsxs)("button",{type:"button",className:(0,fa.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,...c,children:[(0,kt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,kt.jsx)("p",{className:(0,fa.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,kt.jsx)("p",{className:(0,fa.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate),children:a})]}),s&&(0,kt.jsx)(pl,{})]}),l&&(0,kt.jsxs)("div",{className:y.sources,children:[(0,kt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(h=>h.url?(0,kt.jsx)("a",{className:y.source,href:h.url,target:"_blank",title:h.url,rel:"noopener noreferrer",onClick:()=>o&&o(h),children:h.name},h.url):(0,kt.jsx)("span",{className:y.source,children:h.name},h.name))]})]})}var Sr=S(E());function hg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(ro),s=k("CommandPalette",Qe),{page:a}=vr();return a!==n?null:(0,Sr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Sr.jsxs)("div",{className:s.pageNav,children:[(0,Sr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,Sr.jsx)(kc,{}),i("back")]}),t&&(0,Sr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,Sr.jsx)(pl,{})]}),e]})}var xr=S(O());var zc=()=>/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 yg(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,[yg(n)]:we(e[n])}),{}):e}var cR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},ga=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)||""}},ma=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))}),vg=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}),Sg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),A_=e=>e.info.agentInfo,O_=B({name:"info",initialState:cR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ma.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ma.rejected,t=>{t.fetchState="error"}).addCase(ma.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(vg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Sg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:N_}=O_.actions,M_=O_.reducer;var Kc={list:[],fetchState:"idle",isOpen:!1,page:"search"},D_=e=>e.search.isOpen,F_=e=>e.search.page,j_=e=>e.search.list;function B_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var oo=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:ga(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),H_=B({name:"search",initialState:Kc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Kc.fetchState,e.list=Kc.list}},extraReducers:e=>{e.addCase(oo.pending,t=>{t.fetchState="loading"}).addCase(oo.rejected,(t,n)=>{t.fetchState="error",U.error(n.error)}).addCase(oo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>Kc)}}),{resetSearch:Vc,setIsOpen:st,setPage:Ue}=H_.actions,U_=H_.reducer;var dR=/(https?:\/\/[^\s]+)/,Wc=e=>e.split(" ").find(t=>dR.test(t));var xg=S(X());var $c=S(E()),pR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Qe);return(0,$c.jsxs)("button",{type:"button",...r,onClick:e,className:(0,xg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,$c.jsx)("span",{className:(0,xg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},gi=pR;var En=S(E()),fR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Qe),a=j(ro),{selected:l,setSelected:u}=vr(),c=i[l],p=c&&typeof c.text=="string"&&Wc(c.text),d=(0,xr.useRef)(null);function y(x){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,w=0;x==="down"?(_.forEach((R,P)=>{P===l&&(C=P)}),w=C===_.length-1?0:C+1):x==="up"?(_.forEach((R,P)=>{P===l&&(C=P)}),w=C?C-1:_.length-1):u(0);let b=_[w];b&&typeof w=="number"&&(u(w),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:w?"center":"end"}))}function v(){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),_=0;x.forEach((w,b)=>{b===l&&(_=b)});let C=x[_];C&&C.click()}let h=()=>{p&&window.open(p,"_blank")},m=()=>{c&&r(c,l)},g=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,xr.useCallback)(x=>{if(x.key==="Enter"&&x.altKey&&p){h();return}if(x.key==="Enter"&&x.shiftKey){g();return}if(x.key==="ArrowDown"){x.preventDefault(),x.stopPropagation(),y("down");return}if(x.key==="ArrowUp"){x.preventDefault(),x.stopPropagation(),y("up");return}x.key==="Enter"&&l!==-1&&(x.preventDefault(),x.stopPropagation(),v())},[l]);return(0,xr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,En.jsxs)("div",{className:s.actions,children:[(0,En.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,En.jsxs)("div",{className:s.actionsBar,children:[p&&(0,En.jsx)(gi,{onClick:h,shortKeys:[zc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,En.jsxs)(xr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,En.jsx)(gi,{onClick:g,shortKeys:[8679,8629],children:n}),(0,En.jsx)(gi,{onClick:m,shortKeys:[8629],children:t})]})]})]})},K_=fR;var V_=S(O());var ha=S(E()),hi=()=>(0,ha.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,ha.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,ha.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 Ut=S(E());function mR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Qe);return(0,Ut.jsxs)("div",{className:l.search,children:[(0,Ut.jsx)("div",{className:l.searchIcon,children:(0,Ut.jsx)(hi,{})}),(0,Ut.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ut.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,Ut.jsx)("div",{className:l.selectWrapper,children:(0,Ut.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,Ut.jsx)("option",{children:r}),o.map(u=>(0,Ut.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var W_=(0,V_.forwardRef)(mR);var ya=S(E());function io({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[y,v]=(0,yi.useState)(0),h=(0,yi.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=h.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,yi.useEffect)(()=>{v(0)},[d,r]),(0,ya.jsx)(ai,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:g,onClose:m,children:(0,ya.jsxs)(I_,{selected:y,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,ya.jsx)(W_,{ref:h,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}io.Page=hg;io.List=mg;io.Image=T_;io.ListItem=gg;io.ActionsBar=K_;io.Button=gi;var te=io;var Fe=S(E()),gR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",r_),l=W(),u=j(Ym),c=A(v=>v.overlayInput.text);(0,_g.useEffect)(()=>{e&&(l(Ge.actions.reset()),l(Ge.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Ge.actions.commitSuggestion()))},[e]);let p=v=>{v.preventDefault(),d(c)},d=v=>{l(Ec(v)),t(v)},y=v=>h=>{c!==s?window.confirm(u("warning"))&&v(h):v(h)};return(0,_g.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)(Kd,{labels:e.searchKeywords}),(0,Fe.jsx)(C_,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:p,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)(kc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&y(o),children:(0,Fe.jsx)(o_,{})})]}),(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")})]})]})]})},qc=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 $_(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 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 q_(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var X_={suggestions:[],fetchState:"idle",isInitialRequest:null},G_={default:X_},Q_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},Y_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Z_=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")},vi=e=>e.textSuggestions,J_=e=>t=>t.text.startsWith(e),Gc=pe("textSuggestions/refresh"),Cn=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=ii(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,ga(r),e);if(e==="default"){let c=s?l.filter(J_(a)):l;t.dispatch(mr(c.slice(0,i)))}return l}),va=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,{...ga(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(J_(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?$_(c.text,e):c.text}))),l=q_(l,i),t.dispatch(mr(l)),l}),ew=B({name:"textSuggestions",initialState:G_,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(Cn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||X_;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Cn.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Cn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(va.pending,t=>{t.default.fetchState="loading"}).addCase(va.rejected,t=>{t.default.fetchState="error"}).addCase(va.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>G_)}}),{setTextSuggestions:tw,setSuggestionState:nw}=ew.actions,rw=ew.reducer;var ow={contentType:null,suggestion:null},iw=e=>e.activeSuggestion.suggestion,sw=e=>e.activeSuggestion.contentType,aw=B({name:"activeSuggestion",initialState:ow,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,()=>ow)}}),{setActiveSuggestion:bn,resetActiveSuggestion:wg}=aw.actions,lw=aw.reducer;var Eg={};Ce(Eg,{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 uw=({ui:e})=>e.overlayCollapsed;var cw=B({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:Sa,setInputHasFocus:Si,setOverlayCollapsed:xi,setOpenOverlayWhenTyping:dw,setOverlayCollapsedUserOverwrite:pw}=cw.actions,fw=cw.reducer;var xa=S(O()),gw=S(E()),mw=xa.default.createContext(null),_a=({broadcastEvents:e,children:t})=>{let n=xa.default.useMemo(()=>e,[]);return(0,gw.jsx)(mw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,xa.useContext)(mw);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},Tn=e=>e.auth.isLoggedIn,hw=e=>e.auth.loginFetchState,yw=e=>e.auth.verifyFetchState,vw=e=>e.auth.showLoginOverlay,_r=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Sw=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)}),xw=B({name:"auth",initialState:_R,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(_r.pending,t=>{t.loginFetchState="loading"}),e.addCase(_r.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(_r.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:_i,setShowLoginOverlay:_w}=xw.actions,ww=xw.reducer;var Cg="SetActiveSuggestion",wi="ShowLoginOverlay",bg="UserLoggedIn",wR="UserLoggedOut",kn="ApplySuggestion",Tg="ApplyImageSuggestion",ER="ShowCommandPalette",CR=e=>({[Cg]:t=>{e.dispatch(nw(t.state)),e.dispatch(bn({contentType:t.contentType,suggestion:t.suggestion}))},[ER]:t=>{e.dispatch(st(t.isOpen)),t.page&&e.dispatch(Ue(t.page))},[wi]:t=>{e.dispatch(_w(t))},[bg]:()=>{e.dispatch(_r())},[wR]:()=>{e.dispatch(_r())},[Tg]:t=>{e.dispatch(bc({suggestion:t.suggestion}))},[kn]:t=>{e.dispatch(jt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(gr())}}),Ew=CR;var kg=S(E()),bR=()=>{var v;let[e,t]=(0,Cw.useState)(!1),n=A(iw),r=A(sw),o=A(vi),i=W(),s=Pt(),a=j(Eg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(wg()),i(Si(!0)),i(Ge.actions.reset())},c=(h,m)=>{i(wg()),i(Si(!0)),s.send(kn,{text:h,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(bn({contentType:r,suggestion:o[r].suggestions[p-1]})),y=p===o[r].suggestions.length-1||p===null?void 0:()=>i(bn({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,kg.jsx)(ai,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,kg.jsx)(qc,{onTouched:t,onDismiss:u,onUse:h=>c(h,n),suggestion:n,onNext:y,onPrevious:d})})},bw=bR;var Xc=S(X()),zt=S(O());var kw=S(X());var Tw={root:"_root_1ukx5_1"};var Pw=S(E()),TR=({className:e,value:t,...n})=>{let r=k("TextInput",Tw);return(0,Pw.jsx)("input",{className:(0,kw.default)(e,r.root),type:"text",value:t,...n})},Ea=TR;var Pg={};Ce(Pg,{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 Rw={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=S(E());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=j(Pg),s=k("LoginTokenDialog",Rw),a=A(yw),l=W(),u=F("productName"),[c,p]=(0,zt.useState)(e||""),[d,y]=(0,zt.useState)(0),[v,h]=(0,zt.useState)(""),m=(0,zt.useCallback)(async _=>{_.preventDefault(),l(Sw({email:c})),y(1)},[n,c]),g=()=>{h(""),y(0)},f=(0,zt.useCallback)(async _=>{_.preventDefault();let C=RR(_.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:x}));return}l(wa({token:C}))},[n]),x=(0,zt.useMemo)(()=>_=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:g,children:_},"back-button"),[]);return(0,zt.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:x})),a==="done"&&r()},[a]),(0,he.jsx)(ai,{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:m,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:_=>p(_.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:f,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:g,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")})]})]})]})})},Iw=IR;var Aw=S(E()),LR=()=>{let e=A(vw),t=A(A_),n=F("adminUrl"),r=Pt(),o=()=>r.send(wi,!1),i=()=>{r.send(wi,!1),r.send(bg)};return(0,Aw.jsx)(Iw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Lw=LR;var o1=S(Lg()),Ze=S(O());var XR={data:null,fetchState:"idle"},Dw=e=>e.contentTypes.data,Ca=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),QR=B({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})}}),Fw=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 jw=S(O());function Bw(e,t){(0,jw.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=S(O());var Hw={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},Kt=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=B({name:"entities",initialState:Hw,reducers:{},extraReducers:e=>{e.addCase(Kt.pending,t=>{t.fetchState="loading"}).addCase(Kt.rejected,t=>{t.fetchState="error"}).addCase(Kt.fulfilled,(t,n)=>{t.fetchState="done",t.data=YR(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Hw)}}),Uw=ZR.reducer;var Ag={};Ce(Ag,{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 zw={root:"_root_17kae_1",empty:"_empty_17kae_5"};var so=S(E()),tI=({onCopy:e,onUse:t})=>{let n=(0,Ta.useRef)(null),r=k("EntitiesList",zw),o=j(Ag),i=A(Qc),s=W();return(0,Ta.useEffect)(()=>{s(Kt())},[]),(0,Ta.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,so.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,so.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,so.jsx)(te.List,{children:i.map((a,l)=>(0,so.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,so.jsx)("p",{className:r.empty,children:o("noResults")})]})},Kw=tI;var Vt=S(O());var Vw={data:null,fetchState:"idle"},Ww=e=>e.summary.data,$w=e=>e.summary.fetchState==="error",Pn=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();if(s.length===0)return Promise.reject(new Error("No messages are included"));let a=await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return{original:s,summary:a}}),nI=B({name:"summary",initialState:Vw,reducers:{},extraReducers:e=>{e.addCase(Pn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Pn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Pn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>Vw)}}),qw=nI.reducer;var Og={};Ce(Og,{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 Gw={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 Rn=S(E()),iI=({onCopy:e})=>{let t=(0,Vt.useRef)(null),n=k("SummaryForm",Gw),[r,o]=(0,Vt.useState)(""),i=j(Og),s=A(Ww),a=A($w),l=W(),u=()=>{l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Vt.useEffect)(()=>{l(Pn())},[]),(0,Vt.useEffect)(()=>{o(s||"")},[s]),(0,Vt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Vt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,Rn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Rn.jsx)("p",{className:n.error,children:i("error")}):(0,Rn.jsxs)(Vt.Fragment,{children:[(0,Rn.jsx)("div",{className:n.main,children:(0,Rn.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,Rn.jsx)("div",{className:n.actions,children:(0,Rn.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},Xw=iI;var Ng={};Ce(Ng,{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:"Vat gesprek samen"}],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 wr=S(O());var Mg={};Ce(Mg,{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 Qw={root:"_root_cnaw4_1",title:"_title_cnaw4_9",empty:"_empty_cnaw4_20",status:"_status_cnaw4_24",form:"_form_cnaw4_30",input:"_input_cnaw4_43",submit:"_submit_cnaw4_55",question:"_question_cnaw4_63",answer:"_answer_cnaw4_67",alignRight:"_alignRight_cnaw4_73"};var Dg={data:[],fetchState:"idle"},Yw=e=>{var t;return(t=e.answer)==null?void 0:t.data},Zw=e=>e.answer.fetchState,Ci=pe("answer/resetKnowledgeSearch"),Ei=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=B({name:"answer",initialState:Dg,reducers:{},extraReducers:e=>{e.addCase(Ei.pending,t=>{t.fetchState="loading"}).addCase(Ei.rejected,t=>{t.fetchState="error"}).addCase(Ei.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Dg).addCase(Ci,()=>Dg)}}),Jw=cI.reducer;var ka=S(E()),e1=()=>(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 Ye=S(E()),dI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=wr.default.useState(""),{setSelected:s}=vr(),a=(0,wr.useRef)(null),l=k("EntitiesList",Qw),u=j(Mg),c=W(),p=A(Yw),d=A(Zw),y=async h=>{h.preventDefault(),h.stopPropagation(),o!==""&&c(Ei({question:o,promptInstruction:r}))},v=(h,m)=>{c(it({name:"knowledge assist source viewed",data:{question:m,sourceViewed:h.url||h.name},options:{includeConversationData:!0}}))};return(0,wr.useEffect)(()=>{var h;n&&d==="idle"?c(Ei({question:n,promptInstruction:r})):(h=a.current)==null||h.focus()},[a,d]),(0,wr.useEffect)(()=>{d==="done"&&(c(it({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,wr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,p]),(0,Ye.jsxs)("div",{className:l.root,children:[p.length>0&&(0,Ye.jsx)("div",{className:l.alignRight,children:(0,Ye.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ye.jsxs)(te.ActionsBar,{list:p.map(({answer:h})=>({text:h.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:h=>e(h.text),children:[p.map(({question:h,answer:m},g)=>(0,Ye.jsx)(te.List,{children:(0,Ye.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:g,description:m.answer,closeOnSelect:!0,onClick:()=>e(m.answer),onSourceClick:f=>v(f,h),sources:m.sources,styles:{title:l.question,description:l.answer},children:h})},`${m.answer}_${g}`)),d==="loading"&&(0,Ye.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ye.jsx)("p",{className:l.status,children:u("error")}),(0,Ye.jsxs)("form",{className:l.form,onSubmit:y,children:[(0,Ye.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,Ye.jsx)("button",{type:"submit",className:l.submit,children:(0,Ye.jsx)(e1,{})})]})]})]})},t1=dI;var pI={data:null,fetchState:"idle"},bi=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)}),fI=B({name:"profile",initialState:pI,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})}}),n1=fI.reducer;var Ee=S(E()),mI=200,gI=5,hI=4,yI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),r1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),vI=()=>{let e=W(),t=Pt(),n=j(Ng),[r,o]=(0,Ze.useState)(!1),[i,s]=(0,Ze.useState)(""),a=A(F_),l=A(bi),[u,c]=(0,Ze.useState)(null),[p,d]=(0,Ze.useState)([]),[y,v]=(0,Ze.useState)(),h=A(Tn),m=F("showSearch"),g=F("showEntitiesCommand"),f=F("showSummaryCommand"),x=F("showKnowledgeSearch"),_=F("showImageSearch"),C=F("searchTriggerKey"),w=A(Dw),b=A(j_),R=A(D_),P=I=>ln(b.filter($=>$.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),K=[{label:n("entitiesClipboard"),onClick:()=>e(Ue("entities")),shouldShow:g&&r1(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(Ue("summary")),shouldShow:f&&r1(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Ue("knowledgeAssist")),shouldShow:x,experimental:!0}].filter(I=>I.shouldShow),H=(w==null?void 0:w.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],je=(0,Ze.useCallback)((0,o1.default)((I,$)=>{e(oo({query:I,type:$,tags:["search-overlay"]}))},mI),[]),an=yI([...H,...N]),$t=(0,Ze.useCallback)((I,$)=>{if(!$)return;let Lt=[...N,...H].find(({value:Bn})=>Bn===$);Lt&&(e(Ue("edit")),c({...I,searchTerm:void 0}),d(Lt.list))},[e,u,H]),uo=(0,Ze.useCallback)((I,$)=>{switch($.type){case"IMAGE":t.send(Tg,{suggestion:$});break;default:t.send(kn,{text:I,suggestion:$})}e(st(!1))},[e]),Fi=I=>{ba(I.text),e(it({name:"entity copied",data:{entity:I,type:"copy"}})),e(st(!1))},Pr=I=>{t.send(kn,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(it({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(Ue("search")),e(Ci()),e(st(!1))},Ha=I=>{ba(I),e(st(!1))},Ua=I=>{t.send(kn,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(st(!1))},ji=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Bi=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function ln(I,$){return I.slice(0,y?10:$.toLowerCase()==="image"?hI:gI)}function Hi(I,$,Lt){return $.reduce((Bn,un)=>Lt&&y===Lt?un.length+Bn:ln(un,Lt).length+Bn,I)}function Rr(I){return $=>{r?window.confirm(n("warning"))&&(I($),o(!1)):I($)}}return(0,Ze.useEffect)(()=>{i?je(i,y):e(Vc())},[i,y]),(0,Ze.useEffect)(()=>{a==="search"&&e(Ci())},[a]),(0,Ze.useEffect)(()=>{h&&e(Ca())},[h]),Bw(C,()=>e(st(!0))),!m||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Rr(I=>e(st(I))),onChangeType:I=>v(I),onChangePage:Rr(I=>e(Ue(I))),selectedType:y,search:i,page:a,isOpen:R,types:[...H,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...K.map(I=>({text:I.label,type:"command"})),...an.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},$)=>uo(I,an[$]),onSecondary:(I,$)=>{$t(an[$-K.length],an[$-K.length].type)},children:[K.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:K.map((I,$)=>(0,Ee.jsx)(te.ListItem,{index:Hi($,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...H,...N].map(({value:I,label:$,list:Lt,lineClamp:Bn,listOrientation:un},Ui)=>(0,Ee.jsx)(te.List,{heading:$,orientation:un==="horizontal"?"horizontal":"vertical",children:ln(Lt,I).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Hi(K.length+dt,[...H,...N].slice(0,Ui).map(({list:Ir})=>Ir),I),closeOnSelect:!1,lineClamp:Bn,onClick:()=>uo(ct.text,ct),description:I!=="IMAGE"?ct.title&&ct.text:void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Rr(()=>{e(Ue("search")),c(null)}),children:u&&(0,Ee.jsx)(qc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(Ue("search")),c(null),d([])},onNext:Bi,onPrevious:ji,onUse:I=>{e(Ue("search")),uo(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(st(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:Rr(()=>{e(Ue("search"))}),children:(0,Ee.jsx)(Kw,{onUse:Ua,onCopy:Fi})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:Rr(()=>{e(Ue("search"))}),children:(0,Ee.jsx)(Xw,{onCopy:Ha})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),isExperimental:!0,onDismiss:Rr(()=>{e(Ci()),e(Ue("search"))}),children:(0,Ee.jsx)(t1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Pr,onResetQuestion:()=>{e(Ci()),s("")}})})]})},i1=vI;var Ti=S(E()),SI=()=>{let e=F("showSearch"),t=F("isEmbedded");return(0,Ti.jsxs)(s1.Fragment,{children:[e&&(0,Ti.jsx)(i1,{}),(0,Ti.jsx)(bw,{}),t&&(0,Ti.jsx)(Lw,{})]})},a1=SI;var Ra=S(E()),xI=({children:e})=>{let n=F("locale").replace("-","");return(0,Ra.jsx)(Bd.Provider,{value:n,children:e})},_I=({store:e,customStyles:t={},children:n})=>(0,Ra.jsx)(Hm,{store:e,children:(0,Ra.jsx)(xI,{children:(0,Ra.jsx)(Ki.Provider,{value:t,children:n})})}),Ia=_I;var ed=S(X()),Ri=S(O());var l1=S(O());function u1(e,t){let[n,r]=(0,l1.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)}}]}function Zc(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 d1=S(X()),In=S(O());var Fg={};Ce(Fg,{enUS:()=>wI,nlNL:()=>EI});var wI={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"}]}]},EI={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 c1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var Er=S(E()),jg=(e,t,n)=>r=>(0,Er.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),CI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Fg),i=Pt(),s=k("Login",c1),a=F("productName"),l=(0,In.useCallback)(h=>{h.preventDefault(),r&&r(parseInt(h.target.value,10))},[]),u=(0,In.useCallback)(h=>{h.preventDefault(),i.send(wi,!0)},[t]),c=(0,In.useMemo)(()=>h=>(0,Er.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:h},"login"),[t]),p=(0,In.useCallback)(h=>(0,Er.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:h},"prompt"),[u]),{min:d,hour:y,day:v}=(0,In.useMemo)(()=>({min:jg(s,60*10,l),hour:jg(s,60*60,l),day:jg(s,60*60*12,l)}),[]);return(0,Er.jsxs)("div",{className:(0,d1.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,Er.jsxs)(In.Fragment,{children:[(0,Er.jsx)("br",{}),o("snooze",{min:d,hour:y,day:v})]})]})},Jc=CI;var p1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var La=S(E()),bI=({title:e})=>{let t=k("SearchTrigger",p1),n=W();return(0,La.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(st(!0)),children:[(0,La.jsx)(hi,{}),(0,La.jsx)("span",{className:t.text,children:e})]})},f1=bI;var x1=S(O());var Pi=S(O());var m1=S(O());function g1(e,t,n){(0,m1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var TI=/[.*+?^${}()|[\]\\]/g,kI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function PI(e){return e.replace(TI,"\\$&")}function RI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function Bg(e){return e.search(kI)}function h1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${PI(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function y1(e){return e.replace(ho,'<mark data-type="placeholder">$1</mark>')}function ki(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function II(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=RI(t.toLowerCase(),e.toLowerCase()),o=ki(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=Bg(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Sy).length>3||t.length>30?II(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ki(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var v1={badge:"_badge_8rv7b_1",formattedText:"_formattedText_8rv7b_5"};var Ug=S(E()),AI=["search","personal-collection-search","search-autocomplete"];function OI(e,t,n,r={}){let o="";return AI.includes(t)?o=h1(Hg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Hg(e,n,r),r.placeholders===!0&&(o=y1(o)),o}var NI=()=>{},MI=({index:e,selected:t,suggestion:n})=>{let r=F("inlineSuggestions"),o=A(ii),i=W(),s=k("TextSuggestion",v1),a=(0,Pi.useRef)(null);(0,Pi.useEffect)(()=>{let u=setTimeout(()=>{i(Xx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),g1(a,"click",()=>{i(Tc(e)),i(jt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Pi.useMemo)(()=>OI(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"?null:(0,Ug.jsx)(oe,{ref:a,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:NI,children:(0,Ug.jsx)(li,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},S1=MI;var zg=S(E()),DI=({suggestions:e,selectedIndex:t})=>(0,zg.jsx)(x1.Fragment,{children:e.slice().map((n,r)=>(0,zg.jsx)(S1,{index:r,selected:r===t,suggestion:n},`${n.text}-${n.source}`)).reverse()}),_1=DI;var Kg={};Ce(Kg,{enUS:()=>FI,nlNL:()=>jI});var FI={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"}]},jI={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 w1={root:"_root_4kcme_1",isInline:"_isInline_4kcme_14",toggleButton:"_toggleButton_4kcme_18",toggleButtonWrapper:"_toggleButtonWrapper_4kcme_22",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_4kcme_29",isCollapsed:"_isCollapsed_4kcme_33",collapsible:"_collapsible_4kcme_33",hints:"_hints_4kcme_41",hintsHidden:"_hintsHidden_4kcme_48",triggers:"_triggers_4kcme_53",triggersRight:"_triggersRight_4kcme_68"};var ue=S(E()),BI=({inline:e=!1,textSuggestions:t,selectedIndex:n})=>{let r=k("SuggestionsOverlay",w1),o=j(Kg),i=F("inlineSuggestions"),s=A(Zc),a=Vx(),l=W(),u=(0,Ri.useRef)(null),c=F("searchTriggerKey"),p=F("productName"),d=A(uw),y=A(Tn),v=A(mc),[h,m]=(0,Ri.useState)(null),g=F("showSearch"),f=F("showTextSuggestions"),x=F("adminUrl"),_=F("isEmbedded"),[C,w]=u1("dd-snooze-until-ms",0),b=d||C>Date.now(),R=t.filter(K=>K.source!=="gpt").length,P=()=>{b&&w(0),l(pw(!b))},N=K=>{let H=Date.now()+K*1e3;w(H),U.info(`Snooze until: ${new Date(H)}`),l(xi({collapse:!0}))};return(0,Ri.useEffect)(()=>{R===0&&m(null)},[t,R]),pi(()=>{l(xi({collapse:!0,skipWhenInputFocus:!0}))}),i!==e||y===null||v===!1?null:y===!1?(0,ue.jsxs)("div",{ref:u,className:(0,ed.default)(r.root,{[r.isCollapsed]:b,[r.isInline]:e}),"data-inline":e,children:[!b&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:r.triggersRight,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("open",{productName:p}),onClick:P,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(Jc,{loginUrl:x,isEmbedded:_,onSnooze:N})})]}):!a||!s?null:(0,ue.jsxs)("div",{ref:u,className:(0,ed.default)(r.root,{[r.isCollapsed]:b,[r.isInline]:e}),"data-inline":e,children:[!b&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:g&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>m(o(zc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>m(null),children:(0,ue.jsx)(f1,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,ed.default)(!h&&r.hintsHidden,r.hints),children:h}),(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Nr,{className:r.toggleButton,title:o("open",{productName:p}),onClick:P,isCollapsed:!0})}),R>0&&f&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(qt,{children:(0,ue.jsx)(_1,{suggestions:t,selectedIndex:n})})})]})},HI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),td=Yr(HI)(BI);var md=S(X());var Nn=S(O());var E1=S(O()),UI=["div","span","mark","strong","b","i","u","em"];function Vg(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(UI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,E1.cloneElement)(r,{children:Vg(s,t,n+1)})]}return[...e,...t]}function Ln(e){return e.tagName.toLowerCase()==="textarea"}var C1={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 id=S(O());var $g=S(X()),Rt=S(O());var nd=S(O()),zI=["bottom","height","left","right","top","width"],KI=(e={},t={})=>zI.some(n=>e[n]!==t[n]),An=new Map,b1,T1=()=>{let e=[],t=[];An.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();KI(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{An.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),b1=window.requestAnimationFrame(T1)};function VI(e,t){return{observe(){let n=An.size===0;if(An.has(e)){let r=An.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else An.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&T1()},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(b1)}}}}function Wg(e){let[t,n]=(0,nd.useState)(null);return(0,nd.useLayoutEffect)(()=>{if(!e.current)return;let r=VI(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ii=S(O()),P1=S(Ru());var k1={root:"_root_1jq08_1"};var R1=({children:e})=>{let[t,n]=(0,Ii.useState)(null),r=(0,Ii.useContext)(Ki);return(0,Ii.useLayoutEffect)(()=>{let o=document.createElement("div");return no(o),o.classList.add(k1.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,P1.createPortal)(e,t):null};var on={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 rd=S(E()),Li=(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 qg(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 Ai=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=qg,...a})=>{let l=Wg(t),u=Wg(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,rd.jsx)(R1,{children:(0,rd.jsx)("div",{className:(0,$g.default)(on.ref,{[on.positionAbove]:r==="above",[on.positionBelow]:r==="below",[on.positionLeft]:r==="left",[on.positionRight]:r==="right",[on.alignStart]:o==="start",[on.alignCenter]:o==="center",[on.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,rd.jsx)("div",{className:(0,$g.default)(e,on.root),children:i})})})};var Cr=S(E()),WI=({inputStyle:e,inputElement:t})=>{let n=k("TabCompletion",bt),r=Li(document.activeElement===t);return pi(()=>r.close()),(0,id.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Cr.jsxs)(id.Fragment,{children:[(0,Cr.jsx)("mark",{className:bt.caret,ref:r.triggerRef}),r.opened&&(0,Cr.jsx)(Ai,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Cr.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Cr.jsx)(td,{inline:!0})})})]})},od=class extends Ht{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(Ln(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:Bg(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Cr.jsx)(WI,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var O1=S(X());var cd=S(O());function I1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function sd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function L1(e){return e!=null}var A1=S(X()),ad=S(O());var Gg=S(E()),ld=(0,ad.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,ad.useRef)(null),i=k("TabCompletion",bt);return(0,Gg.jsx)("div",{ref:sd([o,r]),className:(0,A1.default)(e,i.popoverContentContainer),...n,children:(0,Gg.jsx)("div",{className:i.popoverContent,children:t})})});var br=S(E()),$I=e=>t=>{let n=qg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},qI=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",bt),s=Li(),a=(0,cd.useMemo)(()=>$I(e.getBoundingClientRect()),[e]),[l,u]=Mc(e);return(0,cd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,br.jsxs)("span",{children:[(0,br.jsx)("mark",{ref:sd([l,s.triggerRef]),className:(0,O1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,br.jsx)(Ai,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,br.jsx)(ld,{style:n,children:(0,br.jsx)("div",{className:i.hintText,children:o})})})]})},ud=class extends Ht{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${I1(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(L1);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,br.jsx)(qI,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var pd=S(X());var Ke=S(O());var Xg=S(E()),N1=()=>(0,Xg.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,Xg.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 Tr=S(O());var D1=S(Lg());var M1={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 Qg(e){return e.replace("https://www.","").replace("https://","")}var It=S(E()),GI=3,XI=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),QI=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=GI})=>{let i=k("LinkSearch",M1),[s,a]=(0,Tr.useState)(""),l=W(),u=A(Q_("url")),c=A(B_("URL",XI)),[p,d]=(0,Tr.useState)(c.length-1),y=F("fallbackImage"),v=f=>{let x=f.target;a(x.value)},h=(f,x)=>{f.stopPropagation(),f.preventDefault(),window.open(x,"_blank")},m=f=>{var C;let x=p-1<0?c.length-1:p-1,_=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(x),f.code==="ArrowDown"&&d(_),f.code==="Enter"&&e(((C=c[p])==null?void 0:C.text)||s)},g=(0,Tr.useCallback)((0,D1.default)(f=>{l(oo({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,Tr.useEffect)(()=>{s&&g(s)},[s]),(0,Tr.useEffect)(()=>()=>{l(Vc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(qt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,x)=>(0,It.jsx)(oe,{selected:p===x,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(me,{children:[(0,It.jsx)(me.Image,{src:dd(f,"small",y||void 0),title:f.title||f.text}),(0,It.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(me.Title,{children:f.title||Qg(f.text)}),f.title&&Qg(f.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:_=>h(_,f.text)})})]})},f.text))}),(0,It.jsx)(Ea,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:m})]})},F1=QI;var Yg={};Ce(Yg,{enUS:()=>YI,nlNL:()=>ZI});var YI={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},ZI={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var ze=S(E()),JI=(0,Ke.forwardRef)((e,t)=>{let n=k("TabCompletion",bt);return(0,ze.jsx)("mark",{ref:t,className:(0,pd.default)(n.matchSelection)},"selection-start")}),eL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(Yg),s=k("TabCompletion",bt),a=(0,Ke.useRef)(null),l=(0,Ke.useRef)(null),[u,c]=(0,Ke.useState)(null),p=W(),d=Li(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,m=a.current;!h||!m||(y.setStart(h,0),y.setEnd(m,0))},[e.current,a.current]),pi(()=>{d.close()});let v=(0,Ke.useCallback)(h=>{let m=y.toString(),g=/^http(s?):\/\//.test(h)?h:`https://${h}`;p(_c({text:`[${m}](${g})`,replace:"selection"}))},[]);return(0,ze.jsxs)("span",{children:[(0,ze.jsx)("mark",{ref:a,className:(0,pd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,ze.jsx)(Ai,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,ze.jsxs)(ld,{style:n,ref:l,children:[(0,ze.jsx)("div",{className:(0,pd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,ze.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,ze.jsx)(N1,{}),(0,ze.jsx)("span",{children:"\xA0"}),(0,ze.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,ze.jsx)(F1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},fd=class extends Ht{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,ze.jsx)(JI,{ref:this.startRef}):(0,ze.jsx)(eL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var On=S(E()),tL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",C1),c=F("insertLink"),p=F("showMidSentenceSuggestions"),d=F("inlineSuggestions"),y=Fc(a),v=(0,Nn.useRef)(null);(0,Nn.useEffect)(()=>{Ln(a)&&y&&jc(a,y)},[y]);let h=(0,Nn.useCallback)(f=>{if(!o||!n)return f;let x=[(0,On.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,On.jsx)("span",{"data-testid":"tab-completion",className:(0,md.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,On.jsx)("span",{className:(0,md.default)(u.hint,u.resetIndent),children:(0,On.jsx)(fl,{keyCode:"tab"},"tabHint")})),Vg(f,x)},[o,n,r]),m=(0,Nn.useMemo)(()=>{let f=[];return d&&f.push(new od("inline")),c&&f.push(new fd("selection")),f.push(new ci("placeholders")),i&&f.push(new ud("keywords")),f},[d,c,i]),g=(0,Nn.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,On.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(v.current=f==null?void 0:f.parentElement)},className:u.root,style:g,children:[(0,On.jsx)(li,{tagName:"span",containerTagName:"div",className:(0,md.default)(u.container,u.agentText),disableLineBreaks:Ln(a),content:t||"\u200B",onAfterParse:h,matchers:m,selection:y,keywordMatches:s,inputElement:a,inputStyle:g,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,On.jsx)("br",{})]}):null},nL=({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??ki(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=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&&p!==!1}},j1=Yr(nL)(tL);var TE=S(X()),kE=S(O());var B1={list:[],fetchState:"idle",isInitialRequest:null},U1=e=>e.autoflows.list||[],H1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Mn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Zg=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(Mn(e.platformSessionId))}),Jg=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(Mn(e.platformSessionId))}),rL=B({name:"autoflows",initialState:B1,reducers:{},extraReducers:e=>{e.addCase(Zg.pending,(t,n)=>{let r=H1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Jg.pending,(t,n)=>{let r=H1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Mn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Mn.rejected,t=>{t.fetchState="error"}),e.addCase(Mn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>B1)}}),z1=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(Mn(e))}),o.on("sessionCompleted",()=>{n(Mn(e))})}),K1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),V1=rL.reducer;var W1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},$1=e=>e.customMessages.list,q1=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),G1=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),X1=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)}),Q1=B({name:"customMessages",initialState:W1,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,()=>W1)}}),Y1=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(Q1.actions.onCustomMessage(i))})}),Z1=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),J1=Q1.reducer;var oL={jwt:null,accountUrl:null,interval:null},eE=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},eh=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),th=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(eh()),setInterval(()=>r(eh()),n)}),tE=B({name:"exchangeToken",initialState:oL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(eh.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(th.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:nE}=tE.actions,rE=tE.reducer;function oE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var fE=S(O());var cE=S(X()),dE=S(O());var sE=S(X());var iE={root:"_root_838fd_1"};var lE=S(E()),iL=({className:e,children:t})=>{let n=k("Unicode",iE);return(0,lE.jsx)("span",{className:(0,sE.default)(e,n.root),children:t})},aE=iL;var uE={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 nh={};Ce(nh,{enUS:()=>sL,nlNL:()=>aL});var sL={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"}]},aL={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 at=S(E()),uL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",uE),a=j(nh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,at.jsxs)(oe,{className:(0,cE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,at.jsx)(me,{children:(0,at.jsxs)(me.Content,{children:[(0,at.jsxs)(me.Title,{children:[t&&(0,at.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,at.jsx)("span",{children:r})]})}),(0,at.jsx)(oe.Actions,{fixed:t==="Started",children:(0,at.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,at.jsxs)(dE.Fragment,{children:[(0,at.jsx)(aE,{children:u})," ",(0,at.jsx)("span",{children:a(l)})]})})})]})},pE=uL;var rh=S(E()),cL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},dL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,rh.jsx)(fE.Fragment,{children:e.map(o=>(0,rh.jsx)(pE,{displayName:o.displayName,description:o.description,disabled:o.isBusy||cL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),pL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},fL={onStartAutoflow:Zg,onStopAutoflow:Jg},mE=Yr(pL,fL)(dL);var yd=S(O());var sh=S(X());var oh=S(E()),ih=()=>(0,oh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,oh.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 gE={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 sn=S(E()),mL=({entities:e})=>{let t=k("EntitiesWidgetList",gE),[n,r]=(0,yd.useState)(void 0),o=W(),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,sn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,sn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,sn.jsx)("span",{className:t.entityText,children:a.text}),(0,sn.jsxs)("span",{className:t.iconWrapper,children:[(0,sn.jsx)("span",{className:(0,sh.default)(t.icon),children:(0,sn.jsx)(ih,{})}),(0,sn.jsx)("span",{className:(0,sh.default)(t.icon,n===l&&t.iconClicked),children:(0,sn.jsx)(ih,{})})]})]},a.text))})},hE=mL;var yE=S(X()),ah=S(O());var Oa={};Ce(Oa,{enUS:()=>gL,nlNL:()=>hL});var gL={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"}]},hL={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 Dn={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 Je=S(E()),yL=({suggestion:e})=>{let t=j(Oa),n=W(),r=A(q1(e.text)),o=A(G1(e.text)),i=A(X1(e.text)),s=A(pc),{replyOptions:a}=e,l=(0,ah.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(gd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,ah.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(hd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Je.jsxs)(oe,{onClick:l,className:(0,yE.default)(Dn.root,{[Dn.isUsed]:r,[Dn.hasError]:i}),children:[(0,Je.jsx)(me,{children:(0,Je.jsxs)(me.Content,{children:[(0,Je.jsxs)(me.Title,{className:Dn.title,children:[e.text," ",(0,Je.jsx)(ml,{className:Dn.label,children:"analyse tool"})," ",i&&(0,Je.jsx)("span",{className:Dn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,Je.jsx)("ul",{className:Dn.quickReplies,children:a.map(c=>(0,Je.jsx)("li",{className:Dn.quickReply,children:c.title},c.title))})]})}),(0,Je.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Je.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,Je.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,Je.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},vE=yL;var lh=S(E()),SE=()=>(0,lh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,lh.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 xE=S(O());var lt=S(E()),vL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Wc(o),s=j(Oa),a=F("showImages"),l=F("fallbackImage"),u=y=>{y.preventDefault(),y.stopPropagation(),r(o)},c=y=>{y.preventDefault(),y.stopPropagation(),n(e)},p=(0,xE.useCallback)(y=>{window.open(i,"_blank"),y.stopPropagation(),y.preventDefault()},[i]);return(0,lt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,lt.jsxs)(me,{children:[a&&e.image&&(0,lt.jsx)(me.Image,{src:dd(e,"small",l||void 0),title:e.title}),(0,lt.jsxs)(me.Content,{children:[e.title&&(0,lt.jsx)(me.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,lt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,lt.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,lt.jsxs)(oe.Actions,{children:[i&&(0,lt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},_E=vL;var Na=S(E()),SL=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=A(vi),i=a=>{r.send(Cg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(kn,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Na.jsx)(Na.Fragment,{children:n.map(a=>(0,Na.jsx)(_E,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},wE=SL;var uh={};Ce(uh,{enUS:()=>xL,nlNL:()=>_L});var xL={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"}]},_L={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:"Vat gesprek samen"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var EE={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 ch=S(E()),CE=()=>(0,ch.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ch.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 dh=S(E()),bE=()=>(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:"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=S(E()),vd=(e,t)=>{let n=A(Tn);(0,kE.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},wL=()=>{let e=j(uh),t=W(),n=F("isEmbedded"),r=k("Widget",EE),o=F("showAutoflows"),i=F("showCustomMessages"),s=F("showPersonalCollectionLink"),a=F("showSummaryCommand"),l=F("showKnowledgeSearch"),u=F("showSearch"),c=A(bi),p=A(Yc),d=A(U1),y=A(Qc),v=A($1),h=A(fc),m=A(mc),g=A(Tn),f=A(pc),x=A(oE),_=A(vi),C=Pt(),w=A(Z_),b=A(eE("/admin/personal-collection")),R=F("adminUrl");if(vd(()=>(t(Aa(f)),t(Y1(f)),()=>{t(Z1(f))}),[t,m,i,f]),vd(()=>(t(Mn(f)),t(z1(f)),()=>{t(K1(f))}),[t,m,o,f]),vd(()=>{p.forEach(({type:N})=>{t(N==="entities"?Kt():Cn(N))})},[t,m,h,c]),vd(()=>(t(th()),()=>{t(nE())}),[t,m,s,h]),m===!1)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("notSupported")})})},"supported");if(g===!1)return(0,z.jsx)("div",{className:r.loginText,children:(0,z.jsx)("div",{children:(0,z.jsx)(Jc,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!f||g===null||w||x)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,TE.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(gl,{className:r.sectionList,children:[P&&(0,z.jsx)(Hn,{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)(hi,{}),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)(bE,{}),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)(CE,{}),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)(SE,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,z.jsx)(Hn,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(qt,{withDivider:!0,children:v.map(N=>(0,z.jsx)(vE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(Hn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(qt,{withDivider:!0,children:(0,z.jsx)(mE,{})})}),p.map(({type:N,title:K,amount:H,lines:je})=>{var an;switch(N){case"entities":return y&&y.length>0&&(0,z.jsx)(Hn,{type:N,title:K,"data-testid":`type-${N}`,children:(0,z.jsx)(hE,{entities:y})},N);default:return((an=_[N])==null?void 0:an.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(Hn,{type:N,title:K,"data-testid":`type-${N}`,children:(0,z.jsx)(qt,{withDivider:!0,children:(0,z.jsx)(wE,{lines:je,contentType:N,suggestions:_[N].suggestions.slice(0,H)||[]})})},N)}})]})})},PE=wL;function Oi(e){let t=new Range;return t.selectNodeContents(e),t}function RE(e,t,n){try{return kr(e,t,n),!0}catch{return!1}}var Ma=/[\u200B-\u200D\uFEFF]/g;function kr(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){var u;switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,p=c.replace(Ma,""),d=o+p.length,y=t>=o&&t<=d,v=n>=o&&n<=d;if(y){let h=s(c,t-o);h===0&&!v?r.setStartBefore(l):r.setStart(l,h)}v&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(l.tagName==="BR"&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let p=0;p<l.childNodes.length&&(a(l.childNodes[p]),!i);p++);let c=(u=l.lastChild)==null?void 0:u.tagName;l.tagName==="DIV"&&c!=="DIV"&&c!=="BR"&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Ni(e,t){if(!e.contains(t.commonAncestorContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s,a,l=0;function u(c){let p=c===n,d=c===o;switch(c.nodeType){case Node.TEXT_NODE:{let y=c.textContent;p&&(s=l+y.substring(0,r).replace(Ma,"").length),d&&(a=l+y.substring(0,i).replace(Ma,"").length),l+=y.replace(Ma,"").length;break}case Node.ELEMENT_NODE:{let{tagName:y}=c,v=c.nextSibling===null;y==="BR"&&!v&&l++;for(let h=0;h<c.childNodes.length&&(p&&h===r&&(s=l),u(c.childNodes[h]),d&&h===i-1&&(a=l),a===void 0);h++);!d&&y==="DIV"&&!v&&l++,d&&(a=l);break}default:break}}if(u(e),a===void 0)throw new Error("Could not determine start and end");return{start:s??a,end:a}}function Da(e,t){if(!e.contains(t.commonAncestorContainer))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,y=p?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{tagName:d}=u,y=u.nextSibling===null;s===0&&d==="BR"&&!y&&(a+=`
|
|
20
20
|
`);for(let v=c?r:0;v<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[v]),s!==1);v++);!p&&s===0&&d==="DIV"&&!y&&(a+=`
|
|
21
|
-
`);break}default:break}p&&s++}return l(e),a}var ao=class extends _n{observer;lastKnownSelection=null;getText(){let t=new Range;return t.selectNodeContents(this.element),Da(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){if(document.activeElement!==this.element)return null;let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);return!n||!this.element.contains(n.commonAncestorContainer)?null:n}getSelection(){let t=this.getRange();if(t)return Ni(this.element,t);let n=this.lastKnownSelection;if(n&&RE(this.element,n.start,n.end))return n;let r=Oi(this.element);return r.collapse(!1),Ni(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Da(this.element,kr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);(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();let t=()=>{var s,a;if(document.activeElement!==this.element)return;let o=this.getRange();if(!o)return;let i=Ni(this.element,o);i.start===((s=this.lastKnownSelection)==null?void 0:s.start)&&i.end===((a=this.lastKnownSelection)==null?void 0:a.end)||(this.lastKnownSelection=i,this.emit("selection",i))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)}),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let n=this.element.isContentEditable,r=new MutationObserver(()=>{this.element.isContentEditable!==n&&(n=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>r.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()}},fh=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()}},mh=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 fh(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=mh;var Mi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var gh=e=>new Promise(t=>{setTimeout(t,e)});var Di=class extends Mi{name="ClientError"},hh=class extends Mi{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:y=_=>_.status>=500,version:v="v1",...h}=n,m={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.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 x=async()=>(g--,a(s,m).then(async _=>y(_)&&!i.isAborted&&g>0?(await gh(c),x()):_.status===401&&p===!0&&f===!1?(f=!0,await this.refreshToken(),x()):_).catch(async _=>{if(d(_)&&!i.isAborted&&g>0)return await gh(c),x();throw _}));x().then(_=>_.json().catch(()=>null).then(C=>{_.status>=500?o(new hh("Server Error",C)):_.status===401?o(new Di("Unauthorized",C)):_.status===403?o(new Di("Forbidden",C)):_.status===404?o(new Di("Not Found",C)):_.status>=400&&o(new Di("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 EL;(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||={})})(EL||={});function Sd(e){return{...re(e),tags:e.tags}}var Fn=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 Sd(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 Sd(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 Sd(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=>Sd(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(xy);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 Fa=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(yg(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 CL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(CL||={});var ja=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 Fa(`${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=H({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:xd,handlingTimeReset:NE}=AE.actions,ME=AE.reducer;var DE=(e={})=>{let t={onAuthError:_i(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var _d={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var lo=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 _d.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),bL=H({name:"styleSuggestions",initialState:_d,reducers:{},extraReducers:e=>{e.addCase(lo.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(lo.rejected,t=>{t.fetchState="error"}).addCase(lo.fulfilled,(t,n)=>{t.fetchState="done",oi(t.list,n.payload)||(t.list=n.payload)}).addCase(Zr,t=>{t.list=_d.list}).addCase(J,()=>_d)}}),FE=bL.reducer;var jE=(e={})=>{let t,n=!0,r={getStyleSuggestions:lo,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 TL(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:Cn,getAutocompleteSuggestions:va,debounce:200,check:Zc,...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,p=(h=l.conversation.current)==null?void 0:h.id,d=i.type===Gc.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:y}}=l;return TL(y,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let m=ii(l);m===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(m))},d?0:t.debounce)),a}};var BE=lo.fulfilled.toString();function kL(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=kL(o,s);r.type===BE&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var PL=Du({activeSuggestion:lw,answer:Jw,auth:ww,autoflows:V1,conversation:zx,contentTypes:Fw,customMessages:J1,exchangeToken:rE,entities:Uw,handlingTime:ME,info:M_,input:Gm.reducer,overlayInput:Ge.reducer,settings:Ox,profile:n1,search:U_,summary:qw,styleSuggestions:FE,ui:fw,textSuggestions:rw});function zE(e){return H0({reducer:PL,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 RL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},IL=e=>t=>n=>r=>{var a;let o=t.getState(),i=zm("inlineSuggestions")(o);switch(r.type){case bn.toString():{let l=Y_(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 _i.toString():{!r.payload&&e.emit("logout",void 0);break}case jt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:RL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case _c.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 oa.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case bc.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 Kt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Pn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{inputText:JSON.stringify(r.payload.original),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 wc.toString():e.handleKeyDown(r.payload);break;case Zr.toString():e.logSendMessage(r.payload);break;case Ec.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 Sa.toString():e.onUpdateShowTabHint(r.payload);break;case xd.toString():e.logHandlingTime();break;case jt.toString():{i&&(t.dispatch(mr([])),t.dispatch(gr()));break}default:break}return s},KE=IL;function yh(e){return e.toISOString().replace("T"," ").replace("Z","")}function VE(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:yh(n),timeStop:yh(r)}}function vh(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:p,cuts:d,deletions:y,textSuggestions:v,offeredTextSuggestions:h}}=t[e],m=r.length,f=v.reduce((N,{text:K,searchTerm:B})=>N+K.length-(B?B.length:0),0),x=u??Date.now(),_=(Date.now()-x)/1e3+(c||0),C=o/_,w=v.reduce((N,{searchTerm:K})=>N+(K?K.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:y,lenTextTyped:o+w,lenTextTotal:m,lenTextAssisted:f,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 wd(e){return e instanceof HTMLElement&&(Ln(e)||Dc(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 LL(e){return e.offsetParent!==null}function XE(e){if(!LL(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 Ed(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 ut=S(E()),QE=GE("showTabHint",!0),Ha=class e{static version="10.1.11";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 Fn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[KE({emit:(p,d,y)=>this.emit(p,d,y),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=>QE.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new ja(n)}),this.store=zE(c),this.broadcastEvents=new IE({debug:!0,deepdeskUrl:u,eventMap:Ew(this.store),createCustomChannel:l}),this.store.dispatch(na),this.store.dispatch(Sa(QE.value())),this.store.dispatch(na({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(_i(null)),this.store.dispatch(_r()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Tn(r)&&hw(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($m({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(gc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(hc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(qm(t))).payload}async postMessages(t){return(await this.store.dispatch(vc(t))).payload}async updateConversation(t){return(await this.store.dispatch(yc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Pn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(na(t))}setVisitorInfo(t){this.store.dispatch(N_(t))}async setAgentInfo(t){await this.store.dispatch(ma(t))}async setAgentSettings(t){await this.store.dispatch(vg(t))}async getAgentSettings(){return(await this.store.dispatch(Sg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Gc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Cc(t))}notifyKeyDown(t){this.store.dispatch(wc(t))}notifyPaste(t,n){this.store.dispatch(Jx({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(Yx(t))}notifyExternalSuggestion(t){this.store.dispatch(jt(t)),this.store.dispatch(gr())}notifyEditSuggestion(t){this.store.dispatch(tw(t.contentType,t.suggestions)),this.store.dispatch(bn({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(xi({collapse:!1})),this.inputMediator&&this.store.dispatch(Wx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(mr([])))}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(Zx(xc(t))),!(t.key!=="Tab"&&!this.settings.showTextSuggestions))switch(t.key){case"Up":case"ArrowUp":if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Gx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return;case"Down":case"ArrowDown":{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Qx());let{selectedSuggestionIndex:u}=this.state.input;u===-1?this.store.dispatch(oa()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return}case"Esc":case"Escape":{l?(this.store.dispatch(Tc(-1)),this.store.dispatch(oa()),t.preventDefault()):n||(this.store.dispatch(xi({collapse:!0})),this.store.dispatch(dw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:u}=this.state.input,c=u.text.substring(0,u.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(Sa(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&p&&p.text.startsWith(c)&&(this.store.dispatch(jt({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(gr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(e_()),this.store.dispatch(mr([]))}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(xd()))}logSendMessage(t){let n=vh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=vh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(qx(this.state.overlayInput.metrics))}logHandlingTime(){let t=VE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(NE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(gr()),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(jt({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]=mi(n,r);return i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,jn.unmountComponentAtNode)(i),s(),i.remove()}),i}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return no(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,n.appendChild(o),this.unmountHandlers.push(()=>{(0,jn.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(!wd(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:y,inputMediator:v,closestScrollSelector:h,appendOverlayTo:m,inlineSuggestions:g}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:y,isEmbedded:p,inlineSuggestions:g});let f=h&&$E(t,h)||void 0,x=this.overlayContainerFactory("deepdesk-tab-completion",f||t,{appendTo:m,closestScrollElement:f,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),_=this.overlayContainerFactory("deepdesk-suggestions-overlay",f||t,{appendTo:m},r==null?void 0:r.suggestionsRootNode);n.automaticHandlingTime&&this.setupHandlingTime(t),(0,jn.render)((0,ut.jsx)(Ia,{store:this.store,customStyles:r,children:(0,ut.jsx)(_a,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(j1,{inputElement:t})})}),x),(0,jn.render)((0,ut.jsx)(Ia,{store:this.store,customStyles:r,children:(0,ut.jsx)(_a,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(td,{})})}),_),(0,jn.render)((0,ut.jsx)(Ia,{store:this.store,customStyles:r,children:(0,ut.jsx)(_a,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(a1,{})})}),this.createContainer("deepdesk-overlays")),no(t),this.inputMediator=v||(Ln(t)?new wn(t):new ao(t)),this.inputMediator.on("change",({plainText:w})=>{this.notifyInputChanged(w)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(t_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",w=>{this.notifyKeyDown(w)}),this.inputMediator.on("paste",({pastedText:w,selectionText:b})=>{this.notifyPaste(w,b)}),this.inputMediator.on("cut",({selectionText:w})=>{this.notifyCut(w)});let C;this.inputMediator.on("selection",w=>{clearTimeout(C),w===null?C=setTimeout(()=>{w!==null&&this.store.dispatch(Xm(w))},500):this.store.dispatch(Xm(w))}),this.inputMediator.on("disabled",()=>{var w;(w=this.inputMediator)==null||w.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(Si(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Si(!0))),this.store.dispatch($x({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var w;this.refresh(),this.broadcastEvents.setSessionId((w=this.state.conversation.current)==null?void 0:w.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,jn.render)((0,ut.jsx)(Ia,{store:this.store,customStyles:r,children:(0,ut.jsx)(_a,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(PE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,jn.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Ed(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=bi(this.state);t&&this.store.dispatch(na({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(Kt()):this.store.dispatch(Cn(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?kr(e,n.replace.start,n.replace.end):Oi(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(`
|
|
21
|
+
`);break}default:break}p&&s++}return l(e),a}var ao=class extends _n{observer;lastKnownSelection=null;getText(){let t=new Range;return t.selectNodeContents(this.element),Da(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){if(document.activeElement!==this.element)return null;let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);return!n||!this.element.contains(n.commonAncestorContainer)?null:n}getSelection(){let t=this.getRange();if(t)return Ni(this.element,t);let n=this.lastKnownSelection;if(n&&RE(this.element,n.start,n.end))return n;let r=Oi(this.element);return r.collapse(!1),Ni(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Da(this.element,kr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);(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();let t=()=>{var s,a;if(document.activeElement!==this.element)return;let o=this.getRange();if(!o)return;let i=Ni(this.element,o);i.start===((s=this.lastKnownSelection)==null?void 0:s.start)&&i.end===((a=this.lastKnownSelection)==null?void 0:a.end)||(this.lastKnownSelection=i,this.emit("selection",i))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)}),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let n=this.element.isContentEditable,r=new MutationObserver(()=>{this.element.isContentEditable!==n&&(n=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>r.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()}},fh=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()}},mh=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 fh(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=mh;var Mi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var gh=e=>new Promise(t=>{setTimeout(t,e)});var Di=class extends Mi{name="ClientError"},hh=class extends Mi{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:y=_=>_.status>=500,version:v="v1",...h}=n,m={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.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 x=async()=>(g--,a(s,m).then(async _=>y(_)&&!i.isAborted&&g>0?(await gh(c),x()):_.status===401&&p===!0&&f===!1?(f=!0,await this.refreshToken(),x()):_).catch(async _=>{if(d(_)&&!i.isAborted&&g>0)return await gh(c),x();throw _}));x().then(_=>_.json().catch(()=>null).then(C=>{_.status>=500?o(new hh("Server Error",C)):_.status===401?o(new Di("Unauthorized",C)):_.status===403?o(new Di("Forbidden",C)):_.status===404?o(new Di("Not Found",C)):_.status>=400&&o(new Di("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 EL;(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||={})})(EL||={});function Sd(e){return{...re(e),tags:e.tags}}var Fn=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 Sd(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 Sd(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 Sd(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=>Sd(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(xy);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 Fa=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(yg(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 CL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(CL||={});var ja=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 Fa(`${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=B({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:xd,handlingTimeReset:NE}=AE.actions,ME=AE.reducer;var DE=(e={})=>{let t={onAuthError:_i(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var _d={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var lo=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 _d.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),bL=B({name:"styleSuggestions",initialState:_d,reducers:{},extraReducers:e=>{e.addCase(lo.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(lo.rejected,t=>{t.fetchState="error"}).addCase(lo.fulfilled,(t,n)=>{t.fetchState="done",oi(t.list,n.payload)||(t.list=n.payload)}).addCase(Zr,t=>{t.list=_d.list}).addCase(J,()=>_d)}}),FE=bL.reducer;var jE=(e={})=>{let t,n=!0,r={getStyleSuggestions:lo,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 TL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var BE=(e={})=>{let t={getTextSuggestions:Cn,getAutocompleteSuggestions:va,debounce:200,check:Zc,...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,p=(h=l.conversation.current)==null?void 0:h.id,d=i.type===Gc.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:y}}=l;return TL(y,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let m=ii(l);m===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(m))},d?0:t.debounce)),a}};var HE=lo.fulfilled.toString();function kL(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!==HE){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=kL(o,s);r.type===HE&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var PL=Du({activeSuggestion:lw,answer:Jw,auth:ww,autoflows:V1,conversation:zx,contentTypes:Fw,customMessages:J1,exchangeToken:rE,entities:Uw,handlingTime:ME,info:M_,input:Gm.reducer,overlayInput:Ge.reducer,settings:Ox,profile:n1,search:U_,summary:qw,styleSuggestions:FE,ui:fw,textSuggestions:rw});function zE(e){return B0({reducer:PL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),DE(),BE({debounce:200}),jE({debounce:500}),UE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var RL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},IL=e=>t=>n=>r=>{var a;let o=t.getState(),i=zm("inlineSuggestions")(o);switch(r.type){case bn.toString():{let l=Y_(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 _i.toString():{!r.payload&&e.emit("logout",void 0);break}case jt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:RL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case _c.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 oa.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case bc.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 Kt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Pn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{inputText:JSON.stringify(r.payload.original),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 wc.toString():e.handleKeyDown(r.payload);break;case Zr.toString():e.logSendMessage(r.payload);break;case Ec.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 Sa.toString():e.onUpdateShowTabHint(r.payload);break;case xd.toString():e.logHandlingTime();break;case jt.toString():{i&&(t.dispatch(mr([])),t.dispatch(gr()));break}default:break}return s},KE=IL;function yh(e){return e.toISOString().replace("T"," ").replace("Z","")}function VE(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:yh(n),timeStop:yh(r)}}function vh(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:p,cuts:d,deletions:y,textSuggestions:v,offeredTextSuggestions:h}}=t[e],m=r.length,f=v.reduce((N,{text:K,searchTerm:H})=>N+K.length-(H?H.length:0),0),x=u??Date.now(),_=(Date.now()-x)/1e3+(c||0),C=o/_,w=v.reduce((N,{searchTerm:K})=>N+(K?K.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:y,lenTextTyped:o+w,lenTextTotal:m,lenTextAssisted:f,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 wd(e){return e instanceof HTMLElement&&(Ln(e)||Dc(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 LL(e){return e.offsetParent!==null}function XE(e){if(!LL(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 Ed(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 ut=S(E()),QE=GE("showTabHint",!0),Ba=class e{static version="10.1.13";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 Fn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[KE({emit:(p,d,y)=>this.emit(p,d,y),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=>QE.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new ja(n)}),this.store=zE(c),this.broadcastEvents=new IE({debug:!0,deepdeskUrl:u,eventMap:Ew(this.store),createCustomChannel:l}),this.store.dispatch(na),this.store.dispatch(Sa(QE.value())),this.store.dispatch(na({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(_i(null)),this.store.dispatch(_r()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Tn(r)&&hw(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($m({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(gc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(hc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(qm(t))).payload}async postMessages(t){return(await this.store.dispatch(vc(t))).payload}async updateConversation(t){return(await this.store.dispatch(yc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Pn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(na(t))}setVisitorInfo(t){this.store.dispatch(N_(t))}async setAgentInfo(t){await this.store.dispatch(ma(t))}async setAgentSettings(t){await this.store.dispatch(vg(t))}async getAgentSettings(){return(await this.store.dispatch(Sg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Gc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Cc(t))}notifyKeyDown(t){this.store.dispatch(wc(t))}notifyPaste(t,n){this.store.dispatch(Jx({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(Yx(t))}notifyExternalSuggestion(t){this.store.dispatch(jt(t)),this.store.dispatch(gr())}notifyEditSuggestion(t){this.store.dispatch(tw(t.contentType,t.suggestions)),this.store.dispatch(bn({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(xi({collapse:!1})),this.inputMediator&&this.store.dispatch(Wx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(mr([])))}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(Zx(xc(t))),!(t.key!=="Tab"&&!this.settings.showTextSuggestions))switch(t.key){case"Up":case"ArrowUp":if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Gx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return;case"Down":case"ArrowDown":{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Qx());let{selectedSuggestionIndex:u}=this.state.input;u===-1?this.store.dispatch(oa()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return}case"Esc":case"Escape":{l?(this.store.dispatch(Tc(-1)),this.store.dispatch(oa()),t.preventDefault()):n||(this.store.dispatch(xi({collapse:!0})),this.store.dispatch(dw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:u}=this.state.input,c=u.text.substring(0,u.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(Sa(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&p&&p.text.startsWith(c)&&(this.store.dispatch(jt({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(gr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(e_()),this.store.dispatch(mr([]))}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(xd()))}logSendMessage(t){let n=vh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=vh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(qx(this.state.overlayInput.metrics))}logHandlingTime(){let t=VE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(NE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(gr()),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(jt({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]=mi(n,r);return i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,jn.unmountComponentAtNode)(i),s(),i.remove()}),i}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return no(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,n.appendChild(o),this.unmountHandlers.push(()=>{(0,jn.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(!wd(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:y,inputMediator:v,closestScrollSelector:h,appendOverlayTo:m,inlineSuggestions:g}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:y,isEmbedded:p,inlineSuggestions:g});let f=h&&$E(t,h)||void 0,x=this.overlayContainerFactory("deepdesk-tab-completion",f||t,{appendTo:m,closestScrollElement:f,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),_=this.overlayContainerFactory("deepdesk-suggestions-overlay",f||t,{appendTo:m},r==null?void 0:r.suggestionsRootNode);n.automaticHandlingTime&&this.setupHandlingTime(t),(0,jn.render)((0,ut.jsx)(Ia,{store:this.store,customStyles:r,children:(0,ut.jsx)(_a,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(j1,{inputElement:t})})}),x),(0,jn.render)((0,ut.jsx)(Ia,{store:this.store,customStyles:r,children:(0,ut.jsx)(_a,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(td,{})})}),_),(0,jn.render)((0,ut.jsx)(Ia,{store:this.store,customStyles:r,children:(0,ut.jsx)(_a,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(a1,{})})}),this.createContainer("deepdesk-overlays")),no(t),this.inputMediator=v||(Ln(t)?new wn(t):new ao(t)),this.inputMediator.on("change",({plainText:w})=>{this.notifyInputChanged(w)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(t_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",w=>{this.notifyKeyDown(w)}),this.inputMediator.on("paste",({pastedText:w,selectionText:b})=>{this.notifyPaste(w,b)}),this.inputMediator.on("cut",({selectionText:w})=>{this.notifyCut(w)});let C;this.inputMediator.on("selection",w=>{clearTimeout(C),w===null?C=setTimeout(()=>{w!==null&&this.store.dispatch(Xm(w))},500):this.store.dispatch(Xm(w))}),this.inputMediator.on("disabled",()=>{var w;(w=this.inputMediator)==null||w.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(Si(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Si(!0))),this.store.dispatch($x({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var w;this.refresh(),this.broadcastEvents.setSessionId((w=this.state.conversation.current)==null?void 0:w.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,jn.render)((0,ut.jsx)(Ia,{store:this.store,customStyles:r,children:(0,ut.jsx)(_a,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(PE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,jn.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Ed(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=bi(this.state);t&&this.store.dispatch(na({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(Kt()):this.store.dispatch(Cn(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?kr(e,n.replace.start,n.replace.end):Oi(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
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?kr(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()}})}function JE(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function eC(e,t,n){await new Fn(e).authenticateWithKey(t,n)}async function tC(e){let n=await new Wt(e).get("/platform/config/",{version:null});return re(n)}async function AL(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 nC(e,t){let n=await AL(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 lC(OL);})();
|
|
23
23
|
/*! Bundled license information:
|
|
24
24
|
|